:root {
  color-scheme: dark;
  --ink: #03060a;
  --ink-card: #080f18;
  --ink-card-hover: #0c1524;
  --ink-raised: #0e1a2b;
  --paper: #f0f6fc;
  --paper-bright: #ffffff;
  --muted: #8da3b8;
  --faint: #566c82;
  --line: rgba(70, 140, 200, 0.16);
  --line-bright: rgba(87, 221, 255, 0.35);
  --cyan: #18baff;
  --cyan-bright: #52d2ff;
  --cyan-glow: rgba(24, 186, 255, 0.35);
  --gold: #ffc044;
  --gold-warm: #ff9d00;
  --gold-glow: rgba(255, 192, 68, 0.32);
  --solar: #ff9d00;
  --lunar: #52c8ff;
  --violet: #a872ff;
  --violet-glow: rgba(168, 114, 255, 0.28);
  --danger: #ff4757;
  --card-radius: 20px;
  --pill-radius: 999px;
  --content: min(1340px, calc(100vw - 64px));
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--ink);
  color: var(--paper);
  scroll-behavior: smooth;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-width: 320px;
  background: var(--ink);
  color: var(--paper);
}

body {
  overflow-x: hidden;
  background-image:
    radial-gradient(circle at 14% 10%, rgba(24, 186, 255, 0.12), transparent 32%),
    radial-gradient(circle at 86% 28%, rgba(255, 157, 0, 0.09), transparent 38%),
    radial-gradient(circle at 50% 55%, rgba(168, 114, 255, 0.08), transparent 45%),
    radial-gradient(circle at 20% 80%, rgba(24, 186, 255, 0.1), transparent 36%),
    radial-gradient(circle at 80% 92%, rgba(255, 192, 68, 0.11), transparent 40%);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 30;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
figure { margin: 0; }

.image-zoom-trigger {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: zoom-in;
}

.image-zoom-trigger:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: -4px;
}

.skip-link {
  position: fixed;
  left: 20px;
  top: -80px;
  z-index: 100;
  padding: 12px 20px;
  background: var(--gold);
  color: #03060a;
  font-weight: 800;
  border-radius: var(--pill-radius);
  transition: top 0.2s;
}
.skip-link:focus { top: 20px; }

/* ── Sticky Header ───────────────────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 45;
  width: var(--content);
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: rgba(6, 11, 18, 0.72);
  border: 1px solid rgba(87, 221, 255, 0.2);
  border-radius: var(--pill-radius);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: all 0.3s ease;
}

.wordmark {
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.26em;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 2px;
}
.wordmark span {
  background: linear-gradient(135deg, var(--gold), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sealed-mark {
  display: flex;
  gap: 9px;
  align-items: center;
  padding: 6px 14px;
  background: rgba(255, 192, 68, 0.08);
  border: 1px solid rgba(255, 192, 68, 0.28);
  border-radius: var(--pill-radius);
  color: #e2c07b;
  font: 700 10px/1.2 "Cascadia Mono", monospace;
  letter-spacing: 0.16em;
}

.sealed-mark i {
  width: 7px;
  height: 7px;
  background: var(--gold);
  border-radius: 1px;
  transform: rotate(45deg);
  box-shadow: 0 0 8px var(--gold);
  animation: diamond-pulse 2.2s ease-in-out infinite;
}

@keyframes diamond-pulse {
  0%, 100% { opacity: 0.6; transform: rotate(45deg) scale(0.9); }
  50% { opacity: 1; transform: rotate(45deg) scale(1.2); filter: drop-shadow(0 0 6px var(--gold)); }
}

/* ── Typography & Base Elements ──────────────────────────────────────────── */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  color: var(--cyan);
  font: 800 11px/1.3 "Cascadia Mono", monospace;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 14px;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
}

h1, h2, h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  margin: 0;
}

h1 {
  font-size: clamp(48px, 6.2vw, 96px);
  line-height: 0.92;
  letter-spacing: -0.05em;
  color: #ffffff;
}

