/* Hedgesong — brand stylesheet
   Whimsical hand-drawn illustration · meadow / dawn-gold / sky / cream
   Palette and voice: see docs/brand.md
*/

:root {
  --meadow: #2E5D3C;
  --meadow-dark: #244a30;
  --dawn-gold: #F2B33D;
  --dawn-gold-deep: #E29A1F;
  --sky: #9BD0E6;
  --blush: #F6C9C0;
  --cream: #FBF6EC;
  --cream-deep: #F3EADA;
  --bark: #2A241D;
  --bark-soft: #5A5148;
  --white: #FFFFFF;

  --display: "Quicksand", "Baloo 2", "Avenir Next Rounded", ui-rounded, system-ui, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;

  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(42, 36, 29, 0.08);
  --shadow-soft: 0 4px 14px rgba(42, 36, 29, 0.06);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--body);
  color: var(--bark);
  background: var(--cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  font-size: 17px;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.15;
  color: var(--meadow);
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}

h2 { font-size: clamp(1.7rem, 4vw, 2.5rem); }
h3 { font-size: 1.25rem; color: var(--bark); }

p { margin: 0 0 1em; }

a { color: var(--meadow); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--meadow-dark); }

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: 72px 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 26px;
  border-radius: 999px;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  border: 2px solid transparent;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--meadow);
  color: var(--cream);
  box-shadow: var(--shadow);
}
.btn-primary:hover { background: var(--meadow-dark); color: var(--cream); }

.btn-gold {
  background: var(--dawn-gold);
  color: var(--bark);
}
.btn-gold:hover { background: var(--dawn-gold-deep); color: var(--bark); }

.btn-ghost {
  background: transparent;
  color: var(--meadow);
  border-color: var(--meadow);
}
.btn-ghost:hover { background: var(--meadow); color: var(--cream); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(251, 246, 236, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(42, 36, 29, 0.08);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--meadow);
}
.brand svg { display: block; }
.nav { display: flex; gap: 22px; align-items: center; }
.nav a {
  font-family: var(--display);
  font-weight: 600;
  color: var(--bark-soft);
  text-decoration: none;
  font-size: 0.95rem;
}
.nav a:hover { color: var(--meadow); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--sky) 0%, var(--blush) 55%, var(--dawn-gold) 100%);
  color: var(--bark);
  text-align: center;
  padding: 96px 0 120px;
}
.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  color: var(--meadow-dark);
  max-width: 18ch;
  margin-left: auto;
  margin-right: auto;
}
.hero .tagline {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  max-width: 30ch;
  margin: 0 auto 28px;
  color: var(--bark);
}
.hero .cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-sun {
  position: absolute;
  top: 48px;
  right: 12%;
  width: 90px;
  height: 90px;
  background: var(--dawn-gold);
  border-radius: 50%;
  opacity: 0.9;
  box-shadow: 0 0 60px 20px rgba(242, 179, 61, 0.55);
}

/* hand-drawn squiggle under hero */
.squiggle {
  display: block;
  margin: -46px auto 0;
  color: var(--meadow);
  position: relative;
  z-index: 2;
}

/* ---------- Section heading ---------- */
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.eyebrow {
  font-family: var(--display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  color: var(--dawn-gold-deep);
  margin-bottom: 10px;
}
.lead { font-size: 1.12rem; color: var(--bark-soft); }

/* ---------- Cards / grid ---------- */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

.card {
  background: var(--white);
  border: 2px solid rgba(42, 36, 29, 0.06);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-soft);
}
.card h3 { margin-top: 0; }
.card .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--cream-deep);
  font-size: 1.4rem;
  margin-bottom: 14px;
}

/* numbered steps */
.step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.step .num {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--dawn-gold);
  color: var(--bark);
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Privacy section ---------- */
.privacy {
  background: var(--meadow);
  color: var(--cream);
}
.privacy h2, .privacy h3 { color: var(--cream); }
.privacy .lead { color: rgba(251, 246, 236, 0.85); }
.privacy .card {
  background: var(--meadow-dark);
  border-color: rgba(251, 246, 236, 0.12);
  color: var(--cream);
}
.privacy .card h3 { color: var(--dawn-gold); }

.promise {
  font-family: var(--display);
  font-size: clamp(1.4rem, 3.5vw, 2.1rem);
  font-weight: 700;
  line-height: 1.3;
  color: var(--dawn-gold);
  margin: 24px 0 32px;
}

.checklist { list-style: none; padding: 0; margin: 0 0 24px; }
.checklist li {
  position: relative;
  padding-left: 34px;
  margin-bottom: 12px;
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--dawn-gold);
}
.checklist li::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 8px;
  width: 8px;
  height: 4px;
  border-left: 2px solid var(--bark);
  border-bottom: 2px solid var(--bark);
  transform: rotate(-45deg);
}

/* fingerprint diagram */
.flow {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  font-family: var(--display);
  font-weight: 600;
}
.flow .node {
  background: var(--white);
  color: var(--bark);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  font-size: 0.95rem;
}
.flow .node.muted { background: rgba(251, 246, 236, 0.14); color: var(--cream); }
.flow .arrow { color: var(--dawn-gold); font-size: 1.4rem; }

/* ---------- Free forever ---------- */
.free { background: var(--cream-deep); text-align: center; }
.free .big {
  font-family: var(--display);
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--meadow);
  margin-bottom: 16px;
}

/* ---------- FAQ ---------- */
details {
  background: var(--white);
  border: 2px solid rgba(42, 36, 29, 0.06);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
  margin-bottom: 12px;
}
summary {
  cursor: pointer;
  font-family: var(--display);
  font-weight: 700;
  color: var(--meadow);
}
details p { margin: 12px 0 0; color: var(--bark-soft); }

