/*
 * dinnerkin.com — the site's only stylesheet. Mobile first; breakpoints 40rem and 48rem.
 *
 * Brand tokens come from the approved design hand-off (docs/design-handoff/tokens/tokens.json,
 * copied to app/src/theme/handoff.json). `npm run check:tokens` fails if a colour here drifts
 * from it. Fonts are the app's (Fraunces for headings, Figtree for text), served from this
 * domain: no third-party request, no cookie.
 * Text contrast (WCAG 2.2) on screen/card: text ~14:1, text-secondary ~10:1, text-muted ~5.9:1,
 * action ~5.6:1, success ~6:1. Decorative only (never text): plate colours, border colours.
 */
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/figtree-latin-400.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/figtree-latin-500.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/figtree-latin-600.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/figtree-latin-700.woff2") format("woff2"); }
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 500 700; font-display: swap; src: url("/fonts/fraunces-latin-variable-opsz.woff2") format("woff2"); }
:root {
  --color-canvas: #F6EFE4;          /* color.screen */
  --color-surface: #FFFBF5;         /* color.card */
  --color-bar: #FBF6EE;             /* color.bar */
  --color-surface-muted: #EFE4D5;   /* color.locked */
  --color-border: #E8DCCB;          /* color.line */
  --color-border-inner: #EFE4D5;    /* color.line.inner */
  --color-border-strong: #CDBDA9;   /* color.locked.border */
  --color-control-border: #8F7C6B;  /* color.control.border */
  --color-track: #EADFCF;           /* color.track */

  --color-ink: #2B201A;             /* color.text */
  --color-ink-muted: #4A3D34;       /* color.text.secondary */
  --color-ink-subtle: #6A5A4E;      /* color.text.muted */
  --color-ink-inverse: #FFFFFF;

  --color-primary: #A93F22;         /* color.action */
  --color-primary-pressed: #86311A; /* color.action.hover */
  --color-primary-soft: #F1E3D5;    /* color.tonal */
  --color-accent-border: #DDBBA8;   /* color.accent.border */

  --color-herb: #3D6837;            /* color.success */
  --color-herb-soft: #E2ECDA;       /* color.success.bg */
  --color-herb-border: #B9CDB0;     /* color.success.border */

  --color-mustard: #E2B77A;         /* color.warning.border */
  --color-mustard-soft: #FFF4E5;    /* color.warning.bg */
  --color-mustard-ink: #3D2A10;     /* color.warning.text */

  --color-danger: #9B2C2C;          /* color.error */
  --color-danger-soft: #FBEDE6;     /* color.error.bg */

  /* plateColors */
  --color-plate-1: #F3D9C4;
  --color-plate-2: #E6E2C3;
  --color-plate-3: #DCE7D3;
  --color-plate-4: #F2DCCB;
  --color-plate-5: #E9D6D1;
  --color-plate-6: #F4E6C2;
  --color-plate-7: #D9E3DD;

  /* radius */
  --radius-sm: 8px;
  --radius-md: 14px;                /* radius.input */
  --radius-card: 20px;              /* radius.card */
  --radius-sheet: 24px;

  /* Type scale (pt in the app → rem here). Figtree + Fraunces, like the app. */
  --font-sans: "Figtree", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --text-display: 2rem;
  --lh-display: 1.1875;
  --text-title: 1.5625rem;
  --lh-title: 1.24;
  --text-heading: 1.1875rem;
  --lh-heading: 1.316;
  --text-body: 1.0625rem;
  --lh-body: 1.412;
  --text-callout: 0.9375rem;
  --lh-callout: 1.4;
  --text-caption: 0.8125rem;
  --lh-caption: 1.385;

  --wrap: 64rem;
  --gutter: 1rem;
}
@media (min-width: 40rem) {
  :root { --gutter: 1.5rem; }
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, p, ul, ol, li, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
img, svg { display: block; }

html {
  height: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

body {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--color-canvas);
  color: var(--color-ink);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link:focus {
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: 50;
  width: auto;
  height: auto;
  margin: 0;
  clip: auto;
  overflow: visible;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  background: var(--color-ink);
  color: var(--color-ink-inverse);
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-optical-sizing: auto;
  letter-spacing: -0.01em;
}

.link {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.link:hover { color: var(--color-primary-pressed); }

/* ---------- Header ---------- */
.site-header {
  border-bottom: 1px solid var(--color-border);
  background: var(--color-canvas);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  font-size: var(--text-heading);
  line-height: var(--lh-heading);
  font-weight: 700;
  color: var(--color-ink);
  text-decoration: none;
}
.brand svg { width: 2rem; height: 2rem; }
.main-nav ul {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: var(--text-callout);
  line-height: var(--lh-callout);
}
.main-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 0.5rem;
  color: var(--color-ink-muted);
  text-decoration: none;
}
.main-nav a:hover { color: var(--color-ink); }
.main-nav .wide-only { display: none; }
@media (min-width: 40rem) {
  .main-nav ul { gap: 1rem; }
  .main-nav .wide-only { display: block; }
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--color-border);
  background: var(--color-surface-muted);
}
.site-footer .wrap { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: var(--text-callout);
  line-height: var(--lh-callout);
}
@media (min-width: 40rem) {
  .footer-links { flex-direction: row; flex-wrap: wrap; gap: 0 1.5rem; }
}
.footer-links a,
.footer-contact a {
  color: var(--color-ink-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.footer-links a { display: inline-flex; align-items: center; min-height: 2.75rem; }
.footer-links a:hover,
.footer-contact a:hover { color: var(--color-ink); }
.footer-contact {
  margin-top: 1.5rem;
  font-size: var(--text-callout);
  line-height: var(--lh-callout);
  color: var(--color-ink-muted);
}
.footer-small {
  margin-top: 0.5rem;
  font-size: var(--text-caption);
  line-height: var(--lh-caption);
  color: var(--color-ink-subtle);
}

/* ---------- Store badges ---------- */
.badges { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 3.5rem;
  min-width: 11rem;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-md);
  background: var(--color-ink);
  color: var(--color-ink-inverse);
  text-decoration: none;
}
a.badge:hover { background: #000; }
.badge > span { display: flex; flex-direction: column; line-height: 1.25; }
.badge-lead { font-size: var(--text-caption); }
.badge-store { font-size: var(--text-heading); font-weight: 600; }

/* ---------- Landing ---------- */
.hero .wrap {
  display: grid;
  align-items: center;
  gap: 2.5rem;
  padding-top: 2.5rem;
  padding-bottom: 3.5rem;
}
@media (min-width: 40rem) { .hero .wrap { padding-top: 4rem; } }
@media (min-width: 48rem) { .hero .wrap { padding-bottom: 5rem; } }
.hero-kicker {
  margin-bottom: 0.75rem;
  font-size: var(--text-callout);
  line-height: var(--lh-callout);
  font-weight: 600;
  color: var(--color-primary);
}
.hero h1 {
  font-size: var(--text-display);
  line-height: var(--lh-display);
  font-weight: 600;
}
@media (min-width: 40rem) { .hero h1 { font-size: 3rem; line-height: 1.08; } }
.hero-tagline {
  margin-top: 1.25rem;
  font-size: var(--text-heading);
  line-height: var(--lh-heading);
  font-weight: 600;
}
.hero-lede { margin-top: 0.75rem; max-width: 36rem; color: var(--color-ink-muted); }
.hero .badges { margin-top: 2rem; }
.hero-note {
  margin-top: 1rem;
  font-size: var(--text-callout);
  line-height: var(--lh-callout);
  color: var(--color-ink-muted);
}

.plate { display: block; border-radius: var(--radius-md); }
.plate-1 { background: var(--color-plate-1); }
.plate-2 { background: var(--color-plate-2); }
.plate-3 { background: var(--color-plate-3); }
.plate-4 { background: var(--color-plate-4); }
.plate-5 { background: var(--color-plate-5); }
.plate-6 { background: var(--color-plate-6); }
.plate-7 { background: var(--color-plate-7); }

/* Example phone screens (hero). Built in HTML and CSS from the app design: no images. */
.phones {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 1rem;
  padding-bottom: 0.5rem;
}
.phone {
  flex: 0 0 auto;
  width: 15.5rem;
  display: flex;
  flex-direction: column;
  border: 6px solid var(--color-ink);
  border-radius: 2.25rem;
  background: var(--color-canvas);
  overflow: hidden;
  box-shadow: 0 18px 40px -18px rgb(43 32 26 / 0.45);
}
.phone-screen { padding: 1.25rem 0.875rem 0.5rem; }
.phone-plan .phone-screen { min-height: 26.5rem; }
.phone-list .phone-screen { min-height: 21rem; }
.phone-kicker { font-size: 0.6875rem; line-height: 1.2; font-weight: 600; color: var(--color-ink-subtle); }
.phone-title { font-family: var(--font-serif); font-size: 1.375rem; line-height: 1.2; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 0.625rem; }
.meals { display: grid; gap: 0.5rem; }
.meal {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}
.meal .plate { flex: 0 0 2.5rem; width: 2.5rem; height: 2.5rem; border-radius: 10px; }
.meal-text { display: flex; flex-direction: column; min-width: 0; }
.meal-day { font-size: 0.6875rem; line-height: 1.2; font-weight: 700; color: var(--color-primary); }
.meal-title { font-size: 0.75rem; line-height: 1.25; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.phone-swap { display: flex; align-items: center; gap: 0.375rem; margin-top: 0.75rem; font-size: 0.6875rem; line-height: 1.3; color: var(--color-ink-muted); }
.phone-swap svg { width: 0.875rem; height: 0.875rem; color: var(--color-primary); flex: 0 0 auto; }
.list-group { margin-top: 0.5rem; padding: 0.5rem 0.625rem; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); }
.list-aisle { font-size: 0.6875rem; line-height: 1.2; font-weight: 700; color: var(--color-ink-subtle); margin-bottom: 0.25rem; }
.list-group ul { display: grid; gap: 0.25rem; }
.item { display: flex; align-items: center; gap: 0.5rem; font-size: 0.75rem; line-height: 1.3; font-weight: 500; }
.item .box { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 1rem; height: 1rem; border: 2px solid var(--color-control-border); border-radius: 5px; background: var(--color-surface); color: #fff; }
.item.done { color: var(--color-ink-subtle); text-decoration: line-through; }
.item.done .box { border-color: var(--color-primary); background: var(--color-primary); }
.item .box svg { width: 0.75rem; height: 0.75rem; stroke-width: 3; }
.phone-tabs { display: flex; justify-content: space-around; padding: 0.5rem 0.25rem 0.625rem; border-top: 1px solid var(--color-border); background: var(--color-bar); }
.phone-tabs span { display: flex; flex-direction: column; align-items: center; gap: 0.125rem; font-size: 0.625rem; line-height: 1.2; font-weight: 600; color: var(--color-ink-subtle); }
.phone-tabs span.on { color: var(--color-primary); }
.phone-tabs svg { width: 1.25rem; height: 1.25rem; }
.phones-note { flex: 1 0 100%; text-align: center; font-size: var(--text-caption); line-height: var(--lh-caption); color: var(--color-ink-subtle); }
.phone-list { display: none; }
@media (min-width: 48rem) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr) 16.5rem; }
  .phones { padding-bottom: 0; }
}
@media (min-width: 64rem) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr) 33.5rem; }
  .phone-list { display: flex; margin-top: 2.5rem; }
}

