/* Stage N Sprouts — shared styles.
   Palette is sampled from the logo (see site/coming-soon/README.md):
   cream ground, wordmark ink, leaf green. Serif = same stack as the
   coming-soon page so the whole domain reads as one thing. */

:root {
  --cream:      #fcf3ea;
  --card:       #fffdfa;
  --ink:        #302f18;
  --olive:      #6b6334;
  --leaf:       #4f7a4a;
  --leaf-dark:  #3d6039;
  --leaf-soft:  #e8f0e6;
  --line:       #e2d8c9;
  --warn:       #8c5a2b;
  --track:      #f1ece2;
  --radius:     12px;
  --art-bg:     #e8f0e6;
  --serif:      "Iowan Old Style", Palatino, Georgia, "Times New Roman", serif;
  --sans:       ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

@font-face {
  font-family: "Dancing Script";
  src: url("fonts/dancing-script-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Dancing Script";
  src: url("fonts/dancing-script-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

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

html { height: 100%; scroll-behavior: smooth; }

body {
  min-height: 100%;
  min-height: 100dvh;
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--serif);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

.wrap { max-width: 72rem; margin: 0 auto; padding: 0 1.25rem; }

/* ---------- header / nav ---------- */

.site-header {
  background: var(--cream);
  border-bottom: 1px solid var(--line);
}
/* brand centred and generous; nav on its own row below — easy thumb reach
   on a phone, and the mark gets room to be an illustration, not an icon */
.site-header .wrap {
  display: flex; justify-content: center;
  padding-top: 0.85rem; padding-bottom: 0.85rem;
}
.brand { display: flex; align-items: center; text-decoration: none; color: inherit; }
.brand-row {
  display: flex; align-items: center;
  font-family: "Dancing Script", "Snell Roundhand", cursive;
  font-weight: 700; letter-spacing: 0.01em;
  /* 80px on desktop, scaling down so title + pots never overflow a phone */
  font-size: clamp(38px, 7.5vw, 80px);
  line-height: 1.1;
}

/* the stack under the header: logo level, then the nav bubbles */
.masthead {
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
  padding: 1.6rem 1.25rem 0.4rem;
}
.masthead-logo { display: block; width: 100%; max-width: min(29rem, 90vw); border-radius: var(--radius); }
nav.main { display: flex; gap: 0.4rem; font-family: var(--sans); font-size: 0.95rem; }
nav.main a {
  color: var(--olive); text-decoration: none;
  padding: 0.4rem 0.75rem; border-radius: 999px;
}
nav.main a:hover { background: var(--leaf-soft); color: var(--leaf-dark); }
nav.main a[aria-current="page"] { background: var(--leaf); color: #fffdfa; }

/* ---------- hero ---------- */

.hero { text-align: center; padding: 1.75rem 0 2.5rem; }
.hero .eyebrow {
  font-family: var(--sans); font-size: 0.78rem;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--olive);
  margin: 0 0 1rem;
}
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1.12; margin: 0 0 1rem; font-weight: 600; }
.hero .lede {
  max-width: 36rem; margin: 0 auto 1.75rem;
  font-size: 1.125rem;
  color: color-mix(in srgb, var(--ink) 84%, var(--cream));
}
.cta-row { display: flex; gap: 0.6rem; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-block; font-family: var(--serif); font-size: 1rem;
  padding: 0.7rem 1.4rem; border-radius: var(--radius);
  border: 1px solid var(--leaf); cursor: pointer; text-decoration: none;
  transition: background 120ms ease;
}
.btn.primary { background: var(--leaf); color: #fffdfa; }
.btn.primary:hover { background: var(--leaf-dark); border-color: var(--leaf-dark); }
.btn.ghost { background: transparent; color: var(--leaf-dark); }
.btn.ghost:hover { background: var(--leaf-soft); }
.btn[disabled] { opacity: 0.55; cursor: default; }

:focus-visible { outline: 2px solid var(--leaf-dark); outline-offset: 2px; }

/* ---------- sections ---------- */

section.band { padding: 3rem 0; }
section.band + section.band { border-top: 1px solid var(--line); }
.band h2 { font-size: 1.65rem; margin: 0 0 0.4rem; text-align: center; }
.band .sub {
  text-align: center; color: var(--olive); max-width: 34rem;
  margin: 0 auto 2rem;
}

/* the light / struggle / renewal strip */
.stages { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.stage-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.4rem 1.3rem;
}
.stage-card .k {
  font-family: var(--sans); font-size: 0.72rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--leaf-dark); margin: 0 0 0.5rem;
}
.stage-card p { margin: 0; font-size: 0.975rem; }

/* the 3x3 collection grid — centred by default; add .side to .collection
   to dock the grid left with the intro text in a right-hand rail */
.collection-grid {
  display: grid; gap: 1.1rem;
  grid-template-columns: repeat(4, 1fr);   /* the curated eight, 4x2 */
}
@media (max-width: 56rem) { .collection-grid { grid-template-columns: repeat(2, 1fr); gap: 0.8rem; } }
.collection-grid .plant-card .art img[src$=".svg"] { width: 68%; height: 68%; object-fit: contain; }
.coll-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; text-align: left;
  display: flex; flex-direction: column;
}
.coll-card .art {
  aspect-ratio: 1 / 1; background: var(--art-bg);
  display: grid; place-items: center; overflow: hidden;
}
.coll-card .art img { width: 100%; height: 100%; object-fit: cover; }
.coll-card .art img[src$=".svg"] { width: 72%; height: 72%; object-fit: contain; }
.coll-card .art .mono { font-size: 2.2rem; color: var(--leaf); opacity: 0.7; font-style: italic; }
.coll-card .body { padding: 0.45rem 0.6rem 0.55rem; }
.coll-card .name { font-weight: 600; font-size: 0.86rem; line-height: 1.2; }
.coll-card .feat { color: var(--olive); font-style: italic; font-size: 0.72rem; line-height: 1.3; }
.coll-card .qty {
  font-family: var(--sans); font-size: 0.62rem; letter-spacing: 0.05em;
  color: var(--leaf-dark); margin-top: 0.2rem;
}
.coll-credit { text-align: center; font-size: 0.68rem; color: #a79c8b; margin-top: 0.9rem; }

.collection.side { display: grid; gap: 2.5rem; grid-template-columns: 1fr 20rem; align-items: start; }
.collection.side .collection-grid { margin: 0; }
.collection.side h2, .collection.side .sub { text-align: left; margin-left: 0; }
@media (max-width: 56rem) { .collection.side { grid-template-columns: 1fr; } }

/* family drill-down: 4-wide square tiles */
.fam-grid { display: grid; gap: 1rem; grid-template-columns: repeat(4, 1fr); }
@media (max-width: 56rem) { .fam-grid { grid-template-columns: repeat(2, 1fr); gap: 0.7rem; } }
.vcard {
  display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
}
.vcard .art {
  /* 3:4 portrait — the capture app's native frame, so photos fit exactly:
     no crop, no letterbox. Square SVG name cards center on the sage panel. */
  aspect-ratio: 3 / 4; background: var(--art-bg);
  display: grid; place-items: center; overflow: hidden;
}
.vcard .art img { width: 100%; height: 100%; object-fit: cover; }
.vcard .art img[src$=".svg"] { object-fit: contain; }
.vcard .art, .plant-card .art { position: relative; }
.paw-stamp {
  position: absolute; top: 0.55rem; right: 0.55rem;
  font-family: var(--sans); font-size: 0.62rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.28rem 0.5rem; border-radius: 999px;
  background: color-mix(in srgb, var(--card) 88%, transparent);
  color: #2f6d5a; border: 2px dashed #2f6d5a;
  transform: rotate(-7deg);
  pointer-events: none;
}
[data-theme="dark"] .paw-stamp { color: #93bfa9; border-color: #93bfa9; background: rgba(33,30,24,0.82); }
.vcard .desc.clamp {
  font-size: 0.8rem; color: color-mix(in srgb, var(--ink) 78%, var(--cream));
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.vcard.soldout .desc { opacity: 0.5; }
.vcard .art .mono { font-size: 2.4rem; color: var(--leaf); opacity: 0.7; font-style: italic; }
.vcard .body { padding: 0.6rem 0.75rem 0.75rem; display: flex; flex-direction: column; gap: 0.3rem; flex: 1; }
.vcard .name { font-weight: 600; font-size: 0.92rem; line-height: 1.25; }
.vcard .meta { font-family: var(--sans); font-size: 0.7rem; color: var(--olive); }
.vcard .buy-row { margin-top: auto; padding-top: 0.4rem; display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.vcard .state-note.ready { color: var(--leaf-dark); }
.vcard .price { font-size: 1.05rem; font-weight: 600; }
.vcard .buy-row .btn { margin-left: auto; padding: 0.35rem 0.85rem; font-size: 0.88rem; }
.vcard .state-note { font-family: var(--sans); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--olive); }
.vcard.soldout .art, .vcard.soldout .name, .vcard.soldout .meta { opacity: 0.5; }
.sort-row { margin-top: 0.5rem; }
.pager { display: flex; justify-content: center; align-items: center; gap: 0.9rem; margin: 1.1rem 0; }
.pager span { font-family: var(--sans); font-size: 0.82rem; color: var(--olive); }
.pager .pg { padding: 0.35rem 1rem; font-size: 1.05rem; line-height: 1; }
.pager .pg[disabled] { opacity: 0.35; cursor: default; }
.fam-search { max-width: 22rem; margin: 0.9rem auto 0; }
.fam-search input {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 0.6rem 0.875rem;
}
.fam-search input::placeholder { color: #a79c8b; }
#all-btn[aria-pressed="true"] { background: var(--warn); border-color: var(--warn); color: #fffdfa; }
.fam-tab[aria-pressed="true"] { background: var(--leaf); color: #fffdfa; border-color: var(--leaf); }
.sort-btn[aria-pressed="true"] { background: var(--leaf); color: #fffdfa; border-color: var(--leaf); }

/* dogs */
.dogs { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); }
.dog-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
}
.dog-card img { width: 100%; aspect-ratio: 4 / 3.4; object-fit: cover; object-position: center 28%; display: block; }
.dog-card .body { padding: 1.1rem 1.2rem 1.3rem; }
.dog-card h3 { margin: 0; font-size: 1.2rem; }
.dog-card .role {
  font-family: var(--sans); font-size: 0.72rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--olive); margin: 0.2rem 0 0.6rem;
}
.dog-card p { margin: 0; font-size: 0.95rem; }

/* ---------- shop grid ---------- */

.drop-grid { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr)); }
.plant-card {
  display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
}
.plant-card .art {
  aspect-ratio: 3 / 4; background: var(--art-bg);
  display: grid; place-items: center; overflow: hidden;
}
.plant-card .art img { width: 100%; height: 100%; object-fit: cover; }
.drop-grid .plant-card .art img[src$=".svg"] { object-fit: contain; }
.plant-card .art .mono {
  font-size: 2.6rem; color: var(--leaf); opacity: 0.75; font-style: italic;
}
.plant-card .body { padding: 0.9rem 1rem 1.1rem; display: flex; flex-direction: column; gap: 0.45rem; flex: 1; }
.plant-card .name { font-weight: 600; line-height: 1.25; }
.plant-card .genus { color: var(--olive); font-style: italic; font-size: 0.88rem; margin-top: -0.3rem; }
.plant-card .desc { font-size: 0.85rem; color: color-mix(in srgb, var(--ink) 80%, var(--cream)); }
.plant-card .buy-row {
  margin-top: auto; padding-top: 0.6rem;
  display: flex; align-items: center; gap: 0.6rem;
}
.plant-card .price { font-size: 1.15rem; font-weight: 600; }
.plant-card .buy-row .btn { margin-left: auto; padding: 0.45rem 1rem; font-size: 0.92rem; }

.badges { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.badge {
  font-family: var(--sans); font-size: 0.68rem; letter-spacing: 0.05em;
  padding: 0.16rem 0.5rem; border-radius: 999px;
  background: var(--track); color: var(--olive); border: 1px solid var(--line);
}
.badge.stage { background: var(--leaf-soft); color: var(--leaf-dark); border-color: #cfe0ca; }
.badge.safe  { background: #e6f0ea; color: #2f6d5a; border-color: #c9e0d5; }
.badge.toxic { background: #f6ece2; color: var(--warn); border-color: #e6d3bf; }
.badge.low   { background: #f6ece2; color: var(--warn); border-color: #e6d3bf; }
.badge.exact { background: #eae6f2; color: #5b4a86; border-color: #d6cce8; }
[data-theme="dark"] .badge.exact { background: #322c40; color: #c3b4e6; border-color: #463d5c; }
.lb-body .photo-note { font-family: var(--sans); font-size: 0.8rem; color: var(--olive); margin: 0.5rem 0 0; }

.empty-drop {
  text-align: center; background: var(--card); border: 1px dashed var(--line);
  border-radius: var(--radius); padding: 3rem 1.5rem; max-width: 34rem; margin: 0 auto;
}
.empty-drop h3 { margin: 0 0 0.5rem; font-size: 1.3rem; }
.empty-drop p { margin: 0 0 1.25rem; color: var(--olive); }

/* ---------- waitlist ---------- */

.waitlist { max-width: 26rem; margin: 0 auto; }
.waitlist .field { display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: center; }
.waitlist input[type="email"] {
  flex: 1 1 12rem; min-width: 0; padding: 0.7rem 0.875rem;
  font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
}
.waitlist input::placeholder { color: #a79c8b; }
.waitlist .status { min-height: 1.4rem; margin: 0.75rem 0 0; font-size: 0.92rem; text-align: center; }
.waitlist .status.ok { color: var(--leaf-dark); }
.waitlist .status.error { color: #8c3a2b; }
.waitlist .fineprint { font-size: 0.8rem; color: var(--olive); text-align: center; margin: 0.4rem 0 0; }

.contact-form { max-width: 30rem; }
.contact-fields { display: flex; flex-direction: column; gap: 0.6rem; }
.contact-fields select, .contact-fields textarea {
  font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 0.7rem 0.875rem;
}
.contact-fields textarea { resize: vertical; min-height: 6rem; }
.contact-fields .btn { align-self: center; }
#contact .sub a { color: inherit; }

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

/* ---------- story page ---------- */

.prose { max-width: 42rem; margin: 0 auto; padding: 2.5rem 0 1rem; }
.prose h1 { font-size: clamp(2rem, 4.5vw, 2.8rem); line-height: 1.15; margin: 0 0 0.5rem; }
.prose h2 { font-size: 1.4rem; margin: 2.2rem 0 0.6rem; }
.prose p  { margin: 0 0 1rem; }
.prose .big-quote {
  font-size: 1.3rem; line-height: 1.5; font-style: italic;
  color: var(--leaf-dark); border-left: 3px solid var(--leaf);
  padding-left: 1.1rem; margin: 1.6rem 0;
}
.prose .aside { font-size: 0.92rem; color: var(--olive); }
.prose img.inline-photo { border-radius: var(--radius); margin: 0.5rem 0 1rem; }

/* ---------- footer ---------- */

footer.site {
  border-top: 1px solid var(--line);
  margin-top: 3rem; padding: 2rem 0 2.5rem;
  text-align: center; font-size: 0.875rem; color: var(--olive);
}
footer.site p { margin: 0.3rem 0; }
footer.site a { color: inherit; text-underline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}


/* ---------- dark mode (follows system preference) ---------- */
[data-theme="dark"] {
    --cream:     #211e18;
    --card:      #2b271f;
    --ink:       #ece3d2;
    --olive:     #b9ab83;
    --leaf:      #5d8253;
    --leaf-dark: #7ba26c;
    --leaf-soft: #333c2d;
    --line:      #453f34;
    --warn:      #d9a05f;
    --track:     #383226;
}
[data-theme="dark"] .masthead-logo { box-shadow: 0 0 0 1px var(--line); }
[data-theme="dark"] .badge { background: var(--track); color: var(--olive); border-color: var(--line); }
[data-theme="dark"] .badge.stage { background: #2f3c2a; color: #a9c69b; border-color: #3d4f36; }
[data-theme="dark"] .badge.safe  { background: #27362e; color: #93bfa9; border-color: #35493d; }
[data-theme="dark"] .badge.toxic, [data-theme="dark"] .badge.low { background: #3c2f22; color: #d9a05f; border-color: #4e3c2a; }
[data-theme="dark"] img { opacity: 0.94; }

.theme-toggle {
  font: inherit; font-size: 1.05rem; line-height: 1;
  padding: 0.4rem 0.7rem; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--olive); border: 1px solid var(--line);
}
.theme-toggle:hover { background: var(--leaf-soft); }


/* ---------- plant lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(24, 21, 15, 0.55);
  display: grid; place-items: center; padding: 1.25rem;
}
.lightbox[hidden] { display: none; }
.lb-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); max-width: 40rem; width: 100%;
  max-height: 90dvh; overflow: auto; position: relative;
}
.lb-art { background: var(--art-bg); display: grid; place-items: center; }
.lb-art img { width: 100%; max-height: 55dvh; object-fit: contain; display: block; }
.lb-body { padding: 1rem 1.25rem 1.25rem; }
.lb-body .name { font-size: 1.3rem; font-weight: 600; }
.lb-body .genus { color: var(--olive); font-style: italic; margin-bottom: 0.4rem; }
.lb-body .desc { font-size: 0.95rem; margin: 0.4rem 0; }
.lb-body .meta { font-family: var(--sans); font-size: 0.78rem; color: var(--olive); }
.lb-body .buy-row { display: flex; align-items: center; gap: 0.7rem; margin-top: 0.9rem; }
.lb-body .price { font-size: 1.2rem; font-weight: 600; }
.lb-close {
  position: absolute; top: 0.6rem; right: 0.6rem; z-index: 2;
  font: inherit; font-size: 1.1rem; line-height: 1; cursor: pointer;
  width: 2.2rem; height: 2.2rem; border-radius: 999px;
  background: var(--card); color: var(--olive); border: 1px solid var(--line);
}
.vcard .art, .plant-card .art { cursor: zoom-in; }
