/* Ivyture — site stylesheet.
   Theme: html[data-theme] is set before first paint by the inline script in <head> (stored choice, else the
   browser's light/dark preference, else dark). Without JavaScript the media query below does the same. */

@font-face {
  font-family: "Kurale";
  /* Kurale by Eduardo Tunni, SIL Open Font License 1.1 (https://openfontlicense.org). The same face as the game UI. */
  src: url("../fonts/Kurale-Regular.ttf") format("truetype");
  font-display: swap;
}

:root {
  --bg: #060a13;
  --bg-soft: #0a1120;
  --bg-raise: #0f182b;
  --card: rgba(22, 34, 60, 0.55);
  --card-solid: #0f1829;
  --line: rgba(140, 180, 255, 0.13);
  --line-strong: rgba(140, 180, 255, 0.26);
  --text: #eaf1fb;
  --text-2: #bccadf;
  --muted: #8395af;
  --accent: #5cc8ff;
  --accent-strong: #2f9bff;
  --accent-ink: #04121f;
  --ivy: #3fe0a8;
  --warm: #ff9d4d;
  --grad: linear-gradient(115deg, #8ae6ff 0%, #4aa8ff 38%, #9a86ff 68%, #ffa06b 100%);
  --grad-ivy: linear-gradient(135deg, #3fe0a8 0%, #4cc3ff 100%);
  --glow: rgba(76, 170, 255, 0.35);
  --shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.85);
  --shadow-sm: 0 12px 30px -16px rgba(0, 0, 0, 0.7);
  --glass: rgba(8, 13, 24, 0.66);
  --code-bg: #0a1222;
  --stars: 1;
  color-scheme: dark;

  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-display: ui-sans-serif, system-ui, -apple-system, "Segoe UI Variable Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-brand: "Kurale", "Georgia", "Times New Roman", serif;
  --font-mono: ui-monospace, "Cascadia Code", "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 22px;
  --radius-sm: 14px;
  --header-h: 72px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f5f8fc;
    --bg-soft: #ebf2fa;
    --bg-raise: #ffffff;
    --card: rgba(255, 255, 255, 0.78);
    --card-solid: #ffffff;
    --line: rgba(20, 52, 104, 0.12);
    --line-strong: rgba(20, 52, 104, 0.24);
    --text: #0a1628;
    --text-2: #2b3c56;
    --muted: #5a6a82;
    --accent: #0b86d9;
    --accent-strong: #0068c4;
    --accent-ink: #ffffff;
    --ivy: #0c9f6e;
    --warm: #de6710;
    --grad: linear-gradient(115deg, #0aa8e2 0%, #2f6bff 42%, #7a4dff 70%, #ff7a3d 100%);
    --grad-ivy: linear-gradient(135deg, #10b981 0%, #0b86d9 100%);
    --glow: rgba(11, 134, 217, 0.22);
    --shadow: 0 40px 80px -45px rgba(18, 40, 80, 0.4);
    --shadow-sm: 0 12px 28px -18px rgba(18, 40, 80, 0.35);
    --glass: rgba(250, 252, 255, 0.74);
    --code-bg: #0c1426;
    --stars: 0.5;
    color-scheme: light;
  }
}

:root[data-theme="light"] {
  --bg: #f5f8fc;
  --bg-soft: #ebf2fa;
  --bg-raise: #ffffff;
  --card: rgba(255, 255, 255, 0.78);
  --card-solid: #ffffff;
  --line: rgba(20, 52, 104, 0.12);
  --line-strong: rgba(20, 52, 104, 0.24);
  --text: #0a1628;
  --text-2: #2b3c56;
  --muted: #5a6a82;
  --accent: #0b86d9;
  --accent-strong: #0068c4;
  --accent-ink: #ffffff;
  --ivy: #0c9f6e;
  --warm: #de6710;
  --grad: linear-gradient(115deg, #0aa8e2 0%, #2f6bff 42%, #7a4dff 70%, #ff7a3d 100%);
  --grad-ivy: linear-gradient(135deg, #10b981 0%, #0b86d9 100%);
  --glow: rgba(11, 134, 217, 0.22);
  --shadow: 0 40px 80px -45px rgba(18, 40, 80, 0.4);
  --shadow-sm: 0 12px 28px -18px rgba(18, 40, 80, 0.35);
  --glass: rgba(250, 252, 255, 0.74);
  --code-bg: #0c1426;
  --stars: 0.5;
  color-scheme: light;
}

/* ───────────────────────────── Base ───────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.65 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color 0.5s var(--ease), color 0.5s var(--ease);
}
img, video, svg, canvas { display: block; max-width: 100%; }
img, video { height: auto; }
a { color: inherit; text-decoration: none; }
main :is(p, li, dd) a:not(.btn):not(.button):not(.card), .prose a { color: var(--accent); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent); text-underline-offset: 3px; transition: text-decoration-color 0.2s; }
main :is(p, li, dd) a:not(.btn):not(.button):not(.card):hover, .prose a:hover { text-decoration-color: currentColor; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.08; letter-spacing: -0.025em; margin: 0 0 0.5em; font-weight: 750; text-wrap: balance; }
p { margin: 0 0 1em; text-wrap: pretty; }
::selection { background: color-mix(in srgb, var(--accent) 40%, transparent); color: var(--text); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.skip-link { position: fixed; left: 16px; top: -60px; z-index: 200; padding: 10px 16px; background: var(--accent); color: var(--accent-ink); border-radius: 10px; font-weight: 650; transition: top 0.2s; }
.skip-link:focus { top: 12px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

html { scrollbar-color: color-mix(in srgb, var(--muted) 55%, transparent) transparent; scrollbar-width: thin; }

/* Slide-in reveals start off to the side; clip (not hidden) so sticky children keep working. */
main, .site-footer { overflow-x: clip; }
.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.wrap-narrow { width: min(100% - 2 * var(--gutter), 820px); margin-inline: auto; }
.section { position: relative; padding-block: clamp(80px, 11vw, 150px); }
.section + .section { padding-top: 0; }
.section-soft { background: var(--bg-soft); }
.center { text-align: center; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font: 650 0.78rem/1 var(--font-sans); letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 18px;
}
.eyebrow::before { content: ""; width: 26px; height: 2px; border-radius: 2px; background: currentColor; opacity: 0.7; }
.center .eyebrow::after { content: ""; width: 26px; height: 2px; border-radius: 2px; background: currentColor; opacity: 0.7; }

.h-display { font-size: clamp(2.4rem, 5.6vw, 4.6rem); font-weight: 800; letter-spacing: -0.035em; }
.h-section { font-size: clamp(2rem, 4.4vw, 3.5rem); font-weight: 780; letter-spacing: -0.03em; }
.lead { font-size: clamp(1.08rem, 1.6vw, 1.3rem); color: var(--text-2); line-height: 1.6; max-width: 62ch; }
.center .lead { margin-inline: auto; }
.muted { color: var(--muted); }
.gradient-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; background-size: 200% 100%; animation: gradient-pan 9s var(--ease-in-out) infinite alternate; }
.brand-font { font-family: var(--font-brand); font-weight: 400; letter-spacing: -0.01em; }
@keyframes gradient-pan { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }

.section-head { margin-bottom: clamp(40px, 6vw, 72px); }
.section-head.center { display: flex; flex-direction: column; align-items: center; }

/* ───────────────────────────── Scroll progress ───────────────────────────── */

.progress { position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 120; pointer-events: none; }
.progress span { display: block; height: 100%; background: var(--grad); transform-origin: 0 50%; transform: scaleX(var(--progress, 0)); box-shadow: 0 0 12px var(--glow); }

/* ───────────────────────────── Header ───────────────────────────── */

.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100; height: var(--header-h);
  display: flex; align-items: center;
  transition: background-color 0.4s var(--ease), backdrop-filter 0.4s, box-shadow 0.4s, transform 0.45s var(--ease), color 0.4s;
}
.site-header::after { content: ""; position: absolute; inset: auto 0 0 0; height: 1px; background: var(--line); opacity: 0; transition: opacity 0.4s; }
.site-header.is-solid { background: var(--glass); backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px); }
.site-header.is-solid::after { opacity: 1; }
.site-header.is-hidden { transform: translateY(-100%); }
.site-header.on-hero { color: #fff; }
.site-header .wrap { display: flex; align-items: center; gap: 28px; width: min(100% - 2 * var(--gutter), 1320px); }

.logo { display: inline-flex; align-items: center; gap: 10px; font: 750 1.2rem/1 var(--font-display); letter-spacing: -0.02em; flex-shrink: 0; }
.logo-mark { width: 30px; height: 30px; transition: transform 0.6s var(--ease); }
.logo:hover .logo-mark { transform: rotate(-8deg) scale(1.08); }
.logo-mark .leaf-l { transform-origin: 16px 18px; animation: leaf 6s var(--ease-in-out) infinite; }
.logo-mark .leaf-r { transform-origin: 16px 14px; animation: leaf 6s var(--ease-in-out) infinite reverse; }
@keyframes leaf { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-5deg); } }

