/* =========================================================================
   KILL PRO — stylesheet
   --------------------------------------------------------------------------
   Apple-tactile rounded surfaces × cyberpunk HUD brackets, scanlines,
   neon red #FF3D4D + cyan #4FD8E8. Fonts: Orbitron (display), Rajdhani
   (UI), Space Mono (data/code).
   --------------------------------------------------------------------------
   1.  Tokens
   2.  Reset & base
   3.  Typography
   4.  Ambient
   5.  Loader
   6.  Morphing logo
   7.  Header / nav
   8.  Buttons (Apple-tactile)
   9.  HUD brackets (corner reticles)
   10. Glitch (continuous, native CSS keyframes)
   11. 3D Orb (right-aligned, unclipped, floating)
   12. Hero + video1
   13. Lock-stage + video2 + ORB target + video meta
   14. Sections
   15. Features (PS5 hover + 3D icons)
   16. Games grid
   17. Featured tournaments
   18. Cinema (video3)
   19. Stats banner (image1)
   20. Final CTA
   21. Footer
   22. Auth modal — folder drill-down
   23. Scroll progress rail
   24. Audio toggle
   25. Utilities
   26. Responsive
   ========================================================================= */


/* 1. TOKENS ============================================================== */
:root {
  --void:        #040406;
  --void-2:      #0a0a12;
  --void-3:      #14141f;
  --void-4:      #1d1d2c;
  --paper:       #f4f4f7;
  --paper-dim:   rgba(244, 244, 247, 0.72);
  --paper-mute:  rgba(244, 244, 247, 0.42);
  --line:        rgba(244, 244, 247, 0.10);
  --line-strong: rgba(244, 244, 247, 0.18);

  --neon-red:     #FF3D4D;
  --neon-red-2:   #FF6A75;
  --neon-red-deep:#B72433;
  --cyan:         #4FD8E8;
  --cyan-2:       #82E6F1;
  --cyan-deep:    #1F8A99;
  --fd: 'Orbitron', system-ui, sans-serif;
  --fb: 'Rajdhani', system-ui, sans-serif;
  --fm: 'Space Mono', monospace;

  /* Reference spacing rhythm (v1) */
  --sp1: 8px;
  --sp2: 13px;
  --sp3: 21px;
  --sp4: 34px;
  --sp5: 55px;
  --sp6: 89px;
  --sp7: 144px;

  /* Logo scale — header is the "larger" target per brief */
  --logo-h-loader: 94px;
  --logo-h-header: 82px;
  --logo-h-footer: 110px;    /* significantly bigger footer */

  --header-h: 108px;
  --container: 1280px;
  --gutter: clamp(20px, 4vw, 56px);

  /* Apple-tactile radii */
  --radius-sm:  10px;
  --radius:     20px;
  --radius-lg:  28px;
  --radius-xl:  36px;

  /* Easings */
  --ease-apple:      cubic-bezier(0.32, 0.72, 0, 1);
  --ease-soft:       cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring:     cubic-bezier(0.5, 1.6, 0.4, 1);
  --ease-out-quart:  cubic-bezier(0.165, 0.84, 0.44, 1);

  /* Live mouse-tilt vars (set by JS) */
  --mx: 0;
  --my: 0;
  --tilt-card-rx: -3deg;
  --tilt-card-ry:  3deg;
  --tilt-hero-rx: -1.5deg;
  --tilt-hero-ry:  1.5deg;

  /* Video overlay opacity per brief: 30–40% dark */
  --video-veil: 0.36;
  --orv-progress: 0;

  /* Reference assets */
  --asset-logo: url("ikillprologo.png");
  --asset-image1: url("imageassets1.png");
  --asset-image2: url("imageassets2.png");
  --game-pubg: url("images/pubg.png");
  --game-freefire: url("images/freefire.png");
  --game-cod: url("images/cod.png");
  --auth-accent: var(--neon-red);
  --auth-accent-2: var(--cyan);
  --auth-accent-glow: rgba(255, 61, 77, 0.42);
  --auth-accent-2-glow: rgba(79, 216, 232, 0.34);
  --route-accent: var(--neon-red);
  --route-accent-2: var(--cyan);
  --route-accent-glow: rgba(255, 61, 77, 0.92);
  --route-accent-2-glow: rgba(79, 216, 232, 0.70);
  --route-x: 50vw;
  --route-y: 50vh;
  --hero-progress: 0;
  --cinema-progress: 0;

  color-scheme: dark;
}


/* 2. RESET & BASE ======================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--void);
  color: var(--paper);
  font-family: var(--fb);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 70;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(4, 4, 6, 0.30), rgba(4, 4, 6, 0)),
    repeating-linear-gradient(180deg, transparent 0 9px, rgba(79, 216, 232, 0.04) 9px 10px);
  opacity: 1;
  transition: opacity 0.72s var(--ease-apple);
}
html.page-ready body::before { opacity: 0; }
html:not(.page-ready) main,
html:not(.page-ready) .scroll-rail,
html:not(.page-ready) .audio-toggle,
html:not(.page-ready) footer {
  opacity: 0;
  filter: blur(14px);
  transform: translate3d(0, 18px, 0);
}
html.page-ready main,
html.page-ready .scroll-rail,
html.page-ready .audio-toggle,
html.page-ready footer {
  opacity: 1;
  filter: blur(0);
  transform: none;
  transition:
    opacity 0.76s var(--ease-apple),
    filter 0.76s var(--ease-apple),
    transform 0.76s var(--ease-apple);
}
img, svg, video { display: block; max-width: 100%; }
video {
  /* Optimize for smooth playback and scrolling */
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-transform: translateZ(0);
  -webkit-backface-visibility: hidden;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; margin: 0; }
input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--neon-red); color: var(--void); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    transition-duration: 0.001s !important;
  }

  .hero__video,
  .lock-stage__video,
  .cinema__video {
    transform: none !important;
    filter: brightness(0.92) saturate(1.04) !important;
  }

  html:not(.page-ready) main,
  html:not(.page-ready) .scroll-rail,
  html:not(.page-ready) .audio-toggle,
  html:not(.page-ready) footer {
    filter: none;
    transform: none;
  }
}

html[data-motion="lite"] .scanlines,
html[data-motion="reduced"] .scanlines,
html[data-motion="lite"] .grain,
html[data-motion="reduced"] .grain {
  opacity: 0.025;
}
html[data-motion="lite"] .rotate3d,
html[data-motion="reduced"] .rotate3d,
html[data-motion="lite"] .orb,
html[data-motion="reduced"] .orb {
  animation: none !important;
}
html[data-motion="lite"] .tilt,
html[data-motion="reduced"] .tilt {
  transform: none;
}
html[data-motion="lite"] .card3d,
html[data-motion="reduced"] .card3d,
html[data-motion="lite"] .eyebrow,
html[data-motion="reduced"] .eyebrow,
html[data-motion="lite"] .audio-toggle,
html[data-motion="reduced"] .audio-toggle {
  backdrop-filter: none;
}


/* 3. TYPOGRAPHY ========================================================== */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--cyan);
  padding: 7px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(79, 216, 232, 0.06);
  backdrop-filter: blur(8px);
}

.section-title {
  font-family: 'Orbitron', sans-serif;
  font-weight: 800;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.005em;
  margin: 18px 0 14px;
  color: var(--paper);
  text-transform: uppercase;
}
.section-title--xl { font-size: clamp(40px, 6.5vw, 88px); }
.section-lede {
  font-family: 'Rajdhani', sans-serif;
  font-size: clamp(15px, 1.5vw, 18px);
  line-height: 1.55;
  color: var(--paper-dim);
  max-width: min(56ch, 100%);
  margin: 0;
}


