:root {
  color-scheme: light;
  --paper: #f8f6f0;
  --ink: #242a27;
  --muted: #525b53;
  --line: #d6d9ce;
  --green: #265446;
  --deep: #172a2a;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: system-ui, -apple-system, 'Segoe UI', sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); font: 1rem/1.65 var(--sans); background: var(--paper); }
img { display: block; width: 100%; height: auto; }
figure, h1, h2, h3, p { margin: 0; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #a86532; outline-offset: 5px; }
section[id] { scroll-margin-top: 1.25rem; }
.shell { width: min(100% - clamp(2rem, 9vw, 8rem), 72rem); margin-inline: auto; }
.skip { position: absolute; top: .5rem; left: .5rem; z-index: 5; transform: translateY(-200%); padding: .5rem 1rem; background: white; }
.skip:focus { transform: none; }
.header-inner, .footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; }
.header-inner { min-height: 4.6rem; padding-block: .75rem; }
.wordmark { font: 700 1.65rem/1.1 var(--serif); letter-spacing: -.05em; text-decoration: none; }
.wordmark span { color: #4c6c60; }
nav { display: flex; flex-wrap: wrap; gap: .5rem clamp(.85rem, 3.2vw, 2.6rem); }
nav a { font-size: .92rem; font-weight: 600; text-decoration: none; }
nav a:hover, .footer-top:hover { text-decoration: underline; text-underline-offset: .25em; }

.hero { position: relative; isolation: isolate; overflow: hidden; background: #1c292d; color: #fff9ec; }
.hero-art {
  position: absolute; z-index: -1; inset: 0 0 0 31%;
  background: linear-gradient(90deg, #1c292d 0%, #1c292d 4%, rgba(28,41,45,.76) 24%, rgba(28,41,45,.15) 57%, transparent 77%),
              url('assets/lake-dusk.webp') center 54% / cover no-repeat;
}
.hero-inner { min-height: clamp(30rem, 47vw, 42rem); display: grid; align-content: center; justify-items: start; padding-block: 4rem; }
.hero-name { text-transform: uppercase; letter-spacing: .19em; color: #f1cfba; font-size: .84rem; font-weight: 650; margin-bottom: 1.2rem; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; }
h1 { font-size: clamp(3rem, 7.1vw, 6.6rem); line-height: .99; letter-spacing: -.065em; }
h1 em { color: #efc8b3; font-weight: inherit; }
.hero-inner > p:not(.hero-name) { max-width: 28rem; margin-block: 1.55rem 1.8rem; color: #f3ede3; font-size: 1.075rem; }
.button { display: inline-flex; align-items: center; min-height: 2.85rem; border-radius: .25rem; padding: .65rem 1.05rem; text-decoration: none; font-weight: 650; font-size: .93rem; }
.button-light { background: #f5e5d3; color: #1b2926; }
.button-light:hover { background: #fff7eb; }
.button-dark { background: var(--green); color: white; }
.button-dark:hover { background: var(--deep); }

.lab, .family { padding-block: clamp(3.4rem, 7vw, 6.2rem); }
.section-intro { display: grid; grid-template-columns: 1.5fr 1fr; align-items: end; gap: .8rem 2.8rem; margin-bottom: 1.65rem; }
.section-label { color: var(--green); margin-bottom: .65rem; font-size: .86rem; text-transform: uppercase; letter-spacing: .14em; font-weight: 750; }
h2 { font-size: clamp(2.15rem, 4.4vw, 4rem); line-height: 1.06; letter-spacing: -.055em; }
.section-intro > p, .feature-copy > p:not(.section-label), .family-intro > div > p:not(.section-label) { color: var(--muted); max-width: 37rem; }
.lab-card { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(1rem, 4vw, 3rem); align-items: center; }
.lab-card-copy > p:not(.section-label) { color: var(--muted); margin-block: 1rem 1.2rem; }
.lab-slideshow { margin: 0; min-width: 0; }
.lab-slideshow img { aspect-ratio: 1920 / 1088; object-fit: contain; border-radius: .35rem; background: #1b292c; }
.lab-controls { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem; min-height: 1.8rem; }
.text-button { color: var(--green); background: transparent; border: 0; padding: .2rem 0; text-decoration: underline; text-underline-offset: .2em; }
.lab-page h1 { font-size: clamp(2.5rem, 6vw, 5rem); }
@media (max-width: 45rem) { .lab-card { grid-template-columns: 1fr; } }
.workshop { background: #e8eee7; border-block: 1px solid #dce4db; padding-block: clamp(2.8rem, 6vw, 5.25rem); }
.feature, .family-intro { display: grid; align-items: center; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.4rem, 5vw, 5.5rem); }
.feature figure img, .family-intro figure img { width: 100%; max-height: 34rem; object-fit: contain; border-radius: .35rem; background: #ece5d8; }
figcaption { font-size: .86rem; color: var(--muted); margin-top: .45rem; }
.feature-copy > p:not(.section-label), .family-intro > div > p:not(.section-label) { margin-top: 1rem; }
.steps { display: flex; flex-wrap: wrap; gap: .45rem; margin: 1.45rem 0 0; padding: 0; list-style: none; }
.steps li { border: 1px solid #a9b8ac; border-radius: 2rem; padding: .28rem .75rem; font-size: .9rem; color: #29493c; }
.rain-history {
  --rain-male: #a7c4fa;
  --rain-female: #f4accc;
  --rain-event: #ffd1a5;
  margin-block: 2.25rem 1.5rem;
  padding: clamp(1rem, 3vw, 2rem);
  border-radius: .5rem;
  background: #1b292c;
  color: #f8f6ee;
}
.rain-title { font-size: clamp(1.65rem, 4vw, 2.55rem); line-height: 1.12; }
.rain-key {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem 1.2rem;
  list-style: none;
  margin: .8rem 0 .3rem;
  padding: 0;
  font-size: .9rem;
}
.rain-key li { display: flex; align-items: center; gap: .5rem; }
.rain-key li::before { content: ''; width: .85rem; height: 2px; background: currentColor; }
.rain-key-male { color: var(--rain-male); }
.rain-key-female { color: var(--rain-female); }
.rain-key .rain-key-birth::before {
  width: .65rem;
  height: .65rem;
  border: 2px solid;
  border-radius: 50%;
  background: transparent;
}
.rain-key .rain-key-death::before {
  height: .55rem;
  border-bottom: 2px solid;
  background: linear-gradient(currentColor, currentColor) center / 2px 100% no-repeat;
}
.chart-note { color: #c8d5d2; font-size: .9rem; }
.rain-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: clamp(1.25rem, 3vw, 2.25rem);
  margin-top: 1.3rem;
}
.chart-scroll { overflow-x: auto; }
.family-chart { display: block; width: 100%; min-width: 32rem; max-width: 38rem; margin-inline: auto; }
.chart-line { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
circle.chart-line { fill: #1b292c; }
.chart-male { color: var(--rain-male); }
.chart-female { color: var(--rain-female); }
.chart-junction { color: #f5f1e8; }
.chart-label { font: 600 16px var(--sans); fill: #f8f6ee; }
.chart-year { font: 500 14px var(--sans); fill: currentColor; }
.chart-events h4 { margin: 0 0 .6rem; font: 400 1.45rem/1.2 var(--serif); }
.rain-timeline { list-style: none; padding: 0; margin: 0; }
.rain-copy { padding: 0; border-top: 1px solid #acccc24d; }
.history-event summary { padding-block: .45rem; cursor: pointer; font-weight: 600; line-height: 1.35; }
.history-event summary > .rain-date { margin-inline: .25rem .45rem; }
.rain-date { color: var(--rain-event); font-weight: 650; white-space: nowrap; }
.history-event > p { margin: 0 0 .65rem 1.1rem; color: #e1ece8; }
.history-event > .history-sources { color: #bedad5; font-size: .875rem; }
.history-sources a { text-underline-offset: .17em; }
.chart-transcript { margin-top: .85rem; }
.chart-transcript summary { cursor: pointer; color: #cde7e1; }
.chart-transcript li + li { margin-top: .35rem; }
@media (max-width: 58rem) { .rain-layout { grid-template-columns: 1fr; } }

.site-footer { background: var(--deep); color: #f7efe2; }
.footer-inner { min-height: 5rem; padding-block: 1.2rem; }
.site-footer .wordmark span { color: #c4d6c7; }
.footer-inner p, .footer-top { font-size: .9rem; }

@media (max-width: 45rem) {
  .hero-art {
    inset: 0;
    background: linear-gradient(90deg, rgba(19,29,34,.9), rgba(19,29,34,.69) 60%, rgba(19,29,34,.42)),
                url('assets/lake-dusk.webp') center 55% / cover no-repeat;
  }
  .hero-inner { min-height: 30rem; }
  .section-intro, .feature, .family-intro { grid-template-columns: 1fr; }
  .feature-copy { order: -1; }
}
@media (max-width: 28rem) {
  .header-inner { justify-content: center; gap: .65rem; }
  nav { justify-content: center; }
  .header-inner > .wordmark { text-align: center; width: 100%; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