.nav { margin-left: auto; }
.nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.nav a {
  position: relative; display: block; padding: 9px 14px; border-radius: 999px;
  font-weight: 560; font-size: 0.95rem; opacity: 0.82; transition: opacity 0.25s, background-color 0.25s;
}
.nav a:hover { opacity: 1; background: color-mix(in srgb, currentColor 8%, transparent); }
.nav a[aria-current="page"] { opacity: 1; }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: 50%; bottom: 3px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--grad-ivy); box-shadow: 0 0 10px var(--ivy); }

.header-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid color-mix(in srgb, currentColor 18%, transparent); background: color-mix(in srgb, currentColor 5%, transparent);
  cursor: pointer; transition: background-color 0.25s, border-color 0.25s, transform 0.25s var(--ease);
}
.icon-btn:hover { background: color-mix(in srgb, currentColor 12%, transparent); transform: translateY(-1px); }
.icon-btn svg { width: 20px; height: 20px; }

.theme-toggle .sun, .theme-toggle .moon { transition: transform 0.6s var(--ease), opacity 0.4s; transform-origin: center; }
[data-theme="dark"] .theme-toggle .sun { transform: rotate(90deg) scale(0.4); opacity: 0; }
[data-theme="light"] .theme-toggle .moon { transform: rotate(-90deg) scale(0.4); opacity: 0; }
.theme-toggle svg { grid-area: 1 / 1; }
.theme-toggle { display: inline-grid; }

.menu-toggle { display: none; }
.menu-toggle .bar { transition: transform 0.4s var(--ease), opacity 0.3s; transform-origin: center; }
.nav-open .menu-toggle .bar-1 { transform: translateY(5px) rotate(45deg); }
.nav-open .menu-toggle .bar-2 { opacity: 0; }
.nav-open .menu-toggle .bar-3 { transform: translateY(-5px) rotate(-45deg); }

.mobile-nav {
  position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; justify-content: center;
  padding: calc(var(--header-h) + 24px) var(--gutter) 40px; background: var(--bg);
  clip-path: circle(0 at calc(100% - 44px) 36px); visibility: hidden;
  transition: clip-path 0.7s var(--ease), visibility 0s 0.7s;
}
.nav-open .mobile-nav { clip-path: circle(150% at calc(100% - 44px) 36px); visibility: visible; transition: clip-path 0.8s var(--ease), visibility 0s; }
.mobile-nav ul { list-style: none; margin: 0; padding: 0; }
.mobile-nav li { overflow: hidden; }
.mobile-nav li a {
  display: block; padding: 8px 0; font: 780 clamp(2.2rem, 10vw, 3.4rem)/1.1 var(--font-display); letter-spacing: -0.03em;
  transform: translateY(110%); transition: transform 0.7s var(--ease), color 0.2s;
}
.mobile-nav li a[aria-current="page"] { color: var(--accent); }
.nav-open .mobile-nav li a { transform: none; transition-delay: calc(0.12s + var(--i, 0) * 0.06s); }
.mobile-nav .mobile-extra { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 12px; opacity: 0; transform: translateY(12px); transition: opacity 0.5s, transform 0.5s var(--ease); }
.nav-open .mobile-nav .mobile-extra { opacity: 1; transform: none; transition-delay: 0.45s; }
.nav-open body { overflow: hidden; }
.nav-open .site-header { color: var(--text); background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.nav-open .site-header::after { opacity: 0; }

/* ───────────────────────────── Buttons & chips ───────────────────────────── */

.btn {
  --btn-bg: color-mix(in srgb, currentColor 7%, transparent);
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, currentColor 22%, transparent);
  background: var(--btn-bg); font: 650 1rem/1 var(--font-sans); letter-spacing: -0.005em; white-space: nowrap;
  cursor: pointer; transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background-color 0.3s, border-color 0.3s;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.btn:hover { transform: translateY(-2px); border-color: color-mix(in srgb, currentColor 40%, transparent); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn svg { width: 20px; height: 20px; flex-shrink: 0; transition: transform 0.35s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.35) 50%, transparent 80%);
  transform: translateX(-120%); transition: transform 0.9s var(--ease);
}
.btn:hover::before { transform: translateX(120%); }
.btn-primary { color: #fff; border-color: transparent; background: linear-gradient(120deg, #2f9bff, #5b6cff 55%, #8b5cff); box-shadow: 0 10px 34px -10px rgba(76, 120, 255, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.btn-primary:hover { box-shadow: 0 16px 44px -10px rgba(76, 120, 255, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.3); border-color: transparent; }
.btn-steam { color: #fff; border-color: rgba(255, 255, 255, 0.18); background: linear-gradient(135deg, #1b2838 0%, #2a475e 100%); box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.6); }
.btn-steam:hover { border-color: rgba(102, 192, 244, 0.6); box-shadow: 0 14px 40px -12px rgba(102, 192, 244, 0.45); }
.btn-steam .btn-sub { display: block; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.7; margin-bottom: 3px; }
.btn-steam .btn-text { text-align: left; line-height: 1; }
.btn-ghost { color: inherit; }
.btn-sm { min-height: 42px; padding: 0 18px; font-size: 0.92rem; }
.btn-block { width: 100%; white-space: normal; text-align: center; line-height: 1.2; padding-block: 12px; }
:is(.grid-2, .grid-3, .grid-4, .features, .spotlight, .contact-grid, .legal, .story, .planet-layout, .mod-layout, .split, .support-grid, .footer-grid) > * { min-width: 0; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.center .btn-row { justify-content: center; }

.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: color-mix(in srgb, var(--bg-raise) 60%, transparent);
  font-size: 0.88rem; font-weight: 560; color: var(--text-2);
}
.chip-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ivy); box-shadow: 0 0 10px var(--ivy); }
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* ───────────────────────────── Hero ───────────────────────────── */

.hero {
  position: sticky; top: 0; z-index: 0; height: 100vh; height: 100svh; min-height: 600px;
  display: grid; place-items: center; overflow: hidden; color: #fff; background: #04070d;
  --p: 0;
}
.hero.is-covered { visibility: hidden; }
.hero-stage {
  position: absolute; inset: 0; overflow: hidden;
  transform: scale(calc(1 - var(--p) * 0.14)) translateY(calc(var(--p) * -4vh));
  border-radius: calc(var(--p) * 48px);
  filter: brightness(calc(1 - var(--p) * 0.6)) saturate(calc(1 - var(--p) * 0.4));
  will-change: transform;
}
.hero-poster, .hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-poster { transform: scale(1.04); }
.hero-video { opacity: 0; transition: opacity 1.4s var(--ease-in-out); }
.hero-video.is-active { opacity: 1; }
.hero-video.is-active { animation: drift 16s linear both; }
@keyframes drift { from { transform: scale(1.06); } to { transform: scale(1.0); } }
.hero-shade {
  position: absolute; inset: 0; pointer-events: none;
  background:
    /* A soft pool of shade behind the title and buttons keeps them readable on bright footage without a text-shadow
       (which the per-line reveal masks would cut into bands). */
    radial-gradient(58% 44% at 50% 50%, rgba(4, 8, 16, 0.42) 0%, rgba(4, 8, 16, 0.18) 55%, rgba(4, 8, 16, 0) 100%),
    linear-gradient(180deg, rgba(4, 8, 16, 0.42) 0%, rgba(4, 8, 16, 0) 20%, rgba(4, 8, 16, 0) 70%, rgba(4, 8, 16, 0.5) 100%);
}

