/* =========================================================
   XTREMEX — 4D ESPORTS COLLECTIVE
   Core system: type, layout, chrome, hero, navigation
   ========================================================= */

@font-face {
  font-family: "Anton";
  src: url("../fonts/anton-400.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/space-300.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/space-400.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/space-500.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/space-600.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/space-700.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DM Mono";
  src: url("../fonts/dmmono-300.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DM Mono";
  src: url("../fonts/dmmono-400.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DM Mono";
  src: url("../fonts/dmmono-500.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #070809;
  --bg-soft: #0a0b0c;
  --bg-lift: #0d0e10;
  --bone: #f1f0e8;
  --muted: #8c8e8a;
  --muted-2: #7e827e;
  --acid: #d8ff3f;
  --acid-soft: rgba(216, 255, 63, 0.14);
  --blue: #665cff;
  --line: rgba(241, 240, 232, 0.13);
  --line-soft: rgba(241, 240, 232, 0.07);
  --display: "Anton", "Arial Black", sans-serif;
  --sans: "Space Grotesk", "Helvetica Neue", sans-serif;
  --mono: "DM Mono", "Courier New", monospace;
  --pad: clamp(20px, 4.5vw, 72px);
  --max: 1720px;
  --ease: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
  overflow-anchor: none;
  scrollbar-color: var(--acid) #101111;
  scrollbar-width: thin;
}

::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #101111;
}
::-webkit-scrollbar-thumb {
  background: #353835;
  border-radius: 20px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--acid);
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--bone);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body.is-loading,
body.menu-open,
body.modal-open {
  overflow: hidden;
}

section[id],
div[id="join-form"] {
  scroll-margin-top: 82px;
}

::selection {
  color: #070809;
  background: var(--acid);
}

img,
svg,
canvas {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
}

p,
h1,
h2,
h3,
h4,
figure {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 5px;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 10000;
  padding: 12px 18px;
  background: var(--acid);
  color: #070809;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  transform: translateY(-160%);
  transition: transform 0.2s;
}
.skip-link:focus {
  transform: translateY(0);
}

.page-pad {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.section {
  position: relative;
  padding-block: clamp(100px, 11vw, 180px);
}

.display {
  font-family: var(--display);
  font-weight: 400;
  line-height: 0.83;
  letter-spacing: 0.005em;
  text-transform: uppercase;
}

.display em {
  color: var(--acid);
  font-style: normal;
}

.display--lg {
  font-size: clamp(3.6rem, 7.7vw, 8.8rem);
}

.display--xl {
  font-size: clamp(4.4rem, 11vw, 13rem);
}

.mono {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.eyebrow b {
  color: var(--acid);
  font-weight: 400;
}

.section-bar {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
  margin-bottom: clamp(48px, 6vw, 86px);
}

.section-bar__line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line) 0%, transparent 100%);
}

.section-bar > .mono:last-child {
  color: var(--muted-2);
}

/* ---------- Buttons, links, cursor ---------- */

.button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  min-height: 56px;
  padding: 0 28px;
  overflow: hidden;
  background: var(--acid);
  color: #08090a;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  clip-path: polygon(0 0, calc(100% - 13px) 0, 100% 13px, 100% 100%, 13px 100%, 0 calc(100% - 13px));
  transition: color 0.35s var(--ease), background 0.35s var(--ease);
}

.button::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--bone);
  transform: translateY(101%);
  transition: transform 0.45s var(--ease);
  z-index: 0;
}

.button > * {
  position: relative;
  z-index: 1;
}

.button svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  transition: transform 0.35s var(--ease);
}

.button:hover::before {
  transform: translateY(0);
}

.button:hover svg {
  transform: translate(3px, -3px);
}

.magnetic {
  transform: translate3d(var(--mx, 0px), var(--my, 0px), 0);
  transition: transform 0.45s var(--ease), color 0.35s var(--ease), background 0.35s var(--ease);
}

.magnetic:hover {
  transition: transform 0.12s linear, color 0.35s var(--ease), background 0.35s var(--ease);
}

.button--compact {
  min-height: 44px;
  padding: 0 20px;
  gap: 18px;
  font-size: 9px;
}

.button--primary {
  background: var(--acid);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: color 0.3s, border-color 0.3s;
}

.text-link i {
  color: var(--acid);
  font-style: normal;
  font-size: 15px;
  transition: transform 0.35s var(--ease);
}

.text-link:hover {
  color: var(--acid);
  border-color: var(--acid);
}

