:root {
  --forest: #16211c;
  --paper: #f2eee5;
  --ink: #1d241f;
  --muted: #686f68;
  --honey: #bf8435;
  --honey-light: #e6c186;
  --line: rgba(29, 36, 31, .16);
  --light-line: rgba(242, 238, 229, .22);
  --hero-image: none;
  --hero-position: center;
  --sans: "Avenir Next", Avenir, "Segoe UI", sans-serif;
  --display: Optima, Candara, "Avenir Next", sans-serif;
  --quote: "Iowan Old Style", Baskerville, Georgia, serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--sans); font-size: 16px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
body.modal-open { overflow: hidden; }
a { color: inherit; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 100; padding: 10px 14px; color: var(--forest); background: var(--paper); border-radius: 4px; }
.skip-link:focus { top: 16px; }
.site-header { position: fixed; inset: 0 0 auto; z-index: 30; display: flex; align-items: center; justify-content: space-between; min-height: 72px; padding: 0 36px; color: var(--paper); border-bottom: 1px solid transparent; transition: background .35s ease, border-color .35s ease; }
.site-header.scrolled { background: color-mix(in srgb, var(--forest) 94%, transparent); border-bottom-color: var(--light-line); backdrop-filter: blur(14px); }
.brand { display: inline-flex; align-items: baseline; gap: 10px; text-decoration: none; font-family: var(--display); font-size: 18px; letter-spacing: .02em; }
.brand span { font-family: var(--sans); font-size: 10px; font-weight: 600; letter-spacing: .13em; text-transform: uppercase; opacity: .58; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.text-button { padding: 10px 0; color: inherit; background: transparent; border: 0; font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.demo-label { padding: 7px 9px; border: 1px solid rgba(242, 238, 229, .3); border-radius: 4px; font-size: 9px; font-weight: 600; letter-spacing: .11em; text-transform: uppercase; opacity: .72; }
.hero { position: relative; min-height: 100svh; display: grid; align-items: end; overflow: hidden; color: var(--paper); background: var(--forest); }
.hero-image { position: absolute; inset: 0 0 0 38%; background-image: linear-gradient(90deg, var(--forest) 0%, color-mix(in srgb, var(--forest) 84%, transparent) 12%, transparent 55%), linear-gradient(0deg, color-mix(in srgb, var(--forest) 58%, transparent) 0%, transparent 45%), var(--hero-image); background-size: cover; background-position: var(--hero-position); transform: scale(1.02); animation: settle 1.6s cubic-bezier(.22, .75, .22, 1) both; }
.hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, color-mix(in srgb, var(--forest) 12%, transparent), transparent 38%, color-mix(in srgb, var(--forest) 22%, transparent)); }
.hero-person { position: absolute; z-index: 2; right: 6vw; bottom: 7vh; width: clamp(150px, 18vw, 260px); aspect-ratio: 1; overflow: hidden; border: 1px solid rgba(242, 238, 229, .45); border-radius: 4px; box-shadow: 0 22px 70px rgba(0, 0, 0, .28); }
.hero-person img { width: 100%; height: 100%; display: block; object-fit: cover; }
.hero-content { position: relative; z-index: 3; width: min(760px, 65vw); padding: 148px 5vw 8vh; }
.overline { display: block; margin-bottom: 22px; color: var(--honey-light); font-size: 11px; font-weight: 600; letter-spacing: .17em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 9ch; margin-bottom: 22px; font-family: var(--display); font-size: clamp(64px, 10vw, 142px); font-weight: 400; letter-spacing: -.055em; line-height: .86; }
.hero-years { margin-bottom: 28px; color: rgba(242, 238, 229, .68); font-size: 15px; font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.hero-essence { max-width: 560px; margin-bottom: 38px; font-family: var(--quote); font-size: clamp(22px, 2.25vw, 35px); line-height: 1.32; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.primary-action, .secondary-action { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; padding: 0 19px; border-radius: 5px; text-decoration: none; font-size: 13px; font-weight: 600; transition: background .25s ease, border-color .25s ease; }
.primary-action { color: #22180b; background: var(--honey-light); border: 1px solid var(--honey-light); }
.primary-action:hover { filter: brightness(1.06); }
.secondary-action { color: var(--paper); background: rgba(242, 238, 229, .05); border: 1px solid rgba(242, 238, 229, .38); }
.secondary-action:hover { background: rgba(242, 238, 229, .12); }
.scroll-cue { position: absolute; z-index: 3; right: 36px; bottom: 34px; display: flex; align-items: center; gap: 12px; color: rgba(242, 238, 229, .55); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; writing-mode: vertical-rl; }
.scroll-cue::after { content: ""; width: 1px; height: 52px; background: rgba(242, 238, 229, .35); }
.story-layout { position: relative; display: grid; grid-template-columns: 260px minmax(0, 1fr); }
.timeline-rail { position: sticky; top: 0; align-self: start; height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: 88px 34px 40px; background: var(--paper); border-right: 1px solid var(--line); }
.rail-title { margin-bottom: 30px; color: var(--muted); font-size: 10px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.rail-track { position: relative; display: grid; gap: 3px; }
.rail-track::before { content: ""; position: absolute; left: 4px; top: 15px; bottom: 15px; width: 1px; background: var(--line); }
.rail-progress { position: absolute; z-index: 1; left: 4px; top: 15px; width: 1px; height: 0; background: var(--honey); transition: height .4s ease; }
.rail-link { position: relative; z-index: 2; display: grid; grid-template-columns: 21px 1fr; gap: 11px; align-items: center; min-height: 56px; color: var(--muted); text-decoration: none; transition: color .25s ease; }
.rail-dot { width: 9px; height: 9px; border: 1px solid #9c9e98; border-radius: 50%; background: var(--paper); transition: background .25s ease, border-color .25s ease, transform .25s ease; }
.rail-link small { display: block; font-size: 10px; font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.rail-link span:last-child { font-size: 13px; font-weight: 500; }
.rail-link.active { color: var(--ink); }
.rail-link.active .rail-dot { background: var(--honey); border-color: var(--honey); transform: scale(1.25); }
.rail-note { margin: 34px 0 0 32px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.chapters { min-width: 0; }
.chapter { min-height: 100svh; display: grid; grid-template-columns: minmax(310px, .88fr) minmax(420px, 1.12fr); border-bottom: 1px solid var(--line); scroll-margin-top: 0; }
.chapter:nth-child(even) .chapter-media { order: 2; }
.chapter:nth-child(even) .chapter-copy { order: 1; }
.chapter-media { position: relative; min-height: 70svh; overflow: hidden; background-color: #a59c8a; background-image: var(--scene-image); background-size: var(--scene-size, cover); background-position: var(--scene-position, center); background-repeat: no-repeat; filter: saturate(.84) contrast(.97); }
.chapter-media.media-mosaic { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 3px; background: var(--forest); filter: saturate(.88) contrast(.98); }
.media-mosaic img { width: 100%; height: 100%; min-height: 0; display: block; object-fit: cover; }
.chapter-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 62%, rgba(17, 23, 19, .24)); pointer-events: none; }
.media-caption { position: absolute; z-index: 2; right: 24px; bottom: 20px; left: 24px; margin: 0; color: rgba(255, 255, 255, .82); font-size: 11px; letter-spacing: .02em; text-shadow: 0 1px 12px rgba(0, 0, 0, .48); }
.chapter-copy { display: flex; flex-direction: column; justify-content: center; padding: clamp(64px, 8vw, 130px) clamp(40px, 7vw, 112px); background: var(--paper); }
.chapter-time { display: flex; align-items: baseline; gap: 12px; margin-bottom: 28px; color: var(--honey); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.chapter-time strong { font-family: var(--display); font-size: clamp(44px, 5vw, 72px); font-weight: 400; letter-spacing: -.045em; line-height: .9; }
.chapter h2 { max-width: 11ch; margin-bottom: 28px; font-family: var(--display); font-size: clamp(40px, 5vw, 74px); font-weight: 400; letter-spacing: -.045em; line-height: 1.02; }
.chapter-copy > div > p:not(.chapter-time) { max-width: 54ch; margin-bottom: 18px; color: color-mix(in srgb, var(--ink) 84%, white); font-size: clamp(16px, 1.35vw, 19px); line-height: 1.75; }
.human-detail { display: grid; grid-template-columns: 44px 1fr; gap: 17px; max-width: 510px; margin: 26px 0 0; padding-top: 22px; border-top: 1px solid var(--line); }
blockquote.human-detail { margin-left: 0; margin-right: 0; }
.detail-mark { color: var(--honey); font-family: var(--display); font-size: 31px; line-height: 1; }
.human-detail p { margin: 0; font-family: var(--quote); font-size: 19px; line-height: 1.5; }
.human-detail cite { display: block; margin-top: 8px; color: var(--muted); font-family: var(--sans); font-size: 11px; font-style: normal; }
.memory-trigger { align-self: flex-start; margin-top: 34px; padding: 0 0 7px; color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid var(--honey); font-size: 12px; font-weight: 600; }
.memory-trigger:hover { color: var(--honey); }
.closing { position: relative; min-height: 100svh; display: grid; place-items: center; overflow: hidden; padding: 100px 24px; color: var(--paper); text-align: center; background: var(--forest); }
.closing::before { content: ""; position: absolute; width: min(680px, 90vw); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--honey) 16%, transparent), transparent 66%); opacity: .8; }
.closing-content { position: relative; z-index: 2; max-width: 760px; }
.closing .overline { margin-bottom: 26px; }
.closing h2 { margin-bottom: 25px; font-family: var(--display); font-size: clamp(52px, 8vw, 110px); font-weight: 400; letter-spacing: -.05em; line-height: .95; }
.closing-copy { max-width: 590px; margin: 0 auto 38px; color: rgba(242, 238, 229, .76); font-family: var(--quote); font-size: clamp(19px, 2vw, 27px); line-height: 1.55; }
.flame-mark { position: relative; width: 28px; height: 44px; margin: 0 auto 25px; border-radius: 58% 42% 58% 42%; background: radial-gradient(circle at 50% 72%, #fff0c6 0 16%, var(--honey-light) 42%, var(--honey) 68%, transparent 70%); transform: rotate(7deg); filter: drop-shadow(0 0 24px color-mix(in srgb, var(--honey-light) 44%, transparent)); opacity: .28; transition: opacity .5s ease, filter .5s ease, transform .5s ease; }
.closing.lit .flame-mark { opacity: 1; filter: drop-shadow(0 0 38px color-mix(in srgb, var(--honey-light) 75%, transparent)); transform: rotate(2deg) scale(1.08); }
.candle-button { min-height: 50px; padding: 0 22px; color: #24190c; background: var(--honey-light); border: 1px solid var(--honey-light); border-radius: 5px; font-size: 13px; font-weight: 600; }
.candle-button:disabled { cursor: default; opacity: .78; }
.candle-count { margin: 18px 0 0; color: rgba(242, 238, 229, .5); font-size: 11px; }
.site-footer { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: end; padding: 42px 48px; color: var(--paper); background: color-mix(in srgb, var(--forest) 76%, black); border-top: 1px solid var(--light-line); }
.site-footer p { max-width: 630px; margin: 7px 0 0; color: rgba(242, 238, 229, .52); font-size: 11px; line-height: 1.6; }
.footer-note { text-align: right; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; opacity: .42; }
dialog { width: min(1020px, calc(100vw - 32px)); max-height: calc(100svh - 32px); padding: 0; color: var(--ink); background: var(--paper); border: 0; border-radius: 8px; box-shadow: 0 26px 100px rgba(0, 0, 0, .34); }
dialog::backdrop { background: rgba(10, 15, 12, .74); backdrop-filter: blur(8px); }
.dialog-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: 22px 28px; background: color-mix(in srgb, var(--paper) 96%, transparent); border-bottom: 1px solid var(--line); }
.dialog-title { margin: 0; font-family: var(--display); font-size: 24px; font-weight: 400; }
.close-dialog { width: 36px; height: 36px; color: var(--ink); background: transparent; border: 1px solid var(--line); border-radius: 50%; font-size: 20px; line-height: 1; }
.archive-body { padding: 40px 28px 48px; }
.archive-intro { max-width: 620px; margin-bottom: 44px; color: var(--muted); }
.archive-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 54px; }
.archive-timeline { display: grid; gap: 0; margin: 0; }
.archive-row { display: grid; grid-template-columns: 88px 1fr; gap: 18px; padding: 15px 0; border-top: 1px solid var(--line); }
.archive-row dt { color: var(--honey); font-weight: 600; font-variant-numeric: tabular-nums; }
.archive-row dd { margin: 0; color: color-mix(in srgb, var(--ink) 82%, white); }
.archive-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-content: start; }
.archive-gallery img { width: 100%; height: 100%; min-height: 150px; object-fit: cover; border-radius: 4px; }
.archive-gallery img:first-child { grid-column: 1 / -1; max-height: 360px; }
.archive-gallery.compact { grid-template-columns: repeat(3, 1fr); }
.archive-gallery.compact img:first-child { grid-column: span 2; }
.memory-dialog { width: min(600px, calc(100vw - 32px)); }
.memory-form { display: grid; gap: 18px; padding: 34px 28px 38px; }
.memory-context { margin: -4px 0 4px; color: var(--muted); font-size: 14px; }
.field { display: grid; gap: 7px; }
.field label { font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; }
.field input, .field textarea { width: 100%; padding: 12px 0; color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid #a9aaa4; border-radius: 0; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--honey); }
.submit-memory { justify-self: start; min-height: 48px; margin-top: 8px; padding: 0 20px; color: var(--paper); background: var(--forest); border: 1px solid var(--forest); border-radius: 5px; font-size: 13px; font-weight: 600; }
.form-success { margin: 0; color: #436249; font-size: 14px; }
:focus-visible { outline: 2px solid var(--honey); outline-offset: 4px; }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
@keyframes settle { from { opacity: .2; transform: scale(1.07); } to { opacity: 1; transform: scale(1.02); } }
@media (max-width: 980px) {
  .site-header { min-height: 64px; padding: 0 22px; }
  .demo-label { display: none; }
  .hero-image { inset: 0; background-image: linear-gradient(90deg, color-mix(in srgb, var(--forest) 90%, transparent), color-mix(in srgb, var(--forest) 22%, transparent) 78%), linear-gradient(0deg, color-mix(in srgb, var(--forest) 82%, transparent), transparent 62%), var(--hero-image); background-position: var(--hero-mobile-position, var(--hero-position)); }
  .hero-person { right: 24px; bottom: 28px; width: 132px; opacity: .88; }
  .hero-content { width: min(700px, 90vw); padding: 128px 28px 10vh; }
  .scroll-cue { display: none; }
  .story-layout { display: block; }
  .timeline-rail { position: sticky; top: 64px; z-index: 20; width: 100%; height: auto; display: block; padding: 0; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); scrollbar-width: none; }
  .timeline-rail::-webkit-scrollbar { display: none; }
  .rail-title, .rail-note, .rail-progress, .rail-track::before { display: none; }
  .rail-track { display: flex; gap: 0; min-width: max-content; padding: 0 18px; }
  .rail-link { grid-template-columns: auto 1fr; min-height: 52px; padding: 0 13px; gap: 8px; }
  .rail-dot { width: 7px; height: 7px; }
  .rail-link small { display: none; }
  .rail-link span:last-child { font-size: 11px; }
  .chapter { min-height: auto; grid-template-columns: 1fr; }
  .chapter:nth-child(even) .chapter-media, .chapter:nth-child(even) .chapter-copy { order: initial; }
  .chapter-media { min-height: 68svh; }
  .chapter-copy { min-height: 62svh; padding: 72px clamp(24px, 8vw, 72px) 82px; }
  .chapter h2 { max-width: 13ch; }
  .site-footer { grid-template-columns: 1fr; padding: 36px 24px; }
  .footer-note { text-align: left; }
}
@media (max-width: 640px) {
  .brand span { display: none; }
  .header-actions { gap: 4px; }
  .text-button { font-size: 10px; }
  .hero-content { width: 100%; padding: 124px 22px 66px; }
  .hero-person { display: block; top: 82px; right: 22px; bottom: auto; width: 104px; }
  h1 { font-size: clamp(58px, 20vw, 88px); }
  .hero-essence { max-width: 15em; font-size: 22px; }
  .hero-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .primary-action, .secondary-action { padding: 0 12px; font-size: 12px; }
  .chapter-media { min-height: 56svh; }
  .chapter-copy { min-height: auto; padding: 62px 24px 72px; }
  .chapter-time { margin-bottom: 21px; }
  .chapter-time strong { font-size: 47px; }
  .chapter h2 { margin-bottom: 22px; font-size: 42px; }
  .chapter-copy > div > p:not(.chapter-time) { font-size: 16px; }
  .human-detail { grid-template-columns: 34px 1fr; }
  .human-detail p { font-size: 18px; }
  .closing { padding: 90px 24px; }
  .archive-body { padding: 32px 22px 40px; }
  .archive-grid { grid-template-columns: 1fr; gap: 36px; }
  .archive-gallery, .archive-gallery.compact { grid-template-columns: 1fr; }
  .archive-gallery img:first-child, .archive-gallery.compact img:first-child { grid-column: auto; }
  .archive-row { grid-template-columns: 74px 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