.hero-content {
  position: relative; z-index: 2; text-align: center; padding: calc(var(--header-h) + 20px) var(--gutter) 150px;
  transform: translateY(calc(var(--p) * -22vh)) scale(calc(1 - var(--p) * 0.08)); opacity: calc(1 - var(--p) * 1.7);
  max-width: 1100px;
}
.hero-eyebrow { color: rgba(255, 255, 255, 0.85); justify-content: center; }
.hero-eyebrow::after { content: ""; width: 26px; height: 2px; border-radius: 2px; background: currentColor; opacity: 0.7; }
.hero-title {
  font-size: clamp(2.8rem, min(10.5vw, 12.5vh), 9.4rem); line-height: 0.92; letter-spacing: -0.045em; font-weight: 820; margin: 0 0 26px;
}
.hero-title .brand-font { letter-spacing: -0.02em; font-weight: 400; }
.hero-title .line { display: block; overflow: hidden; padding: 0.02em 0.1em 0.16em; margin: 0 -0.1em -0.16em; }
.hero-title .line > span { display: inline-block; transform: translateY(105%); animation: rise 1.2s var(--ease) forwards; animation-delay: calc(0.25s + var(--i, 0) * 0.12s); }
.hero-lead { font-size: clamp(1.02rem, min(1.9vw, 2.6vh), 1.42rem); color: rgba(255, 255, 255, 0.9); text-shadow: 0 1px 14px rgba(4, 8, 16, 0.45); max-width: 44ch; margin: 0 auto min(38px, 4vh); opacity: 0; animation: fade-up 1s var(--ease) 0.75s forwards; }
.hero .btn-row { justify-content: center; opacity: 0; animation: fade-up 1s var(--ease) 0.95s forwards; }
.hero .btn-ghost { color: #fff; }
.hero-eyebrow { opacity: 0; animation: fade-up 1s var(--ease) 0.1s forwards; }
.hero-icon { width: clamp(64px, 8vw, 92px); height: auto; margin: 0 auto 22px; border-radius: 22%; box-shadow: 0 18px 50px -12px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.15); opacity: 0; animation: pop 1.1s var(--ease) 0.15s forwards; }
@keyframes rise { to { transform: none; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; transform: translateY(14px); } }
@keyframes pop { from { opacity: 0; transform: scale(0.6) rotate(-12deg); } to { opacity: 1; transform: none; } }

/* Clip indicator: plain labels over thin progress lines. The fade-in has no end keyframe, so the opacity that
   follows the scroll (--p) takes over once it finishes. */
.reel-bar {
  position: absolute; z-index: 3; left: 0; right: 0; bottom: 30px; display: flex; align-items: flex-end; gap: 28px;
  width: min(100% - 2 * var(--gutter), 1320px); margin: 0 auto; opacity: calc(1 - var(--p) * 2.4);
  animation: fade-in 1s var(--ease) 1.2s both;
}
.reel-index { display: flex; gap: clamp(14px, 2vw, 26px); flex: 1 1 auto; max-width: 680px; }
.reel-chip {
  flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: stretch; gap: 11px;
  padding: 8px 0 6px; border: 0; background: none; cursor: pointer; text-align: left;
  color: rgba(255, 255, 255, 0.5); font: 650 0.72rem/1 var(--font-sans); letter-spacing: 0.16em; text-transform: uppercase;
  transition: color 0.3s;
}
.reel-chip:hover { color: rgba(255, 255, 255, 0.85); }
.reel-chip.is-active { color: #fff; }
.reel-track { position: relative; display: block; height: 2px; border-radius: 2px; background: rgba(255, 255, 255, 0.22); overflow: hidden; }
.reel-track i { position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(90deg, #3fe0a8, #4cc3ff); transform-origin: 0 50%; transform: scaleX(var(--t, 0)); }
.reel-caption { margin: 0 0 3px auto; font-size: 0.88rem; color: rgba(255, 255, 255, 0.75); white-space: nowrap; transition: opacity 0.35s var(--ease); }
.reel-caption.is-changing { opacity: 0; }
.reel-pause { width: 34px; height: 34px; flex-shrink: 0; color: #fff; border-color: rgba(255, 255, 255, 0.3); background: transparent; }
.reel-pause:hover { background: rgba(255, 255, 255, 0.12); }
.reel-pause svg { width: 14px; height: 14px; }
.reel-pause .i-play { display: none; }
.reel-pause[aria-pressed=true] .i-play { display: block; }
.reel-pause[aria-pressed=true] .i-pause { display: none; }

/* Scroll cue: a thin line with a drop running down it. */
.scroll-cue {
  position: absolute; z-index: 3; left: 0; right: 0; bottom: 92px; width: 24px; height: 46px; margin: 0 auto;
  opacity: calc(0.9 - var(--p) * 4); animation: fade-in 1s var(--ease) 1.6s both;
}
.scroll-cue::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; margin-left: -0.5px; background: linear-gradient(rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.55)); }
.scroll-cue::after { content: ""; position: absolute; left: 50%; top: 0; width: 3px; height: 10px; margin-left: -1.5px; border-radius: 3px; background: #fff; animation: drop 2.2s var(--ease-in-out) infinite; }
@keyframes drop { 0% { transform: translateY(-10px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(46px); opacity: 0; } }

/* The page slides over the hero like a sheet. */
.sheet {
  position: relative; z-index: 2; background: var(--bg);
  border-radius: clamp(24px, 4vw, 44px) clamp(24px, 4vw, 44px) 0 0;
  box-shadow: 0 -40px 100px -20px rgba(0, 0, 0, 0.55);
  transition: background-color 0.5s var(--ease);
}
.sheet::before {
  content: ""; position: absolute; top: 0; left: 8%; right: 8%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--ivy), var(--accent), transparent); opacity: 0.8;
}
.sheet-handle { position: absolute; top: 12px; left: 50%; width: 44px; height: 5px; margin-left: -22px; border-radius: 5px; background: var(--line-strong); }

/* Pages without a video hero get a compact animated header instead. */
.page-hero { position: relative; overflow: hidden; padding: calc(var(--header-h) + clamp(70px, 12vw, 150px)) 0 clamp(60px, 9vw, 110px); isolation: isolate; }
.page-hero h1 { font-size: clamp(2.8rem, 8vw, 6.4rem); font-weight: 820; letter-spacing: -0.045em; margin-bottom: 22px; }
.page-hero .lead { margin-bottom: 0; }
.aurora { position: absolute; inset: -20% -10% auto; height: 140%; z-index: -1; pointer-events: none; filter: blur(60px) saturate(140%); opacity: 0.75; }
.aurora span { position: absolute; border-radius: 50%; mix-blend-mode: screen; animation: float 18s var(--ease-in-out) infinite alternate; }
[data-theme="light"] .aurora span { mix-blend-mode: multiply; opacity: 0.55; }
.aurora span:nth-child(1) { width: 46vw; height: 46vw; left: -6vw; top: 0; background: radial-gradient(circle, rgba(47, 155, 255, 0.55), transparent 65%); }
.aurora span:nth-child(2) { width: 38vw; height: 38vw; right: -4vw; top: 6vw; background: radial-gradient(circle, rgba(63, 224, 168, 0.4), transparent 65%); animation-duration: 22s; animation-delay: -6s; }
.aurora span:nth-child(3) { width: 30vw; height: 30vw; left: 38vw; top: 14vw; background: radial-gradient(circle, rgba(154, 134, 255, 0.45), transparent 65%); animation-duration: 26s; animation-delay: -11s; }
@keyframes float { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(4vw, -3vw) scale(1.12); } 100% { transform: translate(-3vw, 2vw) scale(0.94); } }
.grid-bg {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px; mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 20%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 20%, transparent 75%);
  animation: grid-move 30s linear infinite;
}
@keyframes grid-move { to { background-position: 56px 56px; } }
.floaters { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.floaters i {
  position: absolute; width: var(--s, 28px); height: var(--s, 28px); border-radius: 6px; left: var(--x); top: var(--y);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 70%, #fff 10%), var(--accent-strong)); opacity: 0.18;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25); animation: bob var(--d, 12s) var(--ease-in-out) infinite alternate; transform: rotate(var(--r, 20deg));
}
@keyframes bob { from { transform: translateY(0) rotate(var(--r, 20deg)); } to { transform: translateY(-40px) rotate(calc(var(--r, 20deg) + 60deg)); } }

/* ───────────────────────────── Reveal on scroll ───────────────────────────── */

.js [data-reveal] { opacity: 0; transform: translateY(34px); transition: opacity 1s var(--ease), transform 1.1s var(--ease); transition-delay: calc(var(--d, 0) * 1s + var(--i, 0) * 0.08s); }
.js [data-reveal="left"] { transform: translateX(-40px); }
.js [data-reveal="right"] { transform: translateX(40px); }
.js [data-reveal="scale"] { transform: scale(0.94); }
.js [data-reveal="blur"] { filter: blur(12px); transform: translateY(20px); transition-property: opacity, transform, filter; }
.js [data-reveal].is-in { opacity: 1; transform: none; filter: none; }

.js [data-split] .w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0 0.06em 0.14em; margin: 0 -0.06em -0.14em; }
.js [data-split] .w > span { display: inline-block; transform: translateY(108%) rotate(4deg); transform-origin: 0 100%; transition: transform 1.1s var(--ease); transition-delay: calc(var(--i, 0) * 0.035s); }
.js [data-split].is-in .w > span { transform: none; }