/* ---------- Manifesto ---------- */
.manifesto {
  background: linear-gradient(180deg, var(--blush), var(--sky));
}
.manifesto blockquote {
  font-family: var(--display);
  font-size: clamp(1.2rem, 3vw, 1.7rem);
  font-weight: 600;
  line-height: 1.4;
  color: var(--meadow-dark);
  margin: 0;
  max-width: 26ch;
}

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }

.spec-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  font-size: 0.95rem;
}
.spec-table th, .spec-table td {
  padding: 13px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(42, 36, 29, 0.07);
}
.spec-table thead th {
  background: var(--meadow);
  color: var(--cream);
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
}
.spec-table tbody tr:last-child td { border-bottom: none; }
.spec-table tfoot td {
  background: var(--cream-deep);
  border-top: 2px solid rgba(42, 36, 29, 0.1);
  font-family: var(--display);
  font-weight: 700;
}
.spec-table.parts td:nth-child(4) { white-space: nowrap; font-weight: 700; color: var(--meadow); }
.spec-table a { white-space: nowrap; }

/* ---------- Badge ---------- */
.badge {
  display: inline-block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--bark);
  background: var(--dawn-gold);
  border-radius: 999px;
  padding: 3px 10px;
  vertical-align: middle;
}

/* ---------- Doc content ---------- */
.doc { padding: 48px 0 72px; }
.doc-content { max-width: 820px; }
.doc-content h1 { font-size: clamp(1.8rem, 4vw, 2.3rem); color: var(--meadow-dark); margin: 0 0 0.5em; }
.doc-content h2 { margin-top: 1.8em; font-size: 1.4rem; }
.doc-content h3 { margin-top: 1.4em; font-size: 1.12rem; }
.doc-content h4 { margin-top: 1.2em; font-size: 1rem; }
.doc-content p, .doc-content li { color: var(--bark-soft); }
.doc-content a { color: var(--meadow); }
.doc-content ul, .doc-content ol { margin: 0 0 1.2em; padding-left: 1.5em; }
.doc-content li { margin-bottom: 0.35em; }
.doc-content blockquote {
  border-left: 4px solid var(--dawn-gold);
  margin: 1.2em 0;
  padding: 4px 0 4px 18px;
  color: var(--bark-soft);
  font-style: italic;
}
.doc-content code {
  background: var(--cream-deep);
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 0.9em;
  color: var(--meadow-dark);
}
.doc-content pre {
  background: var(--bark);
  color: var(--cream);
  padding: 18px 20px;
  border-radius: 12px;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.55;
  margin: 0 0 1.4em;
}
.doc-content pre code { background: none; color: inherit; padding: 0; }
.doc-content hr { border: none; border-top: 1px solid rgba(42, 36, 29, 0.12); margin: 2em 0; }
.doc-content table {
  border-collapse: collapse;
  width: 100%;
  margin: 0 0 1.4em;
  font-size: 0.9rem;
  background: var(--white);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}
.doc-content th, .doc-content td {
  text-align: left;
  padding: 10px 13px;
  border-bottom: 1px solid rgba(42, 36, 29, 0.08);
  vertical-align: top;
}
.doc-content thead th {
  background: var(--meadow);
  color: var(--cream);
  font-family: var(--display);
  font-weight: 700;
  white-space: nowrap;
}
.doc-content tbody tr:last-child td { border-bottom: none; }

/* ---------- Gate (teaser + password) ---------- */
.gate-page { min-height: 100vh; }

.gate {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  background: linear-gradient(180deg, var(--sky) 0%, var(--blush) 55%, var(--dawn-gold) 100%);
}

.gate-card {
  width: 100%;
  max-width: 430px;
  background: var(--cream);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 44px 36px;
  text-align: center;
  border: 2px solid rgba(255, 255, 255, 0.6);
}
.gate-card h1 {
  font-size: 2.1rem;
  margin: 18px 0 4px;
}
.gate-logo { display: block; margin: 0 auto; }
.gate-tagline {
  font-family: var(--display);
  font-weight: 600;
  color: var(--bark-soft);
  margin: 0 0 16px;
}
.gate-teaser {
  color: var(--bark-soft);
  font-size: 0.98rem;
  margin: 0 0 26px;
}

.gate-form { text-align: left; }
.gate-label {
  display: block;
  font-family: var(--display);
  font-weight: 700;
  color: var(--meadow);
  font-size: 0.9rem;
  margin-bottom: 8px;
}
.gate-row { display: flex; gap: 10px; }
.gate-row input {
  flex: 1;
  font-family: var(--display);
  font-size: 1rem;
  padding: 13px 16px;
  border: 2px solid rgba(42, 36, 29, 0.15);
  border-radius: 999px;
  background: var(--white);
  color: var(--bark);
  outline: none;
  letter-spacing: 0.05em;
}
.gate-row input:focus { border-color: var(--meadow); }
.gate-error {
  margin: 12px 0 0;
  color: #B4432F;
  font-size: 0.9rem;
  font-weight: 600;
}

.shake { animation: gate-shake 0.4s ease; }
@keyframes gate-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bark);
  color: rgba(251, 246, 236, 0.8);
  padding: 40px 0;
  font-size: 0.9rem;
}
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
  align-items: center;
}
.site-footer a { color: var(--dawn-gold); }
.site-footer .muted { color: rgba(251, 246, 236, 0.5); }

@media (max-width: 640px) {
  .nav { gap: 14px; }
  .nav a { font-size: 0.85rem; }
  section { padding: 52px 0; }
}