.text-link:hover i {
  transform: translate(4px, -4px);
}

.text-link--button {
  padding: 0 0 6px;
  border: 0;
  background: none;
  color: var(--bone);
}

.round-button {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--bone);
  transition: background 0.3s, border-color 0.3s, color 0.3s, transform 0.3s;
}

.round-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
}

.round-button:hover {
  background: var(--acid);
  border-color: var(--acid);
  color: #070809;
  transform: scale(1.06);
}

.grain {
  position: fixed;
  inset: -100%;
  z-index: 9000;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 300 300' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grainShift 0.35s steps(2) infinite;
}

@keyframes grainShift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2%, 3%); }
  50% { transform: translate(3%, -2%); }
  75% { transform: translate(-3%, -3%); }
  100% { transform: translate(2%, 2%); }
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 400;
  height: 2px;
  pointer-events: none;
  background: transparent;
}

.scroll-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--acid);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

.cursor {
  position: fixed;
  inset: 0;
  z-index: 9500;
  pointer-events: none;
  display: none;
}

body.has-custom-cursor .cursor {
  display: block;
}

body.has-custom-cursor,
body.has-custom-cursor a,
body.has-custom-cursor button,
body.has-custom-cursor .player-card,
body.has-custom-cursor [data-cursor],
body.has-custom-cursor .jersey {
  cursor: none;
}

.cursor__dot,
.cursor__ring {
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 50%;
  will-change: transform;
}

.cursor__dot {
  width: 5px;
  height: 5px;
  margin: -2.5px 0 0 -2.5px;
  background: var(--bone);
}

.cursor__ring {
  width: 38px;
  height: 38px;
  margin: -19px 0 0 -19px;
  border: 1px solid rgba(241, 240, 232, 0.65);
  transition: width 0.25s var(--ease), height 0.25s var(--ease), margin 0.25s var(--ease), background 0.25s, border-color 0.25s, border-radius 0.25s;
}

.cursor__label {
  position: absolute;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%) scale(0.6);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
}

body.cursor-link .cursor__ring {
  width: 58px;
  height: 58px;
  margin: -29px 0 0 -29px;
  border-color: var(--acid);
  background: rgba(216, 255, 63, 0.08);
}

body.cursor-drag .cursor__ring {
  width: 74px;
  height: 74px;
  margin: -37px 0 0 -37px;
  background: var(--acid);
  border-color: var(--acid);
  mix-blend-mode: difference;
}

body.cursor-drag .cursor__dot {
  opacity: 0;
}

body.cursor-drag .cursor__label {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  color: #070809;
  z-index: 1;
}

/* ---------- Loader ---------- */

.loader {
  position: fixed;
  inset: 0;
  z-index: 9200;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: clamp(20px, 3vw, 44px);
  background: #08090a;
  transition: opacity 0.75s var(--ease), visibility 0.75s;
}

.loader.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader__noise {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 45%, rgba(216, 255, 63, 0.08), transparent 38%);
  pointer-events: none;
}