/* ───────────────────────────── Studio statement ───────────────────────────── */

.statement { font-size: clamp(1.7rem, 3.8vw, 3.2rem); line-height: 1.18; font-weight: 700; letter-spacing: -0.03em; max-width: 24ch; }
.statement em { font-style: normal; }
.statement .dim { color: var(--muted); }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: clamp(40px, 6vw, 70px); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--line); }
.fact { padding: 28px 28px 26px; background: var(--bg); transition: background-color 0.4s; }
.fact:hover { background: var(--bg-soft); }
.fact .k { font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 650; margin-bottom: 8px; }
.fact .v { font: 720 clamp(1.3rem, 2.4vw, 1.75rem)/1.2 var(--font-display); letter-spacing: -0.02em; }
.fact .v.brand-font { font-family: var(--font-brand); font-weight: 400; font-size: clamp(1.45rem, 2.6vw, 1.95rem); letter-spacing: 0; }

/* ───────────────────────────── Marquee ───────────────────────────── */

.marquee { position: relative; overflow: hidden; padding-block: clamp(22px, 3vw, 34px); border-block: 1px solid var(--line); background: var(--bg-soft); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-group { display: flex; align-items: center; gap: clamp(24px, 4vw, 56px); padding-right: clamp(24px, 4vw, 56px); }
.marquee-group span { font: 800 clamp(2rem, 5vw, 4rem)/1 var(--font-display); letter-spacing: -0.035em; white-space: nowrap; }
.marquee-group span:nth-child(4n+2) { color: transparent; -webkit-text-stroke: 1.5px var(--text-2); }
.marquee-group span:nth-child(4n) { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.marquee-group .star { width: clamp(18px, 2.4vw, 28px); height: clamp(18px, 2.4vw, 28px); color: var(--accent); animation: spin 8s linear infinite; flex-shrink: 0; }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ───────────────────────────── Cards ───────────────────────────── */

.card {
  position: relative; isolation: isolate; overflow: hidden; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--card); padding: clamp(24px, 3vw, 34px);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transition: transform 0.6s var(--ease), border-color 0.4s, box-shadow 0.6s var(--ease), background-color 0.5s;
}
.card h3 { font-size: 1.32rem; letter-spacing: -0.02em; margin-bottom: 10px; }
.card p { color: var(--text-2); margin: 0; }
.spot::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0; transition: opacity 0.5s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%);
}
.spot::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; opacity: 0; transition: opacity 0.5s;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), var(--accent), transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.spot:hover::before, .spot:hover::after { opacity: 1; }
.card.lift:hover { transform: translateY(-6px); box-shadow: var(--shadow); }

.card-icon {
  display: grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; margin-bottom: 22px;
  background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent);
  transition: transform 0.6s var(--ease), background-color 0.4s;
}
.card-icon svg { width: 28px; height: 28px; }
.card:hover .card-icon { transform: rotate(-8deg) scale(1.08); background: color-mix(in srgb, var(--accent) 20%, transparent); }
.card-icon.ivy { background: color-mix(in srgb, var(--ivy) 12%, transparent); color: var(--ivy); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ivy) 30%, transparent); }
.card-icon.warm { background: color-mix(in srgb, var(--warm) 12%, transparent); color: var(--warm); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warm) 30%, transparent); }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(14px, 2vw, 22px); }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(14px, 2vw, 22px); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(14px, 2vw, 18px); }

/* ───────────────────────────── Game spotlight (home) ───────────────────────────── */

.spotlight { display: grid; grid-template-columns: 1.02fr 1fr; gap: clamp(36px, 6vw, 90px); align-items: center; }
.game-title { font-family: var(--font-brand); font-weight: 400; font-size: clamp(3rem, 7vw, 5.6rem); line-height: 0.95; letter-spacing: -0.02em; margin-bottom: 22px; }
.game-badge { display: flex; align-items: center; gap: 16px; margin-bottom: 26px; }
.game-badge img { width: 64px; height: 64px; border-radius: 16px; box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); }
.game-badge .t { font-weight: 700; }
.game-badge .s { color: var(--muted); font-size: 0.92rem; }
.checklist { list-style: none; padding: 0; margin: 0 0 34px; display: grid; gap: 12px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; color: var(--text-2); }
.checklist li::before {
  content: ""; flex-shrink: 0; width: 22px; height: 22px; margin-top: 2px; border-radius: 50%;
  background: color-mix(in srgb, var(--ivy) 16%, transparent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233fe0a8' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 13px no-repeat;
}

.device {
  position: relative; border-radius: calc(var(--radius) + 6px); padding: 10px; background: linear-gradient(160deg, color-mix(in srgb, var(--text) 12%, transparent), color-mix(in srgb, var(--text) 3%, transparent));
  box-shadow: var(--shadow), 0 0 0 1px var(--line); transform-style: preserve-3d; transition: transform 0.8s var(--ease);
  transform: perspective(1200px) rotateY(var(--ry, -8deg)) rotateX(var(--rx, 4deg));
}
.device::before { content: ""; position: absolute; inset: 12% -8% -10%; z-index: -1; background: radial-gradient(closest-side, var(--glow), transparent); filter: blur(30px); }
.device video, .device img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); background: #0b1220; }
.device .device-tag { position: absolute; left: 26px; bottom: 26px; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: rgba(6, 10, 18, 0.6); color: #fff; font-size: 0.82rem; font-weight: 600; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.device .rec { width: 8px; height: 8px; border-radius: 50%; background: #ff4d5e; box-shadow: 0 0 10px #ff4d5e; animation: blink 1.4s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0.2; } }

/* ───────────────────────────── Contact & company ───────────────────────────── */

.contact-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(16px, 2vw, 24px); align-items: stretch; }
.mail-card { display: flex; flex-direction: column; justify-content: space-between; gap: 30px; min-height: 100%; background: linear-gradient(150deg, color-mix(in srgb, var(--accent) 16%, var(--card-solid)), var(--card-solid) 60%); }
.mail-big { display: inline-block; font: 760 clamp(1.5rem, 3.4vw, 2.5rem)/1.1 var(--font-display); letter-spacing: -0.03em; word-break: break-word; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; background-size: 200% 100%; animation: gradient-pan 9s var(--ease-in-out) infinite alternate; }
.copy-btn { position: relative; }
.copy-btn .done { display: none; }
.copy-btn.is-copied .done { display: inline; }
.copy-btn.is-copied .idle { display: none; }

.form { display: grid; gap: 14px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: grid; gap: 7px; }
.field label { font-size: 0.86rem; font-weight: 620; color: var(--text-2); }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 15px; border-radius: 12px; border: 1px solid var(--line-strong); background: color-mix(in srgb, var(--bg) 70%, transparent);
  color: var(--text); font: inherit; transition: border-color 0.25s, box-shadow 0.25s, background-color 0.25s;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent); }
