/* Dibble marketing site — brand tokens from branding/colors.md (DECISIONS 052).
   Mobile-first, zero dependencies. Quicksand 700 for headings (the wordmark face);
   body text on the system stack, matching the dashboard.
   Screenshots are real app captures wired in by branding/site-shots/make-shots.mjs
   (DECISIONS 108); a missing shot hides its <figure> rather than showing a placeholder. */

:root {
  --green-700: #3E7C4F;
  --green-600: #4E8455;
  --green-500: #5B8C5A;
  --green-300: #8FBC94;
  --green-100: #E3EFE4;
  --sprout-tint: #CDE3CF;
  --cream: #FDFCF8;
  --bark: #4A3F35;
  --stone: #8A8378;
  --bloom: #C97BA4;
  --alert: #C4622D;
  --dark: #201D18;
  --hairline: #E6E2D8;
  --radius: 12px;
  --font-sans: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-brand: "Quicksand", ui-rounded, var(--font-sans);
  --measure: 62ch;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--bark);
  font: 16px/1.55 var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-brand); font-weight: 700; letter-spacing: -0.012em; }

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

[hidden] { display: none !important; }

/* ------------------------------- Top bar ------------------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px clamp(16px, 4vw, 40px);
  background: color-mix(in srgb, var(--cream) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--hairline);
}

.brand img { width: 112px; height: auto; }

.topnav { display: none; gap: 22px; margin-inline: auto; }
.topnav a { color: var(--bark); text-decoration: none; font-weight: 600; font-size: 15px; }
.topnav a:hover { color: var(--green-700); }

.topbar-actions { display: flex; gap: 10px; margin-left: auto; }

@media (min-width: 760px) {
  .topnav { display: flex; }
  .topbar-actions { margin-left: 0; }
  .brand img { width: 132px; }
}

/* ------------------------------- Buttons ------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 999px;
  font-family: var(--font-brand);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

.btn-primary { background: var(--green-700); color: var(--cream); }
.btn-primary:hover { background: var(--green-600); }

.btn-secondary { background: var(--green-100); color: var(--green-700); border: 1px solid var(--green-300); }
.btn-secondary:hover { background: var(--sprout-tint); }

.btn-ghost { color: var(--green-700); border: 1px solid var(--hairline); background: transparent; }
.btn-ghost:hover { border-color: var(--green-300); background: var(--green-100); }

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px 10px 16px;
  border-radius: 12px;
  background: var(--bark);
  color: var(--cream);
  text-decoration: none;
  line-height: 1.1;
}
.store-badge:hover { background: #3a322a; }
.store-badge small { display: block; font-size: 11px; font-weight: 400; opacity: .85; }
.store-badge span { font-family: var(--font-brand); font-weight: 700; font-size: 17px; }

.text-link { color: var(--green-300); font-weight: 600; }
.text-link:hover { color: var(--green-100); }

.fineprint { color: var(--stone); font-size: 13px; }

/* ------------------------------ Screenshots ------------------------------ */
/* Two CSS-only frames. .phone wraps a portrait iPhone capture; .browser wraps a
   clipped dashboard section. No bezel artwork — the shots carry the realism. */

figure { margin: 0; }

.phone {
  width: min(100%, 280px);
  padding: 10px;
  border-radius: 44px;
  background: #1B1916;
  box-shadow: 0 24px 50px -22px rgba(32, 29, 24, .45), inset 0 0 0 1px rgba(255, 255, 255, .06);
}
.phone img { width: 100%; height: auto; border-radius: 34px; }

.browser {
  width: 100%;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 10px 30px rgba(74, 63, 53, .12);
}
.browser img { width: 100%; height: auto; }

