:root {
  --bg: #f4f1ea;
  --paper: #fbf9f5;
  --ink: #1a1916;
  --muted: #4e4a43;
  --line: #e0d9cc;
  --accent: #0e6a52;
  --accent-deep: #084838;
  --copper: #a24e2c;
  --header-h: 4.5rem;
  --sans: Outfit, "Avenir Next", "Segoe UI", sans-serif;
  --serif: Newsreader, "Iowan Old Style", Palatino, Georgia, serif;
  --wrap: min(100% - 2rem, 72rem);
  color-scheme: light;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 5.5rem; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.6;
  font-weight: 400;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

body.nav-open { overflow: hidden; }

img, svg, canvas { max-width: 100%; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.05;
  text-wrap: balance;
}

h1, h2, h3, p { margin-top: 0; }

p { text-wrap: pretty; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

::selection { background: #d5eee4; color: var(--ink); }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 40;
  background: var(--ink);
  color: var(--bg);
  padding: 0.55rem 0.8rem;
  text-decoration: none;
}

.skip-link:focus { top: 0.75rem; }

.wrap { width: var(--wrap); margin-inline: auto; }

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--accent-deep);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.lede {
  max-width: 38rem;
  color: var(--muted);
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2vw, 1.45rem);
  line-height: 1.45;
}

.button,
.nav-cta,
button,
input,
textarea,
select { font: inherit; }

.button,
.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  padding: 0.65rem 1.15rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
  cursor: pointer;
}

.button:hover,
.nav-cta:hover { background: var(--accent); border-color: var(--accent); color: white; }

.button-ghost {
  background: transparent;
  color: var(--ink);
}

.button-ghost:hover { background: var(--ink); color: var(--bg); }

.button:focus-visible,
.nav-cta:focus-visible { outline-color: var(--copper); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
}

.site-header.is-scrolled { box-shadow: inset 0 -1px 0 var(--line); }

.progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  pointer-events: none;
}

.header-bar {
  position: relative;
  z-index: 2;
  width: var(--wrap);
  height: var(--header-h);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: inherit;
  font-weight: 560;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.logo-mark { width: 1.75rem; height: 1.75rem; display: block; flex: none; }

.site-nav { display: flex; align-items: center; gap: 1.4rem; }

.nav-link {
  color: var(--muted);
  text-decoration: none;
}

.nav-link:hover,
.nav-link.is-active { color: var(--ink); }

.nav-link.is-active { box-shadow: inset 0 -1px 0 var(--ink); }

.nav-cta.is-active { background: var(--accent); border-color: var(--accent); box-shadow: none; }

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 999px;
  min-height: 2.4rem;
  padding: 0.35rem 0.85rem;
  cursor: pointer;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(16rem, 0.85fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
  padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(3rem, 7vw, 5.5rem);
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(3.1rem, 7vw, 5.5rem);
  line-height: 0.96;
  max-width: 12ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.6rem;
}

.hero-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 2.4rem 0 0;
}

.hero-facts div { border-top: 1px solid var(--line); padding-top: 0.75rem; }

