/* A1cMealPrep website. One stylesheet, no scripts, no third-party requests.
   Colours are the app's tokens (HANDOFF.md, "Tokens"): light by default, dark through
   prefers-color-scheme. Fonts are self-hosted (Inter, Instrument Serif; both SIL OFL). */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/inter-400.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/inter-500.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/inter-600.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/inter-700.woff2") format("woff2"); }
@font-face { font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/instrument-serif-400.woff2") format("woff2"); }

:root {
  color-scheme: light dark;

  --bg: #F5F3ED;
  --surface: #FFFFFF;
  --ink: #171A16;
  --muted: #62665D;
  --line: #E2DFD5;
  --primary: #4A6B22;
  --on-primary: #FFFFFF;
  --primary-soft: #4A6B2214;
  --accent: #B87414;
  --accent-soft: #B8741414;
  --accent-line: #B8741440;
  --plate-veg: #3E8A3A;
  --plate-protein: #C4553A;
  --plate-carb: #A87A14;

  --radius-card: 18px;
  --radius-control: 12px;
  --gutter: 20px;
  --measure: 44rem;

  --serif: "Instrument Serif", "New York", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131513;
    --surface: #1D201D;
    --ink: #F2EFE7;
    --muted: #A3A59C;
    --line: #2E332D;
    --primary: #C5E08F;
    --on-primary: #131513;
    --primary-soft: #C5E08F1F;
    --accent: #F2B25C;
    --accent-soft: #F2B25C1A;
    --accent-line: #F2B25C47;
    --plate-veg: #8CCB78;
    --plate-protein: #EE8D6A;
    --plate-carb: #EDC06A;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 1rem;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--sans);
  font-feature-settings: "kern", "liga";
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; height: auto; }

a { color: var(--primary); text-underline-offset: 0.18em; text-decoration-thickness: 0.08em; }
a:hover { text-decoration-thickness: 0.14em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; left: var(--gutter); top: -4rem;
  background: var(--primary); color: var(--on-primary);
  padding: 0.6rem 1rem; border-radius: var(--radius-control); z-index: 10;
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 0.75rem; }

.wrap { width: min(100% - 2 * var(--gutter), 68rem); margin-inline: auto; }

/* ---------- Header and footer ---------- */

.site-header { padding: 1.1rem 0; }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1.5rem; }

.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.0625rem; letter-spacing: -0.01em; }
.brand img { width: 34px; height: 34px; border-radius: 10px; display: block; }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.site-nav a { color: var(--muted); text-decoration: none; font-size: 0.95rem; font-weight: 500; padding: 0.35rem 0; display: inline-block; }
.site-nav a:hover { color: var(--ink); text-decoration: underline; }
.site-nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--primary); text-decoration-thickness: 0.14em; text-underline-offset: 0.3em; }

.site-footer { margin-top: 5rem; padding: 2.25rem 0 3rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9rem; line-height: 1.6; }
.site-footer .wrap { display: grid; gap: 1.25rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.35rem 1.25rem; }
.site-footer a { color: var(--ink); }
.site-footer p { margin: 0; max-width: 46rem; }

/* ---------- Type ---------- */

h1, h2 { font-family: var(--serif); font-weight: 400; font-synthesis: none; letter-spacing: -0.012em; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 7.5vw, 4rem); line-height: 1.03; margin: 0 0 1rem; }
h2 { font-size: clamp(1.9rem, 4.5vw, 2.4rem); line-height: 1.12; margin: 3rem 0 0.75rem; }
h3 { font-family: var(--sans); font-size: 1.0625rem; font-weight: 600; line-height: 1.35; margin: 1.75rem 0 0.4rem; }
p { margin: 0 0 1rem; text-wrap: pretty; }
ul, ol { margin: 0 0 1rem; padding-left: 1.25rem; }
li { margin: 0 0 0.4rem; }
strong { font-weight: 600; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }

.lead { font-size: 1.2rem; line-height: 1.55; color: var(--muted); max-width: 38rem; }
.meta { color: var(--muted); font-size: 0.95rem; margin-bottom: 1.5rem; }
.small { font-size: 0.9rem; color: var(--muted); }
.eyebrow { font-size: 0.85rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--primary); margin: 0 0 0.75rem; }

/* ---------- Legal and support pages ---------- */

.page { padding-top: 1.5rem; }
.prose { max-width: var(--measure); }
.prose > h2:first-of-type { margin-top: 2rem; }

.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 1.1rem 1.4rem 0.6rem; margin: 1.5rem 0 0; max-width: var(--measure); }
.toc p { font-weight: 600; margin-bottom: 0.4rem; }
.toc ol { columns: 2 16rem; column-gap: 2rem; margin-bottom: 0.4rem; }
.toc li { break-inside: avoid; }

/* "Draft, pending legal review" banner. To remove it everywhere, change this rule to display: none. */
.draft-banner {
  display: block;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-control);
  padding: 0.75rem 1rem;
  margin: 0.5rem 0 1.5rem;
  font-size: 0.95rem;
  max-width: var(--measure);
}
.draft-banner strong { font-weight: 700; }

