/* ==========================================================================
   Plant Doctor — marketing site stylesheet (v2, scripted rebuild 2026-08-22)
   Design language: "Verdant" (the app's design system, src/ui/tokens.ts).
   Doctor's office, not emergency room: calm forest tones — the urgency lives
   in the words. Layout breathes more as the page descends. Amber appears
   ONLY on the pet-safety mention. Light-only. No external fonts/frameworks.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --canvas: #f7f8f2;
  --surface: #fffefb;
  --surface-border: #e2e7dc;
  --ink: #1b3a2c;
  --ink-muted: #57675d;
  --brand: #1b4332;
  --primary: #2d6a4f;
  --primary-ink: #ffffff;
  --accent: #35896b;
  --soft: #d8f3dc;
  --soft-ink: #1b4332;
  --caution: #fff3d6;   /* amber — pet-safety mention only */
  --caution-ink: #7a5200;
  --on-brand: #d8f3dc;
  --mint: #95d5b2;

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 28px;
  --radius-pill: 999px;

  --shadow-soft: 0 4px 16px rgba(27, 67, 50, 0.08);
  --shadow-lift: 0 8px 28px rgba(27, 67, 50, 0.16);

  --font-sans:
    -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;

  --header-h: 64px;
  --max-w: 1120px;
}

/* ---------- Reset & base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--canvas);
  overflow-x: hidden;
}

h1,
h2,
h3,
p,
ul,
ol,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: var(--primary);
  text-decoration: none;
}

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

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--brand);
  color: var(--primary-ink);
  padding: 10px 18px;
  border-radius: 0 0 var(--radius-md) 0;
  z-index: 100;
}

.skip-link:focus {
  left: 0;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  padding: 14px 26px;
  border-radius: var(--radius-lg);
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    transform 150ms ease,
    box-shadow 150ms ease,
    background-color 150ms ease;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.99);
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-ink);
  box-shadow: var(--shadow-lift);
}

.btn-primary:hover {
  background: var(--brand);
}

.btn-lg {
  font-size: 1.0625rem;
  padding: 16px 30px;
}

/* Interim App Store CTA — deliberately does NOT imitate Apple's badge.
   When the official artwork lands in assets/app-store-badge.svg, main.js
   swaps these buttons for the real badge (see README "approval day"). */
.btn-badge {
  background: var(--brand);
  color: var(--primary-ink);
  font-size: 1.0625rem;
  padding: 16px 32px;
  box-shadow: var(--shadow-lift);
}

.btn-badge:hover {
  background: var(--primary);
}

.btn.has-badge {
  background: none;
  border: none;
  box-shadow: none;
  padding: 0;
}

.btn.has-badge img {
  height: 56px;
  width: auto;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 248, 242, 0.85);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--surface-border);
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  height: var(--header-h);
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--brand);
}

.logo-icon {
  border-radius: 8px;
}

.logo-word {
  font-weight: 800;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.header-nav {
  display: flex;
  gap: 22px;
  margin-left: auto;
}

.header-nav a {
  color: var(--ink-muted);
  font-weight: 600;
  font-size: 0.9375rem;
  white-space: nowrap;
}

.header-nav a:hover {
  color: var(--brand);
}

@media (max-width: 600px) {
  .header-inner {
    gap: 12px;
  }

  .header-nav {
    gap: 12px;
  }

  .header-nav a {
    font-size: 0.8125rem;
  }

  .logo-word {
    font-size: 0.9375rem;
  }
}

@media (max-width: 360px) {
  .logo-icon {
    display: none;
  }
}

/* ---------- Sections shell ---------- */
.section {
  padding: 84px 20px;
}

.section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.section-inner--narrow {
  max-width: 760px;
}

.section-title {
  font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.6rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--brand);
  max-width: 720px;
}

[id] {
  scroll-margin-top: calc(var(--header-h) + 16px);
}

@media (max-width: 720px) {
  .section {
    padding: 60px 20px;
  }
}

/* ---------- Hero (crisis: tight and punchy) ---------- */
.hero {
  padding: 52px 20px 64px;
  background:
    radial-gradient(ellipse 90% 60% at 72% 0%, rgba(216, 243, 220, 0.5), transparent 70%),
    var(--canvas);
  overflow: hidden;
}

.hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--primary);
  margin-bottom: 18px;
}

.hero-title {
  font-size: clamp(2.35rem, 1.4rem + 4.2vw, 3.9rem);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.025em;
  color: var(--brand);
  margin-bottom: 20px;
}

.hero-sub {
  font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem);
  color: var(--ink-muted);
  max-width: 34em;
  margin-bottom: 28px;
}

.cta-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.cta-block--center {
  align-items: center;
}