h1 em {
  font-style: italic;
  background: linear-gradient(135deg, var(--cyan-bright) 10%, var(--violet) 65%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 40px rgba(82, 210, 255, 0.35);
}

h2 {
  font-size: clamp(36px, 4.5vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.04em;
  color: #ffffff;
}

.section-shell {
  width: var(--content);
  margin: auto;
  padding: clamp(90px, 11vw, 160px) 0;
  border-bottom: 1px solid var(--line);
  position: relative;
}

.section-heading {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  column-gap: 8vw;
  align-items: end;
  margin-bottom: 52px;
}
.section-heading .eyebrow { grid-column: 1 / -1; }
.section-heading > p:last-child, .mana-intro > p:last-child {
  color: var(--muted);
  font-size: clamp(16px, 1.3vw, 19px);
  line-height: 1.7;
  max-width: 52ch;
  margin: 0;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.button {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  gap: 18px;
  padding: 0 28px;
  border-radius: var(--pill-radius);
  font: 800 12px/1 "Cascadia Mono", monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.28s var(--ease-spring), box-shadow 0.28s, background 0.28s, border-color 0.28s;
}

.button-primary {
  background: linear-gradient(135deg, #ffc044 0%, #ff8c00 100%);
  color: #03070b;
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 6px 24px rgba(255, 140, 0, 0.38), inset 0 1px 1px rgba(255, 255, 255, 0.6);
}

.button-primary:hover, .button-primary:focus-visible {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 34px rgba(255, 140, 0, 0.58), inset 0 1px 1px #ffffff;
}

.button-primary:active {
  transform: translateY(1px) scale(0.98);
}

.button-signal {
  background: linear-gradient(135deg, rgba(20, 48, 32, 0.9), rgba(10, 26, 18, 0.9));
  color: #79f2c3;
  border: 1px solid rgba(121, 242, 195, 0.4);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.25);
}

.button-signal:hover, .button-signal:focus-visible {
  border-color: #79f2c3;
  background: linear-gradient(135deg, rgba(28, 64, 42, 0.95), rgba(14, 36, 24, 0.95));
  box-shadow: 0 12px 32px rgba(121, 242, 195, 0.4);
  transform: translateY(-2px);
}

/* ── Hero Section (Chapter 1) ────────────────────────────────────────────── */
.hero {
  position: relative;
  width: var(--content);
  min-height: 100dvh;
  margin: auto;
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(500px, 1.25fr);
  align-items: center;
  gap: clamp(32px, 5vw, 84px);
  padding: 150px 0 90px;
  border-bottom: 1px solid var(--line);
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 620px;
}

.hero-intro {
  margin: 28px 0 36px;
  max-width: 52ch;
  color: #b0c2d4;
  font-size: clamp(17px, 1.35vw, 21px);
  line-height: 1.65;
}

.hero-portal {
  position: relative;
  justify-self: end;
  width: min(58vw, 880px);
  isolation: isolate;
  border-radius: 24px;
  border: 1px solid rgba(87, 221, 255, 0.25);
  background: linear-gradient(145deg, #09111c, #04080e);
  overflow: hidden;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.8),
    0 0 50px rgba(24, 186, 255, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: transform 0.6s var(--ease-spring), box-shadow 0.6s;
}

.hero-portal:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.85),
    0 0 70px rgba(24, 186, 255, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.hero-portal::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(ellipse at 50% 50%, rgba(24, 186, 255, 0.25), rgba(168, 114, 255, 0.15) 50%, transparent 75%);
  filter: blur(28px);
}

.hero-portal img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.06);
}

.hero-portal figcaption {
  position: absolute;
  right: 18px;
  bottom: 16px;
  padding: 6px 14px;
  background: rgba(3, 7, 12, 0.8);
  border: 1px solid rgba(87, 221, 255, 0.25);
  border-radius: var(--pill-radius);
  color: #c4d7e8;
  font: 700 10px/1 "Cascadia Mono", monospace;
  letter-spacing: 0.15em;
  backdrop-filter: blur(10px);
}

.hero-index {
  position: absolute;
  left: 0;
  bottom: 24px;
  color: rgba(142, 163, 184, 0.4);
  font: 800 11px/1 "Cascadia Mono", monospace;
  letter-spacing: 0.24em;
}

/* ── First Rite (Incarnations - Chapter 2) ────────────────────────────────── */
.incarnation-plate {
  position: relative;
  border-radius: 22px;
  padding: 2px;
  background: linear-gradient(135deg, rgba(82, 210, 255, 0.45) 0%, rgba(168, 114, 255, 0.35) 50%, rgba(255, 192, 68, 0.45) 100%);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7), 0 0 40px rgba(82, 210, 255, 0.12);
  overflow: hidden;
}