/* 4. AMBIENT ============================================================= */
.ambient {
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(1200px 700px at 15% -10%, rgba(255, 61, 77, 0.10), transparent 60%),
    radial-gradient(1000px 800px at 95% 30%, rgba(79, 216, 232, 0.08), transparent 60%),
    radial-gradient(900px 700px at 50% 110%, rgba(255, 61, 77, 0.06), transparent 60%),
    var(--void);
}
.ambient::after {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(79, 216, 232, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 61, 77, 0.04) 1px, transparent 1px);
  background-size: 80px 80px, 80px 80px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 90%);
  opacity: 0.7;
}
#particleRoot {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}
.ab-particle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.grain {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: 0.06;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.scanlines {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: repeating-linear-gradient(180deg, transparent 0 2px, rgba(0, 0, 0, 0.18) 2px 3px);
  opacity: 0.35;
  mix-blend-mode: multiply;
}


/* 5. LOADER ============================================================== */
.loader {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background:
    radial-gradient(520px 260px at 50% 46%, rgba(79, 216, 232, 0.12), transparent 66%),
    radial-gradient(420px 280px at 50% 50%, rgba(255, 61, 77, 0.12), transparent 70%),
    rgba(4, 4, 6, 0.72);
  backdrop-filter: blur(18px) saturate(1.2);
  overflow: hidden;
  /* isolation: prevents child backdrop-filters from bleeding into composited layers */
  isolation: isolate;
  transition: opacity 0.42s var(--ease-apple), visibility 0s linear 0.42s, backdrop-filter 0.42s var(--ease-apple);
}
.loader[data-state="hidden"] { opacity: 0; visibility: hidden; }
/*
 * NAV-ARRIVAL: loader hidden before first paint by the inline head script.
 * !important overrides both data-state="visible" and any transition so the
 * loader is never visible — not even for a single frame.
 */
html.nav-arrival .loader {
  opacity: 0 !important;
  visibility: hidden !important;
  transition: none !important;
}
.loader__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  width: min(400px, calc(100vw - 32px));
  padding: calc(var(--logo-h-loader) + 36px) clamp(24px, 8vw, 80px) 34px;
}
.loader__inner::before {
  content: '';
  position: absolute;
  top: 14px;
  left: 50%;
  width: min(320px, calc(100vw - 72px));
  height: var(--logo-h-loader);
  border-radius: 50%;
  background:
    var(--asset-logo) center / contain no-repeat,
    linear-gradient(135deg, rgba(255, 61, 77, 0.22), rgba(79, 216, 232, 0.18));
  box-shadow:
    0 0 36px rgba(255, 61, 77, 0.18),
    0 0 56px rgba(79, 216, 232, 0.16);
  filter: blur(10px);
  transform: translateX(-50%);
  opacity: 0.34;
  animation: loader-signal-fx 0.9s var(--ease-apple) 1 forwards;
}
.loader__inner > .hud-corners { inset: 0; }
.loader__progress {
  width: 240px;
  height: 2px;
  background: var(--line);
  border-radius: 999px;
  position: relative;
  overflow: hidden;
}
.loader__bar {
  position: absolute;
  inset: 0;
  width: 0%;
  background: linear-gradient(90deg, var(--neon-red), var(--cyan));
  border-radius: 999px;
  box-shadow: 0 0 12px rgba(255, 61, 77, 0.6);
  animation: loader-fill 0.75s var(--ease-out-quart) forwards;
}
@keyframes loader-fill { to { width: 100%; } }
@keyframes loader-signal-fx {
  0% { opacity: 0; filter: blur(18px); transform: translateX(-50%) scale(0.96); }
  45% { opacity: 0.5; filter: blur(8px); transform: translateX(calc(-50% - 7px)) scale(1.02); }
  62% { transform: translateX(calc(-50% + 5px)) scale(1.01); }
  100% { opacity: 0.24; filter: blur(16px); transform: translateX(-50%) scale(1); }
}
@keyframes loader-morph-fx {
  0% {
    border-radius: 50%;
    transform: translateX(-50%) rotate(0deg) scale(0.72);
    background: linear-gradient(135deg, var(--neon-red), var(--neon-red-deep));
  }
  22% {
    border-radius: 16px;
    transform: translateX(-50%) rotate(45deg) scale(1.05);
    background: linear-gradient(135deg, var(--cyan), var(--cyan-deep));
  }
  48% {
    border-radius: 34% 66% 50% 50%;
    transform: translateX(-50%) rotate(150deg) scale(0.96);
    background: linear-gradient(135deg, var(--neon-red), var(--cyan));
  }
  74% {
    border-radius: 50% 18% 50% 18%;
    transform: translateX(-50%) rotate(270deg) scale(1.12);
    background: linear-gradient(135deg, var(--cyan), var(--neon-red));
  }
  100% {
    border-radius: 50%;
    transform: translateX(-50%) rotate(360deg) scale(0.2);
    opacity: 0;
    background: linear-gradient(135deg, var(--neon-red), var(--neon-red-deep));
  }
}
.loader__caption {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--paper-mute);
}
.loader__caption em { font-style: normal; color: var(--neon-red); }


/* 6. MORPHING LOGO ======================================================= */
/* Single fixed-positioned node. JS sets inline top/left to FLIP it from
   loader-center → header slot. No mask. No overflow:hidden on parents. */
.logo {
  display: inline-flex;
  align-items: center;
  color: var(--paper);
  letter-spacing: 0.04em;
  position: relative;
  isolation: isolate;
}
.logo svg {
  height: 100%;
  width: auto;
  opacity: 0;
}
.logo::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--asset-logo) center / contain no-repeat;
  filter: drop-shadow(0 0 18px rgba(255, 61, 77, 0.3))
          drop-shadow(0 0 26px rgba(79, 216, 232, 0.22));
}
.logo__word {
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  font-size: 34px;
  letter-spacing: 4px;
  fill: currentColor;
}
.logo__reticle { color: var(--neon-red); }

.logo--morph {
  position: fixed;
  z-index: 90;
  height: var(--logo-h-loader);
  width: min(320px, calc(100vw - 72px));
  /* visibility:hidden prevents ANY flash before JS has positioned the element.
     pointer-events:none while undocked so the floating logo never blocks
     the header nav or CTA buttons during the morph animation. */
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  top: 50dvh;
  left: 50vw;
  transform: translate(-50%, -50%);
  transition:
    top    0.95s var(--ease-apple),
    left   0.95s var(--ease-apple),
    height 0.95s var(--ease-apple),
    width 0.95s var(--ease-apple),
    opacity 0.45s var(--ease-soft),
    transform 0.95s var(--ease-apple);
  will-change: top, left, transform;
  filter: drop-shadow(0 0 18px rgba(255, 61, 77, 0.25))
          drop-shadow(0 0 26px rgba(79, 216, 232, 0.18));
}
.logo--morph[data-phase="loader-logo"] {
  visibility: visible;
  opacity: 1;
  pointer-events: none;
}
.logo--morph[data-docked="true"] {
  visibility: visible;
  opacity: 1;
  /* Restore interactivity once docked in the header slot */
  pointer-events: auto;
  height: var(--logo-h-header);
  width: min(340px, 30vw);
  transform: translate(0, 0);
}
.logo--morph::before,
.logo--footer::before {
  min-width: 100%;
}
.logo--morph[data-phase="loader-logo"]::before,
.logo--morph[data-docked="true"]::before {
  transition: filter 0.5s var(--ease-soft), opacity 0.5s var(--ease-soft);
}
.logo--morph[data-docked="true"]::before {
  background-position: left center;
}
.logo--footer {
  height: var(--logo-h-footer);
  filter: drop-shadow(0 0 24px rgba(255, 61, 77, 0.2))
          drop-shadow(0 0 36px rgba(79, 216, 232, 0.14));
}


/* 7. HEADER ============================================================== */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  height: var(--header-h);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  background: linear-gradient(180deg, rgba(4, 4, 6, 0.78) 0%, rgba(4, 4, 6, 0.55) 100%);
  border-bottom: 1px solid var(--line);
  transform: translateY(-100%);
  transition: transform 0.7s var(--ease-apple);
}
.header::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(420px 120px at 15% 0%, rgba(255, 61, 77, 0.10), transparent 70%),
    radial-gradient(360px 120px at 80% 0%, rgba(79, 216, 232, 0.08), transparent 72%);
}
.header[data-state="visible"] { transform: translateY(0); }
.header::after {
  /* hairline neon underline */
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,61,77,0.4) 30%, rgba(79,216,232,0.4) 70%, transparent);
}

.header__inner {
  position: relative;
  z-index: 1;
  height: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(160px, 1fr) auto;
  align-items: center;
  gap: clamp(var(--sp2), 2.2vw, var(--sp4));
}
.logo-slot {
  width: min(340px, 100%);
  height: var(--logo-h-header);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(var(--sp2), 2vw, var(--sp4));
  min-width: 0;
}
.nav__link {
  display: inline-flex;
  align-items: center;
  font-family: var(--fb);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--paper-dim);
  padding: 10px 4px;
  position: relative;
  transition: color 0.3s var(--ease-soft);
}
.nav__link::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 4px;
  height: 1px;
  background: linear-gradient(90deg, var(--neon-red), var(--cyan));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease-out-quart);
}
.nav__link:hover { color: var(--paper); }
.nav__link:hover::after { transform: scaleX(1); }
.nav__link--live { display: inline-flex; align-items: center; gap: 8px; color: var(--neon-red); }
.nav__link--live:hover { color: var(--neon-red-2); }

.header__cta {
  display: flex;
  gap: 10px;
  justify-self: end;
  min-width: fit-content;
}


/* 8. BUTTONS — Apple-tactile rounded ===================================== */
.btn {
  --btn-bg: rgba(255, 255, 255, 0.04);
  --btn-fg: var(--paper);
  --btn-bd: var(--line-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 4;
  gap: 10px;
  padding: 14px 24px;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 1px solid var(--btn-bd);
  border-radius: 999px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition:
    transform 0.4s var(--ease-spring),
    background 0.3s var(--ease-soft),
    border-color 0.3s var(--ease-soft),
    color 0.3s var(--ease-soft),
    box-shadow 0.4s var(--ease-soft);
}
.btn svg { width: 14px; height: 14px; }
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.18) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.7s var(--ease-out-quart);
}
.btn:hover { transform: translateY(-1px); }
.btn:hover::before { transform: translateX(100%); }
.btn:active { transform: translateY(0) scale(0.97); }

