/* ============================================================
   THE INHERITED SILENCE — DAS GEERBTE SCHWEIGEN
   Landing Page Design System & Styles
   Mobile-first, bilingual DE/EN + Vethari-Keth
   ============================================================ */

/* ---------- DESIGN TOKENS ---------- */
:root {
  /* === Color Palette === */
  /* Backgrounds — Deep cave/earth darkness */
  --bg-abyss:      #050508;
  --bg-primary:    #0a0a12;
  --bg-secondary:  #0f0f1a;
  --bg-tertiary:   #161622;
  --bg-card:       rgba(18, 18, 32, 0.85);
  --bg-card-hover: rgba(24, 24, 42, 0.92);
  --bg-overlay:    rgba(5, 5, 8, 0.88);

  /* Leth Bioluminescence — Primary accent (amber-gold) */
  --leth-glow:     #c9a84c;
  --leth-bright:   #e8c55a;
  --leth-dim:      #8a7235;
  --leth-faint:    rgba(201, 168, 76, 0.12);
  --leth-pulse:    rgba(201, 168, 76, 0.06);

  /* Resonance — Secondary accent (teal-cyan) */
  --resonance:     #4a9e9e;
  --resonance-bright: #5ec4c4;
  --resonance-dim: #2d6b6b;
  --resonance-faint: rgba(74, 158, 158, 0.10);

  /* Reduction — Warning/danger (muted crimson) */
  --reduction:     #8b3a3a;
  --reduction-bright: #b04848;
  --reduction-faint: rgba(139, 58, 58, 0.12);

  /* Serath — Hybrid accent (violet) */
  --serath:        #7b5ea7;
  --serath-bright: #9b7ec7;
  --serath-faint:  rgba(123, 94, 167, 0.10);

  /* Earth/Archaeological — Tertiary warm */
  --earth:         #a08060;
  --earth-dim:     #6b5840;
  --earth-faint:   rgba(160, 128, 96, 0.10);

  /* Text — Warm off-whites */
  --text-primary:  #e8e4dc;
  --text-secondary:#b0aa9e;
  --text-muted:    #807870;
  --text-dim:      #585450;
  --text-vethari:  var(--leth-glow);

  /* Functional */
  --border:        rgba(201, 168, 76, 0.12);
  --border-hover:  rgba(201, 168, 76, 0.25);
  --focus-ring:    rgba(201, 168, 76, 0.5);

  /* === Typography === */
  --font-body:     'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-display:  'Playfair Display', 'Georgia', 'Times New Roman', serif;
  --font-vethari:  'Cormorant Garamond', 'Georgia', serif;
  --font-mono:     'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

  --fs-xs:    0.75rem;    /* 12px */
  --fs-sm:    0.875rem;   /* 14px */
  --fs-base:  1rem;       /* 16px */
  --fs-md:    1.125rem;   /* 18px */
  --fs-lg:    1.375rem;   /* 22px */
  --fs-xl:    1.75rem;    /* 28px */
  --fs-2xl:   2.25rem;    /* 36px */
  --fs-3xl:   3rem;       /* 48px */
  --fs-4xl:   4rem;       /* 64px */
  --fs-hero:  clamp(2.5rem, 8vw, 6rem);

  --lh-tight:  1.2;
  --lh-normal: 1.6;
  --lh-loose:  1.8;

  --fw-normal:   400;
  --fw-medium:   500;
  --fw-semibold: 600;
  --fw-bold:     700;

  /* === Spacing (8px grid) === */
  --sp-1:  4px;
  --sp-2:  8px;
  --sp-3:  12px;
  --sp-4:  16px;
  --sp-5:  20px;
  --sp-6:  24px;
  --sp-8:  32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;
  --sp-20: 80px;
  --sp-24: 96px;
  --sp-32: 128px;

  /* === Borders & Radius === */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-xl:   16px;
  --radius-2xl:  24px;
  --radius-full: 9999px;

  /* === Shadows === */
  --shadow-sm:   0 2px 8px rgba(0,0,0,0.4);
  --shadow-md:   0 4px 20px rgba(0,0,0,0.5);
  --shadow-lg:   0 8px 40px rgba(0,0,0,0.6);
  --shadow-glow: 0 0 30px rgba(201, 168, 76, 0.15);
  --shadow-glow-strong: 0 0 60px rgba(201, 168, 76, 0.25);

  /* === Transitions === */
  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --t-fast:    150ms;
  --t-base:    300ms;
  --t-slow:    600ms;
  --t-slower:  1000ms;

  /* === Z-Index === */
  --z-base:     1;
  --z-sticky:   10;
  --z-overlay:  20;
  --z-nav:      30;
  --z-modal:    40;
  --z-toast:    50;

  /* === Layout === */
  --content-max: 1200px;
  --content-narrow: 800px;
  --section-pad-y: clamp(64px, 10vh, 128px);
}

/* ---------- RESET & BASE ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scrollbar-color: var(--leth-dim) var(--bg-primary);
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: var(--fw-normal);
  line-height: var(--lh-normal);
  color: var(--text-primary);
  background: var(--bg-abyss);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: rgba(201, 168, 76, 0.3);
  color: var(--text-primary);
}

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

a {
  color: var(--leth-glow);
  text-decoration: none;
  transition: color var(--t-fast) var(--ease-out);
}
a:hover { color: var(--leth-bright); }

img, svg { display: block; max-width: 100%; height: auto; }

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

/* ---------- SCROLLBAR ---------- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb {
  background: var(--leth-dim);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover { background: var(--leth-glow); }

/* ---------- UTILITY ---------- */
.container {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--sp-5);
}

.container--narrow {
  max-width: var(--content-narrow);
}

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

.vethari-text {
  font-family: var(--font-vethari);
  font-style: italic;
  color: var(--text-vethari);
  letter-spacing: 0.02em;
}

.section-label {
  font-family: var(--font-vethari);
  font-size: var(--fs-xs);
  color: var(--leth-dim);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: var(--sp-3);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  color: var(--text-primary);
  margin-bottom: var(--sp-4);
}

.section-subtitle {
  font-family: var(--font-vethari);
  font-size: var(--fs-md);
  color: var(--text-vethari);
  font-style: italic;
  margin-bottom: var(--sp-8);
}

.divider {
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--leth-glow), transparent);
  margin: var(--sp-8) auto;
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-6);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.04em;
  border-radius: var(--radius-md);
  transition: all var(--t-base) var(--ease-out);
  text-transform: uppercase;
  white-space: nowrap;
}

.btn--primary {
  background: linear-gradient(135deg, var(--leth-glow), var(--leth-dim));
  color: var(--bg-abyss);
  box-shadow: var(--shadow-glow);
}
.btn--primary:hover {
  background: linear-gradient(135deg, var(--leth-bright), var(--leth-glow));
  box-shadow: var(--shadow-glow-strong);
  transform: translateY(-2px);
  color: var(--bg-abyss);
}

.btn--secondary {
  background: rgba(201, 168, 76, 0.08);
  color: var(--leth-glow);
  border: 1px solid rgba(201, 168, 76, 0.25);
}
.btn--secondary:hover {
  background: rgba(201, 168, 76, 0.15);
  border-color: rgba(201, 168, 76, 0.4);
  color: var(--leth-bright);
  transform: translateY(-2px);
}

.btn--ghost {
  background: rgba(255,255,255,0.03);
  color: var(--text-secondary);
  border: 1px solid rgba(255,255,255,0.08);
}
.btn--ghost:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.12);
}

.btn--sm { padding: var(--sp-2) var(--sp-4); font-size: var(--fs-xs); }
.btn--lg { padding: var(--sp-4) var(--sp-8); font-size: var(--fs-base); }

/* ---------- CARDS ---------- */
.card {
  background: var(--bg-card);
  border: none;
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  transition: all var(--t-base) var(--ease-out);
  backdrop-filter: blur(10px);
}
.card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-glow);
}