/* Content bands */
.band { border-top: 1px solid var(--color-border); background: var(--color-canvas); scroll-margin-top: 1rem; }
.band.surface { background: var(--color-surface); }
.band > .wrap { padding-top: 3.5rem; padding-bottom: 3.5rem; }
@media (min-width: 40rem) { .band > .wrap { padding-top: 5rem; padding-bottom: 5rem; } }
.eyebrow {
  margin-bottom: 0.5rem;
  font-size: var(--text-callout);
  line-height: var(--lh-callout);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  color: var(--color-primary);
}
.band h2 {
  max-width: 42rem;
  font-size: var(--text-title);
  line-height: var(--lh-title);
  font-weight: 600;
}
@media (min-width: 40rem) { .band h2 { font-size: 2rem; line-height: 1.25; } }
.band-body { margin-top: 1.5rem; }
.band h3 { font-size: var(--text-heading); line-height: var(--lh-heading); font-weight: 600; }
.muted { color: var(--color-ink-muted); }

.grid { display: grid; gap: 1rem; }
.grid.gap-lg { gap: 2rem; }
.grid.gap-md { gap: 1.5rem; }
@media (min-width: 48rem) {
  .cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cols-trial { grid-template-columns: 1.2fr 1fr; }
}
.card {
  padding: 1.25rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-canvas);
}
.card > p { margin-top: 0.5rem; color: var(--color-ink-muted); }
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  margin-bottom: 0.75rem;
  border-radius: 9999px;
  background: var(--color-primary);
  color: var(--color-ink-inverse);
  font-size: var(--text-callout);
  font-weight: 700;
}

