/* MealTalk marketing site. Matcha & Clay palette, taken from the iOS app's
   asset catalog (Theme.swift colorsets) so the site matches the shipping app.
   No build step, no dependencies. House rule: no em-dashes in any copy.
   CACHE-BUST: this file is served with a 1-year immutable Cache-Control
   (Caddyfile @assets), so after editing it bump the ?v= stamp on every
   stylesheet link (index.html, privacy.html, terms.html), e.g. to the new
   `shasum -a 256 web/styles.css | cut -c1-8`, or returning visitors keep
   the stale cached copy (this broke the beta-signup modal, 2026-07-17). */

:root {
  --cream: #F5F1E8;        /* background */
  --surface: #FFFFFF;      /* cards */
  --sage: #6B8E5E;         /* primary (matcha) */
  --sage-dim: #5C7C50;
  --terracotta: #C97A4E;   /* secondary */
  --peach: #F5D4BA;        /* secondaryContainer, soft highlight */
  --ink: #1F2F1A;          /* onSurface text */
  --ink-soft: #44523E;     /* muted text */
  --ink-faint: #6E7A68;    /* captions */
  --on-sage: #FFFFFF;
  --hairline: rgba(31, 47, 26, 0.10);
  --shadow: 0 1px 2px rgba(31, 47, 26, 0.06), 0 8px 28px rgba(31, 47, 26, 0.08);

  --display: ui-rounded, "SF Pro Rounded", -apple-system, system-ui, "Segoe UI", Roboto, sans-serif;
  --body: -apple-system, system-ui, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --maxw: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --cream: #18191A;
    --surface: #232520;
    --sage: #7FAD70;
    --sage-dim: #6E9A61;
    --terracotta: #D4895C;
    --peach: #3D2218;
    --ink: #E8E4D8;
    --ink-soft: #C2C0B6;
    --ink-faint: #9A9C90;
    --on-sage: #14180F;
    --hairline: rgba(232, 228, 216, 0.12);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 28px rgba(0, 0, 0, 0.35);
  }
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html, body { overflow-x: hidden; }
img, svg { max-width: 100%; }

body {
  font-family: var(--body);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, .display { font-family: var(--display); letter-spacing: -0.02em; line-height: 1.1; }

a { color: inherit; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--cream) 82%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--hairline);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand svg, .brand img { width: 32px; height: 32px; border-radius: 8px; display: block; }
.brand .name { font-family: var(--display); font-weight: 700; font-size: 19px; color: var(--ink); }
.nav-cta {
  font-family: var(--body); font-weight: 600; font-size: 15px; text-decoration: none;
  color: var(--on-sage); background: var(--sage); border: none; cursor: pointer;
  padding: 9px 16px; border-radius: 999px; transition: background 0.15s ease;
}
.nav-cta:hover { background: var(--sage-dim); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--display); font-weight: 600; font-size: 17px;
  text-decoration: none; cursor: pointer; border: none;
  padding: 14px 26px; border-radius: 999px; transition: transform 0.12s ease, background 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--sage); color: var(--on-sage); }
.btn-primary:hover { background: var(--sage-dim); }
.btn-ghost { color: var(--ink); background: transparent; }
.btn-ghost:hover { color: var(--sage); }

/* ---------- Hero ---------- */
.hero { padding: 76px 0 64px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.hero-grid > * { min-width: 0; }
.hero h1 { font-size: clamp(40px, 6vw, 60px); font-weight: 800; }
.hero .lede { margin-top: 20px; font-size: clamp(17px, 2vw, 20px); color: var(--ink-soft); max-width: 30ch; }
.hero-actions { margin-top: 34px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.hero-note { margin-top: 18px; font-size: 14px; color: var(--ink-faint); }

/* ---------- Beta signup modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center; padding: 20px;
  background: rgba(20, 26, 16, 0.45);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
/* The author display:grid would otherwise override the UA's
   [hidden] { display: none } and show the modal on load. */
.modal-backdrop[hidden], .beta-error[hidden], #beta-success-view[hidden], #beta-form-view[hidden] { display: none; }
body.modal-open { overflow: hidden; }
.modal-panel {
  position: relative; width: 100%; max-width: 420px;
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: 26px; padding: 34px 32px 28px;
  box-shadow: var(--shadow);
}
.modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 34px; height: 34px; border-radius: 999px; border: none;
  display: grid; place-items: center; cursor: pointer;
  color: var(--ink-faint); background: color-mix(in srgb, var(--ink) 6%, transparent);
  transition: color 0.15s ease, background 0.15s ease;
}
.modal-close:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 10%, transparent); }
.modal-title { font-size: 26px; font-weight: 800; }
.modal-copy { margin-top: 10px; color: var(--ink-soft); font-size: 15.5px; }
#beta-form { margin-top: 20px; display: flex; flex-direction: column; gap: 10px; }
#beta-form .btn { width: 100%; justify-content: center; }
#beta-form .btn:disabled { opacity: 0.7; cursor: default; }
.beta-input {
  font-family: var(--body); font-size: 16px; color: var(--ink);
  background: var(--cream); border: 1px solid var(--hairline);
  padding: 13px 20px; border-radius: 999px; outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.beta-input::placeholder { color: var(--ink-faint); }
.beta-input:focus {
  border-color: var(--sage);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--sage) 22%, transparent);
}
.beta-error { margin-top: 12px; font-size: 14px; color: var(--terracotta); }
.modal-privacy { margin-top: 14px; font-size: 13px; color: var(--ink-faint); }
.success-glyph {
  width: 46px; height: 46px; border-radius: 999px;
  display: grid; place-items: center; margin-bottom: 16px;
  color: var(--sage-dim); background: color-mix(in srgb, var(--sage) 15%, transparent);
}
/* Honeypot: visually gone, still in the DOM for bots. Never display:none so
   naive bots don't skip it. */
.hp-field {
  position: absolute; left: -9999px; top: auto;
  width: 1px; height: 1px; overflow: hidden;
}

/* ---------- Demo card (voice -> result) ---------- */
.demo {
  background: var(--surface); border-radius: 28px; padding: 24px;
  box-shadow: var(--shadow); border: 1px solid var(--hairline);
}
.bubble {
  display: inline-block; background: var(--sage); color: var(--on-sage);
  font-size: 16px; padding: 12px 18px; border-radius: 20px 20px 20px 6px;
  margin-bottom: 8px;
}
.bubble .mic { opacity: 0.85; }
.demo-arrow { color: var(--ink-faint); font-size: 13px; margin: 10px 2px; display: flex; align-items: center; gap: 8px; }
.food-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 4px; border-bottom: 1px solid var(--hairline);
}
.food-row:last-child { border-bottom: none; }
.food-row > div:first-child { min-width: 0; }
.bubble { max-width: 100%; }
.food-name { font-weight: 600; font-size: 16px; }
.food-sub { font-size: 13px; color: var(--ink-faint); }
.kcal { font-family: var(--display); font-weight: 700; font-size: 17px; }
.macros { display: flex; gap: 18px; margin-top: 14px; padding-top: 4px; }
.macro { text-align: center; flex: 1; }
.macro .v { font-family: var(--display); font-weight: 800; font-size: 22px; }
.macro .k { font-size: 12px; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.05em; }
.macro.p .v { color: var(--sage); }
.macro.c .v { color: var(--terracotta); }
.macro.f .v { color: #B59A3C; }
.badge-verified {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600;
  color: var(--sage-dim); background: color-mix(in srgb, var(--sage) 13%, transparent);
  padding: 4px 10px; border-radius: 999px; margin-top: 16px;
}

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section h2 { font-size: clamp(28px, 4vw, 38px); font-weight: 800; text-align: center; }
.section .sub { text-align: center; color: var(--ink-soft); margin-top: 12px; font-size: 18px; max-width: 52ch; margin-left: auto; margin-right: auto; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 44px; }
.card {
  background: var(--surface); border: 1px solid var(--hairline); border-radius: 22px;
  padding: 28px 24px; box-shadow: var(--shadow);
}
.card .glyph {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--sage) 15%, transparent); margin-bottom: 18px;
}
.card .glyph svg { width: 24px; height: 24px; }
.card h3 { font-size: 20px; font-weight: 700; }
.card p { margin-top: 10px; color: var(--ink-soft); font-size: 15.5px; }

/* ---------- Trust band ---------- */
.trust { background: color-mix(in srgb, var(--sage) 11%, transparent); }
.trust .wrap { padding-top: 64px; padding-bottom: 64px; }
.trust-inner { max-width: 760px; margin: 0 auto; text-align: center; }
.trust .eyebrow { font-weight: 700; color: var(--sage-dim); letter-spacing: 0.06em; text-transform: uppercase; font-size: 13px; }
.trust .claim { font-family: var(--display); font-weight: 700; font-size: clamp(22px, 3.4vw, 30px); line-height: 1.3; margin-top: 16px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--hairline); padding: 40px 0; margin-top: 16px; }
.footer-grid { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-grid .brand .name { font-size: 17px; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links a { color: var(--ink-soft); text-decoration: none; font-size: 15px; }
.footer-links a:hover { color: var(--sage); }
.copyright { color: var(--ink-faint); font-size: 13.5px; margin-top: 18px; }

/* ---------- Legal pages ---------- */
.legal { padding: 56px 0 72px; }
.legal .wrap { max-width: 760px; }
.legal h1 { font-size: clamp(32px, 5vw, 44px); font-weight: 800; }
.legal .updated { color: var(--ink-faint); margin-top: 10px; font-size: 14px; }
.legal h2 { font-size: 22px; font-weight: 700; margin-top: 38px; }
.legal p, .legal li { color: var(--ink-soft); font-size: 16px; margin-top: 14px; }
.legal ul { margin-top: 10px; padding-left: 22px; }
.legal li { margin-top: 8px; }
.legal a { color: var(--sage-dim); }
.legal .note {
  background: var(--peach); color: var(--ink); border-radius: 16px;
  padding: 16px 20px; margin-top: 24px; font-size: 14.5px;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero .lede { max-width: none; }
  .cards { grid-template-columns: 1fr; }
  .hero { padding: 48px 0 40px; }
}
@media (max-width: 520px) {
  .nav-cta { display: none; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .btn { justify-content: center; }
  /* Near-full-width panel with margins from the backdrop's padding. */
  .modal-panel { padding: 28px 22px 24px; }
}
