:root {
  --bg: #faf6ef;
  --bg-alt: #f3ece0;
  --surface: #fffcf7;
  --ink: #1f1b16;
  --ink-soft: #4a4238;
  --line: #e3d6c3;
  --accent: #b4532a;
  --accent-ink: #9a4220;
  --teal: #1f6f68;
  --dark: #1c1a17;
  --dark-surface: #282521;
  --dark-ink: #f4efe6;
  --dark-soft: #cfc6b8;
  --dark-accent: #f0b37e;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgb(60 40 20 / 6%), 0 8px 24px -12px rgb(60 40 20 / 18%);
  --max: 1140px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.15; margin: 0 0 .6em; letter-spacing: -0.015em; }
h1, h2 { font-family: var(--font-serif); font-weight: 700; }
h2 { font-size: clamp(1.75rem, 1.3rem + 2vw, 2.6rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: var(--accent-ink); }
svg { display: block; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem; top: -4rem;
  z-index: 100;
  padding: .7rem 1rem;
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
  transition: top .15s ease;
}
.skip-link:focus { top: 1rem; }

:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
  border-radius: 6px;
}
.section-dark :focus-visible { outline-color: var(--dark-accent); }
main:focus { outline: none; }

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
}
.narrow { max-width: 820px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(250 246 239 / 88%);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid rgb(227 214 195 / 70%);
}
.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 1.5rem;
  min-height: 4rem;
  padding-top: .5rem;
  padding-bottom: .5rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}
.brand-mark { width: 32px; height: 32px; }
.brand-4 { color: var(--accent); }
.nav-list { display: flex; flex-wrap: wrap; gap: .1rem .25rem; }
.nav-list a {
  display: block;
  padding: .45rem .6rem;
  border-radius: 8px;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: .95rem;
  font-weight: 500;
}
.nav-list a:hover { color: var(--ink); background: var(--bg-alt); }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 3rem 0 3.5rem;
  background:
    radial-gradient(60rem 30rem at 85% -10%, rgb(246 201 155 / 45%), transparent 60%),
    radial-gradient(40rem 24rem at -10% 110%, rgb(31 111 104 / 10%), transparent 60%);
}
.hero-grid { display: grid; gap: 2rem; align-items: center; }
.eyebrow {
  display: inline-block;
  margin-bottom: 1.25rem;
  padding: .3rem .8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .02em;
}
.hero h1 {
  font-size: clamp(2.4rem, 1.6rem + 4.2vw, 4.4rem);
  margin-bottom: .35em;
}
.accent { color: var(--accent); }
.hero h1 .accent { display: block; }
.tagline {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.15rem, 1rem + .6vw, 1.4rem);
  color: var(--teal);
  margin-bottom: 1.1rem;
}
.lead { color: var(--ink-soft); max-width: 40rem; }

.cta-row { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.75rem 0 1.5rem; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  min-height: 48px;
  padding: .75rem 1.35rem;
  border-radius: 999px;
  border: 2px solid transparent;
  font-weight: 650;
  font-size: 1rem;
  text-decoration: none;
  transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 6px 18px -8px rgb(180 83 42 / 70%); }
