/* ============================================================
   Bloom — botanical field-guide × calm health clinic
   Landing + legal styles. Light theme, green-tinted paper.
   ============================================================ */

:root {
  /* Brand */
  --green: #34c759;                 /* app accent, kept for brand fidelity */
  --green-600: oklch(0.63 0.16 151);
  --green-700: oklch(0.52 0.13 153);
  --forest: oklch(0.32 0.05 158);
  --forest-deep: oklch(0.235 0.042 160);

  /* Neutrals — tinted toward the brand hue (~152) */
  --paper: oklch(0.984 0.009 150);
  --paper-2: oklch(0.962 0.013 150);
  --surface: oklch(0.998 0.004 150);
  --ink: oklch(0.255 0.022 158);
  --ink-soft: oklch(0.46 0.022 156);
  --line: oklch(0.905 0.014 150);
  --line-soft: oklch(0.94 0.01 150);

  /* Diagnostic spectrum — meaningful, drawn from the app */
  --healthy: oklch(0.66 0.16 151);
  --attention: oklch(0.72 0.15 70);
  --risk: oklch(0.60 0.20 27);
  --risk-bg: oklch(0.95 0.04 27);

  /* Type */
  --display: "Bricolage Grotesque", "Hanken Grotesk", system-ui, sans-serif;
  --body: "Hanken Grotesk", system-ui, -apple-system, sans-serif;

  /* Spacing — 4pt scale, semantic */
  --space-2xs: 4px;
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;

  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 26px;

  --shadow-card: 0 1px 2px oklch(0.32 0.05 158 / 0.04), 0 14px 34px -20px oklch(0.32 0.05 158 / 0.30);
  --shadow-float: 0 2px 6px oklch(0.32 0.05 158 / 0.06), 0 40px 70px -34px oklch(0.32 0.05 158 / 0.42);

  --maxw: 1140px;
  --measure: 66ch;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.04; letter-spacing: -0.025em; margin: 0; color: var(--ink); }

p { margin: 0; }

a { color: var(--green-700); text-decoration: none; text-underline-offset: 3px; }
a:hover { text-decoration: underline; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(20px, 5vw, 40px); }

.eyebrow {
  display: inline-block;
  font-family: var(--body);
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green-700);
}

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--forest);
  --btn-fg: var(--paper);
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--body); font-weight: 600; font-size: 16px;
  color: var(--btn-fg); background: var(--btn-bg);
  padding: 14px 24px; border-radius: 999px; border: 0; cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.2s, background 0.2s;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 16px 30px -16px oklch(0.32 0.05 158 / 0.6); }
.btn svg { width: 19px; height: 19px; }
.btn--accent { --btn-bg: var(--green); --btn-fg: oklch(0.22 0.05 158); }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--ink); border: 1.5px solid var(--line); }
.btn--on-dark { --btn-bg: var(--green); --btn-fg: oklch(0.2 0.05 158); }

/* ---------- Nav ---------- */
.nav { position: sticky; top: 0; z-index: 40; background: oklch(0.984 0.009 150 / 0.78); backdrop-filter: blur(14px) saturate(140%); border-bottom: 1px solid transparent; transition: border-color 0.3s; }
.nav.is-stuck { border-color: var(--line-soft); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-family: var(--display); font-weight: 600; font-size: 21px; letter-spacing: -0.03em; color: var(--ink); }
.brand:hover { text-decoration: none; }
.mark { width: 34px; height: 34px; flex: none; }
.nav-links { display: flex; align-items: center; gap: clamp(16px, 3vw, 30px); }
.nav-links a:not(.btn) { color: var(--ink-soft); font-size: 15.5px; font-weight: 500; }
.nav-links a:not(.btn):hover { color: var(--ink); text-decoration: none; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding-block: clamp(48px, 9vw, 104px) clamp(40px, 7vw, 80px); }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto auto; width: min(720px, 80vw); aspect-ratio: 1;
  background: radial-gradient(closest-side, oklch(0.7 0.16 151 / 0.16), transparent 70%);
  z-index: 0; pointer-events: none;
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.04fr 0.96fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { font-size: clamp(40px, 6.6vw, 76px); margin-block: 20px 0; }
.hero h1 .accent { color: var(--green-700); }
.hero .lede { margin-top: clamp(18px, 2.4vw, 26px); font-size: clamp(17px, 1.5vw, 20px); line-height: 1.6; color: var(--ink-soft); max-width: 38ch; }
.hero-cta { margin-top: clamp(26px, 3vw, 36px); display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.hero-meta { display: flex; align-items: center; gap: 9px; font-size: 14.5px; color: var(--ink-soft); }
.hero-meta .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--healthy); box-shadow: 0 0 0 4px oklch(0.66 0.16 151 / 0.18); }

