/* ═══════════════════════════════════════════════════════════════
   THE CHRONICLE OF NAVE — design system
   Palette and type modeled on mortalonline2.com:
   Marcellus SC / Marcellus display, near-black ground, antique gold.
   ═══════════════════════════════════════════════════════════════ */

:root {
  --ink: #050507;
  --coal: #0a0a0d;
  --card: #0c0c10;
  --card-2: #08080b;
  --bone: #d9d2c2;
  --bone-dim: #a89f8c;
  --gold: #c9a86a;
  --gold-bright: #ecd096;
  --gold-dim: rgba(201, 168, 106, 0.35);
  --gold-faint: rgba(201, 168, 106, 0.14);
  --blood: #9c2b22;
  --blood-bright: #c94b3d;
  --name-guild: #d17a5f;
  --serif: "IM Fell English", Georgia, serif;
  --display: "Marcellus SC", "Marcellus", serif;
  --display-lc: "Marcellus", serif;
  --sans: "Work Sans", system-ui, sans-serif;
  --age-tint: var(--gold);
  --spine-x: clamp(28px, 9vw, 130px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--bone);
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.72;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--gold); color: #14100a; }

/* thin antique scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #060608; }
::-webkit-scrollbar-thumb { background: #2a2620; border-radius: 5px; border: 2px solid #060608; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-dim); }

a { color: var(--gold); text-decoration: none; }

/* grain overlay for the whole page */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
}
/* vignette: a fixed, edge-darkening frame around the whole viewport —
   never scrolls, so it reads as depth of field rather than a page effect */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 4;
  background:
    radial-gradient(ellipse 80% 70% at 50% 50%, transparent 55%, rgba(2, 2, 3, 0.55) 100%),
    linear-gradient(rgba(2, 2, 3, 0.4), transparent 14%, transparent 86%, rgba(2, 2, 3, 0.5));
}

/* ─────────────── atmosphere: aura, dust ───────────────
   Stack: aura (0) < dust canvas (1) < content (2) < grain (3) < vignette (4) */
@property --chrome-tint {
  syntax: "<color>";
  inherits: true;
  initial-value: #c9a86a;
}
.aura-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: opacity 2.4s ease;
}
#atmosphere {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}
main, footer { position: relative; z-index: 2; }

/* ─────────────── veil (first paint) ─────────────── */
#veil {
  position: fixed;
  inset: 0;
  background: var(--ink);
  z-index: 200;
  pointer-events: none;
  animation: veil-lift 1.4s ease 0.15s forwards;
}
@keyframes veil-lift { to { opacity: 0; visibility: hidden; } }

/* ─────────────── top navigation ─────────────── */
#topnav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(16px, 4vw, 44px);
  height: 74px;
  background: linear-gradient(rgba(5, 5, 7, 0.0), rgba(5, 5, 7, 0.0));
  transition: background 0.5s ease, backdrop-filter 0.5s ease, box-shadow 0.5s ease;
}
#topnav.scrolled {
  background: rgba(6, 6, 9, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(201, 168, 106, 0.14);
}
.wordmark {
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: var(--display);
  font-size: 17px;
  letter-spacing: 0.14em;
  color: var(--bone);
  white-space: nowrap;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.6s ease, transform 0.6s ease, color 0.3s ease;
}
#topnav.scrolled .wordmark { opacity: 1; transform: none; }
.wordmark:hover { color: var(--gold-bright); }
.wordmark-crest {
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
  color: var(--gold);
  filter: drop-shadow(0 0 5px rgba(201, 168, 106, 0.35));
  transition: color 0.3s ease;
}
.wordmark:hover .wordmark-crest { color: var(--gold-bright); }
/* carved-stone letterforms: a faint dark groove below, a hairline
   highlight above — the engraved look of the site's own name */
.wordmark-text {
  text-shadow:
    0 1px 1px rgba(0, 0, 0, 0.65),
    0 -1px 0 rgba(255, 255, 255, 0.1);
}

/* align-self:stretch — #topnav centers its children by default, which
   would shrink .age-nav to its content height and center it within
   the 64px bar. That leaves a sliver of dead space above/below each
   .age-nav-item where the mouse silently exits :hover on the way down
   to a flyout. Stretching closes that gap completely. */
.age-nav { display: flex; align-self: stretch; gap: 4px; }
.age-nav-item { position: relative; display: flex; align-items: center; }
/* the flyout (380px) is far wider than its trigger (~200px) — moving
   the mouse diagonally from the label down into the list can cross a
   triangular dead zone that belongs to neither box. This invisible
   bridge widens the trigger's own hoverable row to match the flyout's
   full footprint, so the union of the two is a gap-free rectangle. */