/* ---------- NAVIGATION ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: var(--z-nav);
  padding: var(--sp-4) 0;
  transition: all var(--t-base) var(--ease-out);
  background: transparent;
}

.nav.scrolled {
  background: rgba(5, 5, 8, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: var(--sp-3) 0;
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--sp-5);
}

.nav__brand {
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
  color: var(--text-primary);
  letter-spacing: 0.05em;
}

.nav__brand-vethari {
  font-family: var(--font-vethari);
  font-size: var(--fs-xs);
  color: var(--leth-dim);
  font-style: italic;
  display: block;
  margin-top: -2px;
}

.nav__links {
  display: none;
  list-style: none;
  gap: var(--sp-6);
  align-items: center;
}

.nav__links a {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  position: relative;
}
.nav__links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: var(--leth-glow);
  transition: width var(--t-base) var(--ease-out);
}
.nav__links a:hover { color: var(--text-primary); }
.nav__links a:hover::after { width: 100%; }

.nav__actions {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.nav__lang-toggle {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  padding: var(--sp-1) var(--sp-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--t-fast);
  background: transparent;
}
.nav__lang-toggle:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.nav__hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: var(--sp-2);
  cursor: pointer;
  background: transparent;
  border: none;
}
.nav__hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text-secondary);
  transition: all var(--t-base) var(--ease-out);
}
.nav__hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(4px, 5px); }
.nav__hamburger.open span:nth-child(2) { opacity: 0; }
.nav__hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(4px, -5px); }

/* Mobile nav drawer */
.nav__mobile {
  position: fixed;
  top: 0; right: -100%;
  width: 280px; height: 100vh;
  background: var(--bg-secondary);
  border-left: 1px solid var(--border);
  z-index: var(--z-modal);
  padding: var(--sp-16) var(--sp-6);
  transition: right var(--t-slow) var(--ease-out);
  display: flex;
  flex-direction: column;
  gap: var(--sp-6);
}
.nav__mobile.open { right: 0; }
.nav__mobile a {
  font-size: var(--fs-lg);
  color: var(--text-secondary);
  display: block;
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--border);
}
.nav__mobile a:hover { color: var(--leth-glow); }

.nav__mobile-close {
  position: absolute;
  top: var(--sp-4); right: var(--sp-4);
  font-size: var(--fs-xl);
  color: var(--text-muted);
  cursor: pointer;
  background: none; border: none;
}

.nav__mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: calc(var(--z-modal) - 1);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-base);
}
.nav__mobile-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: var(--sp-20) var(--sp-5) var(--sp-12);
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero__bg canvas {
  width: 100%;
  height: 100%;
}

/* Gradient overlay on hero bg */
.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 200px;
  background: linear-gradient(to top, var(--bg-abyss), transparent);
  z-index: 0;
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero__overtitle {
  font-family: var(--font-vethari);
  font-size: var(--fs-sm);
  color: var(--leth-dim);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: var(--sp-4);
  font-style: italic;
  opacity: 0;
  animation: fadeUp 1s var(--ease-out) 0.3s forwards;
}

.hero__title {
  font-family: var(--font-display);
  font-size: var(--fs-hero);
  font-weight: var(--fw-bold);
  line-height: 1.05;
  color: var(--text-primary);
  margin-bottom: var(--sp-4);
  opacity: 0;
  animation: fadeUp 1s var(--ease-out) 0.5s forwards;
}

.hero__title-vethari {
  display: block;
  font-family: var(--font-vethari);
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  color: var(--leth-glow);
  font-weight: var(--fw-normal);
  font-style: italic;
  margin-top: var(--sp-2);
  letter-spacing: 0.08em;
}

.hero__tagline {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--text-secondary);
  line-height: var(--lh-loose);
  margin-bottom: var(--sp-2);
  opacity: 0;
  animation: fadeUp 1s var(--ease-out) 0.7s forwards;
}

.hero__tagline-vethari {
  font-family: var(--font-vethari);
  font-size: var(--fs-sm);
  color: var(--leth-dim);
  font-style: italic;
  margin-bottom: var(--sp-8);
  opacity: 0;
  animation: fadeUp 1s var(--ease-out) 0.9s forwards;
}

.hero__cta-group {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  align-items: center;
  opacity: 0;
  animation: fadeUp 1s var(--ease-out) 1.1s forwards;
}

.hero__scroll-indicator {
  position: absolute;
  bottom: var(--sp-8);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  animation: float 3s ease-in-out infinite;
}
.hero__scroll-indicator svg {
  width: 24px; height: 24px;
  stroke: var(--leth-dim);
  stroke-width: 1.5;
}

/* ---------- SECTION: TRILOGY ---------- */
.trilogy {
  padding: var(--section-pad-y) 0;
  background: var(--bg-primary);
}

.trilogy__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-6);
  margin-top: var(--sp-8);
}
.trilogy__grid .book-card {
  width: 100%;
}

.book-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--bg-card);
  border: none;
  transition: all var(--t-base) var(--ease-out);
  box-shadow: 0 2px 20px rgba(0,0,0,0.4);
}

.book-card:hover {
  box-shadow: var(--shadow-glow-strong), 0 8px 40px rgba(0,0,0,0.5);
  transform: translateY(-6px);
}

.book-card__cover {
  width: 100%;
  aspect-ratio: 3/2;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.book-card__cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(5,5,8,0.6));
  pointer-events: none;
}

.book-card__cover-placeholder {
  font-family: var(--font-display);
  font-size: var(--fs-3xl);
  font-weight: 900;
  color: var(--text-secondary);
  text-align: center;
  line-height: var(--lh-tight);
  padding: var(--sp-6);
  letter-spacing: 0.04em;
  text-shadow: 0 0 40px rgba(201, 168, 76, 0.15);
}

.book-card__cover-number {
  position: absolute;
  top: var(--sp-4); right: var(--sp-4);
  font-family: var(--font-display);
  font-size: var(--fs-4xl);
  font-weight: 900;
  color: rgba(201, 168, 76, 0.15);
  line-height: 1;
}

.book-card__cover-vethari {
  position: absolute;
  bottom: var(--sp-4); left: var(--sp-4);
  font-family: var(--font-vethari);
  font-size: var(--fs-sm);
  color: var(--leth-dim);
  font-style: italic;
}