.loader__top,
.loader__bottom {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.loader__center {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.loader__mark {
  width: 124px;
  height: 94px;
  margin-bottom: 24px;
}

.loader__mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.loader__word {
  font-family: var(--display);
  font-size: clamp(5rem, 15vw, 12rem);
  line-height: 0.8;
  letter-spacing: 0.02em;
  color: var(--bone);
}

.loader__status {
  margin-top: 30px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.loader__status span {
  color: var(--acid);
}

.loader__bar {
  width: min(420px, 68vw);
  height: 1px;
  margin-top: 16px;
  overflow: hidden;
  background: var(--line);
}

.loader__bar i {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--acid);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

.loader__signal {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 12px;
}

.loader__signal i {
  width: 2px;
  background: var(--acid);
  animation: signalBounce 0.8s ease-in-out infinite alternate;
}
.loader__signal i:nth-child(1) { height: 20%; animation-delay: 0s; }
.loader__signal i:nth-child(2) { height: 55%; animation-delay: 0.1s; }
.loader__signal i:nth-child(3) { height: 100%; animation-delay: 0.2s; }
.loader__signal i:nth-child(4) { height: 45%; animation-delay: 0.3s; }
.loader__signal i:nth-child(5) { height: 75%; animation-delay: 0.4s; }

@keyframes signalBounce {
  from { transform: scaleY(0.35); }
  to { transform: scaleY(1); }
}

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  height: 88px;
  padding: 0 var(--pad);
  border-bottom: 1px solid transparent;
  transition: height 0.4s var(--ease), background 0.4s, border-color 0.4s, backdrop-filter 0.4s;
}

.site-header.is-scrolled {
  height: 68px;
  background: rgba(7, 8, 9, 0.76);
  border-color: var(--line-soft);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand__star {
  width: 42px;
  height: 32px;
  object-fit: contain;
}

.brand__word {
  font-family: var(--display);
  font-size: 25px;
  line-height: 1;
  letter-spacing: 0.03em;
}

.brand__tag {
  padding-left: 10px;
  border-left: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.2vw, 38px);
  margin-left: auto;
  margin-right: clamp(8px, 2vw, 30px);
}

.primary-nav a {
  position: relative;
  padding: 8px 0;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(241, 240, 232, 0.72);
  transition: color 0.25s;
}

.primary-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 2px;
  width: 100%;
  height: 1px;
  background: var(--acid);
  transform: scaleX(0);
  transform-origin: 100% 50%;
  transition: transform 0.35s var(--ease);
}

.primary-nav a:hover,
.primary-nav a.is-active {
  color: var(--bone);
}

.primary-nav a:hover::after,
.primary-nav a.is-active::after {
  transform: scaleX(1);
  transform-origin: 0 50%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 40px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.14em;
  transition: border-color 0.3s, background 0.3s;
}

.live-pill:hover {
  border-color: rgba(216, 255, 63, 0.35);
  background: rgba(216, 255, 63, 0.05);
}

.live-pill__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ff5a47;
  box-shadow: 0 0 0 0 rgba(255, 90, 71, 0.6);
  animation: livePulse 1.8s infinite;
}

@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 90, 71, 0.55); }
  70% { box-shadow: 0 0 0 6px rgba(255, 90, 71, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 90, 71, 0); }
}

.live-pill__viewers {
  color: var(--muted);
}

.menu-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.menu-toggle span:not(.sr-only) {
  position: absolute;
  left: 13px;
  width: 16px;
  height: 1px;
  background: var(--bone);
  transition: transform 0.35s var(--ease), top 0.35s var(--ease);
}

.menu-toggle span:first-child { top: 19px; }
.menu-toggle span:nth-child(2) { top: 24px; }

body.menu-open .menu-toggle span:first-child {
  top: 21px;
  transform: rotate(45deg);
}
body.menu-open .menu-toggle span:nth-child(2) {
  top: 21px;
  transform: rotate(-45deg);
}

/* ---------- Mobile menu ---------- */

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 250;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 100px var(--pad) 40px;
  background: #08090a;
  visibility: hidden;
  opacity: 0;
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.75s var(--ease), opacity 0.4s, visibility 0.75s;
}

.mobile-menu.is-open {
  visibility: visible;
  opacity: 1;
  clip-path: inset(0 0 0 0);
}

.mobile-menu__grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--line-soft) 1px, transparent 1px), linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: 0.4;
  mask-image: radial-gradient(circle at 70% 50%, #000, transparent 70%);
  pointer-events: none;
}

.mobile-menu__nav {
  position: relative;
  display: flex;
  flex-direction: column;
}

.mobile-menu__nav a {
  display: flex;
  align-items: baseline;
  gap: 20px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--display);
  font-size: clamp(2.8rem, 10vw, 5.5rem);
  line-height: 1;
  text-transform: uppercase;
  transform: translateY(28px);
  opacity: 0;
  transition: transform 0.6s var(--ease), opacity 0.6s, color 0.3s;
}

.mobile-menu__nav a span {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--acid);
}

.mobile-menu.is-open .mobile-menu__nav a {
  transform: translateY(0);
  opacity: 1;
}

.mobile-menu__nav a:nth-child(1) { transition-delay: 0.08s; }
.mobile-menu__nav a:nth-child(2) { transition-delay: 0.13s; }
.mobile-menu__nav a:nth-child(3) { transition-delay: 0.18s; }
.mobile-menu__nav a:nth-child(4) { transition-delay: 0.23s; }
.mobile-menu__nav a:nth-child(5) { transition-delay: 0.28s; }
.mobile-menu__nav a:nth-child(6) { transition-delay: 0.33s; }

.mobile-menu__nav a:hover {
  color: var(--acid);
}

.mobile-menu__foot {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-top: 48px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.mobile-menu__foot div {
  display: flex;
  gap: 18px;
}

.mobile-menu__foot a {
  color: var(--bone);
}

.mobile-menu__foot a:hover {
  color: var(--acid);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 74% 44%, rgba(216, 255, 63, 0.07), transparent 24%),
    radial-gradient(circle at 95% 18%, rgba(102, 92, 255, 0.1), transparent 22%),
    #070809;
}

