/* Mini Garden website. Tokens and rules: see DESIGN.md at the project root. */

:root {
  --bg: #fff8e6;
  --surface: #ffffff;
  --border: #eadfc6;
  --ink: #3b2f1e;
  --ink-soft: #6f6150;
  --primary: #2e7a33;
  --primary-hover: #256629;
  --on-primary: #ffffff;
  --accent: #f5b82e;
  --sky-top: #87cdf2;
  --sky-bottom: #fdf1c7;
  --hill: #7cc864;
  --hill-deep: #43a047;
  --badge-bg: #000000;
  --badge-fg: #ffffff;

  --font: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, -apple-system, sans-serif;
  --fs-display: clamp(40px, 6vw, 64px);
  --fs-h2: clamp(30px, 4vw, 40px);
  --fs-h3: 22px;
  --fs-lead: 20px;
  --fs-body: 17px;
  --fs-small: 14px;

  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px; --s-10: 128px;
  --section: var(--s-9);
  --page: 1120px;

  --r-sm: 12px; --r-md: 20px; --r-lg: 32px; --r-pill: 999px;
  --shadow-card: 0 1px 2px rgb(59 47 30 / 0.06), 0 6px 20px rgb(59 47 30 / 0.07);
  --shadow-device: 0 30px 60px -20px rgb(40 30 15 / 0.45), 0 12px 24px -12px rgb(40 30 15 / 0.3);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121730;
    --surface: #1c2244;
    --border: #2c3460;
    --ink: #f3ead8;
    --ink-soft: #b8b3cc;
    --primary: #7cc864;
    --primary-hover: #93d77d;
    --on-primary: #121730;
    --sky-top: #1a2150;
    --sky-bottom: #3a3f6b;
    --hill: #2f5a3c;
    --hill-deep: #1f4030;
    --badge-bg: #ffffff;
    --badge-fg: #000000;
    --shadow-card: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px rgb(0 0 0 / 0.25);
    --shadow-device: 0 30px 60px -20px rgb(0 0 0 / 0.7), 0 12px 24px -12px rgb(0 0 0 / 0.5);
  }
}
@media (max-width: 720px) { :root { --section: var(--s-8); } }

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 500 var(--fs-body)/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: var(--fs-display); font-weight: 900; line-height: 1.05; }
h2 { font-size: var(--fs-h2); font-weight: 900; }
h3 { font-size: var(--fs-h3); font-weight: 800; line-height: 1.3; }
p { margin: 0; }
a { color: var(--primary); text-underline-offset: 3px; text-decoration-thickness: 2px; }
a:hover { color: var(--primary-hover); }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(var(--page), 100% - 2 * var(--s-4)); margin-inline: auto; }
.lead { font-size: var(--fs-lead); font-weight: 600; line-height: 1.55; color: var(--ink-soft); }
.small { font-size: var(--fs-small); font-weight: 600; color: var(--ink-soft); }
.eyebrow {
  font-size: var(--fs-small); font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--primary); margin-bottom: var(--s-3);
}
.skip {
  position: absolute; left: var(--s-4); top: -100px; z-index: 100;
  background: var(--surface); color: var(--ink); padding: var(--s-3) var(--s-4); border-radius: var(--r-sm);
  font-weight: 800; box-shadow: var(--shadow-card);
}
.skip:focus { top: var(--s-3); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  transition: background-color 0.2s, box-shadow 0.2s;
}
.site-header.scrolled { background: color-mix(in srgb, var(--surface) 92%, transparent); box-shadow: 0 1px 0 var(--border); backdrop-filter: blur(8px); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); min-height: 68px; }
.brand { display: flex; align-items: center; gap: var(--s-3); color: var(--ink); text-decoration: none; font-weight: 900; font-size: 19px; }
.brand img { width: 36px; height: 36px; border-radius: 9px; box-shadow: 0 1px 3px rgb(0 0 0 / 0.2); }
.brand:hover { color: var(--ink); }
.nav { display: flex; align-items: center; gap: var(--s-5); }
.nav a:not(.badge) { color: var(--ink); text-decoration: none; font-weight: 700; }
.nav a:not(.badge):hover { color: var(--primary); }
.brand span, .badge span { white-space: nowrap; }
@media (max-width: 560px) { .nav .nav-text { display: none; } }
@media (max-width: 480px) { .nav .badge.compact { display: none; } }

/* App Store badge.
   PLACEHOLDER: replace each .badge with Apple's official badge SVG from
   https://tools.applemarketingtools.com (black for light mode, white for dark),
   and set href to the real App Store URL once the app is live. */