.incarnation-plate img {
  width: 100%;
  max-height: 740px;
  object-fit: cover;
  border-radius: 20px;
  filter: saturate(1.08) contrast(1.04);
}

.incarnation-plate figcaption {
  position: absolute;
  inset: auto 24px 22px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  pointer-events: none;
}

.incarnation-plate figcaption span {
  padding: 8px 18px;
  background: rgba(4, 8, 14, 0.85);
  border-radius: var(--pill-radius);
  font: 800 11px/1 "Cascadia Mono", monospace;
  letter-spacing: 0.18em;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.incarnation-plate figcaption span:first-child {
  color: var(--cyan-bright);
  border: 1px solid rgba(82, 210, 255, 0.45);
  box-shadow: 0 0 16px rgba(82, 210, 255, 0.25);
}

.incarnation-plate figcaption span:last-child {
  color: var(--gold);
  border: 1px solid rgba(255, 192, 68, 0.45);
  box-shadow: 0 0 16px rgba(255, 192, 68, 0.25);
}

/* ── The Mirror Chain (Mana - Chapter 3) ──────────────────────────────────── */
.mana {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(48px, 8vw, 120px);
}

.mana-intro {
  position: sticky;
  top: 110px;
  align-self: start;
}

.mana-lines {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.mana-line {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 26px;
  padding: 38px 34px;
  border-radius: var(--card-radius);
  background: rgba(8, 14, 22, 0.72);
  border: 1px solid var(--line);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: transform 0.35s var(--ease-spring), border-color 0.35s, box-shadow 0.35s;
}

.mana-line:hover {
  transform: translateY(-4px);
}

.solar {
  border-color: rgba(255, 192, 68, 0.28);
}
.solar:hover {
  border-color: rgba(255, 192, 68, 0.65);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.6), 0 0 35px rgba(255, 192, 68, 0.18);
}

.lunar {
  border-color: rgba(82, 210, 255, 0.28);
}
.lunar:hover {
  border-color: rgba(82, 210, 255, 0.65);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.6), 0 0 35px rgba(82, 210, 255, 0.18);
}

.mana-sigil {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  transform: rotate(45deg);
  transition: transform 0.4s var(--ease-spring);
}
.mana-line:hover .mana-sigil {
  transform: rotate(45deg) scale(1.08);
}

.solar .mana-sigil {
  background: linear-gradient(135deg, rgba(255, 157, 0, 0.18), rgba(255, 192, 68, 0.08));
  border: 1px solid rgba(255, 192, 68, 0.45);
  color: var(--solar);
  box-shadow: 0 0 20px rgba(255, 157, 0, 0.25);
}

.lunar .mana-sigil {
  background: linear-gradient(135deg, rgba(24, 186, 255, 0.18), rgba(168, 114, 255, 0.08));
  border: 1px solid rgba(82, 210, 255, 0.45);
  color: var(--lunar);
  box-shadow: 0 0 20px rgba(24, 186, 255, 0.25);
}

.mana-sigil svg {
  width: 44px;
  transform: rotate(-45deg);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
}

.mana-label {
  margin: 0 0 8px;
  font: 800 11px/1 "Cascadia Mono", monospace;
  letter-spacing: 0.2em;
}
.solar .mana-label { color: var(--gold); }
.lunar .mana-label { color: var(--cyan); }

.mana-line h3 {
  margin: 0 0 12px;
  font-size: clamp(26px, 2.8vw, 38px);
  color: #ffffff;
}

.mana-line p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

/* ── Visions Section (Chapter 4) ─────────────────────────────────────────── */
.visions-heading { grid-template-columns: 1.3fr 0.7fr; }

.vision-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.vision {
  position: relative;
  overflow: hidden;
  border-radius: var(--card-radius);
  background: linear-gradient(145deg, #09101a, #04070d);
  border: 1px solid var(--line);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  transition: transform 0.5s var(--ease-spring), border-color 0.5s, box-shadow 0.5s;
}

.vision:hover {
  transform: translateY(-5px);
  border-color: rgba(87, 221, 255, 0.45);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7), 0 0 35px rgba(24, 186, 255, 0.18);
}

.vision-main, .vision-mana {
  aspect-ratio: 16 / 9;
}

