/* MunchMetrics launch site.
   Static, no webfonts, no CDNs — same constraint as the other sites on this
   server. Tokens are transcribed from the app's own design system
   (assets/design-system/_ds/.../styles.css) with the contrast pairs already
   measured in __tests__/theme.contrast.test.ts, so the site and the product
   are visibly the same thing rather than a lookalike. */

:root {
  --ground: #f3f2f2;
  --raised: #f8f4f4;
  --surface: #eae9e9;
  --ink: #201e1d;
  --muted: #6a6868;       /* text 65% over ground — 4.96:1 */
  --accent-text: #ae1800;  /* accent-700 — 6.41:1 on ground */
  --accent-ui: #ec3013;    /* brand accent: fills, rules, marks */
  --rule: #d7d3d3;
  --shadow-sm: 0 1px 2px rgba(45, 43, 43, 0.14);
  --shadow-md: 0 3px 10px rgba(45, 43, 43, 0.12);
  --shadow-lg: 0 12px 32px rgba(45, 43, 43, 0.18);
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #201e1d;
    --raised: #2d2b2b;
    --surface: #2d2b2b;
    --ink: #f3f2f2;
    --muted: #949392;       /* 5.41:1 on the dark ground */
    --accent-text: #ff9783;  /* accent-400 — 7.91:1 on dark */
    --accent-ui: #ff563c;
    --rule: #444141;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 3px 12px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  /* Archivo is the product face; used when the reader has it, otherwise a
     grotesque of similar character. No CDN link — a silent fallback is
     worse than an honest stack. */
  font-family: Archivo, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--ground);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

:where(a) {
  color: var(--accent-text);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
:where(a:hover) { color: var(--accent-ui); }
a:focus-visible {
  outline: 2px solid var(--accent-ui);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3 { letter-spacing: -0.015em; line-height: 1.12; text-wrap: balance; font-weight: 800; }
h1 { font-size: clamp(2.4rem, 6vw, 4rem); }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.5rem); }
h3 { font-size: 1.15rem; line-height: 1.3; }

.kicker {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* --- nav --------------------------------------------------------------- */

.nav {
  border-bottom: 1px solid var(--rule);
  background: var(--ground);
  position: sticky;
  top: 0;
  z-index: 10;
}
.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  font-size: 1.0625rem;
  color: var(--ink);
  text-decoration: none;
}
.brand .mark {
  width: 22px; height: 22px;
  border-radius: 6px;
  background: var(--accent-ui);
  display: inline-block;
  flex: none;
}
.nav-links { display: flex; gap: 1.35rem; font-size: 0.9375rem; }
.nav-links a { color: var(--muted); text-decoration: none; }
.nav-links a:hover { color: var(--ink); }
@media (max-width: 32rem) { .nav-links a:not(.nav-privacy) { display: none; } }

/* --- hero -------------------------------------------------------------- */

.hero { padding: clamp(3rem, 8vw, 6rem) 0 clamp(2.5rem, 6vw, 4.5rem); }
.hero .wrap {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
@media (min-width: 56rem) {
  .hero .wrap { grid-template-columns: 1.05fr 0.95fr; }
}
.hero h1 em {
  font-style: normal;
  color: var(--accent-text);
}
.lead {
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  color: var(--muted);
  margin-top: 1.15rem;
  max-width: 46ch;
}

/* --- store badges ------------------------------------------------------
   Same pattern as Vialume's site so the family looks related. Both are
   "coming soon" states for now: neither listing exists, and Google's brand
   guidelines require the official badge to LINK to the store, so it is not
   shown until it can be. The .store-badge-link rule is here ready for the
   day the Play listing goes live — the official badge PNG carries its own
   padding, hence the fixed box and the offset crop. */

.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.store-badge-link {
  display: block;
  flex: 0 0 auto;
  line-height: 0;
  width: 150px;
  height: 52px;
  overflow: hidden;
  border-radius: 8px;
}
.store-badge-link img {
  max-width: none;
  width: 172px;
  height: auto;
  transform: translate(-11px, -7px);
}

.store-badge-soon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  box-sizing: border-box;
  width: 150px;
  height: 52px;
  padding: 6px 10px;
  border: 1px solid #a6a6a6;
  border-radius: 8px;
  background: #000;
  background-clip: padding-box;
  color: #fff;
  cursor: default;
  user-select: none;
}

.store-badge-link,
.store-badge-soon {
  transform: translateY(0);
  transition: transform 160ms ease, filter 160ms ease;
}
@media (hover: hover) {
  .store-badge-link:hover,
  .store-badge-soon:hover {
    transform: translateY(-2px);
    /* Brand accent, not Vialume's indigo — the shape is shared, the colour
       is ours. */
    filter: drop-shadow(0 6px 10px rgba(236, 48, 19, 0.28));
  }
}
.store-badge-link:active { transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .store-badge-link,
  .store-badge-soon,
  .store-badge-link:hover,
  .store-badge-soon:hover,
  .store-badge-link:active { transition: none; transform: none; }
}

