/* Patchwise launch site v2 — "gardener's almanac" identity.
   Editorial, numbered sections on warm paper, bookended by deep-green hero and
   footer. Colour tokens carry over from v1 (every fg/bg pair was verified for
   WCAG there): body/headings/links/CTAs >= 7:1 where possible, 4.5:1 minimum.
   Terracotta #c05b33 remains decorative / large-bold only (4.1:1 on cream);
   #a34a28 is the text-safe terracotta (5.5:1 on cream). Ochre text only ever
   sits on deep green (#e0a53e on #24312c ≈ 8:1). */

:root {
  --green: #33544c;
  --green-deep: #24312c;
  --terracotta: #c05b33;      /* decoration & large-bold accents only */
  --terra-deep: #a34a28;      /* text-safe terracotta on cream */
  --ochre: #e0a53e;
  --sand: #d9c9a8;

  --bg: #FBF7EF;
  --bg-2: #f5edde;            /* sand-tinted cream for alternating sections */
  --card: #ffffff;
  --ink: #24312c;             /* 12.7:1 on bg */
  --ink-2: #46554e;           /* 7.4:1 on bg */
  --heading: #33544c;         /* 7.8:1 on bg */
  --link: #2a4a42;            /* 9.1:1 on bg */
  --accent: #a34a28;
  --border: #ddd2ba;

  /* the deep-green "book cover" panels (hero, free banner, footer) */
  --panel: #24312c;
  --panel-2: #1d2823;
  --panel-ink: #FBF7EF;       /* 12.7:1 on panel */
  --panel-ink-2: #cfe3d8;     /* 10.9:1 on panel */
  --panel-border: #3a4a43;

  --max: 1080px;
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16211d;
    --bg-2: #1b2721;
    --card: #1e2b26;
    --ink: #efe7d6;           /* 13.5:1 on bg */
    --ink-2: #c8bda6;         /* 8.9:1 on bg */
    --heading: #cfe3d8;       /* 12.3:1 on bg */
    --link: #b9d9ca;          /* 10.9:1 on bg */
    --accent: #e2906f;        /* 6.7:1 on bg */
    --border: #38463f;

    --panel: #101815;         /* panels stay darker than the page */
    --panel-2: #0c1310;
    --panel-border: #2c3a33;
  }
}

* { box-sizing: border-box; margin: 0; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem; /* sticky nav offset for anchor links */
}
body {
  font-family: var(--sans);
  font-size: 1.125rem; /* 18px minimum body text */
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}
img { max-width: 100%; height: auto; display: block; }

/* Links are always visibly links — underlined, always on. */
a { color: var(--link); text-decoration: underline; text-underline-offset: 0.15em; }
a:hover { color: var(--heading); }
a:focus-visible, .cta:focus-visible, .gallery:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

h1, h2, h3 { font-family: var(--serif); color: var(--heading); line-height: 1.15; }

section { padding: clamp(3.5rem, 8vw, 6rem) 1.25rem; }
.wrap { max-width: var(--max); margin: 0 auto; }

/* Numbered almanac section headers — left-aligned, ruled, like a chapter page */
.sec-head {
  display: flex; align-items: baseline; gap: 1rem;
  border-bottom: 3px solid var(--border);
  padding-bottom: 0.75rem; margin-bottom: 0.9rem;
}
.sec-num {
  font-family: var(--serif); font-style: italic; font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--terra-deep);
}
@media (prefers-color-scheme: dark) { .sec-num { color: var(--accent); } }
.sec-head h2 { font-size: clamp(1.9rem, 4.5vw, 2.75rem); }
.sec-lead { color: var(--ink-2); max-width: 46rem; font-size: 1.15rem; }