/* Unique glow per book — stronger presence */
.book-card--reduction .book-card__cover {
  background: linear-gradient(160deg, #1a0f0f 0%, rgba(139, 58, 58, 0.18) 60%, var(--bg-tertiary) 100%);
}
.book-card--reduction:hover .book-card__cover {
  background: linear-gradient(160deg, #1a0f0f 0%, rgba(139, 58, 58, 0.28) 60%, var(--bg-tertiary) 100%);
}
.book-card--bloodline .book-card__cover {
  background: linear-gradient(160deg, #120f1a 0%, rgba(123, 94, 167, 0.18) 60%, var(--bg-tertiary) 100%);
}
.book-card--bloodline:hover .book-card__cover {
  background: linear-gradient(160deg, #120f1a 0%, rgba(123, 94, 167, 0.28) 60%, var(--bg-tertiary) 100%);
}
.book-card--return .book-card__cover {
  background: linear-gradient(160deg, #0a1414 0%, rgba(74, 158, 158, 0.18) 60%, var(--bg-tertiary) 100%);
}
.book-card--return:hover .book-card__cover {
  background: linear-gradient(160deg, #0a1414 0%, rgba(74, 158, 158, 0.28) 60%, var(--bg-tertiary) 100%);
}
.book-card--signal .book-card__cover {
  background: linear-gradient(160deg, #0f0f1a 0%, rgba(76, 110, 180, 0.18) 60%, var(--bg-tertiary) 100%);
}
.book-card--signal:hover .book-card__cover {
  background: linear-gradient(160deg, #0f0f1a 0%, rgba(76, 110, 180, 0.28) 60%, var(--bg-tertiary) 100%);
}
.book-card--presence .book-card__cover {
  background: linear-gradient(160deg, #14120a 0%, rgba(201, 168, 76, 0.18) 60%, var(--bg-tertiary) 100%);
}
.book-card--presence:hover .book-card__cover {
  background: linear-gradient(160deg, #14120a 0%, rgba(201, 168, 76, 0.28) 60%, var(--bg-tertiary) 100%);
}

.book-card__body {
  padding: var(--sp-6);
}

.book-card__number {
  font-family: var(--font-vethari);
  font-size: var(--fs-xs);
  color: var(--leth-dim);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: var(--sp-2);
}

.book-card__title {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  color: var(--text-primary);
  margin-bottom: var(--sp-1);
}

.book-card__title-vethari {
  font-family: var(--font-vethari);
  font-size: var(--fs-sm);
  color: var(--leth-glow);
  font-style: italic;
  margin-bottom: var(--sp-3);
}

.book-card__blurb {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  line-height: var(--lh-loose);
  margin-bottom: var(--sp-5);
}

.book-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.book-card__format-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: var(--sp-3);
}

.format-tag {
  font-size: var(--fs-xs);
  color: var(--text-dim);
  padding: var(--sp-1) var(--sp-3);
  background: rgba(255,255,255,0.03);
  border: none;
  border-radius: var(--radius-full);
  letter-spacing: 0.04em;
}

/* ---------- SECTION: TIMELINE ---------- */
.timeline-section {
  padding: var(--section-pad-y) 0;
  background: var(--bg-abyss);
  position: relative;
  overflow: hidden;
}

.timeline-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--leth-faint), transparent);
}

.timeline-container {
  position: relative;
  width: 100%;
  overflow-x: auto;
  padding: var(--sp-8) 0;
  -webkit-overflow-scrolling: touch;
}

.timeline-container::-webkit-scrollbar { height: 4px; }
.timeline-container::-webkit-scrollbar-thumb { background: var(--leth-dim); border-radius: 2px; }

.timeline {
  position: relative;
  min-width: 1400px;
  height: 400px;
  padding: 0 var(--sp-8);
}

.timeline__line {
  position: absolute;
  top: 50%;
  left: var(--sp-8);
  right: var(--sp-8);
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg,
    var(--resonance-dim),
    var(--leth-dim) 35%,
    var(--reduction) 40%,
    var(--reduction-bright) 42%,
    var(--reduction) 44%,
    var(--leth-dim) 50%,
    var(--earth-dim) 80%,
    var(--leth-glow)
  );
}

.timeline__era-label {
  position: absolute;
  top: 8px;
  font-family: var(--font-vethari);
  font-size: var(--fs-xs);
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-style: italic;
}

.timeline__event {
  position: absolute;
  top: 50%;
  transform: translateX(-50%);
  cursor: pointer;
  z-index: 2;
}

.timeline__event-dot {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--leth-glow);
  border: 3px solid var(--bg-abyss);
  margin: 0 auto;
  transition: all var(--t-base) var(--ease-out);
  position: relative;
}
.timeline__event-dot::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid transparent;
  transition: border-color var(--t-base);
}
.timeline__event:hover .timeline__event-dot::after {
  border-color: var(--leth-glow);
}
.timeline__event:hover .timeline__event-dot {
  box-shadow: 0 0 20px rgba(201, 168, 76, 0.5);
  transform: scale(1.3);
}

.timeline__event--reduction .timeline__event-dot { background: var(--reduction-bright); }
.timeline__event--serath .timeline__event-dot { background: var(--serath-bright); }
.timeline__event--resonance .timeline__event-dot { background: var(--resonance-bright); }
.timeline__event--earth .timeline__event-dot { background: var(--earth); }

.timeline__event-label {
  position: absolute;
  width: 140px;
  text-align: center;
  left: 50%;
  transform: translateX(-50%);
  font-size: var(--fs-xs);
  line-height: var(--lh-normal);
}

.timeline__event-label--above {
  bottom: calc(100% + 12px);
}

.timeline__event-label--below {
  top: calc(100% + 12px);
}

.timeline__event-date {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  margin-bottom: 2px;
}

.timeline__event-name {
  color: var(--text-secondary);
  font-weight: var(--fw-medium);
}

.timeline__event-vethari {
  font-family: var(--font-vethari);
  font-size: 10px;
  color: var(--leth-dim);
  font-style: italic;
  margin-top: 2px;
}

/* Timeline tooltip */
.timeline__tooltip {
  position: fixed;
  max-width: 300px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-lg);
  padding: var(--sp-4);
  box-shadow: var(--shadow-lg);
  z-index: var(--z-toast);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-fast);
}
.timeline__tooltip.visible { opacity: 1; }
.timeline__tooltip h4 {
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  color: var(--text-primary);
  margin-bottom: var(--sp-2);
}
.timeline__tooltip p {
  font-size: var(--fs-xs);
  color: var(--text-secondary);
  line-height: var(--lh-normal);
}

/* Scroll hint */
.timeline__scroll-hint {
  text-align: center;
  font-size: var(--fs-xs);
  color: var(--text-dim);
  margin-top: var(--sp-4);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
}

/* ---------- SECTION: MAP ---------- */
.map-section {
  padding: var(--section-pad-y) 0;
  background: var(--bg-primary);
}

.map__era-toggle {
  display: flex;
  gap: var(--sp-2);
  margin-bottom: var(--sp-6);
  justify-content: center;
}

.map__era-btn {
  padding: var(--sp-2) var(--sp-5);
  font-size: var(--fs-sm);
  color: var(--text-muted);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.03);
  cursor: pointer;
  transition: all var(--t-base);
  font-family: var(--font-body);
}
.map__era-btn.active {
  color: var(--leth-glow);
  border-color: transparent;
  background: var(--leth-faint);
}

.map__canvas-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 2000/857;
  background: #0c0f14;
  border: none;
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
}

.map__svg-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  opacity: 0.10;
  filter: brightness(0.6) sepia(1) hue-rotate(130deg) saturate(1.5);
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.map__canvas-wrap canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.map__legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  justify-content: center;
  margin-top: var(--sp-6);
}

.map__legend-item {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

.map__legend-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
}

/* Map location popup */
.map__popup {
  position: absolute;
  max-width: 260px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-lg);
  padding: var(--sp-4);
  box-shadow: var(--shadow-lg);
  z-index: var(--z-overlay);
  display: none;
}
.map__popup.visible { display: block; }
.map__popup h4 {
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  color: var(--text-primary);
}
.map__popup .vethari-text {
  font-size: var(--fs-xs);
  margin-bottom: var(--sp-2);
}
.map__popup p {
  font-size: var(--fs-xs);
  color: var(--text-secondary);
  line-height: var(--lh-normal);
}

/* ---------- SECTION: LANGUAGE ---------- */
.language-section {
  padding: var(--section-pad-y) 0;
  background: var(--bg-abyss);
}

.language__grid {
  position: relative;
  margin-top: var(--sp-8);
  overflow: hidden;
}
.language__carousel-track {
  display: flex;
  flex-wrap: nowrap;
  gap: var(--sp-4);
  transition: transform 400ms cubic-bezier(0.25, 0.1, 0.25, 1);
}
.language__carousel-track .word-card {
  flex: 0 0 100%;
  min-width: 0;
}
.language__carousel-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--sp-4);
  margin-top: var(--sp-6);
}
.language__carousel-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--t-fast);
  font-size: var(--fs-md);
}
.language__carousel-btn:hover {
  border-color: var(--leth-glow);
  color: var(--leth-glow);
}
.language__carousel-btn:disabled {
  opacity: 0.3;
  cursor: default;
}
.language__carousel-dots {
  display: flex;
  gap: 6px;
}
.language__carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-dim);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all var(--t-fast);
}
.language__carousel-dot--active {
  background: var(--leth-glow);
  transform: scale(1.4);
}

.word-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--sp-4);
  padding: var(--sp-4);
  background: var(--bg-card);
  border: none;
  border-radius: var(--radius-lg);
  align-items: center;
  transition: all var(--t-base) var(--ease-out);
  cursor: pointer;
}
.word-card:hover {
  background: var(--bg-card-hover);
  box-shadow: 0 0 20px rgba(201, 168, 76, 0.08);
}

.word-card__play {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--leth-faint);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--leth-glow);
  font-size: var(--fs-md);
  transition: all var(--t-base);
  flex-shrink: 0;
}
.word-card:hover .word-card__play {
  background: var(--leth-glow);
  color: var(--bg-abyss);
}

.word-card__vethari {
  font-family: var(--font-vethari);
  font-size: var(--fs-lg);
  color: var(--leth-glow);
  font-style: italic;
}