figcaption { color: var(--stone); font-size: 13px; margin-top: 10px; text-align: center; }
.phone figcaption { color: #B9B2A6; margin: 8px 0 2px; }

/* -------------------------------- Hero -------------------------------- */

.hero {
  display: grid;
  gap: 36px;
  padding: clamp(40px, 8vw, 88px) clamp(16px, 4vw, 40px) clamp(32px, 5vw, 64px);
  max-width: 1120px;
  margin-inline: auto;
  align-items: center;
}

@media (min-width: 900px) {
  .hero { grid-template-columns: 1.05fr 1fr; }
}

.hero h1 {
  font-size: clamp(34px, 6vw, 54px);
  line-height: 1.08;
  margin: 0 0 18px;
  color: var(--green-700);
}

.lede { font-size: clamp(17px, 2.2vw, 20px); max-width: var(--measure); margin: 0 0 26px; }

.cta-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.cta-center { justify-content: center; }

.hero-copy .fineprint { margin-top: 14px; }

/* Phone (AR capture) overlapping the dashboard footprint map. DOM order: phone, then
   browser, so `.phone[hidden] ~ .browser` can reclaim the full width until the AR shot lands. */
.hero > * { min-width: 0; } /* large <img>s must never widen the grid track */
.hero-shots { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; justify-items: center; }
.hero-shots > * { min-width: 0; }
.hero-shots .phone { width: min(60%, 220px); }

@media (min-width: 700px) {
  .hero-shots { display: block; padding-bottom: 28px; }
  .hero-shots .phone { position: absolute; left: 0; bottom: 0; width: 34%; z-index: 1; }
  .hero-shots .browser { margin-left: 18%; width: 82%; }
  .hero-shots .phone[hidden] ~ .browser { margin-left: 0; width: 100%; }
}

/* -------------------------------- Bands -------------------------------- */

.band { padding: clamp(48px, 7vw, 84px) clamp(16px, 4vw, 40px); }
.band > h2, .band > .band-lede, .band > p, .band > div, .band > ol, .band > ul { max-width: 1120px; margin-inline: auto; }

.band h2 {
  font-size: clamp(26px, 4vw, 38px);
  margin: 0 0 10px;
  color: var(--green-700);
}

.band-lede { color: var(--stone); font-size: clamp(16px, 2vw, 18px); margin: 0 0 36px; max-width: var(--measure); }

.band-tint { background: var(--green-100); }

.band-dark { background: var(--dark); color: var(--cream); }
.band-dark h2 { color: var(--green-300); }
.band-dark .band-lede { color: #B9B2A6; }

/* ------------------------------- Insights ------------------------------- */

.insights { display: grid; gap: clamp(44px, 6vw, 76px); }

.insight { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: center; }
.insight > * { min-width: 0; }

/* Rows alternate copy/figure. `.flip` is assigned to every other *visible* row by
   make-shots.mjs (hidden rows would throw :nth-of-type off). */
@media (min-width: 860px) {
  .insight { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; }
  .insight.flip .insight-copy { order: 2; }
}

.insight h3 { font-size: clamp(22px, 2.6vw, 28px); line-height: 1.2; color: var(--green-700); margin: 0 0 10px; }
.insight p { margin: 0; font-size: 16.5px; max-width: 46ch; }

.insight-figs { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; align-items: flex-start; }
.insight-figs .phone { width: min(100%, 240px); }
.insight-figs .browser { flex: 1 1 280px; min-width: 0; }

/* ------------------------------- Show it off ------------------------------- */

.share-grid { display: grid; gap: 24px; }
@media (min-width: 760px) { .share-grid { grid-template-columns: 1fr 1fr; } }

.share-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  background: var(--cream);
  border: 1px solid var(--sprout-tint);
  border-radius: 16px;
  padding: 26px;
}
.share-item .phone { width: min(100%, 240px); justify-self: center; }
.share-item h3 { margin: 0 0 8px; font-size: 21px; color: var(--green-700); }
.share-item p { margin: 0; font-size: 15.5px; }

.share-note { color: var(--stone); font-size: 14.5px; margin-top: 22px; }

/* ----------------------------- How it works ----------------------------- */

.steps {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 22px;
  counter-reset: step;
}

@media (min-width: 700px) { .steps { grid-template-columns: repeat(3, 1fr); } }

.steps li {
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 22px;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--sprout-tint);
  color: var(--green-700);
  font-family: var(--font-brand);
  font-weight: 700;
}

.steps h3 { margin: 12px 0 6px; font-size: 19px; }
.steps p { margin: 0; color: var(--bark); font-size: 15px; }

.how-foot { display: flex; flex-wrap: wrap; gap: 28px; align-items: center; margin-top: 28px; }
.how-foot .phone { width: min(100%, 200px); margin-inline: auto; }

.proof {
  flex: 1 1 320px;
  margin: 0;
  padding: 18px 22px;
  border-left: 3px solid var(--green-500);
  background: #fff;
  border-radius: var(--radius);
  font-size: 15.5px;
  max-width: var(--measure);
}

/* ------------------------------- Cloud band ------------------------------- */

.cloud-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: center; }
.cloud-grid > * { min-width: 0; }
@media (min-width: 860px) { .cloud-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); } }
.cloud-grid p { margin: 0; font-size: clamp(16px, 2vw, 18px); max-width: var(--measure); }
.cloud-grid .phone { width: min(100%, 220px); margin-inline: auto; }

/* --------------------------------- Plans --------------------------------- */

.plan-grid { display: grid; gap: 20px; align-items: start; }
@media (min-width: 820px) { .plan-grid { grid-template-columns: repeat(3, 1fr); } }

.plan {
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: 16px;
  padding: 26px;
}

.plan-featured { border: 2px solid var(--green-700); box-shadow: 0 8px 24px rgba(62, 124, 79, .12); }

.plan h3 { margin: 0 0 4px; font-size: 24px; color: var(--green-700); }
.plan-tag { margin: 0 0 16px; color: var(--stone); font-size: 14px; }
.plan ul { list-style: none; margin: 0; padding: 0; }
.plan li { padding: 8px 0; border-top: 1px solid var(--hairline); font-size: 15px; }
.plan li:first-child { border-top: 0; }

.plans-note { margin-top: 26px; text-align: center; }

/* ------------------------------ Privacy band ------------------------------ */

.privacy-band .privacy-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 14px;
  margin-bottom: 24px;
}
@media (min-width: 760px) { .privacy-band .privacy-list { grid-template-columns: 1fr 1fr; } }

.privacy-list li {
  border-left: 3px solid var(--green-500);
  padding-left: 14px;
  font-size: 15px;
  color: #CFC8BC;
}
.privacy-list strong { color: var(--cream); }

.privacy-band p { max-width: 1120px; margin-inline: auto; }

/* ------------------------------- Download ------------------------------- */

.download-band { text-align: center; background: var(--green-100); }
.download-band h2 { margin-bottom: 26px; }
.download-band .fineprint { margin-top: 18px; }

/* -------------------------------- Footer -------------------------------- */

.footer {
  border-top: 1px solid var(--hairline);
  padding: 34px clamp(16px, 4vw, 40px) 44px;
  display: grid;
  gap: 14px;
  max-width: 1120px;
  margin-inline: auto;
}

.footer-brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-brand); font-weight: 700; color: var(--green-700); }

.footer-links { display: flex; gap: 18px; }
.footer-links a { color: var(--stone); text-decoration: none; font-size: 14px; }
.footer-links a:hover { color: var(--green-700); }

.footer-legal { color: var(--stone); font-size: 12.5px; margin: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
