/* Self-hosted fonts */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url(/fonts/inter-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url(/fonts/jetbrains-mono-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

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

:root {
  --bg: #0a0a0f;
  --text: #e0e0e0;
  --text-dim: #8a8a8e;
  --text-muted: #555;

  /* Logo gradient stops */
  --logo-1: #CE1126;
  --logo-2: #FCD116;
  --logo-3: #006B3F;
  --logo-light-1: #E8404E;
  --logo-light-2: #FFE050;
  --logo-light-3: #2A9D6A;

  /* Faction colors */
  --fabricator: #D4A017;
  --hyperscaler: #2196F3;
  --regulator: #7B1FA2;
  --optimizer: #00C853;
  --sovereign: #FF8F00;
  --miner: #BF360C;
  --insurgent: #FF1744;

  /* Resource colors */
  --compute: #4FC3F7;
  --energy: #FFD54F;
  --chips: #CE93D8;
  --minerals: #A1887F;
  --talent: #81C784;
  --influence: #EF5350;

  /* Info section accent (derived from logo-3 / logo-light-3) */
  --info-accent: 0, 107, 63;
  --info-accent-text: #2A9D6A;
  --info-accent-soft: #88B0A0;
  --info-accent-warm: #D0E8D8;
  --info-accent-behind: 0, 107, 63;

  /* Live/active badge */
  --accent-live: #00E0C8;
  --accent-live-rgb: 0, 224, 200;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
}

html {
  scroll-behavior: auto; /* No smooth scrolling — would break scroll-driven animation */
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
}

/* ── Skip link ── */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 0.5em 1em;
  background: var(--compute);
  color: #000;
  font-weight: 500;
  text-decoration: none;
}
.skip-link:focus { left: 0; }

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

/* ── WebGL canvas — fixed, full viewport ── */
#webgl {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
}

/* ── Labels container — positioned by JS ── */
#labels {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.faction-label {
  position: absolute;
  text-align: center;
  transform: translate(-50%, -50%) scale(0.85);
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.34, 1.4, 0.64, 1);
  white-space: nowrap;
  padding: 6px 14px;
}

.faction-label::before {
  content: '';
  position: absolute;
  inset: -8px -16px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(5, 5, 12, 0.6) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -1;
  pointer-events: none;
}

.faction-label.spotlight {
  transform: translate(-50%, -50%) scale(1);
}

.faction-label.spotlight::before {
  opacity: 1;
}

.faction-label-name {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: font-size 0.4s cubic-bezier(0.34, 1.4, 0.64, 1),
              text-shadow 0.35s ease,
              letter-spacing 0.4s ease;
}

.faction-label.spotlight .faction-label-name {
  font-size: 16px;
  letter-spacing: 0.16em;
}

.faction-label-tagline {
  font-family: var(--font-sans);
  font-size: 9px;
  color: #888;
  margin-top: 2px;
  transition: font-size 0.4s cubic-bezier(0.34, 1.4, 0.64, 1),
              color 0.35s ease;
}

.faction-label.spotlight .faction-label-tagline {
  font-size: 11px;
  color: #bbb;
}

.gate-label {
  position: absolute;
  text-align: center;
  transform: translate(-50%, -50%);
  pointer-events: none;
  white-space: nowrap;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #ccc;
  opacity: 0;
  transition: opacity 0.4s ease;
}

/* Faction pair intro text (Act 2 spotlights) */
.text-faction-pair {
  top: 72%;
}
.text-faction-pair p {
  font-size: clamp(1.25rem, 2.8vw, 1.7rem);
  font-weight: 500;
  background: linear-gradient(135deg, #E8A0A0 0%, #F0D080 50%, #90D0A8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-style: italic;
}

/* Event tags */
.event-tag {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: none;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.event-tag.visible {
  opacity: 1;
}

/* ── Scroll container — provides the 800vh scroll space ── */
#scroll-container {
  order: 1;
  position: relative;
  z-index: 2;
}

.act {
  position: relative;
  height: 100vh;
  pointer-events: none;
}

/* Give acts their proportional scroll space per spec */
#act-1 { height: 280vh; }
#act-2 { height: 280vh; }
#act-3 { height: 370vh; }
#act-4 { height: 280vh; }
#act-5 { height: 280vh; }
#act-6 { height: 220vh; }
#act-7 { height: 80vh; }

/* ── Narrative text blocks — fixed overlay, driven by JS ── */
.narrative-text {
  position: fixed;
  z-index: 3;
  opacity: 0;
  pointer-events: none;
  transition: none; /* JS handles all transitions */
  max-width: 600px;
  line-height: 1.5;
}

.narrative-text p {
  margin: 0;
}

/* Centered text */
.text-center {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

/* Readable over 3D — heavy dark halo hugging the text */
.text-center:not(.text-cta) {
  filter:
    drop-shadow(0 0 6px rgba(5, 5, 12, 1))
    drop-shadow(0 0 16px rgba(5, 5, 12, 0.85))
    drop-shadow(0 0 32px rgba(5, 5, 12, 0.5));
}

/* Hero text — larger, with gradient accent */
.text-hero p {
  font-size: clamp(1.5rem, 3.5vw, 2.8rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.3;
  background: linear-gradient(135deg, #e8e8ed 0%, #FCD880 40%, #e8e8ed 70%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ── Hero stack — builds up line by line on scroll ── */
.hero-stack {
  position: fixed;
  z-index: 3;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
}

.hero-line {
  margin: 0;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.35;
  background: linear-gradient(135deg, #e8e8ed 0%, #FCD880 40%, #e8e8ed 70%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-line-1 {
  font-size: clamp(2rem, 5vw, 3.8rem);
  font-weight: 600;
}

.hero-line-2 {
  font-size: clamp(1.3rem, 3vw, 2.2rem);
  opacity: 1;
  margin-top: 0.2em;
}

.hero-line-3 {
  font-size: clamp(1.3rem, 3vw, 2.2rem);
  opacity: 0;
  margin-top: 0.15em;
}

.hero-agi {
  font-weight: 800;
  background: linear-gradient(
    90deg,
    #E86058 0%,
    #FCD880 20%,
    #ffffff 40%,
    #80D0A0 60%,
    #FCD880 80%,
    #E86058 100%
  );
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: agi-shimmer 2.5s linear infinite;
}

@keyframes agi-shimmer {
  0%   { background-position: 200% 50%; }
  100% { background-position: 0% 50%; }
}

.hero-diplomacy {
  display: inline-block;
  font-weight: 900;
  font-size: 1.7em;
  background: linear-gradient(
    90deg,
    var(--logo-1) 0%,
    var(--logo-2) 25%,
    #ffffff 50%,
    var(--logo-3) 75%,
    var(--logo-1) 100%
  );
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: diplomacy-shimmer 3s linear infinite;
  padding: 0.05em 0.1em;
}

@keyframes diplomacy-shimmer {
  0%   { background-position: 200% 50%; }
  100% { background-position: 0% 50%; }
}

/* Large emphasis text — gradient accent */
.text-large p {
  font-size: clamp(1.3rem, 3vw, 2.2rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #E8A0A0 0%, #FCD880 50%, #80D0A0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Standard narrative body — warm tint */
.narrative-text:not(.text-hero):not(.text-large) p {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: #d0c8d4;
  font-weight: 400;
  line-height: 1.6;
}

/* Left-aligned panel with gradient backdrop */
.text-left {
  top: 50%;
  left: 8%;
  transform: translateY(-50%);
  text-align: left;
}

.text-left::before {
  content: '';
  position: absolute;
  top: -40px;
  left: -40px;
  bottom: -40px;
  width: 120%;
  background: linear-gradient(90deg, rgba(7, 8, 13, 0.85) 0%, rgba(7, 8, 13, 0.5) 60%, transparent 100%);
  z-index: -1;
  border-radius: 8px;
  pointer-events: none;
}

/* Right-aligned panel with gradient backdrop */
.text-right {
  top: 50%;
  right: 8%;
  left: auto;
  transform: translateY(-50%);
  text-align: right;
  max-width: 500px;
}

.text-right::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  bottom: -40px;
  width: 120%;
  background: linear-gradient(270deg, rgba(7, 8, 13, 0.85) 0%, rgba(7, 8, 13, 0.5) 60%, transparent 100%);
  z-index: -1;
  border-radius: 8px;
  pointer-events: none;
}

/* Spacious text (Act 6 — how you play) */
.text-spacious p {
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  line-height: 1.7;
  color: #c8c8d0;
}

/* ── CTA Section ── */
.act-cta {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 6rem;
}

.cta-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #fff;
  margin-bottom: 0.5rem;
}

/* CTA content — anchored below the animated logo by JS */
.text-cta {
  top: 82%; /* fallback — JS overrides when logo is animating */
}

.cta-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  background: linear-gradient(135deg, var(--logo-light-1) 0%, var(--logo-light-2) 40%, var(--logo-light-3) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0 0 2.5rem 0 !important;
}

.cta-buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
  pointer-events: auto;
}

.cta-btn {
  display: inline-block;
  padding: 0.9em 2.2em;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s ease;
  letter-spacing: 0.02em;
}

.cta-btn-primary {
  background: linear-gradient(135deg, #e8e8ed 0%, #00E0C8 45%, #FFB814 100%);
  color: #0a0a0f;
  border: 1px solid transparent;
  font-weight: 400;
}

.cta-btn-primary strong {
  font-weight: 900;
}

.cta-btn-primary:hover {
  box-shadow: 0 0 24px rgba(0, 224, 200, 0.35), 0 0 48px rgba(255, 184, 20, 0.2);
  transform: translateY(-1px);
}

.cta-btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.cta-btn-secondary:hover {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.05);
}

.cta-reassurance {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ── Scroll hint ── */
.scroll-hint {
  position: fixed;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-dim);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  animation: drift 2.5s ease-in-out infinite;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

.scroll-hint svg {
  width: 40px;
  height: 40px;
  stroke: rgba(255, 255, 255, 0.6);
  stroke-width: 1.5;
  fill: none;
  animation: arrow-pulse 2s ease-in-out infinite;
}

@keyframes arrow-pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1.0; }
}

@keyframes drift {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

/* ── Agent onboarding — DOM-first, visual-last ── */
#agent-onboarding {
  order: 99;
  position: absolute;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  width: 1px;
  overflow: hidden;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-muted);
  max-width: 800px;
}

#agent-onboarding h2,
#agent-onboarding h3 {
  color: #666;
  font-size: 14px;
  font-weight: 500;
  margin: 1rem 0 0.5rem;
}

#agent-onboarding h2:first-child { margin-top: 0; }

#agent-onboarding a {
  color: var(--compute);
  text-decoration: none;
}

#agent-onboarding a:hover { text-decoration: underline; }

#agent-onboarding code {
  background: rgba(79, 195, 247, 0.08);
  padding: 0.1em 0.3em;
  border-radius: 3px;
  font-size: 0.9em;
}

