/* Mayan Temple Adventures — site styles
   Palette from the key art: jungle canopy, sunlit limestone, sun gold, jade glow, ember */
:root {
  --canopy: #0D2621;
  --canopy-deep: #071612;
  --canopy-2: #133A31;
  --limestone: #F4E7C8;
  --limestone-dim: #CFC3A3;
  --ink: #2A2215;
  --ink-soft: #5A4C33;
  --gold: #FFB830;
  --gold-deep: #C77F12;
  --ember: #F0562E;
  --jade: #45E0B8;
  /* older names, still used by the inner pages */
  --stone: var(--canopy-2);
  --stone-2: #1A453B;
  --dark: var(--canopy);
  --line: rgba(244, 231, 200, .14);
  --text: #ECE2C8;
  --muted: #A9B6A4;
  --display: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  --story: "EB Garamond", Georgia, serif;
  --maxw: 1200px;
  --radius: 14px;
  --header-h: 68px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--canopy); color: var(--text);
  font: 400 17px/1.6 var(--body); font-optical-sizing: auto; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #FFD27A; }
:focus-visible { outline: 3px solid var(--jade); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 {
  font-family: var(--display); font-weight: 800; font-stretch: 82%; color: var(--limestone);
  line-height: 1.04; letter-spacing: -.01em; text-wrap: balance;
}
h1 { font-size: clamp(2.4rem, 5vw, 4rem); margin: .2em 0 .3em; }
h2 { font-size: clamp(2rem, 3.8vw, 3.1rem); margin: 0 0 .45em; }
h3 { font-size: 1.3rem; margin: .8em 0 .3em; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.section { padding: 96px 20px; }
.kicker { font: 600 .98rem/1.2 var(--body); color: var(--jade); margin: 0 0 10px; }
.lede { font-size: 1.25rem; color: var(--limestone-dim); max-width: 760px; }
.big { font-size: 1.3rem; line-height: 1.5; color: var(--limestone); }
.text-link { font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.text-link:hover { text-decoration-color: currentColor; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: var(--ink); padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- header & nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(13, 38, 33, .96);
  border-bottom: 1px solid var(--line);
}
@media (min-width: 1081px) { .site-header { background: rgba(13, 38, 33, .88); backdrop-filter: blur(8px); } }
.bar { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; height: var(--header-h); display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.brand-logo { height: 46px; width: auto; }
.brand-text { font: 700 1.05rem/1 var(--display); color: var(--limestone); letter-spacing: .04em; }
.main-nav { margin-left: auto; }
.nav-list, .sub { list-style: none; margin: 0; padding: 0; }
.nav-list { display: flex; gap: 2px; }
.nav-item { position: relative; }
.nav-row { display: flex; align-items: center; }
.nav-item > a, .nav-row > a {
  display: block; padding: 10px 10px; color: var(--limestone-dim); text-decoration: none;
  font-weight: 600; font-size: .93rem; white-space: nowrap; border-radius: 6px;
}
.nav-item > a:hover, .nav-row > a:hover { color: var(--limestone); }
.nav-list > .is-active > a, .nav-list > .is-active > .nav-row > a { color: var(--gold); }
.sub-toggle {
  background: none; border: 0; color: var(--limestone-dim); cursor: pointer;
  width: 26px; height: 34px; margin-left: -6px; border-radius: 6px; display: grid; place-items: center;
}
.sub-toggle:hover { color: var(--gold); }
.chev { width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.sub-toggle { transition: transform .2s, color .2s; }
.sub-toggle[aria-expanded="true"] { transform: rotate(180deg); color: var(--gold); }

/* desktop dropdowns */
@media (min-width: 1081px) {
  .sub {
    display: none; position: absolute; top: 100%; left: 0; min-width: 250px;
    background: #10302A; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 8px; box-shadow: 0 18px 40px rgba(0, 0, 0, .5);
  }
  .sub.open { display: block; }
  .sub .nav-item > a, .sub .nav-row > a { padding: 8px 12px; font-weight: 500; font-size: .92rem; color: var(--limestone-dim); }
  .sub .nav-row { justify-content: space-between; }
  .sub .nav-row > a { flex: 1; }
  .sub a[aria-current="page"] { color: var(--gold); background: rgba(240, 178, 74, .08); }
  .sub .nav-item > a:hover, .sub .nav-row > a:hover { background: rgba(239, 230, 206, .06); }
  /* second-level flyout opens to the side */
  .sub .sub { top: -9px; left: 100%; margin-left: 6px; }
  .sub .sub-toggle .chev { transform: translateX(-2px) rotate(-45deg); }
  .sub .sub-toggle[aria-expanded="true"] { transform: none; }
  .nav-list > .nav-item:nth-last-child(-n+2) > .sub { left: auto; right: 0; }
  .nav-list > .nav-item:nth-last-child(-n+3) .sub .sub { left: auto; right: 100%; margin: 0 6px 0 0; }
  .nav-list > .nav-item:nth-last-child(-n+3) .sub .sub-toggle .chev { transform: translateX(2px) rotate(135deg); }
  .menu-toggle { display: none; }
}

/* mobile menu */
@media (max-width: 1080px) {
  .menu-toggle {
    margin-left: auto; display: flex; align-items: center; gap: 10px; background: none;
    border: 1px solid var(--line); color: var(--limestone); border-radius: 8px; padding: 9px 14px; font: 600 .9rem var(--body); cursor: pointer;
  }
  .burger, .burger::before, .burger::after { display: block; width: 18px; height: 2px; background: currentColor; position: relative; transition: .2s; }
  .burger::before, .burger::after { content: ""; position: absolute; }
  .burger::before { top: -6px; } .burger::after { top: 6px; }
  .menu-toggle[aria-expanded="true"] .burger { background: transparent; }
  .menu-toggle[aria-expanded="true"] .burger::before { top: 0; transform: rotate(45deg); }
  .menu-toggle[aria-expanded="true"] .burger::after { top: 0; transform: rotate(-45deg); }
  .main-nav {
    display: none; position: fixed; inset: var(--header-h) 0 0 0; background: var(--dark);
    overflow-y: auto; padding: 12px 16px 40px; margin: 0;
  }
  .main-nav.open { display: block; }
  .nav-list { flex-direction: column; gap: 0; }
  .nav-list > .nav-item { border-bottom: 1px solid var(--line); }
  .nav-item > a, .nav-row > a { padding: 14px 6px; font-size: 1.05rem; flex: 1; }
  .sub-toggle { width: 48px; height: 48px; margin: 0; }
  .sub { display: none; padding: 0 0 10px 14px; border-left: 1px solid var(--line); margin-left: 6px; }
  .sub.open { display: block; }
  .sub .nav-item > a, .sub .nav-row > a { padding: 10px 6px; font-size: .98rem; font-weight: 500; }
  .sub a[aria-current="page"] { color: var(--gold); }
  body.menu-open { overflow: hidden; }
}

/* ---------- page head (inner pages) ---------- */
.page-head { padding: 64px 0 40px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, var(--stone) 0%, var(--dark) 100%); }
.page-head.has-bg { position: relative; background-size: cover; background-position: center; padding: 140px 0 48px; }
.page-head.has-bg::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7,22,18,.2), rgba(7,22,18,.95)); }
.page-head.has-bg .wrap { position: relative; }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--muted); }