.form-note { font-size: 0.84rem; color: var(--muted); margin: 0; }

.legal { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(30px, 5vw, 70px); align-items: start; }
.legal-list { display: grid; grid-template-columns: max-content 1fr; margin: 0; border-top: 1px solid var(--line); }
.legal-list dt, .legal-list dd { padding: 18px 0; border-bottom: 1px solid var(--line); margin: 0; }
.legal-list dt { color: var(--muted); font-size: 0.9rem; font-weight: 600; padding-right: 32px; }
.legal-list dd { font-weight: 560; }

/* ───────────────────────────── Avion page ───────────────────────────── */

.jump-nav { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 14px; opacity: 0; animation: fade-up 1s var(--ease) 1.1s forwards; }
.jump-nav a {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; color: #fff; font-weight: 600; font-size: 0.92rem;
  border: 1px solid rgba(255, 255, 255, 0.2); background: rgba(6, 10, 18, 0.28); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: background-color 0.3s, border-color 0.3s, transform 0.3s var(--ease);
}
.jump-nav a:hover { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.4); transform: translateY(-2px); }
.jump-nav svg { width: 16px; height: 16px; }

.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(12px, 1.6vw, 18px); }
.feature { min-height: 290px; display: flex; flex-direction: column; }
.feature p { font-size: 0.97rem; }
.feature .tag { margin-top: auto; padding-top: 22px; font: 600 0.72rem/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.feature.wide { grid-column: span 2; }
.feature .glyph { position: absolute; right: -20px; bottom: -30px; width: 170px; height: 170px; color: var(--accent); opacity: 0.07; z-index: -1; transition: transform 1s var(--ease), opacity 0.5s; }
.feature:hover .glyph { transform: rotate(-12deg) scale(1.1); opacity: 0.13; }

/* Building: steps scroll past a sticky video. */
.story { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(30px, 6vw, 90px); align-items: start; }
.story-steps { display: grid; gap: 0; }
.story-step { min-height: 72vh; display: flex; flex-direction: column; justify-content: center; padding-block: 40px; opacity: 0.32; transition: opacity 0.6s var(--ease); }
.story-step:first-child { min-height: 60vh; }
.story-step.is-active { opacity: 1; }
.story-step .n { font: 650 0.8rem/1 var(--font-mono); color: var(--accent); letter-spacing: 0.12em; margin-bottom: 16px; display: flex; align-items: center; gap: 12px; }
.story-step .n::after { content: ""; height: 1px; width: 60px; background: var(--line-strong); }
.story-step h3 { font-size: clamp(1.7rem, 3vw, 2.5rem); letter-spacing: -0.03em; }
.story-step p { color: var(--text-2); font-size: 1.06rem; max-width: 44ch; }
.story-media { position: sticky; top: calc(50vh - min(26vw, 280px)); }
.story-frame { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #0b1220; box-shadow: var(--shadow), 0 0 0 1px var(--line); }
.story-frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.04); transition: opacity 0.8s var(--ease), transform 1.2s var(--ease); }
.story-frame video.is-active { opacity: 1; transform: none; }
.story-dots { display: flex; gap: 8px; justify-content: center; margin-top: 18px; }
.story-dots span { width: 8px; height: 8px; border-radius: 8px; background: var(--line-strong); transition: width 0.5s var(--ease), background-color 0.4s; }
.story-dots span.is-active { width: 28px; background: var(--accent); }
.story-caption { position: absolute; left: 16px; top: 16px; padding: 7px 12px; border-radius: 999px; background: rgba(6, 10, 18, 0.62); color: #fff; font-size: 0.78rem; font-weight: 650; letter-spacing: 0.04em; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }

/* Planets: a dark sky regardless of theme. */
.space { position: relative; overflow: hidden; color: #eaf1fb; background: radial-gradient(120% 80% at 70% 40%, #0d1a3a 0%, #060b1a 45%, #03050c 100%); isolation: isolate; }
.space .lead, .space p { color: rgba(234, 241, 251, 0.78); }
.space .eyebrow { color: #8fd4ff; }
.space .chip { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.16); color: rgba(234, 241, 251, 0.86); }
.starfield { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.starfield i { position: absolute; inset: -50%; background-repeat: repeat; animation: twinkle 6s ease-in-out infinite alternate; }
.starfield i:nth-child(1) { background-image: radial-gradient(1px 1px at 20px 30px, #fff, transparent), radial-gradient(1px 1px at 120px 80px, #cfe8ff, transparent), radial-gradient(1.5px 1.5px at 200px 160px, #fff, transparent), radial-gradient(1px 1px at 260px 40px, #fff, transparent); background-size: 300px 200px; animation-duration: 5s; }
.starfield i:nth-child(2) { background-image: radial-gradient(1px 1px at 60px 120px, #fff, transparent), radial-gradient(1.2px 1.2px at 170px 20px, #ffe7c7, transparent), radial-gradient(1px 1px at 330px 150px, #fff, transparent); background-size: 380px 240px; animation-duration: 7s; animation-delay: -3s; opacity: 0.7; }
.starfield i:nth-child(3) { background-image: radial-gradient(2px 2px at 90px 60px, #bfe3ff, transparent), radial-gradient(1.6px 1.6px at 400px 200px, #fff, transparent); background-size: 520px 330px; animation-duration: 9s; animation-delay: -5s; }
@keyframes twinkle { from { opacity: 0.35; transform: translateY(0); } to { opacity: 1; transform: translateY(-12px); } }
.space-clips { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(14px, 2vw, 22px); margin-top: clamp(50px, 7vw, 90px); }
.clip-card { position: relative; margin: 0; border-radius: var(--radius); overflow: hidden; background: #0b1220; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.08); transition: transform 0.7s var(--ease), box-shadow 0.7s var(--ease); }
.clip-card:hover { transform: translateY(-6px); box-shadow: 0 40px 90px -30px rgba(76, 170, 255, 0.35), 0 0 0 1px rgba(143, 212, 255, 0.25); }
.clip-card video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.clip-card figcaption { position: absolute; left: 16px; bottom: 16px; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: rgba(6, 10, 18, 0.62); color: #fff; font-size: 0.84rem; font-weight: 600; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.clip-card .rec { width: 8px; height: 8px; border-radius: 50%; background: #ff4d5e; box-shadow: 0 0 10px #ff4d5e; animation: blink 1.4s steps(2) infinite; }
.planet-layout { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(30px, 5vw, 80px); align-items: center; }
.planet-wrap { position: relative; aspect-ratio: 1; width: 100%; max-width: 640px; margin-inline: auto; }
.planet-wrap canvas { width: 100%; height: 100%; }
.planet-wrap .planet-fallback { position: absolute; inset: 18%; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #7fd2ff, #1d63c9 55%, #0a1c45 80%); box-shadow: 0 0 80px rgba(76, 170, 255, 0.45); }
.planet-wrap.is-live .planet-fallback { display: none; }
.orbit-list { list-style: none; padding: 0; margin: 30px 0 0; display: grid; gap: 18px; }
.orbit-list li { display: grid; grid-template-columns: 44px 1fr; gap: 16px; align-items: start; }
.orbit-list .o { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, 0.18); background: rgba(255, 255, 255, 0.04); color: #8fd4ff; }
.orbit-list .o svg { width: 22px; height: 22px; }
.orbit-list strong { display: block; color: #fff; font-size: 1.06rem; margin-bottom: 2px; }
.orbit-list span { color: rgba(234, 241, 251, 0.72); font-size: 0.97rem; }

/* Modding */
.mod-layout { display: grid; grid-template-columns: 1fr 1.08fr; gap: clamp(30px, 5vw, 80px); align-items: center; }
.code-window { border-radius: var(--radius); overflow: hidden; background: var(--code-bg); color: #d8e3f5; box-shadow: var(--shadow), 0 0 0 1px rgba(140, 180, 255, 0.16); transform: perspective(1400px) rotateY(-6deg) rotateX(3deg); transition: transform 0.9s var(--ease); }
.code-window:hover { transform: none; }
.code-top { display: flex; align-items: center; gap: 8px; padding: 14px 16px; background: rgba(255, 255, 255, 0.04); border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.code-top i { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; }
.code-top i:nth-child(2) { background: #febc2e; }
.code-top i:nth-child(3) { background: #28c840; }
.code-top span { margin-left: 10px; font: 500 0.82rem/1 var(--font-mono); color: rgba(216, 227, 245, 0.6); }
.code-window pre { margin: 0; padding: 22px 24px 26px; overflow-x: auto; font: 0.9rem/1.7 var(--font-mono); min-height: 20em; }
.code-window .caret { display: inline-block; width: 8px; height: 1.15em; margin-left: 1px; vertical-align: text-bottom; background: var(--accent); animation: blink 1s steps(2) infinite; }
.mod-points { list-style: none; padding: 0; margin: 28px 0 34px; display: grid; gap: 14px; }
.mod-points li { display: flex; gap: 14px; align-items: flex-start; color: var(--text-2); }
.mod-points svg { width: 22px; height: 22px; flex-shrink: 0; color: var(--ivy); margin-top: 2px; }
.mod-points strong { color: var(--text); }

/* Call to action */
.cta { position: relative; overflow: hidden; border-radius: clamp(26px, 4vw, 40px); isolation: isolate; color: #fff; padding: clamp(50px, 9vw, 110px) clamp(24px, 6vw, 80px); text-align: center; background: #05080f; }
.cta video, .cta img.cta-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; opacity: 0.55; }
.cta::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(90% 90% at 50% 50%, rgba(5, 8, 15, 0.35), rgba(5, 8, 15, 0.9)); }
.cta h2 { font-size: clamp(2.2rem, 6vw, 4.6rem); font-weight: 820; letter-spacing: -0.04em; }
.cta p { color: rgba(255, 255, 255, 0.82); max-width: 52ch; margin-inline: auto; font-size: 1.12rem; }
.cta .btn-row { justify-content: center; margin-top: 30px; }
.cta .btn-ghost { color: #fff; }

/* ───────────────────────────── About ───────────────────────────── */

.values { counter-reset: v; }
.value { counter-increment: v; }
.value .n::before { content: counter(v, decimal-leading-zero); font: 650 0.8rem/1 var(--font-mono); color: var(--accent); letter-spacing: 0.1em; }
.value .n { margin-bottom: 26px; display: flex; justify-content: space-between; align-items: center; }
.value .n svg { width: 30px; height: 30px; color: var(--accent); transition: transform 0.6s var(--ease); }
.value:hover .n svg { transform: rotate(-10deg) scale(1.1); }
.timeline { position: relative; display: grid; gap: 0; margin-left: 10px; }
.timeline::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--accent), var(--ivy), transparent); border-radius: 2px; }
.tl { position: relative; padding: 0 0 44px 40px; }
.tl::before { content: ""; position: absolute; left: -7px; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 3px solid var(--accent); box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 15%, transparent); }
.tl.now::before { border-color: var(--ivy); animation: pulse 2.2s var(--ease-in-out) infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--ivy) 25%, transparent); } 50% { box-shadow: 0 0 0 12px color-mix(in srgb, var(--ivy) 0%, transparent); } }
.tl .when { font: 650 0.8rem/1 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.tl h3 { font-size: 1.35rem; margin-bottom: 6px; }
.tl p { color: var(--text-2); margin: 0; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 6vw, 90px); align-items: start; }
.prose { font-size: 1.1rem; color: var(--text-2); }
.prose p { margin-bottom: 1.2em; }
.prose strong { color: var(--text); }

/* ───────────────────────────── Support ───────────────────────────── */

.faq { display: grid; gap: 10px; }
.faq details { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card); overflow: hidden; transition: border-color 0.3s, background-color 0.3s; }
.faq details[open] { border-color: var(--line-strong); background: color-mix(in srgb, var(--accent) 5%, var(--card)); }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px 22px; font-weight: 650; font-size: 1.06rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .plus { position: relative; width: 28px; height: 28px; flex-shrink: 0; border-radius: 50%; border: 1px solid var(--line-strong); transition: transform 0.5s var(--ease), background-color 0.3s; }
.faq summary .plus::before, .faq summary .plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: 11px; height: 2px; margin: -1px 0 0 -5.5px; border-radius: 2px; background: currentColor; transition: transform 0.5s var(--ease); }
.faq summary .plus::after { transform: rotate(90deg); }
.faq details[open] summary .plus { transform: rotate(180deg); background: color-mix(in srgb, var(--accent) 15%, transparent); }
.faq details[open] summary .plus::after { transform: rotate(0); }
.faq .answer { padding: 0 22px 22px; color: var(--text-2); }
.faq .answer p:last-child { margin-bottom: 0; }
.faq-body { overflow: hidden; }
.path { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; border-radius: 12px; background: var(--code-bg); color: #d8e3f5; font: 0.86rem/1.5 var(--font-mono); word-break: break-all; }
.path code { flex: 1 1 260px; }
.path .btn { min-height: 34px; padding: 0 12px; font-size: 0.8rem; color: #d8e3f5; }
.support-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(16px, 2vw, 24px); align-items: start; }
.steps-list { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.steps-list li { counter-increment: s; display: grid; grid-template-columns: 36px 1fr; gap: 14px; color: var(--text-2); }
.steps-list li::before { content: counter(s); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); font-weight: 750; }
.steps-list strong { color: var(--text); display: block; }

/* ───────────────────────────── Footer ───────────────────────────── */

.site-footer { position: relative; z-index: 2; background: var(--bg-soft); border-top: 1px solid var(--line); padding: clamp(60px, 8vw, 100px) 0 36px; overflow: hidden; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: clamp(28px, 4vw, 60px); }
.footer-brand p { color: var(--muted); max-width: 34ch; margin-top: 18px; }
.site-footer h4 { font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; font-weight: 700; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.site-footer ul a { color: var(--text-2); transition: color 0.2s; }
.site-footer ul a:hover { color: var(--accent); }
.footer-legal { color: var(--muted); font-size: 0.92rem; line-height: 1.6; font-style: normal; }
.footer-bottom { margin-top: clamp(50px, 7vw, 80px); padding-top: 26px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; color: var(--muted); font-size: 0.9rem; }
.footer-bottom .links { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }
.footer-bottom button { background: none; border: 0; padding: 0; cursor: pointer; color: inherit; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-strong); }
.footer-bottom button:hover { color: var(--text); }
.footer-word { margin-top: 40px; font: 850 clamp(4rem, 17vw, 15rem)/0.8 var(--font-display); letter-spacing: -0.06em; text-align: center; color: transparent; -webkit-text-stroke: 1px var(--line-strong); user-select: none; white-space: nowrap; }
.footer-word span { display: inline-block; transition: color 0.6s var(--ease), transform 0.6s var(--ease); }
.footer-word span:hover { color: color-mix(in srgb, var(--accent) 22%, transparent); transform: translateY(-6px); }

.toast { position: fixed; left: 50%; bottom: 24px; z-index: 150; transform: translate(-50%, 140%); padding: 12px 18px; border-radius: 999px; background: var(--text); color: var(--bg); font-weight: 620; font-size: 0.92rem; box-shadow: var(--shadow-sm); transition: transform 0.5s var(--ease); }
.toast.is-shown { transform: translate(-50%, 0); }

/* ───────────────────────────── 404 ───────────────────────────── */

.lost { min-height: 100svh; display: grid; place-items: center; text-align: center; position: relative; overflow: hidden; isolation: isolate; padding: calc(var(--header-h) + 40px) var(--gutter) 60px; }
.lost .code { font: 850 clamp(7rem, 26vw, 18rem)/0.85 var(--font-display); letter-spacing: -0.07em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; background-size: 200% 100%; animation: gradient-pan 6s var(--ease-in-out) infinite alternate; }
.lost .plane { width: 80px; height: 80px; margin: 0 auto 20px; color: var(--accent); animation: fly 6s var(--ease-in-out) infinite; }
@keyframes fly { 0%, 100% { transform: translate(-30px, 0) rotate(-8deg); } 50% { transform: translate(30px, -14px) rotate(6deg); } }

/* ───────────────────────────── Legal page ───────────────────────────── */

.doc { max-width: 760px; }
.doc h2 { font-size: 1.6rem; margin-top: 2.2em; }
.doc p, .doc li { color: var(--text-2); }
.doc ul { padding-left: 1.2em; }

/* ───────────────────────────── Modding docs ───────────────────────────── */

.docs .site-header.is-hidden { transform: none; }
kbd { font: 600 0.8em/1 var(--font-mono); padding: 3px 6px; border-radius: 6px; border: 1px solid var(--line-strong); border-bottom-width: 2px; background: var(--bg-soft); }
.docs-bar { position: sticky; top: var(--header-h); margin-top: var(--header-h); z-index: 60; border-bottom: 1px solid var(--line); background: var(--glass); backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px); }
.docs-bar .wrap { display: flex; align-items: center; gap: 14px; height: 58px; width: min(100% - 2 * var(--gutter), 1440px); }
.docs-bar .docs-title { font-weight: 720; display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.docs-bar .docs-title .tag { font: 600 0.7rem/1 var(--font-mono); padding: 5px 8px; border-radius: 6px; background: color-mix(in srgb, var(--ivy) 16%, transparent); color: var(--ivy); letter-spacing: 0.05em; }
.docs-search { position: relative; margin-left: auto; width: min(420px, 100%); }
.docs-search input { width: 100%; height: 40px; padding: 0 14px 0 38px; border-radius: 10px; border: 1px solid var(--line-strong); background: color-mix(in srgb, var(--bg) 70%, transparent); color: var(--text); font: inherit; font-size: 0.92rem; }
.docs-search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.docs-search svg { position: absolute; left: 12px; top: 11px; width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.docs-search kbd { position: absolute; right: 10px; top: 9px; font: 600 0.72rem/1 var(--font-mono); padding: 4px 6px; border-radius: 6px; border: 1px solid var(--line-strong); color: var(--muted); }
.search-results { position: absolute; top: 46px; left: 0; right: 0; max-height: 60vh; overflow: auto; list-style: none; margin: 0; padding: 6px; border-radius: 14px; border: 1px solid var(--line-strong); background: var(--card-solid); box-shadow: var(--shadow); display: none; }
.search-results.is-open { display: block; }
.search-results a { display: block; padding: 10px 12px; border-radius: 10px; }
.search-results a:hover, .search-results a[aria-selected="true"] { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.search-results .t { font-weight: 620; }
.search-results .s { font-size: 0.8rem; color: var(--muted); }
.docs-menu { display: none; }

.docs-shell { display: grid; grid-template-columns: 270px minmax(0, 1fr) 220px; gap: clamp(24px, 3vw, 48px); width: min(100% - 2 * var(--gutter), 1440px); margin: 0 auto; padding-top: 36px; }
.docs-nav { position: sticky; top: calc(var(--header-h) + 58px + 20px); align-self: start; max-height: calc(100vh - var(--header-h) - 58px - 40px); overflow: auto; padding-right: 8px; padding-bottom: 40px; font-size: 0.93rem; }
.docs-nav .nav-heading { margin: 22px 0 8px; font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.docs-nav .nav-heading:first-child { margin-top: 0; }
.docs-nav ul { list-style: none; margin: 0; padding: 0; }
.docs-nav a { display: block; padding: 6px 10px; border-radius: 8px; color: var(--text-2); transition: background-color 0.2s, color 0.2s; }
.docs-nav a:hover { background: color-mix(in srgb, var(--text) 6%, transparent); color: var(--text); }
.docs-nav a[aria-current="page"] { background: color-mix(in srgb, var(--accent) 13%, transparent); color: var(--accent); font-weight: 620; }
.docs-nav code { font-size: 0.86em; }
.docs-toc { position: sticky; top: calc(var(--header-h) + 58px + 20px); align-self: start; font-size: 0.86rem; max-height: calc(100vh - var(--header-h) - 100px); overflow: auto; }
.docs-toc ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.docs-toc a { display: block; padding: 4px 0 4px 14px; margin-left: -1px; color: var(--muted); border-left: 2px solid transparent; transition: color 0.2s, border-color 0.2s; }
.docs-toc a:hover { color: var(--text); }
.docs-toc a.is-active { color: var(--accent); border-left-color: var(--accent); }
.docs-toc .toc-3 a { padding-left: 26px; }
.docs-toc .nav-heading { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin: 0 0 10px; }

.docs-content { min-width: 0; padding-bottom: 80px; font-size: 1.02rem; line-height: 1.75; }
.docs-content > h1 { font-size: clamp(2.2rem, 4vw, 3rem); letter-spacing: -0.035em; margin: 0 0 18px; }
.docs-content h2 { font-size: 1.6rem; margin: 2.2em 0 0.6em; padding-top: 0.4em; }
.docs-content h3 { font-size: 1.22rem; margin: 1.8em 0 0.5em; }
.docs-content h4 { font-size: 1.05rem; margin: 1.5em 0 0.4em; }
.docs-content .anchor { float: left; margin-left: -1em; padding-right: 0.3em; color: var(--muted); opacity: 0; text-decoration: none; transition: opacity 0.2s; }
.docs-content h2:hover .anchor, .docs-content h3:hover .anchor { opacity: 1; }
.docs-content p, .docs-content li { color: var(--text-2); }
.docs-content strong { color: var(--text); }
.docs-content a { color: var(--accent); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent); text-underline-offset: 3px; }
.docs-content a:hover { text-decoration-color: currentColor; }
.docs-content a.button { text-decoration: none; }
.docs-content :not(pre) > code { font: 0.86em/1.4 var(--font-mono); padding: 2px 6px; border-radius: 6px; background: color-mix(in srgb, var(--text) 8%, transparent); color: var(--text); word-break: break-word; }
.docs-content ul, .docs-content ol { padding-left: 1.4em; }
.docs-content li { margin: 0.3em 0; }
.docs-content blockquote { margin: 1.4em 0; padding: 14px 18px; border-radius: 12px; border-left: 3px solid var(--accent); background: color-mix(in srgb, var(--accent) 7%, transparent); }
.docs-content blockquote p { margin: 0; }
.docs-content hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.docs-content img { border-radius: 12px; }
.docs-content .lead { font-size: 1.15rem; color: var(--text-2); }
.docs-content .eyebrow { font-size: 0.72rem; }
.docs-content .eyebrow::before { display: none; }
.docs-content .eyebrow .badge { letter-spacing: 0.02em; text-transform: none; }

.docs-content .code { position: relative; margin: 1.3em 0; }
.docs-content pre { margin: 1.2em 0; padding: 18px 20px; border-radius: 14px; background: var(--code-bg); color: #d8e3f5; overflow-x: auto; font: 0.87rem/1.65 var(--font-mono); border: 1px solid rgba(140, 180, 255, 0.12); }
.docs-content .code pre { margin: 0; }
.docs-content pre code { font: inherit; background: none; padding: 0; color: inherit; }
.docs-content .code-title { padding: 10px 16px; border-radius: 14px 14px 0 0; background: color-mix(in srgb, var(--code-bg) 82%, var(--accent) 18%); color: #d8e3f5; font: 600 0.8rem/1 var(--font-mono); border: 1px solid rgba(140, 180, 255, 0.12); border-bottom: 0; }
.docs-content .code-title ~ pre { border-top-left-radius: 0; border-top-right-radius: 0; }
.docs-content .code-title ~ .copy { top: 44px; }
.docs-content .copy { position: absolute; top: 10px; right: 10px; z-index: 1; padding: 6px 10px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.14); background: rgba(255, 255, 255, 0.06); color: #d8e3f5; font: 600 0.74rem/1 var(--font-sans); cursor: pointer; opacity: 0; transition: opacity 0.2s, background-color 0.2s; }
.docs-content .code:hover .copy, .docs-content .copy:focus-visible { opacity: 1; }
.docs-content .copy:hover { background: rgba(255, 255, 255, 0.14); }
@media (hover: none) { .docs-content .copy { opacity: 1; } }
pre .kw { color: #ff8fb6; } pre .str { color: #9be58f; } pre .num { color: #ffc27a; } pre .com { color: #6f82a3; font-style: italic; }
pre .fn { color: #7ccfff; } pre .glob { color: #c3a6ff; } pre .key, pre .prop { color: #8ad7ff; } pre .attr { color: #ffd479; }
pre .tag { color: #ff9e7a; background: none; padding: 0; border-radius: 0; font-size: inherit; font-weight: inherit; }
.docs-content .table-wrap { overflow-x: auto; margin: 1.2em 0; border: 1px solid var(--line); border-radius: 14px; }
.docs-content table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.docs-content th, .docs-content td { padding: 11px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.docs-content th { font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); background: var(--bg-soft); }
.docs-content tr:last-child td { border-bottom: 0; }
.docs-content .fn { padding: 20px 0; border-top: 1px solid var(--line); }
.docs-content .fn h3 { margin-top: 0; font-size: 1.02rem; }
.docs-content .signature { font: 600 0.95rem/1.5 var(--font-mono); color: var(--text); background: none; padding: 0; }
.docs-content .badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.badge, .risk { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; font: 650 0.72rem/1.4 var(--font-sans); border: 1px solid var(--line-strong); color: var(--text-2); text-decoration: none !important; }
.badge-server { color: #ffb86b; border-color: color-mix(in srgb, #ffb86b 40%, transparent); }
.badge-client { color: #7ccfff; border-color: color-mix(in srgb, #7ccfff 40%, transparent); }
.badge-permission { color: var(--ivy); border-color: color-mix(in srgb, var(--ivy) 40%, transparent); }
.risk-low { color: var(--ivy); border-color: color-mix(in srgb, var(--ivy) 40%, transparent); }
.risk-medium { color: #ffc24b; border-color: color-mix(in srgb, #ffc24b 45%, transparent); }
.risk-high { color: #ff6b7d; border-color: color-mix(in srgb, #ff6b7d 45%, transparent); }
.docs-content .params { padding-left: 1.2em; }
.docs-content .returns { color: var(--text-2); }
.docs-content .cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin: 1.4em 0; }
.docs-content .cards.three { grid-template-columns: repeat(3, 1fr); }
.docs-content .card { padding: 22px; }
.docs-content .card h3 { margin-top: 0; font-size: 1.08rem; }
.docs-content .card a { text-decoration: none; }
.docs-content a.card { display: block; color: inherit; text-decoration: none; }
.docs-content a.card:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.docs-content .plain { list-style: none; padding: 0; }
.docs-content .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.docs-content .tag { padding: 3px 9px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--accent); font-size: 0.74rem; font-weight: 620; }
.docs-content .download-box { margin: 1.4em 0; padding: 20px; border-radius: 16px; border: 1px solid var(--line-strong); background: color-mix(in srgb, var(--ivy) 6%, var(--card)); display: grid; gap: 14px; }
.docs-content .download-box .button { justify-self: start; }
.docs-content .facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 24px; margin: 1.4em 0; padding: 18px 20px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg-soft); font-size: 0.93rem; border-width: 1px; }
.docs-content .facts > div { padding: 0; background: none; }
.docs-content .button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-strong); font-weight: 650; color: var(--text); text-decoration: none; transition: transform 0.3s var(--ease), border-color 0.3s; }
.docs-content .button:hover { transform: translateY(-2px); border-color: var(--accent); }
.docs-content .button.primary { color: #fff; border-color: transparent; background: linear-gradient(120deg, #2f9bff, #5b6cff 55%, #8b5cff); }
.docs-content .hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.docs-footer-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 60px; }
.docs-footer-nav a { display: block; padding: 18px 20px; border-radius: 14px; border: 1px solid var(--line); text-decoration: none !important; transition: border-color 0.3s, transform 0.3s var(--ease); }
.docs-footer-nav a:hover { border-color: var(--accent); transform: translateY(-2px); }
.docs-footer-nav .k { display: block; font-size: 0.78rem; color: var(--muted); margin-bottom: 4px; }
.docs-footer-nav .v { font-weight: 680; color: var(--text); }
.docs-footer-nav .next { text-align: right; grid-column: 2; }

.mod-hero { position: relative; overflow: hidden; isolation: isolate; padding: clamp(60px, 10vw, 120px) 0 clamp(50px, 7vw, 90px); }
.mod-hero h1 { font-size: clamp(2.6rem, 7vw, 5.4rem); font-weight: 820; letter-spacing: -0.045em; }

/* ───────────────────────────── Responsive ───────────────────────────── */

/* Short screens (laptops, tablets in landscape): the hero drops its icon and scroll cue to keep clear of the clip chips. */
@media (max-height: 820px) and (min-width: 641px) {
  .hero-icon, .scroll-cue { display: none; }
  .hero .hero-title { margin-bottom: 18px; }
  .hero-content { padding-bottom: 130px; }
  .jump-nav a { padding: 8px 14px; }
}

@media (max-width: 1180px) {
  .docs-shell { grid-template-columns: 250px minmax(0, 1fr); }
  .docs-toc { display: none; }
  .features { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 980px) {
  :root { --header-h: 64px; }
  .reel-caption { font-size: 0.8rem; }
  .nav, .header-actions .btn-steam { display: none; }
  .header-actions { margin-left: auto; }
  .menu-toggle { display: inline-grid; }
  .spotlight, .contact-grid, .legal, .story, .planet-layout, .mod-layout, .split, .support-grid { grid-template-columns: 1fr; }
  .spotlight .device { order: -1; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
  .story { gap: 0; }
  .story-media { position: sticky; top: calc(var(--header-h) + 10px); z-index: 3; order: -1; padding-bottom: 12px; background: linear-gradient(var(--bg) 85%, transparent); }
  .story-step, .story-step:first-child { min-height: 58vh; }
  .story-dots { margin-top: 10px; }
  .planet-wrap { max-width: 460px; }
  .code-window { transform: none; }
  .docs-shell { grid-template-columns: minmax(0, 1fr); padding-top: 20px; }
  .docs-nav { position: fixed; inset: calc(var(--header-h) + 58px) 0 0 0; z-index: 70; max-height: none; padding: 20px var(--gutter) 60px; background: var(--bg); transform: translateX(-100%); transition: transform 0.5s var(--ease); }
  .docs-nav-open .docs-nav { transform: none; }
  .docs-menu { display: inline-grid; }
  .docs-bar .docs-title .label { display: none; }
}

@media (max-width: 640px) {
  .hero { min-height: 560px; }
  .hero-content { padding-bottom: 160px; }
  .reel-bar { bottom: 18px; gap: 14px; }
  .reel-index { gap: 12px; }
  .reel-chip { font-size: 0.56rem; letter-spacing: 0.02em; gap: 9px; }
  .reel-caption { display: none; }
  .space-clips { grid-template-columns: 1fr; }
  .scroll-cue { display: none; }
  .facts { grid-template-columns: 1fr; }
  .grid-3, .grid-4, .grid-2, .features { grid-template-columns: 1fr; }
  .feature.wide { grid-column: auto; }
  .feature { min-height: 0; }
  .form .row { grid-template-columns: 1fr; }
  .legal-list { grid-template-columns: 1fr; }
  .legal-list dt { padding-bottom: 0; border-bottom: 0; }
  .legal-list dd { padding-top: 4px; }
  .footer-grid { grid-template-columns: 1fr; }
  .btn { min-height: 50px; padding: 0 20px; }
  .hero .btn-row .btn { flex: 1 1 100%; }
  .docs-content .cards.three, .docs-content .facts, .docs-footer-nav { grid-template-columns: 1fr; }
  .docs-footer-nav .next { grid-column: auto; }
  .docs-search kbd { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .js [data-reveal], .js [data-split] .w > span { opacity: 1 !important; transform: none !important; filter: none !important; }
  .hero-title .line > span { transform: none; }
  .marquee-track { animation: none; }
}

@media print {
  .site-header, .site-footer, .hero, .progress, .reel-bar, .docs-bar, .docs-nav, .docs-toc { display: none !important; }
  .sheet { box-shadow: none; }
  body { background: #fff; color: #000; }
}

/* Cross-document view transitions where supported. */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: 0.35s var(--ease) both vt-out; }
::view-transition-new(root) { animation: 0.5s var(--ease) both vt-in; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-8px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }
