:root {
  --bg: #08111d;
  --bg-2: #132538;
  --panel: rgba(8, 17, 29, 0.78);
  --panel-2: rgba(17, 32, 48, 0.72);
  --text: #eef5ff;
  --muted: #a8bfd3;
  --accent: #59d0ff;
  --accent-2: #f6bf57;
  --border: rgba(255, 255, 255, 0.12);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  /* aliases used by new components */
  --surface: #132538;
  --accent2: #f6bf57;
  --radius: 16px;
  --max-w: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(89, 208, 255, 0.24), transparent 30%),
    radial-gradient(circle at 80% 20%, rgba(246, 191, 87, 0.18), transparent 24%),
    linear-gradient(180deg, var(--bg) 0%, #091522 45%, #050b12 100%);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(transparent 0%, rgba(255, 255, 255, 0.02) 100%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.02) 0 1px, transparent 1px 80px);
  opacity: 0.45;
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 64px;
}

.hero,
.split-panel {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 32px;
  align-items: center;
}

.hero {
  min-height: calc(100vh - 96px);
}

.hero-copy h1,
.section-heading h2,
.copy-block h2,
.cta-panel h2 {
  line-height: 1.02;
  letter-spacing: -0.04em;
  margin: 0;
}

.hero-copy h1 {
  font-size: clamp(3rem, 7vw, 5.8rem);
  max-width: 9ch;
}

.lede,
.feature-card p,
.copy-block p,
.quote-block p,
.cta-panel p {
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.65;
}

.lede {
  max-width: 40rem;
  margin: 22px 0 0;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  background: linear-gradient(135deg, var(--accent) 0%, #2da9ff 100%);
  border-color: transparent;
  color: #03101a;
}

.button.secondary {
  background: rgba(255, 255, 255, 0.04);
}

.hero-art {
  display: flex;
  justify-content: center;
}

.art-frame,
.panel,
.split-panel {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(19, 37, 56, 0.92), rgba(8, 17, 29, 0.82));
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.art-frame {
  width: min(440px, 100%);
  aspect-ratio: 1 / 1;
  border-radius: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  overflow: hidden;
}

.art-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 18px 42px rgba(0, 0, 0, 0.45));
}

.panel,
.split-panel {
  margin-top: 28px;
  border-radius: 28px;
  padding: 32px;
}

.section-heading h2,
.copy-block h2,
.cta-panel h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  max-width: 14ch;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.feature-card {
  padding: 22px;
  border-radius: 20px;
  background: var(--panel-2);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.feature-card h3 {
  margin: 0 0 10px;
  font-size: 1.1rem;
}

.split-panel {
  gap: 24px;
}

.quote-block {
  padding: 24px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.quote-block p {
  margin: 0;
  font-size: 1.1rem;
}

.cta-panel {
  text-align: center;
}

.cta-panel h2,
.cta-panel p {
  margin-left: auto;
  margin-right: auto;
}

.cta-panel .button {
  margin-top: 10px;
}

@media (max-width: 900px) {
  .hero,
  .split-panel {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 24px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .panel,
  .split-panel,
  .art-frame {
    border-radius: 22px;
  }
}

/* ── Nav ───────────────────────────────────────────────────────── */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.5rem;
  background: rgba(14,14,18,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #1e1e28;
}

.nav-logo {
  font-weight: 800;
  color: var(--accent);
  text-decoration: none;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

.nav-links { display: flex; gap: 1.5rem; align-items: center; }

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  transition: color 0.15s;
}

.nav-links a:hover, .nav-links a.active { color: var(--text); }

/* ── Cinematic hero ──────────────────────────────────────────────── */
.cinematic-hero {
  position: relative;
  width: 100%;
  height: 100svh;
  min-height: 520px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.cinematic-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.cinematic-overlay {
  position: relative;
  z-index: 2;
  padding: 4rem 2rem;
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
  background: linear-gradient(to top, rgba(14,14,18,.95) 0%, rgba(14,14,18,.6) 60%, transparent 100%);
}

.cinematic-eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.cinematic-title {
  font-size: clamp(2.2rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.05;
  margin-bottom: 1rem;
  color: #fff;
  text-shadow: 0 2px 20px rgba(0,0,0,.5);
}

.cinematic-sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: rgba(255,255,255,.75);
  max-width: 50ch;
  margin-bottom: 2rem;
}

.cinematic-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* page-shell offset below nav */
.page-shell { padding-top: 4rem; }

/* ── Page hero (inner pages) ──────────────────────────────────────── */
.page-hero {
  background: var(--surface);
  border-bottom: 1px solid #1e1e28;
  padding: 6rem 1.5rem 3rem;
  margin-top: 55px;
}

.page-hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.page-hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  line-height: 1.1;
  margin: 0.5rem 0 1rem;
}

/* ── Char roster strip ──────────────────────────────────────────────── */
.char-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  padding: 1rem 0;
}

.char-strip img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,.6));
  transition: transform 0.15s;
}

.char-strip img:hover { transform: scale(1.2); }

/* ── Char grid ──────────────────────────────────────────────────────── */
.char-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
}

.char-card {
  background: var(--surface);
  border: 1px solid #2a2a38;
  border-radius: var(--radius);
  padding: 1rem 0.75rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.char-card img {
  width: 96px;
  height: 96px;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 2px 12px rgba(0,0,0,.5));
}

.char-card span { font-weight: 700; font-size: 0.9rem; color: var(--accent2); }
.char-card small { font-size: 0.75rem; color: var(--muted); line-height: 1.4; }

.char-grid-lore { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.char-card-lore img { width: 120px; height: 120px; }

/* ── Full art panel ──────────────────────────────────────────────────── */
.full-art-panel { padding: 2rem 0; border-top: 1px solid #1e1e28; }
.full-art-img { width: 100%; border-radius: var(--radius); display: block; }

/* ── Two-col prose ──────────────────────────────────────────────────── */
.two-col-prose { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
@media (max-width: 700px) { .two-col-prose { grid-template-columns: 1fr; } }
.two-col-prose h3 { font-size: 1rem; font-weight: 700; color: var(--accent2); margin-bottom: 0.5rem; }
.two-col-prose p { color: var(--muted); font-size: 0.95rem; }

/* ── Lore nav ──────────────────────────────────────────────────────── */
.lore-nav { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.5rem; }

.lore-nav a {
  padding: 0.4rem 0.9rem;
  border: 1px solid #2a2a38;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  transition: border-color 0.15s, color 0.15s;
}

.lore-nav a:hover { border-color: var(--accent2); color: var(--text); }

/* ── Lore sections ──────────────────────────────────────────────────── */
.lore-section { border-top: 1px solid #1e1e28; padding: 4rem 0; scroll-margin-top: 70px; }
.lore-section-header { margin-bottom: 2rem; }
.lore-section-header h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 800; margin-top: 0.5rem; }

.lore-block { max-width: 72ch; margin-bottom: 2.5rem; }
.lore-block h3 { font-size: 1.05rem; font-weight: 700; color: var(--accent2); margin-bottom: 0.6rem; }
.lore-block p + p { margin-top: 0.75rem; }

.lore-truth {
  background: rgba(240,192,64,.08);
  border-left: 3px solid var(--accent);
  padding: 0.75rem 1rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text);
  font-size: 0.9rem;
}

.lore-list { list-style: disc; padding-left: 1.5rem; color: var(--muted); font-size: 0.9rem; line-height: 1.7; }
.lore-list li + li { margin-top: 0.4rem; }
.lore-list strong { color: var(--text); }

.sub-roster-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

/* ── Act grid ──────────────────────────────────────────────────────── */
.act-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.25rem; }

.act-card {
  background: var(--surface);
  border: 1px solid #2a2a38;
  border-radius: var(--radius);
  padding: 1.5rem;
}

.act-label { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.4rem; }
.act-card h4 { font-size: 1rem; font-weight: 800; color: var(--text); margin-bottom: 0.6rem; }
.act-card p { font-size: 0.85rem; color: var(--muted); line-height: 1.6; }

/* ── Biome grid ──────────────────────────────────────────────────── */
.biome-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.25rem; margin-bottom: 1rem; }

.biome-card {
  background: var(--surface);
  border: 1px solid #2a2a38;
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.biome-card > img { width: 100%; height: 180px; object-fit: cover; display: block; }
.biome-info { padding: 1rem 1.1rem; flex: 1; }

.biome-info-no-img {
  padding: 1.25rem 1.1rem;
  background: #12121a;
  border-left: 3px solid #2a2a38;
  border-radius: var(--radius);
}

.biome-info h4 { font-size: 0.95rem; font-weight: 700; margin-bottom: 0.4rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }

.harmonic-tag {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(240,192,64,.1);
  border: 1px solid rgba(240,192,64,.25);
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
  white-space: nowrap;
}

.biome-info p { font-size: 0.82rem; color: var(--muted); line-height: 1.6; }

/* ── Enemy grid ──────────────────────────────────────────────────── */
.enemy-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 0.75rem; margin-bottom: 0.5rem; }

.enemy-card {
  background: var(--surface);
  border: 1px solid #2a2a38;
  border-radius: var(--radius);
  padding: 0.75rem 0.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.enemy-card img { width: 72px; height: 72px; object-fit: contain; image-rendering: pixelated; filter: drop-shadow(0 2px 8px rgba(0,0,0,.5)); }
.enemy-card span { font-size: 0.72rem; font-weight: 700; color: var(--text); line-height: 1.3; }
.enemy-card small { font-size: 0.68rem; color: var(--muted); line-height: 1.4; }

/* ── Controller grid ──────────────────────────────────────────────── */
.controller-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1.25rem; }

.controller-card {
  background: var(--surface);
  border: 1px solid #2a2a38;
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.controller-card > img { width: 100%; height: 200px; object-fit: cover; display: block; }
.ctrl-info { padding: 1rem 1.1rem; flex: 1; }

.ctrl-info-no-img {
  padding: 1.25rem 1.1rem;
  background: #12121a;
  border-left: 3px solid var(--accent2);
  border-radius: var(--radius);
}

.ctrl-info h4 { font-size: 1rem; font-weight: 800; color: var(--accent2); margin-bottom: 0.3rem; }

.ctrl-zone {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

.ctrl-info p { font-size: 0.83rem; color: var(--muted); line-height: 1.65; }

/* ── Footer ──────────────────────────────────────────────────────── */
.site-footer {
  text-align: center;
  padding: 2rem 1.5rem;
  border-top: 1px solid #1e1e28;
  color: var(--muted);
  font-size: 0.8rem;
}

.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); }