/* Skip link — visible on keyboard focus only */
.skip {
  position: absolute; left: -999px; top: 0;
  background: #33544c; color: #FBF7EF; /* fixed pair, 7.8:1 */
  padding: 0.75rem 1.25rem; z-index: 100;
}
.skip:focus { left: 0; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap;
  padding: 0.5rem 1.25rem;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 3px double var(--border);
}
.nav-brand {
  display: flex; align-items: center; gap: 0.6rem;
  font-family: var(--serif); font-weight: 700; font-size: 1.35rem;
  color: var(--heading); text-decoration: none;
  padding: 0.5rem 0.25rem; /* >= 48px tall target */
}
.nav-brand img { border-radius: 9px; background: #FBF7EF; padding: 2px; }
.nav nav { display: flex; gap: 0.25rem; flex-wrap: wrap; }
.nav nav a {
  color: var(--link); font-size: 1.125rem; font-weight: 600;
  padding: 0.75rem 0.9rem; /* >= 48px tall target */
}

/* Hero — the book cover: deep green, cream type, ochre accent */
.hero {
  background: linear-gradient(160deg, var(--panel) 0%, var(--panel-2) 100%);
  border-bottom: 6px double var(--panel-border);
}
.hero .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: clamp(2rem, 6vw, 5rem);
}
.hero-copy { max-width: 37rem; }
.brand-chip { margin-bottom: 1.1rem; }
.brand-chip img { border-radius: 10px; background: #FBF7EF; padding: 3px; }
.eyebrow {
  color: var(--ochre); /* ~8:1 on panel */
  font-weight: 700; font-size: 0.95rem;
  text-transform: uppercase; letter-spacing: 0.14em;
}
.hero h1 {
  color: var(--panel-ink);
  font-size: clamp(2.3rem, 6vw, 3.9rem);
  margin: 0.6rem 0 1.25rem;
}
.hero h1 em { font-style: italic; color: var(--ochre); }
.hero .lead { color: var(--panel-ink-2); font-size: 1.25rem; }
.cta-row { display: flex; gap: 1rem; margin-top: 1.75rem; flex-wrap: wrap; }
.cta {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3.25rem; /* 52px target */
  padding: 0.8rem 1.6rem; border-radius: 999px;
  font-weight: 700; font-size: 1.125rem;
}
.cta.soon {
  background: var(--ochre); color: #24312c; /* 7.6:1 */
  cursor: default; text-decoration: none;
}
.cta.ghost {
  border: 2px solid var(--panel-ink-2); color: var(--panel-ink);
  text-decoration: underline; text-underline-offset: 0.2em;
  background: transparent;
}
.cta.ghost:hover { color: var(--ochre); border-color: var(--ochre); }
.hero .fineprint { color: var(--panel-ink-2); font-size: 1.125rem; margin-top: 1.1rem; font-weight: 600; }
.hero-phone img {
  width: min(300px, 72vw);
  border-radius: 24px;
  border: 3px solid var(--panel-border);
  box-shadow: 0 28px 70px -28px rgba(0, 0, 0, 0.6);
}

/* How it works — three ruled steps, giant almanac numerals */
.steps {
  list-style: none; padding: 0;
  display: grid; gap: clamp(1.25rem, 3vw, 2.5rem);
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  margin-top: 2.5rem;
}
.steps li { border-top: 4px solid var(--border); padding-top: 1.1rem; }
.steps .num {
  display: block;
  font-family: var(--serif); font-style: italic; font-weight: 700;
  font-size: 3.25rem; line-height: 1;
  color: var(--terracotta); /* large-bold decorative, AA large */
  margin-bottom: 0.6rem;
}
@media (prefers-color-scheme: dark) { .steps .num { color: var(--accent); } }
.steps h3 { font-size: 1.35rem; margin-bottom: 0.5rem; }
.steps p { color: var(--ink-2); }

/* Features — a field-guide index: two columns, square markers, no card chrome */
.features { background: var(--bg-2); }
.index-list {
  list-style: none; padding: 0;
  display: grid; gap: 1.4rem 3rem;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  margin-top: 2.5rem;
}
.index-list li {
  padding-left: 1.4rem; position: relative;
  border-bottom: 1px solid var(--border); padding-bottom: 1.4rem;
}
.index-list li::before {
  content: ""; position: absolute; left: 0; top: 0.5em;
  width: 0.65rem; height: 0.65rem;
  background: var(--terracotta);
}
.index-list h3 { font-size: 1.3rem; margin-bottom: 0.35rem; }
.index-list p { color: var(--ink-2); font-size: 1.125rem; }

/* Gallery — captioned figures in a snap strip */
.gallery {
  display: flex; gap: 1.5rem; overflow-x: auto;
  padding: 2.5rem 0.25rem 1.5rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.gallery figure { flex-shrink: 0; width: min(250px, 62vw); scroll-snap-align: center; }
.gallery img {
  border-radius: 18px; border: 1px solid var(--border);
  box-shadow: 0 14px 34px -18px rgba(51, 84, 76, 0.45);
}
.gallery figcaption {
  margin-top: 0.6rem; font-size: 1.05rem; font-weight: 600;
  color: var(--ink-2); text-align: center;
}

/* Plant story — a real timeline down the page */
.timeline-sec { background: var(--bg-2); }
.timeline {
  list-style: none; margin: 2.5rem 0 0; padding: 0 0 0 1rem;
  position: relative; max-width: 42rem;
}
.timeline::before {
  content: ""; position: absolute; left: 1rem; top: 0.5rem; bottom: 0.5rem;
  width: 3px; background: var(--border);
}
.timeline li { position: relative; padding: 0 0 2rem 2.5rem; }
.timeline li:last-child { padding-bottom: 0.5rem; }
.timeline li::before {
  content: ""; position: absolute; left: -0.45rem; top: 0.35rem;
  width: 1rem; height: 1rem; border-radius: 50%;
  background: var(--terracotta);
  border: 3px solid var(--bg-2);
}
.timeline .day {
  font-family: var(--serif); font-style: italic; font-weight: 700;
  color: var(--terra-deep); font-size: 1.05rem;
  text-transform: uppercase; letter-spacing: 0.06em;
}
@media (prefers-color-scheme: dark) { .timeline .day { color: var(--accent); } }
.timeline h3 { font-size: 1.35rem; margin: 0.15rem 0 0.35rem; }
.timeline p { color: var(--ink-2); }
.fineprint { color: var(--ink-2); font-size: 1.05rem; margin-top: 2rem; max-width: 46rem; }

/* Pricing — free banner first, then the subscription pair */
.free-banner {
  background: linear-gradient(160deg, var(--panel) 0%, var(--panel-2) 100%);
  border: 3px double var(--panel-border); border-radius: 20px;
  padding: clamp(1.75rem, 4vw, 2.75rem);
  margin-top: 2.5rem;
}
.free-banner .free-head { display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.free-banner h3 { color: var(--panel-ink); font-size: clamp(1.75rem, 4vw, 2.4rem); }
.free-banner .price { color: var(--ochre); font-family: var(--serif); font-weight: 700; font-size: 1.5rem; }
.free-banner ul {
  list-style: none; padding: 0; margin-top: 1.25rem;
  display: grid; gap: 0.6rem 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.free-banner li { color: var(--panel-ink-2); padding-left: 1.3rem; position: relative; }
.free-banner li::before { content: "✓"; position: absolute; left: 0; color: var(--ochre); font-weight: 700; }
.free-banner .tier-note { color: var(--panel-ink); font-weight: 600; margin-top: 1.25rem; font-style: italic; }
.pay-row {
  display: grid; gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  margin-top: 1.5rem; align-items: start;
}
.tier {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 20px; padding: 2rem; position: relative;
}
.tier.plus { border: 3px solid var(--green); }
@media (prefers-color-scheme: dark) { .tier.plus { border-color: var(--heading); } }
.tier .badge {
  position: absolute; top: -1rem; left: 1.5rem;
  background: var(--ochre); color: #24312c; /* 6.2:1 */
  font-size: 0.95rem; font-weight: 700;
  padding: 0.3rem 1.1rem; border-radius: 999px; white-space: nowrap;
}
.tier .badge.neutral { background: var(--sand); color: #24312c; /* 7.9:1 */ }
.tier h3 { font-size: 1.5rem; margin-top: 0.5rem; }
.price { font-size: 2rem; font-weight: 800; color: var(--ink); margin: 0.4rem 0 0; }
.price span { font-size: 1.125rem; font-weight: 500; color: var(--ink-2); }
.tier-tag {
  font-family: var(--serif); font-weight: 700; font-size: 1.2rem;
  color: var(--accent); margin-top: 0.25rem;
}
.tier ul { padding-left: 1.4rem; margin-top: 1.1rem; display: flex; flex-direction: column; gap: 0.5rem; }
.tier li { color: var(--ink-2); }
.tier-note { margin-top: 1.1rem; font-size: 1.125rem; color: var(--ink-2); font-style: italic; }
.quote { color: var(--ink-2); font-size: 1.15rem; max-width: 46rem; }
.quote-sig { font-size: 1.125rem; font-weight: 600; }
.pricing-line { font-weight: 700; color: var(--ink); margin-top: 2rem; font-size: 1.15rem; }

/* Privacy — the seed-packet panel; the policy's short version, attached */
.privacy-panel {
  border: 3px double var(--terra-deep); border-radius: 20px;
  background: var(--card);
  padding: clamp(1.75rem, 4vw, 2.75rem);
  margin-top: 2.5rem; max-width: 52rem;
}
@media (prefers-color-scheme: dark) { .privacy-panel { border-color: var(--accent); } }
.privacy-panel ul {
  list-style: none; padding: 0; margin-top: 1rem;
  display: flex; flex-direction: column; gap: 0.65rem;
}
.privacy-panel li { padding-left: 1.4rem; position: relative; color: var(--ink); }
.privacy-panel li::before {
  content: ""; position: absolute; left: 0; top: 0.5em;
  width: 0.65rem; height: 0.65rem; background: var(--terra-deep);
}
@media (prefers-color-scheme: dark) { .privacy-panel li::before { background: var(--accent); } }
.privacy-panel .privacy-link {
  display: inline-block; margin-top: 1.4rem;
  font-weight: 700; font-size: 1.15rem;
}

/* Founder note — a letter on paper */
.story { background: var(--bg-2); }
.letter {
  max-width: 44rem; background: var(--card);
  border: 1px solid var(--border); border-radius: 20px;
  padding: clamp(1.75rem, 4vw, 3rem);
  margin-top: 2.5rem;
  font-family: var(--serif);
}
.letter p { margin-top: 1.25rem; color: var(--ink); font-size: 1.15rem; }
.letter p:first-child { margin-top: 0; }
.letter .sig { font-weight: 700; font-size: 1.4rem; color: var(--heading); }
.story-contact {
  font-family: var(--sans);
  font-size: 1.2rem; font-weight: 600;
  border-top: 2px solid var(--border); padding-top: 1.4rem; margin-top: 1.75rem;
}
.story-contact a { font-weight: 700; }

/* Footer — closes the book: deep green again */
footer {
  background: linear-gradient(160deg, var(--panel) 0%, var(--panel-2) 100%);
  border-top: 6px double var(--panel-border);
  padding: 2.75rem 1.25rem;
}
.foot-inner { max-width: var(--max); margin: 0 auto; }
.foot-brand {
  display: flex; align-items: center; gap: 0.6rem;
  font-family: var(--serif); font-weight: 700; font-size: 1.15rem;
  color: var(--panel-ink);
}
.foot-brand img { border-radius: 7px; background: #FBF7EF; padding: 2px; }
footer p { color: var(--panel-ink-2); margin-top: 0.6rem; }
footer a { color: var(--panel-ink); }
footer a:hover { color: var(--ochre); }

/* Scroll reveal — JS adds .in; fully disabled for reduced-motion users. */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