.age-nav-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(380px, 92vw);
  height: 100%;
  z-index: -1;
}
.age-nav-link {
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.12em;
  color: var(--age-tint, var(--bone-dim));
  padding: 8px 4px 8px 12px;
  border-bottom: 1px solid transparent;
  transition: color 0.3s, border-color 0.3s;
}
.age-nav-link:hover {
  color: color-mix(in srgb, var(--age-tint, var(--gold)) 70%, white);
}
.age-nav-link.active {
  color: color-mix(in srgb, var(--age-tint, var(--gold)) 80%, white);
  border-bottom-color: var(--age-tint, var(--gold-dim));
}
.age-nav .nav-roman { font-size: 15px; }
.age-nav .nav-name { display: none; }
@media (min-width: 1100px) {
  .age-nav .nav-name { display: inline; margin-left: 6px; font-size: 12px; letter-spacing: 0.16em; opacity: 0.75; }
}

/* the caret: a small always-present affordance that the age names are
   expandable — click/tap to pin, hover to preview */
.age-nav-caret {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  margin-right: 4px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--bone-dim);
  transition: color 0.3s, transform 0.3s;
}
.age-nav-caret:hover, .age-nav-item.open .age-nav-caret { color: var(--gold-bright); }
.caret-chevron {
  width: 6px;
  height: 6px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.3s ease;
  margin-top: -3px;
}
.age-nav-item.open .caret-chevron, .age-nav-item:hover .caret-chevron, .age-nav-item.hover-open .caret-chevron { transform: rotate(225deg); margin-top: 3px; }

/* the flyout: the age's whole roll of dated deeds, at a glance.
   top:100% with NO gap — the interactive box touches the trigger row
   directly, so the cursor never crosses a dead zone on the way down
   (a real gap here breaks :hover the instant the pointer leaves the
   link, snapping pointer-events to none before the panel is reached).
   The old 14px of breathing room now lives as padding-top instead,
   which is inside the hoverable box and costs nothing. */
.age-flyout {
  position: absolute;
  top: 100%;
  padding-top: 14px;
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  width: min(380px, 92vw);
  max-height: min(64vh, 560px);
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.19, 1, 0.22, 1);
  z-index: 5;
}
/* the visible card sits inside the padded box, so the border/shadow
   still reads as a tight panel even though the hit-box now includes
   the bridge above it */
.age-flyout .fy-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: linear-gradient(160deg, var(--card), var(--card-2));
  border: 1px solid var(--gold-dim);
  box-shadow: 0 24px 60px -18px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(201, 168, 106, 0.06);
}
.age-nav-item:hover .age-flyout,
.age-nav-item:focus-within .age-flyout,
.age-nav-item.open .age-flyout,
.age-nav-item.hover-open .age-flyout {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.fy-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 18px 12px;
  border-bottom: 1px solid rgba(201, 168, 106, 0.16);
  flex: 0 0 auto;
}
.fy-age {
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--gold-bright);
  white-space: nowrap;
}
.fy-range {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bone-dim);
  white-space: nowrap;
}
.fy-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 6px 4px 6px 0;
  scrollbar-width: thin;
  scrollbar-color: var(--gold-dim) transparent;
}
/* a scrollbar that actually reads as a scrollbar against the panel's
   near-black ground, instead of the page-wide hairline-dark default */
.fy-list::-webkit-scrollbar { width: 9px; }
.fy-list::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.3); border-radius: 5px; }
.fy-list::-webkit-scrollbar-thumb {
  background-color: var(--gold-dim);
  background-clip: padding-box;
  border: 2px solid transparent;
  border-radius: 5px;
}
.fy-list::-webkit-scrollbar-thumb:hover { background-color: var(--gold); }
.fy-item {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 10px 14px 10px 18px;
  border-left: 2px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.fy-item:hover,
.fy-item:focus-visible {
  background: rgba(201, 168, 106, 0.14);
  border-left-color: var(--gold-bright);
  outline: none;
}
.fy-item:active { background: rgba(201, 168, 106, 0.22); }
.fy-item:hover .fy-title,
.fy-item:focus-visible .fy-title { color: var(--gold-bright); }
.fy-date {
  flex: 0 0 auto;
  font-family: var(--sans);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--age-tint, var(--gold));
  white-space: nowrap;
  min-width: 80px;
}
.fy-title {
  font-family: var(--serif);
  font-size: 14.5px;
  line-height: 1.4;
  color: var(--bone);
}
.fy-item.fy-landmark .fy-title { color: var(--gold-bright); font-weight: 600; }
.fy-item.fy-landmark .fy-date { color: var(--gold-bright); }

/* nav action buttons (ambience) */
.nav-actions { display: flex; align-items: center; gap: 4px; }
.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--bone-dim);
  padding: 7px 11px;
  transition: color 0.3s, border-color 0.3s, background 0.3s;
}
.nav-btn:hover { color: var(--gold-bright); }
.nav-btn[aria-pressed="true"] {
  color: var(--gold);
  border-color: var(--gold-dim);
  background: rgba(201, 168, 106, 0.07);
}
.nav-btn-text { display: none; }
@media (min-width: 900px) { .nav-btn-text { display: inline; } }