.btn--primary {
  --btn-bg: linear-gradient(135deg, var(--neon-red) 0%, var(--neon-red-deep) 100%);
  --btn-fg: var(--paper);
  --btn-bd: rgba(255, 61, 77, 0.5);
  box-shadow: 0 8px 28px -10px rgba(255, 61, 77, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.btn--primary:hover {
  box-shadow: 0 14px 40px -10px rgba(255, 61, 77, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
.btn:hover,
.link-arrow:hover,
.nav__link:hover,
.audio-toggle:hover {
  transform: translateY(-2px) scale(1.015);
}
.btn--ghost { --btn-bg: rgba(255, 255, 255, 0.03); --btn-bd: rgba(244, 244, 247, 0.18); }
.btn--ghost:hover {
  --btn-bg: rgba(79, 216, 232, 0.08);
  --btn-bd: rgba(79, 216, 232, 0.4);
  --btn-fg: var(--cyan-2);
}
.btn--sm { padding: 10px 16px; font-size: 12px; }
.btn--lg { padding: 18px 32px; font-size: 15px; }
.btn--block { width: 100%; }


/* 9. HUD CORNERS — cyberpunk reticle brackets ============================ */
/* Place 4 <i> children inside any positioned element. */
.hud-corners {
  position: absolute;
  inset: 12px;
  pointer-events: none;
  z-index: 3;
}
.hud-corners i {
  position: absolute;
  width: 16px;
  height: 16px;
  border: 1.5px solid currentColor;
  color: var(--cyan);
  opacity: 0.85;
}
.hud-corners i:nth-child(1) { top: 0;    left: 0;    border-right: 0; border-bottom: 0; }
.hud-corners i:nth-child(2) { top: 0;    right: 0;   border-left: 0;  border-bottom: 0; color: var(--neon-red); }
.hud-corners i:nth-child(3) { bottom: 0; left: 0;    border-right: 0; border-top: 0;    color: var(--neon-red); }
.hud-corners i:nth-child(4) { bottom: 0; right: 0;   border-left: 0;  border-top: 0; }

.hud-corners--lg { inset: 20px; }
.hud-corners--lg i { width: 28px; height: 28px; border-width: 2px; }

.feature > .hud-corners,
.game-card > .hud-corners,
.auth-modal__panel > .hud-corners {
  display: none;
}

/* 10. GLITCH (v1-style contained split channels) ========================= */
.glitch {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  color: var(--neon-red);
  text-shadow: 0 0 10px rgba(255, 61, 77, 0.28);
  isolation: isolate;
  white-space: nowrap;
  contain: paint;
}
.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0;
}
.glitch::before {
  color: var(--neon-red);
  transform: translateX(-1px);
  clip-path: inset(30% 0 40% 0);
}
.glitch::after {
  color: var(--cyan);
  transform: translateX(1px);
}
.glitch.is-glitching::before,
.glitch:hover::before {
  opacity: 1;
  animation: gA 0.7s steps(4) both;
}
.glitch.is-glitching::after,
.glitch:hover::after {
  opacity: 1;
  animation: gB 0.7s steps(4) both;
}
@keyframes gA {
  0%, 100% { transform: translate(-2px, 0); clip-path: inset(0 0 0 0); }
  25% { transform: translate(-4px, 1px); clip-path: inset(20% 0 55% 0); }
  50% { transform: translate(-1px, -1px); clip-path: inset(50% 0 20% 0); }
  75% { transform: translate(-3px, 0); clip-path: inset(70% 0 8% 0); }
}
@keyframes gB {
  0%, 100% { transform: translate(2px, 0); clip-path: inset(0 0 0 0); }
  25% { transform: translate(3px, -1px); clip-path: inset(60% 0 15% 0); }
  50% { transform: translate(1px, 1px); clip-path: inset(25% 0 50% 0); }
  75% { transform: translate(4px, 0); clip-path: inset(10% 0 65% 0); }
}


/* 11. 3D ORB — network globe (canvas) ===================================
   All positioning driven by JS via CSS custom properties so every move
   (including scroll-reverse) transitions smoothly through the same path.
   No data-scene CSS position rules — those couldn't CSS-transition.
   --orb-left  : target left edge in px (JS lerps to this continuously)
   --orb-opacity, --orb-blur, --orb-scale : scroll-driven by initOrbLock
   ======================================================================= */
.orb {
  position: fixed;
  top: 50dvh;
  left: var(--orb-left, calc(100vw - 630px));
  width: 560px;
  height: 560px;
  margin-top: -280px;
  /* z-index:3 (fixed, root). Video backgrounds use z-index:0.
     Button wrappers use z-index:4 and text elements use z-index:5, so the
     orb sits between the video and content layers. */
  z-index: 3;
  pointer-events: none;
  opacity: var(--orb-opacity, 0);
  transform-origin: 50% 50%;
  transform: translate3d(0, var(--orb-y, 0px), 0) scale(var(--orb-scale, 1.18));
  will-change: transform, opacity;
  filter: blur(var(--orb-blur, 0px))
          drop-shadow(0 0 60px rgba(255, 61, 77, 0.22))
          drop-shadow(0 0 120px rgba(79, 216, 232, 0.12));
  animation: orb-float 13s var(--ease-soft) infinite alternate;
  transition: opacity 0.55s var(--ease-apple), filter 0.6s var(--ease-apple);
}

/* Liquid-glass ring — a frosted circle sitting just outside the globe */
.orb::before {
  content: '';
  position: absolute;
  inset: -14%;
  border-radius: 50%;
  /* Frosted glass: border + backdrop-filter blur creates the liquid glass look */
  border: 1.5px solid rgba(255, 255, 255, 0.13);
  background:
    radial-gradient(ellipse at 32% 28%,
      rgba(255, 255, 255, 0.10) 0%,
      rgba(255, 255, 255, 0.03) 40%,
      transparent 70%),
    radial-gradient(ellipse at 68% 72%,
      rgba(79, 216, 232, 0.07) 0%,
      transparent 60%);
  backdrop-filter: blur(12px) saturate(1.4);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 -1px 0 rgba(255, 255, 255, 0.06),
    0 0 40px rgba(255, 61, 77, 0.12),
    0 0 80px rgba(79, 216, 232, 0.08);
  pointer-events: none;
  transition: box-shadow 0.55s var(--ease-apple), opacity 0.55s var(--ease-apple);
  opacity: 0.85;
  z-index: -1;
}

/* Hover: intensify the glass ring glow and inner drop-shadow */
.orb:hover {
  pointer-events: auto;
  filter: blur(var(--orb-blur, 0px))
          drop-shadow(0 0 80px rgba(255, 61, 77, 0.42))
          drop-shadow(0 0 120px rgba(79, 216, 232, 0.28));
}
.orb:hover::before {
  opacity: 1;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -1px 0 rgba(255, 255, 255, 0.10),
    0 0 60px rgba(255, 61, 77, 0.28),
    0 0 100px rgba(79, 216, 232, 0.20);
}
@keyframes orb-float {
  0%   { translate: 0 -10px; }
  100% { translate: 0  10px; }
}

/* Canvas fills the orb container */
.orb__canvas {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  border-radius: 50%;
}

.orb__hud {
  position: absolute;
  bottom: 14%;
  right: 8%;
  display: grid;
  gap: 4px;
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan-2);
  text-shadow: 0 0 8px rgba(79,216,232,0.5);
  text-align: right;
  pointer-events: none;
}
.orb__hud em { font-style: normal; color: var(--neon-red); }

@keyframes orb-spin-z { to { transform: rotate(360deg); } }

/* ORB lock target placeholder above the second video */
.orb-target {
  position: absolute;
  top: 50vh;
  right: clamp(34px, 8vw, 128px);
  width: 300px;
  height: 300px;
  transform: translateY(-50%);
  pointer-events: none;
}
/* 12. HERO + VIDEO 1 ===================================================== */
.hero {
  position: relative;
  min-height: 100dvh;
  padding-top: var(--header-h);
  display: grid;
  align-items: center;
  /* NO overflow:hidden — the orb passes through. */
}
.hero__video,
.hero__overlay,
.hero__grid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}
.hero__video {
  object-fit: cover;
  background: var(--void-2);
  transform: scale(calc(1.035 + (var(--hero-progress, 0) * 0.035))) translate3d(0, calc(var(--hero-progress, 0) * -2.8vh), 0);
  filter: brightness(calc(0.92 + (var(--hero-progress, 0) * 0.08))) saturate(1.08);
  will-change: transform, filter;
}
.hero__overlay {
  background:
    linear-gradient(135deg, rgba(183, 36, 51, 0.18) 0%, transparent 50%),
    linear-gradient(225deg, rgba(31, 138, 153, 0.18) 0%, transparent 50%),
    linear-gradient(180deg, rgba(4, 4, 6, 0.36) 0%, rgba(4, 4, 6, 0.7) 75%, var(--void) 100%);
  /* The 30-40% dark veil is in that linear-gradient stop pair (0.36 → 0.7). */
}
.hero__grid {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 60% 50% at 50% 50%, transparent 30%, #000 90%);
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 4;
  max-width: var(--container);
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  gap: 28px;
  justify-items: start;
  --hero-parallax-y: calc(var(--hero-progress, 0) * -42px);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 61, 77, 0.4);
  border-radius: 999px;
  background: rgba(255, 61, 77, 0.08);
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--neon-red-2);
  backdrop-filter: blur(8px);
}

.hero__title {
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  font-size: clamp(48px, 9vw, 132px);
  line-height: 0.95;
  letter-spacing: -0.005em;
  margin: 0;
  max-width: 14ch;
  text-transform: uppercase;
  position: relative;
  z-index: 6;
}
.hero__title-line { display: block; }

.hero__subtitle {
  font-family: 'Rajdhani', sans-serif;
  font-size: clamp(15px, 1.6vw, 19px);
  color: var(--paper-dim);
  max-width: 56ch;
  margin: 0;
}
.hero__subtitle strong { color: var(--paper); font-weight: 600; }

.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }

.hero__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 4vw, 56px);
  margin-top: 16px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  width: 100%;
  max-width: 720px;
}
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat__num {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 700;
  color: var(--paper);
  letter-spacing: -0.005em;
}
.stat__label {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--paper-mute);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hero__cite {
  position: absolute;
  right: var(--gutter);
  bottom: 28px;
  z-index: 2;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--paper-mute);
}
.hero__cite em { font-style: normal; color: var(--cyan); }


/* 13. LOCK STAGE + VIDEO 2 + VIDEO META ================================== */
.lock-stage {
  position: relative;
  min-height: 270dvh;
  padding: 0 0 140px;
  margin-bottom: -82dvh;
}
.lock-stage__media {
  --video-progress: 0;
  position: sticky;
  top: 0;
  width: 100vw;
  max-width: none;
  height: 100dvh;
  margin: 0 calc(50% - 50vw);
  border-radius: 0;
  overflow: hidden;
  border: 0;
  box-shadow:
    inset 0 0 0 1px rgba(244,244,247,0.08),
    0 60px 120px -40px rgba(255, 61, 77, 0.25),
    0 60px 120px -40px rgba(79, 216, 232, 0.2);
  aspect-ratio: auto;
  z-index: 0;
  background: var(--void-2);
}
.lock-stage__video,
.lock-stage__overlay {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}
.lock-stage__video {
  object-fit: cover;
  background: var(--void-2);
  transform: scale(calc(1.045 - (var(--video-progress, 0) * 0.025)));
  filter: brightness(calc(0.86 + (var(--video-progress, 0) * 0.14))) saturate(calc(1.04 + (var(--video-progress, 0) * 0.16)));
  will-change: transform, filter;
}
.lock-stage__overlay {
  background:
    linear-gradient(135deg, rgba(183, 36, 51, 0.18), transparent 50%),
    linear-gradient(225deg, rgba(31, 138, 153, 0.18), transparent 50%),
    linear-gradient(180deg, rgba(4, 4, 6, calc(0.40 - (var(--video-progress, 0) * 0.08))), rgba(4, 4, 6, 0.40));
}
.lock-stage__media::after {
  content: '';
  position: absolute;
  inset: clamp(14px, 2vw, 28px);
  border: 1px solid rgba(244, 244, 247, 0.10);
  border-radius: 0;
  pointer-events: none;
}