.launch-note {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.launched .launch-note {
  display: none;
}

.secondary-cta {
  margin-top: 18px;
}

.secondary-cta a {
  font-weight: 700;
  color: var(--primary);
}

.secondary-cta a:hover {
  text-decoration: underline;
}

.hero-visual {
  justify-self: end;
}

.hero-shot {
  width: min(348px, 88vw);
  height: auto;
  border-radius: var(--radius-xl);
  border: 1px solid var(--surface-border);
  box-shadow:
    0 30px 60px rgba(27, 67, 50, 0.2),
    0 4px 12px rgba(27, 67, 50, 0.12);
}

@media (max-width: 900px) {
  .hero {
    padding: 36px 20px 56px;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .hero-visual {
    justify-self: center;
  }
}

/* ---------- Strip (a tight single band) ---------- */
.strip {
  background: var(--brand);
  padding: 30px 20px;
}

.strip-text {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
  color: var(--on-brand);
  font-size: 1.0625rem;
}

.strip-text strong {
  color: #ffffff;
}

/* ---------- The one-minute exam ---------- */
.exam .section-title {
  margin-bottom: 40px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.step-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-xl);
  padding: 30px 26px;
  box-shadow: var(--shadow-soft);
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--soft);
  color: var(--soft-ink);
  font-weight: 800;
  font-size: 1.125rem;
  margin-bottom: 16px;
}

.step-card h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--brand);
  margin-bottom: 8px;
}

.step-card p {
  color: var(--ink-muted);
  font-size: 0.9875rem;
}

/* ---------- Feature rows (breathing grows as the page descends) ---------- */
.features {
  padding-top: 24px;
  padding-bottom: 40px;
}

.feature-row {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.04fr 0.96fr;
  gap: 56px;
  align-items: center;
}

.feature-row[data-air="1"] {
  padding: 44px 0;
}

.feature-row[data-air="2"] {
  padding: 64px 0;
}

.feature-row[data-air="3"] {
  padding: 84px 0;
}

.feature-row--flip .feature-copy {
  order: 2;
}

.feature-copy .section-title {
  margin-bottom: 14px;
}

.feature-copy p {
  color: var(--ink-muted);
  max-width: 34em;
}

.feature-shot {
  justify-self: center;
}

.feature-shot img {
  width: min(330px, 100%);
  height: auto;
  border-radius: var(--radius-xl);
  border: 1px solid var(--surface-border);
  box-shadow: var(--shadow-lift);
}

/* Amber lives here and nowhere else */
.pet-flag {
  background: var(--caution);
  color: var(--caution-ink);
  font-weight: 700;
  padding: 1px 9px 2px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

@media (max-width: 900px) {
  .feature-row,
  .feature-row--flip {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .feature-row--flip .feature-copy {
    order: 0;
  }

  .feature-row[data-air="1"] {
    padding: 34px 0;
  }

  .feature-row[data-air="2"] {
    padding: 46px 0;
  }

  .feature-row[data-air="3"] {
    padding: 58px 0;
  }
}

/* ---------- Pricing ---------- */
.pricing {
  background: var(--surface);
  border-top: 1px solid var(--surface-border);
  border-bottom: 1px solid var(--surface-border);
}

.pricing .section-title {
  margin-bottom: 40px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 22px;
  align-items: stretch;
  max-width: 880px;
}

.price-card {
  background: var(--canvas);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-xl);
  padding: 32px 30px;
}

/* The one sanctioned dark surface — mirrors the app's paywall */
.price-card--pro {
  background: var(--brand);
  border-color: var(--brand);
  box-shadow: var(--shadow-lift);
}

.plan-name {
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--brand);
  margin-bottom: 10px;
}

.price-card--pro .plan-name {
  color: var(--mint);
}

.plan-body {
  color: var(--ink);
  font-size: 1rem;
}

.price-card--pro .plan-body {
  color: var(--on-brand);
}

.fine-print {
  margin-top: 26px;
  font-size: 0.875rem;
  color: var(--ink-muted);
}

/* ---------- FAQ ---------- */
.faq .section-title {
  margin-bottom: 24px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  margin-top: 12px;
  box-shadow: var(--shadow-soft);
}

.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 1.0313rem;
  color: var(--brand);
  padding: 18px 22px;
  list-style: none;
  position: relative;
  padding-right: 48px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.375rem;
  font-weight: 400;
  color: var(--accent);
}

.faq-item[open] summary::after {
  content: "–";
}

.faq-item p {
  padding: 0 22px 20px;
  color: var(--ink-muted);
}

/* ---------- Final CTA (recovery: room to breathe) ---------- */
.final-cta {
  text-align: center;
  padding-top: 104px;
  padding-bottom: 116px;
}

.final-cta .section-title {
  margin: 0 auto 12px;
}

.final-sub {
  color: var(--ink-muted);
  font-size: 1.125rem;
  margin-bottom: 30px;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--brand);
  color: var(--on-brand);
  padding: 52px 20px 44px;
  text-align: center;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  gap: 12px;
}

.footer-tag {
  font-weight: 800;
  font-size: 1.125rem;
  color: #ffffff;
}

