/* Sprig — Herbarium tokens, the same as the app (docs/design/plantdoc-tokens.json). */
:root {
  --bg-page: #F4F5EE;
  --bg-card: #FBFBF7;
  --bg-surface: #E9ECDF;
  --bg-sunken: #ECEEE3;
  --text-primary: #23321F;
  --text-body: #4A5244;
  --text-muted: #6A7163;
  --border: #D6DAC9;
  --brand: #3F6B30;
  --brand-tint: #DFE7CF;
  --on-brand: #FBFBF7;
  --paywall: #9E4A17;
  --paywall-tint: #F1E3D2;
  --dark: #151A13;
  --dark-text: #E9ECDD;
  --dark-sub: #A9B19C;
  --accent: #CFE3A0;
  --display: 'Young Serif', Georgia, serif;
  --body: 'Karla', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg-page);
  color: var(--text-primary);
  font: 400 17px/1.55 var(--body);
}
img { max-width: 100%; display: block; }
a { color: var(--brand); }
h1, h2, h3 { font-family: var(--display); font-weight: 400; margin: 0; letter-spacing: -0.3px; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* --- header ----------------------------------------------------------- */
.top {
  display: flex; align-items: center; justify-content: space-between;
  padding-block: 18px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text-primary); }
.brand .mark { width: 40px; height: 40px; border-radius: 9px; display: block; }
.brand span { font: 400 22px/1 var(--display); }
.top nav { display: flex; gap: 20px; font-weight: 600; font-size: 15px; }
.top nav a { color: var(--text-body); text-decoration: none; }
.top nav a:hover { color: var(--brand); }