.lock-stage__content {
  position: relative;
  z-index: 4;
  max-width: var(--container);
  margin: -96dvh auto 0;
  padding: calc(var(--header-h) + var(--sp6)) var(--gutter) var(--sp7);
  min-height: 150dvh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

/* Video meta (HUD overlays on video frames) */
.v-meta {
  position: absolute;
  z-index: 4;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--cyan-2);
  text-transform: uppercase;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.7);
  padding: 6px 10px;
  background: rgba(4, 4, 6, 0.45);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  backdrop-filter: blur(6px);
}
.v-meta--tl { top: 24px; left: 24px; }
.v-meta--tr { top: 24px; right: 24px; }
.v-meta--bl { bottom: 24px; left: 24px; }
.v-meta--br { bottom: 24px; right: 24px; color: var(--neon-red-2); border-color: rgba(255,61,77,0.3); }


/* 14. SECTION PRIMITIVES ================================================= */
/* Sections should not create paint stacking contexts so the orb can be
   layered between video/background and content correctly. */
section { position: relative; }
section > .section-header,
section > .hero__content,
section > .hero__cite,
section > .lock-stage__content,
section > .games__grid,
section > .featured__list,
section > .stats-grid,
section > .cta__inner,
.cinema__caption {
  position: relative;
  z-index: 4;
}
.hero__title,
.section-title,
.section-lede,
.hero__subtitle,
.hero__cite,
.cinema__caption,
.cta .glitch {
  position: relative;
  z-index: 6;
}
.hero__cta,
.cta__buttons,
.cta .btn {
  position: relative;
  z-index: 5;
}
.section-header {
  position: relative;
  z-index: 5;
  max-width: var(--container);
  margin: 0 auto 56px;
  padding: 0 var(--gutter);
}
.section-header--row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.section-header--center { text-align: center; }
.section-header--center .eyebrow { margin: 0 auto; }

.link-arrow {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cyan);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: relative;
  z-index: 4;
  padding: 11px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  transition: background 0.3s var(--ease-soft), border-color 0.3s var(--ease-soft);
}
.link-arrow:hover {
  background: rgba(79, 216, 232, 0.1);
  border-color: rgba(79, 216, 232, 0.4);
}


/* 15. CARD3D + PS5 HOVER + 3D ICONS ====================================== */
/* card3d = baseline depth surface. tilt = receives mouse-driven rotation
   via CSS vars set by JS. Together they give PS5-style hover. */
.card3d {
  position: relative;
  background: linear-gradient(180deg, rgba(20, 20, 31, 0.65), rgba(10, 10, 18, 0.72));
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background-clip: padding-box;
  -webkit-background-clip: padding-box;
  backdrop-filter: blur(12px);
  /*
   * CLICK-ARTIFACT FIX — transform-style: preserve-3d REMOVED.
   *
   * The CSS spec (Compositing L1 §14) mandates that backdrop-filter creates
   * a new stacking context and FLATTENS any 3D rendering context on the same
   * element. Having both forces the GPU to maintain a 2D compositor layer
   * (for backdrop-filter) AND attempt a 3D layer (for translateZ on hover).
   * On click — when :hover transitions fire — the engine swaps between these
   * two layer types, producing a one-frame black texture flash.
   *
   * The 3D tilt perspective is delivered entirely by perspective() inside the
   * .tilt transform property; preserve-3d on the card itself is redundant and
   * harmful here.
   */
  isolation: isolate;
  transition:
    transform 0.5s var(--ease-out-quart),
    border-color 0.4s var(--ease-soft),
    box-shadow 0.5s var(--ease-soft);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 16px 40px -20px rgba(0, 0, 0, 0.5);
}
.card3d::before {
  /* inner depth glow that intensifies on hover */
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(600px 300px at calc(50% + var(--mx, 0) * 30%) calc(50% + var(--my, 0) * 30%),
                    rgba(79, 216, 232, 0.08), transparent 60%),
    linear-gradient(135deg, rgba(255, 61, 77, 0.0), transparent 50%);
  opacity: 0.6;
  transition: opacity 0.5s var(--ease-soft);
  z-index: 1;
}
.card3d::after {
  /* hover sheen */
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 61, 77, 0.12), transparent 30%, transparent 70%, rgba(79, 216, 232, 0.12));
  opacity: 0;
  transition: opacity 0.5s var(--ease-soft);
  z-index: 2;
}
.card3d > * { position: relative; z-index: 2; }
.card3d:hover {
  transform: translateY(-6px);
  border-color: rgba(79, 216, 232, 0.35);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 30px 60px -20px rgba(255, 61, 77, 0.4),
    0 30px 60px -25px rgba(79, 216, 232, 0.35);
}
.card3d:hover::before { opacity: 1; }
.card3d:hover::after  { opacity: 1; }

/* tilt-driven 3D rotation (writes from --mx, --my JS sets) */
.tilt {
  transform: perspective(1000px)
             rotateX(calc(var(--my, 0) * var(--tilt-card-rx)))
             rotateY(calc(var(--mx, 0) * var(--tilt-card-ry)));
  transition: transform 0.25s var(--ease-soft);
}
.tilt[data-tilt="hero"] {
  transform: translate3d(0, var(--hero-parallax-y, 0px), 0)
             perspective(1400px)
             rotateX(calc(var(--my, 0) * var(--tilt-hero-rx)))
             rotateY(calc(var(--mx, 0) * var(--tilt-hero-ry)));
}
/* When hovered, the per-card tilt overrides global; PS5 lift kicks in */
.tilt[data-tilt="card"]:hover {
  transform: perspective(1000px)
             rotateX(calc(var(--my, 0) * var(--tilt-card-rx)))
             rotateY(calc(var(--mx, 0) * var(--tilt-card-ry)))
             translateY(-6px);
}

/* Rotating 3D icon */
.rotate3d {
  color: var(--cyan-2);
  filter: drop-shadow(0 0 8px rgba(79, 216, 232, 0.5));
  transform-style: preserve-3d;
  animation: icon-3d 8s linear infinite;
}
@keyframes icon-3d {
  0%   { transform: rotateY(0deg)   rotateX(8deg); }
  50%  { transform: rotateY(180deg) rotateX(-8deg); }
  100% { transform: rotateY(360deg) rotateX(8deg); }
}


/* Features layout — no extra padding; .lock-stage__content is the container */
.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.feature {
  min-height: 250px;
  padding: 40px 120px 36px 32px;
}
.feature__icon {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 78px;
  height: 78px;
  margin-bottom: 0;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.12), rgba(255,255,255,0.02)),
    radial-gradient(circle at 28% 20%, rgba(79, 216, 232, 0.22), transparent 60%);
  border: 1px solid rgba(79, 216, 232, 0.24);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.12),
    0 18px 40px -24px rgba(79,216,232,0.8);
}
.feature__icon svg {
  width: 58px;
  height: 58px;
}
.feature__num {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--neon-red);
  margin-bottom: 14px;
}
.feature__title {
  font-family: 'Orbitron', sans-serif;
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 10px;
  letter-spacing: -0.005em;
  text-transform: uppercase;
}
.feature__body {
  color: var(--paper-dim);
  font-size: 15px;
  margin: 0;
}
.feature__line {
  position: absolute;
  left: 32px; right: 32px;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--neon-red), var(--cyan), transparent);
  opacity: 0;
  transition: opacity 0.4s var(--ease-soft);
}
.feature:hover .feature__line { opacity: 1; }


/* 16. GAMES GRID ========================================================= */
.games {
  padding: calc(100dvh + 120px) 0 140px;
  z-index: 3;
}
.games::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(4,4,6,0) 0%, rgba(4,4,6,0.42) 32%, rgba(4,4,6,0.92) 78%, var(--void) 100%);
  pointer-events: none;
}
.games__grid {
  position: relative;
  z-index: 4;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.game-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  padding: 0;
  background: var(--void-2);
}
.game-card__media {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 61, 77, 0.55), transparent 55%),
    radial-gradient(circle at 70% 70%, rgba(79, 216, 232, 0.5), transparent 55%),
    linear-gradient(180deg, #1a1a28, #0a0a14);
  filter: saturate(1.2);
  transition: transform 0.8s var(--ease-out-quart), filter 0.5s;
}
.game-card[data-game="pubg"] .game-card__media {
  background:
    var(--game-pubg) center / cover no-repeat,
    var(--asset-image2) 28% center / cover no-repeat,
    linear-gradient(180deg, #1a1a28, #0a0a14);
}
.game-card[data-game="ff"] .game-card__media {
  background:
    var(--game-freefire) center / cover no-repeat,
    var(--asset-image2) 50% center / cover no-repeat,
    linear-gradient(180deg, #1f1f2e, #0a0a14);
}
.game-card[data-game="cod"] .game-card__media {
  background:
    var(--game-cod) center / cover no-repeat,
    var(--asset-image2) 72% center / cover no-repeat,
    linear-gradient(180deg, #16161f, #060610);
}
.game-card__media::after {
  content: '';
  position: absolute; inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 61, 77, 0.18), transparent 50%),
    linear-gradient(225deg, rgba(79, 216, 232, 0.18), transparent 50%),
    linear-gradient(180deg, transparent 30%, rgba(4, 4, 6, 0.85));
}
.game-card:hover .game-card__media { transform: scale(1.08); filter: saturate(1.4) brightness(1.1); }

.game-card__inner {
  position: absolute;
  inset: auto 0 0 0;
  padding: 28px;
  display: grid;
  gap: 8px;
  z-index: 4;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cyan);
  width: max-content;
  padding: 5px 10px;
  border: 1px solid rgba(79, 216, 232, 0.35);
  border-radius: 999px;
  background: rgba(4, 4, 6, 0.6);
  background-clip: padding-box;
  -webkit-background-clip: padding-box;
  backdrop-filter: blur(8px);
}
.game-card__title {
  font-family: 'Orbitron', sans-serif;
  font-weight: 800;
  font-size: 28px;
  margin: 6px 0 0;
  letter-spacing: -0.005em;
  text-transform: uppercase;
}
.game-card__meta {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--paper-mute);
  margin: 0 0 14px;
}
.game-card .btn { width: max-content; }


