/* ═══════════════════════════════════════════════════════════════
   AKASH — a game about the space between
   Hand-built CSS. No frameworks.
   ═══════════════════════════════════════════════════════════════ */

:root {
  --font-display: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --font-sans: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --bg0: #05060f;
  --bg1: #0a0b1a;
  --ink: #f6efe4;
  --ink-2: #c3bdd2;
  --dim: #8a849e;
  --faint: #5b5772;

  --gold: #f4c879;
  --gold-2: #ffe3ad;
  --teal: #63e6d5;
  --violet: #9b8cff;
  --rose: #ff7ea8;

  --line: rgba(246, 239, 228, 0.11);
  --line-2: rgba(246, 239, 228, 0.2);
  --glass: rgba(10, 12, 26, 0.58);
  --glass-2: rgba(16, 18, 38, 0.78);
  --panel: rgba(12, 14, 30, 0.62);

  --stage-ink: #f6efe4;
  --stage-dim: #a59fba;

  --r-sm: 10px;
  --r-md: 18px;
  --r-lg: 28px;

  --shadow: 0 30px 90px -30px rgba(0, 0, 0, 0.85);
  --glow-gold: 0 0 40px rgba(244, 200, 121, 0.18);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --nav-h: 72px;

  color-scheme: dark;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 18px);
  background: var(--bg0);
  transition: background 0.9s var(--ease);
}

body {
  margin: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: color 0.9s var(--ease), background 0.9s var(--ease);
}

body.locked { overflow: hidden; }

::selection { background: rgba(244, 200, 121, 0.28); color: var(--ink); }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(244, 200, 121, 0.2);
  border-radius: 99px;
  border: 3px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(244, 200, 121, 0.4); background-clip: content-box; }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img, svg, canvas { display: block; }
h1, h2, h3, p { margin: 0; }
svg { fill: currentColor; }

:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 4px;
  border-radius: 4px;
}

.skip {
  position: fixed; left: 12px; top: -60px; z-index: 200;
  background: var(--gold); color: #1a1305; padding: 10px 16px;
  border-radius: 8px; font-size: 13px; transition: top 0.2s;
}
.skip:focus { top: 12px; }

/* ─── background layers ─────────────────────────────────────── */
#bg {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: -3; pointer-events: none;
  opacity: 0; transition: opacity 1.6s ease;
  animation: skyBreathe 34s ease-in-out infinite alternate;
  will-change: transform;
}
body.ready #bg { opacity: 1; }
@keyframes skyBreathe {
  0% { transform: scale(1.015) translate3d(-0.6%, -0.4%, 0); }
  100% { transform: scale(1.045) translate3d(0.7%, 0.6%, 0); }
}

.grain {
  position: fixed; inset: -50%;
  z-index: 60; pointer-events: none;
  opacity: 0.032;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grainShift 8s steps(6) infinite;
  mix-blend-mode: overlay;
}
@keyframes grainShift {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-2%, 1%); }
  40% { transform: translate(1%, -2%); }
  60% { transform: translate(-1%, 2%); }
  80% { transform: translate(2%, 1%); }
  100% { transform: translate(0, 0); }
}

.vignette {
  position: fixed; inset: 0; z-index: 55; pointer-events: none;
  background: radial-gradient(120% 100% at 50% 45%, transparent 42%, rgba(0, 0, 0, 0.52) 100%);
  transition: opacity 0.9s;
}

/* ─── custom cursor — a small black hole ────────────────────── */
#bg-fallback {
  position: fixed; inset: 0; z-index: -4; pointer-events: none;
  background:
    radial-gradient(58% 52% at 20% 26%, rgba(70, 45, 150, 0.52), transparent 70%),
    radial-gradient(50% 46% at 80% 30%, rgba(18, 95, 125, 0.44), transparent 72%),
    radial-gradient(48% 44% at 68% 80%, rgba(122, 38, 92, 0.34), transparent 72%),
    radial-gradient(44% 40% at 14% 86%, rgba(92, 82, 190, 0.30), transparent 74%),
    radial-gradient(88% 78% at 50% 45%, transparent 30%, #05060f 78%),
    #05060f;
}
#bg-fallback::before {
  content: ""; position: absolute; inset: -18%;
  background:
    radial-gradient(44% 40% at 30% 40%, rgba(99, 140, 255, 0.16), transparent 70%),
    radial-gradient(38% 36% at 72% 58%, rgba(255, 140, 80, 0.10), transparent 70%),
    radial-gradient(34% 30% at 52% 18%, rgba(120, 80, 220, 0.14), transparent 72%);
  filter: blur(52px);
  animation: nebulaBreath 28s ease-in-out infinite alternate;
}
@keyframes nebulaBreath {
  from { transform: scale(1) translate3d(-1%, -1%, 0); opacity: 0.8; }
  to { transform: scale(1.09) translate3d(1.6%, 1.2%, 0); opacity: 1; }
}

#cursor-fx {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 400; pointer-events: none; opacity: 0;
  transition: opacity 0.4s ease;
}
body.cursor-live #cursor-fx { opacity: 1; }