.word-card__ipa {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--text-dim);
  margin-top: 2px;
}

.word-card__translations {
  display: flex;
  gap: var(--sp-4);
  margin-top: var(--sp-1);
}

.word-card__lang {
  font-size: var(--fs-xs);
  color: var(--text-secondary);
}
.word-card__lang span {
  color: var(--text-dim);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.word-card__root {
  font-size: var(--fs-xs);
  color: var(--text-dim);
  margin-top: var(--sp-1);
}

.language__download-area {
  margin-top: var(--sp-10);
  text-align: center;
}

.language__download-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-4);
  margin-top: var(--sp-6);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.download-card {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--t-base) var(--ease-out);
}
.download-card:hover {
  border-color: var(--leth-glow);
  box-shadow: var(--shadow-glow);
}

.download-card__icon {
  font-size: var(--fs-xl);
  width: 48px; height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--leth-faint);
  border-radius: var(--radius-md);
  color: var(--leth-glow);
  flex-shrink: 0;
}

.download-card__text h4 {
  font-size: var(--fs-sm);
  color: var(--text-primary);
  font-weight: var(--fw-semibold);
}
.download-card__text p {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  margin-top: 2px;
}

/* ---------- NAME TRANSLATOR ---------- */
.translator {
  margin-top: var(--sp-12);
  padding: var(--sp-8);
  background: var(--bg-card);
  border: none;
  border-radius: var(--radius-xl);
  text-align: center;
  box-shadow: 0 4px 30px rgba(0,0,0,0.3);
}

.translator__input-group {
  display: flex;
  gap: var(--sp-3);
  max-width: 400px;
  margin: var(--sp-6) auto 0;
}

.translator__input {
  flex: 1;
  padding: var(--sp-3) var(--sp-4);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  outline: none;
  transition: border-color var(--t-fast);
}
.translator__input::placeholder { color: var(--text-dim); }
.translator__input:focus { border-color: var(--leth-glow); }

.translator__result {
  margin-top: var(--sp-6);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.translator__result--visible {
  display: flex;
}

.translator__result-name {
  font-family: var(--font-vethari);
  font-size: var(--fs-3xl);
  color: var(--leth-glow);
  font-style: italic;
  letter-spacing: 0.05em;
  text-shadow: 0 0 30px rgba(201, 168, 76, 0.3);
}

.translator__result-breakdown {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--text-dim);
  margin-top: var(--sp-2);
}

.translator__share {
  margin-top: var(--sp-4);
}

/* ---------- SECTION: RACES ---------- */
.races-section {
  padding: var(--section-pad-y) 0;
  background: var(--bg-primary);
}

.races__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-6);
  margin-top: var(--sp-8);
}

.race-card {
  padding: var(--sp-6);
  background: var(--bg-card);
  border: none;
  border-radius: var(--radius-xl);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.race-card__glow {
  position: absolute;
  top: -40px; left: 50%;
  transform: translateX(-50%);
  width: 200px; height: 200px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
  pointer-events: none;
}
.race-card--verath .race-card__glow { background: var(--leth-glow); }
.race-card--serath .race-card__glow { background: var(--serath); }
.race-card--human .race-card__glow { background: var(--text-muted); }

.race-card__name {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  color: var(--text-primary);
  margin-bottom: var(--sp-1);
  position: relative;
}

.race-card__etymology {
  font-family: var(--font-vethari);
  font-size: var(--fs-sm);
  color: var(--leth-glow);
  font-style: italic;
  margin-bottom: var(--sp-4);
}

.race-card__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
}

.race-card__stat {
  text-align: center;
}
.race-card__stat-value {
  font-family: var(--font-mono);
  font-size: var(--fs-md);
  color: var(--text-primary);
  font-weight: var(--fw-semibold);
}
.race-card__stat-label {
  font-size: 10px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 2px;
}

.race-card__desc {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  line-height: var(--lh-loose);
}

/* RD Spectrum */
.rd-spectrum {
  margin-top: var(--sp-12);
  padding: var(--sp-8);
  background: var(--bg-card);
  border: none;
  border-radius: var(--radius-xl);
}

.rd-spectrum__bar {
  position: relative;
  height: 8px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  margin: var(--sp-8) 0 var(--sp-4);
  overflow: hidden;
}

.rd-spectrum__fill {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg,
    var(--text-dim) 0%,
    var(--earth) 15%,
    var(--serath) 35%,
    var(--resonance) 65%,
    var(--leth-glow) 100%
  );
  width: 100%;
}

.rd-spectrum__markers {
  position: relative;
  height: 60px;
}

.rd-spectrum__marker {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  text-align: center;
}

.rd-spectrum__marker-line {
  width: 1px;
  height: 16px;
  background: var(--text-dim);
  margin: 0 auto var(--sp-1);
}

.rd-spectrum__marker-label {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  white-space: nowrap;
  font-weight: var(--fw-medium);
}

.rd-spectrum__marker-value {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--text-primary);
  font-weight: var(--fw-semibold);
}

/* Interactive RD slider */
.rd-spectrum__slider-wrap {
  margin-top: var(--sp-6);
  text-align: center;
}

.rd-spectrum__slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  max-width: 500px;
  height: 4px;
  background: var(--bg-tertiary);
  border-radius: 2px;
  outline: none;
}
.rd-spectrum__slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--leth-glow);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(201, 168, 76, 0.5);
}

.rd-spectrum__prose-demo {
  margin-top: var(--sp-5);
  padding: var(--sp-6);
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  font-size: var(--fs-base);
  color: var(--text-secondary);
  line-height: var(--lh-loose);
  min-height: 180px;
  transition: all var(--t-slow);
  text-align: left;
  font-style: italic;
}

/* ---------- PULL QUOTE ---------- */
.pull-quote {
  max-width: 640px;
  margin: var(--sp-10) auto 0;
  padding: var(--sp-6) var(--sp-8);
  border: none;
  font-family: var(--font-vethari);
  font-style: italic;
  font-size: var(--fs-md);
  color: var(--text-secondary);
  line-height: var(--lh-loose);
  text-align: center;
  position: relative;
}
.pull-quote::before,
.pull-quote::after {
  content: '';
  display: block;
  width: 40px;
  height: 1px;
  background: var(--leth-dim);
  margin: 0 auto var(--sp-4);
}
.pull-quote::after {
  margin: var(--sp-4) auto 0;
}
.pull-quote__source {
  margin-top: var(--sp-3);
  font-size: var(--fs-xs);
  color: var(--text-dim);
  font-style: normal;
}

/* ---------- SECTION: AUTHOR ---------- */
.author-section {
  padding: var(--section-pad-y) 0;
  background: var(--bg-abyss);
}

.author__layout {
  display: flex;
  flex-direction: column;
  gap: var(--sp-8);
}

.author__header {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
}

.author__photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.author__photo-placeholder {
  font-size: var(--fs-4xl);
  color: var(--text-dim);
}

.author__intro {
  flex: 1;
}

.author__name {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  color: var(--text-primary);
  margin-bottom: var(--sp-1);
}

.author__subtitle {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  margin-bottom: 0;
}

.author__body {
  display: flex;
  flex-direction: column;
  gap: var(--sp-6);
}

.author__text {
  font-size: var(--fs-base);
  color: var(--text-secondary);
  line-height: var(--lh-loose);
}

.author__quote {
  margin: 0;
  padding: var(--sp-5) var(--sp-6);
  background: rgba(201, 168, 76, 0.04);
  border: 1px solid rgba(201, 168, 76, 0.1);
  border-radius: var(--radius-lg);
}

.author__quote-title {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--accent-gold);
  margin-bottom: var(--sp-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.author__quote p {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  line-height: var(--lh-loose);
  font-style: italic;
}

/* ---------- SECTION: NEWSLETTER ---------- */
.newsletter-section {
  padding: var(--section-pad-y) 0;
  background: var(--bg-primary);
  text-align: center;
}
.serath-quiz + .newsletter-section {
  padding-top: var(--sp-10);
}

.newsletter__form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  max-width: 440px;
  margin: var(--sp-6) auto 0;
}