/* 17. FEATURED TOURNAMENTS =============================================== */
.featured {
  padding: 120px 0 140px;
  overflow: hidden;
  background:
    radial-gradient(720px 420px at 12% 8%, rgba(255, 61, 77, 0.12), transparent 66%),
    radial-gradient(680px 420px at 88% 22%, rgba(79, 216, 232, 0.10), transparent 68%),
    linear-gradient(180deg, rgba(10,10,18,0.35), rgba(4,4,6,0.86));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.featured::before {
  content: '';
  position: absolute;
  top: clamp(36px, 6vw, 74px);
  right: clamp(18px, 5vw, 84px);
  width: clamp(170px, 22vw, 330px);
  height: clamp(70px, 10vw, 140px);
  background: var(--asset-logo) center / contain no-repeat;
  opacity: 0.16;
  filter: drop-shadow(0 0 26px rgba(255, 61, 77, 0.35));
  pointer-events: none;
}
.featured__list {
  position: relative;
  z-index: 4;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  min-height: 220px;
}
.featured__loading {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 32px;
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--paper-mute);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: rgba(4, 4, 6, 0.36);
  backdrop-filter: blur(14px);
}
.featured__loading-bar {
  width: 80px; height: 2px;
  background: var(--line);
  border-radius: 999px;
  position: relative;
  overflow: hidden;
}
.featured__loading-bar::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--neon-red), var(--cyan));
  animation: featured-load 1.6s var(--ease-soft) infinite;
}
@keyframes featured-load {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.tournament-card {
  padding: 22px 24px;
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 18px;
  align-items: center;
  border-radius: 18px;
  /*
   * BLACK-BAR FIX: solid background-color prevents the 1-px transparent gap
   * that appears when backdrop-filter + border-radius meet overflow:hidden
   * in some compositing paths.
   */
  background-color: #080810;
  background-image:
    linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.025));
  background-clip: padding-box;
  -webkit-background-clip: padding-box;
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(14px);
  /*
   * NOTE: transform:translateZ(0) and -webkit-mask-image were removed here.
   * backdrop-filter already promotes this element to a GPU compositing layer.
   * Adding translateZ(0) created a second nested layer; the compositor then
   * rendered two surfaces with a hairline seam at the border-radius boundary
   * — the classic "black bar" on rounded frosted-glass cards.
   */
}
.tournament-card__sigil {
  width: 56px; height: 56px;
  border-radius: 14px;
  background:
    radial-gradient(circle at 30% 30%, var(--neon-red), transparent 60%),
    radial-gradient(circle at 70% 70%, var(--cyan), transparent 60%),
    var(--void-3);
  display: grid; place-items: center;
  font-family: 'Orbitron', sans-serif;
  font-weight: 800;
  font-size: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.tournament-card__title {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 17px;
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: -0.005em;
}
.tournament-card__meta {
  display: flex; gap: 14px;
  flex-wrap: wrap;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--paper-mute);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.tournament-card__meta span { display: inline-flex; align-items: center; gap: 6px; }
.tournament-card__status {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid;
  white-space: nowrap;
}
.tournament-card__status[data-status="live"]    { color: var(--neon-red); border-color: rgba(255,61,77,0.4); background: rgba(255,61,77,0.08); }
.tournament-card__status[data-status="open"]    { color: var(--cyan);     border-color: rgba(79,216,232,0.4); background: rgba(79,216,232,0.08); }
.tournament-card__status[data-status="filling"] { color: var(--paper-dim);border-color: var(--line-strong);   background: rgba(255,255,255,0.03); }


/* 18. CINEMA (video3) ==================================================== */
.cinema {
  position: relative;
  min-height: 300dvh;
  padding: 0;
  isolation: isolate;
}
.cinema__media {
  --video-progress: 0;
  position: sticky;
  top: 0;
  width: 100vw;
  max-width: none;
  height: 100dvh;
  margin: 0 calc(50% - 50vw);
  border-radius: 0;
  overflow: hidden;
  border: 0;
  box-shadow:
    inset 0 0 0 1px rgba(244,244,247,0.08),
    0 80px 140px -50px rgba(255, 61, 77, 0.3),
    0 80px 140px -50px rgba(79, 216, 232, 0.25);
  aspect-ratio: auto;
  min-height: 100dvh;
  background: var(--void-2);
}
.cinema__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--void-2);
  transform: scale(calc(1.06 - (var(--video-progress, 0) * 0.035)));
  filter: brightness(calc(0.82 + (var(--video-progress, 0) * 0.16))) contrast(1.04) saturate(1.12);
  will-change: transform, filter;
}
.cinema__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(183, 36, 51, 0.2), transparent 40%),
    linear-gradient(225deg, rgba(31, 138, 153, 0.2), transparent 40%),
    linear-gradient(180deg, rgba(4, 4, 6, calc(0.40 - (var(--video-progress, 0) * 0.10))), rgba(4, 4, 6, 0.40));
}
.cinema__caption {
  position: absolute;
  z-index: 6;
  /* Align to the same container grid as every other section.
     Offset from the left edge = same gutter the container uses:
     (100vw - min(100vw, var(--container))) / 2  +  var(--gutter) */
  left: max(
    calc((100vw - min(100vw, var(--container))) / 2 + var(--gutter)),
    env(safe-area-inset-left)
  );
  bottom: max(56px, env(safe-area-inset-bottom));
  max-width: 620px;
  display: grid;
  gap: 16px;
}


/* 19. STATS BANNER (image1 — laser city) ================================ */
.stats-banner {
  position: relative;
  padding: 140px 0 160px;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stats-banner .section-header,
.stats-banner .section-header--center {
  position: relative;
  z-index: 4;
}
.stats-banner__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    var(--asset-image1) center / cover no-repeat,
    linear-gradient(180deg, #0a0a14, #04040a);
}
.stats-banner__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    repeating-linear-gradient(180deg, transparent 0 3px, rgba(0, 0, 0, 0.16) 3px 4px),
    linear-gradient(180deg, rgba(4, 4, 6, 0.55) 0%, rgba(4, 4, 6, 0.7) 100%);
  backdrop-filter: blur(1px);
}
.stats-grid {
  position: relative;
  z-index: 4;
  max-width: var(--container);
  margin: 56px auto 0;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.stat-big {
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.stat-big__num {
  font-family: 'Orbitron', sans-serif;
  font-weight: 800;
  font-size: clamp(36px, 4.5vw, 56px);
  line-height: 1;
  letter-spacing: -0.005em;
  background: linear-gradient(135deg, var(--paper) 0%, var(--cyan-2) 100%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-big__label {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--paper-mute);
}


/* 20. FINAL CTA ========================================================== */
.cta {
  padding: 160px 0 200px;
  text-align: center;
  position: relative;
  /* content-visibility:auto deferred rendering was causing the scroll reveal
     to fire after the user had already scrolled past — removed. */
}
.cta::before {
  content: '';
  position: absolute;
  inset: 20% 10%;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(255, 61, 77, 0.18), transparent 60%),
    radial-gradient(ellipse at 50% 50%, rgba(79, 216, 232, 0.14), transparent 70%);
  filter: blur(40px);
  z-index: -1;
}
.cta__inner {
  position: relative;
  z-index: 4;
  max-width: 920px;
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  gap: 24px;
  justify-items: center;
}
.cta__inner .section-lede { margin: 0 auto; }
.cta .glitch {
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
  display: inline-flex;
  align-items: baseline;
  line-height: 1;
  vertical-align: baseline;
}
.cta__buttons {
  display: flex; flex-wrap: wrap; gap: 14px;
  justify-content: center;
  margin-top: 8px;
}
.cta__trust {
  display: flex; flex-wrap: wrap; gap: 24px;
  justify-content: center;
  margin-top: 28px;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--paper-mute);
}
.cta__trust li { display: inline-flex; align-items: center; gap: 8px; }
.cta__trust svg { width: 12px; height: 12px; color: var(--cyan); }


/* 21. FOOTER ============================================================= */
.footer {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(4,4,6,0.6), var(--void) 60%);
  position: relative;
}
.footer__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 80px var(--gutter) 56px;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 48px;
}
.footer__col--brand { max-width: 480px; }
.footer__tag {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--paper-mute);
  margin: 18px 0 14px;
}
.footer__desc {
  color: var(--paper-dim);
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 24px;
}
.socials { display: flex; gap: 8px; }
.socials a {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--paper-dim);
  transition: all 0.3s var(--ease-soft);
}
.socials a:hover {
  color: var(--neon-red);
  border-color: rgba(255, 61, 77, 0.4);
  background: rgba(255, 61, 77, 0.08);
  transform: translateY(-2px);
}
.footer__heading {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--cyan);
  margin: 0 0 18px;
}
.footer__col ul { display: grid; gap: 10px; }
.footer__col a {
  color: var(--paper-dim);
  font-size: 14px;
  transition: color 0.3s var(--ease-soft);
}
.footer__col a:hover { color: var(--paper); }
.footer__bottom {
  max-width: var(--container);
  margin: 0 auto;
  padding: 24px var(--gutter);
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--paper-mute);
}
.footer__legal { display: flex; gap: 20px; }
.footer__legal a:hover { color: var(--paper); }