@media (pointer: fine) {
  body.custom-cursor, body.custom-cursor * { cursor: none !important; }
  .cursor {
    position: fixed; left: 0; top: 0; width: 34px; height: 34px;
    margin: -17px 0 0 -17px; border-radius: 50%;
    pointer-events: none; z-index: 401; opacity: 0;
    background: radial-gradient(circle at 50% 50%,
      #04050c 0 30%,
      rgba(4, 5, 12, 0.96) 34%,
      rgba(255, 166, 76, 0.88) 43%,
      rgba(255, 120, 40, 0.30) 53%,
      rgba(255, 120, 40, 0) 70%);
    box-shadow:
      0 0 18px rgba(255, 150, 60, 0.30),
      0 0 52px rgba(244, 200, 121, 0.16);
    transition: width 0.3s var(--ease), height 0.3s var(--ease), margin 0.3s var(--ease), opacity 0.25s, box-shadow 0.3s;
  }
  .cursor::before {
    content: ""; position: absolute; inset: -6px; border-radius: 50%;
    border: 1px solid rgba(255, 194, 118, 0.42);
    box-shadow: inset 0 0 11px rgba(255, 150, 60, 0.16), 0 0 16px rgba(255, 150, 60, 0.22);
    animation: ringPulse 3.4s ease-in-out infinite;
  }
  .cursor::after {
    content: ""; position: absolute; left: 50%; top: 50%; width: 2px; height: 2px;
    margin: -1px; border-radius: 50%; background: #fff3dc;
    box-shadow: 0 0 6px #ffd9a0, 0 0 15px rgba(255, 190, 110, 0.9);
  }
  .cursor.on { opacity: 1; }
  .cursor.hot {
    width: 48px; height: 48px; margin: -24px 0 0 -24px;
    box-shadow: 0 0 28px rgba(255, 165, 70, 0.42), 0 0 74px rgba(244, 200, 121, 0.20);
  }
  .cursor.hot::before { inset: -9px; border-color: rgba(255, 208, 138, 0.58); }
  .cursor.hot::after { width: 3px; height: 3px; margin: -1.5px; }
  .cursor.press { width: 24px; height: 24px; margin: -12px 0 0 -12px; }
  @keyframes ringPulse {
    0%, 100% { transform: scale(1); opacity: 0.78; }
    50% { transform: scale(1.12); opacity: 1; }
  }
}
@media (pointer: coarse) { .cursor, #cursor-fx { display: none; } }
/* sliders and form controls keep a familiar pointer */
body.cursor-native, body.cursor-native * { cursor: auto !important; }
body.cursor-native #cursor, body.cursor-native #cursor-fx { opacity: 0 !important; transition: none; }
@media (prefers-reduced-motion: reduce) {
  .cursor::before { animation: none; }
  #bg-fallback::before { animation: none; }
}

/* ─── navigation ────────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  transition: background 0.4s, border-color 0.4s, backdrop-filter 0.4s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: color-mix(in srgb, var(--bg0) 62%, transparent);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border-bottom-color: var(--line);
}
.nav-inner {
  max-width: 1240px; margin: 0 auto; height: 100%;
  padding: 0 clamp(16px, 4vw, 40px);
  display: flex; align-items: center; gap: 24px;
}

.brand { display: flex; align-items: baseline; gap: 10px; flex: none; }
.brand-star {
  width: 18px; height: 18px; align-self: center; color: var(--gold);
  filter: drop-shadow(0 0 8px rgba(244, 200, 121, 0.7));
  animation: spinSlow 22s linear infinite;
  transition: transform 0.4s var(--ease);
}
.brand-star svg { width: 100%; height: 100%; }
.brand:hover .brand-star { transform: scale(1.25) rotate(90deg); }
.brand-word {
  font-family: var(--font-display); font-size: 22px; font-weight: 600;
  letter-spacing: 0.28em; padding-left: 2px;
}
.brand-dev {
  font-size: 12px; color: var(--dim); letter-spacing: 0.1em;
  font-family: var(--font-sans);
}
@keyframes spinSlow { to { transform: rotate(360deg); } }

.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a {
  position: relative; padding: 9px 13px; font-size: 13px;
  letter-spacing: 0.04em; color: var(--ink-2); border-radius: 99px;
  transition: color 0.3s, background 0.3s;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a::after {
  content: ""; position: absolute; left: 50%; bottom: 4px;
  width: 4px; height: 4px; border-radius: 50%; background: var(--gold);
  transform: translateX(-50%) scale(0); transition: transform 0.3s var(--ease);
  box-shadow: 0 0 10px var(--gold);
}
.nav-links a.active { color: var(--ink); }
.nav-links a.active::after { transform: translateX(-50%) scale(1); }

.nav-tools { display: flex; align-items: center; gap: 8px; margin-left: 10px; }

.lang {
  display: flex; padding: 3px; border-radius: 99px;
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  border: 1px solid var(--line);
}
.lang button {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.06em;
  padding: 5px 8px; border-radius: 99px; color: var(--dim);
  transition: background 0.25s, color 0.25s;
}
.lang button.on { background: var(--gold); color: #1a1305; font-weight: 500; }

/* language row inside the mobile menu */
.menu-lang { display: none; }
.menu-lang-k {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--dim);
}
.menu-lang-btns {
  display: flex; gap: 2px; padding: 3px; border-radius: 99px;
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  border: 1px solid var(--line);
}
.menu-lang-btns button {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.06em;
  padding: 5px 10px; border-radius: 99px; color: var(--dim);
  transition: background 0.25s, color 0.25s;
}
.menu-lang-btns button.on { background: var(--gold); color: #1a1305; font-weight: 500; }
.menu-lang-btns button:hover { color: var(--ink); }
.menu-lang-btns button.on:hover { color: #1a1305; }

.tool {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid transparent; color: var(--ink-2);
  transition: color 0.25s, border-color 0.25s, background 0.25s, transform 0.25s;
}
.tool:hover { color: var(--gold); border-color: var(--line-2); background: color-mix(in srgb, var(--ink) 5%, transparent); }
.tool svg { width: 18px; height: 18px; }
.tool svg[stroke], .tool svg path[stroke] { fill: none; stroke: currentColor; stroke-width: 1.6; }
.tool svg path[stroke-linecap] { fill: none; stroke: currentColor; stroke-width: 1.6; }
.tool svg circle[fill="none"] { fill: none; stroke: currentColor; stroke-width: 1.6; }
#mix-btn.off { color: var(--faint); }
#sound-btn .i-off { display: none; }
body.muted #sound-btn .i-on { display: none; }
body.muted #sound-btn .i-off { display: block; }
body.muted #sound-btn { color: var(--faint); }

/* ─── mix panel ─────────────────────────────────────────────── */
.mix-panel {
  position: fixed; top: calc(var(--nav-h) - 4px);
  right: max(clamp(12px, 4vw, 40px), calc((100vw - 1240px) / 2 + clamp(12px, 4vw, 40px)));
  width: min(330px, calc(100vw - 24px));
  padding: 18px 18px 12px; border-radius: 20px;
  background: var(--glass-2);
  backdrop-filter: blur(24px) saturate(1.3);
  -webkit-backdrop-filter: blur(24px) saturate(1.3);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow), 0 0 60px -30px rgba(244, 200, 121, 0.4);
  z-index: 120;
  opacity: 0; transform: translateY(-10px) scale(0.97);
  pointer-events: none;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.mix-panel.show { opacity: 1; transform: none; pointer-events: auto; }
.mix-k {
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--dim); margin-bottom: 8px;
}
.mix-row {
  display: grid; grid-template-columns: 1fr 118px; align-items: center; gap: 12px;
  padding: 11px 0; border-top: 1px solid var(--line);
}
.mix-toggle {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 12.5px; letter-spacing: 0.02em; color: var(--ink-2);
  text-align: left; transition: color 0.25s;
}
.mix-toggle:hover { color: var(--ink); }
.mix-toggle .mix-ico {
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  font-size: 11px; color: var(--gold);
  background: color-mix(in srgb, var(--gold) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--gold) 26%, transparent);
  transition: color 0.25s, background 0.25s, border-color 0.25s;
}
.mix-toggle[aria-pressed="false"] { color: var(--faint); }
.mix-toggle[aria-pressed="false"] .mix-ico {
  color: var(--faint); background: transparent; border-color: var(--line);
}
.mix-row input[type="range"] {
  width: 100%; height: 4px; border-radius: 99px; appearance: none; -webkit-appearance: none;
  background: linear-gradient(90deg, rgba(244, 200, 121, 0.55), rgba(244, 200, 121, 0.12));
  outline: none;
}
.mix-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 13px; height: 13px; border-radius: 50%;
  background: var(--gold-2); border: 2px solid #16101e;
  box-shadow: 0 0 10px rgba(244, 200, 121, 0.7); cursor: pointer;
}
.mix-row input[type="range"]::-moz-range-thumb {
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--gold-2); border: 2px solid #16101e;
  box-shadow: 0 0 10px rgba(244, 200, 121, 0.7); cursor: pointer;
}
.mix-master { border-bottom: 1px solid var(--line); }
.mix-hint {
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--faint); text-align: right;
}

.menu-btn { display: none; flex-direction: column; gap: 4px; }
.menu-btn span {
  display: block; width: 17px; height: 1.5px; background: currentColor;
  transition: transform 0.3s, opacity 0.3s;
}
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