.badge {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--badge-bg); color: var(--badge-fg); text-decoration: none;
  padding: 8px 18px 8px 14px; border-radius: 10px; min-height: 48px;
  line-height: 1.1; transition: transform 0.15s;
}
.badge:hover { color: var(--badge-fg); }
.badge:active { transform: scale(0.97); }
.badge svg { width: 26px; height: 26px; flex: none; }
.badge small { display: block; font-size: 11px; font-weight: 600; letter-spacing: 0.02em; }
.badge strong { display: block; font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
.badge.compact { min-height: 40px; padding: 6px 12px 6px 10px; }
.badge.compact strong { font-size: 15px; }
.badge.compact small { font-size: 9px; }
.badge.compact svg { width: 20px; height: 20px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 48px; padding: 0 var(--s-5); border-radius: var(--r-sm);
  font: 800 16px/1 var(--font); text-decoration: none; cursor: pointer;
  transition: background-color 0.15s, transform 0.15s;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--primary); color: var(--on-primary); border: 0; }
.btn-primary:hover { background: var(--primary-hover); color: var(--on-primary); }
.btn-secondary { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn[aria-disabled="true"] { opacity: 0.45; pointer-events: none; }

/* Device frames */
.phone {
  position: relative; width: 100%; max-width: 300px; aspect-ratio: 660 / 1434;
  border-radius: 48px; padding: 10px; background: #15151a;
  box-shadow: var(--shadow-device);
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 39px; }
.phone::after { /* Dynamic Island: drawn so every frame matches */
  content: ""; position: absolute; top: 20px; left: 50%; translate: -50% 0;
  width: 31%; height: 3.6%; background: #000; border-radius: var(--r-pill);
}
.tablet {
  width: 100%; max-width: 520px; aspect-ratio: 1400 / 1866;
  border-radius: 34px; padding: 14px; background: #15151a; box-shadow: var(--shadow-device);
}
.tablet img { width: 100%; height: 100%; object-fit: cover; border-radius: 22px; }

/* Hero */
.hero {
  position: relative; margin-top: -68px; padding-top: calc(68px + var(--s-8));
  background: linear-gradient(var(--sky-top), var(--sky-bottom) 70%);
  overflow: hidden;
}
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: var(--s-7); }
.hero-copy { padding-bottom: var(--s-10); }
.hero-copy h1 { margin-bottom: var(--s-5); max-width: 13ch; }
.hero-copy .lead { max-width: 34ch; margin-bottom: var(--s-6); color: var(--ink); opacity: 0.82; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4) var(--s-5); }
.facts { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); list-style: none; padding: 0; margin: 0; font-size: var(--fs-small); font-weight: 700; color: var(--ink); opacity: 0.8; }
.facts li { display: flex; align-items: center; gap: 6px; }
.facts svg { width: 16px; height: 16px; color: var(--primary); }
.hero-device { display: flex; justify-content: center; padding-bottom: var(--s-8); }
.hero-device .phone { max-width: 320px; rotate: 3deg; }
.sun {
  position: absolute; z-index: 0; top: 90px; right: 8%; width: 150px; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, #ffe27a 0 45%, rgb(255 226 122 / 0.35) 46% 60%, transparent 61%);
}
@media (prefers-color-scheme: dark) {
  .sun { /* crescent moon */
    width: 84px; background: none; top: 110px;
    box-shadow: inset -22px 10px 0 0 #e9ecff, 0 0 40px 8px rgb(233 236 255 / 0.12);
  }
}
.hills { position: absolute; left: 0; right: 0; bottom: -1px; z-index: 0; width: 100%; height: 34%; min-height: 200px; }
.hills .back { fill: var(--hill); }
.hills .front { fill: var(--hill-deep); }
.hills .ground { fill: var(--bg); }

@media (max-width: 860px) {
  .hero { padding-top: calc(68px + var(--s-6)); }
  .hero .wrap { grid-template-columns: 1fr; gap: var(--s-6); text-align: left; }
  .hero-copy { padding-bottom: 0; }
  .hero-device { padding-bottom: var(--s-9); }
  .hero-device .phone { max-width: 260px; }
  .sun { width: 110px; top: 80px; right: -20px; }
}

/* Sections */
section { padding-block: var(--section); }
.section-head { max-width: 640px; margin-bottom: var(--s-7); }
.section-head h2 { margin-bottom: var(--s-4); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-8); align-items: center; }
.split.reverse > :first-child { order: 2; }
.split .device-col { display: flex; justify-content: center; }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; gap: var(--s-7); }
  .split.reverse > :first-child { order: 0; }
  .split .phone { max-width: 260px; }
}

.steps { list-style: none; padding: 0; margin: var(--s-6) 0 0; display: grid; gap: var(--s-6); counter-reset: step; }
.steps li { display: grid; grid-template-columns: 48px 1fr; gap: var(--s-4); counter-increment: step; }
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  background: var(--accent); color: #3b2f1e; font-weight: 900; font-size: 20px;
}
.steps h3 { margin-bottom: var(--s-1); }
.steps p { color: var(--ink-soft); max-width: 46ch; }

