:root {
  --bg: #faf8f5;
  --fg: #1c1917;
  --muted: #6b645d;
  --line: #e7e2db;
  --accent: #6b2f86;
  --accent-fg: #fff;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14110f;
    --fg: #f3efe9;
    --muted: #a39b91;
    --line: #2c2723;
    --accent: #d4aaec;
    --accent-fg: #14110f;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 1.0625rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration-color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.wrap { max-width: 44rem; margin-inline: auto; padding-inline: 1.25rem; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--bg); padding: .5rem 1rem; z-index: 10; }

.top { display: flex; justify-content: space-between; align-items: center; padding-block: 1.5rem; }
.mark {
  font: 700 1rem var(--serif); letter-spacing: .08em; text-decoration: none;
  border: 1.5px solid var(--fg); border-radius: 50%; width: 2.5rem; height: 2.5rem;
  display: grid; place-items: center;
}
.top nav { display: flex; gap: 1.5rem; font-size: .95rem; }
.top nav a { text-decoration: none; color: var(--muted); }
.top nav a:hover { color: var(--accent); }

.hero { padding-block: clamp(3rem, 12vw, 7rem) 3rem; }
.eyebrow { font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 1.25rem; }
h1 {
  font: 500 clamp(2.1rem, 6.5vw, 3.5rem)/1.1 var(--serif);
  letter-spacing: -.02em; margin: 0 0 1.5rem; text-wrap: balance;
}
h1 em { color: var(--accent); font-style: italic; }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 36rem; margin: 0 0 2rem; }

.cta { display: flex; gap: .75rem; flex-wrap: wrap; margin: 0; }
.btn {
  display: inline-block; padding: .7rem 1.25rem; border-radius: 999px; text-decoration: none;
  background: var(--accent); color: var(--accent-fg); font-weight: 600; font-size: .95rem;
  border: 1.5px solid var(--accent); transition: transform .15s;
}
.btn:hover { color: var(--accent-fg); transform: translateY(-1px); }
.btn.ghost { background: none; color: var(--fg); border-color: var(--line); }
.btn.ghost:hover { color: var(--accent); border-color: var(--accent); }

.block { padding-block: 3rem; border-top: 1px solid var(--line); }
h2 { font: 600 .85rem var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 1.5rem; }
.prose p { margin: 0 0 1rem; max-width: 36rem; }
p.prose { max-width: 36rem; margin: 0 0 1rem; }

.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 2rem; }
.timeline li { display: grid; grid-template-columns: 8rem 1fr; gap: 1rem; }
.when { color: var(--muted); font-size: .9rem; padding-top: .3rem; font-variant-numeric: tabular-nums; }
.timeline h3 { font: 500 1.25rem/1.3 var(--serif); margin: 0 0 .25rem; }
.timeline .at { color: var(--accent); }
.timeline p { margin: 0; color: var(--muted); }
@media (max-width: 34rem) { .timeline li { grid-template-columns: 1fr; gap: .25rem; } }

.links { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }

.foot { padding-block: 3rem; color: var(--muted); font-size: .9rem; border-top: 1px solid var(--line); }
.foot p { margin: 0; }

/* Motion: CSS only, off for reduced-motion users. */
@media (prefers-reduced-motion: no-preference) {
  @keyframes rise { from { opacity: 0; transform: translateY(18px); } }
  @keyframes draw { to { background-size: 100% 2px; } }

  /* Hero: staggered load-in */
  .top, .hero > * { animation: rise .8s cubic-bezier(.2, .7, .2, 1) backwards; }
  .hero > :nth-child(1) { animation-delay: .10s; }
  .hero > :nth-child(2) { animation-delay: .22s; }
  .hero > :nth-child(3) { animation-delay: .36s; }
  .hero > :nth-child(4) { animation-delay: .48s; }

  /* Accent word gets an underline that draws itself */
  h1 em {
    background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 2px no-repeat;
    animation: draw .9s .9s cubic-bezier(.2, .7, .2, 1) forwards;
  }

  /* Hover polish */
  .links a, .top nav a { transition: color .2s; }
  .btn { transition: transform .2s, color .2s, border-color .2s; }
  .btn:active { transform: translateY(0) scale(.97); }

  /* Scroll reveal (Chromium/Safari 26+); other browsers just show content */
  @supports (animation-timeline: view()) {
    .block h2, .prose, .timeline li, .links li {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 45%;
    }
  }
}