/* ─── shared ────────────────────────────────────────────────── */
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 clamp(18px, 4.5vw, 44px); }
.section { position: relative; padding: clamp(80px, 12vh, 150px) 0; }
.section-head { max-width: 760px; margin-bottom: clamp(38px, 6vw, 64px); }
.section-head h2 {
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(2.7rem, 7vw, 5.2rem); line-height: 0.98;
  letter-spacing: -0.02em; margin: 14px 0 0;
}
.section-sub {
  margin-top: 22px; max-width: 56ch; font-size: clamp(0.95rem, 1.4vw, 1.06rem);
  color: var(--dim); line-height: 1.75;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 400;
  letter-spacing: 0.26em; text-transform: uppercase; color: var(--dim);
}
.eyebrow .dot {
  width: 5px; height: 5px; border-radius: 50%; background: var(--gold);
  box-shadow: 0 0 12px var(--gold); animation: pulseDot 3s ease-in-out infinite;
}
@keyframes pulseDot { 0%, 100% { opacity: 0.55; transform: scale(0.8); } 50% { opacity: 1; transform: scale(1.1); } }

.reveal { opacity: 0; transform: translateY(26px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

kbd {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.05em;
  padding: 3px 7px; border-radius: 5px; border: 1px solid var(--line-2);
  background: color-mix(in srgb, var(--ink) 5%, transparent); color: var(--ink-2);
  text-transform: uppercase;
}
.dim { color: var(--faint); }

.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  gap: 10px; height: 50px; padding: 0 26px; border-radius: 99px;
  font-size: 14px; letter-spacing: 0.02em; font-weight: 400;
  transition: transform 0.3s var(--ease), box-shadow 0.3s, background 0.3s, color 0.3s, border-color 0.3s;
  overflow: hidden; white-space: nowrap;
}
.btn svg { width: 17px; height: 17px; }
.btn svg path, .btn svg circle { fill: none; stroke: currentColor; stroke-width: 1.6; }
.btn-gold {
  background: linear-gradient(135deg, #ffe3ad, #f0bd66 55%, #d99a3d);
  color: #1c1406; box-shadow: 0 14px 40px -14px rgba(244, 200, 121, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  font-weight: 500;
}
.btn-gold::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.6) 48%, transparent 76%);
  transform: translateX(-130%); transition: transform 0.8s var(--ease);
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 20px 50px -14px rgba(244, 200, 121, 0.7); }
.btn-gold:hover::after { transform: translateX(130%); }
.btn-ghost {
  border: 1px solid var(--line-2); color: var(--ink);
  background: color-mix(in srgb, var(--ink) 4%, transparent);
  backdrop-filter: blur(6px);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-2px); }
.btn.small { height: 40px; padding: 0 18px; font-size: 12.5px; }
.btn:active { transform: translateY(0) scale(0.985); }

.link-btn {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--dim); border-bottom: 1px solid transparent;
  padding-bottom: 2px; transition: color 0.25s, border-color 0.25s;
}
.link-btn:hover { color: var(--ink); border-color: var(--line-2); }
.link-btn.danger:hover { color: var(--rose); border-color: rgba(255, 126, 168, 0.4); }

.bar { height: 3px; background: var(--line); border-radius: 99px; overflow: hidden; }
.bar i {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--teal), var(--gold));
  box-shadow: 0 0 12px rgba(244, 200, 121, 0.5);
  border-radius: 99px; transition: width 0.8s var(--ease);
}

/* ─── hero ──────────────────────────────────────────────────── */
.hero {
  position: relative; min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: calc(var(--nav-h) + 40px) 0 clamp(96px, 11vh, 118px);
  overflow: hidden;
}
#hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero-inner { position: relative; z-index: 2; text-align: center; display: flex; flex-direction: column; align-items: center; }

.hero-orbit {
  position: absolute; left: 50%; top: 48%; z-index: 1;
  border: 1px solid var(--line); border-radius: 50%;
  pointer-events: none; opacity: 0.55;
}
.o1 { width: min(78vw, 820px); height: min(78vw, 820px); margin: calc(min(78vw, 820px) / -2); animation: orbitSpin 90s linear infinite; border-style: dashed; }
.o2 { width: min(58vw, 600px); height: min(58vw, 600px); margin: calc(min(58vw, 600px) / -2); animation: orbitSpin 60s linear infinite reverse; opacity: 0.35; }
.o3 { width: min(96vw, 1080px); height: min(96vw, 1080px); margin: calc(min(96vw, 1080px) / -2); opacity: 0.18; }
.o1::after, .o2::after {
  content: ""; position: absolute; top: -3px; left: 50%; width: 5px; height: 5px;
  border-radius: 50%; background: var(--gold); box-shadow: 0 0 16px var(--gold);
}
@keyframes orbitSpin { to { transform: rotate(360deg); } }

.hero-title {
  position: relative; margin: 26px 0 6px; line-height: 0.9;
  font-family: var(--font-display); font-weight: 300;
}
.devanagari {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  font-size: clamp(9rem, 34vw, 26rem); color: var(--gold);
  opacity: 0.07; letter-spacing: 0.02em; white-space: nowrap;
  pointer-events: none; filter: blur(1px);
  font-weight: 400;
}
.letters { display: flex; justify-content: center; gap: 0.02em; }
.letters span {
  display: inline-block;
  font-size: clamp(4.6rem, 16.5vw, 13rem);
  letter-spacing: 0.02em;
  background: linear-gradient(178deg, #fffaf0 8%, var(--gold-2) 42%, #d9a452 78%, #a8752c 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  filter: drop-shadow(0 0 32px rgba(244, 200, 121, 0.22));
  animation: letterIn 1.4s var(--ease) both;
  animation-delay: calc(0.18s + var(--i) * 0.075s);
}
@keyframes letterIn {
  from { opacity: 0; transform: translateY(36px) scale(1.04); filter: blur(10px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}
.title-orbit {
  position: absolute; inset: -12% -8% -6%; width: 116%; height: 118%;
  overflow: visible; pointer-events: none; fill: none;
  stroke: rgba(244, 200, 121, 0.22); stroke-width: 0.6;
  opacity: 0; animation: fadeIn 2s 1.1s forwards;
}
.title-orbit .orb { fill: var(--gold); stroke: none; filter: drop-shadow(0 0 10px var(--gold)); }
@keyframes fadeIn { to { opacity: 1; } }

.hero-lead {
  margin-top: 22px;
  font-family: var(--font-display); font-style: italic; font-weight: 300;
  font-size: clamp(1.35rem, 3vw, 2rem); line-height: 1.35;
  color: var(--ink); max-width: 24ch; letter-spacing: 0.01em;
}
.hero-body {
  margin-top: 20px; max-width: 50ch; color: var(--dim);
  font-size: clamp(0.9rem, 1.35vw, 1rem); line-height: 1.8;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 34px; }
.hero-inner .reveal { animation: heroUp 1s var(--ease) both; }
.hero-inner .reveal:nth-child(1) { animation-delay: 0.1s; }
.hero-inner .reveal:nth-child(3) { animation-delay: 0.65s; }
.hero-inner .reveal:nth-child(4) { animation-delay: 0.78s; }
.hero-inner .reveal:nth-child(5) { animation-delay: 0.9s; }
.hero-inner .reveal:nth-child(6) { animation-delay: 1s; }
.hero-inner .reveal:nth-child(7) { animation-delay: 1.1s; }
.hero-inner .reveal.in { animation: heroUp 1s var(--ease) both; }
@keyframes heroUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

.hero-stats {
  display: flex; align-items: center; gap: 18px; margin-top: 46px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--dim);
}
.hero-stats b { color: var(--ink); font-weight: 500; margin-right: 3px; }
.hero-stats .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--faint); }