/* ---------- home sections ---------- */
.intro { display: grid; grid-template-columns: 1.4fr 1fr; gap: 56px; align-items: start; }
.facts { margin: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--stone); padding: 8px 24px; }
.facts div { padding: 14px 0; border-bottom: 1px solid var(--line); }
.facts div:last-child { border-bottom: 0; }
.facts dt { font-size: .74rem; letter-spacing: .18em; text-transform: uppercase; color: var(--jade); font-weight: 700; }
.facts dd { margin: 2px 0 0; color: var(--limestone); font-weight: 600; }
.band { background: linear-gradient(180deg, var(--stone) 0%, #0E1823 100%); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pillars { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; margin-top: 28px; }
.pillar h3 { color: var(--gold); margin-top: 14px; }
.pillar p { font-size: .95rem; color: var(--limestone-dim); }
.pillar .fig img, .pillar .ph-box { aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.split { display: grid; grid-template-columns: 1.15fr 1fr; gap: 56px; align-items: center; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 24px; flex-wrap: wrap; }
.cards { display: grid; gap: 20px; }
.cards-4 { grid-template-columns: repeat(4, 1fr); }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
/* link cards (Characters): the picture carries the card, the name sits over it like the home page cast */
.card { position: relative; display: block; text-decoration: none; background: var(--canopy-deep); border-radius: 18px; overflow: hidden; isolation: isolate; }
.card .fig { margin: 0; }
.card .fig img, .card .ph-box { aspect-ratio: 16/10; object-fit: cover; width: 100%; border-radius: 0; transition: transform .5s ease-out; }
.card::after {
  content: ""; position: absolute; inset: 40% 0 0 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(7, 22, 18, 0), rgba(7, 22, 18, .9));
}
.card .card-body { position: absolute; left: 18px; right: 18px; bottom: 14px; z-index: 2; display: flex; flex-direction: column; padding: 0; }
.card .card-title { font: 800 clamp(1.25rem, 1.9vw, 1.7rem)/1.05 var(--display); font-stretch: 80%; color: var(--limestone); margin: 0; text-wrap: balance; }
.card .card-kicker { font: italic 400 1.05rem/1.3 var(--story); color: var(--limestone-dim); text-transform: none; letter-spacing: 0; margin-top: 3px; }
.card:hover .fig img { transform: scale(1.04); }
.card:hover .card-title { color: var(--gold); }
.card:focus-visible { outline-offset: 4px; }
.climb { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.tiers { list-style: none; padding: 0; margin: 20px 0 0; }
.tiers li { border-top: 1px solid var(--line); }
.tiers li:last-child { border-bottom: 1px solid var(--line); }
.tiers a { display: grid; grid-template-columns: 76px 1fr; column-gap: 14px; padding: 11px 4px; text-decoration: none; transition: background .2s; }
.tiers a:hover { background: rgba(240,178,74,.06); }
.t-num { grid-row: span 2; font: 700 .78rem/1.9 var(--body); text-transform: uppercase; letter-spacing: .14em; color: var(--jade); }
.t-name { font: 700 1.02rem var(--display); color: var(--limestone); }
.t-line { font: italic 1rem/1.4 var(--story); color: var(--muted); }
.story-band { background: radial-gradient(ellipse at 50% 0%, rgba(240,178,74,.14), transparent 60%), var(--stone); border-top: 1px solid var(--line); }
.story-inner { text-align: center; max-width: 820px; }
.story-quote { font: 400 1.35rem/1.55 var(--story); color: var(--limestone); margin: 0 auto 28px; }

/* page head that shows its whole scene (main characters): like the home hero, never cropped */
.page-head-art { position: relative; padding: 0 0 44px; background: var(--canopy-deep); border-bottom: 1px solid var(--line); }
.page-head-frame { position: relative; margin: 0 auto; max-width: min(1920px, calc((100svh - var(--header-h)) * 16 / 9)); }
.page-head-frame img { width: 100%; height: auto; }
.page-head-frame::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 40%; pointer-events: none;
  background: linear-gradient(180deg, rgba(7, 22, 18, 0), rgba(7, 22, 18, .8) 65%, var(--canopy-deep));
}
@media (min-aspect-ratio: 17/9), (min-width: 1921px) {
  .page-head-frame img {
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  }
}
.page-head-text { position: relative; margin-top: -7rem; }
/* the character's name is the type moment under the full picture */
.page-head-art h1 { font-size: clamp(3rem, 7.5vw, 6rem); font-stretch: 76%; line-height: .95; margin: .1em 0 .2em; }
.page-head-text h1, .page-head-text .lede { text-shadow: 0 2px 20px rgba(0, 0, 0, .55); }
@media (max-width: 640px) { .page-head-text { margin-top: -2.5rem; } }

/* ---------- buttons ---------- */
.cta-row { display: flex; gap: 16px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; padding: 15px 28px; border-radius: 12px;
  font: 700 1.05rem/1 var(--display); text-decoration: none; letter-spacing: .005em;
  transition: transform .12s ease-out, box-shadow .12s ease-out, background-color .2s, color .2s;
}
/* gold button sits on a darker "stone ledge" and presses down into it */
.btn-gold { background: var(--gold); color: var(--ink); box-shadow: 0 5px 0 var(--gold-deep), 0 12px 28px rgba(255, 184, 48, .22); }
.btn-gold:hover { background: #FFC857; color: var(--ink); transform: translateY(-2px); box-shadow: 0 7px 0 var(--gold-deep), 0 16px 34px rgba(255, 184, 48, .32); }
.btn-gold:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--gold-deep); }
.btn-ghost { color: var(--limestone); box-shadow: inset 0 0 0 2px rgba(244, 231, 200, .45); }
.btn-ghost:hover { color: var(--gold); box-shadow: inset 0 0 0 2px var(--gold); }

/* ---------- home: hero ---------- */
.hero { position: relative; background: var(--canopy-deep); }
.hero-art { position: relative; max-width: 1920px; margin: 0 auto; }
/* Show the whole key art: never crop it. On wide, short screens the
   frame narrows so the full picture still fits under the header, and its sides fade out. */
.hero-art { max-width: min(1920px, calc((100svh - var(--header-h)) * 1672 / 941)); }
.hero-art img { width: 100%; height: auto; }
/* the title logo, layered over the painting; position and size as a share of the painting */
.hero-logo { position: absolute; z-index: 1; margin: 0; left: var(--logo-x, 9%); top: var(--logo-y, 6%); width: var(--logo-w, 34%);
  filter: drop-shadow(0 10px 24px rgba(7, 22, 18, .55)); }
.hero-art .hero-logo img { display: block; width: 100%; height: auto; -webkit-mask-image: none; mask-image: none; }
/* on narrow screens the painting is small, so the logo takes a larger share of it to stay readable */
@media (max-width: 760px) { .hero-logo { --logo-x: 3%; --logo-y: 2%; --logo-w: 42%; } }
@media (min-aspect-ratio: 17/9), (min-width: 1921px) {
  .hero-art img {
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  }
}
.hero-art::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 38%; pointer-events: none;
  background: linear-gradient(180deg, rgba(7, 22, 18, 0), rgba(7, 22, 18, .75) 60%, var(--canopy-deep));
}
.hero-art-bg { min-height: 72vh; background-size: cover; background-position: center; }
.hero-panel {
  position: relative; display: grid; grid-template-columns: 1.15fr 1fr; gap: 56px; align-items: end;
  margin-top: -5.5rem; padding-bottom: 88px;
}
.hero-title { font-size: clamp(2.6rem, 6vw, 4.6rem); margin: 0 0 12px; }
.hero-hook {
  font: 800 clamp(2rem, 4.2vw, 3.3rem)/1.02 var(--display); font-stretch: 78%; letter-spacing: -.012em;
  color: var(--limestone); margin: 0 0 14px; text-wrap: balance; text-shadow: 0 2px 24px rgba(0, 0, 0, .55);
}
.hero-sub { font-size: 1.12rem; color: var(--limestone-dim); margin: 0 0 30px; max-width: 46ch; }
.hero .facts {
  margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; padding: 10px 26px;
  background: rgba(13, 38, 33, .78); border: 1px solid var(--line); border-radius: 18px;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.hero .facts div { padding: 14px 0; border-bottom: 1px solid var(--line); }
.hero .facts div:nth-last-child(-n+2) { border-bottom: 0; }
.hero .facts dt { font-size: .88rem; color: var(--jade); font-weight: 600; }
.hero .facts dd { margin: 2px 0 0; color: var(--limestone); font-weight: 600; line-height: 1.35; }

/* ---------- home: intro ---------- */
.page-index .intro { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.intro-title { font-size: clamp(2.3rem, 4.6vw, 3.8rem); margin: 0; }
.intro-text { max-width: 60ch; padding-top: 8px; }

/* ---------- home: sunlit limestone band, stepped like the pyramid's crown ---------- */
.sunlit {
  --s: clamp(14px, 2.2vw, 28px);
  background: var(--limestone); color: var(--ink);
  clip-path: polygon(0 calc(var(--s) * 3), 10% calc(var(--s) * 3), 10% calc(var(--s) * 2), 20% calc(var(--s) * 2),
    20% var(--s), 30% var(--s), 30% 0, 70% 0, 70% var(--s), 80% var(--s), 80% calc(var(--s) * 2),
    90% calc(var(--s) * 2), 90% calc(var(--s) * 3), 100% calc(var(--s) * 3), 100% 100%, 0 100%);
}
.sunlit .section { padding-top: calc(96px + var(--s) * 2); }
.sunlit h2 { color: var(--ink); text-align: center; }
.sunlit a { color: #8A4F00; }
/* three on top, two centred below; every picture shown whole, at its own shape */
.pillars {
  list-style: none; padding: 0; margin: 48px 0 0; display: grid;
  grid-template-columns: repeat(6, 1fr); gap: 48px 32px; align-items: start;
}
.pillars .pillar { grid-column: span 2; }
.pillars .pillar:nth-child(4) { grid-column: 2 / span 2; }
.pillars .pillar:nth-child(5) { grid-column: 4 / span 2; }
.sunlit .pillar .fig img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; border-radius: 16px; }
.sunlit .pillar .fig.focus-35 img { object-position: center 35%; }
.sunlit .pillar .ph-box { border-radius: 16px; }
.pillar h3 { color: var(--ink); font-size: 1.6rem; margin: 18px 0 6px; }
.pillar p { color: var(--ink-soft); font-size: .98rem; margin: 0; }

/* ---------- home: world ---------- */
.split { display: grid; grid-template-columns: 1.2fr 1fr; gap: 64px; align-items: center; }
.split-media .fig img { border-radius: 20px; }
.split-text p { color: var(--text); }

/* ---------- home: cast ---------- */
.cast-band { background: var(--canopy-deep); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; margin-bottom: 32px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.cast { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.portrait { position: relative; display: block; border-radius: 20px; overflow: hidden; text-decoration: none; isolation: isolate; }
.portrait .fig { margin: 0; }
.portrait .fig img, .portrait .ph-box { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; border-radius: 0; transition: transform .5s ease-out; }
.portrait::after {
  content: ""; position: absolute; inset: 45% 0 0 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(7, 22, 18, 0), rgba(7, 22, 18, .88));
}
.portrait-text { position: absolute; left: 26px; right: 26px; bottom: 20px; z-index: 2; display: flex; flex-direction: column; }
.portrait-name { font: 800 clamp(1.7rem, 3vw, 2.6rem)/1 var(--display); font-stretch: 80%; color: var(--limestone); }
.portrait-role { font: italic 400 1.2rem/1.3 var(--story); color: var(--limestone-dim); margin-top: 4px; }
.portrait:hover .fig img { transform: scale(1.04); }
.portrait:hover .portrait-name { color: var(--gold); }
.portrait:focus-visible { outline-offset: 4px; border-radius: 20px; }

/* ---------- home: the climb, built as a stepped pyramid ---------- */
.ascent-band {
  background:
    radial-gradient(ellipse 70% 45% at 50% 0%, rgba(255, 184, 48, .30), transparent 70%),
    linear-gradient(180deg, #1A3D31 0%, var(--canopy) 70%);
}
.ascent-head { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.ascent-head p { color: var(--limestone-dim); font-size: 1.15rem; max-width: 46ch; }
.ascent-map img { border-radius: 20px; }
.ascent { list-style: none; padding: 0; margin: 72px auto 0; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.step { width: calc(100% - var(--i) * 7.4%); }
.step a {
  display: grid; grid-template-columns: 6.2rem 1fr; column-gap: 18px; align-items: baseline;
  padding: 14px 24px 15px; text-decoration: none; border-radius: 6px;
  background: color-mix(in oklab, #164539, #2A5F4E calc(var(--i) * 12%));
  border-top: 3px solid rgba(244, 231, 200, .16);
  transition: background-color .2s, border-color .2s;
}
.step a:hover { background: #2C6B57; border-top-color: var(--gold); }
.step-num { grid-row: span 2; font-weight: 700; font-size: .95rem; color: var(--jade); }
.step-name { font: 800 1.3rem/1.15 var(--display); font-stretch: 84%; color: var(--limestone); }
.step-line { font: italic 400 1.06rem/1.35 var(--story); color: var(--limestone-dim); }
.step-summit a { background: var(--gold); border-top-color: #FFE3A3; box-shadow: 0 0 70px rgba(255, 184, 48, .45); }
.step-summit a:hover { background: #FFC857; border-top-color: #FFF1CC; }
.step-summit .step-num, .step-summit .step-name, .step-summit .step-line { color: var(--ink); }
/* The climb lights up from Floor 0 to the summit once, when it scrolls into view (JS adds .will-rise) */
.ascent.will-rise .step { opacity: 0; transform: translateY(16px); }
.ascent.will-rise.is-lit .step { animation: rise .55s cubic-bezier(.2, .7, .3, 1) forwards; animation-delay: calc(var(--i) * 120ms); }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- home: story ---------- */
.story-band { background: radial-gradient(ellipse 60% 70% at 50% 0%, rgba(69, 224, 184, .12), transparent 70%), var(--canopy-deep); }
.story-inner { text-align: center; max-width: 820px; }
.story-inner h2 { margin-bottom: 6px; }
.story-note { font: italic 400 1.15rem var(--story); color: var(--jade); margin-bottom: 28px; }
.story-quote { font: 400 1.5rem/1.55 var(--story); color: var(--limestone); margin: 0 auto 36px; }

/* ---------- figures, galleries, placeholders ---------- */
.fig { margin: 0; }
.fig img { border-radius: var(--radius); background: var(--stone); width: 100%; }
.fig a.lb { display: block; cursor: zoom-in; }
.fig figcaption { font-size: .88rem; color: var(--muted); margin-top: 8px; }
.ph-box {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  aspect-ratio: 16/9; border-radius: var(--radius); border: 1px dashed rgba(239,230,206,.25);
  background: repeating-linear-gradient(135deg, var(--stone) 0 14px, #17423A 14px 28px);
}
.ph-id { font: 700 1rem var(--display); color: var(--gold); letter-spacing: .06em; }
.ph-note { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .16em; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.stub { border: 1px dashed var(--line); border-radius: var(--radius); padding: 48px; text-align: center; background: var(--stone); }

/* ---------- pager & footer ---------- */
.pager { display: flex; justify-content: space-between; gap: 16px; padding: 40px 0 64px; border-top: 1px solid var(--line); margin-top: 32px; }
.pager a { text-decoration: none; font: 700 1rem var(--display); color: var(--limestone); }
.pager a:hover { color: var(--gold); }
.pager small { display: block; font: 600 .72rem var(--body); letter-spacing: .18em; text-transform: uppercase; color: var(--jade); margin-bottom: 4px; }
.pager .next { text-align: right; margin-left: auto; }
.site-footer { border-top: 1px solid var(--line); background: var(--canopy-deep); padding: 36px 0; font-size: .9rem; color: var(--muted); }
.foot { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.foot-title { font: 700 1rem var(--display); color: var(--limestone); margin-bottom: 4px; }
.foot-note { text-align: right; }

/* ---------- lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(3,5,8,.95); display: flex; align-items: center; justify-content: center; padding: 48px 64px; }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 140px); object-fit: contain; border-radius: 6px; }
.lightbox figcaption { color: var(--limestone-dim); margin-top: 12px; text-align: center; max-width: 900px; }
.lightbox button { position: absolute; background: rgba(239,230,206,.08); border: 1px solid var(--line); color: var(--limestone); font-size: 2rem; line-height: 1; width: 48px; height: 48px; border-radius: 50%; cursor: pointer; }
.lightbox button:hover { background: rgba(240,178,74,.2); }
.lb-close { top: 14px; right: 14px; }
.lb-prev { left: 10px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 10px; top: 50%; transform: translateY(-50%); }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .pillars { grid-template-columns: repeat(3, 1fr); }
  .cards-4 { grid-template-columns: repeat(2, 1fr); }
  .intro, .split, .climb { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .section { padding: 52px 16px; }
  .wrap { padding: 0 16px; }
  .pillars { grid-template-columns: 1fr 1fr; gap: 16px; }
  .cards-4, .cards-3 { grid-template-columns: 1fr 1fr; gap: 12px; }
  .card-title { font-size: .95rem; }
  .foot-note { text-align: left; }
  .lightbox { padding: 56px 8px; }
  .lb-prev, .lb-next { top: auto; bottom: 10px; transform: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ---------- content components (inner pages) ---------- */
.narrow-top { padding-top: 48px; }
.prose p { max-width: 70ch; }
.lede-sm { color: var(--limestone-dim); max-width: 70ch; margin-bottom: 28px; }
.c-gold { color: var(--gold); } .c-blue { color: #5AA8FF; } .c-red { color: #FF6A4A; } .c-green { color: #5FD07A; } .c-white { color: #F4F1E8; }

.feature { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center; margin: 0 0 64px; }
.feature:last-child { margin-bottom: 0; }
.feature.flip .feature-media { order: 2; }
.feature-text h3 { font-size: clamp(1.35rem, 2.2vw, 1.75rem); margin-top: 0; }
.feature-text p { color: var(--text); }

.pillar-list { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 18px; }
.pillar-list li { background: var(--dark); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.pillar-list .num { font: 700 1.6rem var(--display); color: var(--gold); }
.pillar-list h3 { margin: 6px 0 8px; }
.pillar-list p { color: var(--limestone-dim); font-size: .95rem; margin: 0; }

.loops { list-style: none; padding: 0; margin: 24px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; counter-reset: loop; }
.loops li { position: relative; padding: 22px 22px 22px 22px; border: 1px solid var(--line); background: var(--stone); }
.loops li:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.loops li:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.loops li + li { border-left: 0; }
.loop-label { display: block; font: 700 1.2rem var(--display); color: var(--gold); margin-bottom: 8px; }
.loops p { margin: 0; color: var(--limestone-dim); font-size: .95rem; }

.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 8px; }
.mode { border: 1px solid var(--line); border-top: 3px solid var(--jade); border-radius: var(--radius); padding: 22px; background: var(--stone); }
.mode h3 { margin-top: 0; }
.mode p:last-child { color: var(--limestone-dim); font-size: .95rem; margin: 0; }

.items { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; margin-top: 8px; }
.item { display: grid; grid-template-columns: 1fr; gap: 14px; background: var(--dark); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.band .item { background: #0B131C; }
.item h3 { margin: 4px 0 6px; }
.item p { margin: 0 0 .6em; color: var(--limestone-dim); font-size: .96rem; }
.item .kicker { margin-bottom: 4px; }

.table-wrap { overflow-x: auto; margin-top: 8px; }
.orb-table { width: 100%; border-collapse: collapse; min-width: 560px; }
.orb-table th, .orb-table td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.orb-table thead th { font: 700 .74rem var(--body); letter-spacing: .16em; text-transform: uppercase; color: var(--jade); }
.orb-table tbody th { font: 700 1.1rem var(--display); }

@media (max-width: 1000px) {
  .feature, .feature.flip { grid-template-columns: 1fr; gap: 22px; }
  .feature.flip .feature-media { order: 0; }
  .loops { grid-template-columns: 1fr 1fr; }
  .loops li, .loops li + li { border: 1px solid var(--line); border-radius: 0; }
  .modes { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .items { grid-template-columns: 1fr; }
  .loops { grid-template-columns: 1fr; }
}

/* ---------- language switch (flags, top right) ---------- */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.lang-switch { display: flex; gap: 6px; margin-left: 14px; flex-shrink: 0; }
.lang-link { display: block; width: 30px; height: 20px; border-radius: 3px; overflow: hidden; opacity: .5;
  outline: 1px solid rgba(239,230,206,.25); transition: opacity .2s, outline-color .2s; }
.lang-link svg { width: 100%; height: 100%; display: block; }
.lang-link:hover { opacity: .9; }
.lang-link.is-current { opacity: 1; outline: 2px solid var(--gold); }
@media (max-width: 1080px) {
  .lang-switch { order: 2; margin-left: auto; }
  .menu-toggle { order: 3; margin-left: 12px; }
}
@media (max-width: 560px) {
  .bar { gap: 10px; }
  .brand { min-width: 0; flex-shrink: 1; }
  .brand-text { font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
  .menu-label { display: none; }
  .menu-toggle { padding: 9px 11px; margin-left: 8px; }
  .lang-link { width: 26px; height: 17px; }
  .lang-switch { gap: 5px; }
}
@media (min-width: 1081px) and (max-width: 1280px) {
  .bar { gap: 14px; }
  .nav-item > a, .nav-row > a { padding: 10px 6px; font-size: .88rem; }
  .brand-text { font-size: .95rem; }
}

/* ---------- story & world components ---------- */
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 32px; align-items: start; }
.chapters { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 8px; }
.chapter { border-top-color: var(--gold); }
.story-quote.left { text-align: left; margin: 0 0 20px; font-size: 1.4rem; }
.rules { border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: var(--radius); background: var(--stone); padding: 22px 26px; }
.rules ul { margin: 0; padding-left: 18px; }
.rules li { margin: 0 0 10px; color: var(--limestone); }
.rules li:last-child { margin-bottom: 0; }
.tiers.lines .row { display: grid; grid-template-columns: 76px 1fr; column-gap: 14px; padding: 11px 4px; }
@media (max-width: 1000px) { .chapters { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .pair, .chapters { grid-template-columns: 1fr; } .story-quote.left { font-size: 1.2rem; } }

/* ---------- character pages ---------- */
.fig.sheet img { width: 100%; }
.gallery.extras { margin-top: 24px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.design-row { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.char-quote { margin: 0; padding: 4px 0 4px 26px; border-left: 3px solid var(--gold); }
.char-quote p { font: italic 400 1.45rem/1.5 var(--story); color: var(--limestone); margin: 0 0 10px; }
.char-quote cite { font-style: normal; font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; color: var(--jade); font-weight: 700; }
.cards-5 { grid-template-columns: repeat(5, 1fr); }
.cards-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 1000px) { .cards-5 { grid-template-columns: repeat(3, 1fr); } .design-row { grid-template-columns: 1fr; gap: 28px; } }
@media (max-width: 640px) { .cards-5, .cards-2 { grid-template-columns: 1fr 1fr; } .char-quote p { font-size: 1.2rem; } }
.foot > div { flex: 1 1 280px; }
.foot-note { flex: 1 1 440px; }
@media (max-width: 760px) { .foot-note { text-align: left; } }

/* ---------- labels: sentence case, no tracking ---------- */
.card-kicker, .facts dt, .t-num, .pager small, .ph-note, .orb-table thead th, .char-quote cite {
  text-transform: none; letter-spacing: 0; font-size: .9rem;
}
.card-title, .t-name, .pager a, .foot-title, .brand-text, .ph-id, .loop-label, .pillar-list .num, .orb-table tbody th { font-stretch: 84%; font-weight: 800; }

/* ---------- home: smaller screens ---------- */
@media (max-width: 1000px) {
  .hero-panel { grid-template-columns: 1fr; gap: 36px; margin-top: -3rem; padding-bottom: 64px; }
  .page-index .intro, .split, .ascent-head { grid-template-columns: 1fr; gap: 32px; }
  .pillars { grid-template-columns: 1fr 1fr; }
  .pillars .pillar, .pillars .pillar:nth-child(4) { grid-column: auto; }
  .pillars .pillar:nth-child(5) { grid-column: 1 / -1; justify-self: center; width: calc(50% - 16px); }
  .step { width: calc(100% - var(--i) * 4%); }
}
@media (max-width: 640px) {
  .section { padding: 64px 16px; }
  .hero-panel { margin-top: 0; padding-top: 8px; }
  .hero .facts { grid-template-columns: 1fr; padding: 4px 20px; }
  .hero .facts div:nth-last-child(2) { border-bottom: 1px solid var(--line); }
  .pillars { grid-template-columns: 1fr; gap: 36px; }
  .pillars .pillar:nth-child(5) { width: auto; justify-self: stretch; }
  .pillar h3 { font-size: 1.4rem; }
  .cast { grid-template-columns: 1fr; }
  .ascent { margin-top: 48px; }
  .step { width: 100%; }
  .step a { grid-template-columns: 1fr; padding: 12px 18px; }
  .step-num { grid-row: auto; }
  .story-quote { font-size: 1.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  .ascent.will-rise .step { opacity: 1; transform: none; animation: none; }
}


/* link cards: one per row on phones, so the names never cover the picture */
@media (max-width: 640px) {
  .cards-2, .cards-3, .cards-4, .cards-5 { grid-template-columns: 1fr; gap: 14px; }
}

/* ---------- climb pages: a floor's rooms as a numbered route ---------- */
.drawing-wide { margin-top: 28px; }
.route { list-style: none; padding: 0; margin: 44px 0 0; position: relative; }
/* the path between the steps, brightening toward the exit */
.route::before {
  content: ""; position: absolute; left: 27px; top: 28px; bottom: 28px; width: 2px;
  background: linear-gradient(180deg, rgba(244, 231, 200, .18), var(--gold));
}
.station {
  position: relative; display: grid; grid-template-columns: 56px minmax(0, 5fr) minmax(0, 6fr);
  gap: 0 28px; align-items: start; padding-bottom: 52px;
}
.station:last-child { padding-bottom: 0; }
.station-num {
  position: relative; z-index: 1; width: 56px; height: 56px; display: grid; place-items: center; border-radius: 6px;
  background: var(--limestone); color: var(--ink); box-shadow: 0 4px 0 #B6A57B;
  font: 800 1.7rem/1 var(--display); font-stretch: 80%;
}
.station:last-child .station-num { background: var(--gold); box-shadow: 0 4px 0 var(--gold-deep), 0 0 36px rgba(255, 184, 48, .4); }
.station-media .fig img, .station-media .ph-box { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; border-radius: 14px; }
.station-text h3 { margin: 4px 0 10px; font-size: 1.6rem; }
.station-text p { margin-bottom: .7em; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.tags span { font-size: .85rem; font-weight: 600; color: var(--jade); padding: 3px 11px; border-radius: 999px; box-shadow: inset 0 0 0 1px rgba(69, 224, 184, .45); }
.station-note { font: italic 400 1.08rem/1.45 var(--story); color: var(--limestone-dim); }
@media (max-width: 760px) {
  .route::before { left: 21px; }
  .station { grid-template-columns: 44px minmax(0, 1fr); gap: 14px 16px; padding-bottom: 40px; }
  .station-num { width: 44px; height: 44px; font-size: 1.35rem; }
  .station-media, .station-text { grid-column: 2; }
  .station-text h3 { margin-top: 0; font-size: 1.4rem; }
}
.gallery.gallery-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 640px) { .gallery.gallery-3 { grid-template-columns: 1fr; } }
/* every preview the same 16:9 shape, so a tall screen does not break the rows; the lightbox shows it whole */
.gallery.gallery-169 .fig img { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; object-position: center top; }

/* ---------- climb pages: K'in's tier line, floors and rooms ---------- */
.kin-line { margin: 0 0 22px; padding: 0; }
.kin-line p { font: italic 400 clamp(1.45rem, 2.4vw, 1.9rem)/1.35 var(--story); color: var(--limestone); margin: 0 0 6px; }
.kin-line cite { font-style: normal; font-weight: 600; font-size: .95rem; color: var(--jade); }

.floor-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 10px 32px; margin-bottom: 36px; }
.floor-head h2 { margin: 0; }
.floor-meta { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 0; }
.floor-meta div { display: flex; gap: 8px; align-items: baseline; }
.floor-meta dt { font-size: .88rem; font-weight: 600; color: var(--jade); }
.floor-meta dd { margin: 0; color: var(--limestone); font-weight: 600; }
.floor-end { margin: 8px 0 0; font: italic 400 1.15rem/1.4 var(--story); color: var(--limestone-dim); }

.room { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 20px 40px; align-items: start; margin-bottom: 64px; }
.room.flip .room-scene { order: 2; }
.room-scene .fig img, .room-scene .ph-box { width: 100%; border-radius: 16px; }
.room-code { display: inline-block; margin: 0 0 6px; font-size: .85rem; font-weight: 700; color: var(--ink); background: var(--limestone);
  padding: 2px 9px; border-radius: 5px; box-shadow: 0 3px 0 #B6A57B; }
.room-body h3 { margin: 6px 0 10px; font-size: clamp(1.5rem, 2.3vw, 1.9rem); }
.room-drawings { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; align-items: start; }
.room-drawings .fig img { border-radius: 10px; }
.room-drawings figcaption { font-size: .8rem; }
.fig.codex .ph-box { aspect-ratio: 3 / 4; }
.fig.map .ph-box { aspect-ratio: 1; }
.room-extra { grid-column: 1 / -1; }
@media (max-width: 900px) {
  .room { grid-template-columns: 1fr; gap: 18px; margin-bottom: 52px; }
  .room.flip .room-scene { order: 0; }
}

/* the climb overview: the campaign table */
.campaign td.num { font: 800 1.2rem var(--display); font-stretch: 80%; color: var(--gold); width: 3.5rem; }
.campaign tbody th a { color: var(--limestone); text-decoration: none; }
.campaign tbody th a:hover { color: var(--gold); }

/* the hub's three modes */
.modes { margin: 4px 0 56px; }
.modes .mode { background: var(--canopy-deep); border: 0; border-top: 3px solid var(--jade); border-radius: 14px; }
.modes .mode:first-child { border-top-color: var(--gold); }
.mode-where { font-size: .9rem; font-weight: 600; color: var(--jade); margin: 0 0 4px; }
.modes .mode h3 { margin: 0 0 8px; }

/* ---------- asset catalogue (Art & Assets, set pieces) ---------- */
.catalog { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 28px; align-items: start; }
.catalog.catalog-hub { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 32px 22px; }
.cat-item .fig img { border-radius: 12px; }
.cat-item .ph-box { aspect-ratio: 3 / 2; }
.cat-id { margin: 14px 0 2px; font-size: .85rem; font-weight: 700; color: var(--jade); }
.cat-item h3 { margin: 0 0 6px; font-size: 1.3rem; }
.cat-item p:last-child { color: var(--limestone-dim); font-size: .96rem; margin: 0; }
@media (max-width: 1000px) { .catalog, .catalog.catalog-hub { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .catalog, .catalog.catalog-hub { grid-template-columns: 1fr; } }

/* ---------- art direction ---------- */
.energies { list-style: none; padding: 0; margin: 0 0 1em; display: flex; flex-wrap: wrap; gap: 8px 22px; font-weight: 700; }
.swatches { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px; }
.swatches li { display: flex; flex-direction: column; gap: 2px; }
.swatch { display: block; aspect-ratio: 1; border-radius: 12px; box-shadow: inset 0 0 0 1px rgba(244, 231, 200, .2); margin-bottom: 8px; }
.sw-name { font-weight: 700; color: var(--limestone); }
.sw-hex { font-size: .9rem; color: var(--muted); }
@media (max-width: 760px) { .swatches { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* three drawings of one floor side by side (map, cutaway, codex) */
.drawings-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; align-items: start; margin-top: 8px; }
.drawings-3 .fig img { border-radius: 14px; }
.drawings-3 .ph-box { aspect-ratio: 1; }
@media (max-width: 760px) { .drawings-3 { grid-template-columns: 1fr; } }

/* ---------- short story: chapter cards ---------- */
a.mode.chapter { display: block; text-decoration: none; color: inherit; }
a.mode.chapter.is-ready { border-top-color: var(--gold); transition: background-color .2s; }
a.mode.chapter.is-ready:hover { background: var(--stone-2); }
a.mode.chapter.is-ready:hover h3 { color: var(--gold); }
.chapter-cta { display: inline-block; margin-top: 12px; font-weight: 700; color: var(--gold); text-decoration: underline; text-underline-offset: 5px; }
.chapter-soon { display: inline-block; margin-top: 12px; font: italic 400 1rem var(--story); color: var(--muted); }
/* the chapter loop is scaled to the card's own width, so the four-column grid keeps its widths */
.chapter-loop { display: block; margin-top: 14px; }
.chapter-loop img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: calc(var(--radius) - 2px); border: 1px solid var(--line); }

/* ---------- the reader: a chapter set like a book page ---------- */
.reader {
  --paper: #F3E8CC; --ink: #2B2316; --ink-soft: #6A5A3E; --rule: rgba(43, 35, 22, .18); --accent: #8A4F00;
  --size: 1.24rem;
  position: relative; max-width: 46rem; margin: 40px auto 72px; padding: 28px clamp(22px, 6vw, 72px) 64px;
  background: var(--paper); color: var(--ink); border-radius: 6px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .4) inset, 0 30px 80px rgba(0, 0, 0, .45);
}
.reader[data-theme="night"] {
  --paper: #10241F; --ink: #E7DDC3; --ink-soft: #A9B6A4; --rule: rgba(231, 221, 195, .16); --accent: #FFB830;
  box-shadow: 0 0 0 1px var(--line), 0 30px 80px rgba(0, 0, 0, .45);
}
.reader-tools { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  padding-bottom: 14px; border-bottom: 1px solid var(--rule); font-size: .92rem; }
.reader-back { color: var(--ink-soft); font: italic 400 1.05rem var(--story); text-decoration: none; }
.reader-back:hover { color: var(--accent); }
.reader-tool-group { display: flex; gap: 6px; }
.reader-tools button {
  font: 600 .9rem var(--body); color: var(--ink); background: transparent; border: 1px solid var(--rule);
  border-radius: 8px; padding: 6px 11px; cursor: pointer; min-width: 40px;
}
.reader-tools button:hover, .reader-tools button[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.reader-tools sup { font-size: .7em; }

.reader-head { text-align: center; padding: 64px 0 40px; }
.reader-series { font: italic 400 1.15rem var(--story); color: var(--ink-soft); margin: 0 0 22px; }
.reader-num { font: 400 1rem/1 var(--story); letter-spacing: .32em; text-transform: uppercase; color: var(--accent); margin: 0 0 14px; }
.reader-head h1 { font: 500 clamp(2.1rem, 5vw, 3.1rem)/1.1 var(--story); font-stretch: normal; letter-spacing: 0; color: var(--ink); margin: 0 0 18px; }
.reader-meta { font-size: .9rem; color: var(--ink-soft); margin: 0 0 28px; }
.reader-ornament { display: block; width: 72px; height: 12px; margin: 0 auto; color: var(--accent);
  background: linear-gradient(currentColor, currentColor) center / 100% 1px no-repeat; position: relative; }
.reader-ornament::after { content: ""; position: absolute; left: 50%; top: 50%; width: 9px; height: 9px; background: var(--paper);
  border: 1px solid currentColor; transform: translate(-50%, -50%) rotate(45deg); }

.reader-text { font: 400 var(--size)/1.72 var(--story); hyphens: auto; -webkit-hyphens: auto; text-align: left; }
.reader-text p { margin: 0; text-indent: 1.6em; }
.reader-text p:first-child, .reader-text .reader-note + p { text-indent: 0; }
.reader-text p:first-child::first-letter, .reader-text .reader-note + p::first-letter {
  float: left; font-size: 3.6em; line-height: .86; padding: .07em .1em 0 0; color: var(--accent); font-weight: 500;
}
.reader-text em { font-style: italic; }
.reader-note { text-indent: 0 !important; font-size: .9rem; color: var(--ink-soft); font-family: var(--body); margin-bottom: 1.4em !important; }

.reader-end { text-align: center; padding-top: 48px; }
.reader-fin { font: italic 400 1.15rem var(--story); color: var(--ink-soft); margin: 18px 0 30px; }
.reader-next { display: inline-flex; flex-direction: column; gap: 4px; padding: 16px 26px; border: 1px solid var(--rule); border-radius: 10px;
  font: 500 1.3rem var(--story); color: var(--ink); text-decoration: none; margin: 0 0 28px; }
.reader-next span { font: 600 .8rem var(--body); color: var(--accent); letter-spacing: .02em; }
a.reader-next:hover { border-color: var(--accent); color: var(--accent); }
.reader-next.is-soon { color: var(--ink-soft); }
.reader-end .text-link { display: block; color: var(--accent); }

.reader-progress { position: fixed; left: 0; right: 0; top: var(--header-h); height: 3px; z-index: 40; pointer-events: none; }
.reader-progress span { display: block; height: 100%; width: 0; background: var(--gold); transform-origin: left; }
@media (max-width: 640px) {
  .reader { margin: 0 0 48px; border-radius: 0; padding-top: 18px; box-shadow: none; }
  .reader-head { padding: 40px 0 30px; }
  .reader { --size: 1.14rem; }
}
@media print {
  .site-header, .site-footer, .reader-tools, .reader-progress, .reader-end .text-link { display: none !important; }
  .reader { box-shadow: none; margin: 0; max-width: none; background: #fff; color: #000; }
}

/* ---------- UEFN islands: home band, island pages ---------- */
.island-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.island-card { position: relative; display: flex; flex-direction: column; height: 100%; text-decoration: none; color: inherit;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--stone); transition: border-color .2s; }
.island-card .fig { margin: 0; overflow: hidden; }
.island-card .fig img, .island-card .ph-box { aspect-ratio: 4 / 3; width: 100%; object-fit: cover; border-radius: 0; transition: transform .5s ease-out; }
.island-num { position: absolute; top: 10px; left: 10px; min-width: 30px; height: 30px; display: grid; place-items: center;
  border-radius: 8px; background: var(--canopy-deep); color: var(--gold); font: 800 .95rem/1 var(--display); }
.island-name { display: block; padding: 14px 16px 2px; font: 800 1.1rem/1.2 var(--display); color: var(--limestone); }
.island-line { display: block; padding: 0 16px 16px; font-size: .9rem; color: var(--limestone-dim); }
.island-card:hover { border-color: var(--gold); }
.island-card:hover .island-name { color: var(--gold); }
.island-card:hover .fig img { transform: scale(1.04); }
.island-card:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
@media (max-width: 1000px) { .island-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .island-grid { grid-template-columns: 1fr 1fr; gap: 12px; } .island-name { font-size: 1rem; } }
@media (prefers-reduced-motion: reduce) { .island-card .fig img { transition: none; } }

.sub-head { margin: 8px 0 16px; }
.island-back { margin: 8px 0 0; }
.scale-table { max-width: 640px; }
/* steps that wrap: three to a row, each its own card */
.loops.loops-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
.loops.loops-grid li, .loops.loops-grid li + li { border: 1px solid var(--line); border-radius: var(--radius); }
@media (max-width: 1000px) { .loops.loops-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .loops.loops-grid { grid-template-columns: 1fr; } }

/* ---------- climbing together: co-op concept art (pages/crew.py) ----------
   One signature wherever crew art appears: a twisted gold rope opens the band (climbers rope up together),
   and every crew picture carries a jade frame set off its edge, so it never reads as the solo game. */
.crew-band { position: relative; padding: 76px 0 88px; background: linear-gradient(180deg, #0B201B 0%, var(--canopy-deep) 100%); }
.crew-band::before {
  content: ""; position: absolute; left: 0; right: 0; top: -4px; height: 9px; border-radius: 5px;
  /* hemp rope: twisted strands, lit from above, shaded below so it reads round */
  background:
    linear-gradient(180deg, rgba(255, 240, 205, .45) 0, rgba(255, 240, 205, 0) 45%, rgba(0, 0, 0, .4) 100%),
    repeating-linear-gradient(62deg, #D8A75E 0 5px, #A9742F 5px 8px, #6F4719 8px 9px);
  box-shadow: 0 3px 6px rgba(0, 0, 0, .45);
}
.crew-head { max-width: 640px; margin-bottom: 30px; }
.crew-head h2 { margin: 0 0 10px; }
.crew-head p { color: var(--limestone-dim); margin: 0 0 10px; }
.crew-grid { display: grid; gap: 28px 24px; }
.crew-cols-2 { grid-template-columns: repeat(2, 1fr); }
.crew-cols-3 { grid-template-columns: repeat(3, 1fr); }
.crew-cols-4 { grid-template-columns: repeat(4, 1fr); }
.crew-cols-5 { grid-template-columns: repeat(5, 1fr); }
.crew-one { max-width: 880px; }
.crew-fig img { outline: 2px solid rgba(69, 224, 184, .7); outline-offset: 4px; }
.crew-fig figcaption { color: var(--limestone-dim); margin-top: 12px; }
.crew-section { padding-top: 80px; padding-bottom: 80px; }
.crew-intro { display: grid; grid-template-columns: 1fr 1.25fr; gap: 56px; align-items: center; }
.crew-intro .big { margin-top: 0; }
.crew-ideas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 64px; }
.crew-ideas > div { border-top: 2px solid var(--line); padding-top: 18px; }
.crew-ideas h3 { font-size: 1.25rem; margin: 0 0 8px; }
.crew-ideas p { color: var(--limestone-dim); margin: 0; }
.proto-fig img { outline-color: rgba(255, 184, 48, .55); }
@media (max-width: 960px) {
  .crew-cols-4 { grid-template-columns: repeat(2, 1fr); }
  .crew-cols-5 { grid-template-columns: repeat(3, 1fr); }
  .crew-intro { grid-template-columns: 1fr; gap: 32px; }
  .crew-ideas { grid-template-columns: 1fr; gap: 24px; margin-top: 40px; }
}
@media (max-width: 680px) {
  .crew-cols-2, .crew-cols-3, .crew-cols-4, .crew-cols-5 { grid-template-columns: 1fr; }
  .crew-band { padding: 56px 0 64px; }
}

/* ---------- 12 Nov 2026: light the site like the paintings ----------
   Signature: one carved step-fret frieze (xicalcoliuhqui, the motif of the kit's trim sheets) marks where a new
   band of the temple begins. Bands are lit by torch-gold from above instead of fading to cold blue-black.
   Jade is the game's inlay jade, not neon mint. Cards read as carved panels with a faint lit edge. */
:root {
  --jade: #4CD6AC;
  --torch: rgba(255, 176, 64, .10);
  --fret: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='16' viewBox='0 0 48 16'%3E%3Cpath d='M0 15h8V5h12v6h-6V9' fill='none' stroke='%23C77F12' stroke-width='2.2' stroke-linecap='square'/%3E%3Cpath d='M24 1h-8v10H4V5h6v2' fill='none' stroke='%23C77F12' stroke-width='2.2' stroke-linecap='square' transform='translate(24 0)'/%3E%3Cpath d='M0 15h48M0 1h48' stroke='%23C77F12' stroke-width='1.2' opacity='.6'/%3E%3C/svg%3E");
}
.band {
  position: relative;
  background:
    radial-gradient(120% 70% at 50% 0%, var(--torch), transparent 70%),
    linear-gradient(180deg, var(--stone) 0%, var(--canopy-deep) 100%);
  border-top: 0;
}
.band::before, .page-head::after {
  content: ""; position: absolute; left: 0; right: 0; height: 16px; pointer-events: none;
  background: var(--fret) repeat-x center / 48px 16px; opacity: .55;
}
.band::before { top: -8px; }
.page-head { position: relative; border-bottom: 0; }
.page-head::after { bottom: -8px; z-index: 2; }
.page-head-art { border-bottom: 0; }
/* the crew band keeps its rope, not the fret */
.crew-band.band::before { display: none; }

/* carved panels: a faint lit top edge, one shadow depth, radius by size */
.card, .facts, .island-card {
  box-shadow: inset 0 1px 0 rgba(255, 236, 200, .10), inset 0 0 0 1px rgba(244, 231, 200, .06), 0 14px 30px rgba(0, 0, 0, .28);
}
.card:hover .card-title { color: #FFC857; }
.facts { background: linear-gradient(180deg, #1A4036 0%, var(--stone) 100%); }
.facts dt { letter-spacing: .06em; text-transform: none; font-size: .86rem; }

/* sections promoted from h3 (heading order) keep the h3 look */
h2.h3 { font-size: 1.3rem; margin: .8em 0 .3em; }
.feature-text h2.h3 { font-size: clamp(1.35rem, 2.2vw, 1.75rem); margin-top: 0; }

/* story quotes and captions: the serif is the temple's voice */
blockquote { font-family: var(--story); }
.fig figcaption { line-height: 1.45; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
/* the home page's own bands start with the same frieze */
.cast-band, .ascent-band, .story-band { position: relative; }
.cast-band::before, .ascent-band::before, .story-band::before {
  content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 16px; pointer-events: none; z-index: 1;
  background: var(--fret) repeat-x center / 48px 16px; opacity: .55;
}
.cast-band { background: radial-gradient(120% 60% at 50% 0%, var(--torch), transparent 70%), var(--canopy-deep); }

/* ---------- section tabs: every page of a section under the page head; sticks under the header (from Valendhar) ---------- */
.section-tabs { position: sticky; top: var(--header-h); z-index: 40; background: rgba(7, 22, 18, .95); border-bottom: 1px solid var(--line);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .35); }
@media (min-width: 1081px) { .section-tabs { background: rgba(7, 22, 18, .86); backdrop-filter: blur(8px); } }
.st-inner { display: flex; align-items: stretch; min-height: 54px; }
.st-name { display: flex; align-items: center; flex-shrink: 0; padding-right: 22px; margin-right: 6px; text-decoration: none;
  font: 800 1.08rem/1 var(--display); font-stretch: 82%; color: var(--gold); border-right: 1px solid var(--line); }
.st-name:hover { color: #FFD27A; }
.st-list { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; flex: 1; min-width: 0;
  overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; }
.st-list::-webkit-scrollbar { display: none; }
.st-list li { flex-shrink: 0; display: flex; }
.st-list a { position: relative; display: flex; align-items: center; padding: 0 14px; white-space: nowrap; text-decoration: none;
  font-size: .98rem; font-weight: 600; color: var(--limestone-dim); transition: color .15s, background-color .15s; }
.st-list a:hover { color: var(--limestone); background: rgba(244, 231, 200, .05); }
/* the current page: torch-lit, with a gold bar cut like a carved step */
.st-list a[aria-current="page"] { color: var(--limestone); background: linear-gradient(180deg, rgba(255, 184, 48, .03), rgba(255, 184, 48, .14)); }
.st-list a[aria-current="page"]::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: 0; height: 4px;
  background: var(--gold); clip-path: polygon(0 100%, 0 50%, 4px 50%, 4px 0, calc(100% - 4px) 0, calc(100% - 4px) 50%, 100% 50%, 100% 100%); }
.st-list a:focus-visible { outline-offset: -3px; }
.st-count { display: flex; align-items: center; flex-shrink: 0; padding-left: 18px; font: italic 400 1rem/1 var(--story); color: var(--muted); white-space: nowrap; }
@media (min-width: 761px) { .st-list { flex-wrap: wrap; overflow: visible; } .st-list a { min-height: 54px; } }
@media (max-width: 1100px) { .st-count { display: none; } }
@media (max-width: 760px) {
  .st-inner { padding-right: 0; min-height: 50px; }
  .st-name { font-size: 1rem; padding-right: 14px; }
  .st-list a { padding: 0 12px; font-size: .95rem; }
  .st-list { --fl: 0px; --fr: 36px;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 var(--fl), #000 calc(100% - var(--fr)), transparent);
    mask-image: linear-gradient(90deg, transparent, #000 var(--fl), #000 calc(100% - var(--fr)), transparent); }
  .st-list.not-start { --fl: 36px; }
  .st-list.at-end { --fr: 0px; }
}
/* the header's fret sits under the tabs, not over them */
.page-head::after { z-index: 1; }
html { scroll-padding-top: calc(var(--header-h) + 62px); }
@media (min-width: 1101px) { .st-list a { padding: 0 11px; font-size: .95rem; } .st-name { padding-right: 18px; } .st-count { padding-left: 12px; } }
/* with section tabs right under the header, the frieze sits wholly inside the header so the tab bar can't cover half of it */
.page-head:has(+ .section-tabs)::after { bottom: 2px; }

/* ---------- side-view: the run strip ----------
   Side-view screens laid edge to edge like one level, read left to right. The gold route line runs under them,
   and each screen's number sits on it. The strip bleeds to the window edges; its first screen lines up with the text. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.section-tight { padding: 88px 20px 28px; }
.strip-band .section { padding-bottom: 28px; }
.strip { --gutter: max(20px, calc((100vw - var(--maxw)) / 2 + 20px)); padding-bottom: 88px; }
.strip-view {
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scroll-padding-inline: var(--gutter);
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--gutter), #000 calc(100% - 56px), transparent);
          mask-image: linear-gradient(90deg, transparent 0, #000 var(--gutter), #000 calc(100% - 56px), transparent);
}
.strip-view::-webkit-scrollbar { display: none; }
.strip-view:focus-visible { outline-offset: -3px; }
.strip-track { list-style: none; margin: 0; padding: 0 var(--gutter) 22px; display: flex; gap: 3px; width: max-content; }
.strip-screen { width: clamp(270px, 40vw, 600px); scroll-snap-align: start; }
.strip-screen .fig { margin: 0; }
.strip-screen .fig img, .strip-screen .ph-box { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; border-radius: 0; }
.strip-screen:first-child .fig img, .strip-screen:first-child .ph-box { border-radius: 12px 0 0 12px; }
.strip-screen:last-child .fig img, .strip-screen:last-child .ph-box { border-radius: 0 12px 12px 0; }
/* the route line: one continuous gold rule under the screens, brightening toward the end of the run */
.strip-cap {
  position: relative; margin: 14px 0 0; padding: 14px 16px 0 0; border-top: 2px solid rgba(255, 184, 48, .55);
  display: flex; align-items: baseline; gap: 10px; color: var(--limestone-dim); font-weight: 600; font-size: .95rem; line-height: 1.3;
}
.strip-screen:last-child .strip-cap { border-top-color: var(--gold); }
.strip-num {
  flex: none; margin-top: -27px; align-self: flex-start; min-width: 36px; padding: 5px 6px; text-align: center; border-radius: 5px;
  background: var(--limestone); color: var(--ink); box-shadow: 0 3px 0 #B6A57B;
  font: 800 .95rem/1 var(--display); font-stretch: 80%; font-variant-numeric: tabular-nums;
}
.strip-screen:last-child .strip-num { background: var(--gold); box-shadow: 0 3px 0 var(--gold-deep), 0 0 24px rgba(255, 184, 48, .45); }
.strip-controls { display: flex; justify-content: flex-end; gap: 10px; max-width: var(--maxw); margin: 6px auto 0; padding: 0 20px; }
.strip-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(244, 231, 200, .3); background: transparent; color: var(--limestone);
  font: 700 1.6rem/1 var(--display); cursor: pointer; display: grid; place-items: center;
}
.strip-btn:hover { border-color: var(--gold); color: var(--gold); }
.strip-btn:disabled { opacity: .3; cursor: default; }
.home-strip { border-top: 1px solid var(--line); }
@media (max-width: 640px) {
  .strip-screen { width: 82vw; }
  .strip { padding-bottom: 64px; }
  .section-tight { padding: 64px 20px 24px; }
}

/* ---------- side-view: a floor's shape, drawn as the direction its level runs ---------- */
.shape { display: inline-flex; gap: 2px; vertical-align: -4px; color: var(--gold); }
.shape svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.campaign .shape-cell { white-space: nowrap; }
.campaign .screens { margin-left: 8px; font-weight: 700; color: var(--limestone); font-variant-numeric: tabular-nums; }
.tier-note { color: var(--limestone-dim); font-size: .98rem; }
.anatomy { margin-top: 48px; }