/* 22. AUTH MODAL — folder drill-down ==================================== */
body.auth-is-open #main,
body.auth-is-open .header,
body.auth-is-open .orb,
body.auth-is-open .audio-toggle {
  filter: blur(8px) saturate(0.85);
  transition: filter 0.45s var(--ease-apple);
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  visibility: hidden;
}
.auth-modal[data-state="opening"],
.auth-modal[data-state="open"],
.auth-modal[data-state="closing"] {
  visibility: visible;
  pointer-events: auto;
}

.auth-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 2, 4, 0.55);
  opacity: 0;
  backdrop-filter: blur(0px) saturate(1);
  -webkit-backdrop-filter: blur(0px) saturate(1);
  transition:
    opacity 0.55s var(--ease-apple),
    backdrop-filter 0.7s var(--ease-apple),
    -webkit-backdrop-filter 0.7s var(--ease-apple);
}
.auth-modal[data-state="open"] .auth-modal__backdrop {
  opacity: 1;
  backdrop-filter: blur(28px) saturate(1.5);
  -webkit-backdrop-filter: blur(28px) saturate(1.5);
}

.auth-modal__panel {
  position: absolute;
  top:    var(--ax-y, 50%);
  left:   var(--ax-x, 50%);
  width:  var(--ax-w, 0px);
  height: var(--ax-h, 0px);
  border-radius: var(--ax-r, 999px);
  /*
   * BLACK-BAR FIX: Semi-transparent gradients can produce visible edge
   * artifacts when overflow:hidden clips an animating border-radius.
   * Solution: solid base colour + opaque gradient layer, GPU compositing,
   * and the WebKit mask trick for Safari.
   */
  background-color: #0d0d1a;  /* solid fallback — no transparent gap */
  background-image: linear-gradient(180deg, rgba(255,255,255,0.055) 0%, rgba(0,0,0,0.12) 100%);
  background-clip: padding-box;
  -webkit-background-clip: padding-box;
  border: 1px solid var(--line-strong);
  box-shadow:
    0 50px 120px -30px rgba(0, 0, 0, 0.7),
    0 30px 80px -30px var(--auth-accent-glow),
    0 30px 80px -30px var(--auth-accent-2-glow),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
  /*
   * isolation: isolate keeps the ::before accent glow in its own stacking
   * context so it doesn't bleed into adjacent composited layers.
   * NOTE: transform:translateZ(0) and -webkit-mask-image were removed —
   * they forced a premature GPU layer on an element that animates layout
   * properties (top/left/width/height). GPU tile position then diverges
   * from layout position mid-transition, producing a black compositing seam.
   */
  isolation: isolate;
  transition:
    top    0.7s var(--ease-apple),
    left   0.7s var(--ease-apple),
    width  0.7s var(--ease-apple),
    height 0.7s var(--ease-apple),
    border-radius 0.7s var(--ease-apple);
  will-change: top, left, width, height, border-radius;
}
.auth-modal__panel::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(420px 220px at var(--morph-x, 50%) var(--morph-y, 50%), var(--auth-accent-glow), transparent 62%),
    linear-gradient(135deg, var(--auth-accent-glow), transparent 30%, transparent 70%, var(--auth-accent-2-glow));
  opacity: 0;
  transition: opacity 0.7s var(--ease-apple);
}
.auth-modal[data-state="open"] .auth-modal__panel::before { opacity: 1; }

.auth-modal__close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-strong);
  color: var(--paper-dim);
  z-index: 4;
  opacity: 0;
  transform: scale(0.6) rotate(-30deg);
  transition:
    opacity 0.3s var(--ease-apple) 0.35s,
    transform 0.5s var(--ease-spring) 0.35s,
    background 0.25s var(--ease-soft),
    border-color 0.25s var(--ease-soft),
    color 0.25s var(--ease-soft);
}
.auth-modal__close svg { width: 18px; height: 18px; }
.auth-modal[data-state="open"] .auth-modal__close {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}
.auth-modal__close:hover {
  background: rgba(255, 61, 77, 0.12);
  border-color: rgba(255, 61, 77, 0.4);
  color: var(--neon-red-2);
  transform: scale(1.06) rotate(90deg);
}
.auth-modal__close:active { transform: scale(0.94) rotate(90deg); }

.auth-modal__content {
  position: relative;
  height: 100%;
  width: 100%;
  padding: 56px 48px 44px;
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.45s var(--ease-apple) 0.3s,
    transform 0.55s var(--ease-apple) 0.3s;
  /* Prevent content from causing panel overflow during border-radius animation */
  overflow-y: auto;
  /* min-height: 0 allows flex/grid children to correctly calculate scroll height */
  min-height: 0;
  box-sizing: border-box;
}
.auth-modal[data-state="open"] .auth-modal__content {
  opacity: 1;
  transform: translateY(0);
}

/* Auth form */
.auth-form__head { margin-bottom: 28px; }
.auth-form__title {
  font-family: 'Orbitron', sans-serif;
  font-weight: 800;
  font-size: clamp(26px, 3.8vw, 36px);
  margin: 12px 0 8px;
  letter-spacing: -0.005em;
  text-transform: uppercase;
}
.auth-form__sub {
  font-family: 'Rajdhani', sans-serif;
  font-size: 14px;
  color: var(--paper-dim);
  margin: 0;
}
.auth-form { display: grid; gap: 16px; }
.field {
  display: grid;
  gap: 6px;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--paper-mute);
}
.field input {
  font-family: 'Rajdhani', sans-serif;
  font-size: 16px;
  letter-spacing: normal;
  text-transform: none;
  color: var(--paper);
  /* Consistent padding + explicit height anchors the input regardless of font scaling */
  padding: 14px 16px;
  min-height: 48px;
  box-sizing: border-box;
  width: 100%;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  outline: none;
  /* appearance: none prevents platform defaults on mobile from altering height */
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.3s var(--ease-soft), background 0.3s var(--ease-soft), box-shadow 0.3s var(--ease-soft);
}
.field input:focus {
  border-color: rgba(79, 216, 232, 0.5);
  background: rgba(79, 216, 232, 0.06);
  box-shadow: 0 0 0 4px rgba(79, 216, 232, 0.12);
}
.field-row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.check {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 13px;
  letter-spacing: normal;
  text-transform: none;
  color: var(--paper-dim);
  cursor: pointer;
}
.check input { accent-color: var(--neon-red); width: 16px; height: 16px; }
.auth-form__forgot { color: var(--cyan); font-size: 13px; }
.auth-form__forgot:hover { color: var(--cyan-2); text-decoration: underline; }
.auth-form__alt {
  font-size: 13px;
  color: var(--paper-dim);
  text-align: center;
  margin: 8px 0 0;
}
.link-btn { color: var(--neon-red); font-weight: 600; cursor: pointer; }
.link-btn:hover { color: var(--neon-red-2); text-decoration: underline; }

.route-transition {
  position: fixed;
  inset: 0;
  z-index: 95;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(circle at var(--route-x) var(--route-y),
      var(--route-accent-glow) 0 5%,
      var(--route-accent-2-glow) 18%,
      var(--void) 62%);   /* fully opaque stop — no alpha gap at clip edge */
  clip-path: circle(0 at var(--route-x) var(--route-y));
  /*
   * ROOT CAUSE FIX — "black bars on every click":
   *
   * applyMorphAccent() runs on EVERY click (auth + nav). It updates
   * --route-x / --route-y on :root, which changes the clip-path value
   * from circle(0 at [old]) to circle(0 at [new]).  Because clip-path
   * was listed here in the default transition, that delta triggered a
   * full 0.58 s CSS transition on a viewport-filling fixed element —
   * cold-promoting it to a GPU compositing layer on every single click.
   * Uncleared GPU tiles appear as black bars across the entire screen.
   *
   * Fix: remove clip-path from the default transition; add it only in
   * .is-active so it animates exclusively during real navigations.
   * will-change pre-warms the GPU layer so the first real activation
   * never has a cold-start tile flash either.
   */
  transition: opacity 0.24s var(--ease-soft);
  will-change: clip-path, opacity;
}
.route-transition.is-active {
  opacity: 1;
  clip-path: circle(155vmax at var(--route-x) var(--route-y));
  /* clip-path transition fires ONLY here — not on every applyMorphAccent call */
  transition: clip-path 0.58s var(--ease-apple), opacity 0.24s var(--ease-soft);
}
.route-transition.is-leaving {
  opacity: 0;
  clip-path: circle(155vmax at var(--route-x) var(--route-y));
  /* hold clip at full size while fading — no snap-close artifact */
  transition: opacity 0.4s var(--ease-soft);
}