.newsletter__input {
  padding: var(--sp-3) var(--sp-5);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  outline: none;
  transition: border-color var(--t-fast);
}
.newsletter__input::placeholder { color: var(--text-dim); }
.newsletter__input:focus { border-color: var(--leth-glow); }

.newsletter__incentive {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  margin-top: var(--sp-2);
}

/* ---------- FOOTER ---------- */
.footer {
  padding: var(--sp-10) 0 var(--sp-6);
  background: var(--bg-abyss);
  border-top: 1px solid var(--border);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-8);
  margin-bottom: var(--sp-8);
}

.footer__col h4 {
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text-primary);
  margin-bottom: var(--sp-3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.footer__col a {
  display: block;
  font-size: var(--fs-sm);
  color: var(--text-muted);
  padding: var(--sp-1) 0;
}
.footer__col a:hover { color: var(--leth-glow); }

.footer__bottom {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  align-items: center;
  padding-top: var(--sp-6);
  border-top: 1px solid var(--border);
  font-size: var(--fs-xs);
  color: var(--text-dim);
}

.footer__vethari-quote {
  font-family: var(--font-vethari);
  font-style: italic;
  color: var(--leth-dim);
  font-size: var(--fs-sm);
  text-align: center;
  margin-bottom: var(--sp-6);
}

/* ---------- MODAL ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-base);
  padding: var(--sp-4);
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 600px;
  max-height: 85vh;
  overflow-y: auto;
  padding: var(--sp-8);
  transform: translateY(20px);
  transition: transform var(--t-base) var(--ease-out);
}
.modal-overlay.open .modal { transform: translateY(0); }

.modal__close {
  position: absolute;
  top: var(--sp-4); right: var(--sp-4);
  font-size: var(--fs-xl);
  color: var(--text-muted);
  cursor: pointer;
  background: none; border: none;
}

/* ---------- ANIMATIONS ---------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

@keyframes pulse-glow {
  0%, 100% { opacity: 0.4; }
  50%      { opacity: 1; }
}

@keyframes leth-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(201, 168, 76, 0.4); }
  70%  { box-shadow: 0 0 0 10px rgba(201, 168, 76, 0); }
  100% { box-shadow: 0 0 0 0 rgba(201, 168, 76, 0); }
}

/* Scroll-reveal */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* ---------- RESPONSIVE: TABLET ---------- */
@media (min-width: 640px) {
  .hero__cta-group { flex-direction: row; justify-content: center; }
  .hero__cta-group .btn { min-width: 220px; }

  .trilogy__grid .book-card { width: calc(33.333% - var(--sp-6) * 2 / 3); }

  .language__carousel-track .word-card { flex: 0 0 calc(50% - var(--sp-4) / 2); }
  .language__download-cards { grid-template-columns: 1fr 1fr; }

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

  .author__photo { width: 140px; height: 140px; }

  .newsletter__form { flex-direction: row; }
  .newsletter__input { flex: 1; }

  .footer__grid { grid-template-columns: 2fr 1fr 1fr; }
  .footer__bottom { flex-direction: row; justify-content: space-between; }
}

/* ---------- RESPONSIVE: DESKTOP ---------- */
@media (min-width: 1024px) {
  .nav__links { display: flex; }
  .nav__hamburger { display: none; }

  .trilogy__grid .book-card { width: calc(33.333% - var(--sp-6) * 2 / 3); }

  .book-card__cover { aspect-ratio: 2/3; max-height: none; }

  .language__carousel-track .word-card { flex: 0 0 calc(33.333% - var(--sp-4) * 2 / 3); }

  .footer__grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
}

/* ---------- RESPONSIVE: LARGE ---------- */
@media (min-width: 1400px) {
  :root {
    --content-max: 1320px;
  }
}

/* ---------- LETH NETWORK BACKGROUND EFFECT ---------- */
.leth-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  opacity: 0.3;
}

/* ---------- BACK TO TOP ---------- */
.back-to-top {
  position: fixed;
  bottom: var(--sp-6);
  right: var(--sp-6);
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--leth-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: var(--z-sticky);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: all var(--t-base) var(--ease-out);
  backdrop-filter: blur(10px);
}
.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.back-to-top:hover {
  background: var(--leth-faint);
  border-color: var(--leth-glow);
  box-shadow: var(--shadow-glow);
}
.back-to-top svg { width: 20px; height: 20px; }

/* ---------- RESONANCE WEAVING FRAGMENT ---------- */
.weaving-fragment {
  max-width: 640px;
  margin: 0 auto var(--sp-16);
  padding: var(--sp-8) var(--sp-6);
  text-align: center;
}

.weaving-fragment__label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--sp-6);
}

.weaving-fragment__text {
  border: none;
  margin: 0;
  padding: 0;
}

.weaving-fragment__line {
  font-family: var(--font-vethari);
  font-size: 1.25rem;
  line-height: 1.8;
  color: var(--text-primary);
  font-style: italic;
  margin: 0;
}

.weaving-fragment__line--break {
  height: var(--sp-4);
}

.weaving-fragment__line--venth {
  font-size: 1.5rem;
  letter-spacing: 0.15em;
  color: var(--leth-glow);
  font-style: normal;
  margin-top: var(--sp-2);
  opacity: 0.85;
}

.weaving-fragment__attribution {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: var(--sp-6);
  font-style: italic;
}

/* ---------- GRAMMAR REFERENCE ---------- */
.language__grammar { margin-top: var(--sp-16); }

.language__grammar-title {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  color: var(--text-primary);
  margin-bottom: var(--sp-6);
}

/* Grammar tabs */
.grammar-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-bottom: var(--sp-6);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  justify-content: center;
}
.grammar-tab {
  padding: var(--sp-2) var(--sp-4);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-muted);
  font-size: var(--fs-sm);
  font-family: var(--font-mono);
  cursor: pointer;
  transition: all 0.2s ease;
}
.grammar-tab:hover {
  border-color: rgba(201, 168, 76, 0.3);
  color: var(--text-secondary);
}
.grammar-tab--active {
  background: rgba(201, 168, 76, 0.1);
  border-color: rgba(201, 168, 76, 0.4);
  color: var(--leth-glow);
}

