/* ============================================================
   THE EVERHART FAMILY ADVENTURES — design system
   Dark cinematic night / burnished gold / tropical warmth
   ============================================================ */

:root {
  --ink: #0a0f16;
  --ink-2: #0e1620;
  --ink-3: #14202e;
  --panel: #101a26;
  --line: rgba(217, 169, 79, 0.18);
  --gold: #d9a94f;
  --gold-bright: #f3cd7a;
  --gold-deep: #a5762a;
  --cream: #f4ecd9;
  --cream-dim: #cfc5ab;
  --mist: #8fa3b8;
  --teal: #3d8f8a;
  --ember: #d96b3f;
  --shadow: 0 30px 60px -18px rgba(0, 0, 0, 0.65);
  --font-display: "Cinzel", "Times New Roman", serif;
  --font-body: "Source Serif 4", Georgia, serif;
  --font-ui: "Inter", system-ui, sans-serif;
  --max: 1200px;
  --radius: 14px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html { scroll-behavior: smooth; overflow-x: clip; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001s !important; transition-duration: 0.001s !important; }
}

body {
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 1.075rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img { max-width: 100%; display: block; }
a { color: var(--gold-bright); text-decoration: none; }
a:hover { color: #ffe3a1; }

::selection { background: rgba(217, 169, 79, 0.35); color: #fff; }

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0.02em;
  color: var(--cream);
}

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 clamp(1.1rem, 4vw, 2.5rem); }

/* ---------- utility text ---------- */
.kicker {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
}
.kicker::before, .kicker.center::after {
  content: "";
  width: 34px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
  display: inline-block;
}
.kicker.center::after { background: linear-gradient(90deg, var(--gold), transparent); }

.section-title { font-size: clamp(1.9rem, 4.2vw, 3rem); margin: 0.85rem 0 1.1rem; }
.section-title em { font-style: normal; color: var(--gold-bright); }
.lede { color: var(--cream-dim); font-size: clamp(1.05rem, 1.6vw, 1.22rem); max-width: 62ch; }
.center { text-align: center; }
.center .lede { margin-left: auto; margin-right: auto; }

/* ---------- buttons ---------- */
.btn {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.06em;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.95rem 1.7rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s, background 0.35s, border-color 0.35s;
  white-space: nowrap;
}
.btn-gold {
  background: linear-gradient(135deg, #e8bd63, #c2924016 155%), linear-gradient(135deg, #eec368, #b98a35);
  background: linear-gradient(135deg, #f0c76b, #b9893a);
  color: #241a08;
  box-shadow: 0 12px 30px -10px rgba(217, 169, 79, 0.55);
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 18px 38px -10px rgba(217, 169, 79, 0.7); color: #1c1405; }
.btn-ghost {
  color: var(--cream);
  border-color: rgba(244, 236, 217, 0.28);
  background: rgba(244, 236, 217, 0.04);
  backdrop-filter: blur(6px);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-bright); transform: translateY(-2px); }
.btn svg { width: 1em; height: 1em; }

/* ---------- nav ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background 0.4s, box-shadow 0.4s, backdrop-filter 0.4s;
}
.nav.scrolled {
  background: rgba(9, 13, 19, 0.82);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line), 0 18px 40px -24px rgba(0,0,0,0.8);
}
.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.9rem clamp(1.1rem, 4vw, 2.5rem);
  display: flex;
  align-items: center;
  gap: 2rem;
}
.brand {
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.14em;
  color: var(--cream);
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-right: auto;
}
.brand:hover { color: var(--gold-bright); }
.brand svg { width: 30px; height: 30px; flex: none; }
.brand b { font-weight: 700; color: var(--gold-bright); }
.nav-links { display: flex; align-items: center; gap: 1.7rem; }
.nav-links a {
  font-family: var(--font-ui);
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--cream-dim);
  position: relative;
  padding: 0.4rem 0;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%; bottom: 0;
  height: 1.5px;
  background: var(--gold);
  transition: right 0.35s var(--ease-out);
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--gold-bright); }
.nav-links a.nav-cta, .nav-links a.nav-cta:hover { color: #241a08; }
.nav-links a.nav-cta::after { display: none; }
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { right: 0; }
.nav-cta { margin-left: 0.4rem; padding: 0.62rem 1.25rem; font-size: 0.8rem; }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  width: 44px; height: 44px;
  flex: none;
  position: relative;
  z-index: 130;
}
.nav-toggle span, .nav-toggle::before, .nav-toggle::after {
  content: "";
  display: block;
  width: 24px; height: 2px;
  background: var(--gold-bright);
  margin: 5px auto;
  transition: transform 0.35s, opacity 0.35s;
}
.nav-toggle[aria-expanded="true"]::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span { opacity: 0; }
.nav-toggle[aria-expanded="true"]::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav-inner { gap: 0.8rem; }
  .brand { font-size: 0.82rem; min-width: 0; }
  .brand svg { width: 26px; height: 26px; }
  .nav-links {
    position: fixed;
    inset: 0;
    flex-direction: column;
    justify-content: center;
    gap: 2.2rem;
    background: rgba(8, 12, 18, 0.96);
    backdrop-filter: blur(18px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s;
    z-index: 120;
  }
  .nav-links.open { opacity: 1; pointer-events: auto; }
  .nav-links a { font-size: 1.05rem; }
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}
.hero-bg {
  position: absolute;
  inset: -12% 0;
  z-index: -3;
  background-size: cover;
  background-position: center 30%;
  will-change: transform;
  transform: translateY(var(--parallax, 0));
}
.hero::before {
  content: "";
  position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(120% 90% at 24% 40%, rgba(10, 15, 22, 0.2) 0%, rgba(10, 15, 22, 0.88) 78%),
    linear-gradient(180deg, rgba(10,15,22,0.62) 0%, rgba(10,15,22,0.18) 34%, rgba(10,15,22,0.94) 88%, var(--ink) 100%);
}
#fireflies { position: absolute; inset: 0; z-index: -1; pointer-events: none; }

.hero-inner {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 8.5rem clamp(1.1rem, 4vw, 2.5rem) 5rem;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.hero-series {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.4rem;
  display: block;
}
.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.4rem);
  font-weight: 700;
  text-shadow: 0 4px 30px rgba(0,0,0,0.6);
}
.hero h1 em { font-style: normal; color: var(--gold-bright); }
.hero .lede { margin: 1.4rem 0 2.3rem; text-shadow: 0 2px 14px rgba(0,0,0,0.7); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 1rem; }
.hero-meta {
  margin-top: 2.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem 2.6rem;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mist);
}
.hero-meta b { display: block; font-family: var(--font-display); font-size: 1.5rem; color: var(--gold-bright); letter-spacing: 0.04em; }

.scroll-hint {
  position: absolute;
  bottom: 1.8rem; left: 50%;
  transform: translateX(-50%);
  color: var(--gold);
  opacity: 0.7;
  animation: bob 2.4s ease-in-out infinite;
}
@keyframes bob { 50% { transform: translate(-50%, 8px); } }

/* ---------- 3D book ---------- */
.book3d-scene { perspective: 1600px; display: grid; place-items: center; }
.book3d {
  position: relative;
  width: var(--bw, 300px);
  aspect-ratio: 1600 / 2560;
  transform-style: preserve-3d;
  transform: rotateY(-24deg) rotateX(4deg);
  transition: transform 0.7s var(--ease-out);
  will-change: transform;
}
.book3d.floaty { animation: floaty 7s ease-in-out infinite; }
@keyframes floaty {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -14px; }
}
.book3d .face { position: absolute; inset: 0; backface-visibility: hidden; border-radius: 4px 10px 10px 4px; }
.book3d .front {
  background-size: cover;
  transform: translateZ(calc(var(--depth, 26px) / 2));
  box-shadow: inset 4px 0 10px -4px rgba(255,255,255,0.28), inset -2px 0 6px rgba(0,0,0,0.25);
}
.book3d .front img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.book3d .front::after {
  /* moving glare */
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 246, 220, var(--glare, 0.1)) 48%, transparent 60%);
  background-position: var(--gx, 50%) 0;
  pointer-events: none;
  mix-blend-mode: screen;
}
.book3d .back {
  background: #1a1410;
  transform: rotateY(180deg) translateZ(calc(var(--depth, 26px) / 2));
  border-radius: 10px 4px 4px 10px;
}
.book3d .spine, .book3d .pages, .book3d .top, .book3d .bottom { position: absolute; }
.book3d .spine {
  width: var(--depth, 26px); height: 100%;
  left: calc(var(--depth, 26px) / -2);
  transform: rotateY(-90deg);
  background: linear-gradient(180deg, #2b2013, #171008);
  border-radius: 3px;
  box-shadow: inset -3px 0 8px rgba(0,0,0,0.6);
}
.book3d .spine::after {
  content: attr(data-title);
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  writing-mode: vertical-rl;
  font-family: var(--font-ui);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--gold);
  text-transform: uppercase;
}
.book3d .pages {
  width: calc(var(--depth, 26px) - 6px); height: calc(100% - 10px);
  right: calc((var(--depth, 26px) - 6px) / -2); top: 5px;
  transform: rotateY(90deg);
  background: repeating-linear-gradient(90deg, #efe6cd 0 2px, #d9cfae 2px 3px);
  border-radius: 2px;
}
.book3d .shadow {
  position: absolute;
  bottom: -12%;
  left: 6%; right: 6%;
  height: 30px;
  background: radial-gradient(50% 50% at 50% 50%, rgba(0,0,0,0.55), transparent 70%);
  transform: rotateX(90deg) translateZ(-30px) scale(1.05);
  filter: blur(6px);
}
.book3d-glow {
  position: absolute;
  inset: -18%;
  z-index: -1;
  background: radial-gradient(50% 50% at 50% 55%, rgba(217, 169, 79, 0.22), transparent 68%);
  filter: blur(10px);
  pointer-events: none;
}

/* ---------- sections ---------- */
.section { padding: clamp(4.5rem, 9vw, 7.5rem) 0; position: relative; }
.section.tint { background: linear-gradient(180deg, transparent, rgba(20, 32, 46, 0.5) 18% 82%, transparent); }

.rule-orn {
  display: flex; align-items: center; justify-content: center; gap: 1rem;
  color: var(--gold); opacity: 0.85; margin: 0 auto 1rem;
}
.rule-orn::before, .rule-orn::after {
  content: ""; height: 1px; width: min(130px, 22vw);
  background: linear-gradient(90deg, transparent, var(--gold));
}
.rule-orn::after { background: linear-gradient(90deg, var(--gold), transparent); }

/* ---------- bookshelf ---------- */
.shelf {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: clamp(1.4rem, 3vw, 2.4rem);
  margin-top: 3.2rem;
  perspective: 2000px;
}
.shelf-item { text-align: center; }
.shelf-item .book3d { --bw: 100%; --depth: 20px; margin: 0 auto; transform: rotateY(-18deg) rotateX(3deg); }
.shelf-item:hover .book3d { transform: rotateY(-4deg) rotateX(2deg) scale(1.04); }
.shelf-item .b-num {
  font-family: var(--font-ui);
  font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin: 1.5rem 0 0.3rem;
}
.shelf-item .b-title {
  font-family: var(--font-display);
  font-size: 1.02rem;
  color: var(--cream);
  line-height: 1.35;
}
.shelf-item .b-loc { font-family: var(--font-ui); font-size: 0.8rem; color: var(--mist); margin-top: 0.25rem; display: block; }
.shelf-item a { display: block; }

/* ---------- journey map ---------- */
.map-panel {
  margin-top: 3rem;
  background:
    radial-gradient(90% 120% at 50% 0%, rgba(61, 143, 138, 0.08), transparent 60%),
    linear-gradient(160deg, #101b28, #0c141e);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  padding: clamp(1.2rem, 3.5vw, 3rem);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
  box-shadow: var(--shadow);
}
.map-svg { width: 100%; height: auto; }
.map-svg .isle { fill: #24384c; stroke: rgba(217,169,79,0.3); stroke-width: 1; transition: fill .3s; }
.map-svg .route {
  fill: none;
  stroke: var(--gold);
  stroke-width: 2;
  stroke-dasharray: 7 8;
  stroke-linecap: round;
  opacity: 0.85;
  animation: routeflow 26s linear infinite;
}
@keyframes routeflow { to { stroke-dashoffset: -600; } }
.map-pin { cursor: pointer; }
.map-pin circle.dot { fill: var(--gold-bright); transition: r 0.25s; }
.map-pin circle.pulse {
  fill: none; stroke: var(--gold);
  animation: pulse 2.6s ease-out infinite;
  transform-origin: center;
  transform-box: fill-box;
}
@keyframes pulse {
  from { opacity: 0.9; transform: scale(0.4); }
  to { opacity: 0; transform: scale(2.6); }
}
.map-pin text {
  font-family: var(--font-ui);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  fill: var(--cream-dim);
  text-transform: uppercase;
  transition: fill 0.25s;
}
.map-pin:hover text, .map-pin.active text { fill: var(--gold-bright); }
.map-pin.active circle.dot { r: 7; }

.map-detail { min-height: 340px; display: flex; flex-direction: column; }
.map-detail .kicker { margin-bottom: 0.6rem; }
.map-detail h3 { font-size: clamp(1.4rem, 2.6vw, 2rem); margin-bottom: 0.8rem; }
.map-detail p { color: var(--cream-dim); }
.map-detail .fact {
  margin-top: 1.1rem;
  padding: 0.9rem 1.1rem;
  border-left: 2px solid var(--gold);
  background: rgba(217, 169, 79, 0.06);
  border-radius: 0 8px 8px 0;
  font-size: 0.95rem;
  color: var(--cream-dim);
}
.map-detail .fact b { color: var(--gold-bright); font-weight: 600; }
.map-detail .btn { margin-top: 1.6rem; align-self: flex-start; }
.map-detail-art {
  height: 130px;
  border-radius: 10px;
  background-size: cover;
  background-position: center 35%;
  margin-bottom: 1.3rem;
  border: 1px solid var(--line);
  box-shadow: 0 14px 30px -16px rgba(0,0,0,0.7);
}

@media (max-width: 880px) {
  .map-panel { grid-template-columns: 1fr; }
  .map-detail { min-height: 0; }
}

/* ---------- artifact cards ---------- */
.artifacts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}
.artifact {
  position: relative;
  background: linear-gradient(165deg, #131f2c, #0d1520);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem 1.6rem 1.8rem;
  overflow: hidden;
  transition: transform 0.45s var(--ease-out), border-color 0.45s, box-shadow 0.45s;
  transform-style: preserve-3d;
}
.artifact::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(217, 169, 79, 0.13), transparent 55%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.artifact:hover { transform: translateY(-6px); border-color: rgba(217, 169, 79, 0.5); box-shadow: 0 26px 50px -22px rgba(0,0,0,0.8); }
.artifact:hover::before { opacity: 1; }
.artifact .glyph {
  width: 58px; height: 58px;
  margin-bottom: 1.3rem;
  color: var(--gold-bright);
  filter: drop-shadow(0 0 14px rgba(217, 169, 79, 0.45));
}
.artifact h3 { font-size: 1.2rem; margin-bottom: 0.15rem; }
.artifact .a-owner {
  font-family: var(--font-ui);
  font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 0.9rem;
}
.artifact p { font-size: 0.95rem; color: var(--cream-dim); }
.artifact .a-inscription {
  margin-top: 1.1rem;
  font-style: italic;
  color: var(--gold-bright);
  font-size: 0.95rem;
}
.artifact .a-inscription::before { content: "“"; color: var(--gold); }
.artifact .a-inscription::after { content: "”"; color: var(--gold); }
.artifact.centerpiece {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.8rem;
  align-items: center;
  background: linear-gradient(150deg, #1a2534, #101a26 55%),
              radial-gradient(80% 140% at 100% 0%, rgba(217,169,79,0.14), transparent 60%);
  border-color: rgba(217, 169, 79, 0.4);
}
.artifact.centerpiece .glyph { width: 84px; height: 84px; margin: 0; }
@media (max-width: 640px) { .artifact.centerpiece { grid-template-columns: 1fr; } }

/* ---------- character cards ---------- */
.characters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}
.char {
  background: linear-gradient(170deg, #121d2a, #0d1521);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.9rem 1.7rem;
  transition: transform 0.45s var(--ease-out), border-color 0.45s;
}
.char:hover { transform: translateY(-6px); border-color: rgba(217, 169, 79, 0.45); }
.char .c-role {
  font-family: var(--font-ui);
  font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--teal);
  display: block; margin-bottom: 0.5rem;
}
.char h3 { font-size: 1.35rem; }
.char .c-tag { font-style: italic; color: var(--gold-bright); font-size: 0.95rem; display: block; margin: 0.3rem 0 0.9rem; }
.char p { font-size: 0.95rem; color: var(--cream-dim); }
.char .c-artifact {
  margin-top: 1.1rem; padding-top: 1rem;
  border-top: 1px dashed rgba(217, 169, 79, 0.25);
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--gold);
  letter-spacing: 0.06em;
}

/* ---------- quote band ---------- */
.quote-band {
  padding: clamp(4rem, 8vw, 6.5rem) 0;
  background-size: cover;
  background-position: center 40%;
  background-attachment: fixed;
  position: relative;
  isolation: isolate;
  text-align: center;
}
.quote-band::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, var(--ink) 0%, rgba(10,15,22,0.72) 30% 70%, var(--ink) 100%);
}
.quote-band blockquote {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3vw, 2.1rem);
  max-width: 24ch;
  margin: 0 auto;
  color: var(--cream);
  text-shadow: 0 3px 22px rgba(0,0,0,0.8);
}
.quote-band cite {
  display: block;
  margin-top: 1.3rem;
  font-family: var(--font-ui);
  font-style: normal;
  font-size: 0.8rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
}
@media (max-width: 900px) { .quote-band { background-attachment: scroll; } }

