@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:wght@500;600&display=swap');

:root {
  color-scheme: light;
  --ink: #21231c;
  --forest: #171b14;
  --paper: #f3efe5;
  --muted: #585a4b;
  --gold: #dfb97b;
  --gold-ink: #765524;
  --rule: #cfc4ad;
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'DM Sans', system-ui, sans-serif;
  --gutter: clamp(20px, 5vw, 76px);
  --header-height: 68px;
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
}
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, p, figure { margin: 0; }
a { color: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid #a6762c; outline-offset: 4px; }
.skip-link { position: fixed; z-index: 20; top: 10px; left: 10px; padding: 10px; background: var(--paper); transform: translateY(-150%); }
.skip-link:focus { transform: none; }
.masthead {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  min-height: var(--header-height);
  padding: 0 var(--gutter);
  background: var(--forest);
  color: var(--paper);
  border-bottom: 1px solid #dfb97b37;
}
.wordmark { color: var(--gold); letter-spacing: .19em; text-decoration: none; font-size: .91rem; }
.masthead nav { display: flex; align-items: center; gap: clamp(13px, 2.5vw, 34px); font-size: .89rem; }
.header-viewer { text-decoration: none; color: var(--gold); white-space: nowrap; }
.header-viewer:hover, .header-viewer:focus-visible { text-decoration: underline; text-underline-offset: .25em; }
.chapter-menu summary { cursor: pointer; padding-block: 12px; }
.chapter-menu ol {
  position: absolute;
  top: calc(100% - 6px);
  right: var(--gutter);
  width: min(290px, calc(100% - 40px));
  padding: 8px;
  margin: 0;
  list-style: none;
  background: #22271d;
  border: 1px solid #dfb97b62;
  box-shadow: 0 14px 32px #1116;
}
.chapter-menu a { display: block; padding: 8px 12px; text-decoration: none; }
.chapter-menu a:hover, .chapter-menu a[aria-current="location"] { background: #dfb97b22; color: var(--gold); }
.journey {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  isolation: isolate;
  background: var(--forest);
}
.world, .journey-content { grid-area: 1 / 1; min-width: 0; }
.world {
  position: sticky;
  top: var(--header-height);
  height: calc(100svh - var(--header-height));
  z-index: 0;
  background: #282c20;
  color: #fff8ea;
}
.world-views, .world-image { position: absolute; inset: 0; width: 100%; height: 100%; }
.world-views { isolation: isolate; overflow: hidden; }
.world-image {
  object-fit: cover;
  object-position: 54% center;
  transform-origin: 58% center;
  opacity: 0;
}
.world-image[data-scene="overview"] { opacity: 1; }
.world-image[data-scene="horse"] { object-position: 60% center; }
.world-views::after {
  content: '';
  position: absolute;
  z-index: 2;
  inset: 0;
  background: linear-gradient(90deg, #11150fc7, #11150f55 43%, transparent 72%),
              linear-gradient(0deg, #11150f75, transparent 28%);
  pointer-events: none;
}
.world-caption {
  position: absolute;
  z-index: 3;
  right: var(--gutter);
  bottom: clamp(18px, 4vw, 48px);
  display: flex;
  gap: clamp(14px, 3vw, 38px);
  align-items: center;
  justify-content: space-between;
  padding: 11px 16px;
  border: 1px solid #dfb97b66;
  background: #181c14ee;
}
@media (min-width: 761px) {
  .world.caption-left .world-caption { left: var(--gutter); right: auto; }
  .journey.is-reading .world-views::after { background: linear-gradient(0deg, #11150f75, transparent 28%); }
}
.world-caption div > span { display: block; color: var(--gold); font-size: .69rem; letter-spacing: .1em; }
.world-caption strong { display: block; margin-top: 3px; font-size: .96rem; }
.world-caption a { display: flex; min-height: 32px; align-items: center; gap: 5px; color: var(--gold); font-size: .84rem; white-space: nowrap; text-underline-offset: .25em; }
.journey-content { position: relative; z-index: 1; pointer-events: none; }
.hero-content, .chapter-inner { pointer-events: auto; }
.hero {
  display: grid;
  min-height: calc(100svh - var(--header-height));
  align-items: center;
  padding: clamp(36px, 6vw, 90px) var(--gutter);
  color: #fff9ec;
}
.hero-content { max-width: 810px; }
.hero-logo { width: clamp(155px, 17vw, 218px); height: auto; margin-bottom: clamp(16px, 3.6vh, 40px); }
.hero-recipient { color: var(--gold); font-weight: 600; margin-bottom: 12px; }
.hero h1 { max-width: 760px; font: 500 clamp(3rem, 7.4vw, 7.4rem)/1.02 var(--serif); letter-spacing: -.048em; text-wrap: balance; }
.hero-subtitle { max-width: 485px; font-size: clamp(1.05rem, 1.5vw, 1.35rem); line-height: 1.5; margin-block: 20px 26px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 10px 17px; text-decoration: none; font-weight: 700; }
.button-gold { background: var(--gold); color: #211a11; }
.button-gold:hover { background: #f0ce98; }
.hero-byline { display: flex; flex-wrap: wrap; gap: 5px 18px; color: #ede0c9; font-size: .86rem; margin-top: 24px; }
.story-copy { padding-bottom: clamp(24px, 7vw, 110px); }
.chapter {
  position: relative;
  display: grid;
  align-items: center;
  min-height: min(82svh, 840px);
  padding: clamp(90px, 14svh, 190px) var(--gutter);
  scroll-margin-top: var(--header-height);
}
.chapter-inner {
  width: min(100%, 590px, 51vw);
  background: #f3efe5f2;
  padding: clamp(24px, 4vw, 58px);
  border: 1px solid #c0a3748a;
  border-top: 2px solid #ad8449;
  box-shadow: 0 24px 62px #0b100d63;
}
.chapter[data-side="right"] .chapter-inner { justify-self: end; }
@media (prefers-reduced-motion: reduce) {
  .chapter-inner { transform: none !important; }
}
.chapter.intro { min-height: min(78svh, 790px); }
.chapter h2 { font: 500 clamp(1.85rem, 3.3vw, 3.2rem)/1.12 var(--serif); letter-spacing: -.04em; text-wrap: balance; margin-bottom: 22px; }
.chapter-number { color: var(--gold-ink); }
.chapter p, .chapter li { font-size: clamp(1rem, 1.2vw, 1.13rem); line-height: 1.65; }
.chapter p + p, .chapter p + .view-cue, .view-cue + .view-cue { margin-top: 16px; }
.chapter strong { font-weight: 700; }
.chapter ul { margin: 17px 0; padding: 0; list-style: none; }
.chapter ul li { padding-block: 9px; }
.marked-list li { padding-left: 22px; position: relative; }
.marked-list li::before { content: ''; position: absolute; left: 0; top: 22px; width: 7px; height: 2px; background: #9a7034; }
.questions li + li, .schedule li + li { border-top: 1px solid var(--rule); }
.questions strong, .schedule strong { display: block; }
.zone-note { border-left: 2px solid #a67635; padding: 11px 0 11px 15px; }
.zone-note strong { display: block; }
@media (max-width: 760px) {
  :root { --header-height: 58px; --mobile-view-height: min(34svh, 300px); }
  .wordmark { font-size: .76rem; }
  .masthead nav { font-size: .8rem; }
  .world-image { object-position: 56% center; transform-origin: 56% center; }
  .world-views::after { background: linear-gradient(0deg, #11150fe8 0%, #11150f9e 37%, #11150f18 86%); }
  .world-caption {
    top: 10px;
    bottom: auto;
    right: 10px;
    left: 10px;
    padding: 5px 10px;
  }
  .world-caption strong { font-size: .81rem; }
  .world-caption div > span { font-size: .6rem; letter-spacing: .04em; }
  .world-caption a { min-height: 44px; font-size: .76rem; }
  .journey.is-reading .world { z-index: 2; background: transparent; pointer-events: none; }
  .journey.is-reading .world-views {
    height: var(--mobile-view-height);
    box-shadow: 0 10px 23px #11150f50;
  }
  .journey.is-reading .world-views::after {
    background: linear-gradient(180deg, #11150f65, transparent 45%, #11150f14);
  }
  .journey.is-reading .world-caption a { pointer-events: auto; }
  .hero { align-items: end; padding-top: 145px; padding-bottom: clamp(28px, 6svh, 70px); }
  .hero h1 { max-width: 530px; }
  .hero-logo { width: 140px; margin-bottom: 17px; }
  .hero-byline { font-size: .8rem; }
  .chapter {
    min-height: auto;
    align-items: start;
    padding: 24px 14px 30px;
    scroll-margin-top: calc(var(--header-height) + var(--mobile-view-height));
  }
  .chapter.intro {
    min-height: auto;
    padding-top: calc(var(--mobile-view-height) + 20px);
    scroll-margin-top: var(--header-height);
  }
  .chapter-inner { width: 100%; background: var(--paper); }
}
@media (max-width: 360px) {
  .hero h1 { font-size: 2.7rem; }
}