/* ---------- Diagnosis card (the memorable artifact) ---------- */
.diag { justify-self: center; width: min(420px, 100%); }
.diag-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-float); overflow: hidden;
}
.diag-photo {
  position: relative; height: 168px;
  background:
    radial-gradient(120% 90% at 80% -10%, oklch(0.78 0.13 150 / 0.5), transparent 60%),
    linear-gradient(150deg, oklch(0.55 0.12 156), oklch(0.4 0.09 160));
}
.diag-photo .veins { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.5; }
.diag-photo .scanline {
  position: absolute; left: 0; right: 0; height: 2px; top: 30%;
  background: linear-gradient(90deg, transparent, oklch(0.9 0.13 150 / 0.9), transparent);
  animation: scan 3.4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
.diag-status {
  position: absolute; left: 16px; bottom: 14px;
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--surface); color: var(--risk);
  font-weight: 700; font-size: 13px; padding: 7px 13px 7px 11px; border-radius: 999px;
  box-shadow: 0 6px 16px -8px oklch(0.32 0.05 158 / 0.5);
}
.diag-status .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--risk); box-shadow: 0 0 0 0 oklch(0.6 0.2 27 / 0.5); animation: pulse 2s infinite; }
.diag-body { padding: 18px 20px 22px; }
.diag-species { font-family: var(--display); font-size: 23px; letter-spacing: -0.02em; }
.diag-common { font-size: 14px; color: var(--ink-soft); margin-top: 2px; }
.diag-divider { height: 1px; background: var(--line-soft); margin: 16px 0; }
.diag-label { font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); }
.diag-issue { display: flex; align-items: baseline; gap: 10px; margin-top: 10px; font-size: 15px; }
.diag-issue .tick { flex: none; width: 18px; height: 18px; margin-top: 2px; }
.diag-issue:last-child { margin-bottom: 0; }
.diag-plan { margin-top: 14px; display: grid; gap: 8px; }
.diag-step { display: flex; gap: 10px; font-size: 14.5px; color: var(--ink); }
.diag-step .n { flex: none; width: 20px; height: 20px; border-radius: 7px; background: oklch(0.66 0.16 151 / 0.14); color: var(--green-700); font-size: 12px; font-weight: 700; display: grid; place-items: center; }

/* ---------- Section scaffolding ---------- */
.section { padding-block: clamp(56px, 8vw, 104px); }
.section-head { max-width: 30ch; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head.center { margin-inline: auto; text-align: center; max-width: 40ch; }
.section-head h2 { font-size: clamp(28px, 4vw, 44px); }
.section-head p { margin-top: 14px; color: var(--ink-soft); font-size: 18px; max-width: var(--measure); }
.section-head.center p { margin-inline: auto; }

/* ---------- How it works — numbered editorial rows ---------- */
.flow { display: grid; gap: clamp(28px, 4vw, 44px); counter-reset: step; }
.flow-row { display: grid; grid-template-columns: auto 1fr; gap: clamp(18px, 3vw, 34px); align-items: start; }
.flow-row .index { font-family: var(--display); font-size: clamp(40px, 5vw, 60px); line-height: 1; color: oklch(0.66 0.16 151 / 0.55); font-weight: 600; }
.flow-row h3 { font-size: clamp(21px, 2.4vw, 27px); }
.flow-row p { margin-top: 8px; color: var(--ink-soft); max-width: 52ch; }

/* ---------- Features — asymmetric, not a uniform grid ---------- */
.features { display: grid; grid-template-columns: repeat(6, 1fr); gap: clamp(12px, 1.6vw, 18px); }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 2.4vw, 30px); }
.tile h3 { font-size: 20px; margin-bottom: 8px; }
.tile p { color: var(--ink-soft); font-size: 15.5px; max-width: 46ch; }
.tile .ic { width: 30px; height: 30px; margin-bottom: 14px; color: var(--green-700); }
.tile--wide { grid-column: span 3; }
.tile--third { grid-column: span 2; }
.tile--feature { grid-column: span 3; background: var(--forest); color: var(--paper); display: flex; flex-direction: column; justify-content: flex-end; min-height: 200px; }
.tile--feature h3, .tile--feature p { color: var(--paper); }
.tile--feature p { color: oklch(0.9 0.02 150); }
.tile--feature .ic { color: var(--green); }

/* ---------- Spectrum band (meaningful color motif) ---------- */
.spectrum { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(12px, 1.6vw, 18px); }
.spectrum .chip { border-radius: var(--radius); padding: 22px 22px 24px; border: 1px solid var(--line); background: var(--surface); }
.spectrum .swatch { width: 13px; height: 13px; border-radius: 50%; display: inline-block; margin-right: 9px; vertical-align: middle; }
.spectrum h3 { font-size: 18px; display: flex; align-items: center; }
.spectrum p { margin-top: 8px; color: var(--ink-soft); font-size: 15px; }
.s-healthy .swatch { background: var(--healthy); }
.s-attention .swatch { background: var(--attention); }
.s-risk .swatch { background: var(--risk); }