/* the timeline is a real strip built into the header, not a decorative
   underline — a banded track (tinted per Age, so it reads as a map of
   the whole chronicle at a glance) */
.scroll-progress {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 32px;
  display: flex;
  align-items: flex-end;
  padding-top: 6px;
}
.scroll-progress-track {
  position: relative;
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.07);
  cursor: pointer;
}
.scroll-progress-ticks {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
/* each dot gets its own hit target, much wider AND taller than the
   dot itself so it's actually hoverable — sized in px and centered via
   transform rather than height:100%, since the ticks live inside the
   thin track and 100% of that is far too thin to reliably hit */
.sp-tick-hit {
  position: absolute;
  top: 50%;
  left: 0;
  width: 15px;
  height: 32px;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  z-index: 2;
}
.sp-tick {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--tick-tint, var(--bone-dim));
  opacity: 0.6;
  transition: opacity 0.15s ease, width 0.15s ease, height 0.15s ease;
}
/* keep sieges get their own mark: a small blood-tinted diamond, so the
   war-turning moments read at a glance against the plain gold dots */
.sp-tick.sp-siege {
  width: 7px; height: 7px;
  border-radius: 1px;
  background: var(--blood-bright);
  opacity: 0.9;
  transform: rotate(45deg);
}
/* open-field musters of 100+ that never became a siege — a bright gold
   disc, distinct from both the plain dots and the blood diamonds */
.sp-tick.sp-bigfight {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold-bright);
  opacity: 0.9;
  box-shadow: 0 0 4px rgba(236, 208, 150, 0.6);
}
.sp-tick-hit:focus-visible .sp-tick {
  opacity: 1;
  width: 7px; height: 7px;
}
.sp-tick-hit:focus-visible .sp-tick.sp-siege {
  width: 9px; height: 9px;
}
.sp-tick-hit:focus-visible .sp-tick.sp-bigfight {
  width: 8px; height: 8px;
}
.sp-tick-tip {
  position: absolute;
  top: 100%;
  left: 50%;
  margin-top: 11px;
  transform: translateX(-50%) translateY(-6px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 12px 16px;
  width: max-content;
  max-width: 300px;
  background: linear-gradient(160deg, var(--card), var(--card-2));
  border: 1px solid var(--gold-dim);
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.85);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 6;
}
.sp-tick-hit:focus-visible .sp-tick-tip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.sp-tick-tip.sp-edge-start { left: 0; transform: translateX(0) translateY(-6px); }
.sp-tick-hit:focus-visible .sp-tick-tip.sp-edge-start { transform: translateX(0) translateY(0); }
.sp-tick-tip.sp-edge-end { left: auto; right: 0; transform: translateX(0) translateY(-6px); }
.sp-tick-hit:focus-visible .sp-tick-tip.sp-edge-end { transform: translateX(0) translateY(0); }
.sp-tick-tip-thumb {
  width: calc(100% + 32px);
  margin: -12px -16px 2px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-bottom: 1px solid var(--gold-dim);
  background: var(--coal);
}
.sp-tick-tip-date {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  white-space: nowrap;
}
.sp-tick-tip-title {
  font-family: var(--display-lc);
  font-weight: 600;
  font-size: 14.5px;
  line-height: 1.3;
  color: var(--bone);
}
.sp-tick-tip-excerpt {
  font-family: var(--serif);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--bone-dim);
  white-space: normal;
}
.sp-tick-tip.sp-landmark .sp-tick-tip-date,
.sp-tick-tip.sp-landmark .sp-tick-tip-title {
  color: var(--gold-bright);
}
/* era-change dividers: a full-height hairline where one Age gives way
   to the next, capped with a small diamond in the new age's tint */
.sp-era-mark {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 1px;
  background: linear-gradient(180deg, var(--tick-tint, var(--gold)), transparent);
  opacity: 0.6;
  pointer-events: none;
}
.sp-era-mark::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 7px;
  height: 7px;
  background: var(--tick-tint, var(--gold));
  transform: translate(-50%, -50%) rotate(45deg);
}
@media (hover: hover) and (pointer: fine) {
  .sp-tick-hit:hover .sp-tick {
    opacity: 1;
    width: 7px; height: 7px;
  }
  .sp-tick-hit:hover .sp-tick.sp-siege {
    width: 9px; height: 9px;
  }
  .sp-tick-hit:hover .sp-tick.sp-bigfight {
    width: 8px; height: 8px;
  }
  .sp-tick-hit:hover .sp-tick-tip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  .sp-tick-hit:hover .sp-tick-tip.sp-edge-start { transform: translateX(0) translateY(0); }
  .sp-tick-hit:hover .sp-tick-tip.sp-edge-end { transform: translateX(0) translateY(0); }
}
.scroll-progress-fill {
  position: absolute;
  inset: 0;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--chrome-tint) 60%, #201a10),
    var(--chrome-tint),
    color-mix(in srgb, var(--chrome-tint) 65%, #fff));
  box-shadow: 0 0 8px rgba(201, 168, 106, 0.55);
  transition: width 0.1s linear, --chrome-tint 1.8s ease;
  pointer-events: none;
}
.scroll-progress-marker {
  position: absolute;
  top: 50%; left: 0%;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--chrome-tint, var(--gold));
  box-shadow: 0 0 8px var(--chrome-tint, var(--gold)), 0 0 0 2px rgba(5, 5, 7, 0.85);
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.scroll-progress:hover .scroll-progress-marker,
.scroll-progress:focus-within .scroll-progress-marker {
  opacity: 1;
}