.vision-world {
  grid-column: 1 / -1;
  min-height: 480px;
  border-color: rgba(255, 192, 68, 0.24);
}
.vision-world:hover {
  border-color: rgba(255, 192, 68, 0.55);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7), 0 0 40px rgba(255, 192, 68, 0.18);
}

.vision img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.06) contrast(1.05);
  transition: transform 0.8s var(--ease-spring);
}

.vision-main img, .vision-mana img {
  object-fit: cover;
}

.vision:hover img {
  transform: scale(1.035);
}

.vision figcaption {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 30px 24px 20px;
  background: linear-gradient(0deg, rgba(3, 6, 11, 0.95) 0%, rgba(3, 6, 11, 0.6) 70%, transparent 100%);
  color: #d2dee9;
  font: 700 11px/1.3 "Cascadia Mono", monospace;
  letter-spacing: 0.12em;
}

.vision figcaption span {
  padding: 4px 10px;
  background: rgba(255, 192, 68, 0.15);
  border: 1px solid rgba(255, 192, 68, 0.35);
  border-radius: 6px;
  color: var(--gold);
  font-size: 11px;
}

.vision-story {
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 80px 36px 32px !important;
}

.vision-story strong {
  max-width: 720px;
  color: #ffffff;
  font: 500 clamp(26px, 3.2vw, 44px)/1.08 Georgia, serif;
  letter-spacing: -0.02em;
}