#agent-onboarding ol,
#agent-onboarding ul {
  padding-left: 1.5em;
  margin: 0.25rem 0;
}

#agent-onboarding li { margin: 0.2rem 0; }

#agent-onboarding details { margin-top: 0.5rem; }
#agent-onboarding details[open] summary { margin-bottom: 0.5rem; }

#agent-onboarding summary {
  cursor: pointer;
  color: #777;
}

#agent-onboarding pre {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid #1a1a1a;
  border-radius: 6px;
  padding: 0.75rem;
  overflow-x: auto;
  font-size: 0.85em;
  margin: 0.5rem 0;
}

.agent-footer-links {
  margin-top: 1rem;
  font-size: 13px;
}

/* ── Game info section — static, below scroll narrative ── */
#game-info {
  order: 2;
  position: relative;
  z-index: 4;
  max-width: 900px;
  margin: 0 auto;
  padding: 6rem 2rem 4rem;
}

/* Full-width backdrop — transparent to show underlying animation */
#game-info::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: 100%;
  background: linear-gradient(180deg, transparent 0%, rgba(10, 10, 15, 0.7) 6%);
  z-index: -1;
}

.info-header {
  text-align: center;
  margin-bottom: 3rem;
}

.info-title {
  font-family: var(--font-sans);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, var(--logo-1) 0%, var(--logo-2) 65%, var(--logo-3) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.75rem;
}

.info-lead {
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  color: var(--info-accent-soft);
  font-weight: 400;
}