/* ─────────────── anno (year) indicator ─────────────── */
#anno {
  position: fixed;
  left: clamp(10px, 2vw, 28px);
  bottom: 26px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  pointer-events: none;
}
#anno.visible { opacity: 1; transform: none; }
.anno-label {
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--bone-dim);
}
.anno-year {
  font-family: var(--display);
  font-size: 26px;
  color: var(--chrome-tint, var(--gold));
  text-shadow: 0 0 18px rgba(201, 168, 106, 0.35);
  font-variant-numeric: tabular-nums;
  transition: color 1.4s ease;
}
@media (max-width: 900px) { #anno { display: none; } }

/* ─────────────── hero ─────────────── */
#hero {
  position: relative;
  min-height: clamp(600px, 84vh, 860px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(64px, 9vh, 90px) 20px clamp(60px, 8vh, 84px);
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 55% at 50% 118%, rgba(122, 62, 24, 0.22), transparent 60%),
    radial-gradient(ellipse 70% 50% at 50% -12%, rgba(52, 62, 84, 0.25), transparent 65%),
    var(--ink);
}
#embers, #embers-end {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.hero-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 100% 90% at 50% 45%, transparent 55%, rgba(3, 3, 4, 0.85) 100%);
}
.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1050px;
}

.hero-eyebrow {
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(11px, 1.3vw, 13px);
  letter-spacing: 0.52em;
  text-transform: uppercase;
  color: var(--bone-dim);
  margin-bottom: clamp(12px, 2vh, 20px);
}
.hero-eyebrow span { color: var(--gold); }

.hero-title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(44px, 9.5vw, 118px);
  line-height: 1.04;
  letter-spacing: 0.06em;
  background: linear-gradient(175deg, #f4e5c0 8%, var(--gold) 46%, #8a6f3f 82%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 34px rgba(201, 168, 106, 0.18));
  /* a carved-stone bevel beneath the gradient: dark groove, faint highlight */
  text-shadow:
    0 3px 2px rgba(0, 0, 0, 0.5),
    0 -1px 0 rgba(255, 255, 255, 0.14);
}

.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: clamp(16px, 2.6vh, 26px) auto;
}
.orn-line {
  display: block;
  height: 1px;
  width: clamp(60px, 12vw, 150px);
  background: linear-gradient(90deg, transparent, var(--gold-dim));
}
.orn-line:last-child { transform: scaleX(-1); }
.orn-diamond { color: var(--gold); font-size: 15px; line-height: 1; }

.hero-sub {
  font-family: var(--serif);
  font-size: clamp(16px, 2vw, 21px);
  color: var(--bone-dim);
  max-width: 780px;
  margin: 0 auto;
  line-height: 1.75;
}
.hero-dates {
  margin-top: clamp(10px, 1.8vh, 18px);
  font-family: var(--display);
  font-size: clamp(15px, 1.8vw, 19px);
  letter-spacing: 0.34em;
  color: var(--gold);
}

.scroll-cue {
  position: absolute;
  bottom: 34px;
  left: 50%;
  /* independent `translate` (not `transform`) so the .reveal-hero entrance
     animation — which finishes on `transform: none` — can't clobber centering */
  translate: -50% 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--bone-dim);
  transition: color 0.3s;
}
.scroll-cue:hover { color: var(--gold-bright); }
.cue-text {
  font-family: var(--sans);
  font-size: 10.5px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
}
.cue-chevron {
  width: 12px; height: 12px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg);
  animation: cue-drift 2.2s ease-in-out infinite;
}
@keyframes cue-drift {
  0%, 100% { transform: rotate(45deg) translate(0, 0); opacity: 0.5; }
  50% { transform: rotate(45deg) translate(5px, 5px); opacity: 1; }
}

/* hero entrance */
.reveal-hero {
  opacity: 0;
  transform: translateY(26px);
  filter: blur(6px);
  animation: hero-in 1.4s cubic-bezier(0.19, 1, 0.22, 1) var(--d, 0s) forwards;
}
@keyframes hero-in { to { opacity: 1; transform: none; filter: none; } }