.footer-links {
  font-size: 0.9375rem;
}

.footer-links a {
  color: var(--mint);
  font-weight: 700;
}

.footer-links a:hover {
  color: #ffffff;
}

.footer-legal-line {
  font-size: 0.8125rem;
  opacity: 0.85;
}

/* ---------- Scroll reveal ---------- */
[data-reveal] {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] {
    opacity: 0;
    transform: translateY(18px);
    transition:
      opacity 500ms ease,
      transform 500ms ease;
  }

  .js [data-reveal].revealed {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Section leads & comparison tables ---------- */
.section-lead {
  color: var(--ink-muted);
  max-width: 44em;
  margin: 14px 0 36px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.compare-table {
  width: 100%;
  max-width: 880px;
  margin-top: 30px;
  border-collapse: collapse;
  background: var(--canvas);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  font-size: 0.9688rem;
}

.compare-table th,
.compare-table td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--surface-border);
  vertical-align: top;
}

.compare-table thead th {
  background: var(--soft);
  color: var(--soft-ink);
  font-weight: 800;
}

.compare-table tbody th {
  font-weight: 700;
  color: var(--brand);
}

.compare-table tbody tr:last-child th,
.compare-table tbody tr:last-child td {
  border-bottom: none;
}

@media (max-width: 720px) {
  .compare-table {
    display: block;
    overflow-x: auto;
  }
}

/* ---------- Longform / guide pages ---------- */
.crumbs {
  max-width: 760px;
  margin: 26px auto 0;
  padding: 0 20px;
  font-size: 0.875rem;
  color: var(--ink-muted);
}

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.crumbs li + li::before {
  content: "›";
  margin-right: 6px;
  color: var(--ink-muted);
}

.crumbs a {
  color: var(--primary);
  font-weight: 600;
}

.page-main {
  max-width: 760px;
  margin: 0 auto;
  padding: 28px 20px 88px;
}

.page-main h1 {
  font-size: clamp(1.9rem, 1.3rem + 2.6vw, 2.7rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--brand);
  margin-bottom: 14px;
}

.page-main .answer-lead {
  font-size: 1.125rem;
  color: var(--ink);
  margin-bottom: 26px;
}

.page-main h2 {
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--brand);
  margin: 40px 0 10px;
}

.page-main h3 {
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--brand);
  margin: 26px 0 8px;
}

.page-main p,
.page-main li {
  color: var(--ink);
  margin-bottom: 12px;
}

.page-main ul {
  list-style: disc;
  padding-left: 22px;
}

.page-main ol {
  list-style: decimal;
  padding-left: 22px;
}

.page-main table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: 0.9375rem;
  background: var(--surface);
  border: 1px solid var(--surface-border);
}

.page-main th,
.page-main td {
  text-align: left;
  padding: 10px 12px;
  border: 1px solid var(--surface-border);
  vertical-align: top;
}

.page-main thead th {
  background: var(--soft);
  color: var(--soft-ink);
}

@media (max-width: 720px) {
  .page-main .table-scroll {
    overflow-x: auto;
  }
}

.page-main dl dt {
  font-weight: 800;
  color: var(--brand);
  margin-top: 14px;
}

.page-main dl dd {
  margin: 4px 0 0;
  color: var(--ink);
}

.page-main .updated-line {
  font-size: 0.875rem;
  color: var(--ink-muted);
  margin-bottom: 26px;
}

.page-main .sources {
  font-size: 0.875rem;
  color: var(--ink-muted);
  border-top: 1px solid var(--surface-border);
  margin-top: 36px;
  padding-top: 16px;
}

.cta-box {
  background: var(--soft);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  margin: 36px 0 8px;
}

.cta-box p {
  margin: 0 0 14px;
  color: var(--soft-ink);
  font-weight: 600;
}

.hub-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 12px;
  margin-top: 8px;
}

.hub-list li {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  margin: 0;
}

.hub-list a {
  display: block;
  padding: 14px 18px;
  font-weight: 700;
  color: var(--brand);
}

.hub-list .hub-note {
  display: block;
  font-weight: 400;
  font-size: 0.9063rem;
  color: var(--ink-muted);
  margin-top: 2px;
}

.footer-contact {
  font-style: normal;
  font-size: 0.9375rem;
}

.footer-contact a {
  color: var(--mint);
  font-weight: 700;
}

.footer-updated {
  opacity: 0.9;
}

/* ---------- 404 ---------- */
.notfound-main {
  min-height: 70vh;
  display: grid;
  place-content: center;
  text-align: center;
  padding: 40px 20px;
}

.notfound-main h1 {
  font-size: clamp(2rem, 1.4rem + 3vw, 3rem);
  font-weight: 800;
  color: var(--brand);
  margin: 18px 0 10px;
}

.notfound-main p {
  color: var(--ink-muted);
  margin-bottom: 28px;
}

.notfound-emoji {
  font-size: 4rem;
}
