/* MealMark — design tokens + base styles
   ============================================================== */

:root {
  /* Color (cool neutral base, one locked accent) */
  --paper: #F4F6F2;
  --surface: #E7EEE8;
  --card: #FFFFFF;
  --ink: #15201A;
  --muted: #46524C;
  --hint: #6A756F;
  --hairline: rgba(21, 32, 26, 0.13);
  --hairline-strong: rgba(21, 32, 26, 0.22);

  /* Trust accent — teal. ONLY on trust signals. */
  --teal: #0E6E56;
  --teal-deep: #08402F;
  --teal-tint: #E3F1EB;
  --teal-tint-strong: #CDE6DB;

  /* Primary action — warmer and more app-like than the ink color. */
  --action: #0B7658;
  --action-hover: #095B43;

  /* Caution — for "modified / estimated". */
  --amber-ink: #6B4A0E;
  --amber-tint: #F4ECD7;

  /* Untrusted / unverifiable — calm neutral grey, not red. */
  --grey-ink: #4A5450;
  --grey-tint: #DDE2DE;

  /* Radius scale — one locked scale, no mixing. */
  --r-surface: 18px;
  --r-medium: 10px;
  --r-button: 12px;
  --r-pill: 999px;

  /* Type */
  --serif: "Source Serif 4", "Source Serif Pro", "Iowan Old Style", Georgia, serif;
  --grotesk: "Hanken Grotesk", "Geist", "Söhne", "Helvetica Neue", Arial, sans-serif;

  /* Shadows — restrained, document-like depth. */
  --shadow-card: 0 1px 0 rgba(21, 32, 26, 0.04),
                 0 6px 18px rgba(21, 32, 26, 0.06),
                 0 22px 48px rgba(21, 32, 26, 0.06);
  --shadow-card-soft: 0 1px 0 rgba(21, 32, 26, 0.04),
                      0 6px 16px rgba(21, 32, 26, 0.05);
  --shadow-phone: 0 24px 60px rgba(21, 32, 26, 0.18),
                  0 8px 18px rgba(21, 32, 26, 0.10);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--grotesk);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  /* Prevent decorative breakouts (tilted iPhone in hero) from creating a
     horizontal scrollbar between ~1041px and ~1465px viewports. `clip` is
     used over `hidden` so it doesn't establish a scroll container or break
     position: sticky on the header. */
  overflow-x: clip;
}
html {
  scroll-padding-top: 88px;
}

img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }

/* Layout containers */
.container {
  width: 100%;
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 32px;
}
@media (max-width: 720px) {
  .container { padding: 0 22px; }
}

/* Headlines (serif) */
.h-display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 6.2vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.018em;
  color: var(--ink);
  text-wrap: balance;
}
.h-section {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(32px, 4vw, 50px);
  line-height: 1.08;
  letter-spacing: -0.012em;
  color: var(--ink);
  text-wrap: balance;
}
.h-card {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 22px;
  line-height: 1.18;
  letter-spacing: -0.005em;
  color: var(--ink);
}
.h-meal {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 26px;
  line-height: 1.18;
  letter-spacing: -0.006em;
  color: var(--ink);
}

/* Eyebrows, labels, microcopy (grotesk) */
.eyebrow {
  font-family: var(--grotesk);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.label {
  font-family: var(--grotesk);
  font-weight: 500;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hint);
}
.subtle {
  color: var(--muted);
}
.body-lg {
  font-size: 19px;
  line-height: 1.55;
  color: var(--muted);
  font-weight: 400;
}
.body {
  font-size: 16px;
  line-height: 1.55;
  color: var(--muted);
}
.mono {
  font-family: "Geist Mono", "JetBrains Mono", "IBM Plex Mono", ui-monospace, monospace;
  font-feature-settings: "ss01" on;
}