/* ─────────────── scroll reveals ───────────────
   Base reveal: quick, blur-free (blur on 120 cards reads as lag and
   re-rasterizes shadows). Blur stays reserved for the hero, the age
   dividers, and landmark entries — their exclusive signature. */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.7s cubic-bezier(0.19, 1, 0.22, 1),
    transform 0.7s cubic-bezier(0.19, 1, 0.22, 1),
    filter 0.7s cubic-bezier(0.19, 1, 0.22, 1);
  transition-delay: var(--d, 0s);
}
.reveal.in { opacity: 1; transform: none; filter: none; }

/* age dividers keep the slow blur-rise */
.age-divider .reveal:not(.in) { filter: blur(5px); }
.age-divider .reveal { transition-duration: 1.1s; }

/* tales drift out of the spine sideways */
.entry.tale.reveal:not(.in) { transform: translate(-24px, 12px); }

/* landmarks alone keep the long cinematic blur-rise */
.entry.landmark.reveal { transition-duration: 1.4s; }
.entry.landmark.reveal:not(.in) { transform: translateY(46px); filter: blur(6px); }

/* ─────────────── tome sections (invocation / preface) ─────────────── */
.tome-section, #prefaces {
  position: relative;
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(48px, 8vh, 88px) 24px;
}
#invocation p {
  font-size: clamp(19px, 2.2vw, 24px);
  line-height: 1.85;
  color: var(--bone);
  text-align: center;
  margin-bottom: 2.2em;
}
#invocation p:first-child::first-letter {
  font-family: var(--display);
  font-style: normal;
  font-size: 3.1em;
  line-height: 0.8;
  color: var(--gold);
  float: left;
  padding: 8px 12px 0 0;
}
#invocation p:last-child {
  font-size: clamp(17px, 1.9vw, 20px);
  color: var(--gold);
  margin-bottom: 0;
}

.preface-block { margin-bottom: clamp(40px, 7vh, 70px); }
.preface-block h2, .epilogue-inner h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(27px, 4vw, 40px);
  letter-spacing: 0.08em;
  color: var(--gold);
  text-align: center;
  margin-bottom: 14px;
}
.preface-block .ornament { margin-top: 6px; margin-bottom: clamp(26px, 5vh, 44px); }
.preface-block p {
  margin-bottom: 1.5em;
  color: var(--bone);
  text-align: left;
}
.preface-block p:first-of-type::first-letter {
  font-family: var(--display);
  font-size: 2.9em;
  line-height: 0.8;
  color: var(--gold);
  float: left;
  padding: 7px 10px 0 0;
}

/* ─────────────── age dividers ─────────────── */
.age-divider {
  position: relative;
  min-height: clamp(440px, 70vh, 820px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(72px, 10vh, 120px) 24px clamp(26px, 3.4vh, 44px);
  overflow: hidden;
}
.age-divider::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 72% 58% at 50% 46%, var(--age-glow, rgba(201,168,106,0.10)), transparent 72%);
}
.age-roman-bg {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -52%) scale(var(--zoom, 1));
  font-family: var(--display);
  font-size: clamp(260px, 50vw, 680px);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px color-mix(in srgb, var(--age-tint, #c9a86a) 24%, transparent);
  text-shadow: 0 0 90px var(--age-glow, rgba(201, 168, 106, 0.18));
  pointer-events: none;
  user-select: none;
  will-change: transform;
}
.age-inner { position: relative; max-width: 940px; }
.age-kicker {
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(12px, 1.4vw, 14px);
  letter-spacing: 0.62em;
  text-transform: uppercase;
  color: var(--age-tint);
  margin-bottom: clamp(18px, 2.6vh, 30px);
  padding-left: 0.62em;
}
.age-title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(46px, 8.4vw, 104px);
  line-height: 1.02;
  letter-spacing: 0.055em;
  background: linear-gradient(178deg, #f9f1da 4%, #ecd39b 34%, var(--gold) 66%, #93753f 96%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  /* text-shadow (not filter) — the reveal system controls .age-title's filter */
  text-shadow:
    0 2px 3px rgba(0, 0, 0, 0.5),
    0 0 44px color-mix(in srgb, var(--age-tint, #c9a86a) 42%, transparent);
}
.age-ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: clamp(22px, 3.4vh, 34px) auto clamp(18px, 2.6vh, 26px);
}
.age-ornament .orn-line {
  width: clamp(70px, 15vw, 200px);
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--age-tint, #c9a86a) 55%, transparent));
}
.age-ornament .orn-diamond { color: var(--age-tint); font-size: 16px; }
.age-range {
  font-family: var(--display);
  font-size: clamp(17px, 2.1vw, 24px);
  letter-spacing: 0.36em;
  color: var(--age-tint);
  padding-left: 0.36em;
  text-shadow: 0 0 24px var(--age-glow, rgba(201, 168, 106, 0.2));
}
.age-temper {
  margin: clamp(30px, 4.6vh, 52px) auto 0;
  max-width: 780px;
  font-size: clamp(18px, 2.15vw, 23px);
  line-height: 1.82;
  color: #c3bba7;
}

/* ─────────────── timeline ─────────────── */
.timeline {
  position: relative;
  max-width: 1060px;
  margin: 0 auto;
  padding: 8px 24px 120px calc(var(--spine-x) + 24px);
}
/* the first year-milestone (right after the spine) sits under its age
   divider — keep it close so the section reads as one fixture */
.timeline > .spine + .year-break,
.timeline > .spine + .entry { margin-top: clamp(16px, 2.4vh, 30px); }
/* the spine reads as a carved channel, not a flat line: a wider groove
   with its own left/right bevel plus a faint repeating notch, like a
   chain or a measured rod rather than a ruled hairline */
.spine {
  position: absolute;
  left: var(--spine-x);
  top: 0;
  bottom: 0;
  width: 3px;
  background: rgba(201, 168, 106, 0.1);
  box-shadow:
    inset 1px 0 0 rgba(0, 0, 0, 0.5),
    inset -1px 0 0 rgba(255, 255, 255, 0.03);
}
.spine::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0 1px, transparent 1px 28px);
}
.spine-fill {
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 0;
  background: linear-gradient(180deg, var(--gold-dim), var(--gold));
  box-shadow:
    0 0 12px rgba(201, 168, 106, 0.55),
    inset 1px 0 0 rgba(255, 255, 255, 0.25),
    inset -1px 0 0 rgba(0, 0, 0, 0.3);
}