.hero__backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 76% 50%, rgba(255, 255, 255, 0.035), transparent 37%),
    linear-gradient(180deg, transparent 72%, #070809 100%);
  pointer-events: none;
  z-index: 0;
}

.hero__grid {
  position: absolute;
  left: -15%;
  right: -15%;
  bottom: -12%;
  height: 62%;
  z-index: 0;
  opacity: 0.24;
  background-image:
    linear-gradient(rgba(241, 240, 232, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(241, 240, 232, 0.14) 1px, transparent 1px);
  background-size: 70px 70px;
  transform: perspective(700px) rotateX(64deg);
  transform-origin: 50% 100%;
  mask-image: linear-gradient(to top, #000 0%, rgba(0, 0, 0, 0.7) 35%, transparent 85%);
  -webkit-mask-image: linear-gradient(to top, #000 0%, rgba(0, 0, 0, 0.7) 35%, transparent 85%);
  pointer-events: none;
  animation: gridDrift 8s linear infinite;
}

@keyframes gridDrift {
  to { background-position: 70px 70px, 70px 70px; }
}

.hero__orb-glow {
  position: absolute;
  top: 18%;
  right: 7%;
  width: 44vw;
  height: 60vh;
  z-index: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.11), rgba(196, 196, 196, 0.035) 38%, transparent 70%);
  filter: blur(28px);
  pointer-events: none;
}

.hero__canvas-wrap {
  position: absolute;
  z-index: 1;
  top: 0;
  right: 0;
  width: 64%;
  height: 100%;
  pointer-events: none;
}

#core-canvas {
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: auto;
  transition: opacity 1.4s var(--ease);
}

body.is-ready #core-canvas {
  opacity: 1;
}

/* the chrome slices apart for a beat whenever it morphs */
.hero.is-core-morphing .hero__canvas-wrap {
  animation: coreSliceBreak 740ms steps(1, end) both;
  will-change: transform, clip-path;
}