.vision-story small {
  max-width: 760px;
  color: #b5c5d4;
  font: 400 15px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

/* ── Tyche Section (Chapter 5) ───────────────────────────────────────────── */
.tyche {
  min-height: 580px;
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 8vw;
  align-items: center;
  padding: 100px 0;
}

.tyche-signal {
  justify-self: center;
  width: min(320px, 65vw);
  color: #5eead4;
  filter: drop-shadow(0 0 30px rgba(94, 234, 212, 0.3));
}

.tyche-signal svg {
  width: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 0.8;
  animation: signal-turn 32s linear infinite;
}

.tyche-signal .signal-core {
  fill: #2dd4bf;
  stroke: none;
  filter: drop-shadow(0 0 12px #2dd4bf);
}

.tyche-copy { max-width: 700px; }
.tyche-copy h2 { max-width: 14ch; }
.tyche-copy > p:not(.eyebrow) {
  margin: 24px 0 36px;
  color: #a7bfb6;
  font-size: 18px;
  line-height: 1.7;
  max-width: 56ch;
}

/* ── Closing Section (Chapter 6) ─────────────────────────────────────────── */
.closing {
  width: var(--content);
  min-height: 80dvh;
  margin: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 8vw;
  padding: 110px 0;
  border-bottom: 1px solid var(--line);
}

.closing-seal {
  justify-self: center;
  width: min(380px, 66vw);
  aspect-ratio: 1;
  border: 1px solid rgba(82, 210, 255, 0.35);
  border-radius: 50%;
  display: grid;
  place-items: center;
  box-shadow: 0 0 50px rgba(82, 210, 255, 0.15), inset 0 0 40px rgba(168, 114, 255, 0.15);
  animation: seal-orbit 40s linear infinite;
}

@keyframes seal-orbit {
  to { transform: rotate(360deg); }
}

.closing-seal::before, .closing-seal::after, .closing-seal span {
  content: "";
  width: 68%;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 192, 68, 0.35);
  transform: rotate(45deg);
  border-radius: 12px;
}
.closing-seal::after {
  position: absolute;
  width: min(180px, 30vw);
  border-color: rgba(168, 114, 255, 0.45);
}
.closing-seal span {
  position: absolute;
  width: min(80px, 14vw);
  border-color: rgba(255, 255, 255, 0.5);
}

.closing-copy h2 {
  font-size: clamp(54px, 7vw, 100px);
}
.closing-copy > p:not(.eyebrow) {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

.signal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.signal-links a {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  padding: 0 22px;
  background: rgba(10, 16, 26, 0.7);
  border: 1px solid var(--line);
  border-radius: var(--pill-radius);
  color: #ffffff;
  font: 700 11px/1 "Cascadia Mono", monospace;
  letter-spacing: 0.14em;
  backdrop-filter: blur(10px);
  transition: all 0.25s var(--ease-spring);
}

.signal-links a:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(255, 192, 68, 0.12);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(255, 192, 68, 0.25);
}

/* ── The Master [N]era Lever Easter Egg (Chapter 7) ───────────────────────── */
.lever-chapter {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 90dvh;
  padding: clamp(90px, 12vw, 150px) 0;
  border-bottom: none;
}

.lever-box {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* In-game Signboard Placard from screenshot */
.lever-placard {
  position: relative;
  width: min(92vw, 560px);
  padding: 3px;
  background: linear-gradient(135deg, rgba(255, 192, 68, 0.7), rgba(168, 114, 255, 0.4) 50%, rgba(255, 192, 68, 0.7));
  border-radius: 14px;
  box-shadow: 0 0 45px rgba(255, 192, 68, 0.2), 0 20px 50px rgba(0, 0, 0, 0.9);
}

.lever-placard-frame {
  position: relative;
  padding: clamp(22px, 3.8vw, 36px) clamp(24px, 4.2vw, 44px);
  border: 1px solid rgba(255, 192, 68, 0.4);
  border-radius: 11px;
  background: linear-gradient(175deg, #0d121c 0%, #05080e 100%);
}

.lever-placard-title {
  margin: 0 0 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(30px, 4.2vw, 46px);
  font-weight: 500;
  line-height: 1.05;
  color: var(--gold);
  letter-spacing: 0.02em;
  text-shadow: 0 0 24px rgba(255, 192, 68, 0.4);
}

.lever-placard-copy {
  margin: 0;
  color: #dbe7f2;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(16px, 1.8vw, 20px);
  line-height: 1.55;
  letter-spacing: 0.01em;
}

.lever-placard-copy em {
  display: block;
  margin-top: 8px;
  color: #ffe3a3;
  font-style: italic;
}

/* Sigil Glyph */
.lever-sigil {
  margin-top: 38px;
  color: var(--gold);
  display: flex;
  justify-content: center;
  align-items: center;
  filter: drop-shadow(0 0 14px rgba(255, 192, 68, 0.75));
  animation: sigil-breathe 3s ease-in-out infinite;
}

.sigil-icon {
  width: 48px;
  height: 40px;
}

@keyframes sigil-breathe {
  0%, 100% { opacity: 0.75; transform: translateY(0) scale(0.96); }
  50% { opacity: 1; transform: translateY(-4px) scale(1.05); }
}

/* Pedestal and Lever Mechanism */
.lever-pedestal {
  position: relative;
  margin-top: 18px;
  width: 140px;
  height: 190px;
  background: linear-gradient(180deg, #131b28 0%, #070b12 100%);
  border: 1px solid rgba(255, 192, 68, 0.4);
  border-bottom: 2px solid var(--gold);
  border-radius: 14px 14px 0 0;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  display: flex;
  justify-content: center;
  align-items: center;
}

.lever-switch {
  position: relative;
  width: 100%;
  height: 100%;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  outline: none;
  border-radius: 14px 14px 0 0;
}

.lever-switch:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 6px;
}

.lever-housing {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.lever-slot {
  position: absolute;
  width: 14px;
  height: 125px;
  background: #020305;
  border: 1px solid rgba(0, 0, 0, 0.8);
  border-radius: 8px;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.95);
}

.lever-arm {
  position: absolute;
  top: 30px;
  left: 50%;
  width: 26px;
  height: 110px;
  margin-left: -13px;
  transform-origin: 50% 90%;
  transform: rotate(-28deg);
  transition: transform 0.42s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none;
}

.lever-stem {
  position: absolute;
  left: 50%;
  bottom: 12px;
  width: 8px;
  height: 74px;
  margin-left: -4px;
  background: linear-gradient(90deg, #6c7482, #aab2c0 50%, #525760);
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.65);
}

.lever-knob {
  position: absolute;
  top: 0;
  left: 50%;
  width: 28px;
  height: 48px;
  margin-left: -14px;
  background: radial-gradient(circle at 35% 25%, #ff4d4d, #cc0e0e 60%, #7d0505);
  border-radius: 14px;
  box-shadow: 0 0 24px rgba(255, 30, 30, 0.75), inset 0 2px 4px rgba(255, 255, 255, 0.5);
  transition: box-shadow 0.25s ease;
}

.lever-switch:hover .lever-knob {
  box-shadow: 0 0 38px rgba(255, 50, 50, 1), 0 0 60px rgba(255, 80, 80, 0.5), inset 0 2px 6px rgba(255, 255, 255, 0.7);
}

/* Pulled state */
.lever-switch[aria-pressed="true"] .lever-arm {
  transform: rotate(32deg);
}

.lever-switch[aria-pressed="true"] .lever-knob {
  background: radial-gradient(circle at 35% 25%, #ff7373, #e51919 60%, #990808);
  box-shadow: 0 0 45px rgba(255, 30, 30, 1), 0 0 80px rgba(255, 100, 100, 0.6);
}

/* HUD Caption */
.lever-hud-caption {
  margin-top: 26px;
}

.lever-hud-text {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: rgba(6, 12, 20, 0.7);
  border: 1px solid rgba(255, 192, 68, 0.25);
  border-radius: var(--pill-radius);
  font: 700 11px/1.3 "Cascadia Mono", monospace;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #a4b6c8;
  backdrop-filter: blur(10px);
}

.hud-highlight {
  color: var(--gold);
}

/* ── Floating Chapter Navigator (Telecomando) ────────────────────────────── */
.chapter-nav {
  position: fixed;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 10px 8px;
  background: rgba(6, 12, 20, 0.85);
  border: 1px solid rgba(87, 221, 255, 0.28);
  border-radius: var(--pill-radius);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.75), 0 0 25px rgba(24, 186, 255, 0.12);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: opacity 0.3s ease, transform 0.3s ease, border-color 0.3s;
}

.chapter-nav:hover {
  border-color: rgba(255, 192, 68, 0.45);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.75), 0 0 30px rgba(255, 192, 68, 0.18);
}

.nav-chapter-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(87, 221, 255, 0.25);
  background: rgba(14, 22, 34, 0.85);
  color: var(--paper);
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  transition: all 0.22s var(--ease-spring);
}

.nav-chapter-btn:hover:not(:disabled),
.nav-chapter-btn:focus-visible:not(:disabled) {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(255, 192, 68, 0.2);
  transform: scale(1.12);
  box-shadow: 0 0 16px rgba(255, 192, 68, 0.35);
}

.nav-chapter-btn:disabled {
  opacity: 0.2;
  cursor: not-allowed;
}

.nav-chapter-indicator {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 0;
  font: 800 11px/1.2 "Cascadia Mono", monospace;
  user-select: none;
}

.nav-chapter-num {
  color: var(--gold);
  font-size: 12px;
  text-shadow: 0 0 10px rgba(255, 192, 68, 0.4);
}

.nav-chapter-divider {
  color: rgba(142, 163, 184, 0.4);
  font-size: 9px;
  line-height: 1;
}

.nav-chapter-total {
  color: var(--muted);
  font-size: 9px;
}

.nav-chapter-name {
  position: absolute;
  right: calc(100% + 16px);
  top: 50%;
  transform: translateY(-50%) translateX(6px);
  padding: 8px 16px;
  background: rgba(5, 10, 16, 0.95);
  border: 1px solid rgba(255, 192, 68, 0.4);
  border-radius: var(--pill-radius);
  color: #ffffff;
  font: 800 10px/1 "Cascadia Mono", monospace;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.7);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.chapter-nav:hover .nav-chapter-name {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* ── Video Modal ────────────────────────────────────────────────────────── */
.video-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
}

.video-modal[hidden] { display: none; }

.video-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 5, 8, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.video-modal-dialog {
  position: relative;
  z-index: 2;
  width: min(94vw, 880px);
  background: #060a10;
  border: 2px solid var(--gold);
  border-radius: 18px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.95), 0 0 50px rgba(255, 192, 68, 0.25);
  overflow: hidden;
  animation: modal-pop 0.32s var(--ease-spring);
}

.video-modal-dialog::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  border: 2px solid var(--gold);
  border-radius: inherit;
  box-shadow: inset 0 0 18px rgba(255, 192, 68, 0.16);
}

