:root {
  --bg: #faf6ef;
  --surface: #ffffff;
  --ink: #1f2a24;
  --muted: #5d6862;
  --line: #e7e0d4;
  --accent: #2f6b4f;
  --accent-ink: #ffffff;
  --warm: #c8643b;
  --sky-top: #e3efe9;
  --hill-back: #d7e6d9;
  --hill-front: #c3dac8;
  --critter: #2b3a32;
  --radius: 14px;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131a16;
    --surface: #1b241f;
    --ink: #edf2ee;
    --muted: #a5b1aa;
    --line: #2a3530;
    --accent: #7cc4a0;
    --accent-ink: #0f1a14;
    --warm: #e79a74;
    --sky-top: #0e1512;
    --hill-back: #1a2620;
    --hill-front: #1f2e26;
    --critter: #cfe0d6;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
}
main { flex: 1; display: flex; flex-direction: column; }
a { color: var(--accent); }
.wrap { width: min(1080px, 100% - 40px); margin-inline: auto; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--ink); text-decoration: none; font: 600 1.2rem var(--font-display); }
.brand-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand svg { width: 28px; height: 28px; flex-shrink: 0; color: var(--accent); }
.nav nav { flex-shrink: 0; }
.nav ul { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.nav a.link { color: var(--muted); text-decoration: none; padding: 8px 12px; border-radius: 999px; font-size: .95rem; }
.nav a.link:hover { color: var(--ink); background: var(--line); }
.nav a.link[aria-current] { color: var(--ink); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; flex: 1;
  display: flex; flex-direction: column; justify-content: center;
  background: linear-gradient(to bottom, var(--sky-top), var(--bg) 85%);
  padding: clamp(64px, 12vw, 128px) 0 clamp(120px, 16vw, 180px);
}
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero .hills { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: clamp(70px, 12vw, 140px); }
.hero .wrap { position: relative; max-width: 720px; text-align: center; }
h1, h2, h3 { text-wrap: balance; font-family: var(--font-display); font-weight: 600; line-height: 1.15; letter-spacing: -.01em; }
h1 { font-size: clamp(2.3rem, 6vw, 3.8rem); margin: 0 0 20px; text-wrap: balance; }
h1 em { color: var(--warm); font-style: italic; }
.lede { font-size: clamp(1.05rem, 2.2vw, 1.25rem); color: var(--muted); margin: 0 auto 32px; max-width: 34em; text-wrap: pretty; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.btn { display: inline-block; padding: 12px 22px; border-radius: 999px; font-weight: 600; text-decoration: none; transition: transform .15s, box-shadow .15s; }
.btn:hover { transform: translateY(-1px); }
.btn.primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 18px -8px var(--accent); }
.btn.ghost { color: var(--ink); background: var(--surface); border: 1px solid var(--line); }

/* ---------- Footer ---------- */
footer { padding: 20px 0 28px; color: var(--muted); font-size: .92rem; }
footer .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px 24px; align-items: center; overflow-wrap: anywhere; }
footer .wrap > :last-child { justify-self: end; }
@media (max-width: 480px) { footer .wrap { grid-template-columns: 1fr; text-align: center; } footer .wrap > :last-child { justify-self: center; } }
footer a { color: inherit; }

@media (max-width: 560px) {
  .nav ul li:not(:last-child) { display: none; }
}

/* ---------- Inner pages (e.g. Contact) ---------- */
.page-hero { justify-content: flex-start; padding-top: clamp(48px, 8vw, 88px); }
.page-hero h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 32px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 5vw, 40px); text-align: left; box-shadow: 0 18px 40px -28px rgba(0, 0, 0, .35); }

/* ---------- Forms ---------- */
.form { display: grid; gap: 20px; }
.field label { display: block; margin-bottom: 6px; font-weight: 600; font-size: .95rem; }
.field input, .field textarea {
  display: block; width: 100%; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--bg);
  color: var(--ink); font: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.field textarea { resize: vertical; min-height: 150px; }
.form button { justify-self: start; border: 0; cursor: pointer; font: inherit; font-weight: 600; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.notice { margin: 0 0 20px; padding: 12px 16px; border-radius: 10px; background: color-mix(in srgb, var(--warm) 14%, transparent); color: var(--ink); }
.sent { text-align: center; }
.sent h2 { font-size: 1.8rem; margin: 0 0 8px; }
.sent p { margin: 0 0 24px; color: var(--muted); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 20; padding: 10px 16px; background: var(--surface); border-radius: 8px; }
.skip-link:focus { top: 12px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
  .btn:hover { transform: none; }
}