.hero-foot {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 2;
  display: flex; align-items: flex-end; justify-content: space-between;
  padding: 0 clamp(20px, 4.5vw, 46px) 26px;
}
.scroll-cue {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--dim);
  position: absolute; left: 50%; transform: translateX(-50%);
}
.scroll-cue .line {
  width: 1px; height: 44px; background: linear-gradient(var(--gold), transparent);
  position: relative; overflow: hidden; opacity: 0.7;
}
.scroll-cue .line::after {
  content: ""; position: absolute; top: -50%; left: 0; width: 1px; height: 50%;
  background: var(--gold-2); animation: scrollLine 2.4s ease-in-out infinite;
}
@keyframes scrollLine { 0% { top: -50%; } 60%, 100% { top: 110%; } }
.scroll-cue:hover { color: var(--gold); }
.hero-tip { margin-left: auto; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; color: var(--dim); }
.hero-tip kbd { border-color: rgba(244, 200, 121, 0.3); color: var(--gold); }

/* ─── play / stage ──────────────────────────────────────────── */
.play-section { padding-top: clamp(60px, 9vh, 110px); }

.stage-wrap { position: relative; }
.stage {
  position: relative; width: 100%; aspect-ratio: 16 / 10;
  max-height: 78vh; margin: 0 auto;
  border-radius: var(--r-lg); overflow: hidden;
  background: #06070f;
  border: 1px solid rgba(244, 200, 121, 0.16);
  box-shadow: 0 40px 120px -40px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.03) inset, var(--glow-gold);
  isolation: isolate;
  touch-action: none;
  user-select: none; -webkit-user-select: none;
}
.stage::before {
  content: ""; position: absolute; inset: 0; z-index: 30; pointer-events: none;
  border-radius: inherit;
  background: radial-gradient(130% 100% at 50% 0%, transparent 55%, rgba(0, 0, 0, 0.35) 100%);
}
.stage::after {
  content: ""; position: absolute; inset: 0; z-index: 31; pointer-events: none; border-radius: inherit;
  box-shadow: inset 0 0 90px rgba(8, 8, 22, 0.85);
}
#game-canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }

.stage-glow {
  position: absolute; inset: -1px; z-index: 32; border-radius: inherit; pointer-events: none;
  box-shadow: 0 0 0 1px rgba(244, 200, 121, 0.22), 0 0 60px -10px rgba(99, 230, 213, 0.18);
  opacity: 0.7;
}

.hud {
  position: absolute; inset: 0; z-index: 20; pointer-events: none;
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: clamp(12px, 2.2vw, 24px) clamp(14px, 2.4vw, 28px);
  color: var(--stage-ink);
  font-family: var(--font-mono);
  opacity: 0; transform: translateY(-6px);
  transition: opacity 0.5s, transform 0.5s;
}
.hud.on { opacity: 1; transform: none; }
.hud-left { display: flex; flex-direction: column; gap: 9px; }
.hud-level { display: flex; align-items: baseline; gap: 8px; }
.hud-k { font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(246, 239, 228, 0.45); }
.hud-v { font-size: 11px; color: var(--gold); letter-spacing: 0.1em; }
.hud-name {
  font-family: var(--font-display); font-size: clamp(14px, 1.7vw, 19px);
  letter-spacing: 0.03em; color: var(--stage-ink); margin-left: 4px;
}
.hearts { display: flex; gap: 5px; }
.hearts .heart {
  width: 14px; height: 14px; color: var(--gold);
  filter: drop-shadow(0 0 6px rgba(244, 200, 121, 0.7));
  transition: color 0.4s, opacity 0.4s, transform 0.4s;
}
.hearts .heart.spent { color: rgba(246, 239, 228, 0.14); filter: none; transform: scale(0.86); }
.hearts .heart.extra { color: var(--rose); filter: drop-shadow(0 0 6px rgba(255, 126, 168, 0.7)); }

.hud-center { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 2px; }
.energy { position: relative; width: clamp(110px, 17vw, 190px); height: 3px; background: rgba(246, 239, 228, 0.12); border-radius: 99px; overflow: visible; }
.energy-fill {
  height: 100%; width: 100%; border-radius: 99px;
  background: linear-gradient(90deg, var(--teal), #a8f0e6 55%, var(--gold));
  box-shadow: 0 0 14px rgba(99, 230, 213, 0.55);
  transition: width 0.1s linear, background 0.3s;
}
.energy.low .energy-fill { background: linear-gradient(90deg, var(--rose), #ffb1c7); box-shadow: 0 0 14px rgba(255, 126, 168, 0.6); }
.energy-label {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  font-size: 8px; letter-spacing: 0.26em; color: rgba(246, 239, 228, 0.4);
}
.motes { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--stage-ink); }
.motes svg { width: 13px; height: 13px; color: var(--gold); filter: drop-shadow(0 0 8px rgba(244, 200, 121, 0.8)); }
.motes-total { color: rgba(246, 239, 228, 0.38); font-size: 10px; }

.hud-right { display: flex; align-items: center; gap: 10px; }
.timer { font-size: 11px; letter-spacing: 0.08em; color: rgba(246, 239, 228, 0.55); min-width: 42px; text-align: right; }
.hud-btn {
  pointer-events: auto; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; color: rgba(246, 239, 228, 0.7);
  border: 1px solid rgba(246, 239, 228, 0.16); transition: color 0.25s, border-color 0.25s, background 0.25s;
}
.hud-btn:hover { color: var(--gold); border-color: rgba(244, 200, 121, 0.5); background: rgba(255, 255, 255, 0.06); }
.hud-btn svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; }
#guide-btn svg { width: 13px; height: 13px; }
#fs-btn svg { width: 11px; height: 11px; }
#fs-btn.is-on { color: var(--gold); border-color: rgba(244, 200, 121, 0.55); }

/* the stage, unbound */
.stage:fullscreen {
  width: 100vw; height: 100vh; max-height: none;
  aspect-ratio: auto; border-radius: 0; border: 0;
  background: #04050c;
}
.stage:fullscreen .stage-glow { display: none; }
.stage:fullscreen .stage::before, .stage:fullscreen .stage::after { display: none; }
body.stage-fs { overflow: hidden; }
body.stage-fs .stage {
  position: fixed; inset: 0; z-index: 200;
  width: 100vw; height: 100vh; max-height: none;
  aspect-ratio: auto; border-radius: 0; border: 0;
  background: #04050c;
}
body.stage-fs .stage-glow { display: none; }
body.stage-fs .nav { z-index: 90; }

.mode-pills {
  position: absolute; left: clamp(14px, 2.4vw, 28px); bottom: clamp(14px, 2.4vw, 22px);
  z-index: 22; display: flex; gap: 6px;
  opacity: 0; transition: opacity 0.5s;
}
.mode-pills.on { opacity: 1; }
.pill {
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 6px 11px; border-radius: 99px; color: rgba(246, 239, 228, 0.55);
  border: 1px solid rgba(246, 239, 228, 0.14); background: rgba(8, 9, 20, 0.45);
  backdrop-filter: blur(8px); transition: all 0.25s;
}
.pill:hover { color: var(--stage-ink); border-color: rgba(246, 239, 228, 0.3); }
.pill.on { color: #1b1408; background: var(--gold); border-color: var(--gold); }
.pill.locked { opacity: 0.4; }
.pill.locked::after { content: " ✦"; }
.pill.unlocked { opacity: 1; }
.pill.unlocked:not(.on) { color: var(--gold-2); border-color: rgba(244, 200, 121, 0.4); }

/* overlay */
.overlay {
  position: absolute; inset: 0; z-index: 25;
  display: grid; place-items: center; padding: 18px;
  background: radial-gradient(80% 80% at 50% 50%, rgba(6, 7, 16, 0.55), rgba(4, 5, 12, 0.86));
  backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px);
  opacity: 0; pointer-events: none; transition: opacity 0.55s var(--ease);
}
.overlay.show { opacity: 1; pointer-events: auto; }
.ov-card {
  position: relative; width: min(430px, 100%); max-height: 100%;
  padding: clamp(24px, 4vw, 38px) clamp(22px, 4vw, 36px);
  border-radius: 22px; text-align: center;
  background: linear-gradient(180deg, rgba(19, 20, 42, 0.92), rgba(9, 10, 24, 0.96));
  border: 1px solid rgba(244, 200, 121, 0.18);
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transform: translateY(16px) scale(0.97); transition: transform 0.6s var(--ease);
  overflow-y: auto; scrollbar-width: thin;
}
.overlay.show .ov-card { transform: none; }
.ov-card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(70% 50% at 50% 0%, rgba(244, 200, 121, 0.09), transparent 70%);
}
.ov-sigil { width: 46px; height: 46px; margin: 0 auto 11px; color: var(--gold); opacity: 0.9; }
.ov-sigil svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 0.8; }
.ov-sigil svg path { fill: rgba(244, 200, 121, 0.16); stroke: currentColor; }
.ov-sigil.spin { animation: spinSlow 18s linear infinite; }
.ov-kicker { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.28em; text-transform: uppercase; color: var(--gold); opacity: 0.8; }
.ov-title {
  font-family: var(--font-display); font-weight: 300; font-size: clamp(2rem, 5vw, 2.9rem);
  line-height: 1.05; margin: 8px 0 0; color: var(--stage-ink);
}
.ov-poem {
  font-family: var(--font-display); font-style: italic; font-size: 16px; line-height: 1.5;
  color: rgba(246, 239, 228, 0.62); margin: 14px auto 0; max-width: 36ch;
}
.ov-hint {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em;
  color: rgba(246, 239, 228, 0.42); margin-top: 18px; line-height: 1.9;
}
.ov-hint b { color: var(--gold-2); font-weight: 400; }