/* Grammar panels */
.grammar-panels {
  max-width: 800px;
  margin: 0 auto;
}
.grammar-panel {
  display: none;
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: var(--sp-6);
  animation: fadeUp 0.3s ease forwards;
}
.grammar-panel--active {
  display: block;
}
.grammar-panel__desc {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  line-height: var(--lh-loose);
  margin-bottom: var(--sp-5);
}
.grammar-panel__note {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  line-height: var(--lh-loose);
  margin-top: var(--sp-4);
}
.grammar-panel__example {
  font-size: var(--fs-sm);
  line-height: var(--lh-loose);
  margin-top: var(--sp-5);
  padding: var(--sp-3) var(--sp-4);
  background: rgba(201, 168, 76, 0.04);
  border-left: 2px solid var(--leth-glow);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.grammar-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
}
.grammar-table th {
  text-align: left;
  font-weight: 600;
  color: var(--text-muted);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: var(--sp-2) var(--sp-3);
  border-bottom: 1px solid var(--border);
}
.grammar-table td {
  padding: var(--sp-2) var(--sp-3);
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.grammar-table td:first-child {
  font-family: var(--font-vethari, var(--font-display));
  font-style: italic;
  color: var(--leth-glow);
}

/* Sentence order visualization */
.grammar-order {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  margin: var(--sp-4) 0;
}
.grammar-order__slot {
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius-md);
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 1px solid;
}
.grammar-order__slot--emotion  { color: #e85d75; border-color: rgba(232,93,117,0.3); background: rgba(232,93,117,0.08); }
.grammar-order__slot--context  { color: #4a9e9e; border-color: rgba(74,158,158,0.3); background: rgba(74,158,158,0.08); }
.grammar-order__slot--subject  { color: #c9a84c; border-color: rgba(201,168,76,0.3); background: rgba(201,168,76,0.08); }
.grammar-order__slot--object   { color: #7b5ea7; border-color: rgba(123,94,167,0.3); background: rgba(123,94,167,0.08); }
.grammar-order__slot--epistemic { color: #e8e4dc; border-color: rgba(232,228,220,0.3); background: rgba(232,228,220,0.06); }
.grammar-order__slot--verb     { color: #5a8fd4; border-color: rgba(90,143,212,0.3); background: rgba(90,143,212,0.08); }
.grammar-order__arrow { color: var(--text-muted); font-size: var(--fs-sm); }

/* Epistemic conjugation grid */
.epistemic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--sp-3);
}
.epistemic-form {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: var(--sp-3) var(--sp-4);
  background: rgba(74, 158, 158, 0.04);
  border: 1px solid rgba(74, 158, 158, 0.12);
  border-radius: var(--radius-md);
}
.epistemic-form--lost {
  background: rgba(232, 93, 117, 0.04);
  border-color: rgba(232, 93, 117, 0.12);
}
.epistemic-form__marker {
  font-family: var(--font-vethari, var(--font-display));
  font-style: italic;
  font-size: var(--fs-md);
  color: var(--leth-glow);
  font-weight: 600;
}
.epistemic-form--lost .epistemic-form__marker {
  color: #e85d75;
}
.epistemic-form__name {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-primary);
}
.epistemic-form__gloss {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  line-height: var(--lh-normal);
}

@media (max-width: 640px) {
  .grammar-cards { grid-template-columns: 1fr; }
  .grammar-order { justify-content: center; }
  .epistemic-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- LANGUAGE TOGGLE i18n ---------- */
[data-lang="en"] [data-i18n-de],
[data-lang="de"] [data-i18n-en] {
  display: none !important;
}

/* ---------- LOCKED CONTENT (Unreleased Books) ---------- */
.book-card--locked {
  position: relative;
}
.book-card--locked .book-card__cover {
  filter: grayscale(0.7) brightness(0.5);
}
.book-card--locked .book-card__blurb {
  display: none;
}
.book-card--locked .book-card__actions {
  display: none;
}
.book-card--locked .book-card__format-tags {
  display: none;
}
.book-card__locked-notice {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-top: var(--sp-4);
  padding: var(--sp-3) var(--sp-4);
  background: rgba(255, 255, 255, 0.02);
  border: none;
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  color: var(--text-dim);
  font-style: italic;
}
.book-card__locked-notice svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  opacity: 0.5;
}

/* Timeline locked events */
.timeline__event--locked .timeline__event-label {
  opacity: 0.35;
  filter: grayscale(0.6);
}
.timeline__event--locked .timeline__event-dot {
  background: var(--text-dim) !important;
  box-shadow: none !important;
}
.timeline__event--locked .timeline__event-name {
  text-decoration: none;
}
.timeline__event--locked .timeline__event-name::after {
  content: ' \01F512';
  font-size: 10px;
}

/* Map locked locations */
.map__popup--locked {
  opacity: 0.5;
  border-color: var(--text-dim);
}
.map__popup--locked::after {
  content: ' — Unreleased';
  font-style: italic;
  color: var(--text-dim);
}

/* ---------- COMING SOON MODAL ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(5, 5, 8, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4);
  animation: fadeIn 200ms ease;
}
.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--sp-8) var(--sp-6);
  max-width: 420px;
  width: 100%;
  text-align: center;
  position: relative;
}
.modal-close {
  position: absolute;
  top: var(--sp-3);
  right: var(--sp-3);
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-close:hover { color: var(--text-primary); }
.modal-icon { font-size: 2rem; margin-bottom: var(--sp-3); }
.modal-title {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  color: var(--text-primary);
  margin-bottom: var(--sp-3);
}
.modal-desc {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  line-height: var(--lh-loose);
  margin-bottom: var(--sp-5);
}
.modal-cta { display: inline-block; }

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ---------- TOUCH TARGET FIXES ---------- */
.lang-switcher button {
  min-width: 44px;
  min-height: 44px;
}
.btn--sm {
  min-height: 44px;
  padding-left: var(--sp-4);
  padding-right: var(--sp-4);
}
.timeline__event {
  min-width: 32px;
  min-height: 32px;
  padding: 8px;
}

/* ---------- WORD CARD KEYBOARD FOCUS ---------- */
.word-card:focus-visible {
  outline: 2px solid var(--leth-glow);
  outline-offset: 2px;
}

/* ---------- TIMELINE ACCESSIBLE FOCUS ---------- */
.timeline__event:focus-visible {
  outline: 2px solid var(--leth-glow);
  outline-offset: 4px;
  border-radius: var(--radius-md);
}

/* ---------- REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .hero__scroll-indicator { animation: none; }
  .leth-bg canvas,
  .hero__bg canvas { display: none; }
  .timeline__event-dot { animation: none !important; }
  .back-to-top { transition: none; }
  .modal-overlay { animation: none; }
}

/* ---------- PRINT STYLES ---------- */
@media print {
  body { background: white; color: #222; }
  .leth-bg, .hero__bg canvas, .nav, .back-to-top,
  .modal-overlay, .newsletter-section, .timeline-section,
  .map-section, .footer { display: none; }
  .book-card { break-inside: avoid; border: 1px solid #ccc; }
  .book-card__cover { filter: none; }
  .book-card--locked .book-card__blurb { display: block; color: #999; }
  a { color: #222; text-decoration: underline; }
  .section-title, .hero__title { color: #111; }
  .hero { background: white; padding: 2rem; }
  .hero__title { font-size: 2rem; }
}

/* ========== SKIP TO CONTENT ========== */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  padding: 12px 24px;
  background: var(--leth-glow);
  color: var(--bg-primary);
  font-weight: 700;
  z-index: 10000;
  transition: top 200ms;
}
.skip-link:focus {
  top: 0;
}

/* ========== COOKIE CONSENT BANNER ========== */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 1rem 2rem;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: var(--fs-xs);
  color: var(--text-secondary);
}
.cookie-banner.visible { display: flex; }
.cookie-banner a { color: var(--leth-glow); text-decoration: underline; }
.cookie-banner__actions { display: flex; gap: 0.5rem; }

/* ========== STICKY CTA BAR ========== */
.sticky-cta {
  position: fixed;
  bottom: -80px;
  left: 0;
  right: 0;
  background: rgba(10, 10, 18, 0.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  padding: 0.75rem 2rem;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  transition: bottom 400ms cubic-bezier(0.4, 0, 0.2, 1);
}
.sticky-cta.visible { bottom: 0; }
.sticky-cta__text {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-style: italic;
}
@media (max-width: 640px) {
  .sticky-cta__text { display: none; }
}

/* ========== EXCERPT MODAL ========== */
.excerpt-modal {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 8, 0.92);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.excerpt-modal.visible { display: flex; }
.excerpt-modal__content {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  max-width: 680px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  padding: var(--sp-8);
  position: relative;
}
.excerpt-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 150ms;
}
.excerpt-modal__close:hover { background: var(--bg-card); }
.excerpt-modal__label {
  font-size: var(--fs-xs);
  color: var(--leth-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--sp-2);
}
.excerpt-modal__title {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  color: var(--text-primary);
  margin-bottom: var(--sp-1);
}
.excerpt-modal__chapter {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  margin-bottom: var(--sp-6);
}
.excerpt-modal__prose {
  font-family: var(--font-display);
  font-size: var(--fs-md);
  line-height: 1.9;
  color: var(--text-secondary);
}
.excerpt-modal__prose p {
  margin-bottom: 1.2em;
  text-indent: 2em;
}
.excerpt-modal__prose p:first-child {
  text-indent: 0;
}
.excerpt-modal__cta {
  margin-top: var(--sp-6);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--border);
  text-align: center;
}
.excerpt-modal__fade {
  font-style: italic;
  color: var(--text-dim);
  text-align: center;
  margin-top: var(--sp-4);
}

/* ========== SERATH QUIZ ========== */
.serath-quiz {
  margin-top: var(--sp-12);
  margin-bottom: var(--sp-12);
  padding: var(--sp-8);
  background: linear-gradient(135deg, rgba(123, 94, 167, 0.08), rgba(74, 158, 158, 0.05));
  border: 1px solid var(--serath-faint);
  border-radius: var(--radius-xl);
  text-align: center;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}
.serath-quiz__title {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  color: var(--serath-bright);
  margin-bottom: var(--sp-2);
}
.serath-quiz__desc {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  margin-bottom: var(--sp-6);
}
.serath-quiz__question {
  margin-bottom: var(--sp-5);
  text-align: left;
}
.serath-quiz__q-text {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  margin-bottom: var(--sp-3);
  font-style: italic;
}
.serath-quiz__options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.serath-quiz__option {
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  text-align: left;
  transition: all 150ms;
  font-family: var(--font-body);
}
.serath-quiz__option:hover {
  border-color: var(--serath);
  color: var(--text-primary);
}
.serath-quiz__option.selected {
  border-color: var(--serath-bright);
  background: rgba(123, 94, 167, 0.12);
  color: var(--serath-bright);
}
.serath-quiz__progress {
  font-size: var(--fs-xs);
  color: var(--text-dim);
  margin-bottom: var(--sp-4);
}
.serath-quiz__result {
  padding: var(--sp-6);
  text-align: center;
}
.serath-quiz__rd-value {
  font-family: var(--font-mono);
  font-size: 3rem;
  color: var(--serath-bright);
  font-weight: 700;
}
.serath-quiz__rd-label {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  margin-bottom: var(--sp-4);
}
.serath-quiz__classification {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-style: italic;
  margin-bottom: var(--sp-4);
}
.serath-quiz__share-card {
  padding: var(--sp-4);
  background: var(--bg-card);
  border: 1px solid var(--serath-faint);
  border-radius: var(--radius-lg);
  margin: var(--sp-4) auto;
  max-width: 400px;
  font-size: var(--fs-sm);
  color: var(--text-secondary);
}
.serath-quiz__share {
  margin-top: var(--sp-4);
}
.serath-quiz__share-label {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--sp-3);
}
.serath-quiz__share-buttons {
  display: flex;
  justify-content: center;
  gap: var(--sp-3);
}
.serath-quiz__share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.serath-quiz__share-btn:hover {
  color: var(--serath-bright);
  border-color: var(--serath-bright);
  background: rgba(155,126,199,0.08);
}
.serath-quiz__share-btn.copied {
  color: #5cb85c;
  border-color: #5cb85c;
}

/* ========== WORD PROGRESS TRACKER ========== */
.word-tracker {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  justify-content: center;
  margin-bottom: var(--sp-6);
  font-size: var(--fs-sm);
  color: var(--text-muted);
}
.word-tracker__bar {
  width: 120px;
  height: 4px;
  background: var(--bg-tertiary);
  border-radius: 2px;
  overflow: hidden;
}
.word-tracker__fill {
  height: 100%;
  background: var(--leth-glow);
  border-radius: 2px;
  transition: width 400ms ease;
  width: 0%;
}

/* ========== QUESTION LINE STYLING ========== */
.book-card__question {
  font-family: var(--font-display) !important;
  font-style: italic !important;
  font-size: var(--fs-md) !important;
  color: var(--leth-glow) !important;
  line-height: var(--lh-loose);
  padding: var(--sp-3) 0;
  border-top: 1px solid var(--leth-faint);
  margin-top: var(--sp-3);
}

/* ========== HERO STATUS LINE ========== */
.hero__status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border: 1px solid var(--leth-faint);
  border-radius: var(--radius-full);
  font-size: var(--fs-xs);
  color: var(--leth-glow);
  margin-bottom: var(--sp-4);
  letter-spacing: 0.05em;
}
.hero__status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--leth-glow);
  animation: pulse-dot 2s ease infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* ========== RACE CARD ICONS ========== */
.race-card__icon {
  width: 48px;
  height: 48px;
  margin-bottom: var(--sp-3);
}
.race-card--verath .race-card__icon { color: var(--leth-glow); }
.race-card--serath .race-card__icon { color: var(--serath-bright); }
.race-card--human .race-card__icon { color: var(--earth); }

/* ========== MOBILE MAP FALLBACK ========== */
.map__list-fallback {
  display: none;
}
@media (max-width: 768px) {
  .map__canvas-wrap canvas { display: none; }
  .map__list-fallback {
    display: block;
    padding: 0;
    list-style: none;
  }
  .map__list-item {
    padding: var(--sp-4);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: var(--sp-3);
  }
  .map__list-item--locked {
    opacity: 0.4;
    filter: grayscale(0.5);
  }
  .map__list-name {
    font-family: var(--font-display);
    font-size: var(--fs-md);
    color: var(--text-primary);
    margin-bottom: var(--sp-1);
  }
  .map__list-vethari {
    font-family: var(--font-vethari);
    font-style: italic;
    font-size: var(--fs-sm);
    color: var(--leth-dim);
    margin-bottom: var(--sp-2);
  }
  .map__list-desc {
    font-size: var(--fs-sm);
    color: var(--text-muted);
    line-height: var(--lh-loose);
  }
}

/* ========== LEGAL PAGES ========== */
.legal-page {
  min-height: 100vh;
  background: var(--bg-primary);
  color: var(--text-secondary);
  padding: var(--sp-12) var(--sp-6);
}
.legal-page__header {
  text-align: center;
  margin-bottom: var(--sp-10);
}
.legal-page__back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--leth-glow);
  text-decoration: none;
  font-size: var(--fs-sm);
  margin-bottom: var(--sp-6);
}
.legal-page__back:hover { text-decoration: underline; }
.legal-page h1 {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  color: var(--text-primary);
  margin-bottom: var(--sp-2);
}
.legal-page h2 {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  color: var(--text-primary);
  margin-top: var(--sp-8);
  margin-bottom: var(--sp-3);
  border-bottom: 1px solid var(--border);
  padding-bottom: var(--sp-2);
}
.legal-page h3 {
  font-size: var(--fs-md);
  color: var(--text-primary);
  margin-top: var(--sp-5);
  margin-bottom: var(--sp-2);
}
.legal-page p, .legal-page li {
  font-size: var(--fs-sm);
  line-height: 1.8;
  margin-bottom: var(--sp-3);
}
.legal-page ul {
  padding-left: 1.5rem;
  margin-bottom: var(--sp-4);
}
.legal-page a {
  color: var(--leth-glow);
  text-decoration: underline;
}
.legal-page__content {
  max-width: 800px;
  margin: 0 auto;
}
.legal-page__lang-section {
  margin-bottom: var(--sp-12);
  padding-bottom: var(--sp-8);
  border-bottom: 2px solid var(--border);
}
.legal-page__lang-label {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--leth-faint);
  color: var(--leth-glow);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  border-radius: var(--radius-full);
  margin-bottom: var(--sp-4);
}