/* CSS-drawn device marks — no icon font, no extra request. */
.device-icon {
  position: relative;
  flex: 0 0 auto;
  width: 19px;
  height: 30px;
  border: 2px solid #fff;
  border-radius: 4px;
}
/* iOS: home indicator across the bottom. */
.device-ios::after {
  content: "";
  position: absolute;
  left: 5px; bottom: 2px;
  width: 5px; height: 1px;
  border-radius: 1px;
  background: #fff;
}
/* Android: front camera dot at the top — distinct at a glance from iOS. */
.device-android::after {
  content: "";
  position: absolute;
  left: 50%; top: 2px;
  transform: translateX(-50%);
  width: 3px; height: 3px;
  border-radius: 50%;
  background: #fff;
}

.store-badge-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.05;
  text-align: left;
}
.store-badge-copy > span {
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.store-badge-copy strong { margin-top: 0.15rem; font-size: 1.05rem; }

.cta-row { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 1.25rem; align-items: center; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 1.5rem;
  border-radius: var(--r-md);
  font-weight: 700;
  font-size: 0.9688rem;
  text-decoration: none;
  border: 1.5px solid transparent;
}
.btn-primary { background: var(--accent-text); color: #f3f2f2; box-shadow: var(--shadow-sm); }
.btn-primary:hover { color: #f3f2f2; opacity: 0.92; }
.btn-ghost { border-color: var(--rule); color: var(--accent-text); }
.btn-ghost:hover { border-color: var(--accent-ui); }
.btn-note { font-size: 0.875rem; color: var(--muted); margin-top: 1rem; }

/* Phone shot — the product, not a mockup of one. */
.shot {
  justify-self: center;
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--raised);
  max-width: 300px;
}
.shot img { display: block; width: 100%; height: auto; }

/* --- the estimate strip: the actual differentiator --------------------- */

.strip { border-block: 1px solid var(--rule); background: var(--raised); }
.strip .wrap { padding-block: clamp(2.5rem, 5vw, 3.5rem); }
.strip-grid { display: grid; gap: 1.75rem; }
@media (min-width: 44rem) { .strip-grid { grid-template-columns: repeat(3, 1fr); } }
.strip h3 { margin-bottom: 0.35rem; }
.strip p { color: var(--muted); font-size: 0.9688rem; }
.strip .figure {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  display: block;
  margin-bottom: 0.15rem;
}
.strip .figure small { font-size: 0.9rem; font-weight: 600; color: var(--muted); }

/* --- sections ---------------------------------------------------------- */

section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.sub { color: var(--muted); margin-top: 0.6rem; max-width: 58ch; }

.steps { display: grid; gap: 1.25rem; margin-top: 2.5rem; }
@media (min-width: 44rem) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step {
  background: var(--raised);
  border-radius: var(--r-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}
/* Numbered because these genuinely are a sequence — photo, then check,
   then save. Not decoration. */
.step .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border-radius: 999px;
  background: var(--accent-ui);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 800;
  margin-bottom: 0.85rem;
}
.step p { color: var(--muted); margin-top: 0.4rem; font-size: 0.9688rem; }

/* --- pricing / what's free -------------------------------------------- */

.plans { display: grid; gap: 1.25rem; margin-top: 2.5rem; }
@media (min-width: 44rem) { .plans { grid-template-columns: 1fr 1fr; } }
.plan {
  border-radius: var(--r-md);
  padding: 1.75rem;
  background: var(--raised);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.plan-free { border: 2px solid var(--accent-ui); }
.plan ul { list-style: none; display: flex; flex-direction: column; gap: 0.55rem; }
.plan li { padding-left: 1.4rem; position: relative; color: var(--muted); font-size: 0.9688rem; }
.plan li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.62em;
  width: 8px; height: 8px;
  border-radius: 2px;
  background: var(--accent-ui);
}
.plan .price { font-size: 1.05rem; font-weight: 700; }
.plan .price span { color: var(--muted); font-weight: 500; font-size: 0.9375rem; }

/* --- gallery ----------------------------------------------------------- */

.gallery { display: grid; gap: 1.5rem; margin-top: 2.5rem; }
@media (min-width: 44rem) { .gallery { grid-template-columns: repeat(2, 1fr); } }
.gallery figure {
  background: var(--raised);
  border-radius: var(--r-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  gap: 1.25rem;
  align-items: center;
}
.gallery img {
  width: 128px;
  height: auto;
  border-radius: var(--r-sm);
  flex: none;
  box-shadow: var(--shadow-sm);
}
.gallery figcaption { font-size: 0.9375rem; color: var(--muted); }
.gallery figcaption strong { display: block; color: var(--ink); font-size: 1rem; margin-bottom: 0.2rem; }

/* --- honesty note ------------------------------------------------------ */

.note {
  background: var(--surface);
  border-radius: var(--r-md);
  padding: 1.5rem 1.75rem;
  margin-top: 2rem;
  border-left: 3px solid var(--accent-ui);
}
.note p { color: var(--muted); }
.note p + p { margin-top: 0.7rem; }

/* --- footer ------------------------------------------------------------ */

footer {
  border-top: 1px solid var(--rule);
  padding: 2.5rem 0 3.5rem;
  font-size: 0.875rem;
  color: var(--muted);
}
footer .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; }
footer nav { display: flex; gap: 1.25rem; }