.entry {
  position: relative;
  margin: 0 0 clamp(36px, 6vh, 64px);
  max-width: 780px;
  scroll-margin-top: 94px; /* clears the fixed header when jumped to from the nav flyout */
}

.entry::before {
  /* connective tick from spine to card */
  content: "";
  position: absolute;
  top: 26px;
  left: calc(-1 * (24px));
  width: 24px;
  height: 1px;
  background: linear-gradient(90deg, var(--gold-dim), transparent);
  opacity: 0;
  transition: opacity 0.8s ease 0.25s;
}
.entry.in::before { opacity: 1; }

.entry-node {
  position: absolute;
  top: 26px;
  left: calc(-1 * (24px));
  transform: translate(-50%, -50%) rotate(45deg);
  width: 11px;
  height: 11px;
  background: var(--ink);
  border: 1px solid var(--gold-dim);
  transition: background 0.5s, border-color 0.5s, box-shadow 0.5s;
}
.entry.in .entry-node {
  border-color: var(--gold);
  box-shadow: 0 0 12px rgba(201, 168, 106, 0.5);
}

/* card — a carved tablet at rest, not a flat rectangle: an outer drop
   shadow for lift off the page, plus inset bevel lines top/bottom for
   a faint engraved edge */
.entry-card {
  background: linear-gradient(160deg, var(--card), var(--card-2));
  border: 1px solid rgba(201, 168, 106, 0.14);
  padding: clamp(22px, 3.4vw, 38px) clamp(22px, 3.6vw, 42px);
  position: relative;
  box-shadow:
    0 14px 34px -22px rgba(0, 0, 0, 0.75),
    inset 0 1px 0 rgba(255, 255, 255, 0.045),
    inset 0 -1px 0 rgba(0, 0, 0, 0.4);
  transition: border-color 0.5s ease, box-shadow 0.5s ease;
}
.entry-card:hover {
  border-color: rgba(201, 168, 106, 0.32);
  box-shadow:
    0 22px 54px -20px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(201, 168, 106, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 -1px 0 rgba(0, 0, 0, 0.45);
}

.entry-date {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 11.5px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--age-tint);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.entry-title {
  font-family: var(--display-lc);
  font-weight: 400;
  font-size: clamp(23px, 3vw, 31px);
  line-height: 1.22;
  color: var(--bone);
  margin-bottom: 14px;
  letter-spacing: 0.015em;
}
.entry-body {
  color: rgba(217, 210, 194, 0.92);
  max-width: 66ch;
  line-height: 1.8;
  letter-spacing: 0.01em;
}
.entry-body + .entry-body { margin-top: 1.1em; }
.entry-body em {
  color: var(--gold-bright);
  font-style: italic;
}
/* a carved-manuscript drop cap on the first paragraph of every entry —
   the same treatment already used in the Preface, extended throughout
   the chronicle for visual consistency and an easier point of entry
   into each block of prose */
.entry-body:first-of-type::first-letter {
  font-family: var(--display);
  font-size: 2.6em;
  line-height: 0.75;
  color: var(--gold);
  text-shadow: 0 0 18px color-mix(in srgb, var(--age-tint, transparent) 40%, transparent);
  float: left;
  padding: 5px 9px 0 0;
}

/* ── the names of Nave: players in gold, guilds in crimson ── */
.n-p {
  font-weight: 600;
  color: var(--gold);
}
.n-g {
  font-weight: 600;
  color: var(--name-guild);
}
/* keep the treatment legible against the tinted quote italics */
em .n-p, em .n-g { font-style: italic; }

/* ── landmark tier: the moments the whole chronicle turns on ── */
.entry.landmark { max-width: 860px; }
.entry.landmark .entry-card {
  border-color: rgba(201, 168, 106, 0.45);
  outline: 1px solid rgba(201, 168, 106, 0.16);
  outline-offset: 6px;
  background:
    radial-gradient(ellipse 90% 55% at 50% 0%, rgba(201, 168, 106, 0.09), transparent 65%),
    linear-gradient(160deg, var(--card), var(--card-2));
  padding-top: clamp(30px, 4.5vw, 48px);
}
.entry.landmark .entry-title {
  font-family: var(--display);
  font-size: clamp(29px, 4.2vw, 44px);
  letter-spacing: 0.07em;
  color: var(--gold-bright);
  text-shadow: 0 0 34px rgba(201, 168, 106, 0.28);
}
.entry.landmark .entry-node {
  width: 15px;
  height: 15px;
  background: var(--gold);
  box-shadow: 0 0 18px rgba(201, 168, 106, 0.7);
}
/* landmark forging rule: a gold line drawn across the card top on arrival */
.entry.landmark .entry-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 8%;
  right: 8%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-bright), transparent);
  box-shadow: 0 0 14px rgba(236, 208, 150, 0.5);
  transform: scaleX(0);
  transition: transform 1.6s cubic-bezier(0.19, 1, 0.22, 1) 0.55s;
}
.entry.landmark.in .entry-card::before { transform: scaleX(1); }

