/* ==========================================================================
   TASK: GOLIATH — The Last Organics
   Tactical HUD design system
   --------------------------------------------------------------------------
   Tailwind (CDN) handles layout/spacing utilities. Everything below is the
   component + effect layer, written by hand so the page still reads as a
   designed product if the CDN is blocked or slow.
   ========================================================================== */

/* ---------- 1. Tokens ---------------------------------------------------- */
:root {
  --bg:          #0D0F12;
  --bg-deep:     #07090B;
  --panel:       #12151A;
  --panel-2:     #171B21;
  --line:        #232932;

  --cyan:        #00F0FF;
  --cyan-dim:    #0AB8C4;
  --crimson:     #FF0055;
  --gold:        #FFC700;

  --txt:         #D7DEE8;
  --txt-dim:     #8A97A8;
  --txt-faint:   #5B6675;

  --ff-display:  'Chakra Petch', 'Rajdhani', 'Segoe UI', sans-serif;
  --ff-body:     'Inter', 'Segoe UI', system-ui, sans-serif;
  --ff-mono:     'JetBrains Mono', 'Consolas', ui-monospace, monospace;


  /* ── Tipografi olcegi ───────────────────────────────────────────────────
     Olculdu (2026-08-16): sayfada 27 FARKLI punto vardi — 8.32, 8.8, 8.96,
     9.28, 9.6, 9.92, 10.24, 10.56, 10.88, 11.2, 11.84, 12, 13.44 ... Bunlarin
     cogu Tailwind'in rem-tabanli siniflari ile clamp() sonuclarinin kesismesi
     yuzunden dogmustu ve hicbiri bilincli bir karar degildi.

     Bir olcek, gozun sayfada bir DUZEN sezmesini saglar: iki boyut arasindaki
     fark ya belirgin olmali ya da hic olmamali. 10.24 ile 10.56 arasindaki
     fark ne okunur ne de amaclidir — yalnizca gurultudur.

     Bu yedi basamak 1.25 (majör üçlü) oraninda ilerliyor ve mevcut tasarimin
     kullandigi degerlere en yakin duraklardan secildi, boylece gecis sayfayi
     yeniden dizmiyor.                                                       */
  --fs-3xs:  0.66rem;   /* mono etiket, rozet */
  --fs-2xs:  0.75rem;   /* yardimci metin, dipnot */
  --fs-xs:   0.82rem;   /* kart alt metni */
  --fs-sm:   0.92rem;   /* govde, ikincil */
  --fs-md:   1.05rem;   /* govde, birincil */
  --fs-lg:   1.35rem;   /* kart basligi */
  --fs-xl:   1.85rem;   /* bolum alt basligi */

  /* ── Dikey ritim ────────────────────────────────────────────────────────
     Bolum dolgulari 112/112, 56/56, 96/96 ve 72/0 olarak olculdu — dort ayri
     deger, aralarinda bir iliski yok. Tek bir taban (8px) uzerinden turetilen
     birkac durak, sayfanin nefesini duzenli yapar.                          */
  --sp-1: 0.5rem;   --sp-2: 1rem;    --sp-3: 1.5rem;
  --sp-4: 2rem;     --sp-6: 3rem;    --sp-8: 4rem;
  --sp-12: 6rem;    --sp-16: 8rem;

  /* Bolumlerin standart dikey dolgusu: dar ekranda 4rem, genisde 7rem. */
  --section-y: clamp(3.5rem, 7vw, 7rem);

  /* angular corner cut used across every HUD surface */
  --cut:   polygon(16px 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%, 0 16px);
  --cut-s: polygon(9px 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%, 0 9px);
  --cut-t: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);

  --z-nav: 60;
  --z-fab: 70;
  --z-modal: 90;
  --z-consent: 95;
}

/* ---------- 2. Base ------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--txt);
  font-family: var(--ff-body);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, .display { font-family: var(--ff-display); font-weight: 700; letter-spacing: .01em; line-height: 1.1; margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

::selection { background: rgba(0, 240, 255, .28); color: #fff; }

/* Scrollbar */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: #1E242D; border: 2px solid var(--bg-deep); border-radius: 0; }
::-webkit-scrollbar-thumb:hover { background: var(--cyan-dim); }

/* Focus — visible, on-theme, keyboard only */
:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.skip-link {
  position: fixed; top: -100px; left: 12px; z-index: 999;
  background: var(--cyan); color: #04262A; padding: .6rem 1.1rem;
  font-family: var(--ff-mono); font-size: .78rem; letter-spacing: .1em;
  transition: top .2s;
}
.skip-link:focus { top: 12px; }

/* ---------- 3. Typography helpers --------------------------------------- */
.mono { font-family: var(--ff-mono); }
.tk { font-family: var(--ff-mono); font-size: var(--fs-2xs); letter-spacing: .22em; text-transform: uppercase; }
.tk-sm { font-family: var(--ff-mono); font-size: var(--fs-3xs); letter-spacing: .2em; text-transform: uppercase; }

.t-cyan { color: var(--cyan); }
.t-crimson { color: var(--crimson); }
.t-gold { color: var(--gold); }
.t-dim { color: var(--txt-dim); }
.t-faint { color: var(--txt-faint); }

.neon-cyan    { color: var(--cyan);    text-shadow: 0 0 4px rgba(0,240,255,.9),  0 0 18px rgba(0,240,255,.45); }
.neon-crimson { color: var(--crimson); text-shadow: 0 0 4px rgba(255,0,85,.9),   0 0 18px rgba(255,0,85,.45); }
.neon-gold    { color: var(--gold);    text-shadow: 0 0 4px rgba(255,199,0,.85), 0 0 18px rgba(255,199,0,.4); }

.section-eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--ff-mono); font-size: var(--fs-3xs); letter-spacing: .28em;
  text-transform: uppercase; color: var(--cyan);
  /* Baslik grubunun ritmi tek yerden kuruluyor: eyebrow → h2 → sub arasindaki
     bosluk her bolumde Tailwind siniflariyla ayri ayri yaziliyordu ve
     birbirini tutmuyordu. */
  margin-bottom: var(--sp-3);
}
.section-eyebrow::before {
  content: ''; width: 26px; height: 1px; background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
}

.section-title { font-size: clamp(1.7rem, 4vw, 2.75rem); text-transform: uppercase; }
/* 62ch okunabilirlik ust siniri: bundan uzun satirlarda goz satir basini
   kaybeder. Govde metni icin de ayni sinir asagida uygulaniyor. */
.section-sub {
  color: var(--txt-dim); max-width: 62ch;
  font-size: var(--fs-md); line-height: 1.65;
}

/* Bolum basligi: her bolumde ayri ayri clamp() yazmak yerine tek kural. */
.section-title {
  font-family: var(--ff-display); font-weight: 700;
  text-transform: uppercase; letter-spacing: .01em;
  font-size: clamp(1.7rem, 4.6vw, 3rem); line-height: 1.08;
  margin-bottom: var(--sp-3);
}

/* Bolumlerin dikey dolgusu. Olculdu: 112/112, 56/56, 96/96 ve 72/0 vardi —
   dort ayri deger, aralarinda bir iliski yok. */
.section-pad { padding-top: var(--section-y); padding-bottom: var(--section-y); }

/* ---------- 4. Backdrop FX ---------------------------------------------- */
/* Fixed overlays: scanlines, CRT vignette, film noise. pointer-events off. */
.fx-layer { position: fixed; inset: 0; pointer-events: none; z-index: 40; }

.fx-scanlines {
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0px,
    rgba(0, 0, 0, 0) 2px,
    rgba(0, 0, 0, .22) 3px,
    rgba(0, 0, 0, .22) 4px
  );
  opacity: .55;
  mix-blend-mode: multiply;
}

.fx-vignette {
  background:
    radial-gradient(ellipse at 50% 45%, rgba(0,0,0,0) 45%, rgba(0,0,0,.55) 100%),
    linear-gradient(to bottom, rgba(0,240,255,.03), rgba(0,0,0,0) 30%);
}

/* Slow sweeping refresh bar — the "CRT beam" */
.fx-sweep::after {
  content: '';
  position: absolute; left: 0; right: 0; height: 180px;
  background: linear-gradient(to bottom, rgba(0,240,255,0), rgba(0,240,255,.045), rgba(0,240,255,0));
  animation: crt-sweep 7.5s linear infinite;
}

@keyframes crt-sweep {
  0%   { transform: translateY(-200px); }
  100% { transform: translateY(100vh); }
}

/* Industrial grid — used as a section/hero backdrop */
.grid-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(0,240,255,.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,240,255,.055) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 40%, #000 25%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 25%, transparent 78%);
}

.grid-bg--flat {
  mask-image: linear-gradient(to bottom, #000, transparent 85%);
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 85%);
  opacity: .7;
}

/* Ambient colour bleed behind sections */
.glow-orb {
  position: absolute; border-radius: 50%; pointer-events: none;
  filter: blur(90px); opacity: .3;
}

/* ---------- 5. HUD panel ------------------------------------------------- */
/* Outer element paints the 1px angular edge; ::before paints the fill. */
.hud {
  position: relative;
  clip-path: var(--cut);
  background: rgba(0, 240, 255, .22);
  transition: background .25s ease, transform .25s ease;
}
.hud::before {
  content: '';
  position: absolute; inset: 1px;
  clip-path: var(--cut);
  background: rgba(18, 21, 26, .82);
  -webkit-backdrop-filter: blur(12px) saturate(120%);
  backdrop-filter: blur(12px) saturate(120%);
}
.hud > * { position: relative; z-index: 1; }

.hud--solid::before { background: var(--panel); -webkit-backdrop-filter: none; backdrop-filter: none; }
.hud--sm { clip-path: var(--cut-s); }
.hud--sm::before { clip-path: var(--cut-s); }
.hud--crimson { background: rgba(255, 0, 85, .3); }
.hud--gold    { background: rgba(255, 199, 0, .3); }
.hud--muted   { background: var(--line); }

.hud--hover:hover { background: rgba(0, 240, 255, .55); transform: translateY(-3px); }
.hud--hover.hud--gold:hover { background: rgba(255, 199, 0, .6); }

/* Corner tick marks — the detail that sells the HUD read */
.hud-ticks::after {
  content: '';
  position: absolute; z-index: 2; inset: 8px;
  pointer-events: none;
  background:
    linear-gradient(var(--cyan), var(--cyan)) 0 0 / 10px 1px no-repeat,
    linear-gradient(var(--cyan), var(--cyan)) 0 0 / 1px 10px no-repeat,
    linear-gradient(var(--cyan), var(--cyan)) 100% 100% / 10px 1px no-repeat,
    linear-gradient(var(--cyan), var(--cyan)) 100% 100% / 1px 10px no-repeat;
  opacity: .5;
}

/* ---------- 6. Buttons --------------------------------------------------- */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .78rem 1.5rem;
  font-family: var(--ff-display); font-weight: 600;
  font-size: .84rem; letter-spacing: .14em; text-transform: uppercase;
  clip-path: var(--cut-s);
  border: 1px solid transparent;
  transition: color .2s, background .2s, box-shadow .2s, transform .12s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn i, .btn svg { width: 17px; height: 17px; flex: none; }