.btn-primary:hover { background: var(--accent-ink); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--ink-soft); }
.btn-light { background: var(--dark-ink); color: var(--dark); }
.btn-light:hover { background: #fff; }

.notice {
  display: flex;
  gap: .6rem;
  align-items: flex-start;
  max-width: 40rem;
  margin: 0;
  padding: .85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  border-radius: var(--radius-sm);
  font-size: .95rem;
  color: var(--ink-soft);
}
.notice-icon {
  flex: none;
  width: 20px; height: 20px;
  margin-top: .15rem;
  fill: none; stroke: var(--teal); stroke-width: 2; stroke-linecap: round;
}

.hero-art { max-width: 420px; width: 100%; margin: 0 auto; }
.hero-art svg { width: 100%; height: auto; }

/* Sections */
.section { padding: 4rem 0; }
.section-alt { background: var(--bg-alt); }
.kicker {
  margin-bottom: .5rem;
  color: var(--accent-ink);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.25rem; }
.chips li {
  padding: .4rem .85rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: .92rem;
  font-weight: 500;
}

.card-grid,
.lesson-grid,
.link-grid,
.next-grid { display: grid; gap: 1rem; margin-top: 2rem; }

.card,
.lesson {
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card p,
.lesson p { margin: 0; color: var(--ink-soft); }
.icon {
  width: 44px; height: 44px;
  margin-bottom: 1rem;
  padding: 10px;
  border-radius: 12px;
  background: rgb(31 111 104 / 10%);
  fill: none; stroke: var(--teal); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

/* Timeline */
.timeline {
  position: relative;
  margin-top: 2rem;
  padding-left: 2rem;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 7px; top: .5rem; bottom: .5rem;
  width: 2px;
  background: linear-gradient(var(--accent), var(--teal));
  border-radius: 2px;
}
.timeline li { position: relative; padding-bottom: 2rem; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: "";
  position: absolute;
  left: calc(-2rem + 1px);
  top: .35rem;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--accent);
}
.timeline .tl-today::before { border-color: var(--teal); background: var(--teal); }
.tl-year {
  margin-bottom: .15rem;
  color: var(--accent-ink);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.tl-today .tl-year { color: var(--teal); }
.timeline h3 { margin-bottom: .3rem; }
.timeline p:last-child { margin-bottom: 0; }
.timeline li > p:not(.tl-year) { color: var(--ink-soft); }

.text-link {
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.text-link:hover { text-decoration-thickness: 2px; }

/* Lessons */
.lesson-grid { counter-reset: lesson; }
.lesson { counter-increment: lesson; position: relative; }
.lesson::before {
  content: counter(lesson, decimal-leading-zero);
  display: block;
  margin-bottom: .6rem;
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

/* Link cards */
.link-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .2rem;
  height: 100%;
  padding: 1.15rem 3rem 1.15rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  text-decoration: none;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.link-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.lc-label { font-weight: 650; }
.lc-domain { color: var(--ink-soft); font-size: .88rem; }
.lc-arrow {
  position: absolute;
  right: 1.1rem; top: 50%;
  width: 20px; height: 20px;
  transform: translateY(-50%);
  fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

/* What came next (dark band) */
.section-dark {
  position: relative;
  color: var(--dark-ink);
  background:
    radial-gradient(50rem 26rem at 100% 0%, rgb(240 179 126 / 14%), transparent 60%),
    radial-gradient(40rem 22rem at 0% 100%, rgb(31 111 104 / 30%), transparent 60%),
    var(--dark);
}
.section-dark .kicker { color: var(--dark-accent); }
.next-intro { max-width: 44rem; color: var(--dark-soft); font-size: 1.1rem; }
.next-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 1.6rem;
  background: rgb(255 255 255 / 5%);
  border: 1px solid rgb(255 255 255 / 12%);
  border-radius: var(--radius);
}
.next-card h3 { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; font-size: 1.35rem; }
.next-card p { color: var(--dark-soft); flex: 1; }
.next-card .btn { margin-top: .5rem; }
.badge {
  padding: .2rem .6rem;
  border: 1px solid rgb(240 179 126 / 50%);
  border-radius: 999px;
  color: var(--dark-accent);
  font-family: var(--font);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* Founder */
.founder {
  display: grid;
  gap: 1.5rem;
  margin-top: 2rem;
  padding: 1.75rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.monogram {
  display: grid;
  place-items: center;
  width: 88px; height: 88px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #d98a4f 55%, var(--teal));
  color: #fff;
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: .02em;
  box-shadow: inset 0 0 0 4px rgb(255 255 255 / 25%);
}
.founder-name { font-size: 1.3rem; margin-bottom: .2rem; }
.founder-role { color: var(--teal); font-weight: 600; }
.founder p:not(.founder-role) { color: var(--ink-soft); }
.founder-links { display: flex; flex-wrap: wrap; gap: 1.25rem; margin-top: .5rem; }
.icon-link { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; }
.icon-sm { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Footer */
.site-footer {
  padding: 2.5rem 0;
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: .95rem;
}
.footer-inner { display: grid; gap: 1.25rem; }
.footer-inner p { margin: 0 0 .35rem; }
.copyright { font-weight: 600; color: var(--ink); }
.footer-links { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
.footer-links a {
  display: inline-block;
  padding: .5rem 0;
  color: var(--ink);
  text-underline-offset: 3px;
}

/* Reveal-on-scroll (only applied by JS to below-the-fold elements) */
.reveal.is-pending { opacity: 0; transform: translateY(14px); }
.reveal.is-visible {
  opacity: 1;
  transform: none;
  transition: opacity .6s ease, transform .6s ease;
}

/* Hero art motion */
.hero-art .orbit { transform-origin: 240px 220px; animation: spin 90s linear infinite; }
.hero-art .node { animation: float 6s ease-in-out infinite; }
.hero-art .n2 { animation-delay: -1.5s; }
.hero-art .n3 { animation-delay: -3s; }
.hero-art .n4 { animation-delay: -4.5s; }
.hero-art .n5 { animation-delay: -2.2s; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 50% { transform: translateY(-6px); } }

/* Breakpoints */
@media (min-width: 640px) {
  .container { padding: 0 2rem; }
  .card-grid,
  .link-grid,
  .lesson-grid { grid-template-columns: repeat(2, 1fr); }
  .founder { grid-template-columns: auto 1fr; align-items: start; }
  .footer-inner { grid-template-columns: 1fr auto; align-items: center; }
}

@media (min-width: 900px) {
  .hero { padding: 5rem 0 5.5rem; }
  .hero-grid { grid-template-columns: 1.25fr 1fr; gap: 3rem; }
  .hero-art { max-width: none; }
  .section { padding: 6rem 0; }
  .card-grid,
  .link-grid,
  .next-grid { grid-template-columns: repeat(3, 1fr); }
  .lesson-grid { grid-template-columns: repeat(6, 1fr); }
  .lesson { grid-column: span 2; }
  .lesson:nth-child(4) { grid-column: 2 / span 2; }
  .lesson:nth-child(5) { grid-column: 4 / span 2; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .reveal.is-pending { opacity: 1; transform: none; }
}

@media print {
  .site-header, .skip-link, .hero-art { display: none; }
  .section-dark { background: none; color: var(--ink); }
  .section-dark p, .next-card p { color: var(--ink); }
}