.ov-guide {
  margin-top: 18px; text-align: left;
  border-top: 1px solid rgba(246, 239, 228, 0.1);
  max-height: 40vh; overflow-y: auto; scrollbar-width: thin;
}
.ov-guide:empty { display: none; }
.guide-item {
  display: flex; gap: 11px; align-items: flex-start;
  padding: 9px 2px; border-bottom: 1px solid rgba(246, 239, 228, 0.07);
}
.guide-item:last-child { border-bottom: 0; }
.guide-ico {
  flex: none; width: 25px; height: 25px; border-radius: 50%;
  display: grid; place-items: center; font-size: 11px;
  color: var(--gold-2); background: rgba(244, 200, 121, 0.09);
  border: 1px solid rgba(244, 200, 121, 0.24);
  box-shadow: 0 0 14px -4px rgba(244, 200, 121, 0.5);
}
.guide-k {
  display: block; font-family: var(--font-mono); font-size: 9px;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-2);
  margin-bottom: 2px;
}
.guide-d {
  display: block; font-size: 11.5px; line-height: 1.55;
  color: rgba(246, 239, 228, 0.56);
}
.ov-stats {
  display: flex; justify-content: center; gap: 22px; margin-top: 22px;
  font-family: var(--font-mono);
}
.ov-stats > div { display: flex; flex-direction: column; gap: 3px; }
.ov-stats .k { font-size: 8px; letter-spacing: 0.22em; text-transform: uppercase; color: rgba(246, 239, 228, 0.35); }
.ov-stats .v { font-size: 17px; color: var(--stage-ink); }
.ov-stats .v.gold { color: var(--gold); }
.ov-rating { display: flex; gap: 6px; justify-content: center; margin-top: 18px; font-size: 19px; color: var(--gold); }
.ov-rating .off { color: rgba(246, 239, 228, 0.14); }
.ov-actions {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 18px;
  position: sticky; bottom: -2px; z-index: 2; padding: 12px 0 4px;
  background: linear-gradient(180deg, rgba(12, 13, 28, 0), rgba(12, 13, 28, 0.94) 42%);
}
.ov-actions .btn { height: 44px; padding: 0 22px; font-size: 13px; }
.ov-note {
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.1em;
  color: rgba(246, 239, 228, 0.3); margin-top: 16px;
}
.ov-poem:empty, .ov-hint:empty, .ov-note:empty, .ov-stats:empty { display: none; }

.whisper {
  position: absolute; left: 50%; bottom: 14%; z-index: 24;
  transform: translate(-50%, 10px); opacity: 0; pointer-events: none;
  font-family: var(--font-display); font-style: italic; font-size: clamp(16px, 2.2vw, 23px);
  color: rgba(246, 239, 228, 0.85); text-align: center; max-width: 80%;
  text-shadow: 0 0 30px rgba(99, 230, 213, 0.35);
  transition: opacity 1.2s, transform 1.2s var(--ease); line-height: 1.4;
}
.whisper.show { opacity: 1; transform: translate(-50%, 0); }

.stage-foot {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center;
  margin-top: 16px; padding: 0 6px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.07em; color: var(--dim);
}
.stage-foot p { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.stage-foot-right { opacity: 0.6; }

/* ─── explore ───────────────────────────────────────────────── */
.explore-section { overflow: hidden; }
.explore-map {
  position: relative; height: clamp(560px, 64vw, 720px);
  display: grid; place-items: center; margin-top: 10px;
}
.explore-core {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: clamp(130px, 19vw, 200px); aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle, rgba(244, 200, 121, 0.11), rgba(9, 10, 24, 0.2) 60%, transparent 72%);
}
.core-word {
  font-family: var(--font-display); font-size: clamp(22px, 3.4vw, 34px);
  color: var(--gold); opacity: 0.75; letter-spacing: 0.08em;
  animation: breathe 7s ease-in-out infinite;
}
@keyframes breathe { 0%, 100% { opacity: 0.5; transform: scale(0.97); } 50% { opacity: 0.95; transform: scale(1.03); } }
.core-ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 1px solid var(--line-2);
}
.r1 { animation: orbitSpin 40s linear infinite; border-style: dashed; }
.r2 { inset: -16%; opacity: 0.5; border-color: var(--line); }
.r3 { inset: -34%; opacity: 0.3; border-color: var(--line); border-style: dashed; animation: orbitSpin 90s linear infinite reverse; }

.orbit-node {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%) rotate(var(--a)) translateX(clamp(140px, 25vw, 260px)) rotate(calc(-1 * var(--a)));
  display: flex; align-items: center; gap: 9px;
  padding: 9px 15px 9px 11px; border-radius: 99px;
  border: 1px solid var(--line); background: color-mix(in srgb, var(--bg0) 55%, transparent);
  backdrop-filter: blur(10px);
  transition: border-color 0.3s, background 0.3s, transform 0.4s var(--ease), box-shadow 0.3s;
  white-space: nowrap; cursor: pointer;
}
.orbit-node:hover, .orbit-node:focus-visible {
  border-color: rgba(244, 200, 121, 0.55);
  background: color-mix(in srgb, var(--bg0) 30%, transparent);
  box-shadow: 0 0 40px -12px rgba(244, 200, 121, 0.5);
}
.node-star {
  width: 14px; height: 14px; flex: none; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #fff6e3, var(--gold) 45%, #9a6a20 100%);
  box-shadow: 0 0 12px rgba(244, 200, 121, 0.8);
  transition: transform 0.3s, box-shadow 0.3s;
}
.orbit-node:hover .node-star, .orbit-node.active .node-star { transform: scale(1.35); box-shadow: 0 0 20px rgba(244, 200, 121, 1); }
.node-label { font-size: 13px; letter-spacing: 0.02em; }
.node-desc { display: none; }
.orbit-node.active { border-color: var(--gold); }
.explore-readout {
  position: absolute; left: 50%; bottom: 4px; transform: translateX(-50%);
  font-family: var(--font-display); font-style: italic; font-size: clamp(15px, 2vw, 19px);
  color: var(--dim); text-align: center; max-width: 62ch; transition: opacity 0.4s;
}