.btn-cyan {
  background: var(--cyan); color: #04262A;
  box-shadow: 0 0 0 rgba(0,240,255,0);
}
.btn-cyan:hover { box-shadow: 0 0 26px rgba(0,240,255,.55); background: #4CF7FF; }

.btn-crimson { background: var(--crimson); color: #fff; }
.btn-crimson:hover { box-shadow: 0 0 26px rgba(255,0,85,.5); background: #FF3372; }

.btn-gold { background: var(--gold); color: #241B00; }
.btn-gold:hover { box-shadow: 0 0 26px rgba(255,199,0,.5); background: #FFD642; }

.btn-outline {
  background: rgba(0,240,255,.05); color: var(--cyan);
  border-color: rgba(0,240,255,.45);
}
.btn-outline:hover { background: rgba(0,240,255,.14); border-color: var(--cyan); box-shadow: 0 0 20px rgba(0,240,255,.28); }

.btn-ghost { color: var(--txt-dim); border-color: var(--line); }
.btn-ghost:hover { color: var(--txt); border-color: var(--txt-faint); background: rgba(255,255,255,.04); }

.btn-sm { padding: .5rem 1rem; font-size: .74rem; letter-spacing: .12em; }
.btn-lg { padding: 1rem 2.1rem; font-size: .95rem; }
.btn-block { display: flex; width: 100%; }

/* Pulsing wishlist CTA */
.btn-pulse { animation: cta-pulse 2.6s ease-in-out infinite; }
@keyframes cta-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,240,255,.5), 0 0 18px rgba(0,240,255,.35); }
  50%      { box-shadow: 0 0 0 12px rgba(0,240,255,0), 0 0 30px rgba(0,240,255,.6); }
}

/* ---------- 7. Header / nav --------------------------------------------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: var(--z-nav);
  transition: background .3s, border-color .3s, backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.site-header.is-stuck {
  background: rgba(9, 11, 14, .88);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: rgba(0,240,255,.18);
  box-shadow: 0 12px 40px -22px rgba(0,0,0,.9);
}

/* Holds the logo mark. No filled plate any more — the mark is a cyan outline,
   so a cyan gradient behind it erased the whole silhouette. */
.brand-mark {
  width: 38px; height: 38px; flex: none;
  display: grid; place-items: center;
  filter: drop-shadow(0 0 6px rgba(0, 240, 255, .35));
  animation: mark-pulse 3.4s ease-in-out infinite;
}
@keyframes mark-pulse {
  0%, 100% { filter: drop-shadow(0 0 5px rgba(0,240,255,.3)); }
  50%      { filter: drop-shadow(0 0 13px rgba(0,240,255,.75)); }
}

.brand-title {
  font-family: var(--ff-display); font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase;
  animation: title-glow 3.4s ease-in-out infinite;
}
@keyframes title-glow {
  0%, 100% { text-shadow: 0 0 4px rgba(0,240,255,.35); }
  50%      { text-shadow: 0 0 10px rgba(0,240,255,.9), 0 0 24px rgba(0,240,255,.35); }
}

/* Turkish labels run ~35% longer than English and were crowding the bar.
   Tracking and size now scale with the viewport instead of being fixed, so
   the same markup breathes on a 1920 screen and still fits at 1280. */
.nav-link {
  position: relative;
  font-family: var(--ff-mono);
  font-size: var(--fs-3xs);
  letter-spacing: clamp(.06em, .18vw, .16em);
  text-transform: uppercase;
  color: var(--txt-dim);
  padding: .45rem .1rem;
  white-space: nowrap;
  transition: color .2s;
}
.nav-link::after {
  content: ''; position: absolute; left: 0; bottom: 0;
  height: 1px; width: 0; background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  transition: width .25s ease;
}
.nav-link:hover, .nav-link.is-active { color: var(--cyan); }
.nav-link:hover::after, .nav-link.is-active::after { width: 100%; }

/* Mobile drawer */
.nav-drawer {
  position: fixed; inset: 0 0 0 auto; width: min(88vw, 340px);
  background: rgba(11, 13, 17, .97);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-left: 1px solid rgba(0,240,255,.22);
  transform: translateX(100%); transition: transform .32s cubic-bezier(.5,.1,.2,1);
  z-index: 80; overflow-y: auto;
}
.nav-drawer.is-open { transform: translateX(0); }
.nav-scrim {
  position: fixed; inset: 0; background: rgba(0,0,0,.7); z-index: 79;
  opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
}
.nav-scrim.is-open { opacity: 1; visibility: visible; }

/* Commander chip */
.rank-badge {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .16rem .5rem;
  font-family: var(--ff-mono); font-size: .6rem; letter-spacing: .14em; text-transform: uppercase;
  clip-path: var(--cut-s);
  background: rgba(255,199,0,.14); color: var(--gold);
  border: 1px solid rgba(255,199,0,.4);
}

/* ---------- 8. Hero ------------------------------------------------------ */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; overflow: hidden; }

.hero-art {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 72% 28%, rgba(0,240,255,.14), transparent 55%),
              radial-gradient(ellipse at 20% 85%, rgba(255,0,85,.11), transparent 55%);
}

/* Rotating planet.
   A pre-baked sphere image cannot turn — the shading would rotate with it. So
   the sphere is assembled here: a circular window onto a seamlessly tiling
   cloud map that scrolls sideways, with the lighting painted on top and held
   still. That is what sells the rotation. */
.hero-planet {
  position: absolute; right: -6%; top: 6%;
  width: min(46vw, 560px); aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  opacity: .62;
  /* Feather the last 3% of the disc so the limb dissolves into space instead
     of ending on a hard circular cut against the background. */
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 92%, rgba(0,0,0,.55) 97%, transparent 100%);
          mask-image: radial-gradient(circle at 50% 50%, #000 92%, rgba(0,0,0,.55) 97%, transparent 100%);
  animation: drift 34s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(-22px, 26px, 0) scale(1.05); }
}

.hero-planet__map {
  position: absolute; inset: -2%;
  background-image: url('../assets/gallery/planet-map.webp');
  background-size: 200% 100%;
  background-repeat: repeat-x;
  /* The seamless tile is a cross-fade of two slices, which costs some local
     contrast; push it back so the cloud bands stay readable under the shading. */
  filter: saturate(.95) contrast(1.34) brightness(1.26);
  /* 150s was geometrically correct and perceptually useless: one tile width
     is 2× the disc, so the surface crawled past at ~7 px/s and read as a
     still image. 52s puts it near 22 px/s — clearly turning, still calm. */
  animation: planet-spin 52s linear infinite;
  will-change: background-position;
}
@keyframes planet-spin {
  from { background-position:    0% 50%; }
  to   { background-position: -200% 50%; }
}

/* Lighting stays put while the map moves underneath: key light upper-left,
   terminator falling to lower-right, limb darkening at the edge. */
.hero-planet__shade {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 30% 26%, rgba(190,240,255,.22), transparent 46%),
    radial-gradient(circle at 72% 76%, rgba(0,0,0,.94), transparent 62%),
    /* limb darkening has to reach true black, or the disc edge stays lighter
       than space and the circle reads as a pasted-on cutout */
    radial-gradient(circle at 50% 50%, transparent 50%, rgba(0,0,0,.55) 82%, #000 100%);
}

/* Thin atmosphere catching light on the dark limb. */
.hero-planet__rim {
  position: absolute; inset: 0; border-radius: 50%;
  box-shadow:
    inset -14px -18px 46px rgba(0,0,0,.9),
    inset 10px 12px 30px rgba(0,240,255,.10);
}

/* Faint atmosphere halo, drawn behind the sphere so the rim reads as glow
   rather than an outline pasted on top. */
.hero-planet-halo {
  position: absolute; right: -6%; top: 6%;
  width: min(46vw, 560px); aspect-ratio: 1;
  border-radius: 50%;
  /* Hollow in the middle and thin at the rim: an atmosphere, not a lamp behind
     the disc. The old solid-centre version glowed through the sphere and made
     the limb look like it ended in a halo ring. */
  background: radial-gradient(circle at 50% 50%,
              transparent 62%, rgba(0,240,255,.13) 78%,
              rgba(0,240,255,.05) 88%, transparent 100%);
  filter: blur(22px);
  animation: halo-breathe 11s ease-in-out infinite;
  pointer-events: none;
}
@keyframes halo-breathe {
  0%, 100% { opacity: .5;  transform: scale(1.02); }
  50%      { opacity: .78; transform: scale(1.07); }
}

/* Glitching hero title */
.glitch { position: relative; display: inline-block; }
.glitch::before, .glitch::after {
  content: attr(data-text);
  position: absolute; inset: 0;
  pointer-events: none;
  clip-path: inset(0 0 0 0);
}
.glitch::before { color: var(--crimson); animation: glitch-a 4.2s steps(2, end) infinite; }
.glitch::after  { color: var(--cyan);    animation: glitch-b 3.4s steps(2, end) infinite; }

@keyframes glitch-a {
  0%, 92%, 100% { transform: none; opacity: 0; }
  93% { transform: translate(-3px, 1px); opacity: .8; clip-path: inset(12% 0 62% 0); }
  95% { transform: translate(2px, -2px);  opacity: .8; clip-path: inset(58% 0 18% 0); }
  97% { transform: translate(-2px, 0);    opacity: .6; clip-path: inset(32% 0 44% 0); }
}
@keyframes glitch-b {
  0%, 90%, 100% { transform: none; opacity: 0; }
  91% { transform: translate(3px, -1px); opacity: .7; clip-path: inset(28% 0 48% 0); }
  94% { transform: translate(-2px, 2px); opacity: .7; clip-path: inset(66% 0 12% 0); }
  96% { transform: translate(1px, 0);    opacity: .5; clip-path: inset(6% 0 78% 0); }
}

/* Scroll cue */
.scroll-cue { width: 22px; height: 36px; border: 1px solid rgba(0,240,255,.4); border-radius: 12px; position: relative; }
.scroll-cue::after {
  content: ''; position: absolute; left: 50%; top: 7px; width: 3px; height: 7px;
  margin-left: -1.5px; background: var(--cyan); border-radius: 2px;
  animation: cue 1.9s ease-in-out infinite;
}
@keyframes cue { 0%,100% { transform: translateY(0); opacity: 1; } 60% { transform: translateY(12px); opacity: 0; } }