.info-grid {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.info-grid-3 { grid-template-columns: repeat(3, 1fr); }
.info-grid-2 { grid-template-columns: repeat(2, 1fr); }

.info-card {
  padding: 1.75rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.info-card-number {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: rgba(var(--info-accent), 0.6);
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}

.info-card h3 {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--info-accent-warm);
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.info-card p {
  font-size: 0.9rem;
  color: var(--text-dim);
  line-height: 1.65;
}

.info-card-highlight {
  border-color: rgba(var(--info-accent), 0.2);
  background: rgba(var(--info-accent), 0.06);
}

.info-divider {
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--info-accent), 0.35), transparent);
  margin: 1rem auto 3rem;
}

/* Game formats table */
.info-formats-table-wrap {
  overflow-x: auto;
  margin-bottom: 1.5rem;
  -webkit-overflow-scrolling: touch;
}

.info-formats-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.9rem;
  line-height: 1.5;
}

.info-formats-table th,
.info-formats-table td {
  padding: 0.65rem 1rem;
  text-align: center;
  border-bottom: 1px solid rgba(var(--info-accent), 0.08);
}

.info-formats-table th:first-child,
.info-formats-table td:first-child {
  text-align: left;
}

.info-formats-table thead th {
  padding-bottom: 0.9rem;
  border-bottom: 1px solid rgba(var(--info-accent), 0.15);
}

/* Quick column highlight (2nd column) */
.info-formats-table th:nth-child(2),
.info-formats-table td:nth-child(2) {
  background: rgba(var(--info-accent), 0.05);
  border-left: 1px solid rgba(var(--info-accent), 0.18);
  border-right: 1px solid rgba(var(--info-accent), 0.18);
}