/* ─── sky ───────────────────────────────────────────────────── */
.sky-layout { display: grid; grid-template-columns: 1.55fr 1fr; gap: clamp(20px, 3vw, 36px); align-items: stretch; }
.dome {
  position: relative; min-height: clamp(340px, 44vw, 520px);
  border-radius: var(--r-lg); overflow: hidden;
  background: radial-gradient(120% 90% at 50% 110%, #10132c 0%, #080a18 55%, #05060f 100%);
  border: 1px solid rgba(244, 200, 121, 0.14);
  box-shadow: inset 0 0 120px rgba(0, 0, 0, 0.6), var(--shadow);
}
#dome-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.dome-horizon {
  position: absolute; left: -10%; right: -10%; bottom: -52%; height: 90%;
  border-radius: 50%; border-top: 1px solid rgba(99, 230, 213, 0.25);
  background: radial-gradient(60% 100% at 50% 0%, rgba(99, 230, 213, 0.08), transparent 70%);
  pointer-events: none;
}
.dome-empty {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center;
  font-family: var(--font-display); font-style: italic; font-size: clamp(16px, 2vw, 21px);
  color: rgba(246, 239, 228, 0.3); pointer-events: none; padding: 30px;
}
.dome-empty.hide { display: none; }
.dome-label {
  position: absolute; left: 50%; top: 22px; transform: translateX(-50%);
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.3em;
  text-transform: uppercase; color: rgba(246, 239, 228, 0.28);
  white-space: nowrap;
}
.sky-star {
  position: absolute; transform: translate(-50%, -50%);
  width: 26px; height: 26px; padding: 0; display: grid; place-items: center;
  color: rgba(246, 239, 228, 0.3); transition: color 0.3s, transform 0.3s, filter 0.3s;
  z-index: 3;
}
.sky-star svg { width: 9px; height: 9px; }
.sky-star.done { color: var(--gold); filter: drop-shadow(0 0 8px rgba(244, 200, 121, 0.9)); }
.sky-star.done svg { width: 12px; height: 12px; }
.sky-star:hover { transform: translate(-50%, -50%) scale(1.6); z-index: 5; }
.sky-star .star-name {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  font-family: var(--font-mono); font-size: 8px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-2); opacity: 0; white-space: nowrap; pointer-events: none; transition: opacity 0.3s;
  padding-top: 3px;
}
.sky-star:hover .star-name { opacity: 1; }
.sky-star.hidden-star { color: rgba(246, 239, 228, 0.1); }
.sky-star.hidden-star:hover { color: var(--teal); }
.sky-star.hidden-star.found { color: var(--teal); filter: drop-shadow(0 0 10px rgba(99, 230, 213, 0.9)); }

.sky-panel {
  display: flex; flex-direction: column;
  padding: clamp(22px, 3vw, 32px); border-radius: var(--r-lg);
  border: 1px solid var(--line); background: var(--panel);
  backdrop-filter: blur(14px);
}
.panel-k { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.3em; color: var(--faint); }
.sky-panel h3 {
  font-family: var(--font-display); font-weight: 300; font-size: clamp(1.7rem, 3vw, 2.3rem);
  line-height: 1.1; margin: 10px 0 0;
}
.sky-poem { font-family: var(--font-display); font-style: italic; font-size: 15.5px; line-height: 1.6; color: var(--dim); margin-top: 12px; }
.sky-meta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 18px; font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); }
.sky-meta span b { color: var(--ink-2); font-weight: 400; }
.sky-progress { margin-top: auto; padding-top: 28px; }
.sky-progress .bar { margin-bottom: 9px; }
.sky-progress p { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em; color: var(--dim); }
.sky-panel .link-btn { margin-top: 18px; align-self: flex-start; }
.sky-star-cursor { cursor: crosshair; }

/* ─── secrets ───────────────────────────────────────────────── */
.secrets-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; }
.secret-progress { display: flex; align-items: center; gap: 14px; flex: 1; max-width: 420px; }
.sp-num { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; color: var(--dim); white-space: nowrap; }
.sp-num b { color: var(--gold); font-weight: 500; font-size: 15px; }
.secret-progress .bar { flex: 1; }

.secrets-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.secret-card {
  position: relative; padding: 22px; border-radius: var(--r-md);
  border: 1px solid var(--line); background: color-mix(in srgb, var(--ink) 3%, transparent);
  min-height: 128px; overflow: hidden;
  transition: border-color 0.35s, background 0.35s, transform 0.35s var(--ease);
}
.secret-card:hover { transform: translateY(-3px); border-color: var(--line-2); }
.secret-card .sc-num {
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.2em; color: var(--faint);
}
.secret-card .sc-name {
  font-family: var(--font-display); font-size: 21px; font-weight: 400; margin-top: 8px;
  color: var(--ink-2); line-height: 1.15;
}
.secret-card .sc-hint {
  font-family: var(--font-mono); font-size: 9.5px; line-height: 1.8; letter-spacing: 0.04em;
  color: var(--faint); margin-top: 12px;
}
.secret-card.found {
  border-color: rgba(244, 200, 121, 0.35);
  background: linear-gradient(150deg, rgba(244, 200, 121, 0.1), rgba(244, 200, 121, 0.02));
}
.secret-card.found .sc-name { color: var(--gold); }
.secret-card.found .sc-hint { color: var(--dim); }
.secret-card .sc-sigil {
  position: absolute; right: 12px; top: 12px; width: 30px; height: 30px;
  color: var(--gold); opacity: 0.12; transition: opacity 0.4s, transform 0.6s var(--ease);
}
.secret-card.found .sc-sigil { opacity: 0.6; }
.secret-card:hover .sc-sigil { transform: rotate(45deg); }
.secret-card .sc-sigil svg { width: 100%; height: 100%; }
.secret-card.locked::after {
  content: "locked"; position: absolute; right: 14px; bottom: 12px;
  font-family: var(--font-mono); font-size: 8px; letter-spacing: 0.2em; color: var(--faint);
  text-transform: uppercase; opacity: 0.6;
}
.secret-card.found::after { content: "found"; color: var(--gold); opacity: 0.55; }
.secret-card.secret-new { animation: secretPop 0.6s var(--ease); }
@keyframes secretPop { 0% { transform: scale(0.96); } 50% { transform: scale(1.02); } 100% { transform: scale(1); } }

/* ─── about ─────────────────────────────────────────────────── */
.about-grid { display: grid; grid-template-columns: 1.35fr 0.85fr; gap: clamp(28px, 5vw, 70px); align-items: start; }
.about-big {
  font-family: var(--font-display); font-size: clamp(1.55rem, 3vw, 2.3rem);
  line-height: 1.28; font-weight: 300; color: var(--ink); max-width: 26ch;
}
.about-story > p:not(.about-big) {
  margin-top: 22px; color: var(--dim); max-width: 58ch; font-size: 15px; line-height: 1.8;
}
.tech-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 30px; }
.tech-chips span {
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 7px 11px; border-radius: 99px; border: 1px solid var(--line);
  color: var(--dim); transition: color 0.3s, border-color 0.3s;
}
.tech-chips span:hover { color: var(--gold); border-color: rgba(244, 200, 121, 0.35); }
.about-links { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 34px; }
.link-arrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--ink); border-bottom: 1px solid var(--line-2);
  padding-bottom: 6px; transition: color 0.3s, border-color 0.3s, gap 0.3s;
}
.link-arrow svg { width: 15px; height: 15px; }
.link-arrow svg path { fill: none; stroke: currentColor; stroke-width: 1.6; }
.link-arrow:hover { color: var(--gold); border-color: var(--gold); gap: 12px; }
.as-btn { text-align: left; }

.about-card {
  position: relative; padding: clamp(26px, 4vw, 38px);
  border-radius: var(--r-lg); border: 1px solid var(--line);
  background: linear-gradient(165deg, color-mix(in srgb, var(--ink) 5%, transparent), transparent 70%);
  overflow: hidden;
}
.about-card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(80% 60% at 80% 0%, rgba(155, 140, 255, 0.12), transparent 70%);
}
.about-sigil { width: 96px; height: 96px; margin: 0 auto 18px; color: var(--gold); opacity: 0.7; animation: spinSlow 60s linear infinite; }
.about-sigil svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 0.7; }
.about-sigil svg path { fill: rgba(244, 200, 121, 0.12); }
.quote {
  font-family: var(--font-display); font-style: italic; font-size: clamp(19px, 2.4vw, 24px);
  line-height: 1.45; text-align: center; color: var(--ink);
}
.about-facts { display: grid; gap: 10px; margin-top: 28px; }
.about-facts div {
  display: flex; justify-content: space-between; padding-bottom: 9px;
  border-bottom: 1px solid var(--line); font-size: 12px;
}
.about-facts span { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--faint); }
.about-facts b { font-weight: 400; color: var(--ink-2); }
.small-note { margin-top: 22px; text-align: center; font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.14em; color: var(--faint); }