/* ---------- 9. Ticker ---------------------------------------------------- */
.ticker {
  overflow: hidden; white-space: nowrap;
  border-top: 1px solid rgba(0,240,255,.16);
  border-bottom: 1px solid rgba(0,240,255,.16);
  background: rgba(0,240,255,.035);
}
.ticker-track { display: inline-flex; gap: 3rem; padding: .6rem 0; animation: ticker 42s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.ticker-item { font-family: var(--ff-mono); font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: var(--txt-faint); display: inline-flex; align-items: center; gap: .6rem; }
.ticker-item b { color: var(--cyan); font-weight: 500; }

/* ---------- 10. Feature cards ------------------------------------------- */
.feature-card { padding: 1.6rem; height: 100%; }
.feature-icon {
  width: 44px; height: 44px; display: grid; place-items: center;
  clip-path: var(--cut-s);
  background: rgba(0,240,255,.1); border: 1px solid rgba(0,240,255,.3);
  color: var(--cyan);
}
.feature-card:hover .feature-icon { background: rgba(0,240,255,.2); box-shadow: 0 0 22px rgba(0,240,255,.25) inset; }

/* Sector band ladder */
.band-row {
  /* 74px "901-1000" icin dardi ve sayi iki satira boluyordu — satirin
     yuksekligi tek basina degisiyor, merdiven ritmi bozuluyordu. Sutun artik
     icerige gore genisliyor ve sayi kirilmiyor. */
  display: grid; grid-template-columns: max-content 1fr auto;
  align-items: center; gap: 1rem;
  padding: .7rem .9rem;
  border-left: 2px solid var(--line);
  transition: border-color .2s, background .2s;
}
.band-row:hover { border-left-color: var(--cyan); background: rgba(0,240,255,.05); }
.band-row:hover .band-name { color: var(--cyan); }
.band-row > span:first-child { white-space: nowrap; }
.band-name { font-family: var(--ff-display); font-weight: 600; letter-spacing: .06em; transition: color .2s; }

/* ---------- 11. Stat bars ------------------------------------------------ */
.stat-line { display: grid; grid-template-columns: 92px 1fr 62px; align-items: center; gap: .75rem; }
/* Both are <span>s — without display:block, width/height simply do not apply. */
.stat-track { display: block; height: 6px; background: #0A0D11; border: 1px solid var(--line); overflow: hidden; position: relative; }
.stat-fill {
  display: block;
  height: 100%; width: 0;
  background: linear-gradient(90deg, var(--cyan-dim), var(--cyan));
  box-shadow: 0 0 12px rgba(0,240,255,.7);
  transition: width .7s cubic-bezier(.2,.8,.2,1);
}
.stat-fill--crimson { background: linear-gradient(90deg, #A80038, var(--crimson)); box-shadow: 0 0 12px rgba(255,0,85,.6); }
.stat-fill--gold    { background: linear-gradient(90deg, #B88C00, var(--gold));    box-shadow: 0 0 12px rgba(255,199,0,.55); }

/* ---------- 12. Unit codex ---------------------------------------------- */
.unit-chip {
  position: relative; width: 100%; aspect-ratio: 1;
  clip-path: var(--cut-s);
  background: var(--line);
  transition: background .2s, transform .18s;
}
.unit-chip::before {
  content: ''; position: absolute; inset: 1px; clip-path: var(--cut-s);
  background: #0E1116;
}
.unit-chip img {
  position: relative; z-index: 1; width: 100%; height: 100%;
  object-fit: cover; object-position: center 18%;
  filter: grayscale(.55) brightness(.72) contrast(1.05);
  transition: filter .25s, transform .35s;
}
.unit-chip:hover { background: rgba(0,240,255,.6); transform: translateY(-2px); }
.unit-chip:hover img { filter: grayscale(0) brightness(1); }
.unit-chip.is-active { background: var(--cyan); }
.unit-chip.is-active img { filter: grayscale(0) brightness(1.05); }
.unit-chip.is-active::after {
  content: ''; position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; height: 3px;
  background: var(--cyan); box-shadow: 0 0 14px var(--cyan);
}
.unit-chip-role {
  position: absolute; z-index: 2; top: 4px; left: 4px;
  font-family: var(--ff-mono); font-size: var(--fs-3xs); letter-spacing: .12em;
  padding: 1px 4px; background: rgba(0,0,0,.72);
}

.role-tank    { color: #4DA6FF; }
.role-dps     { color: var(--crimson); }
.role-support { color: #00FF9C; }

/* The portrait column used to stretch to match the (much taller) stats column,
   leaving the artwork floating in half an empty card. Fixing the panel to its
   art's aspect and pinning it to the top of the column keeps the frame around
   the character instead of around nothing. */
.unit-portrait {
  position: relative;
  aspect-ratio: 4 / 5;
  min-height: 0;
  display: grid; place-items: center;
  overflow: hidden;
}
.unit-portrait img {
  max-height: 100%; max-width: 100%;
  width: auto; height: auto; object-fit: contain;
  filter: drop-shadow(0 0 34px rgba(0,240,255,.22));
}
.unit-portrait .portrait-floor {
  position: absolute; bottom: 0; left: 10%; right: 10%; height: 120px;
  background: radial-gradient(ellipse at 50% 100%, rgba(0,240,255,.28), transparent 70%);
  pointer-events: none;
}

/* Hot-swap transition when the pose preview changes */
.swap-in { animation: swap-in .42s cubic-bezier(.2,.9,.2,1); }
@keyframes swap-in {
  0%   { opacity: 0; transform: translateY(14px) scale(.97); filter: blur(6px) brightness(2.2); }
  55%  { opacity: 1; filter: blur(0) brightness(1.4); }
  100% { opacity: 1; transform: none; filter: none; }
}

.skill-chip {
  display: block; width: 100%; text-align: left;
  padding: .7rem .85rem;
  border: 1px solid var(--line);
  background: rgba(10,13,17,.6);
  transition: border-color .2s, background .2s, transform .15s;
  clip-path: var(--cut-s);
}
.skill-chip:hover { border-color: rgba(0,240,255,.5); background: rgba(0,240,255,.07); transform: translateX(3px); }
.skill-chip.is-active { border-color: var(--cyan); background: rgba(0,240,255,.12); }
.skill-chip.is-active .skill-chip-name { color: var(--cyan); }
.skill-chip-name { font-family: var(--ff-display); font-weight: 600; letter-spacing: .05em; font-size: var(--fs-sm); }

/* ---------- 13. Tabs + gallery ------------------------------------------ */
.tab-btn {
  font-family: var(--ff-mono); font-size: .7rem; letter-spacing: .16em; text-transform: uppercase;
  padding: .55rem 1.05rem; color: var(--txt-dim);
  border: 1px solid var(--line); clip-path: var(--cut-s);
  transition: color .2s, border-color .2s, background .2s;
}
.tab-btn:hover { color: var(--txt); border-color: var(--txt-faint); }
.tab-btn.is-active { color: #04262A; background: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 18px rgba(0,240,255,.35); }

.gal-item {
  position: relative; overflow: hidden; cursor: pointer;
  clip-path: var(--cut-s); background: var(--panel);
  aspect-ratio: 16 / 10;
}
.gal-item img, .gal-item object, .gal-item .gal-svg {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .55s cubic-bezier(.2,.8,.2,1), filter .35s;
  filter: saturate(.85) brightness(.85);
}
.gal-item:hover img, .gal-item:hover .gal-svg { transform: scale(1.06); filter: saturate(1.05) brightness(1); }
.gal-item::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(7,9,11,.92) 0%, rgba(7,9,11,.15) 45%, transparent 70%);
  pointer-events: none;
}
.gal-meta { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; padding: .85rem 1rem; }
.gal-item.is-hidden { display: none; }

.gal-play {
  position: absolute; z-index: 3; inset: 0; display: grid; place-items: center;
  pointer-events: none;
}
.gal-play span {
  width: 58px; height: 58px; display: grid; place-items: center;
  border: 1px solid rgba(0,240,255,.6); background: rgba(0,240,255,.14);
  clip-path: var(--cut-s); color: var(--cyan);
  animation: cta-pulse 2.8s ease-in-out infinite;
}

/* ---------- 14. Simulator ------------------------------------------------ */
.range {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 26px; background: transparent; cursor: pointer;
}
.range::-webkit-slider-runnable-track {
  height: 4px; background: linear-gradient(to right, var(--cyan) var(--fill, 0%), #1A2029 var(--fill, 0%));
  border: 1px solid var(--line);
}
.range::-moz-range-track { height: 4px; background: #1A2029; border: 1px solid var(--line); }
.range::-moz-range-progress { height: 4px; background: var(--cyan); }
.range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 16px; height: 22px; margin-top: -10px;
  background: var(--cyan);
  clip-path: polygon(50% 0, 100% 26%, 100% 100%, 0 100%, 0 26%);
  box-shadow: 0 0 14px rgba(0,240,255,.75);
  transition: box-shadow .2s;
}
.range::-moz-range-thumb {
  width: 16px; height: 22px; border: 0; border-radius: 0;
  background: var(--cyan);
  clip-path: polygon(50% 0, 100% 26%, 100% 100%, 0 100%, 0 26%);
  box-shadow: 0 0 14px rgba(0,240,255,.75);
}
.range:hover::-webkit-slider-thumb { box-shadow: 0 0 22px rgba(0,240,255,1); }
.range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px rgba(0,240,255,.35), 0 0 22px rgba(0,240,255,1); }

.readout {
  font-family: var(--ff-mono); font-weight: 700;
  font-size: clamp(1.5rem, 4.2vw, 2.3rem); line-height: 1.05;
  font-variant-numeric: tabular-nums; letter-spacing: -.01em;
}
.readout-card { padding: 1.15rem 1.25rem; position: relative; overflow: hidden; }
.readout-card::after {
  content: ''; position: absolute; z-index: 2; top: 0; left: -100%; width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.05), transparent);
  animation: shine 5.5s ease-in-out infinite;
}
@keyframes shine { 0%, 70%, 100% { left: -100%; } 85% { left: 140%; } }

.pip-row { display: flex; gap: 4px; }
.pip { width: 100%; height: 5px; background: #161B22; border: 1px solid #232932; transition: background .3s, box-shadow .3s; }
.pip.is-on { background: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 8px rgba(0,240,255,.8); }
.pip.is-on.pip--crimson { background: var(--crimson); border-color: var(--crimson); box-shadow: 0 0 8px rgba(255,0,85,.8); }
.pip.is-on.pip--gold { background: var(--gold); border-color: var(--gold); box-shadow: 0 0 8px rgba(255,199,0,.8); }

.stage-type-badge {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .2rem .6rem; clip-path: var(--cut-s);
  font-family: var(--ff-mono); font-size: .64rem; letter-spacing: .16em; text-transform: uppercase;
}
.stage-type-badge[data-type="normal"] { background: rgba(0,240,255,.12); color: var(--cyan); border: 1px solid rgba(0,240,255,.35); }
.stage-type-badge[data-type="mini"]   { background: rgba(255,199,0,.12); color: var(--gold); border: 1px solid rgba(255,199,0,.4); }
.stage-type-badge[data-type="gate"]   { background: rgba(255,0,85,.14); color: var(--crimson); border: 1px solid rgba(255,0,85,.45); animation: gate-flash 1.6s ease-in-out infinite; }
@keyframes gate-flash { 0%,100% { box-shadow: 0 0 0 rgba(255,0,85,0); } 50% { box-shadow: 0 0 16px rgba(255,0,85,.55); } }

/* ---------- 15. Modals --------------------------------------------------- */
.modal {
  position: fixed; inset: 0; z-index: var(--z-modal);
  display: grid; place-items: center; padding: 1rem;
  background: rgba(4, 6, 8, .84);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s;
}
.modal.is-open { opacity: 1; visibility: visible; }
.modal-box {
  width: 100%; max-width: 460px;
  transform: translateY(18px) scale(.98); opacity: 0;
  transition: transform .3s cubic-bezier(.2,.9,.2,1), opacity .3s;
  max-height: calc(100vh - 2rem); overflow-y: auto;
}
.modal.is-open .modal-box { transform: none; opacity: 1; }
.modal-box--wide { max-width: 980px; }
.modal-box--media { max-width: 1180px; background: transparent; }

.field-label {
  display: block; margin-bottom: .35rem;
  font-family: var(--ff-mono); font-size: .64rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--txt-dim);
}
.field {
  width: 100%; padding: .7rem .85rem;
  color: var(--txt); font-family: var(--ff-mono); font-size: .88rem;
  clip-path: var(--cut-s);
}
.field::placeholder { color: #4A5462; }
/* Colours and the chamfered outline are set in section 31. */

.form-msg {
  font-family: var(--ff-mono); font-size: .72rem; letter-spacing: .04em;
  padding: .55rem .7rem; border-left: 2px solid;
  display: none;
}
.form-msg.is-shown { display: block; animation: swap-in .3s ease; }
.form-msg--err { color: #FF6B96; border-color: var(--crimson); background: rgba(255,0,85,.09); }
.form-msg--ok  { color: #6DFFC8; border-color: #00FF9C; background: rgba(0,255,156,.08); }

/* ---------- 16. Terminal ------------------------------------------------- */
.term-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: var(--z-fab);
  width: 56px; height: 56px; display: grid; place-items: center;
  clip-path: var(--cut-s);
  background: rgba(18,21,26,.92); border: 1px solid rgba(0,240,255,.5);
  color: var(--cyan);
  box-shadow: 0 0 24px rgba(0,240,255,.22), 0 10px 30px -12px #000;
  transition: transform .2s, box-shadow .2s, background .2s;
}
.term-fab:hover { transform: translateY(-3px); background: rgba(0,240,255,.16); box-shadow: 0 0 34px rgba(0,240,255,.5); }
.term-fab::after {
  content: ''; position: absolute; top: -3px; right: -3px;
  width: 9px; height: 9px; background: #00FF9C; border-radius: 50%;
  box-shadow: 0 0 10px #00FF9C; animation: blink 2.1s steps(1) infinite;
}
@keyframes blink { 0%, 60% { opacity: 1; } 61%, 100% { opacity: .15; } }

.term-window {
  position: fixed; right: 20px; bottom: 88px; z-index: var(--z-fab);
  width: min(calc(100vw - 40px), 560px); height: min(62vh, 460px);
  display: flex; flex-direction: column;
  opacity: 0; visibility: hidden; transform: translateY(14px) scale(.98);
  transition: opacity .25s, visibility .25s, transform .25s cubic-bezier(.2,.9,.2,1);
}
.term-window.is-open { opacity: 1; visibility: visible; transform: none; }

.term-body {
  flex: 1; overflow-y: auto; padding: .9rem 1rem;
  font-family: var(--ff-mono); font-size: .78rem; line-height: 1.6;
  color: #9FE9F0;
  scrollbar-width: thin;
}
.term-body p { margin: 0 0 .18rem; white-space: pre-wrap; word-break: break-word; }
.term-body .t-in  { color: var(--gold); }
.term-body .t-err { color: #FF6B96; }
.term-body .t-ok  { color: #6DFFC8; }
.term-body .t-mut { color: var(--txt-faint); }
.term-body .t-hi  { color: #fff; }

.term-inputline { display: flex; align-items: center; gap: .5rem; padding: .6rem 1rem; border-top: 1px solid var(--line); }
.term-input {
  flex: 1; background: transparent; border: 0; outline: none;
  font-family: var(--ff-mono); font-size: .8rem; color: var(--cyan);
  caret-color: var(--cyan);
}

.caret-blink::after { content: '_'; animation: blink 1s steps(1) infinite; color: var(--cyan); }

/* ---------- 17. Consent banner ------------------------------------------ */
.consent {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-consent);
  padding: 1rem;
  transform: translateY(120%); transition: transform .45s cubic-bezier(.2,.9,.2,1);
}
.consent.is-shown { transform: none; }

/* ---------- 18. Scroll reveal ------------------------------------------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }
.reveal[data-delay="4"] { transition-delay: .32s; }
.reveal[data-delay="5"] { transition-delay: .40s; }

/* ---------- 19. Legal / prose ------------------------------------------- */
.prose { max-width: 78ch; }
.prose h2 { font-size: 1.35rem; text-transform: uppercase; color: var(--cyan); margin: 2.4rem 0 .8rem; letter-spacing: .04em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.02rem; margin: 1.7rem 0 .5rem; color: var(--txt); letter-spacing: .03em; }
.prose p { margin: 0 0 1rem; color: var(--txt-dim); }
.prose ul, .prose ol { margin: 0 0 1.15rem; padding-left: 1.3rem; color: var(--txt-dim); }
.prose li { margin-bottom: .45rem; }
.prose li::marker { color: var(--cyan); }
.prose strong { color: var(--txt); font-weight: 600; }
.prose a { color: var(--cyan); border-bottom: 1px solid rgba(0,240,255,.35); }
.prose a:hover { border-bottom-color: var(--cyan); }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.4rem; font-size: .88rem; }
/* `anywhere` (not break-word) so long <code> keys also shrink min-content
   width — otherwise a token like tg_achievements_v1 widens the whole table
   past a 360px phone viewport. */
.prose th, .prose td {
  border: 1px solid var(--line); padding: .6rem .75rem;
  text-align: left; vertical-align: top; overflow-wrap: anywhere;
}
.prose th { background: rgba(0,240,255,.06); color: var(--cyan); font-family: var(--ff-mono); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 500; }
.prose td { color: var(--txt-dim); }
.prose code { font-family: var(--ff-mono); font-size: .86em; background: rgba(0,240,255,.08); color: var(--cyan); padding: .1rem .35rem; }

.toc-link {
  display: block; padding: .35rem .6rem;
  font-family: var(--ff-mono); font-size: .7rem; letter-spacing: .08em;
  color: var(--txt-dim); border-left: 2px solid var(--line);
  transition: color .2s, border-color .2s, background .2s;
}
.toc-link:hover { color: var(--cyan); border-left-color: var(--cyan); background: rgba(0,240,255,.05); }

/* ---------- 20. Footer --------------------------------------------------- */
.footer-link { color: var(--txt-dim); font-size: var(--fs-sm); transition: color .2s, padding-left .2s; display: inline-block; }
.footer-link:hover { color: var(--cyan); padding-left: 4px; }

/* ---------- 21. Utility -------------------------------------------------- */
.no-scroll { overflow: hidden; }
/* Kept locally so screen-reader-only labels survive a CDN failure. */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.divider-x { height: 1px; background: linear-gradient(90deg, transparent, var(--line) 20%, var(--line) 80%, transparent); }
.hidden-hard { display: none !important; }

/* ==========================================================================
   PHASE 2 — language, audio, richer nav, databank, upgraded console
   ========================================================================== */

/* ---------- 24. Scroll progress ----------------------------------------- */
.scroll-progress {
  position: absolute; left: 0; bottom: -1px; height: 2px; width: 0;
  background: linear-gradient(90deg, var(--cyan-dim), var(--cyan), var(--gold));
  box-shadow: 0 0 10px rgba(0, 240, 255, .8);
  transition: width .12s linear;
  pointer-events: none;
}

/* ---------- 24b. Descent readout ----------------------------------------
   A rail on the left showing how far down the page you are and which section
   you are in: a tick per section at its real position, the diamond riding
   scroll progress, and a readout naming the current section. */
.descent {
  position: fixed; left: 18px; top: 50%; transform: translateY(-50%);
  z-index: 45; display: none; pointer-events: none;
  opacity: 0; transition: opacity .4s;
}
@media (min-width: 1280px) { .descent { display: block; } }
.descent.is-live { opacity: 1; }

.descent-rail {
  position: relative;
  width: 2px; height: 210px;
  background: linear-gradient(to bottom, transparent, var(--line) 12%, var(--line) 88%, transparent);
}
.descent-fill {
  position: absolute; left: 0; top: 0; width: 100%; height: 0;
  background: linear-gradient(to bottom, var(--cyan), var(--gold));
  box-shadow: 0 0 10px rgba(0,240,255,.75);
  transition: height .18s linear;
}
.descent-dot {
  position: absolute; left: 50%; top: 0;
  width: 8px; height: 8px; margin-left: -4px; margin-top: -4px;
  background: var(--cyan); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  box-shadow: 0 0 12px var(--cyan);
  transition: top .18s linear;
}
.descent-label {
  position: absolute; left: 16px; top: 0; transform: translateY(-50%);
  white-space: nowrap;
  font-family: var(--ff-mono); font-size: .58rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--txt-faint);
  transition: top .18s linear, color .3s;
}
.descent-label b { display: block; color: var(--cyan); font-weight: 500; letter-spacing: .12em; }

/* One tick per real section, placed at its true scroll position — so the rail
   is a map of the page rather than an evenly divided guess. */
.descent-tick {
  position: absolute; left: 50%; width: 7px; height: 1px;
  margin-left: -3px; margin-top: -1px;
  background: var(--txt-faint); opacity: .5;
  transition: opacity .3s, background .3s, width .3s;
}
.descent-tick.is-active {
  width: 13px; margin-left: -6px;
  background: var(--cyan); opacity: 1;
  box-shadow: 0 0 8px rgba(0,240,255,.7);
}

/* ---------- 25. Header control cluster ---------------------------------- */
.hdr-btn {
  position: relative;
  width: 38px; height: 38px; flex: none;
  display: grid; place-items: center;
  clip-path: var(--cut-s);
  background: rgba(0, 240, 255, .06);
  border: 1px solid rgba(0, 240, 255, .22);
  color: var(--txt-dim);
  transition: color .2s, background .2s, border-color .2s, transform .18s, box-shadow .2s;
}
.hdr-btn:hover {
  color: var(--cyan); background: rgba(0, 240, 255, .16);
  border-color: rgba(0, 240, 255, .6);
  transform: translateY(-2px);
  box-shadow: 0 0 18px rgba(0, 240, 255, .3);
}
.hdr-btn i, .hdr-btn svg { width: 16px; height: 16px; }

/* Language pill — shows the language you'd switch TO */
.lang-btn {
  display: inline-flex; align-items: center; gap: .4rem;
  height: 38px; padding: 0 .7rem;
  clip-path: var(--cut-s);
  background: rgba(0, 240, 255, .06);
  border: 1px solid rgba(0, 240, 255, .22);
  font-family: var(--ff-mono); font-size: .68rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--txt-dim);
  transition: color .2s, background .2s, border-color .2s, transform .18s;
}
.lang-btn:hover {
  color: var(--cyan); background: rgba(0, 240, 255, .16);
  border-color: rgba(0, 240, 255, .6); transform: translateY(-2px);
}
.lang-btn .lang-code { font-weight: 700; color: var(--cyan); }
.lang-flip { display: inline-block; transition: transform .4s cubic-bezier(.2,.9,.2,1); }
.lang-btn:hover .lang-flip { transform: rotate(180deg); }

/* ---------- 26. Music toggle with live equaliser ------------------------
   Off shows a muted-speaker glyph so the control reads as a control; on
   swaps to bars that actually move. Four dots at rest read as decoration. */
.music-btn .eq { display: none; align-items: flex-end; gap: 2px; height: 15px; }
.music-btn .eq i {
  display: block; width: 2.5px; height: 4px;
  background: currentColor; border-radius: 1px;
  transition: height .25s ease;
}
.music-btn.is-playing .eq { display: flex; }
.music-btn.is-playing .music-off-icon { display: none; }
.music-btn.is-playing { color: var(--cyan); border-color: rgba(0,240,255,.65); background: rgba(0,240,255,.14); }
.music-btn.is-playing .eq i { animation: eq-bounce .9s ease-in-out infinite; }
.music-btn.is-playing .eq i:nth-child(1) { animation-delay: 0s;    }
.music-btn.is-playing .eq i:nth-child(2) { animation-delay: .18s;  }
.music-btn.is-playing .eq i:nth-child(3) { animation-delay: .36s;  }
.music-btn.is-playing .eq i:nth-child(4) { animation-delay: .12s;  }
.music-btn.is-playing::after {
  content: ''; position: absolute; inset: -3px;
  clip-path: var(--cut-s);
  border: 1px solid rgba(0,240,255,.45);
  animation: ring-pulse 2s ease-out infinite;
  pointer-events: none;
}
@keyframes eq-bounce {
  0%, 100% { height: 4px; }
  30%      { height: 15px; }
  60%      { height: 8px; }
}
@keyframes ring-pulse {
  0%   { opacity: .8; transform: scale(1); }
  100% { opacity: 0;  transform: scale(1.35); }
}

/* ---------- 27. Unit codex — selection feedback ------------------------- */
.unit-chip {
  animation: none;
}
.unit-chip.is-active {
  animation: chip-pop .45s cubic-bezier(.2,.9,.2,1);
}
@keyframes chip-pop {
  0%   { transform: scale(.9); }
  55%  { transform: scale(1.06) translateY(-3px); }
  100% { transform: none; }
}
.unit-chip.is-active::before {
  box-shadow: inset 0 0 22px rgba(0, 240, 255, .35);
}

/* Sweep that fires across the portrait when the operator changes */
.portrait-sweep {
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: linear-gradient(100deg, transparent 38%, rgba(0,240,255,.22) 50%, transparent 62%);
  transform: translateX(-120%);
}
.portrait-sweep.is-running { animation: portrait-sweep .75s cubic-bezier(.2,.8,.2,1); }
@keyframes portrait-sweep {
  from { transform: translateX(-120%); }
  to   { transform: translateX(120%); }
}

/* Voice line button */
.voice-btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .4rem .8rem;
  clip-path: var(--cut-s);
  background: rgba(255, 199, 0, .1);
  border: 1px solid rgba(255, 199, 0, .35);
  color: var(--gold);
  font-family: var(--ff-mono); font-size: .64rem; letter-spacing: .14em; text-transform: uppercase;
  transition: background .2s, border-color .2s, transform .15s;
}
.voice-btn:hover { background: rgba(255,199,0,.2); border-color: var(--gold); transform: translateY(-1px); }
.voice-btn i, .voice-btn svg { width: 14px; height: 14px; }
.voice-btn.is-speaking { background: rgba(255,199,0,.24); border-color: var(--gold); }
.voice-btn.is-speaking .voice-wave { display: inline-flex; }
.voice-btn.is-speaking .voice-icon { display: none; }

.voice-wave { display: none; align-items: flex-end; gap: 2px; height: 12px; }
.voice-wave i { display: block; width: 2px; height: 3px; background: currentColor; animation: eq-bounce .7s ease-in-out infinite; }
.voice-wave i:nth-child(2) { animation-delay: .15s; }
.voice-wave i:nth-child(3) { animation-delay: .3s; }

/* Codex arrows */
.codex-nav-btn {
  width: 34px; height: 34px; display: grid; place-items: center;
  clip-path: var(--cut-s);
  border: 1px solid var(--line); color: var(--txt-dim);
  transition: color .2s, border-color .2s, background .2s, transform .15s;
}
.codex-nav-btn:hover { color: var(--cyan); border-color: rgba(0,240,255,.5); background: rgba(0,240,255,.08); }
.codex-nav-btn:active { transform: scale(.94); }

/* ---------- 28. Terminal — quick commands + richer chrome --------------- */
.term-window { height: min(70vh, 540px); }

.term-quick {
  display: flex; flex-wrap: wrap; gap: 5px;
  padding: .55rem .8rem;
  border-top: 1px solid var(--line);
  background: rgba(0, 240, 255, .03);
  max-height: 92px; overflow-y: auto;
}
.term-cmd {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .22rem .55rem;
  font-family: var(--ff-mono); font-size: .66rem; letter-spacing: .04em;
  border: 1px solid rgba(0, 240, 255, .25);
  background: rgba(0, 240, 255, .05);
  color: #8FE4EC;
  clip-path: var(--cut-s);
  transition: background .18s, border-color .18s, color .18s, transform .12s;
  white-space: nowrap;
}
.term-cmd:hover {
  background: rgba(0, 240, 255, .18); border-color: var(--cyan);
  color: #fff; transform: translateY(-1px);
}
.term-cmd i, .term-cmd svg { width: 11px; height: 11px; opacity: .8; }
.term-cmd small { color: var(--txt-faint); font-size: .92em; }

/* Typed-out console lines */
.term-body p { animation: term-line .18s ease-out; }
@keyframes term-line {
  from { opacity: 0; transform: translateX(-5px); }
  to   { opacity: 1; transform: none; }
}
.term-body .t-head {
  color: var(--cyan); border-bottom: 1px solid rgba(0,240,255,.18);
  padding-bottom: .18rem; margin-bottom: .3rem; letter-spacing: .12em;
}
.term-body .t-kv { color: #9FE9F0; }
.term-body .t-kv b { color: #fff; font-weight: 500; }

/* Ambient status strip in the console header */
.term-status { display: flex; align-items: center; gap: .4rem; }
.term-dot { width: 6px; height: 6px; border-radius: 50%; background: #00FF9C; box-shadow: 0 0 7px #00FF9C; animation: blink 2.4s steps(1) infinite; }

/* ---------- 29. Databank (codex.html) ----------------------------------- */
.dbk-shell { display: grid; gap: 1.25rem; }
@media (min-width: 1024px) {
  .dbk-shell { grid-template-columns: minmax(0, 320px) minmax(0, 1fr); align-items: start; }
  .dbk-detail-wrap { position: sticky; top: 96px; }
}

.dbk-list { max-height: 60vh; overflow-y: auto; padding-right: 4px; }
@media (min-width: 1024px) { .dbk-list { max-height: calc(100vh - 260px); } }

.dbk-group-label {
  font-family: var(--ff-mono); font-size: .6rem; letter-spacing: .2em;
  text-transform: uppercase; color: var(--txt-faint);
  padding: .9rem .2rem .4rem;
}

.dbk-entry {
  display: flex; align-items: center; gap: .8rem;
  width: 100%; text-align: left;
  padding: .6rem .75rem;
  border: 1px solid transparent;
  border-left: 2px solid var(--line);
  background: rgba(10, 13, 17, .4);
  transition: border-color .18s, background .18s, transform .15s;
}
.dbk-entry:hover { border-left-color: var(--cyan); background: rgba(0,240,255,.06); transform: translateX(3px); }
.dbk-entry.is-active {
  border-left-color: var(--cyan);
  background: rgba(0, 240, 255, .12);
  border-color: rgba(0, 240, 255, .3);
}
.dbk-entry.is-active .dbk-entry-name { color: var(--cyan); }
.dbk-entry-icon {
  width: 30px; height: 30px; flex: none; display: grid; place-items: center;
  clip-path: var(--cut-s);
  background: rgba(0, 240, 255, .08);
  border: 1px solid rgba(0, 240, 255, .22);
  color: var(--cyan);
}
.dbk-entry-icon i, .dbk-entry-icon svg { width: 15px; height: 15px; }
.dbk-entry-name { font-family: var(--ff-display); font-weight: 600; font-size: .92rem; letter-spacing: .03em; transition: color .18s; }
.dbk-entry-sum { font-size: .72rem; color: var(--txt-faint); line-height: 1.35; }

.dbk-detail { animation: swap-in .4s cubic-bezier(.2,.9,.2,1); }

.dbk-thumb {
  width: 46px; height: 46px; flex: none;
  object-fit: contain; object-position: center;
  filter: drop-shadow(0 0 8px rgba(0,240,255,.25));
}

.dbk-art {
  display: grid; place-items: center; min-height: 240px; position: relative;
  background:
    radial-gradient(ellipse at 50% 78%, rgba(255,0,85,.16), transparent 62%),
    repeating-linear-gradient(0deg, rgba(0,240,255,.04) 0 1px, transparent 1px 22px);
}
.dbk-art img { max-height: 260px; width: auto; filter: drop-shadow(0 12px 26px rgba(0,0,0,.7)); }

.rarity-Common    { color: #93A3B5; }
.rarity-Uncommon  { color: #4DD98B; }
.rarity-Rare      { color: #4DA6FF; }
.rarity-SuperRare { color: #B57BFF; }
.rarity-Epic      { color: var(--gold); }

/* How-to-play numbered steps */
.step-card { position: relative; padding: 1.5rem 1.5rem 1.5rem 4.3rem; }
.step-num {
  position: absolute; left: 1.25rem; top: 1.35rem;
  width: 34px; height: 34px; display: grid; place-items: center;
  clip-path: var(--cut-s);
  background: var(--cyan); color: #04262A;
  font-family: var(--ff-display); font-weight: 700; font-size: 1rem;
}
.step-card::after {
  content: ''; position: absolute; left: 2.2rem; top: 4.1rem; bottom: -1px;
  width: 1px; background: linear-gradient(to bottom, rgba(0,240,255,.45), transparent);
}
.step-card:last-child::after { display: none; }

/* ---------- 30. Extra life: hover tilt, counters, marquee --------------- */
.lift { transition: transform .3s cubic-bezier(.2,.9,.2,1), box-shadow .3s; }
.lift:hover { transform: translateY(-4px); }

.count-up { font-variant-numeric: tabular-nums; }

/* Section headings get a subtle draw-in underline once revealed */
.rule-in {
  position: relative; display: inline-block; padding-bottom: .35rem;
}
.rule-in::after {
  content: ''; position: absolute; left: 0; bottom: 0; height: 2px; width: 0;
  background: linear-gradient(90deg, var(--cyan), transparent);
  transition: width .9s cubic-bezier(.2,.8,.2,1) .15s;
}
.reveal.is-visible .rule-in::after, .rule-in.is-visible::after { width: 100%; }

/* Cards get an edge glow that follows the pointer */
.glow-follow { position: relative; overflow: hidden; }
.glow-follow::after {
  content: ''; position: absolute; z-index: 0; width: 240px; height: 240px;
  left: var(--mx, 50%); top: var(--my, 50%);
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(0,240,255,.13), transparent 65%);
  opacity: 0; transition: opacity .3s;
  pointer-events: none;
}
.glow-follow:hover::after { opacity: 1; }

/* ==========================================================================
   31. Chamfered outlines
   --------------------------------------------------------------------------
   `border` + `clip-path` cannot draw a chamfered outline: the border follows
   the element's rectangle and clip-path then slices the corners off, leaving
   the diagonal edges bare. Instead the element paints the edge colour across
   its whole clipped shape and a ::before inset by 1px paints the fill.

   ::before sits at z-index:-1 inside an isolated stacking context, so it
   covers the element's own background but still paints *under* the label —
   which is why the text does not need wrapping in an extra span.
   ========================================================================== */
.btn-outline, .btn-ghost, .term-fab, .hdr-btn, .lang-btn, .tab-btn,
.voice-btn, .codex-nav-btn, .term-cmd, .rank-badge, .stage-type-badge,
.feature-icon, .dbk-entry-icon, .skill-chip {
  position: relative;
  isolation: isolate;
  border: 0 !important;
  background: var(--edge, transparent);
}
.btn-outline::before, .btn-ghost::before, .term-fab::before, .hdr-btn::before,
.lang-btn::before, .tab-btn::before, .voice-btn::before, .codex-nav-btn::before,
.term-cmd::before, .rank-badge::before, .stage-type-badge::before,
.feature-icon::before, .dbk-entry-icon::before, .skill-chip::before {
  content: '';
  position: absolute; inset: 1px; z-index: -1;
  background: var(--fill, var(--bg));
  clip-path: inherit;
  transition: background .2s ease;
}

.btn-outline { --edge: rgba(0,240,255,.5);  --fill: #0B1B1F; color: var(--cyan); }
.btn-outline:hover { --edge: var(--cyan); --fill: #0F2B31; box-shadow: 0 0 20px rgba(0,240,255,.28); }

.btn-ghost { --edge: var(--line); --fill: var(--bg); color: var(--txt-dim); }
.btn-ghost:hover { --edge: var(--txt-faint); --fill: #171B21; color: var(--txt); }

.term-fab { --edge: rgba(0,240,255,.5); --fill: rgba(18,21,26,.94); }
.term-fab:hover { --edge: var(--cyan); --fill: #0F2B31; }

.hdr-btn, .lang-btn { --edge: rgba(0,240,255,.24); --fill: #0E1318; }
.hdr-btn:hover, .lang-btn:hover { --edge: rgba(0,240,255,.65); --fill: #0F2B31; }
.music-btn.is-playing { --edge: rgba(0,240,255,.7); --fill: #0F2B31; }

.tab-btn { --edge: var(--line); --fill: var(--bg); }
.tab-btn:hover { --edge: var(--txt-faint); --fill: #161B21; }
.tab-btn.is-active { --edge: var(--cyan); --fill: var(--cyan); color: #04262A; }

.voice-btn { --edge: rgba(255,199,0,.42); --fill: #1C1706; }
.voice-btn:hover, .voice-btn.is-speaking { --edge: var(--gold); --fill: #2A2208; }

.codex-nav-btn { --edge: var(--line); --fill: var(--bg); }
.codex-nav-btn:hover { --edge: rgba(0,240,255,.5); --fill: #0F2126; }

.term-cmd { --edge: rgba(0,240,255,.28); --fill: #0B1418; }
.term-cmd:hover { --edge: var(--cyan); --fill: #103038; color: #fff; }

.rank-badge { --edge: rgba(255,199,0,.42); --fill: #1A1505; }
.feature-icon { --edge: rgba(0,240,255,.3); --fill: #0C171B; }
.feature-card:hover .feature-icon { --edge: rgba(0,240,255,.6); --fill: #10262C; }
.dbk-entry-icon { --edge: rgba(0,240,255,.24); --fill: #0C171B; }

.stage-type-badge[data-type="normal"] { --edge: rgba(0,240,255,.38); --fill: #0B1B1F; }
.stage-type-badge[data-type="mini"]   { --edge: rgba(255,199,0,.45); --fill: #1B1706; }
.stage-type-badge[data-type="gate"]   { --edge: rgba(255,0,85,.5);   --fill: #200711; }

.skill-chip { --edge: var(--line); --fill: rgba(10,13,17,.85); }
.skill-chip:hover { --edge: rgba(0,240,255,.5); --fill: #0D1D22; }
.skill-chip.is-active { --edge: var(--cyan); --fill: #0F2429; }

/* Text inputs get the same chamfered outline by a different route.
   The ::before technique above cannot be used here: a replaced form control
   generates no pseudo-element box, so the fill layer never paints and the
   element's own background — the edge colour — shows through the whole field.
   On focus that turned the input solid cyan and swallowed the typed text.

   Four zero-blur drop-shadows do the job instead: `filter` operates on the
   element's rendered alpha, which is already chamfered by clip-path, so the
   offset copies peek out along every edge including the diagonals. The
   background stays the fill colour, so the text stays readable. */
.field {
  --edge: var(--line); --fill: #0A0D11;
  background: var(--fill);
  border: 0;
  filter:
    drop-shadow( 1px 0 0 var(--edge)) drop-shadow(-1px 0 0 var(--edge))
    drop-shadow(0  1px 0 var(--edge)) drop-shadow(0 -1px 0 var(--edge));
  transition: filter .2s ease, background .2s ease;
}
.field:focus {
  --edge: var(--cyan); --fill: #08161A;
  outline: none; box-shadow: none;
  color: var(--txt);
  filter:
    drop-shadow( 1px 0 0 var(--edge)) drop-shadow(-1px 0 0 var(--edge))
    drop-shadow(0  1px 0 var(--edge)) drop-shadow(0 -1px 0 var(--edge))
    drop-shadow(0 0 9px rgba(0,240,255,.42));
}
.field[aria-invalid="true"] { --edge: var(--crimson); }
/* The cyan selection colour is unreadable against the dark field; give inputs
   an inverted pair so a dragged selection stays legible. */
.field::selection { background: var(--cyan); color: #04262A; }

/* ==========================================================================
   32. Motion layer (see js/motion.js)
   ========================================================================== */

/* Staggered entrance. Cards arrive tilted back in Z and slightly blurred, then
   settle — the depth cue reads as panels docking into the HUD rather than text
   fading in. The parent needs the perspective; the child only moves. */
[data-stagger] { perspective: 1200px; }

.stagger-item {
  opacity: 0;
  transform: translateY(34px) translateZ(-70px) rotateX(7deg);
  filter: blur(5px);
  transition:
    opacity   .55s cubic-bezier(.2,.8,.2,1) var(--stagger-delay, 0ms),
    transform .75s cubic-bezier(.16,.9,.24,1) var(--stagger-delay, 0ms),
    filter    .55s ease-out var(--stagger-delay, 0ms);
}
.stagger-item.is-in {
  opacity: 1;
  transform: none;
  filter: blur(0);
}

/* Section headers get the same treatment, coming in from the leading edge. */
.reveal { transform: translateY(26px) scale(.99); filter: blur(3px); }
.reveal.is-visible { transform: none; filter: blur(0); }
.reveal { transition: opacity .7s ease, transform .8s cubic-bezier(.16,.9,.24,1), filter .6s ease; }

/* Tilt cards keep their own transition off while the pointer drives them,
   and ease back on leave. */
[data-tilt] {
  transition: transform .5s cubic-bezier(.2,.9,.2,1), box-shadow .3s;
  transform-style: preserve-3d;
  will-change: transform;
}
[data-tilt]:hover { box-shadow: 0 18px 44px -26px rgba(0,240,255,.5); }

[data-parallax] { will-change: transform; }

.grid-bg { transition: transform .45s cubic-bezier(.2,.9,.2,1); }

/* A hairline that draws itself across a section as it arrives — cheap, but it
   makes scrolling feel like a system booting instead of a page moving. */
.scan-rule {
  position: relative; height: 1px; overflow: hidden;
  background: var(--line);
}
.scan-rule::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  transform: translateX(-100%);
  animation: scan-sweep 3.4s ease-in-out infinite;
}
@keyframes scan-sweep {
  0%   { transform: translateX(-100%); }
  55%  { transform: translateX(100%); }
  100% { transform: translateX(100%); }
}

/* Numbers that tick up land better with a faint glow pulse at the end. */
.count-up { transition: text-shadow .4s; }

/* ---------- 22. Motion / print ------------------------------------------ */
/* Motion is keyed off a class, not the media query directly. js/motion.js
   resolves it: the system preference is the default, an explicit choice is
   remembered, and an inline snippet in <head> stamps the class before first
   paint so there is no flash of animation. Keying straight off the media
   query left visitors whose OS disables animations with a dead page and no
   way to turn it on. */
html.motion-off { scroll-behavior: auto; }
html.motion-off *, html.motion-off *::before, html.motion-off *::after {
  animation-duration: .001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: .001ms !important;
}
html.motion-off .reveal { opacity: 1; transform: none; }
html.motion-off .fx-sweep::after { display: none; }
html.motion-off #space, html.motion-off #cursor { display: none; }

/* ==========================================================================
   33. Ambient space layer + pointer ship (see js/space.js)
   ========================================================================== */
#space {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none;
  /* Painted first in DOM order, so every positioned section still sits above
     it without needing a z-index of its own. */
}
#cursor {
  position: fixed; inset: 0; z-index: 9998;
  pointer-events: none;
}
/* The ship replaces the arrow, but text fields keep a real caret cursor —
   losing the I-beam in a form is a usability cost the decoration has not
   earned. */
html.ship-cursor, html.ship-cursor a, html.ship-cursor button { cursor: none; }
html.ship-cursor input, html.ship-cursor textarea, html.ship-cursor select { cursor: auto; }

.fx-btn { display: inline-flex; align-items: center; gap: .45rem; }

@media print {
  .fx-layer, .site-header, .term-fab, .term-window, .consent, .modal { display: none !important; }
  body { background: #fff; color: #000; }
  .prose p, .prose li, .prose td { color: #222; }
  .hud { background: none; }
  .hud::before { background: none; border: 1px solid #999; -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* ---------- 23. Responsive ----------------------------------------------- */
@media (max-width: 1024px) {
  .unit-portrait { min-height: 300px; }
  .unit-portrait img { max-height: 340px; }
}

@media (max-width: 640px) {
  :root { --cut: polygon(11px 0, 100% 0, 100% calc(100% - 11px), calc(100% - 11px) 100%, 0 100%, 0 11px); }
  body { font-size: 15px; }
  .term-window { right: 10px; left: 10px; width: auto; bottom: 82px; height: min(64vh, 420px); }
  .term-fab { right: 14px; bottom: 14px; width: 50px; height: 50px; }
  .stat-line { grid-template-columns: 76px 1fr 52px; gap: .5rem; }
  .hero-planet { opacity: .3; right: -30%; }
  .fx-scanlines { opacity: .35; }
  .prose table { font-size: .78rem; }
  .prose th, .prose td { padding: .45rem .5rem; }
}

/* ==========================================================================
   34. Anomaly decode puzzle (see js/anomaly.js)
   --------------------------------------------------------------------------
   Ported from the game's Simon puzzle. The rift drifts over the page like it
   drifts over the battlefield, and the board is the same ring of numbered
   nodes with a charge hub in the middle.
   ========================================================================== */
#anomaly-field {
  position: fixed; inset: 0; z-index: 60;
  pointer-events: none;              /* only the rift itself is clickable */
}

.anomaly-rift {
  position: absolute; width: 84px; height: 84px;
  display: grid; place-items: center;
  border: 0; padding: 0;
  pointer-events: auto; cursor: pointer;
  animation: rift-in .55s cubic-bezier(.2,.9,.3,1.3) both;
  transition: opacity .35s, transform .35s;
  /* A pocket of shadow behind the disk so the rift reads against whatever it
     lands on. Without it the glow competes with the headline and loses. */
  background: radial-gradient(circle at 50% 50%,
              rgba(4,7,10,.92) 0 34%, rgba(4,7,10,.55) 58%, transparent 76%);
}
/* Scrolled past the hero: gone, not floating over the rest of the page. */
.anomaly-rift.is-away {
  opacity: 0; transform: scale(.6); pointer-events: none;
}
@keyframes rift-in { from { transform: scale(.2); opacity: 0 } to { transform: scale(1); opacity: 1 } }

.anomaly-rift__disk {
  position: absolute; inset: 16px; border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #fff 0 6%, var(--rift) 18%, transparent 62%),
    conic-gradient(from 0deg, transparent, var(--rift), transparent 62%);
  filter: blur(.4px);
  animation: rift-spin 3.6s linear infinite;
  box-shadow: 0 0 26px var(--rift), 0 0 60px color-mix(in srgb, var(--rift) 45%, transparent);
}
@keyframes rift-spin { to { transform: rotate(360deg) } }

.anomaly-rift__ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--rift) 60%, transparent);
  animation: rift-pulse 2.1s ease-out infinite;
}
@keyframes rift-pulse {
  0%   { transform: scale(.72); opacity: .9 }
  100% { transform: scale(1.25); opacity: 0 }
}

.anomaly-rift__tag {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  margin-top: 2px; white-space: nowrap;
  font-family: var(--ff-mono); font-size: .54rem; letter-spacing: .2em;
  color: var(--rift);
  text-shadow: 0 0 10px var(--rift), 0 1px 3px #000, 0 0 6px #000;
}
/* Running out of time reads as urgency, not decoration. */
.anomaly-rift.is-urgent .anomaly-rift__disk { animation-duration: 1.1s; }
.anomaly-rift.is-urgent { animation: rift-panic .5s ease-in-out infinite alternate; }
@keyframes rift-panic { from { transform: scale(1) } to { transform: scale(1.09) } }

/* ---------- board ---------- */
.an-stage {
  position: relative; aspect-ratio: 1;
  margin: 0 auto; width: min(100%, 400px);
}
.an-board { position: absolute; inset: 0; }

.an-node {
  position: absolute; transform: translate(-50%, -50%);
  /* Sized against the stage rather than fixed, so the ring of six on the
     hardest tier stays finger-sized on a phone and generous on a desktop. */
  width: clamp(64px, 21%, 92px); aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center;
  background: #0B0F14; border: 2px solid color-mix(in srgb, var(--n) 45%, transparent);
  color: color-mix(in srgb, var(--n) 85%, #fff);
  cursor: pointer; transition: transform .12s, box-shadow .2s, background .2s;
}
.an-glyph { width: 46%; height: 46%; display: block; }
/* The digit is the keyboard shortcut, not the node's name — the shape is. */
.an-key {
  position: absolute; bottom: 11%; left: 0; right: 0;
  text-align: center; font-family: var(--ff-mono);
  font-size: .58rem; color: rgba(255,255,255,.5); pointer-events: none;
}
.an-node:hover { transform: translate(-50%, -50%) scale(1.06); box-shadow: 0 0 18px color-mix(in srgb, var(--n) 50%, transparent); }
.an-node:active { transform: translate(-50%, -50%) scale(.96); }
.an-node.is-flash, .an-node.is-good {
  background: var(--n); color: #04121A; border-color: var(--n);
  box-shadow: 0 0 30px var(--n), 0 0 70px color-mix(in srgb, var(--n) 55%, transparent);
}
.an-node.is-bad {
  background: var(--crimson); border-color: var(--crimson); color: #fff;
  box-shadow: 0 0 30px var(--crimson);
  animation: an-shake .3s ease-in-out;
}
@keyframes an-shake {
  0%,100% { transform: translate(-50%,-50%) }
  25%     { transform: translate(calc(-50% - 6px),-50%) }
  75%     { transform: translate(calc(-50% + 6px),-50%) }
}

.an-overlay {
  position: absolute; inset: 0; display: grid; place-items: center;
  /* Scales with the stage and wraps: a fixed 2.6rem fits "GO!" and runs off
     the board on "BAŞTAN BAŞLA". */
  padding: 0 6%;
  font-family: var(--ff-display); font-size: clamp(1.3rem, 7.5cqw, 2.4rem);
  font-weight: 700; line-height: 1.05; text-align: center; text-wrap: balance;
  letter-spacing: .06em; color: var(--cyan); text-shadow: 0 0 24px var(--cyan);
  opacity: 0; pointer-events: none; transition: opacity .18s;
}
.an-stage { container-type: inline-size; }
.an-overlay.is-on { opacity: 1; animation: an-pop .35s cubic-bezier(.2,.9,.3,1.4); }
.an-overlay.is-bad  { color: var(--crimson); text-shadow: 0 0 24px var(--crimson); }
.an-overlay.is-good { color: #33FF8C; text-shadow: 0 0 24px #33FF8C; }
@keyframes an-pop { from { transform: scale(.6) } to { transform: scale(1) } }

/* ---------- readouts ---------- */
.an-track { height: 3px; background: var(--line); overflow: hidden; }
.an-bar { display: block; height: 100%; width: 100%; background: var(--cyan); transition: width 1s linear; }
.an-bar.is-low { background: var(--crimson); }
#an-time.is-low { color: var(--crimson); }

.an-life { width: 9px; height: 9px; background: var(--line); clip-path: polygon(50% 0,100% 50%,50% 100%,0 50%); }
.an-life.is-on { background: var(--crimson); box-shadow: 0 0 8px var(--crimson); }

.an-pip { width: 20px; height: 3px; background: var(--line); transition: background .2s; }
.an-pip.is-on.is-gold { background: var(--gold); box-shadow: 0 0 8px var(--gold); }
.an-pip.is-on.is-cyan { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }

.an-result { margin-top: 1rem; padding: .85rem 1rem; border-left: 2px solid; }
.an-result.is-win  { border-color: var(--gold);    background: rgba(255,199,0,.07); }
.an-result.is-lose { border-color: var(--crimson); background: rgba(255,0,85,.07); }

/* Under motion-off the puzzle stays fully playable — only the flourishes go. */
html.motion-off .anomaly-rift { animation: none; }
html.motion-off .an-overlay.is-on { animation: none; }

.an-cta-mark {
  flex: none; width: 54px; height: 54px; display: grid; place-items: center;
  clip-path: var(--cut-s);
  background: rgba(255,199,0,.1); color: var(--gold);
  border: 1px solid rgba(255,199,0,.35);
}

/* Sequence playback / results: the board is not accepting input, and says so. */
.an-board.is-locked .an-node { cursor: default; opacity: .82; }
.an-board.is-locked .an-node:hover { transform: translate(-50%, -50%); box-shadow: none; }

/* ==========================================================================
   35. Tipografik rotus
   --------------------------------------------------------------------------
   Bu bolumdeki her kural bir OLCUMDEN cikti; hicbiri "daha guzel olsun" diye
   eklenmedi. Olculen sorunlar ve karsiliklari asagida tek tek yaziyor.
   ========================================================================== */

/* 4 — SATIR UZUNLUGU. Govde metni 1440px'de 62ch'i asan satirlar uretiyordu.
   Goz, satir sonundan bir sonraki satirin basina donerken 65-75 karakterden
   sonra hedefi kaybeder; bu okuma hatasi olarak degil, "yorucu" olarak
   hissedilir. Baslik ve mono metinler HARIC — onlar zaten kisa. */
.prose p, .prose li { max-width: 68ch; }

/* 5 — SAYI HIZASI. Simulator kartlarindaki degerler (117M / 3.95 / 64.0)
   kaydirici surtuldukce her karede farkli genislikte ciziliyor ve rakamlar
   yatay olarak titriyordu: 1 ile 8 ayni genislikte degil. tabular-nums
   rakamlari esit genislige sabitler, titreme durur. */
.stat-value, .sim-out, [data-count], .out-value,
#out-power, #out-yield, #out-boss, #an-time {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* 6 — BASLIK KIRIMI. Iki satirlik basliklarda ikinci satira tek kelime
   dusuyordu ("...DEVAM / ETTI."). text-wrap: balance satirlari esit uzunluga
   yakin boler; oksuz kelime kalmaz. Yalnizca basliklarda kullaniliyor —
   govde metninde tarayici maliyeti bosuna. */
h1, h2, h3, .section-title, .display { text-wrap: balance; }

/* Basliklarin optik hizasi: buyuk puntoda harf yan bosluklari govde metnine
   gore genis durur ve baslik saga kaymis gibi gorunur. Negatif tracking bunu
   toplar — punto buyudukce ihtiyac artar, o yuzden clamp ile olceklenir. */
.display, .section-title { letter-spacing: clamp(-0.02em, -0.15vw, 0em); }

/* 8 — MONO ETIKETLER. Kucuk punto + genis harf araligi bu arayuzun imzasi,
   ama olculdugunde .1em ile .3em arasinda ALTI farkli deger vardi. Iki durak
   yeter: etiket ve rozet. */
.tk, .tk-sm, .section-eyebrow, .mono { letter-spacing: .18em; }
.rank-badge, .stage-type-badge, .gal-meta .tk-sm { letter-spacing: .12em; }

/* 9 — GOVDE ICINDEKI BAGLANTILAR. Yasal sayfalarda ve onay metinlerinde
   linkler yalnizca RENKLE ayriliyordu. Renk korligu olan bir okuyucu icin bu
   ayrim yok demektir; ustelik cyan zaten sayfanin her yerinde vurgu rengi.
   Alt cizgi, rengi tasimayan tek isarettir. Gezinme ve dugmeler haric. */
.prose a:not(.btn), .legal-body a:not(.btn), #register-terms-label a,
#consent-body a {
  text-decoration: underline;
  text-decoration-color: rgba(0, 240, 255, .45);
  text-underline-offset: .18em;
  text-decoration-thickness: 1px;
  transition: text-decoration-color .2s;
}
.prose a:not(.btn):hover, .legal-body a:not(.btn):hover,
#register-terms-label a:hover, #consent-body a:hover {
  text-decoration-color: var(--cyan);
}

/* 7 — KART ETKILESIMI. Kartlar uc ayri sekilde tepki veriyordu: bazilari
   yalniz kenar rengini, bazilari golgeyi, bazilari hicbir seyi degistiriyordu.
   Tek dil: hafifce yukselir ve kenari canlanir. `transform` yalnizca tilt
   verilmemis kartlara uygulanir, yoksa pointer egimiyle catisir. */
.feature-card:not([data-tilt]):hover,
.dbk-entry:not([data-tilt]):hover {
  transform: translateY(-3px);
}
.feature-card, .dbk-entry {
  transition: transform .22s cubic-bezier(.2,.7,.3,1), box-shadow .22s ease;
}

/* Olcek yardimci siniflari. Tailwind CDN'i `text-[var(--fs-3xs)]` gibi
   DEGISKEN iceren keyfi bir degeri URETEMIYOR — o sinif hic olusmuyor ve
   ogeler miras alinan 16px'e dusuyor. Olculdu: topoloji notu 16px cizildi,
   yani degistirmeden onceki .68rem'den BUYUK. Gercek sinif yazmak tek
   guvenilir yol. */
.fs-3xs { font-size: var(--fs-3xs); }
.fs-2xs { font-size: var(--fs-2xs); }
.fs-xs  { font-size: var(--fs-xs); }
.fs-sm  { font-size: var(--fs-sm); }
.fs-md  { font-size: var(--fs-md); }
.fs-lg  { font-size: var(--fs-lg); }
.fs-xl  { font-size: var(--fs-xl); }

/* ==========================================================================
   36. Databank entry + live status
   ========================================================================== */
.dbk-pill {
  display: inline-block; padding: .28rem .6rem;
  font-family: var(--ff-mono); font-size: var(--fs-3xs); letter-spacing: .14em;
  text-transform: uppercase; color: var(--txt-dim);
  background: rgba(0,240,255,.07);
  border: 1px solid rgba(0,240,255,.18);
  clip-path: var(--cut-s);
}
a:hover > * .dbk-pill, a:hover .dbk-pill {
  color: var(--cyan); border-color: rgba(0,240,255,.45);
}

.status-row {
  display: flex; align-items: flex-start; gap: .8rem;
  padding: .7rem 0;
  border-bottom: 1px solid var(--line);
}
.status-row:last-of-type { border-bottom: 0; }

.status-dot {
  width: 9px; height: 9px; margin-top: .35rem; flex: none;
  border-radius: 50%;
  background: var(--txt-faint);
  box-shadow: 0 0 0 0 rgba(0,240,255,.5);
}
/* Three states, three readings — colour alone is not the signal: the pulsing
   ring carries "live" for anyone who cannot separate the hues. */
.status-dot[data-state="up"]   { background: #33FF8C; box-shadow: 0 0 10px #33FF8C; }
.status-dot[data-state="down"] { background: var(--crimson); box-shadow: 0 0 10px var(--crimson); }
.status-dot[data-state="build"]{ background: var(--gold); box-shadow: 0 0 10px var(--gold); }
.status-dot[data-state="checking"] { background: var(--txt-faint); animation: st-pulse 1.1s ease-in-out infinite; }
@keyframes st-pulse { 0%,100% { opacity: .35 } 50% { opacity: 1 } }

.status-dot[data-state="up"]::after {
  content: ''; position: absolute; width: 9px; height: 9px; border-radius: 50%;
  border: 1px solid #33FF8C; animation: st-ring 2s ease-out infinite;
}
.status-row { position: relative; }
@keyframes st-ring {
  0%   { transform: scale(1);   opacity: .8 }
  100% { transform: scale(2.6); opacity: 0 }
}

/* ==========================================================================
   37. News + roadmap
   ========================================================================== */
.news-item { transition: transform .2s cubic-bezier(.2,.7,.3,1); }
.news-item:hover { transform: translateY(-2px); }

.news-tag {
  display: inline-block; padding: .22rem .55rem;
  font-family: var(--ff-mono); font-size: var(--fs-3xs);
  letter-spacing: .16em; text-transform: uppercase;
  clip-path: var(--cut-s);
  border: 1px solid currentColor;
}
/* Four kinds of dispatch, four readings. The label carries the meaning in
   words as well as colour — "update" and "fix" are not distinguishable by hue
   alone for a red-green colourblind reader. */
.news-tag[data-tag="update"] { color: var(--cyan);    background: rgba(0,240,255,.08); }
.news-tag[data-tag="fix"]    { color: #33FF8C;        background: rgba(51,255,140,.08); }
.news-tag[data-tag="event"]  { color: var(--gold);    background: rgba(255,199,0,.08); }
.news-tag[data-tag="note"]   { color: var(--txt-dim); background: rgba(138,151,168,.08); }

.roadmap { list-style: none; margin: 0; padding: 0; }
.roadmap-item {
  display: grid; grid-template-columns: auto 1fr; gap: .9rem;
  padding: .85rem 0; border-bottom: 1px solid var(--line);
}
.roadmap-item:last-child { border-bottom: 0; }

.roadmap-mark {
  width: 10px; height: 10px; margin-top: .35rem;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  background: var(--line);
}
.roadmap-item[data-state="done"]    .roadmap-mark { background: #33FF8C; box-shadow: 0 0 8px #33FF8C; }
.roadmap-item[data-state="active"]  .roadmap-mark { background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.roadmap-item[data-state="planned"] .roadmap-mark { background: var(--txt-faint); }

.roadmap-state {
  display: inline-block; margin-top: .4rem;
  font-family: var(--ff-mono); font-size: var(--fs-3xs);
  letter-spacing: .16em; text-transform: uppercase; color: var(--txt-faint);
}
.roadmap-item[data-state="done"]   .roadmap-state { color: #33FF8C; }
.roadmap-item[data-state="active"] .roadmap-state { color: var(--cyan); }

/* ---------- 38. Contact ------------------------------------------------- */
.ct-mark {
  width: 46px; height: 46px; display: grid; place-items: center;
  clip-path: var(--cut-s); border: 1px solid;
}
.ct-mark[data-kind="bug"]     { color: var(--crimson); background: rgba(255,0,85,.09);  border-color: rgba(255,0,85,.35); }
.ct-mark[data-kind="idea"]    { color: var(--gold);    background: rgba(255,199,0,.09); border-color: rgba(255,199,0,.35); }
.ct-mark[data-kind="account"] { color: var(--cyan);    background: rgba(0,240,255,.09); border-color: rgba(0,240,255,.35); }
.ct-mark[data-kind="press"]   { color: #33FF8C;        background: rgba(51,255,140,.09);border-color: rgba(51,255,140,.35); }

.ct-pre {
  background: #0A0D11; border-left: 2px solid rgba(0,240,255,.4);
  padding: 1rem 1.1rem; margin: 0;
  font-size: var(--fs-3xs); line-height: 1.7; color: var(--txt-dim);
  white-space: pre-wrap; word-break: break-word;
  max-height: 340px; overflow-y: auto;
}

/* ---------- 39. Feedback form ------------------------------------------- */
.fb-kind {
  padding: .45rem .9rem;
  font-family: var(--ff-mono); font-size: var(--fs-3xs);
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--txt-dim); background: #0E1318;
  border: 1px solid var(--line);
  clip-path: var(--cut-s); cursor: pointer;
  transition: color .2s, border-color .2s, background .2s;
}
.fb-kind:hover { color: var(--txt); border-color: var(--txt-faint); }
.fb-kind.is-active {
  color: var(--cyan); border-color: rgba(0,240,255,.55);
  background: rgba(0,240,255,.09);
}

/* A textarea needs the same chamfer treatment as .field, but .field sets a
   single-line padding — the rows attribute would otherwise be squashed. */
textarea.field { min-height: 8rem; line-height: 1.6; resize: vertical; }

/* ---------- 40. Survey --------------------------------------------------- */
.sv-progress { height: 3px; background: var(--line); overflow: hidden; }
.sv-progress-fill {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--cyan), var(--gold));
  box-shadow: 0 0 10px rgba(0,240,255,.6);
  transition: width .3s cubic-bezier(.2,.7,.3,1);
}

.sv-q { border: 0; padding: 0; margin: 0; }
.sv-q-title {
  display: flex; align-items: baseline; gap: .7rem;
  font-family: var(--ff-display); font-size: var(--fs-lg);
  margin-bottom: .9rem; padding: 0;
}
.sv-q-num {
  font-family: var(--ff-mono); font-size: var(--fs-3xs);
  letter-spacing: .18em; color: var(--cyan); flex: none;
}

.sv-opts { display: flex; flex-wrap: wrap; gap: .6rem; }
.sv-opt {
  padding: .6rem 1rem;
  font-size: var(--fs-sm); color: var(--txt-dim);
  background: #0E1318; border: 1px solid var(--line);
  clip-path: var(--cut-s); cursor: pointer; text-align: left;
  transition: color .18s, border-color .18s, background .18s, transform .12s;
}
.sv-opt:hover { color: var(--txt); border-color: var(--txt-faint); }
.sv-opt:active { transform: scale(.97); }
.sv-opt.is-on {
  color: var(--cyan); border-color: rgba(0,240,255,.6);
  background: rgba(0,240,255,.10);
  box-shadow: 0 0 18px rgba(0,240,255,.14);
}

/* ---------- 40. Release countdown --------------------------------------- */
/* The loudest number on the page, so it gets the gold accent the wishlist
   CTA uses rather than the cyan everything else uses — it reads as "act on
   this", not "more chrome". Rendered by js/page-index.js. */
.release-cd {
  max-width: 34rem;
  padding: 1.1rem 1.3rem;
  background: rgba(255, 199, 0, .06);
  border: 1px solid rgba(255, 199, 0, .28);
  border-left: 3px solid var(--gold);
  clip-path: var(--cut-s);
}

.release-cd__head { display: flex; align-items: center; gap: .7rem; margin-bottom: .35rem; }
.release-cd__label { text-transform: uppercase; }

/* The unit sits on the number's own baseline, nudged up so it reads as a
   label ON the number rather than hanging below it: pure `baseline` on a
   67px figure drops 11px text to the very bottom of the glyph, which looked
   like a rendering slip. Measured in Chrome at 1400px and 390px. */
.release-cd__row { display: flex; align-items: baseline; gap: .55rem; }

.release-cd__num {
  font-size: clamp(2.6rem, 7vw, 4.2rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.release-cd__unit {
  text-transform: uppercase; letter-spacing: .14em;
  position: relative; top: -.15em;
}

.release-cd__state {
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  line-height: 1.1; text-transform: uppercase;
}

.release-cd__note { margin-top: .6rem; max-width: 30rem; line-height: 1.55; }

/* ---------- 41. Social links -------------------------------------------- */
.social-row { display: flex; flex-wrap: wrap; gap: .6rem; }
.social-link {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .5rem .85rem;
  font-family: var(--ff-mono); font-size: var(--fs-3xs);
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--txt-dim);
  background: #0E1318; border: 1px solid var(--line);
  clip-path: var(--cut-s);
  transition: color .18s, border-color .18s, background .18s;
}
.social-link:hover {
  color: var(--cyan); border-color: rgba(0,240,255,.55);
  background: rgba(0,240,255,.08);
}
.social-link svg { width: 15px; height: 15px; flex: none; }

/* Brand names are written the way their owners write them and are NOT
   uppercased. Under <html lang="tr"> the Turkish locale maps i -> I-dot, so
   text-transform:uppercase turned "TikTok" into "TIKTOK" with a dotted I --
   a misspelling of someone else's brand. Measured in Chrome, not theoretical. */
.social-link .brand-name { text-transform: none; letter-spacing: .08em; }

/* ---------- 42. Account page -------------------------------------------- */
/* Label/value rows. Two columns from `sm` up so the values line up as a
   scannable block; stacked on a phone, where a 2-column grid would squeeze
   an email address into three wrapped lines. */
.acc-fields { display: grid; grid-template-columns: 1fr; gap: .35rem 1.25rem; }
.acc-fields dt {
  font-family: var(--ff-mono); font-size: var(--fs-3xs);
  letter-spacing: .16em; text-transform: uppercase; color: var(--txt-faint);
}
.acc-fields dd { color: var(--txt); margin: 0 0 .7rem; overflow-wrap: anywhere; }
@media (min-width: 640px) {
  .acc-fields { grid-template-columns: minmax(9rem, max-content) 1fr; align-items: baseline; }
  .acc-fields dt { padding-top: .15rem; }
  .acc-fields dd { margin-bottom: .35rem; }
}

/* ---------- 43. Launch list form ---------------------------------------- */
/* Sits under the countdown and shares its gold accent: same message ("it's
   coming"), same visual family. Stacks on phones so the input keeps a usable
   width instead of squeezing next to the button. */
.interest-form { max-width: 34rem; }
.interest-row { display: flex; gap: .6rem; flex-wrap: wrap; }
.interest-row .field { flex: 1 1 14rem; min-width: 0; }
.interest-row .btn { flex: 0 0 auto; }
.interest-consent {
  display: flex; gap: .6rem; align-items: flex-start;
  margin-top: .75rem; font-size: var(--fs-sm); line-height: 1.5; color: var(--txt-dim);
  cursor: pointer;
}
.interest-consent input { margin-top: .2rem; flex: none; accent-color: var(--gold); width: 1rem; height: 1rem; }
.interest-consent a { color: var(--gold); text-decoration: underline; }