/* ---------- DOWNLOAD PANEL ---------- */
.download-panel {
  margin-top: var(--sp-6);
  padding: var(--sp-8) var(--sp-6);
  background: linear-gradient(180deg, rgba(18,18,32,0.9), rgba(10,10,18,0.95));
  border-radius: var(--radius-xl);
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  box-shadow: 0 4px 30px rgba(0,0,0,0.3);
}
.download-panel__items {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-6);
  justify-content: center;
  margin-bottom: var(--sp-5);
}
.download-panel__item {
  flex: 1;
  min-width: 140px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
}
.download-panel__icon {
  opacity: 0.8;
}
.download-panel__label {
  font-size: var(--fs-sm);
  color: var(--text-primary);
  font-weight: var(--fw-semibold);
}
.download-panel__desc {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  margin-bottom: var(--sp-4);
}

/* ---------- NEWSLETTER CARDS ---------- */
.newsletter__cards {
  margin-top: var(--sp-10);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  justify-content: center;
  align-items: stretch;
}
.newsletter__card {
  padding: var(--sp-5);
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  text-align: center;
  flex: 1;
  min-width: 240px;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
}
.newsletter__card-icon {
  opacity: 0.7;
  margin-bottom: var(--sp-1);
}
.newsletter__card-title {
  font-size: var(--fs-sm);
  color: var(--text-primary);
  font-weight: var(--fw-semibold);
}
.newsletter__card-desc {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  margin-bottom: var(--sp-2);
}
.newsletter__card > .btn {
  margin-top: auto;
}

