:root {
  --cream: #fff6e2;
  --gold: #f2c66d;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", "URW Palladio L", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --soil: #2b1b14;
  --sky: linear-gradient(#070b22, #111c48 30%, #2b3f7a 58%, #7a7fae 84%, #e3c1c4);
}
html[data-season="spring"] { --sky: linear-gradient(#1f2a5c, #4a4f96 30%, #b987b0 58%, #f7b99b 82%, #ffe3bd); }
html[data-season="summer"] { --sky: linear-gradient(#0f2444, #24507a 30%, #6d8fa3 58%, #f0b46a 82%, #ffe19a); }
html[data-season="autumn"] { --sky: linear-gradient(#1d1438, #4b2a5a 30%, #a5486a 58%, #ee8349 82%, #ffcf7a); }

* { box-sizing: border-box; }
html { background: #060509; -webkit-text-size-adjust: 100%; }
html.motion { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--cream);
  font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
canvas { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; }
.js canvas { opacity: 0; }
.js canvas.ready { opacity: 1; }
html.still canvas { transition: none; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  height: var(--hero-h, 100svh);
  min-height: 540px;
  overflow: hidden;
  background:
    linear-gradient(to bottom, transparent 0, transparent 86%, var(--soil) 86%, #150e0c 100%),
    var(--sky);
}
.masthead {
  position: absolute; left: 0; right: 0; top: 0; z-index: 3;
  padding: 20px 20px 0;
  padding: 28px 20px 0;
  padding: clamp(20px, 3.4vh, 40px) 20px 0;
  text-align: center;
  pointer-events: none;
}
.eyebrow {
  margin: 0 0 8px;
  margin: 0 0 12px;
  margin: 0 0 clamp(8px, 1.4vh, 16px);
  font: 600 13px/1 var(--sans);
  letter-spacing: .34em;
  text-indent: .34em;
  text-transform: uppercase;
  color: rgba(255, 238, 205, .88);
  text-shadow: 0 1px 10px rgba(0, 0, 20, .6);
}
h1 {
  margin: 0;
  font-weight: 500;
  font-size: 56px;
  font-size: 68px;
  font-size: clamp(56px, 7.4vw, 112px);
  line-height: .96;
  letter-spacing: -.012em;
  color: var(--cream);
  background: linear-gradient(180deg, #fffdf6 20%, #ffe9bd 62%, #f1c27a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 3px 18px rgba(8, 6, 30, .55));
  padding-bottom: .08em;
}
h1 .the { font-style: italic; font-weight: 400; font-size: .56em; letter-spacing: 0; margin-right: .1em; }
.tagline {
  margin: 4px 0 0;
  margin: 8px 0 0;
  margin: clamp(4px, 1vh, 12px) 0 0;
  font-style: italic;
  font-size: 17px;
  font-size: 19px;
  font-size: clamp(17px, 1.55vw, 23px);
  color: rgba(255, 246, 226, .95);
  text-shadow: 0 1px 12px rgba(0, 0, 25, .75), 0 0 2px rgba(0, 0, 25, .5);
}

#hit { position: absolute; z-index: 2; overflow: visible; touch-action: pan-y; outline: none; -webkit-tap-highlight-color: transparent; }
#hit polygon { fill: transparent; stroke: none; cursor: pointer; outline: none; }
#tree-label {
  position: absolute; z-index: 4; left: 0; top: 0;
  transform: translate(-50%, -100%);
  padding: 9px 16px 10px;
  border-radius: 999px;
  font: 600 16px/1 var(--sans);
  letter-spacing: .02em;
  white-space: nowrap;
  color: #2a1806;
  background: linear-gradient(180deg, #fff3cf, #f3c873);
  box-shadow: 0 6px 22px rgba(0, 0, 0, .4), 0 0 26px rgba(255, 196, 96, .45);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}
#tree-label.on { opacity: 1; }

/* ---------- season switch ---------- */
.seasons {
  position: absolute; z-index: 6; top: 18px; right: 20px;
  display: flex; padding: 3px;
  border-radius: 999px;
  background: rgba(10, 10, 30, .34);
  border: 1px solid rgba(255, 240, 210, .2);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.seasons button {
  min-height: 38px; padding: 0 13px;
  border: 0; border-radius: 999px; background: transparent;
  font: 600 12px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase;
  color: rgba(255, 244, 222, .82);
  cursor: pointer;
}
.seasons button:hover { color: #fff; }
.seasons button[aria-pressed="true"] { background: rgba(255, 233, 180, .92); color: #2a1806; }

/* ---------- buttons ---------- */
.cta-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: flex; flex-direction: column; align-items: center;
  padding: 34px 14px calc(12px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to top, rgba(6, 4, 7, .86), rgba(6, 4, 7, .55) 55%, rgba(6, 4, 7, 0));
  pointer-events: none;
}
.cta-row { display: flex; justify-content: center; width: 100%; max-width: 560px; }
.cta-row > * + * { margin-left: 12px; }
.cta {
  pointer-events: auto;
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 58px; padding: 0 30px;
  border-radius: 999px;
  font: 700 18px/1.1 var(--sans);
  text-decoration: none; text-align: center;
  transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease;
}
.cta-primary {
  flex: 1 1 56%;
  color: #2a1806;
  background: linear-gradient(180deg, #fff0bd, #f4c462 55%, #dd9d3a);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .45), 0 2px 0 #96641a, 0 10px 34px rgba(245, 170, 70, .42);
}
.cta-secondary {
  flex: 1 1 44%;
  color: var(--cream);
  background: rgba(24, 16, 14, .62);
  box-shadow: inset 0 0 0 1.5px rgba(255, 226, 160, .7);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.cta:hover { transform: translateY(-2px); }
.cta-primary:hover { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .6), 0 2px 0 #96641a, 0 14px 44px rgba(255, 190, 90, .62); }
.cta-secondary:hover { background: rgba(60, 40, 24, .72); }
a:focus-visible, button:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.cue {
  pointer-events: auto;
  font: 600 12px/1 var(--sans); letter-spacing: .22em; text-transform: uppercase; text-decoration: none;
  color: rgba(255, 236, 200, .78);
  padding: 6px 10px; margin-top: 8px;
  transition: opacity .4s ease;
}
.scrolled .cue { opacity: 0; pointer-events: none; }
html.motion .cue span { display: inline-block; animation: nudge 1.8s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateY(4px); } }

/* ---------- underground ---------- */
.under {
  position: relative;
  min-height: 1300px;
  height: var(--under-h, auto);
  background: linear-gradient(#150e0c, #0d090b 45%, #060509);
  overflow: hidden;
}
.verse {
  position: absolute; left: 0; right: 0; top: var(--verse-y, 300px); z-index: 2;
  margin: 0; padding: 0 20px;
  display: flex; justify-content: center;
  font-style: italic; font-size: 20px; font-size: clamp(20px, 2.1vw, 30px);
  color: rgba(255, 238, 208, .94);
  text-shadow: 0 2px 16px #000, 0 0 4px #000;
  transform: translateY(-50%);
}
.verse span { flex: 0 1 auto; }
.verse span + span { margin-left: 70px; margin-left: clamp(70px, 9vw, 130px); }
.portrait {
  position: absolute; z-index: 2; margin: 0;
  left: 50%; top: var(--franz-y, 600px);
  width: var(--franz-w, 132px);
  transform: translate(-50%, -50%);
}
.portrait-frame {
  display: block; position: relative; overflow: hidden;
  width: 100%; padding-bottom: 124%;
  border-radius: 50%;
  background: #cbb48c;
  box-shadow: 0 0 0 3px #f1c877, 0 0 0 5px rgba(60, 34, 10, .9), 0 0 0 6.5px rgba(241, 200, 119, .55), 0 0 60px 8px rgba(255, 170, 70, .5);
}
.portrait img {
  position: absolute; left: -37%; top: -19%; width: 172%; height: auto;
  filter: sepia(.8) contrast(1.1) brightness(.9) saturate(.9);
}
.portrait-frame::after {
  content: ""; position: absolute; left: 0; top: 0; right: 0; bottom: 0; border-radius: 50%;
  box-shadow: inset 0 0 22px 6px rgba(52, 26, 6, .55);
}
.ancestors {
  position: absolute; left: 0; right: 0; top: var(--anc-y, 700px); z-index: 2;
  padding: 0 22px; text-align: center;
  text-shadow: 0 2px 14px #000;
}
.kicker {
  margin: 0 0 12px;
  font: 600 12.5px/1 var(--sans); letter-spacing: .32em; text-indent: .32em; text-transform: uppercase;
  color: var(--gold);
}
h2 { margin: 0; font-weight: 500; font-size: 30px; font-size: clamp(30px, 3.8vw, 54px); line-height: 1.08; color: #fff8e8; }
.dates { margin: 10px 0 0; font: 500 15px/1.3 var(--sans); letter-spacing: .16em; color: rgba(255, 234, 196, .85); }
.story { max-width: 34em; margin: 18px auto 0; font-size: 18px; font-size: clamp(18px, 1.5vw, 21px); line-height: 1.55; color: rgba(255, 244, 226, .92); }
.wives { display: flex; justify-content: center; align-items: center; margin-top: 26px; }
.wives > * + * { margin-left: 18px; margin-left: clamp(18px, 4vw, 48px); }
.wives p { margin: 0; }
.wives .name { display: block; font-size: 21px; font-size: clamp(21px, 2vw, 27px); color: #fff3d8; }
.wives .dates { display: block; margin-top: 6px; font-size: 13.5px; }
.wives .amp { font-style: italic; font-size: 30px; color: var(--gold); }
.colophon { max-width: 40em; margin: 34px auto 0; font: 400 14px/1.6 var(--sans); color: rgba(255, 236, 205, .62); }

/* ---------- small screens ---------- */
@media (max-width: 899px) {
  .seasons { right: auto; left: 50%; top: 10px; transform: translateX(-50%); }
  .masthead { padding-top: 66px; }
}
@media (max-width: 719px) {
  h1 { font-size: 46px; font-size: clamp(46px, 15.4vw, 76px); }
  h1 .the { display: block; font-size: .46em; margin: 0 0 .04em; }
  .eyebrow { font-size: 12px; letter-spacing: .26em; text-indent: .26em; }
  .tagline { font-size: 17px; max-width: 16em; margin-left: auto; margin-right: auto; line-height: 1.3; }
  .seasons button { min-height: 44px; padding: 0 11px; font-size: 11.5px; letter-spacing: .08em; }
  .cta { min-height: 56px; padding: 0 14px; font-size: 16.5px; }
  .cta-row > * + * { margin-left: 10px; }
  .verse span + span { margin: 6px 0 0; }
  .verse { flex-direction: column; text-align: center; padding: 26px 20px; background: radial-gradient(closest-side, rgba(12, 8, 8, .82), rgba(12, 8, 8, .5) 60%, rgba(12, 8, 8, 0)); }
  .wives > * + * { margin-left: 14px; }
}
@media (max-height: 460px) {
  .cta-bar { padding-top: 14px; }
  .cue { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
html.still * { animation: none !important; transition: none !important; }