/* ── year milestones on the spine ── */
.year-break {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  margin: clamp(56px, 9vh, 96px) 0;
  max-width: 780px;
}
.year-break::before {
  content: "";
  position: absolute;
  left: -24px;
  top: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
  width: 8px;
  height: 8px;
  background: var(--gold);
  box-shadow: 0 0 12px rgba(201, 168, 106, 0.6);
}
.yb-text {
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--gold);
  white-space: nowrap;
}
.yb-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--gold-dim), transparent);
}

/* tale (undated interlude) variant */
.entry.tale .entry-card {
  background: linear-gradient(160deg, #0d0c09, #090807);
  border-style: dashed;
  border-color: rgba(201, 168, 106, 0.18);
}
.tale-kicker {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--bone-dim);
  margin-bottom: 10px;
}
.entry.tale .entry-node { border-radius: 50%; transform: translate(-50%, -50%); width: 7px; height: 7px; }

/* fate seal (keep destroyed / lost) */
.fate-seal {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--blood-bright);
  border: 1px solid rgba(156, 43, 34, 0.5);
  background: rgba(156, 43, 34, 0.08);
  padding: 7px 14px;
}
.fate-seal::before { content: "\2694\FE0E"; font-size: 14px; }

/* ─────────────── watch: media ─────────────── */
.watch {
  margin-top: 26px;
  border-top: 1px solid rgba(201, 168, 106, 0.12);
  padding-top: 20px;
}
.watch-label {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 10.5px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--bone-dim);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.watch-label::before { content: "\25B6\FE0E"; color: var(--age-tint); font-size: 9px; }

.video-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 12px;
}
@media (min-width: 720px) {
  .video-grid.multi { grid-template-columns: 1fr 1fr; }
}

.video-card {
  position: relative;
  border: 1px solid rgba(201, 168, 106, 0.16);
  background: #000;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}
.video-card:hover { border-color: rgba(201, 168, 106, 0.45); box-shadow: 0 10px 34px -12px rgba(0,0,0,0.8); }
.video-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.82) brightness(0.85);
  transition: transform 0.9s cubic-bezier(0.19, 1, 0.22, 1), filter 0.5s ease;
}
.video-card:hover .video-thumb img { transform: scale(1.05); filter: saturate(1) brightness(1); }
.video-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.88));
}
.play-btn {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 58px; height: 58px;
  border-radius: 50%;
  border: 1px solid rgba(236, 208, 150, 0.75);
  background: rgba(5, 5, 7, 0.55);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1), background 0.4s, box-shadow 0.4s;
  z-index: 2;
}
.play-btn::after {
  content: "";
  margin-left: 4px;
  border-left: 15px solid var(--gold-bright);
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
}
.video-card:hover .play-btn {
  transform: translate(-50%, -50%) scale(1.12);
  background: rgba(20, 16, 10, 0.8);
  box-shadow: 0 0 30px rgba(201, 168, 106, 0.35);
}
.video-caption {
  position: absolute;
  left: 14px; right: 14px; bottom: 11px;
  z-index: 2;
}
.video-caption .vc-title {
  display: block;
  font-family: var(--serif);
  font-size: 15.5px;
  line-height: 1.35;
  color: var(--bone);
  text-shadow: 0 1px 6px rgba(0,0,0,0.9);
}
.video-caption .vc-source {
  display: block;
  margin-top: 3px;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
}
.video-card iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  border: 0;
}