body.tournaments-theme {
  background:
    radial-gradient(760px 420px at 10% 8%, rgba(255, 61, 77, 0.12), transparent 66%),
    radial-gradient(680px 420px at 88% 18%, rgba(79, 216, 232, 0.10), transparent 70%),
    var(--void);
  color: var(--paper);
  min-height: 100dvh;
  overflow-x: hidden;
}
body.tournaments-theme::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    radial-gradient(circle at 82% 34%, rgba(255, 61, 77, 0.18), transparent 32%),
    radial-gradient(circle at 20% 72%, rgba(79, 216, 232, 0.14), transparent 36%);
  background-size: 72px 72px, 72px 72px, auto, auto;
}
body.tournaments-theme header,
body.tournaments-theme nav {
  background: rgba(4, 4, 6, 0.84);
  border-color: var(--line);
  backdrop-filter: blur(22px) saturate(1.4);
}
body.tournaments-theme main,
body.tournaments-theme #page-tournaments,
body.tournaments-theme [data-page="tournaments"] {
  background: transparent;
  color: var(--paper);
}
body.tournaments-theme .tournament-main {
  position: relative;
  z-index: 2;
  max-width: var(--container);
  margin: 0 auto;
  padding: calc(var(--header-h) + 52px) var(--gutter) var(--sp7);
  display: grid;
  gap: var(--sp5);
}
body.tournaments-theme .tournament-main .section-header,
body.tournaments-theme .tournament-main .featured__list {
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}
body.tournaments-theme .tournament-main .featured {
  padding: var(--sp5);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
}
body.tournaments-theme .tournament-theme-logo {
  position: fixed;
  top: 18px;
  left: clamp(18px, 4vw, 56px);
  z-index: 1000;
  width: clamp(154px, 18vw, 240px);
  height: 54px;
  background: var(--asset-logo) center / contain no-repeat;
  filter: drop-shadow(0 0 18px rgba(255, 61, 77, 0.26))
          drop-shadow(0 0 24px rgba(79, 216, 232, 0.18));
}
body.tournaments-theme .tournaments-hero {
  position: relative;
  min-height: clamp(360px, 48dvh, 560px);
  display: grid;
  align-content: end;
  gap: 18px;
  padding: clamp(28px, 6vw, 72px);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xl);
  background-clip: padding-box;
  -webkit-background-clip: padding-box;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.09), rgba(255,255,255,0.025)),
    radial-gradient(620px 360px at 78% 38%, rgba(255, 61, 77, 0.22), transparent 64%),
    radial-gradient(520px 340px at 20% 72%, rgba(79, 216, 232, 0.15), transparent 70%),
    rgba(4, 4, 6, 0.62);
  box-shadow:
    0 36px 90px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255,255,255,0.14);
  backdrop-filter: blur(18px) saturate(1.25);
  overflow: hidden;
}
body.tournaments-theme .tournaments-hero .hud-corners,
.auth-modal__panel > .hud-corners {
  display: none !important;
}
body.tournaments-theme .tournaments-hero::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--neon-red), var(--cyan), transparent);
  opacity: 0.72;
}
body.tournaments-theme .tournaments-hero > * {
  position: relative;
  z-index: 2;
}
body.tournaments-theme .tournament-page-orb {
  position: fixed;
  top: 38dvh;
  right: clamp(28px, 8vw, 112px);
  z-index: 1;
  width: clamp(220px, 28vw, 430px);
  height: clamp(220px, 28vw, 430px);
  pointer-events: none;
  transform-style: preserve-3d;
  animation: orb-float 12s var(--ease-soft) infinite alternate;
  filter: drop-shadow(0 24px 70px rgba(255, 61, 77, 0.22))
          drop-shadow(0 0 54px rgba(79, 216, 232, 0.15));
}
body.tournaments-theme .tournament-page-orb__halo,
body.tournaments-theme .tournament-page-orb__core,
body.tournaments-theme .tournament-page-orb__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
}
body.tournaments-theme .tournament-page-orb__halo {
  inset: -14%;
  background:
    radial-gradient(circle, rgba(255, 61, 77, 0.18), transparent 58%),
    radial-gradient(circle, rgba(79, 216, 232, 0.14), transparent 68%);
  filter: blur(22px);
}
body.tournaments-theme .tournament-page-orb__core {
  inset: 22%;
  background:
    radial-gradient(circle at 36% 28%, rgba(255,255,255,0.86), transparent 19%),
    radial-gradient(circle at 40% 34%, var(--neon-red-2), var(--void-3) 68%, var(--void) 100%),
    radial-gradient(circle at 72% 78%, var(--cyan), transparent 42%);
  box-shadow:
    inset 0 0 52px rgba(255, 61, 77, 0.42),
    inset 0 0 100px rgba(79, 216, 232, 0.20),
    0 0 70px rgba(255, 61, 77, 0.26);
}
body.tournaments-theme .tournament-page-orb__ring {
  border: 1px solid transparent;
  background: conic-gradient(from 0deg, transparent, var(--cyan), transparent, var(--neon-red), transparent) border-box;
  -webkit-mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0);
          mask-composite: exclude;
  animation: orb-spin-z 16s linear infinite;
}
body.tournaments-theme .tournament-card,
body.tournaments-theme [class*="tournament"] article,
body.tournaments-theme [class*="Tournament"] article,
body.tournaments-theme main article.card3d,
body.tournaments-theme main [class*="card"].card3d {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.025)),
    rgba(4, 4, 6, 0.58);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--paper);
  backdrop-filter: blur(14px);
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255,255,255,0.12);
  transition:
    transform 0.42s var(--ease-apple),
    border-color 0.32s var(--ease-soft),
    box-shadow 0.42s var(--ease-apple);
}
body.tournaments-theme main article.card3d:hover,
body.tournaments-theme main [class*="card"].card3d:hover {
  transform: translateY(-6px) scale(1.018);
  border-color: rgba(79, 216, 232, 0.42);
  box-shadow:
    0 28px 76px rgba(0, 0, 0, 0.44),
    0 0 42px rgba(79, 216, 232, 0.14),
    inset 0 0 34px rgba(255, 255, 255, 0.035);
}
body.tournaments-theme main a:not(.logo):not(.tournament-theme-logo),
body.tournaments-theme main button {
  transition:
    transform 0.32s var(--ease-apple),
    box-shadow 0.32s var(--ease-soft),
    border-color 0.32s var(--ease-soft),
    color 0.32s var(--ease-soft);
}
body.tournaments-theme main a:not(.logo):not(.tournament-theme-logo):hover,
body.tournaments-theme main button:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 24px rgba(255, 61, 77, 0.16), 0 0 28px rgba(79, 216, 232, 0.10);
}


/* 23. SCROLL PROGRESS RAIL =============================================== */
.scroll-rail {
  position: fixed;
  top: 50dvh;
  right: 24px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-family: 'Space Mono', monospace;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-50%) translateX(20px);
  transition: opacity 0.6s var(--ease-apple) 0.4s, transform 0.6s var(--ease-apple) 0.4s;
}
.scroll-rail[data-state="visible"] {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
  pointer-events: auto;
}
.scroll-rail__head {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan-2);
}
.scroll-rail__pct {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--neon-red);
  text-shadow: 0 0 12px rgba(255,61,77,0.5);
  line-height: 1;
}
.scroll-rail__lbl {
  color: var(--paper-mute);
  margin-top: 2px;
}
.scroll-rail__track {
  position: relative;
  width: 2px;
  height: 280px;
  background: var(--line-strong);
  border-radius: 999px;
  margin: 4px auto;
}
.scroll-rail__fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background: linear-gradient(180deg, var(--neon-red), var(--cyan));
  border-radius: 999px;
  box-shadow: 0 0 12px rgba(255, 61, 77, 0.5);
  transition: none;
}
.scroll-rail__notches {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.scroll-rail__notches i {
  position: absolute;
  left: -3px;
  width: 8px;
  height: 1px;
  background: var(--paper-mute);
}
.scroll-rail__sections {
  display: grid;
  gap: 6px;
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-align: right;
  color: var(--paper-mute);
}
.scroll-rail__sections li {
  cursor: pointer;
  transition: color 0.2s var(--ease-soft);
  padding: 2px 0;
}
.scroll-rail__sections li:hover { color: var(--paper-dim); }
.scroll-rail__sections li.is-active { color: var(--cyan); }


/* 24. AUDIO TOGGLE ======================================================= */
.audio-toggle {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 70;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 10px 12px;
  background: rgba(4, 4, 6, 0.6);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--paper-mute);
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  backdrop-filter: blur(12px);
  transition: all 0.3s var(--ease-soft);
}
.audio-toggle::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: inherit;
  border: 1px solid transparent;
  pointer-events: none;
}
.audio-toggle:hover {
  color: var(--cyan);
  border-color: rgba(79, 216, 232, 0.4);
  background: rgba(79, 216, 232, 0.06);
}
.audio-toggle svg { width: 16px; height: 16px; }
.audio-toggle__waves { opacity: 0.3; transition: opacity 0.3s var(--ease-soft); }
.audio-toggle[data-state="on"] {
  color: var(--neon-red);
  border-color: rgba(255, 61, 77, 0.4);
  background: rgba(255, 61, 77, 0.06);
  box-shadow: 0 0 24px rgba(255, 61, 77, 0.18);
}
.audio-toggle[data-state="on"]::after { border-color: rgba(79, 216, 232, 0.24); }
.audio-toggle[data-state="on"] .audio-toggle__waves { opacity: 1; }


/* 25. UTILITIES ========================================================== */
.pulse-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--neon-red);
  box-shadow: 0 0 0 0 rgba(255, 61, 77, 0.7);
  animation: pulse 1.8s ease-out infinite;
  flex-shrink: 0;
}
.status-pill .pulse-dot {
  background: #4cd86d;
  box-shadow: 0 0 0 0 rgba(76, 216, 109, 0.55);
}
.eyebrow .pulse-dot,
.nav__link--live .pulse-dot,
.badge .pulse-dot { width: 6px; height: 6px; }
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255, 61, 77, 0.7); }
  70%  { box-shadow: 0 0 0 12px rgba(255, 61, 77, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 61, 77, 0); }
}


/* fast-reveal — viewport-triggered fade-in for CTA elements.
   Class added by IntersectionObserver when element enters viewport. */