.info-formats-table thead th:nth-child(2) {
  border-top: 1px solid rgba(var(--info-accent), 0.18);
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

.info-formats-table tbody tr:last-child td:nth-child(2) {
  border-bottom: 1px solid rgba(var(--info-accent), 0.18);
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
}

.format-row-label {
  font-weight: 500;
  color: var(--text-dim);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

.info-formats-table td:not(.format-row-label) {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.format-badge {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25em 0.7em;
  border-radius: 4px;
}

.format-active {
  background: rgba(var(--info-accent), 0.15);
  color: var(--info-accent-text);
  border: 1px solid rgba(var(--info-accent), 0.3);
}

.format-soon {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.info-formats-note {
  text-align: center;
  font-size: 0.85rem;
  color: var(--info-accent-soft);
  margin-bottom: 2rem;
}

.info-grid-compact {
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.info-grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Depth-number effect: Quick number in front, full-game number looming behind */
.info-stat-depth {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: clamp(5rem, 10vw, 7.5rem);
}

.info-stat-value {
  position: relative;
  z-index: 1;
  font-family: var(--font-sans);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  background: linear-gradient(135deg, var(--logo-1) 0%, var(--logo-2) 65%, var(--logo-3) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
}

.info-stat-value-solo {
  /* Resources: no behind number, just the value */
}

.info-stat-behind {
  position: absolute;
  z-index: 0;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-sans);
  font-size: clamp(5rem, 10vw, 7.5rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
  background: linear-gradient(180deg, rgba(var(--info-accent-behind), 0.45) 0%, rgba(var(--info-accent-behind), 0.12) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  pointer-events: none;
  user-select: none;
}

.info-stat-label {
  font-size: 0.8rem;
  color: var(--text);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 0.35rem;
}

.info-title-live {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.4em;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-live);
  vertical-align: middle;
  margin-left: 0.5em;
  padding: 0.15em 0.6em;
  border: 1px solid rgba(var(--accent-live-rgb), 0.25);
  border-radius: 4px;
  background: rgba(var(--accent-live-rgb), 0.08);
}

.info-closing {
  text-align: center;
  max-width: 640px;
  margin: 2rem auto 0;
  padding: 2rem 0 2rem;
}


.info-closing-text {
  font-size: clamp(0.95rem, 1.6vw, 1.05rem);
  color: var(--info-accent-soft);
  line-height: 1.8;
  margin-bottom: 2rem;
}

.info-footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  padding-top: 3rem;
}

.info-footer-links a {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.25);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.2s ease;
}

.info-footer-links a:hover {
  color: rgba(255, 255, 255, 0.5);
}

.info-closing-tagline {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  font-weight: 500;
  background: linear-gradient(135deg, var(--logo-light-1) 0%, var(--logo-light-3) 40%, var(--logo-light-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

@media (max-width: 768px) {
  .info-grid-3 { grid-template-columns: 1fr; }
  .info-grid-2 { grid-template-columns: 1fr; }
  .info-grid-4 { grid-template-columns: repeat(2, 1fr); gap: 1.5rem 1rem; }
  #game-info { padding: 4rem 1.5rem 0; }
}

/* ── Noscript fallback ── */
.noscript-content {
  position: relative;
  z-index: 10;
  max-width: 600px;
  margin: 0 auto;
  padding: 20vh 2rem;
  text-align: center;
}

.noscript-content h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
}

.noscript-content p {
  color: var(--text-dim);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.noscript-content a {
  color: var(--compute);
  text-decoration: none;
}

/* ── Persistent logo — top left, animates to center at CTA ── */
.site-logo {
  position: fixed;
  top: 1.75rem;
  left: 2rem;
  z-index: 10;
  font-family: var(--font-sans);
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  letter-spacing: -0.07em;
  line-height: 1;
  pointer-events: none;
  transform-origin: top left;
  will-change: transform, top, left;
}

.site-logo-the {
  font-weight: 300;
  color: rgba(255, 255, 255, 0.35);
  margin-right: 0.06em;
  font-size: 0.65em;
  letter-spacing: 0;
  vertical-align: baseline;
}

.site-logo-core {
  font-weight: 600;
  letter-spacing: -0.07em;
  background: linear-gradient(135deg, var(--logo-1) 0%, var(--logo-2) 65%, var(--logo-3) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.site-logo-grand {
  font-weight: 800;
}

/* ── Rine banner — bottom right ── */
.rine-banner {
  position: fixed;
  bottom: 1.25rem;
  right: 1.5rem;
  z-index: 10;
  font-family: var(--font-sans);
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  letter-spacing: -0.02em;
  line-height: 1;
  text-decoration: none;
  pointer-events: auto;
  transition: filter 0.3s ease;
}

.rine-banner:hover {
  filter: brightness(1.3);
}

.rine-banner-only {
  font-weight: 300;
  color: rgba(255, 255, 255, 0.18);
  font-size: 0.72em;
  margin-right: 0.15em;
}

.rine-banner-link {
  font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
}

.rine-banner-dot {
  color: rgba(255, 255, 255, 0.3);
}

.rine-banner-core {
  font-weight: 700;
  background: linear-gradient(135deg, #e8e8ed 0%, #00E0C8 45%, #FFB814 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.rine-banner-tld {
  color: rgba(255, 255, 255, 0.35);
  font-weight: 400;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .text-left,
  .text-right {
    left: 5%;
    right: 5%;
    text-align: center;
    transform: translateY(-50%);
    max-width: none;
  }

  .text-left::before,
  .text-right::before {
    left: -20px;
    right: -20px;
    width: auto;
    background: radial-gradient(ellipse 80% 70% at 50% 50%,
      rgba(7, 8, 13, 0.9) 0%,
      rgba(7, 8, 13, 0.5) 60%,
      transparent 100%
    );
  }

  .cta-buttons { flex-direction: row; gap: 0.75rem; }
  .cta-btn { font-size: 0.85rem; padding: 0.75em 1.4em; }

  .site-logo { top: 0.75rem; left: 1rem; }
  .rine-banner { bottom: 0.75rem; right: 1rem; }

  #agent-onboarding { padding: 2rem 1.5rem; }

  .narrative-text { max-width: 90vw; }
  .hero-stack { max-width: 90vw; }
}

/* ── Accessibility ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  #webgl { display: none; }
  #labels { display: none; }

  .site-logo, .rine-banner { position: static; margin: 1rem 2rem; }

  /* Show hero stack statically */
  .hero-stack {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    max-width: 600px;
    margin: 2rem auto;
    padding: 1rem 2rem;
    text-align: center;
  }
  .hero-line-2, .hero-line-3 { opacity: 1 !important; }

  /* Show all text statically */
  .narrative-text {
    position: relative !important;
    opacity: 1 !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    max-width: 600px;
    margin: 2rem auto;
    padding: 1rem 2rem;
    text-align: center;
  }

  .act { height: auto !important; min-height: 0; }
}

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