@keyframes modal-pop {
  from { opacity: 0; transform: scale(0.93) translateY(14px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.video-modal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(10, 16, 26, 0.95);
}

.video-modal-heading {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.video-modal-badge {
  font: 800 9px/1 "Cascadia Mono", monospace;
  letter-spacing: 0.22em;
  color: var(--gold);
}

.video-modal-bar h3 {
  margin: 0;
  font-family: Georgia, serif;
  font-size: 17px;
  font-weight: 400;
  color: #ffffff;
}

.video-modal-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  font-size: 15px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.2s;
}

.video-modal-close:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(255, 192, 68, 0.2);
  transform: scale(1.08);
}

.video-modal-player-wrap {
  position: relative;
  width: 100%;
  background: #000;
  aspect-ratio: 16 / 9;
}

.nera-video {
  width: 100%;
  height: 100%;
  display: block;
  outline: none;
}

.video-loading-status {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  padding: 28px;
  text-align: center;
  color: #fff;
  background: radial-gradient(circle at 50% 42%, rgba(255, 192, 68, 0.13), transparent 38%), #020305;
}

.video-loading-status[hidden] { display: none; }

.video-loading-status strong {
  font: 400 clamp(18px, 3vw, 25px)/1.2 Georgia, serif;
}

.video-loading-status small {
  color: var(--muted);
  font: 600 10px/1.5 "Cascadia Mono", monospace;
  letter-spacing: 0.08em;
}

.media-spinner {
  width: 36px;
  height: 36px;
  border: 2px solid rgba(255, 192, 68, 0.22);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: media-spin 0.8s linear infinite;
}

@keyframes media-spin { to { transform: rotate(360deg); } }

.video-retry,
.soundtrack-download {
  border: 1px solid var(--gold);
  color: var(--gold);
  background: rgba(255, 192, 68, 0.08);
  font: 800 10px/1 "Cascadia Mono", monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}

.video-retry { padding: 11px 15px; }
.video-retry[hidden] { display: none; }

.soundtrack-panel {
  display: grid;
  grid-template-columns: minmax(210px, 1fr) minmax(240px, 1.4fr) auto;
  align-items: center;
  gap: 18px;
  padding: 20px 24px;
  border-top: 1px solid rgba(255, 192, 68, 0.42);
  background: linear-gradient(135deg, #0b111a, #05080d);
}

.soundtrack-copy span {
  color: var(--gold);
  font: 800 8px/1 "Cascadia Mono", monospace;
  letter-spacing: 0.2em;
}

.soundtrack-copy h4 {
  margin: 5px 0 3px;
  color: #fff;
  font: 400 18px/1.15 Georgia, serif;
}

.soundtrack-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.soundtrack-panel audio { width: 100%; min-width: 0; }

.soundtrack-download {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  text-decoration: none;
  white-space: nowrap;
}

.soundtrack-download:hover,
.video-retry:hover { color: #05070b; background: var(--gold); }

/* ── Full-frame image lightbox ──────────────────────────────────────────── */
.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: grid;
  place-items: center;
  padding: clamp(12px, 3vw, 36px);
}

.image-lightbox[hidden] { display: none; }

.image-lightbox-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: rgba(2, 4, 8, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  cursor: zoom-out;
}

.image-lightbox-dialog {
  position: relative;
  z-index: 1;
  width: min(96vw, 1600px);
  max-height: 94dvh;
  overflow: hidden;
  border: 1px solid rgba(87, 221, 255, 0.34);
  border-radius: 18px;
  background: #020408;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.95), 0 0 42px rgba(24, 186, 255, 0.16);
  animation: modal-pop 0.28s var(--ease-spring);
}

.image-lightbox-bar {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 8px 10px 8px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 15, 24, 0.96);
}

.image-lightbox-bar p {
  margin: 0;
  color: var(--muted);
  font: 700 10px/1.3 "Cascadia Mono", monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.image-lightbox-close {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-bright);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  cursor: pointer;
}

.image-lightbox-close:hover,
.image-lightbox-close:focus-visible {
  border-color: var(--gold);
  color: var(--gold);
}

.image-lightbox-dialog > img {
  width: 100%;
  height: auto;
  max-height: calc(94dvh - 52px);
  object-fit: contain;
  background: #020408;
}

/* ── Footer ──────────────────────────────────────────────────────────────── */
.site-footer {
  width: var(--content);
  margin: auto;
  padding: 36px 0 54px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  color: #7b90a6;
  font: 700 11px/1.3 "Cascadia Mono", monospace;
  letter-spacing: 0.16em;
}

.noscript {
  margin: 0;
  padding: 14px 20px;
  text-align: center;
  color: var(--muted);
  background: #0b111a;
}

.has-js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.85s var(--ease-spring), transform 0.85s var(--ease-spring);
}
.has-js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes signal-turn {
  to { transform: rotate(360deg); }
}