/* ---------- FAQ ---------- */
.faq-list { max-width: 820px; margin: 2.6rem auto 0; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.4rem;
  padding: 1.35rem 0.3rem;
  font-family: var(--font-display);
  font-size: 1.12rem;
  color: var(--cream);
  transition: color 0.25s;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--gold-bright); }
.faq-item summary .fx {
  flex: none;
  width: 26px; height: 26px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  display: grid; place-items: center;
  color: var(--gold);
  font-family: var(--font-ui);
  font-size: 1rem;
  transition: transform 0.35s var(--ease-out), background 0.3s, color 0.3s;
}
.faq-item[open] summary { color: var(--gold-bright); }
.faq-item[open] summary .fx { transform: rotate(45deg); background: var(--gold); color: var(--ink); }
.faq-item .faq-a { padding: 0 2.6rem 1.5rem 0.3rem; color: var(--cream-dim); }
.faq-item .faq-a a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- book detail page ---------- */
.book-hero { padding-top: clamp(7rem, 12vw, 9.5rem); }
.book-hero .hero-inner { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); padding-top: 0; }
.book-hero .meta-row {
  display: flex; flex-wrap: wrap; gap: 0.6rem;
  margin: 1.3rem 0 1.8rem;
}
.pill {
  font-family: var(--font-ui);
  font-size: 0.74rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--gold-bright);
  border: 1px solid rgba(217, 169, 79, 0.4);
  background: rgba(217, 169, 79, 0.08);
  padding: 0.42rem 0.95rem;
  border-radius: 999px;
}
.book-body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(2rem, 5vw, 4rem); }
.book-body .prose p { margin-bottom: 1.15rem; color: var(--cream-dim); }
.book-body .prose p:first-of-type::first-letter {
  font-family: var(--font-display);
  font-size: 3.4em;
  float: left;
  line-height: 0.82;
  padding: 0.08em 0.14em 0 0;
  color: var(--gold-bright);
}
.book-body h2 { font-size: 1.7rem; margin: 2.4rem 0 1rem; }
.sidebar-card {
  background: linear-gradient(165deg, #131f2c, #0d1520);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.7rem 1.5rem;
  position: sticky;
  top: 96px;
}
.sidebar-card h3 { font-size: 1.05rem; margin-bottom: 1rem; color: var(--gold-bright); }
.sidebar-card dl { font-size: 0.92rem; }
.sidebar-card dt {
  font-family: var(--font-ui);
  font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--mist);
  margin-top: 0.9rem;
}
.sidebar-card dd { color: var(--cream); }
.sidebar-card .btn { width: 100%; justify-content: center; margin-top: 1.4rem; }
@media (max-width: 900px) {
  .book-body { grid-template-columns: 1fr; }
  .sidebar-card { position: static; }
}