/* --- buttons ---------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 54px; padding: 0 22px; border-radius: 8px;
  font: 600 16.5px/1 var(--body); text-decoration: none; border: 0;
}
.btn.primary { background: var(--brand); color: var(--on-brand); }
.btn.outline { background: var(--bg-card); color: var(--text-primary); border: 1px solid var(--border); }
.btn.dark { background: var(--dark); color: var(--dark-text); }
.btn small { font-weight: 500; opacity: .75; }

/* --- hero ------------------------------------------------------------- */
.hero {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center;
  padding-block: 40px 64px;
}
.hero h1 { font-size: clamp(38px, 6vw, 60px); line-height: 1.06; }
.hero p.lead { font-size: 19px; color: var(--text-body); max-width: 520px; margin: 18px 0 28px; }
.hero .cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero .note { margin-top: 14px; font-size: 14px; color: var(--text-muted); }
.hero-art {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
  padding: 24px; display: grid; gap: 14px;
}
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px;
  border-radius: 4px; font-size: 12.5px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase;
}
.chip.alert { background: #F3E1DB; color: #A8322A; }
.chip.ok { background: var(--brand-tint); color: var(--brand); }
.chip.premium { background: var(--paywall-tint); color: var(--paywall); }
.dx { display: flex; gap: 14px; align-items: center; }
.dx .ph {
  width: 84px; height: 84px; border-radius: 8px; flex: none;
  background: var(--bg-sunken); border: 2px dashed #B9BFA8; display: grid; place-items: center;
}
.dx .ph img { width: 44px; opacity: .9; }
.dx h3 { font-size: 24px; color: #A8322A; }
.dx p { margin: 2px 0 0; font-size: 14px; color: var(--text-muted); }
.task {
  display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--bg-page);
}
.task img { width: 34px; }
.task b { display: block; font-size: 15.5px; }
.task span { font-size: 13px; color: #A8322A; }
.task .done { margin-left: auto; width: 36px; height: 36px; border-radius: 50%; background: var(--brand-tint); display: grid; place-items: center; }
.task .done img { width: 24px; }

/* --- sections --------------------------------------------------------- */
section { padding: 56px 0; }
.overline { font-size: 12px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase; color: var(--text-muted); }
section h2 { font-size: clamp(30px, 4vw, 40px); margin: 8px 0 12px; }
section > .wrap > p.sub { color: var(--text-body); max-width: 620px; margin: 0 0 32px; }

.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.feature {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 24px;
  display: grid; grid-template-columns: 64px 1fr; gap: 16px; align-items: start;
}
.feature .circle { width: 64px; height: 64px; border-radius: 50%; background: var(--brand-tint); display: grid; place-items: center; }
.feature .circle.warm { background: var(--paywall-tint); }
.feature .circle img { width: 42px; }
.feature h3 { font-size: 22px; margin-bottom: 6px; }
.feature p { margin: 0; color: var(--text-body); font-size: 16px; }

.timelapse {
  background: var(--dark); color: var(--dark-text); border-radius: 12px; padding: 40px;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px;
}
.timelapse > div:first-child { max-width: 620px; }
.timelapse h2 { color: var(--dark-text); }
.timelapse p { color: var(--dark-sub); }
.timelapse .overline { color: var(--accent); }
.strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.strip figure { margin: 0; position: relative; min-width: 0; }
.strip img { width: 100%; aspect-ratio: 9 / 16; border-radius: 6px; object-fit: cover; }
.strip figure:last-child img { outline: 2.5px solid var(--bg-page); outline-offset: -2.5px; }
.strip figcaption {
  position: absolute; left: 4px; top: 4px; padding: 1px 5px; border-radius: 4px;
  background: var(--brand); color: var(--on-brand); font-size: 12px; font-weight: 700;
  white-space: nowrap; line-height: 1.5;
}
.timelapse .tag { display: inline-block; margin-top: 8px; color: var(--accent); font-weight: 600; }

.illo { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; }
.illo img { max-width: 360px; margin: 0 auto; }

.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.plan { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 26px; }
.plan.premium { border: 2px solid var(--paywall); background: var(--paywall-tint); }
.plan h3 { font-size: 26px; margin: 10px 0 14px; }
.plan ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.plan li { display: flex; gap: 10px; align-items: flex-start; color: var(--text-body); }
.plan li::before {
  content: '✓'; flex: none; width: 22px; height: 22px; border-radius: 50%;
  background: var(--brand); color: var(--on-brand); font-size: 12px; font-weight: 700;
  display: grid; place-items: center; margin-top: 2px;
}
.plan.premium li::before { background: var(--paywall); }
.plan .price { margin-top: 18px; font-size: 14px; color: var(--text-muted); }

.faq details {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px;
  padding: 16px 20px; margin-bottom: 10px;
}
.faq summary { cursor: pointer; font-weight: 600; font-size: 17px; }
.faq details p { margin: 10px 0 0; color: var(--text-body); }

footer { border-top: 1px solid var(--border); padding: 32px 0 48px; margin-top: 24px; font-size: 15px; color: var(--text-muted); }
footer .row { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; align-items: center; }
footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
footer a { color: var(--text-body); font-weight: 600; text-decoration: none; }

/* --- legal pages ------------------------------------------------------ */
.legal { max-width: 760px; padding: 24px 20px 40px; margin: 0 auto; }
.legal h1 { font-size: clamp(34px, 5vw, 44px); margin: 12px 0 6px; }
.legal .updated { color: var(--text-muted); font-size: 15px; margin-bottom: 28px; }
.legal h2 { font-size: 24px; margin: 36px 0 10px; }
.legal h3 { font: 700 17px/1.4 var(--body); margin: 20px 0 6px; }
.legal p, .legal li { color: var(--text-body); }
.legal ul { padding-left: 22px; }
.legal li { margin: 6px 0; }
.legal .box { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 18px 20px; }
.legal table { width: 100%; border-collapse: collapse; font-size: 15px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.legal th, .legal td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; color: var(--text-body); }
.legal th { color: var(--text-primary); background: var(--bg-surface); }

@media (max-width: 820px) {
  .hero, .timelapse, .illo, .plans, .features { grid-template-columns: 1fr; }
  .hero { padding-block-start: 16px; }
  .top nav .hide-sm { display: none; }
  .timelapse { padding: 28px 22px; }
  .feature { grid-template-columns: 52px 1fr; padding: 20px; }
  .feature .circle { width: 52px; height: 52px; }
  .feature .circle img { width: 34px; }
}

/* --- App Store: live after launch, "coming soon" before -------------- */
body.prelaunch .store-live { display: none !important; }
body:not(.prelaunch) .store-soon { display: none !important; }
.get {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 36px 40px;
  display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center;
}
.get h2 { margin-top: 8px; }
.get img { border-radius: 10px; }
.get img.art { width: 260px; border-radius: 0; }
@media (max-width: 820px) {
  .get img.art { display: none; }
  .get { grid-template-columns: 1fr; padding: 26px 22px; }
}

.btn .apple { width: 17px; height: 20px; flex: none; margin-top: -2px; }
@media (max-width: 520px) {
  .strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .strip { gap: 6px; }
  .strip figure:nth-child(-n+3) { display: none; }  /* phones: the last four weeks */
}