/* ── Responsive Media Queries ────────────────────────────────────────────── */
@media (max-width: 960px) {
  :root { --content: min(100% - 36px, 760px); }
  .site-header {
    top: 10px;
    min-height: 56px;
    padding: 0 18px;
  }
  .sealed-mark { display: none; }
  .hero {
    grid-template-columns: 1fr;
    gap: 50px;
    padding-top: 130px;
  }
  .hero-copy { max-width: none; }
  .hero-portal {
    justify-self: center;
    width: min(94vw, 600px);
  }
  .section-heading, .visions-heading, .mana, .tyche, .closing {
    grid-template-columns: 1fr;
  }
  .section-heading { gap: 20px; }
  .mana-intro { position: static; }
  .vision-grid { grid-template-columns: 1fr; }
  .vision-world { min-height: 420px; }
  .tyche { gap: 60px; }
  .closing { padding: 90px 0; gap: 60px; }
}

@media (max-width: 768px) {
  .chapter-nav {
    right: 12px;
    top: auto;
    bottom: 18px;
    transform: none;
    padding: 6px 4px;
    gap: 4px;
  }
  .nav-chapter-btn {
    width: 34px;
    height: 34px;
  }
  .nav-chapter-indicator {
    padding: 2px 0;
  }
  .chapter-nav:hover .nav-chapter-name {
    display: none;
  }
  .lever-pedestal {
    width: 120px;
    height: 165px;
  }
  .lever-arm { height: 95px; }
  .lever-stem { height: 60px; }
  .lever-knob {
    width: 24px;
    height: 42px;
    margin-left: -12px;
  }
  .lever-hud-text {
    font-size: 9px;
    letter-spacing: 0.12em;
  }
  .video-modal-bar {
    padding: 12px 16px;
  }
}