/* Vote counter */
.vote-counter { margin-bottom: var(--sp-3); }
.vote-counter__bar {
  width: 100%;
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: var(--sp-1);
}
.vote-counter__progress {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--leth-dim), var(--leth-glow));
  border-radius: var(--radius-full);
  transition: width 0.6s ease-out;
}
.vote-counter__text {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

/* Toast */
.tis-toast {
  position: fixed;
  bottom: var(--sp-6);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-card);
  border: 1px solid rgba(201, 168, 76, 0.25);
  border-radius: var(--radius-md);
  padding: var(--sp-3) var(--sp-6);
  font-size: var(--fs-sm);
  color: var(--leth-glow);
  z-index: var(--z-toast);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  white-space: nowrap;
}
.tis-toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

/* Vote modal */
.vote-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease-out;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.vote-modal {
  position: relative;
  background: var(--bg-card);
  border: 1px solid rgba(201, 168, 76, 0.15);
  border-radius: var(--radius-xl);
  padding: var(--sp-8) var(--sp-8) var(--sp-6);
  max-width: 400px;
  width: 90%;
  text-align: center;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}
.vote-modal__close {
  position: absolute;
  top: var(--sp-3);
  right: var(--sp-3);
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: var(--sp-1);
}
.vote-modal__close:hover { color: var(--text-primary); }
.vote-modal__title {
  font-size: var(--fs-lg);
  color: var(--text-primary);
  font-weight: var(--fw-semibold);
  margin-bottom: var(--sp-2);
}
.vote-modal__desc {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  margin-bottom: var(--sp-5);
}
.vote-modal__turnstile {
  display: flex;
  justify-content: center;
  margin-bottom: var(--sp-4);
  min-height: 65px;
}
.vote-modal__status {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  min-height: 1.4em;
}
.vote-modal__status--error { color: #e06c75; }
.vote-modal__status--ok { color: var(--leth-glow); }

/* ============================================================
   BOOK DETAIL PAGE
   ============================================================ */

/* ── Hero ── */
.book-hero {
  padding: calc(var(--sp-20) + 60px) 0 var(--sp-12);
  background: var(--bg-primary);
}
.book-hero__layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-8);
}
.book-hero__cover {
  flex-shrink: 0;
}
.book-card__cover--detail {
  width: 240px;
  height: 340px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  position: relative;
}
.book-hero__label {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-bottom: var(--sp-2);
}
.book-hero__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  color: var(--text-primary);
  letter-spacing: var(--ls-tight);
  line-height: 1.1;
  margin-bottom: var(--sp-2);
}
.book-hero__subtitle {
  font-family: var(--font-vethari);
  font-style: italic;
  font-size: var(--fs-sm);
  color: var(--accent-gold);
  margin-bottom: var(--sp-4);
}
.book-hero__blurb {
  font-size: var(--fs-base);
  color: var(--text-secondary);
  line-height: var(--lh-loose);
  max-width: 600px;
  margin-bottom: var(--sp-4);
}
.book-hero__question {
  font-family: var(--font-vethari);
  font-style: italic;
  font-size: var(--fs-md);
  color: var(--accent-gold);
  margin-bottom: var(--sp-6);
}
.book-hero__locked {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  color: var(--text-dim);
  font-size: var(--fs-sm);
  padding: var(--sp-4) var(--sp-5);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  margin-bottom: var(--sp-6);
}
.book-hero__actions {
  display: flex;
  gap: var(--sp-3);
  margin-top: var(--sp-4);
}

/* ── Themes ── */
.book-themes {
  padding: var(--sp-6) 0;
  border-bottom: 1px solid var(--border);
}
.book-themes__pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-3);
}
.book-themes__pill {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: var(--fs-xs);
  color: var(--text-secondary);
  background: var(--bg-secondary);
}

/* ── Characters ── */
.book-characters {
  padding: var(--sp-12) 0;
}
.book-characters__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-6);
  margin-top: var(--sp-6);
}
.character-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
  transition: border-color 0.3s;
}
.character-card:hover {
  border-color: var(--accent-gold-dim);
}
.character-card__name {
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--sp-1);
}
.character-card__vethari {
  font-family: var(--font-vethari);
  font-style: italic;
  font-size: var(--fs-sm);
  color: var(--accent-gold);
  margin-bottom: var(--sp-2);
}
.character-card__tagline {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  font-style: italic;
}

/* ── Locations ── */
.book-locations {
  padding: var(--sp-12) 0;
  background: var(--bg-secondary);
}
.book-locations__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-5);
  margin-top: var(--sp-6);
}
.location-card {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
}
.location-card__header {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
}
.location-card__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.location-card__era {
  font-family: var(--font-mono);
  font-size: var(--fs-xxs, 0.65rem);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}
.location-card__era--verath {
  color: var(--accent-gold);
  background: rgba(201, 168, 76, 0.1);
  border: 1px solid rgba(201, 168, 76, 0.3);
}
.location-card__era--present {
  color: var(--leth-glow);
  background: rgba(94, 196, 196, 0.1);
  border: 1px solid rgba(94, 196, 196, 0.3);
}
.location-card__name {
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--sp-1);
}
.location-card__vethari {
  font-family: var(--font-vethari);
  font-style: italic;
  font-size: var(--fs-sm);
  color: var(--accent-gold);
  margin-bottom: var(--sp-2);
}
.location-card__relevance {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  line-height: var(--lh-loose);
  margin-bottom: var(--sp-2);
  font-weight: 500;
}
.location-card__desc {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  line-height: var(--lh-base);
}
.location-card__locked {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-xs);
  color: var(--text-dim);
}

/* ── Timeline excerpt ── */
.book-timeline {
  padding: var(--sp-12) 0;
}
.book-timeline__event {
  display: flex;
  gap: var(--sp-5);
  padding: var(--sp-4) 0;
  border-bottom: 1px solid var(--border);
}
.book-timeline__event:last-child { border-bottom: none; }
.book-timeline__date {
  flex-shrink: 0;
  width: 120px;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--text-muted);
  padding-top: 2px;
}
.book-timeline__name {
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--sp-1);
}
.book-timeline__vethari {
  font-family: var(--font-vethari);
  font-style: italic;
  font-size: var(--fs-xs);
  color: var(--accent-gold);
}
.book-timeline__desc {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  line-height: var(--lh-loose);
  margin-top: var(--sp-2);
}
.book-timeline__locked {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-xs);
  color: var(--text-dim);
  margin-top: var(--sp-2);
}

/* ── Prev/Next Nav ── */
.book-nav {
  padding: var(--sp-8) 0;
  border-top: 1px solid var(--border);
}
.book-nav__inner {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-4);
}
.book-nav__link {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  text-decoration: none;
  padding: var(--sp-4) var(--sp-5);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color 0.3s, background 0.3s;
  flex: 1;
  max-width: 300px;
}
.book-nav__link:hover {
  border-color: var(--accent-gold-dim);
  background: var(--bg-secondary);
}
.book-nav__link--next {
  text-align: right;
  margin-left: auto;
  justify-content: flex-end;
}
.book-nav__arrow {
  font-size: var(--fs-xl);
  color: var(--accent-gold);
}
.book-nav__direction {
  display: block;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
}
.book-nav__title {
  display: block;
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--text-primary);
}

/* ── Book-specific color accents ── */
.book-hero--reduction { border-top: 2px solid #8b3a3a; }
.book-hero--bloodline { border-top: 2px solid var(--leth-glow); }
.book-hero--return    { border-top: 2px solid var(--accent-gold); }
.book-hero--signal    { border-top: 2px solid rgba(76, 110, 180, 0.6); }
.book-hero--presence  { border-top: 2px solid rgba(201, 168, 76, 0.6); }

/* ── Responsive ── */
@media (min-width: 640px) {
  .book-hero__layout {
    flex-direction: row;
    align-items: flex-start;
  }
  .book-characters__grid { grid-template-columns: repeat(2, 1fr); }
  .book-locations__grid  { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .book-characters__grid { grid-template-columns: repeat(3, 1fr); }
  .book-locations__grid  { grid-template-columns: repeat(3, 1fr); }
}