.booknav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  margin-top: 4rem;
}
.booknav a {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.3rem 1.5rem;
  background: rgba(20, 32, 46, 0.4);
  transition: border-color 0.3s, transform 0.3s;
}
.booknav a:hover { border-color: var(--gold); transform: translateY(-3px); }
.booknav .dir {
  font-family: var(--font-ui);
  font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--gold);
  display: block; margin-bottom: 0.3rem;
}
.booknav .t { font-family: var(--font-display); color: var(--cream); }
.booknav a.next { text-align: right; }
@media (max-width: 640px) { .booknav { grid-template-columns: 1fr; } }

/* breadcrumbs */
.crumbs {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  color: var(--mist);
  margin-bottom: 1.2rem;
}
.crumbs a { color: var(--mist); }
.crumbs a:hover { color: var(--gold-bright); }
.crumbs .sep { margin: 0 0.5rem; color: var(--gold); }

/* ---------- prose page (world/author) ---------- */
.page-hero {
  position: relative;
  padding: clamp(9rem, 15vw, 12rem) 0 clamp(3rem, 6vw, 5rem);
  background-size: cover;
  background-position: center 30%;
  isolation: isolate;
}
.page-hero::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(10,15,22,0.75), rgba(10,15,22,0.55) 55%, var(--ink));
}
.prose-cols {
  columns: 2 340px;
  gap: 3rem;
  margin-top: 2rem;
  color: var(--cream-dim);
}
.prose-cols p { margin-bottom: 1.1rem; break-inside: avoid; }

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1.5rem;
  margin-top: 2.6rem;
}
.info-card {
  background: linear-gradient(165deg, #131f2c, #0d1520);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.8rem 1.6rem;
}
.info-card h3 { color: var(--gold-bright); font-size: 1.15rem; margin-bottom: 0.7rem; }
.info-card p { font-size: 0.95rem; color: var(--cream-dim); }
.info-card .tagline { font-style: italic; color: var(--gold); font-size: 0.9rem; display: block; margin-bottom: 0.6rem; }

/* ---------- footer ---------- */
footer {
  border-top: 1px solid var(--line);
  padding: 3.5rem 0 2.5rem;
  margin-top: clamp(3rem, 8vw, 5rem);
  background: linear-gradient(180deg, transparent, rgba(13, 20, 29, 0.9));
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
}
footer h4 {
  font-family: var(--font-ui);
  font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}
footer ul { list-style: none; }
footer li { margin-bottom: 0.55rem; }
footer a { color: var(--cream-dim); font-size: 0.95rem; }
footer a:hover { color: var(--gold-bright); }
.footer-brand p { color: var(--mist); font-size: 0.92rem; max-width: 40ch; margin-top: 0.8rem; }
.footer-legal {
  margin-top: 2.8rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(217, 169, 79, 0.1);
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--mist);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.8rem;
}
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 2rem; } }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.12s; }
.reveal[data-delay="2"] { transition-delay: 0.24s; }
.reveal[data-delay="3"] { transition-delay: 0.36s; }
.reveal[data-delay="4"] { transition-delay: 0.48s; }

/* scroll progress */
#progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-bright));
  z-index: 200;
}

/* hero responsive */
@media (max-width: 900px) {
  .hero-inner, .book-hero .hero-inner { grid-template-columns: 1fr; padding-top: 7.5rem; }
  .hero .book3d-scene { order: -1; }
  .book3d { --bw: min(58vw, 250px); }
  .hero-meta { gap: 1.2rem 1.8rem; }
}