.hero-facts dt {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.hero-facts dd { margin: 0.3rem 0 0; color: var(--muted); }

.stage { position: relative; }

.stage-frame {
  position: relative;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  background:
    radial-gradient(circle at 50% 58%, rgba(14, 106, 82, 0.08), transparent 58%),
    var(--paper);
  overflow: hidden;
}

.stage canvas,
.stage-still {
  width: 100%;
  height: 100%;
  display: block;
}

.stage canvas { cursor: grab; touch-action: pan-y; }

.stage canvas.is-dragging { cursor: grabbing; }

.stage-still { display: none; }

.stage.is-still canvas,
.stage.is-still .stage-controls,
.stage.is-still .stage-caption-motion { display: none; }

.stage.is-still .stage-still,
.stage.is-still .stage-caption-still { display: block; }

.stage-still { padding: 12%; }

.stage-caption {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  text-align: center;
}

.stage-caption-still { display: none; }

.stage-controls {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.85rem;
  visibility: hidden;
}

.stage.is-ready .stage-controls { visibility: visible; }

.stage-controls button,
.filters button {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  border-radius: 999px;
  min-height: 2.3rem;
  padding: 0.3rem 0.8rem;
  cursor: pointer;
}

.stage-controls button:hover,
.filters button:hover { border-color: var(--ink); }

.stage-controls button[aria-pressed="true"],
.filters button[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

.section { padding: clamp(3.2rem, 8vw, 6rem) 0; }

.section-head { max-width: 40rem; margin-bottom: 2rem; }

.section-head h2,
.page-hero h1,
.cta-inner h2 {
  margin: 0 0 0.8rem;
  font-size: clamp(2.2rem, 4.5vw, 3.5rem);
}

.narrow { max-width: 40rem; color: var(--muted); }

.principle-grid,
.post-list { border-bottom: 1px solid var(--line); }

.principle-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.principle {
  padding: 1.4rem 1.5rem 1.6rem 0;
  border-top: 1px solid var(--line);
}

.principle:nth-child(odd) { padding-right: 2rem; border-right: 1px solid var(--line); }
.principle:nth-child(even) { padding-left: 2rem; }

.principle h3,
.service h3,
.post-card h2,
.post-card h3 {
  margin: 0.35rem 0;
  font-size: clamp(1.6rem, 3vw, 2.15rem);
}

.principle p,
.service p,
.post-card p { margin: 0; color: var(--muted); }

.service {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: start;
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}

.service:last-of-type { border-bottom: 1px solid var(--line); }

.service-no,
.step-no,
.post-card .meta { color: var(--muted); font-size: 0.92rem; }

.service-go { color: var(--accent-deep); padding-top: 0.35rem; }

.service:hover h3,
.post-card:hover h2,
.post-card:hover h3 { color: var(--accent-deep); }

.steps { border-bottom: 1px solid var(--line); }

.step { border-top: 1px solid var(--line); }

.step summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.05rem 0;
  cursor: pointer;
  list-style: none;
}

.step summary::-webkit-details-marker { display: none; }

.step summary h3 {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.step summary::after {
  content: "+";
  color: var(--muted);
  font-size: 1.5rem;
  line-height: 1;
}

.step[open] summary::after { content: "–"; }

.step p {
  max-width: 40rem;
  margin: 0 0 1.2rem;
  color: var(--muted);
}

.page-hero { padding: clamp(2.8rem, 7vw, 5.5rem) 0 1rem; }

.page-hero h1 { max-width: 16em; }

.crumbs { margin: 0 0 1.2rem; }

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.92rem;
}

.crumbs a { color: var(--muted); }

.post-list { display: flex; flex-direction: column; }

.post-card {
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr);
  grid-template-areas:
    "topic title"
    "topic description"
    "topic meta";
  gap: 0.35rem 1.5rem;
  padding: 1.35rem 0;
  border-top: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}

.post-card .eyebrow { grid-area: topic; margin: 0.4rem 0 0; }
.post-card h2,
.post-card h3 { grid-area: title; }
.post-card p:not(.eyebrow):not(.meta) { grid-area: description; }
.post-card .meta { grid-area: meta; margin: 0.2rem 0 0; }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.5rem 0 1.25rem;
}

.empty { color: var(--muted); }

.article { padding-top: clamp(2.2rem, 6vw, 4rem); }

.article-header { max-width: 44rem; margin-bottom: 2rem; }

.article-header h1 { margin: 0 0 1rem; font-size: clamp(2.5rem, 5vw, 4.2rem); }

.byline { color: var(--muted); }

.prose {
  max-width: 40rem;
  font-family: var(--serif);
  font-size: 1.18rem;
  line-height: 1.65;
}

.prose h2 { margin: 2.4rem 0 0.7rem; font-size: 1.85rem; }
.prose h3 { margin: 1.8rem 0 0.5rem; font-size: 1.4rem; }
.prose p,
.prose ul { margin: 0 0 1rem; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin: 0.35rem 0; }
.prose a { color: var(--accent-deep); }
.prose blockquote {
  margin: 1.5rem 0;
  padding-left: 1rem;
  border-left: 2px solid var(--accent);
  color: var(--ink);
  font-style: italic;
}
.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.86em;
  background: rgba(26, 25, 22, 0.05);
  padding: 0.1em 0.35em;
  border-radius: 0.3rem;
}
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

.related { padding: 1rem 0 3rem; }

.related h2 { margin-bottom: 0.8rem; font-size: 2rem; }

.related ul { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--line); }

.related li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
  border-top: 1px solid var(--line);
}

.related a { text-decoration: none; }
.related a:hover { color: var(--accent-deep); }
.related span { color: var(--muted); flex: none; }

.story {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: start;
}

.note {
  margin: 0;
  padding: 1.25rem 1.3rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 1rem;
}

.faq-list { border-bottom: 1px solid var(--line); }

.faq-item { border-top: 1px solid var(--line); }

.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 1rem 0;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item h3 { margin: 0; font-size: 1.45rem; }

.faq-item p { margin: 0 0 1rem; max-width: 40rem; color: var(--muted); }

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
  padding-top: clamp(2.8rem, 7vw, 5.5rem);
  padding-bottom: 4.5rem;
}