@keyframes coreSliceBreak {
  0% {
    clip-path: inset(0 0 0 0);
    transform: translate3d(0, 0, 0);
  }
  7% {
    clip-path: inset(2% 0 64% 0);
    transform: translate3d(-16px, -2px, 0);
  }
  13% {
    clip-path: inset(52% 0 8% 0);
    transform: translate3d(20px, 3px, 0);
  }
  19% {
    clip-path: inset(22% 0 44% 0);
    transform: translate3d(-8px, 0, 0);
  }
  27% {
    clip-path: inset(0 0 0 0);
    transform: translate3d(9px, 0, 0) skewX(1.4deg);
  }
  41% {
    clip-path: inset(64% 0 4% 0);
    transform: translate3d(-14px, -3px, 0);
  }
  49% {
    clip-path: inset(0 0 0 0);
    transform: translate3d(0, 0, 0) skewX(-1deg);
  }
  63% {
    clip-path: inset(34% 0 36% 0);
    transform: translate3d(13px, 2px, 0);
  }
  71% {
    clip-path: inset(0 0 0 0);
    transform: translate3d(-5px, 0, 0);
  }
  84%,
  100% {
    clip-path: inset(0 0 0 0);
    transform: translate3d(0, 0, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero.is-core-morphing .hero__canvas-wrap {
    animation: none;
  }
}

.hero__canvas-fallback {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(36vw, 520px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background:
    radial-gradient(circle at 36% 28%, #f7f7ee 0 3%, transparent 5%),
    conic-gradient(from 210deg, #101110, #e6e7dd 9%, #343633 17%, #f8f8ef 27%, #111211 40%, #adb0a8 55%, #1a1b1a 64%, #f4f4ea 76%, #30322f 88%, #101110);
  box-shadow: inset -32px -28px 60px rgba(0, 0, 0, 0.85), inset 22px 18px 36px rgba(255, 255, 255, 0.35), 0 0 100px rgba(216, 255, 63, 0.08);
  display: none;
}

.hero.no-webgl .hero__canvas-fallback {
  display: block;
}

.hero.no-webgl #core-canvas {
  display: none;
}

.hero__orbit {
  position: absolute;
  z-index: 2;
  top: 49%;
  left: 71%;
  border: 1px solid rgba(241, 240, 232, 0.13);
  border-radius: 50%;
  pointer-events: none;
  transform-style: preserve-3d;
}

.hero__orbit::before,
.hero__orbit::after {
  content: "";
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 12px rgba(216, 255, 63, 0.8);
}

.hero__orbit::before {
  top: 12%;
  left: 14%;
}

.hero__orbit::after {
  right: 7%;
  bottom: 20%;
  width: 3px;
  height: 3px;
}

.hero__orbit--a {
  width: min(47vw, 690px);
  aspect-ratio: 1;
  margin: -min(23.5vw, 345px) 0 0 -min(23.5vw, 345px);
  transform: rotateX(71deg) rotateZ(-12deg);
  animation: orbitSpinA 26s linear infinite;
}

.hero__orbit--b {
  width: min(37vw, 540px);
  aspect-ratio: 1;
  margin: -min(18.5vw, 270px) 0 0 -min(18.5vw, 270px);
  border-color: rgba(216, 255, 63, 0.2);
  transform: rotateX(62deg) rotateY(17deg) rotateZ(38deg);
  animation: orbitSpinB 19s linear infinite reverse;
}

@keyframes orbitSpinA {
  from { transform: rotateX(71deg) rotateZ(-12deg); }
  to { transform: rotateX(71deg) rotateZ(348deg); }
}

@keyframes orbitSpinB {
  from { transform: rotateX(62deg) rotateY(17deg) rotateZ(38deg); }
  to { transform: rotateX(62deg) rotateY(17deg) rotateZ(398deg); }
}

.hero__inner {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  padding-top: 142px;
  padding-bottom: 25px;
}

.hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 18px;
  opacity: 0;
  transform: translateY(20px);
}

body.is-ready .hero__eyebrow {
  animation: riseIn 0.9s var(--ease) 0.15s forwards;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(216, 255, 63, 0.3);
  border-radius: 30px;
  background: rgba(216, 255, 63, 0.04);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.15em;
  color: var(--acid);
}

.status-chip i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 8px var(--acid);
  animation: chipPulse 2s infinite;
}

@keyframes chipPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.hero__eyebrow-line {
  width: 54px;
  height: 1px;
  background: var(--line);
}

.hero__eyebrow .mono {
  color: var(--muted-2);
}

.hero__title {
  position: relative;
  margin-top: clamp(58px, 8vh, 104px);
  font-family: var(--display);
  font-size: clamp(5.2rem, 13.1vw, 13.8rem);
  font-weight: 400;
  line-height: 0.78;
  letter-spacing: -0.006em;
  text-transform: uppercase;
  z-index: 6;
  pointer-events: none;
}

.hero__line {
  display: block;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(80px) rotateX(12deg);
  transform-origin: 0 100%;
}

body.is-ready .hero__line:first-child {
  animation: titleIn 1.15s var(--ease) 0.22s forwards;
}
body.is-ready .hero__line:nth-child(2) {
  animation: titleIn 1.15s var(--ease) 0.32s forwards;
}

@keyframes titleIn {
  to { opacity: 1; transform: translateY(0) rotateX(0); }
}

.hero__line--second {
  padding-left: clamp(0px, 7.5vw, 120px);
}

.hero__word {
  display: inline-block;
  transform-style: preserve-3d;
  will-change: transform;
}

.hero__word--outline {
  color: transparent;
  -webkit-text-stroke: clamp(1px, 0.12vw, 2px) rgba(241, 240, 232, 0.72);
  margin-left: 0.08em;
}

.hero__period {
  color: var(--acid);
  display: inline-block;
}

.hero__title .char {
  display: inline-block;
  transform: translate3d(var(--cx, 0), var(--cy, 0), var(--cz, 0)) rotateX(var(--crx, 0)) rotateY(var(--cry, 0));
  transition: transform 0.55s var(--ease);
  will-change: transform;
}

.hero__lower {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 60px;
  margin-top: auto;
  padding-top: clamp(40px, 6vh, 76px);
  opacity: 0;
  transform: translateY(30px);
}

body.is-ready .hero__lower {
  animation: riseIn 0.95s var(--ease) 0.55s forwards;
}

@keyframes riseIn {
  to { opacity: 1; transform: translateY(0); }
}

.hero__intro {
  width: min(420px, 42vw);
  flex-shrink: 0;
}

.hero__intro > p {
  max-width: 380px;
  color: rgba(241, 240, 232, 0.7);
  font-size: 14px;
  line-height: 1.65;
  font-weight: 300;
}

.hero__actions {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-top: 30px;
}

.text-play {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.13em;
}

.text-play__icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  transition: border-color 0.3s, background 0.3s, color 0.3s;
}

.text-play__icon svg {
  width: 11px;
  height: 11px;
  fill: currentColor;
  margin-left: 2px;
}

.text-play > span:last-child {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.text-play small {
  color: var(--muted-2);
  font-size: 7px;
  letter-spacing: 0.16em;
}

.text-play:hover .text-play__icon {
  background: var(--acid);
  border-color: var(--acid);
  color: #070809;
}

.hero__stats {
  display: flex;
  align-items: flex-end;
  gap: clamp(24px, 4vw, 62px);
  padding-bottom: 4px;
}

.hero-stat {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.hero-stat__value {
  font-family: var(--display);
  font-size: clamp(2.4rem, 4vw, 4.4rem);
  line-height: 0.82;
  letter-spacing: 0.01em;
}

.hero-stat__value sup {
  font-family: var(--mono);
  font-size: 0.22em;
  color: var(--acid);
  vertical-align: top;
  margin-left: 2px;
}

.hero-stat__label {
  font-family: var(--mono);
  font-size: 7px;
  line-height: 1.5;
  letter-spacing: 0.15em;
  color: var(--muted);
}

.hero__scroll {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 26px;
  opacity: 0;
}

body.is-ready .hero__scroll {
  animation: riseIn 0.9s var(--ease) 0.8s forwards;
}

.hero__scroll .mono {
  font-size: 8px;
  color: var(--muted-2);
}

.hero__scroll-line {
  position: relative;
  display: block;
  width: 68px;
  height: 1px;
  overflow: hidden;
  background: var(--line);
}

.hero__scroll-line i {
  position: absolute;
  top: 0;
  left: 0;
  width: 24px;
  height: 1px;
  background: var(--acid);
  animation: scrollLine 2.2s var(--ease) infinite;
}

@keyframes scrollLine {
  0% { transform: translateX(-100%); }
  55%, 100% { transform: translateX(300%); }
}

.hero__hud {
  position: absolute;
  z-index: 7;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(241, 240, 232, 0.42);
  pointer-events: none;
}

.hero__hud strong {
  color: var(--acid);
  font-weight: 400;
}

.hero__hud--a {
  top: 120px;
  right: 5.2%;
}

.hud-cross {
  font-size: 13px;
  color: var(--acid);
  line-height: 1;
}

.hero__hud--b {
  top: 46%;
  right: 4.2%;
  writing-mode: vertical-rl;
  letter-spacing: 0.24em;
}

.hud-line {
  width: 1px;
  height: 42px;
  background: linear-gradient(to bottom, var(--acid), transparent);
}

.hero__hud--c {
  bottom: 26%;
  left: 51%;
  gap: 18px;
  color: rgba(241, 240, 232, 0.25);
}

.hero__hud--d {
  right: 5.2%;
  bottom: 16%;
  color: var(--muted);
}

.hero__hud--d svg {
  width: 34px;
  height: 10px;
  fill: none;
  stroke: var(--acid);
  stroke-width: 1;
}

/* ---------- Ticker ---------- */

.ticker {
  position: relative;
  z-index: 20;
  overflow: hidden;
  background: var(--acid);
  color: #08090a;
  border-top: 1px solid rgba(0, 0, 0, 0.15);
  border-bottom: 1px solid rgba(0, 0, 0, 0.15);
  transform: rotate(-0.65deg) scale(1.01);
  margin-block: -8px;
}

.ticker__track {
  display: flex;
  align-items: center;
  width: max-content;
  height: 56px;
  animation: marquee 34s linear infinite;
}

.ticker__track span {
  padding: 0 36px;
  font-family: var(--display);
  font-size: 20px;
  letter-spacing: 0.035em;
  text-transform: uppercase;
  white-space: nowrap;
}

.ticker__track i {
  font-style: normal;
  font-size: 13px;
}

@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ---------- Scroll reveal ---------- */

.reveal {
  opacity: 0;
  transform: translate3d(0, 42px, 0) rotateX(7deg);
  transform-origin: 50% 100%;
  transition: opacity 0.9s var(--ease), transform 1.05s var(--ease);
}

.reveal.is-in {
  opacity: 1;
  transform: translate3d(0, 0, 0) rotateX(0);
}

/* ---------- Misc ---------- */

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 700;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--acid);
  color: #070809;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  transform: translateY(30px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.45s var(--ease), opacity 0.45s;
}

.toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.toast__icon {
  font-size: 15px;
}

[hidden] {
  display: none !important;
}