/* ---------- Quote ---------- */
.quote-band { text-align: center; }
.quote-band .stars { color: var(--attention); letter-spacing: 5px; font-size: 18px; }
.quote-band blockquote { font-family: var(--display); font-weight: 500; font-size: clamp(24px, 3.6vw, 38px); line-height: 1.2; letter-spacing: -0.02em; margin: 18px auto 0; max-width: 18ch; color: var(--ink); }
.quote-band cite { display: block; margin-top: 18px; font-style: normal; color: var(--ink-soft); font-size: 15px; }

/* ---------- CTA (deep forest) ---------- */
.cta { background: var(--forest-deep); color: var(--paper); border-radius: clamp(24px, 4vw, 40px); padding: clamp(40px, 7vw, 84px) clamp(24px, 5vw, 64px); text-align: center; position: relative; overflow: hidden; }
.cta::before { content: ""; position: absolute; inset: auto -10% -60% -10%; height: 80%; background: radial-gradient(closest-side, oklch(0.66 0.16 151 / 0.28), transparent 70%); }
.cta h2 { position: relative; color: var(--paper); font-size: clamp(30px, 5vw, 52px); max-width: 16ch; margin-inline: auto; }
.cta p { position: relative; color: oklch(0.88 0.02 150); margin: 16px auto 0; max-width: 44ch; }
.cta .hero-cta { position: relative; justify-content: center; margin-top: 32px; }

/* ---------- Footer ---------- */
.foot { padding-block: clamp(40px, 6vw, 72px) 40px; }
.foot-top { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: flex-start; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.foot-tag { color: var(--ink-soft); font-size: 15px; max-width: 30ch; margin-top: 12px; }
.foot-cols { display: flex; gap: clamp(40px, 8vw, 90px); flex-wrap: wrap; }
.foot-col h4 { font-family: var(--body); font-size: 12.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); margin: 0 0 12px; }
.foot-col a { display: block; color: var(--ink); font-size: 15px; margin-bottom: 9px; font-weight: 500; }
.foot-bottom { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; padding-top: 24px; color: var(--ink-soft); font-size: 14px; }

/* ---------- Legal pages ---------- */
.legal { max-width: 72ch; margin-inline: auto; padding-block: clamp(40px, 7vw, 72px) clamp(64px, 10vw, 104px); }
.legal .back { display: inline-flex; gap: 7px; align-items: center; font-size: 14.5px; color: var(--ink-soft); font-weight: 500; }
.legal .back:hover { color: var(--ink); text-decoration: none; }
.legal h1 { font-size: clamp(34px, 6vw, 54px); margin-top: 22px; }
.legal .updated { color: var(--ink-soft); font-size: 14.5px; margin-top: 10px; }
.legal .lead { font-size: 19px; color: var(--ink-soft); margin-top: 26px; line-height: 1.6; }
.legal h2 { font-size: clamp(20px, 2.4vw, 25px); margin-top: clamp(36px, 5vw, 52px); }
.legal h2 + p, .legal h2 + ul { margin-top: 12px; }
.legal p, .legal li { font-size: 16.5px; line-height: 1.68; color: oklch(0.34 0.02 158); }
.legal p + p { margin-top: 14px; }
.legal ul { margin: 12px 0 0; padding-left: 22px; display: grid; gap: 8px; }
.legal ::marker { color: var(--green-600); }
.legal strong { color: var(--ink); font-weight: 700; }
.callout { margin-top: 24px; background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.callout p { font-size: 16px; color: var(--ink); }

/* ---------- Motion: one orchestrated load ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes scan { 0% { top: 12%; opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { top: 86%; opacity: 0; } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 oklch(0.6 0.2 27 / 0.5); } 70% { box-shadow: 0 0 0 8px oklch(0.6 0.2 27 / 0); } 100% { box-shadow: 0 0 0 0 oklch(0.6 0.2 27 / 0); } }

[data-rise] { animation: rise 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
[data-rise="1"] { animation-delay: 0.05s; }
[data-rise="2"] { animation-delay: 0.14s; }
[data-rise="3"] { animation-delay: 0.23s; }
[data-rise="4"] { animation-delay: 0.34s; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 940px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .diag { justify-self: stretch; max-width: 420px; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .tile--wide, .tile--third, .tile--feature { grid-column: span 2; }
  .spectrum { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .nav-links a:not(.btn) { display: none; }
  .features { grid-template-columns: 1fr; }
  .tile--wide, .tile--third, .tile--feature { grid-column: span 1; }
  .flow-row { grid-template-columns: 1fr; gap: 4px; }
  .flow-row .index { font-size: 36px; }
  .foot-top { flex-direction: column; }
}