/* Facts only the company can supply, in square brackets. Remove this rule's styling once they are filled in. */
mark.ph {
  background: var(--accent-soft);
  color: inherit;
  outline: 1px dashed var(--accent-line);
  outline-offset: 1px;
  border-radius: 4px;
  padding: 0 0.2em;
  font-weight: 500;
}

.callout { background: var(--primary-soft); border-left: 4px solid var(--primary); border-radius: 0 var(--radius-control) var(--radius-control) 0; padding: 1rem 1.25rem; margin: 1.5rem 0; max-width: var(--measure); }
.callout > :last-child { margin-bottom: 0; }
.callout h2, .callout h3 { margin-top: 0; }
.callout.safety { background: var(--accent-soft); border-left-color: var(--accent); }
/* A note for the lawyer inside a draft page. Remove the note from the page before publishing. */
.callout.lawyer-note { background: var(--accent-soft); border: 1px dashed var(--accent-line); border-left: 4px dashed var(--accent); }
.callout.lawyer-note ul { margin-bottom: 0; }

/* ---------- Tables (stack into labelled blocks on phones) ---------- */

.table-wrap { margin: 1.25rem 0 1.5rem; }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; line-height: 1.5; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); overflow: hidden; border-spacing: 0; }
th, td { text-align: left; vertical-align: top; padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--line); }
th { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); background: var(--bg); }
tbody tr:last-child td { border-bottom: 0; }
td:first-child { font-weight: 600; }

@media (max-width: 42rem) {
  table, thead, tbody, tr, th, td { display: block; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  tr { padding: 0.6rem 0; border-bottom: 1px solid var(--line); }
  tbody tr:last-child { border-bottom: 0; }
  td { border: 0; padding: 0.3rem 0.9rem; }
  td::before { content: attr(data-label); display: block; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
  td:first-child::before { display: none; }
  td:first-child { font-size: 1rem; padding-top: 0.4rem; }
}

/* ---------- Landing page ---------- */

.hero { display: grid; gap: 2.5rem; padding: 2rem 0 1rem; align-items: center; }
@media (min-width: 52rem) { .hero { grid-template-columns: 1.25fr 1fr; gap: 3.5rem; padding-top: 3rem; } }

.chips { list-style: none; margin: 1.5rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.chips li { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-control); padding: 0.45rem 0.9rem; font-size: 0.95rem; font-weight: 500; }

.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1rem; margin-top: 1.75rem; }
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0.8rem 1.6rem;
  background: var(--primary); color: var(--on-primary);
  border-radius: var(--radius-control); border: 0;
  font: 600 1rem/1.2 var(--sans); text-decoration: none;
}
.button:hover { text-decoration: underline; }
.button.quiet { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.coming-soon { display: inline-flex; align-items: center; min-height: 52px; padding: 0.8rem 1.6rem; border-radius: var(--radius-control); background: var(--primary-soft); color: var(--ink); font-weight: 600; border: 1px solid var(--line); }

.plate-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 1.5rem; text-align: center; }
.plate-card svg { width: min(15rem, 70%); height: auto; display: block; margin: 0 auto 1rem; }
.plate-card .slice-veg { fill: var(--plate-veg); }
.plate-card .slice-protein { fill: var(--plate-protein); }
.plate-card .slice-carb { fill: var(--plate-carb); }
.plate-card .rim { fill: none; stroke: var(--line); stroke-width: 6; }
.plate-card .gap { stroke: var(--surface); stroke-width: 4; }
.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.3rem; text-align: left; font-size: 0.92rem; }
.legend li { margin: 0; display: flex; align-items: center; gap: 0.6rem; }
.legend i { width: 0.8rem; height: 0.8rem; border-radius: 50%; flex: none; }
.legend .veg { background: var(--plate-veg); }
.legend .protein { background: var(--plate-protein); }
.legend .carb { background: var(--plate-carb); }
.plate-card figcaption { margin-top: 1rem; font-size: 0.85rem; color: var(--muted); text-align: left; }

.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr)); margin: 1.5rem 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 1.4rem; }
.card h3 { margin-top: 0; font-size: 1.1rem; }
.card p { font-size: 0.98rem; }
.card p:last-child { margin-bottom: 0; }

.section { margin-top: 4rem; }
.section > h2:first-child { margin-top: 0; }

.prices { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); margin: 1.5rem 0; max-width: 40rem; }
.price { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 1.25rem 1.4rem; }
.price.featured { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.price h3 { margin: 0 0 0.25rem; }
.price .amount { font-size: 1.6rem; font-weight: 700; letter-spacing: -0.02em; margin: 0; line-height: 1.2; color: var(--ink); }
.price p { margin: 0.25rem 0 0; font-size: 0.92rem; color: var(--muted); }

/* ---------- Print ---------- */

@media print {
  body { background: #fff; color: #000; font-size: 11pt; }
  .site-nav, .skip-link, .toc, .cta { display: none; }
  a { color: inherit; }
}