.contact-grid .page-hero { padding: 0; }

.email-link {
  display: inline-block;
  margin: 0.4rem 0 1rem;
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3vw, 2.15rem);
  letter-spacing: -0.03em;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.email-link:hover { border-color: var(--accent); color: var(--accent-deep); }

.check-list { margin: 1rem 0 0; padding-left: 1.1rem; color: var(--muted); }
.check-list li { margin: 0.4rem 0; }

.form-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  padding: clamp(1.2rem, 3vw, 2rem);
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.field { margin: 0 0 1rem; }

.field label,
.form-card legend { display: block; margin-bottom: 0.3rem; font-size: 0.95rem; }

input,
textarea,
select {
  width: 100%;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 0.7rem 0;
}

textarea { min-height: 8rem; resize: vertical; }

select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--ink) 50%),
    linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 0.85rem) 55%, calc(100% - 0.55rem) 55%;
  background-size: 0.3rem 0.3rem, 0.3rem 0.3rem;
  background-repeat: no-repeat;
  padding-right: 1.6rem;
}

.form-status { min-height: 1.5rem; margin: 0.4rem 0 0; }
.form-status[data-state="success"] { color: var(--accent-deep); }
.form-status[data-state="error"] { color: var(--copper); }

.fine-print { margin: 1rem 0 0; color: var(--muted); font-size: 0.92rem; }

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.cta-band { padding: 0 0 clamp(3rem, 8vw, 5.5rem); }

.cta-inner {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.cta-inner p { max-width: 36rem; color: var(--muted); }
.cta-inner a { color: var(--accent-deep); }

.site-footer { padding-bottom: 2rem; }

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.7fr 1.3fr 0.8fr;
  gap: 2rem;
  padding: 2.2rem 0;
  border-top: 1px solid var(--line);
}

.footer-brand {
  margin: 0 0 0.4rem;
  font-family: var(--serif);
  font-size: 1.6rem;
}

.footer-label {
  margin: 0 0 0.55rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.footer-grid p { margin: 0 0 0.7rem; color: var(--muted); }

.footer-links { display: flex; flex-direction: column; align-items: flex-start; gap: 0.35rem; }

.footer-links a { color: var(--ink); text-decoration: none; }
.footer-links a:hover { color: var(--accent-deep); }

@media (prefers-reduced-motion: no-preference) {
  .hero-copy h1 { animation: rise 0.8s ease both; }

  .js [data-reveal] {
    animation: rise 0.7s ease both;
    animation-play-state: paused;
  }

  .js [data-reveal].is-in { animation-play-state: running; }
  .js .delay-1 { animation-delay: 80ms; }
  .js .delay-2 { animation-delay: 160ms; }
  .js .delay-3 { animation-delay: 240ms; }
}

@keyframes rise {
  from { transform: translateY(12px); }
  to { transform: none; }
}

@media (max-width: 900px) {
  .hero,
  .story,
  .contact-grid,
  .principle-grid,
  .footer-grid { grid-template-columns: 1fr; }

  .principle:nth-child(odd),
  .principle:nth-child(even) {
    padding-left: 0;
    padding-right: 0;
    border-right: 0;
  }

  .hero { padding-top: 2rem; }
  .hero h1 { max-width: 12ch; }
  .stage { max-width: 34rem; }
  .cta-inner { flex-direction: column; align-items: flex-start; }
  .related li { flex-direction: column; gap: 0.2rem; }
}

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }

  .site-nav {
    display: none;
    position: fixed;
    z-index: 1;
    inset: var(--header-h) 0 0 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
    padding: 1.5rem 1.25rem 2rem;
    background: var(--bg);
    overflow: auto;
  }

  .site-nav.is-open { display: flex; }
  .site-nav a { font-size: 1.7rem; padding: 0.45rem 0; }
  .nav-link.is-active { box-shadow: none; }
  .hero-facts,
  .form-row,
  .post-card { grid-template-columns: 1fr; }
  .post-card {
    grid-template-areas:
      "topic"
      "title"
      "description"
      "meta";
  }
  .service { grid-template-columns: 1fr; }
  .footer-grid { gap: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .stage-still,
  .stage-caption-still { display: block; }
  .stage canvas,
  .stage-controls,
  .stage-caption-motion { display: none; }
}

@media (prefers-contrast: more) {
  :root { --line: #1a1916; --muted: #1a1916; }
}

@media print {
  .site-header,
  .stage,
  .filters,
  .progress,
  .nav-toggle { display: none !important; }
  body { background: white; }
  a { text-decoration: underline; }
}