/* non-video scroll links */
.link-scrolls { display: flex; flex-direction: column; gap: 9px; }
.link-scroll {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid rgba(201, 168, 106, 0.16);
  background: linear-gradient(90deg, rgba(201, 168, 106, 0.045), transparent 55%);
  padding: 12px 18px;
  transition: border-color 0.35s, background 0.35s, transform 0.35s;
}
.link-scroll:hover {
  border-color: rgba(201, 168, 106, 0.45);
  background: linear-gradient(90deg, rgba(201, 168, 106, 0.1), transparent 70%);
  transform: translateX(4px);
}
.link-scroll .ls-icon {
  flex: 0 0 auto;
  color: var(--gold);
}
.link-scroll .ls-text {
  font-family: var(--serif);
  font-size: 16.5px;
  color: var(--bone);
  line-height: 1.4;
}
.link-scroll .ls-source {
  display: block;
  margin-top: 2px;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
}
.link-scroll .ls-arrow {
  margin-left: auto;
  color: var(--bone-dim);
  font-size: 13px;
  transition: transform 0.35s, color 0.35s;
}
.link-scroll:hover .ls-arrow { transform: translate(3px, -3px); color: var(--gold-bright); }

/* ─────────────── epilogue ─────────────── */
#epilogue {
  position: relative;
  min-height: clamp(400px, 58vh, 620px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(64px, 10vh, 96px) 24px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 50% 110%, rgba(122, 62, 24, 0.18), transparent 65%),
    var(--ink);
}
.epilogue-inner { position: relative; z-index: 2; max-width: 760px; }
.epilogue-inner p {
  font-size: clamp(17px, 2vw, 20px);
  color: var(--bone-dim);
  margin: 1.4em 0;
  line-height: 1.85;
}
.epilogue-mark { color: var(--bone) !important; }
.epilogue-mark em { color: var(--gold); }
.back-to-top {
  display: inline-block;
  margin-top: 26px;
  font-family: var(--display);
  font-size: 14px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--bone-dim);
  border: 1px solid rgba(201, 168, 106, 0.25);
  padding: 13px 26px;
  transition: color 0.35s, border-color 0.35s, background 0.35s;
}
.back-to-top:hover { color: var(--gold-bright); border-color: var(--gold); background: rgba(201, 168, 106, 0.06); }

footer {
  border-top: 1px solid rgba(201, 168, 106, 0.1);
  padding: 44px 24px 54px;
  text-align: center;
}
.footer-crest {
  width: 26px;
  height: 26px;
  color: var(--gold-dim);
  margin: 0 auto 22px;
  display: block;
}
footer p {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: #7d7668;
  max-width: 720px;
  margin: 0 auto 10px;
  line-height: 1.7;
}

/* ─────────────── responsive ─────────────── */
@media (max-width: 700px) {
  body { font-size: 17px; }
  .wordmark-text { display: none; }
  .wordmark { opacity: 1; transform: none; }
  .age-nav { gap: 0; }
  .age-nav-link { padding: 8px 4px; }
  .age-nav-caret { width: 16px; margin-right: 2px; }
  .age-flyout { width: min(320px, 88vw); left: 0; transform: translateX(0) translateY(-6px); }
  .age-nav-item::before { width: min(320px, 88vw); left: 0; transform: translateX(0); }
  .age-nav-item:hover .age-flyout,
  .age-nav-item:focus-within .age-flyout,
  .age-nav-item.open .age-flyout { transform: translateX(0) translateY(0); }
  /* every tick packed into a phone-width bar is too small a target to
     tap accurately — thin to an evenly-sampled subset plus every
     landmark, so mobile keeps real coverage instead of 4 sparse points */
  .sp-tick-hit { display: none; }
  .sp-tick-hit:nth-of-type(6n), .sp-tick-hit-siege { display: flex; width: 18px; height: 30px; }
  .timeline { padding-left: calc(var(--spine-x) + 18px); padding-right: 16px; }
  .entry::before { left: -18px; width: 18px; }
  .entry-node { left: -18px; }
  .year-break::before { left: -18px; }
}

/* ─────────────── reduced motion ─────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal-hero { opacity: 1 !important; transform: none !important; filter: none !important; animation: none !important; transition: none !important; }
  .cue-chevron { animation: none; }
  #veil { animation-duration: 0.2s; }
  #atmosphere { display: none; }
  .age-roman-bg { transform: none !important; }
  .entry.landmark .entry-card::before { transition: none; transform: scaleX(1); }
  .age-flyout { transition: opacity 0.15s ease; }
  .caret-chevron { transition: none; }
}