.label-note {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-left: 4px solid var(--color-mustard);
  border-radius: var(--radius-md);
  background: var(--color-mustard-soft);
  font-size: var(--text-callout);
  line-height: var(--lh-callout);
}
.label-note strong { font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
.chips li {
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 9999px;
  background: var(--color-surface);
  font-size: var(--text-callout);
  line-height: var(--lh-callout);
}

.trial-box {
  padding: 1.25rem;
  border: 1px solid var(--color-herb);
  border-radius: var(--radius-card);
  background: var(--color-herb-soft);
  font-size: var(--text-callout);
  line-height: var(--lh-callout);
}
.trial-box p { font-weight: 600; color: var(--color-herb); }
.trial-box ul { display: grid; gap: 0.25rem; margin-top: 0.5rem; padding-left: 1.25rem; list-style: disc; }

/* FAQ: native <details>, no script */
.faq {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-canvas);
}
.faq details { padding: 0 1.25rem; }
.faq details + details { border-top: 1px solid var(--color-border); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.5rem;
  padding: 0.75rem 0;
  cursor: pointer;
  list-style: none;
  font-size: var(--text-heading);
  line-height: var(--lh-heading);
  font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq .plus {
  font-size: var(--text-title);
  line-height: 1;
  color: var(--color-primary);
  transition: transform 150ms;
}
.faq details[open] .plus { transform: rotate(45deg); }
.faq-answer { padding-bottom: 1.25rem; color: var(--color-ink-muted); }
.faq-answer p + p { margin-top: 0.5rem; }
.faq-answer a { color: var(--color-primary); text-decoration: underline; text-underline-offset: 2px; }

.cta {
  border-top: 1px solid var(--color-border);
  background: var(--color-primary);
  color: var(--color-ink-inverse);
}
.cta .wrap {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-top: 3.5rem;
  padding-bottom: 3.5rem;
}
@media (min-width: 48rem) {
  .cta .wrap { flex-direction: row; align-items: center; justify-content: space-between; }
}
.cta h2 { font-size: var(--text-title); line-height: var(--lh-title); font-weight: 600; }

/* ---------- Content and legal pages ---------- */
.page {
  width: 100%;
  max-width: 48rem;
  margin: 0 auto;
  padding: 2.5rem var(--gutter);
}
.page.not-found { padding-top: 5rem; padding-bottom: 5rem; }
.not-found h1 { font-size: var(--text-display); line-height: var(--lh-display); font-weight: 600; }
.not-found p { margin-top: 1rem; color: var(--color-ink-muted); }

.draft-banner {
  margin-bottom: 2rem;
  padding: 0.75rem 1rem;
  border: 2px solid var(--color-danger);
  border-radius: var(--radius-md);
  background: var(--color-danger-soft);
  font-size: var(--text-callout);
  line-height: var(--lh-callout);
}
.draft-banner strong { font-weight: 700; }

.legal { overflow-wrap: anywhere; }
.legal h1 { font-size: var(--text-display); line-height: var(--lh-display); font-weight: 600; margin: 0 0 1.25rem; }
.legal h2 { font-size: var(--text-title); line-height: var(--lh-title); font-weight: 600; margin: 2.5rem 0 0.75rem; }
.legal h3 { font-size: var(--text-heading); line-height: var(--lh-heading); font-weight: 600; margin: 1.75rem 0 0.5rem; }
.legal p,
.legal ul,
.legal ol,
.legal blockquote,
.legal table { margin: 0 0 1rem; }
.legal ul { list-style: disc; padding-left: 1.5rem; }
.legal ol { list-style: decimal; padding-left: 1.5rem; }
.legal li { margin: 0.25rem 0; }
.legal a { color: var(--color-primary); text-decoration: underline; text-underline-offset: 2px; }
.legal a:hover { color: var(--color-primary-pressed); }
.legal strong { font-weight: 650; }
.legal blockquote {
  border-left: 4px solid var(--color-border-strong);
  padding: 0.25rem 0 0.25rem 1rem;
  color: var(--color-ink-muted);
}
.legal hr { border: 0; border-top: 1px solid var(--color-border); margin: 2rem 0; }
.legal code {
  font-size: 0.9em;
  background: var(--color-surface-muted);
  padding: 0.1em 0.3em;
  border-radius: 4px;
}
.legal .table-wrap { overflow-x: auto; margin: 0 0 1rem; }
.legal table {
  border-collapse: collapse;
  width: 100%;
  font-size: var(--text-callout);
  line-height: var(--lh-callout);
  background: var(--color-surface);
}
.legal .table-wrap table { margin: 0; }
.legal th,
.legal td {
  border: 1px solid var(--color-border);
  padding: 0.5rem 0.75rem;
  text-align: left;
  vertical-align: top;
  overflow-wrap: normal;
  min-width: 8rem;
}
.legal th { background: var(--color-surface-muted); font-weight: 650; }
