/* Grow Love — landing styles
   Palette mirrors the app's AppTheme tokens (wood / matcha / teal).
   Light = Meadow (default), Dark = Forest Night via prefers-color-scheme. */

:root {
  /* Meadow (light) */
  --bg-top: #F6F1E4;
  --bg-bottom: #F1EAD8;
  --surface: #FDFBF4;
  --surface-2: #F3ECDC;
  --text: #4A3628;        /* bark */
  --text-soft: #8A7860;   /* wood */
  --accent: #3E9C92;      /* teal */
  --accent-strong: #338177;
  --on-accent: #FDFBF4;
  --matcha: #7FA05F;
  --matcha-deep: #5E7F49;
  --rim: rgba(74, 54, 40, 0.10);
  --rim-strong: rgba(74, 54, 40, 0.16);
  --shadow: 0 18px 50px -28px rgba(74, 54, 40, 0.45);
  --shadow-soft: 0 10px 30px -22px rgba(74, 54, 40, 0.5);

  --serif: Georgia, "Times New Roman", "Iowan Old Style", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --maxw: 1120px;
  --radius: 22px;
  --radius-lg: 30px;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Forest Night (dark) */
    --bg-top: #1C2620;
    --bg-bottom: #141C17;
    --surface: #243129;
    --surface-2: #1E2A23;
    --text: #F0E9D8;        /* cream */
    --text-soft: #9BA88E;
    --accent: #5FB8AE;
    --accent-strong: #6FC6BC;
    --on-accent: #10201C;
    --matcha: #6E9256;
    --matcha-deep: #45603A;
    --rim: rgba(240, 233, 216, 0.10);
    --rim-strong: rgba(240, 233, 216, 0.18);
    --shadow: 0 22px 60px -30px rgba(0, 0, 0, 0.7);
    --shadow-soft: 0 12px 34px -24px rgba(0, 0, 0, 0.7);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background: linear-gradient(170deg, var(--bg-top), var(--bg-bottom));
  background-attachment: fixed;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

a { color: var(--accent-strong); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-strong);
  font-weight: 700;
  margin: 0 0 14px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(1.2) blur(10px);
  background: color-mix(in srgb, var(--bg-top) 82%, transparent);
  border-bottom: 1px solid var(--rim);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 1.25rem; font-weight: 600; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand .leaf { width: 26px; height: 26px; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a { color: var(--text-soft); font-size: 0.95rem; font-weight: 500; }
.nav a:hover { color: var(--text); text-decoration: none; }
@media (max-width: 720px) { .nav { display: none; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1rem;
  padding: 14px 24px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: var(--shadow-soft);
}
.btn-primary:hover { background: var(--accent-strong); transform: translateY(-1px); text-decoration: none; }
.btn-primary:disabled { opacity: 0.9; cursor: default; }
.btn-store {
  gap: 12px;
  padding: 15px 26px;
  text-align: left;
  line-height: 1.15;
}
.btn-store small { display: block; font-size: 0.7rem; font-weight: 500; opacity: 0.85; letter-spacing: 0.02em; }
.btn-store strong { display: block; font-size: 1.02rem; font-weight: 700; }
.btn-store .apple { width: 22px; height: 26px; flex: none; }

/* ---------- Hero ---------- */
.hero { padding: 64px 0 40px; }
.hero .wrap {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.hero .wrap > * { min-width: 0; }   /* let grid items shrink below content size */
.hero h1 {
  font-size: clamp(2.4rem, 5.2vw, 3.8rem);
  margin: 0 0 18px;
}
.hero .wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--accent-strong);
  margin: 0 0 20px;
}
.hero .wordmark .leaf { width: 28px; height: 28px; }
.hero .sub {
  font-size: 1.12rem;
  color: var(--text-soft);
  max-width: 30ch;
  margin: 0 0 30px;
}
.hero-cta { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }

/* Email capture */
.notify { width: 100%; max-width: 420px; }
.notify-label { font-size: 0.9rem; color: var(--text-soft); margin: 0 0 8px; font-weight: 500; }
.notify-form { display: flex; gap: 10px; }
.notify input[type="email"] {
  flex: 1;
  min-width: 0;
  font-family: var(--sans);
  font-size: 1rem;
  padding: 13px 18px;
  border-radius: 999px;
  border: 1px solid var(--rim-strong);
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.notify input[type="email"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
}
.notify .btn-primary { padding: 13px 22px; flex: none; }
.notify input[type="email"]:disabled,
.notify .btn-primary:disabled { opacity: 0.55; cursor: default; }
.notify-msg { font-size: 0.92rem; color: var(--text-soft); margin: 10px 2px 0; font-weight: 600; min-height: 1.2em; }
.notify-msg.is-ok { color: var(--matcha-deep); }
.notify-msg.is-err { color: #C0553F; }
@media (prefers-color-scheme: dark) {
  .notify-msg.is-ok { color: var(--accent-strong); }
  .notify-msg.is-err { color: #E8907A; }   /* light enough to read on Forest Night */
}

/* Honeypot: off-screen for people, still in the DOM (and still labelled) for the
   bots that fill every field. `display:none` would let smarter bots skip it. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Phone frame */
.phone {
  --w: 300px;
  width: var(--w);
  aspect-ratio: 300 / 620;
  margin: 0 auto;
  border-radius: 46px;
  padding: 12px;
  background: linear-gradient(160deg, #2b2016, #16100a);
  box-shadow: var(--shadow), inset 0 0 0 2px rgba(255,255,255,0.06);
  position: relative;
}
@media (prefers-color-scheme: dark) { .phone { background: linear-gradient(160deg, #0a0f0c, #050806); } }
.phone-screen {
  width: 100%;
  height: 100%;
  border-radius: 36px;
  overflow: hidden;
  position: relative;
  background: linear-gradient(175deg, var(--bg-top), var(--bg-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
}
.phone-notch {
  position: absolute;
  top: 10px; left: 50%; transform: translateX(-50%);
  width: 96px; height: 26px; border-radius: 14px;
  background: #16100a; z-index: 3;
}
@media (prefers-color-scheme: dark) { .phone-notch { background: #050806; } }
.phone-header { text-align: center; padding: 40px 16px 0; z-index: 2; }
.phone-header .names { font-family: var(--serif); font-size: 1.1rem; color: var(--text); font-weight: 600; }
.phone-header .since { font-size: 0.72rem; color: var(--text-soft); letter-spacing: 0.02em; }
.phone-counter { text-align: center; z-index: 2; margin-top: 10px; }
.phone-counter .num { font-family: var(--serif); font-size: 3.1rem; line-height: 1; color: var(--text); font-weight: 600; }
.phone-counter .unit { font-size: 0.8rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent-strong); font-weight: 700; }
.phone-tree {
  margin-top: auto;
  width: 78%;
  object-fit: contain;
  object-position: bottom;
  align-self: center;
  filter: drop-shadow(0 12px 20px rgba(0,0,0,0.18));
}
.phone-ground {
  width: 100%; height: 54px;
  background: radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--matcha) 34%, transparent), transparent 70%);
}
.phone-tabbar {
  position: absolute; bottom: 0; left: 0; right: 0; height: 46px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border-top: 1px solid var(--rim);
  display: flex; align-items: center; justify-content: space-around;
  backdrop-filter: blur(6px);
}
.phone-tabbar span { width: 20px; height: 20px; border-radius: 6px; background: var(--text-soft); opacity: 0.4; }
.phone-tabbar span:first-child { opacity: 1; background: var(--accent); }

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 40px; text-align: center; }
  .hero .sub { margin-left: auto; margin-right: auto; }
  .hero-cta { align-items: center; }
  .hero .wordmark { justify-content: center; }
  .phone { order: -1; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 2.15rem; }
  .notify-form { flex-wrap: wrap; }
  .notify-form input[type="email"] { flex: 1 1 100%; }
  .notify .btn-primary { width: 100%; }
  .section-head p, .coming .teaser { hyphens: auto; }
}

/* ---------- Section shell ---------- */
section { padding: 72px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.section-head h2 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); margin: 0 0 14px; }
.section-head p { color: var(--text-soft); font-size: 1.08rem; margin: 0; }

/* ---------- How it grows ---------- */
.grows { background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--surface) 40%, transparent), transparent); }
.stage-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 8px 24px 24px;
  margin: 0 -24px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.stage-track::-webkit-scrollbar { height: 8px; }
.stage-track::-webkit-scrollbar-thumb { background: var(--rim-strong); border-radius: 999px; }
.stage {
  scroll-snap-align: center;
  flex: 0 0 214px;
  background: var(--surface);
  border: 1px solid var(--rim);
  border-radius: var(--radius);
  padding: 22px 16px 20px;
  text-align: center;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
}
/* Fixed-height stage box, tall enough for the tallest (mighty). Each <img> gets an
   explicit height inline (see index.html) forming a strict left→right size progression
   that mirrors the app's TreeStage.scaleRange curve; all bottom-anchored on one baseline. */
.stage-art {
  height: 156px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  margin-bottom: 14px;
}
.stage-art img { width: auto; max-width: 100%; object-fit: contain; object-position: bottom; filter: drop-shadow(0 8px 12px rgba(0,0,0,0.12)); }
.stage-day {
  display: inline-block;
  align-self: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--accent-strong);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 8px;
}
.stage h3 { font-size: 1.15rem; margin: 0 0 4px; }
.stage p { font-size: 0.86rem; color: var(--text-soft); margin: 0; }

/* ---------- Features ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.feature {
  background: var(--surface);
  border: 1px solid var(--rim);
  border-radius: var(--radius);
  padding: 30px 26px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.feature-icon {
  width: 66px; height: 66px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 18px;
  background: color-mix(in srgb, var(--matcha) 16%, var(--surface-2));
  margin-bottom: 18px;
}
.feature-icon img { max-height: 46px; width: auto; }
.feature-icon svg { width: 34px; height: 34px; }
.feature h3 { font-size: 1.22rem; margin: 0 0 8px; }
.feature p { color: var(--text-soft); font-size: 0.98rem; margin: 0; }
@media (max-width: 860px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .feature-grid { grid-template-columns: 1fr; } }

/* ---------- Screenshots ---------- */
.shots-track {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding: 10px 24px 28px;
  margin: 0 -24px;
  scroll-snap-type: x mandatory;
}
.shots-track::-webkit-scrollbar { height: 8px; }
.shots-track::-webkit-scrollbar-thumb { background: var(--rim-strong); border-radius: 999px; }
.shot {
  scroll-snap-align: center;
  flex: 0 0 250px;
  aspect-ratio: 250 / 520;
  border-radius: 34px;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--rim);
  box-shadow: var(--shadow-soft);
  position: relative;
}
.shot img { width: 100%; height: 100%; object-fit: cover; }
.shot-placeholder {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 10px; text-align: center; padding: 24px;
  color: var(--text-soft);
}
.shot-placeholder .leaf { width: 40px; height: 40px; opacity: 0.5; }
.shot-placeholder span { font-size: 0.85rem; }

/* ---------- Coming soon ---------- */
.coming {
  text-align: center;
  padding: 60px 0;
}
.coming .teaser {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  font-family: var(--serif);
  font-size: clamp(1.1rem, 2.4vw, 1.5rem);
  color: var(--text);
  padding: 22px 34px;
  border: 1px dashed var(--rim-strong);
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--surface) 55%, transparent);
}
.coming .teaser .dot { color: var(--accent); }
.coming .eyebrow { margin-bottom: 18px; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--rim);
  padding: 40px 0;
  margin-top: 20px;
}
.site-footer .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.site-footer .brand { font-size: 1.1rem; }
.footer-links { display: flex; gap: 26px; }
.footer-links a { color: var(--text-soft); font-size: 0.95rem; }
.footer-links a:hover { color: var(--text); text-decoration: none; }

/* ---------- Privacy page ---------- */
.doc { max-width: 760px; padding: 60px 24px 80px; }
.doc h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin: 0 0 8px; }
.doc .updated { color: var(--text-soft); font-size: 0.92rem; margin: 0 0 40px; }
.doc h2 { font-size: 1.4rem; margin: 38px 0 12px; }
.doc p, .doc li { color: var(--text); font-size: 1.02rem; }
.doc ul { padding-left: 20px; }
.doc li { margin-bottom: 8px; }
.doc .back { display: inline-block; margin-bottom: 30px; color: var(--text-soft); font-weight: 600; }

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