/* Plant lineup */
.plants { background: var(--surface); border-block: 1px solid var(--border); }
.lineup { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(8, 1fr); gap: var(--s-3); }
.lineup li { display: flex; flex-direction: column; align-items: center; gap: var(--s-2); text-align: center; }
.lineup .art {
  width: 100%; max-width: 104px; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%;
  font-size: clamp(32px, 4vw, 48px); background: var(--tint); line-height: 1;
}
.lineup .name { font-weight: 800; font-size: 15px; line-height: 1.25; }
.lineup .tier { font-size: 12px; font-weight: 700; color: var(--ink-soft); }
.lineup li:last-child .art { box-shadow: 0 0 0 3px var(--accent); }
@media (max-width: 860px) { .lineup { grid-template-columns: repeat(4, 1fr); row-gap: var(--s-5); } }
.milestones { margin-top: var(--s-7); display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); font-weight: 700; color: var(--ink-soft); }
.chip { display: inline-flex; align-items: center; min-height: 32px; padding: 0 var(--s-3); border-radius: var(--r-pill); background: color-mix(in srgb, var(--accent) 28%, transparent); color: var(--ink); font-weight: 800; font-size: 15px; }

/* Day & night */
.daynight .pair { display: flex; justify-content: center; align-items: flex-start; gap: var(--s-7); }
.daynight figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: var(--s-4); }
.daynight figure:last-child { margin-top: var(--s-8); }
.daynight figcaption { font-weight: 800; }
.daynight .phone { max-width: 280px; }
.daynight .section-head { margin-inline: auto; text-align: center; }
@media (max-width: 640px) {
  .daynight .pair { gap: var(--s-4); }
  .daynight figure:last-child { margin-top: var(--s-7); }
  .daynight .phone { border-radius: 30px; padding: 6px; }
  .daynight .phone img { border-radius: 25px; }
  .daynight .phone::after { top: 12px; }
}

/* Promise */
.promise-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: var(--s-7); align-items: start; }
.promises { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-6) var(--s-5); }
.promises li { display: grid; gap: var(--s-2); }
.promises svg { width: 32px; height: 32px; color: var(--primary); }
.promises h3 { font-size: 19px; }
.promises p { color: var(--ink-soft); font-size: 16px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-card); padding: var(--s-6); }
.card h3 { margin-bottom: var(--s-3); }
.card p + p { margin-top: var(--s-3); }
.card .crown { display: inline-block; font-size: 28px; margin-bottom: var(--s-2); }
@media (max-width: 860px) { .promise-grid { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .promises { grid-template-columns: 1fr; } }

/* iPad */
.ipad .split { grid-template-columns: 0.9fr 1.1fr; }
@media (max-width: 860px) { .ipad .split { grid-template-columns: 1fr; } .ipad .tablet { max-width: 420px; } }

/* Final CTA */
.final { position: relative; text-align: center; padding-bottom: calc(var(--section) + 120px); overflow: hidden; }
.final h2 { margin-bottom: var(--s-4); }
.final .lead { margin: 0 auto var(--s-6); max-width: 40ch; }
.final .cta-row { justify-content: center; }
.final img.app-icon { width: 96px; height: 96px; border-radius: 22px; margin: 0 auto var(--s-5); box-shadow: var(--shadow-card); }
.final .hills { height: 140px; min-height: 0; }
.final .hills .ground { fill: var(--surface); }

/* Footer */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); padding-block: var(--s-6); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s-4); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: var(--s-5); }
.site-footer nav a { color: var(--ink); font-weight: 700; text-decoration: none; }
.site-footer nav a:hover { color: var(--primary); text-decoration: underline; }

/* Text pages (support, privacy) */
.page-hero { background: linear-gradient(var(--sky-top), var(--bg)); margin-top: -68px; padding: calc(68px + var(--s-8)) 0 var(--s-7); }
.page-hero h1 { font-size: var(--fs-h2); margin-bottom: var(--s-3); }
.prose { max-width: 680px; padding-bottom: var(--s-9); }
.prose h2 { font-size: 24px; margin: var(--s-7) 0 var(--s-3); }
.prose p, .prose ul { margin: 0 0 var(--s-4); }
.prose ul { padding-left: 1.2em; }
.faq { display: grid; gap: var(--s-3); margin-bottom: var(--s-7); }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-card); }
.faq summary {
  list-style: none; cursor: pointer; padding: var(--s-5); font-weight: 800; font-size: 18px;
  display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); border-radius: var(--r-md);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 24px; font-weight: 700; color: var(--primary); line-height: 1; flex: none; }
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding: 0 var(--s-5) var(--s-5); color: var(--ink-soft); }
.faq details > div p + p { margin-top: var(--s-3); }
.contact-card { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s-4); }
.placeholder { background: color-mix(in srgb, var(--accent) 35%, transparent); padding: 0 4px; border-radius: 4px; }
hr { border: 0; border-top: 1px solid var(--border); margin: var(--s-8) 0; }

@media (prefers-reduced-motion: no-preference) {
  .hero-device .phone { animation: float 6s ease-in-out infinite; }
  @keyframes float { 50% { translate: 0 -10px; } }
}