@keyframes fast-reveal {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Pre-hide: CTA items are invisible until IO adds .fast-reveal */
.cta__inner,
.cta__buttons,
.cta__trust {
  opacity: 0;
}

.fast-reveal {
  animation: fast-reveal 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Real-time Metrics section: visible only while in viewport. */
#metrics .metrics-vp-item {
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
#metrics .metrics-vp-item.is-inview {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  #metrics .metrics-vp-item,
  .cta__inner,
  .cta__buttons,
  .cta__trust { opacity: 1; }
  #metrics .metrics-vp-item { transform: none; transition: none; }
  .fast-reveal { animation: none; opacity: 1; transform: none; }
}


/* 26. RESPONSIVE ========================================================= */
@media (max-width: 1100px) {
  .features,
  .games__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .footer__col--brand { grid-column: 1 / -1; max-width: 100%; }
  .lock-stage__content { margin-top: -92dvh; }
  .feature { padding-right: 104px; }
  .feature__icon { width: 68px; height: 68px; }
  .feature__icon svg { width: 50px; height: 50px; }
  .orb { width: 430px; height: 430px; margin-top: -215px; right: 56px; }
  .orb-target { right: clamp(22px, 6vw, 78px); width: 250px; height: 250px; }
  .scroll-rail { right: 16px; }
  .scroll-rail__sections { display: none; }
  .cinema__caption { left: 32px; bottom: 32px; }
}

@media (max-width: 720px) {
  :root {
    --header-h: 84px;
    --logo-h-loader: 64px;
    --logo-h-header: 60px;
    --logo-h-footer: 80px;
  }
  .header {
    /* Prevent any child from bleeding past the viewport edge */
    overflow-x: hidden;
  }
  .header__inner {
    /*
     * MOBILE OVERFLOW FIX: minmax(190px, 1fr) could exceed available width
     * on screens < ~330px when paired with a wide auto CTA column.
     * Using 1fr lets the first column shrink freely; logo-slot's own
     * width:min(230px,100%) provides the inner constraint.
     */
    grid-template-columns: 1fr auto;
    gap: 10px;
    padding: 0 var(--sp3);
  }
  .logo-slot { width: min(230px, 100%); }
  .nav { display: none; }
  .header__cta {
    gap: 8px;
    /* Remove fit-content so the column can't force a grid overflow */
    min-width: unset;
    flex-shrink: 0;
    display: flex;
  }
  .header__cta .btn--ghost { display: inline-flex; }
  .header__cta .btn--sm { padding: 9px 12px; font-size: 11px; letter-spacing: 0.08em; }
  .features,
  .games__grid,
  .stats-grid,
  .featured__list { grid-template-columns: 1fr; }
  .section-header--row { align-items: flex-start; }
  .section-title { font-size: clamp(30px, 10vw, 46px); }
  .section-lede { width: 100%; }
  .section-title .glitch {
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
  }
  body.tournaments-theme .tournament-main {
    padding: calc(var(--header-h) + 28px) var(--gutter) var(--sp6);
    gap: var(--sp4);
  }
  body.tournaments-theme .tournaments-hero {
    min-height: 320px;
    padding: 28px;
    border-radius: var(--radius-lg);
    text-align: center;
    align-content: center;
  }
  body.tournaments-theme .tournaments-hero .section-lede {
    margin-left: auto;
    margin-right: auto;
  }
  .feature {
    min-height: 220px;
    padding: 30px 24px;
    text-align: center;
  }
  .feature__icon {
    position: relative;
    top: auto;
    right: auto;
    margin: 0 auto 16px;
    width: 58px;
    height: 58px;
    border-radius: 18px;
  }
  .feature__icon svg { width: 42px; height: 42px; }
  .feature__title { text-align: center; }
  .feature__body { text-align: center; }
  .game-card__inner { text-align: center; align-items: center; }
  .game-card__title { text-align: center; }
  .game-card__meta { text-align: center; }
  .cinema__caption { left: 20px; right: 20px; bottom: 20px; text-align: center; }
  .cinema__caption .section-lede { margin-left: auto; margin-right: auto; }
  body.tournaments-theme .tournament-page-orb {
    top: 32dvh;
    right: -24px;
    width: 200px;
    height: 200px;
    opacity: 0.54;
    will-change: transform;
  }
  .hero { min-height: 92dvh; padding-top: calc(var(--header-h) + 12px); }
  .hero__content { justify-items: center; text-align: center; }
  .hero__title { font-size: clamp(40px, 12vw, 80px); text-align: center; }
  .hero__subtitle { text-align: center; }
  .hero__stats { grid-template-columns: 1fr; gap: var(--sp2); text-align: center; }
  .hero__stats .stat { align-items: center; }
  .hero__cta {
    width: 100%;
    justify-content: center;
    flex-direction: column;
    align-items: stretch;
    position: relative;
    z-index: 5;
  }
  .hero__cta .btn {
    width: 100%;
    flex: 0 0 auto;
    position: relative;
    z-index: 5;
  }
  .cta .glitch {
    white-space: nowrap;
    overflow-wrap: normal;
  }
  .lock-stage { min-height: 280dvh; padding: 0 0 80px; margin-bottom: -82dvh; }
  .lock-stage__media { height: 100dvh; margin: 0 calc(50% - 50vw); border-radius: 0; }
  .lock-stage__video { will-change: transform; }
  body { overflow-x: hidden; }
  .lock-stage__content {
    margin-top: -96dvh;
    padding: calc(var(--header-h) + var(--sp4)) var(--sp3) var(--sp6);
    text-align: center;
  }
  .lock-stage__content .section-header {
    text-align: center;
  }
  .lock-stage__content .section-lede {
    margin-left: auto;
    margin-right: auto;
  }
  .section-header--row { flex-direction: column; align-items: center; text-align: center; }
  .section-header--row .link-arrow { margin-top: 8px; }
  .section-title { font-size: clamp(30px, 10vw, 46px); }
  .section-lede { width: 100%; }
  .games,
  .featured,
  .stats-banner,
  .cta { padding-left: var(--sp3); padding-right: var(--sp3); text-align: center; }
  .games { padding-top: calc(92dvh + 90px); }
  .featured .section-header { text-align: center; }
  .featured .section-lede { margin-left: auto; margin-right: auto; }
  .eyebrow { margin-left: auto; margin-right: auto; }
  .hero .eyebrow { margin-left: 0; margin-right: 0; }
  .hero__content .eyebrow { margin-left: auto; margin-right: auto; }
  .game-card { aspect-ratio: 16 / 19; border-radius: var(--radius); }
  .tournament-card {
    grid-template-columns: 46px 1fr;
    gap: 14px;
    padding: 18px;
  }
  .tournament-card__status { grid-column: 2; justify-self: start; }
  .tournament-card__sigil { width: 46px; height: 46px; border-radius: 12px; font-size: 18px; }
  .cinema { min-height: 260dvh; }
  .cinema__media { height: 100dvh; min-height: 100dvh; margin: 0 calc(50% - 50vw); border-radius: 0; }
  .cinema { overflow: visible; }
  .cta__buttons {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }
  .cta__buttons .btn { width: 100%; }
  .cta__trust {
    width: 100%;
    display: grid;
    justify-items: center;
    gap: 12px;
  }
  .stat { align-items: center; }
  .footer__inner { grid-template-columns: 1fr; gap: 36px; text-align: center; }
  .footer__col--brand { max-width: 100%; margin: 0 auto; }
  .footer__tag { text-align: center; }
  .footer__desc { text-align: center; }
  .footer__col { text-align: center; }
  .footer__col ul { justify-items: center; }
  .socials { justify-content: center; }
  .footer__bottom { flex-direction: column; align-items: center; text-align: center; }
  .tournament-card { text-align: left; }
  .tournament-card__title { text-align: left; }
  .tournament-card__meta { text-align: left; justify-content: flex-start; }
  .orb {
    width: 200px;
    height: 200px;
    margin-top: -100px;
    z-index: 1;
    opacity: var(--orb-opacity, 0);
    will-change: transform, opacity;
    filter: blur(var(--orb-blur, 0px)) drop-shadow(0 12px 36px rgba(255, 61, 77, 0.18));
  }
  .orb__hud {
    font-size: 7px;
    gap: 2px;
    letter-spacing: 0.1em;
  }
  .orb-target { right: 14px; width: 170px; height: 170px; }
  .auth-modal__content {
    /* Balanced inset on mobile: keeps text from touching edges without wasting space */
    padding: clamp(28px, 8vw, 44px) clamp(20px, 6vw, 32px);
  }
  .hero__cite, .v-meta--bl { display: none; }
  .hud-corners { inset: 7px; }
  .hud-corners i {
    width: 9px;
    height: 9px;
    border-width: 1px;
    opacity: 0.62;
  }
  .hud-corners--lg { inset: 10px; }
  .hud-corners--lg i {
    width: 14px;
    height: 14px;
    border-width: 1px;
  }
  .scroll-rail {
    display: flex;
    right: 8px;
    gap: 8px;
    transform: translateY(-50%) translateX(12px);
    will-change: transform, opacity;
  }
  .scroll-rail[data-state="visible"] {
    transform: translateY(-50%) translateX(0);
  }
  .scroll-rail__head { align-items: center; }
  .scroll-rail__pct { font-size: 14px; }
  .scroll-rail__lbl { display: none; }
  .scroll-rail__track { height: 164px; }
  .audio-toggle { bottom: 16px; left: 16px; padding: 8px 12px 8px 10px; font-size: 10px; }
  .cinema__caption { left: 20px; bottom: 20px; right: 20px; }
  .v-meta {
    font-size: 7px;
    letter-spacing: 0.1em;
    padding: 3px 6px;
    border-radius: 4px;
  }
  .v-meta--tl, .v-meta--tr { top: 8px; }
  .v-meta--tl, .v-meta--bl { left: 8px; }
  .v-meta--tr, .v-meta--br { right: 8px; }
  /* On mobile reduce tilt — DeviceOrientationEvent does it cleaner */
  :root { --tilt-card-rx: -1.5deg; --tilt-card-ry: 1.5deg; --tilt-hero-rx: -0.8deg; --tilt-hero-ry: 0.8deg; }

  /* Mobile performance optimizations */
  video {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
  }

  /* Reduce particle count on mobile */
  #particleRoot .ab-particle:nth-child(n+15) {
    display: none;
  }

  /* Morphing logo on mobile: skip FLIP animation, just dock instantly.
     Only opacity transitions — no position/size/transform animation.
     visibility is NOT in this list so it switches instantly (correct). */
  .logo--morph {
    transition:
      opacity 0.35s var(--ease-soft) !important;
    will-change: opacity;
  }

  /* Disable complex animations on low-power devices */
  @media (prefers-reduced-motion: reduce) {
    .orb,
    .tournament-page-orb,
    .card3d,
    .feature__icon,
    .glitch {
      animation: none !important;
      transition: none !important;
    }
  }
}