@media (max-width: 600px) {
  .video-modal {
    align-items: flex-start;
    padding: 12px;
  }
  .video-modal-dialog {
    width: min(88vw, 360px);
    margin: auto 0;
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
  }
  .video-modal-bar { padding: 10px 12px; }
  .video-modal-bar h3 { font-size: 14px; }
  .video-modal-close { width: 32px; height: 32px; }
  .video-modal-player-wrap { aspect-ratio: 16 / 9; }
  .video-loading-status { padding: 16px; gap: 7px; }
  .media-spinner { width: 28px; height: 28px; }
  .soundtrack-panel {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px;
  }
  .soundtrack-copy h4 { font-size: 16px; }
  .soundtrack-copy p { font-size: 10px; }
  .soundtrack-download { justify-content: center; }
  .hero { min-height: auto; padding-bottom: 80px; }
  h1 { font-size: clamp(42px, 14vw, 64px); }
  .hero-intro { margin-top: 22px; }
  .section-shell { padding: 80px 0; }
  .hero-portal,
  .vision {
    height: auto;
    min-height: 0;
    aspect-ratio: auto;
  }
  .incarnation-plate {
    width: min(82vw, 330px);
    height: auto;
    min-height: 0;
    margin-inline: auto;
    aspect-ratio: auto;
  }
  .image-zoom-trigger {
    height: auto;
  }
  .image-zoom-trigger img {
    width: 100%;
    height: auto;
    max-height: none;
    aspect-ratio: auto;
    object-fit: contain;
    transform: none;
  }
  .hero-portal figcaption,
  .incarnation-plate figcaption,
  .vision figcaption {
    position: relative;
    inset: auto;
  }
  .hero-portal figcaption {
    display: block;
    padding: 12px 16px;
    text-align: right;
  }
  .incarnation-plate figcaption {
    padding: 12px;
    flex-direction: column;
    gap: 8px;
  }
  .incarnation-plate figcaption span {
    font-size: 9px;
    padding: 6px 12px;
    text-align: center;
  }
  .mana-line {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 28px 22px;
  }
  .mana-sigil { width: 56px; height: 56px; }
  .mana-sigil svg { width: 34px; }
  .vision-main, .vision-mana, .vision-world { min-height: 0; aspect-ratio: auto; }
  .vision figcaption { padding: 14px 18px; background: rgba(8, 15, 24, 0.96); }
  .vision-story { padding: 20px !important; }
  .image-lightbox { padding: 8px; }
  .image-lightbox-dialog { width: 100%; border-radius: 14px; }
  .image-lightbox-bar p { font-size: 9px; letter-spacing: 0.1em; }
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .has-js .reveal { opacity: 1; transform: none; }
}