/* ─── footer ────────────────────────────────────────────────── */
.footer { position: relative; border-top: 1px solid var(--line); padding: 44px 0 38px; }
.footer-inner { display: grid; grid-template-columns: 1fr auto; gap: 20px 40px; align-items: center; position: relative; }
.footer-brand .brand-word { font-size: 19px; }
.footer-brand p { font-size: 12px; color: var(--dim); margin-top: 5px; }
.footer-links { display: flex; gap: 22px; font-size: 12px; color: var(--dim); }
.footer-links a { transition: color 0.3s; }
.footer-links a:hover { color: var(--gold); }
.footer-music {
  display: inline-flex; align-items: center; gap: 6px; color: var(--dim);
  transition: color 0.3s;
}
.footer-music:hover { color: var(--gold); }
.footer-music .fm-note { color: var(--gold); opacity: 0.85; font-size: 12px; }
.footer-music[aria-pressed="false"] { color: var(--faint); }
.footer-music[aria-pressed="false"] .fm-note { color: var(--faint); }
.footer-note { grid-column: 1 / -1; font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.1em; color: var(--faint); display: flex; justify-content: space-between; gap: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.footer-year { opacity: 0.6; }
.footer-star {
  position: absolute; right: 0; bottom: 44px; width: 16px; height: 16px;
  color: var(--faint); opacity: 0.35; transition: color 0.4s, opacity 0.4s, transform 0.4s;
}
.footer-star svg { width: 100%; height: 100%; }
.footer-star:hover { color: var(--gold); opacity: 1; transform: rotate(90deg) scale(1.2); }

/* ─── modal ─────────────────────────────────────────────────── */
.modal {
  position: fixed; inset: 0; z-index: 150; display: grid; place-items: center;
  padding: 20px; opacity: 0; pointer-events: none; transition: opacity 0.4s var(--ease);
}
.modal.show { opacity: 1; pointer-events: auto; }
.modal-bg { position: absolute; inset: 0; background: rgba(3, 4, 10, 0.72); backdrop-filter: blur(10px); }
.modal-card {
  position: relative; width: min(560px, 100%); max-height: min(82vh, 760px); overflow-y: auto;
  border-radius: 24px; padding: clamp(26px, 4vw, 44px);
  background: linear-gradient(180deg, rgba(19, 20, 42, 0.97), rgba(8, 9, 22, 0.99));
  border: 1px solid rgba(244, 200, 121, 0.22);
  box-shadow: 0 50px 140px -40px #000, inset 0 1px 0 rgba(255, 255, 255, 0.07);
  color: #f6efe4;
  transform: translateY(20px) scale(0.98); transition: transform 0.5s var(--ease);
  scrollbar-width: thin;
}
.modal.show .modal-card { transform: none; }
.modal-x {
  position: absolute; right: 16px; top: 12px; width: 34px; height: 34px;
  border-radius: 50%; font-size: 22px; line-height: 1; color: #f6efe4; opacity: 0.5;
  transition: opacity 0.25s, background 0.25s;
}
.modal-x:hover { opacity: 1; background: rgba(255, 255, 255, 0.08); }
.modal h3 {
  font-family: var(--font-display); font-weight: 300; font-size: clamp(2rem, 5vw, 2.8rem);
  line-height: 1.05; margin-bottom: 8px; color: #f6efe4;
}
.modal .m-kicker { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.28em; text-transform: uppercase; color: var(--gold); margin-bottom: 10px; }
.modal p { font-size: 14px; line-height: 1.75; color: rgba(246, 239, 228, 0.66); margin-top: 14px; }
.modal p em { color: #f6efe4; font-style: italic; font-family: var(--font-display); font-size: 16px; }
.modal-rows { display: grid; gap: 14px; margin-top: 22px; }
.modal-row { display: grid; grid-template-columns: 28px 1fr; gap: 14px; align-items: start; }
.modal-row .n { font-family: var(--font-mono); font-size: 10px; color: var(--gold); padding-top: 4px; letter-spacing: 0.1em; }
.modal-row h4 { font-size: 14px; font-weight: 500; margin: 0; color: #f6efe4; }
.modal-row p { margin-top: 3px; font-size: 12.5px; line-height: 1.65; }
.modal-controls { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.modal-controls kbd { color: var(--gold-2); border-color: rgba(244, 200, 121, 0.3); }
.modal .btn { margin-top: 24px; }
.modal .big-secret {
  font-family: var(--font-display); font-size: 72px; text-align: center; color: var(--gold);
  margin: 10px 0; line-height: 1; text-shadow: 0 0 50px rgba(244, 200, 121, 0.4);
}
.modal .secret-line { text-align: center; font-family: var(--font-display); font-style: italic; font-size: 20px; color: #f6efe4; }
.modal-credit-list { margin-top: 22px; display: grid; gap: 10px; font-size: 12.5px; color: rgba(246, 239, 228, 0.6); }
.modal-credit-list div { display: flex; justify-content: space-between; gap: 20px; border-bottom: 1px solid rgba(246, 239, 228, 0.08); padding-bottom: 8px; }
.modal-credit-list b { font-weight: 400; color: #f6efe4; }
.modal .wish-input {
  width: 100%; margin-top: 20px; padding: 13px 16px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(246, 239, 228, 0.18);
  color: #f6efe4; font-family: var(--font-display); font-size: 18px; font-style: italic;
  outline: none; transition: border-color 0.3s;
}
.modal .wish-input:focus { border-color: var(--gold); }
.modal .wish-input::placeholder { color: rgba(246, 239, 228, 0.3); }

/* ─── toasts ────────────────────────────────────────────────── */
.toasts {
  position: fixed; right: 20px; bottom: 20px; z-index: 160;
  display: flex; flex-direction: column; gap: 10px; align-items: flex-end;
  pointer-events: none; max-width: min(340px, calc(100vw - 40px));
}
.toast {
  pointer-events: auto; padding: 13px 17px; border-radius: 13px;
  background: rgba(12, 14, 30, 0.92); backdrop-filter: blur(14px);
  border: 1px solid rgba(244, 200, 121, 0.35);
  box-shadow: 0 20px 50px -16px rgba(0, 0, 0, 0.8);
  display: flex; gap: 11px; align-items: flex-start;
  animation: toastIn 0.5s var(--ease);
  color: #f6efe4;
}
.toast.out { animation: toastOut 0.4s var(--ease) forwards; }
.toast .t-star { color: var(--gold); flex: none; margin-top: 2px; }
.toast .t-star svg { width: 14px; height: 14px; filter: drop-shadow(0 0 6px rgba(244, 200, 121, 0.8)); }
.toast .t-k { font-family: var(--font-mono); font-size: 8px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); }
.toast .t-t { font-size: 12.5px; color: rgba(246, 239, 228, 0.85); margin-top: 2px; line-height: 1.45; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(0.97); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(20px); } }

/* ─── secret effects ────────────────────────────────────────── */
.rain-star {
  position: fixed; top: -8vh; z-index: 150; pointer-events: none;
  line-height: 1; color: var(--gold);
  text-shadow: 0 0 12px currentColor;
  animation-name: starFall; animation-timing-function: linear; animation-fill-mode: forwards;
}
@keyframes starFall {
  0% { transform: translate3d(0, 0, 0) rotate(0deg) scale(0.7); opacity: 0; }
  12% { opacity: 1; }
  100% { transform: translate3d(-4vw, 116vh, 0) rotate(300deg) scale(1.05); opacity: 0; }
}

body.rainbow #bg { animation: rainbowHue 16s linear infinite; }
@keyframes rainbowHue {
  0% { filter: hue-rotate(0deg) saturate(1.2); }
  100% { filter: hue-rotate(360deg) saturate(1.2); }
}

body.void-flash #bg {
  filter: hue-rotate(205deg) saturate(1.6) brightness(0.82);
  transition: filter 0.6s var(--ease);
}
body.void-flash .vignette {
  background: radial-gradient(120% 100% at 50% 45%, rgba(90, 10, 60, 0.25) 30%, rgba(2, 0, 6, 0.75) 100%);
}

.om-trigger {
  display: inline; padding: 0 2px; border: 0; background: none;
  color: var(--teal); font: inherit; cursor: pointer;
  text-shadow: 0 0 14px rgba(99, 230, 213, 0.8);
  transition: transform 0.3s var(--ease), color 0.3s;
}
.om-trigger:hover { transform: scale(1.22); color: var(--gold); }

/* the dome's drawn constellations */
#sky-svg {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%; overflow: visible; pointer-events: none;
}
.sky-line {
  fill: none; stroke: rgba(246, 239, 228, 0.13); stroke-width: 0.3;
  stroke-linecap: round; stroke-linejoin: round;
  transition: stroke 0.8s, stroke-width 0.8s;
}
.sky-line.done {
  stroke: rgba(244, 200, 121, 0.72); stroke-width: 0.5;
  filter: drop-shadow(0 0 1.4px rgba(244, 200, 121, 0.65));
}
.sky-line.ninth { stroke: rgba(155, 140, 255, 0.6); }
.sky-line.ninth.done { stroke: rgba(244, 200, 121, 0.8); }

@media (prefers-reduced-motion: reduce) {
  body.rainbow #bg { animation: none; }
  .rain-star { display: none; }
}

/* ─── responsive ────────────────────────────────────────────── */
/* short laptops: keep the whole hero above the fold, with room for the foot */
@media (max-height: 850px) and (min-width: 901px) {
  .hero { padding-bottom: 92px; }
  .letters span { font-size: clamp(4rem, min(15vw, 20vh), 11rem); }
  .devanagari { font-size: clamp(7rem, min(32vw, 44vh), 21rem); }
  .hero-title { margin: 12px 0 2px; }
  .hero-lead { margin-top: 14px; font-size: clamp(1.2rem, 2.3vh + 0.9vw, 1.7rem); }
  .hero-body { margin-top: 12px; line-height: 1.65; }
  .hero-cta { margin-top: 20px; }
  .hero-stats { margin-top: 24px; }
  .hero-foot { padding-bottom: 16px; }
}

@media (max-width: 900px) {
  .nav-links {
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; gap: 0; padding: 14px 18px 24px;
    background: color-mix(in srgb, var(--bg0) 92%, transparent);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--line);
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: opacity 0.35s, transform 0.35s;
  }
  .nav-links.open { opacity: 1; transform: none; pointer-events: auto; }
  .nav-links a { padding: 14px 10px; font-size: 15px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav-links a::after { display: none; }
  .nav-links a.active { color: var(--gold); }
  .menu-btn { display: flex; }
  .nav-tools { margin-left: auto; }
  .lang { display: none; }
  .menu-lang {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 10px 4px; margin-top: 4px;
    border-top: 1px solid var(--line);
  }
  .tool-full { display: none; }
  .sky-layout { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .about-card { order: -1; }
  .about-big { max-width: none; }
  .secrets-grid { grid-template-columns: repeat(2, 1fr); }
  .stage { aspect-ratio: 4 / 5; max-height: 74vh; }
  .explore-map { height: clamp(420px, 88vw, 560px); }
  .orbit-node { transform: translate(-50%, -50%) rotate(var(--a)) translateX(clamp(118px, 32vw, 200px)) rotate(calc(-1 * var(--a))); padding: 8px 12px 8px 9px; }
  .node-label { font-size: 11px; }
  .explore-readout { font-size: 14px; bottom: 0; }
  .hero-foot { justify-content: center; }
  .hero-tip { display: none; }
  .scroll-cue { position: static; transform: none; }
}

@media (max-width: 620px) {
  :root { --nav-h: 62px; }
  .brand-dev { display: none; }
  .brand-word { font-size: 18px; }
  .secrets-grid { grid-template-columns: 1fr; }
  .hud-center { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); }
  .hud-left { margin-top: 0; }
  .hud-name { display: none; }
  .hud-right .timer { display: none; }
  .mode-pills { gap: 4px; }
  .stage-foot { font-size: 9px; }
  .stage-foot-right { display: none; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-star { bottom: 16px; }
  .footer-note { flex-direction: column; gap: 4px; }
  .hero-stats { gap: 12px; font-size: 9px; }
  .hero-lead { max-width: 20ch; }
  .about-links { gap: 16px; }
  .lang { display: flex; }
}

@media (max-width: 430px) {
  .tool { width: 34px; height: 34px; }
  .tool-full { display: none; }
  .nav-tools { gap: 2px; }
  .lang { display: none; }
  .hero-title { margin-top: 14px; }
  .ov-card { padding: 22px 18px; }
  .ov-stats { gap: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important; scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}