em, i { font-style: italic; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 22px;
  border-radius: var(--r-button);
  border: 1px solid transparent;
  font-family: var(--grotesk);
  font-size: 15.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: transform 160ms ease, background 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 200ms ease;
  user-select: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--action);
  color: #FFFFFF;
  box-shadow: 0 12px 24px rgba(14, 110, 86, 0.18);
}
.btn-primary:hover {
  background: var(--action-hover);
  transform: translateY(-0.5px);
}
.btn-secondary {
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  border-color: var(--hairline-strong);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.62);
}
.btn-secondary:hover {
  border-color: var(--ink);
  background: #FFFFFF;
  transform: translateY(-0.5px);
}
.btn-sm {
  height: 38px;
  padding: 0 16px;
  font-size: 14px;
  border-radius: var(--r-button);
}

/* Pills (status chips) — fully round */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 26px;
  padding: 0 11px 0 9px;
  border-radius: var(--r-pill);
  font-family: var(--grotesk);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: -0.002em;
  white-space: nowrap;
}
.pill-teal {
  background: var(--teal-tint);
  color: var(--teal-deep);
}
.pill-amber {
  background: var(--amber-tint);
  color: var(--amber-ink);
}
.pill-grey {
  background: var(--grey-tint);
  color: var(--grey-ink);
}
.pill-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--hairline);
}
.pill-dot {
  width: 6px; height: 6px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.85;
  flex-shrink: 0;
}

/* Hairlines */
.rule {
  height: 1px;
  background: var(--hairline);
  width: 100%;
}
.rule-dashed {
  height: 0;
  border-top: 1px dashed var(--hairline-strong);
  width: 100%;
}

/* Section spacing */
section.section {
  padding: 96px 0;
  position: relative;
  scroll-margin-top: 88px;
}
#sec-loop,
#sec-how,
#sec-guesses,
#sec-anatomy,
#sec-open,
#sec-dash,
#sec-web,
#sec-future,
#sec-rec,
#sec-price,
#sec-faq,
#sec-final {
  scroll-margin-top: 88px;
}
@media (max-width: 720px) {
  section.section { padding: 64px 0; }
}

/* Page-load reveal */
@keyframes om-rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.reveal {
  opacity: 0;
  animation: om-rise 700ms cubic-bezier(.2,.7,.2,1) forwards;
}
.reveal[data-delay="1"] { animation-delay: 80ms; }
.reveal[data-delay="2"] { animation-delay: 160ms; }
.reveal[data-delay="3"] { animation-delay: 260ms; }
.reveal[data-delay="4"] { animation-delay: 360ms; }
.reveal[data-delay="5"] { animation-delay: 460ms; }
.reveal[data-delay="6"] { animation-delay: 560ms; }

/* On-scroll entrance */
.io-rise {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 700ms ease, transform 700ms cubic-bezier(.2,.7,.2,1);
  will-change: opacity, transform;
}
.io-rise.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal, .io-rise {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* Focus-visible (WCAG AA) */
:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: 4px;
}
.btn:focus-visible {
  outline-offset: 3px;
}

/* Generic surfaces */
.surface {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--r-surface);
  box-shadow: var(--shadow-card-soft);
}

/* Verified seal — small teal circle with check, used in wordmark + record */
.seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--teal);
  color: #fff;
  flex-shrink: 0;
}
.seal svg { width: 11px; height: 11px; }
.seal-lg { width: 28px; height: 28px; }
.seal-lg svg { width: 16px; height: 16px; }

/* Wordmark */
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.012em;
  color: var(--ink);
}

/* Subtle striped placeholder (used when no Unsplash image suits) */
.ph-stripe {
  background-image: repeating-linear-gradient(
    135deg,
    rgba(21, 32, 26, 0.05) 0,
    rgba(21, 32, 26, 0.05) 1px,
    transparent 1px,
    transparent 8px
  ), var(--surface);
  border: 1px solid var(--hairline);
}

/* Untrusted (safe-read-only) tone — desaturates */
.untrusted-grey {
  filter: saturate(0.18) brightness(0.96);
}
