/*
 * Landing site — the brand palette (packages/content/brand/README.md: green #2BA84A, orange #FF8C00, yellow #FFC531)
 * on the warm off-white ground, weight-loss led (mockup v2). WCAG 2.1 AA (NFR-U4): text on the bright green and the
 * orange is dark ink (#0f2a17 on the green 4.9:1, #1d1200 on the orange 8.6:1); text in those hues on light grounds
 * uses --green-deep (5.0:1) and --accent-ink (4.9:1); the yellow is a fill only. System fonts: the CSP loads nothing
 * from other origins.
 */
:root {
  --bg: #f8f5ee;
  --surface: #ffffff;
  --band: #eef6ef;
  --ink: #14231a;
  --muted: #4d5b52;
  --line: #dcd6c8;
  --green: #2ba84a;
  --green-deep: #1e7a37;
  --green-dark: #123f22;
  --green-ink: #0f2a17;
  --sun: #ffc531;
  --sun-soft: #fff3c8;
  --accent: #ff8c00;
  --accent-ink: #a85300;
  --accent-text: #1d1200;
  --on-dark: #cfe8d5;
  --radius: 20px;
  --shadow: 0 1px 2px rgb(20 35 26 / 6%), 0 8px 24px rgb(20 35 26 / 6%);
  --display: ui-rounded, "SF Pro Rounded", -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --body: ui-sans-serif, -apple-system, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1.0625rem/1.6 var(--body); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 0.45em; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 6vw, 4.2rem); font-weight: 800; }
h2 { font-size: clamp(1.75rem, 4vw, 2.7rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
h4 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--green-deep); }

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 24px; } }
.narrow { max-width: 780px; }
section { padding: clamp(56px, 8vw, 96px) 0; }
section[id] { scroll-margin-top: 72px; }
.tint { background: var(--band); }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 46ch; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 62ch; }
.caption { color: var(--muted); font-size: 0.95rem; }
.eyebrow {
  display: inline-block; margin: 0 0 14px; padding: 3px 12px; border-radius: 999px;
  background: var(--sun); color: var(--ink); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
}

.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 8px; z-index: 10; }
:focus-visible { outline: 3px solid var(--accent-ink); outline-offset: 3px; border-radius: 6px; } /* the bright orange is 2.1:1, under the 3:1 a focus ring needs */

/* Top bar */
.top { position: sticky; top: 0; z-index: 5; background: rgb(248 245 238 / 92%); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1rem; color: var(--green-deep); text-decoration: none; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.top .sections { display: none; gap: 22px; margin-left: auto; margin-right: 8px; }
.top .sections a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 0.97rem; }
.top .sections a:hover { color: var(--green-deep); text-decoration: underline; }
@media (min-width: 900px) { .top .sections { display: flex; } }

/* Buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px;
  border: 0; border-radius: 999px; background: var(--green); color: var(--green-ink);
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
}
.button:hover { filter: brightness(1.08); }
.button[disabled] { opacity: 0.7; cursor: progress; }
.button.small { min-height: 40px; padding: 0 16px; font-size: 0.95rem; }
.button.go { background: var(--accent); color: var(--accent-text); }
.button.ghost { background: transparent; color: var(--green-deep); box-shadow: inset 0 0 0 2px var(--green); }

/* Hero: the bright green band, with the phone stepping through the plan flow */
.home-hero { background: radial-gradient(1200px 500px at 85% 10%, #3cc25e 0%, transparent 60%), var(--green); color: var(--green-ink); overflow: hidden; padding: clamp(40px, 7vw, 80px) 0 0; }
.hero-grid { display: grid; gap: 40px; align-items: end; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.15fr 0.85fr; } }
.hero-copy { padding-bottom: clamp(40px, 6vw, 72px); }
.home-hero h1 em { font-style: normal; color: #ffffff; text-shadow: 0 2px 0 rgb(15 42 23 / 35%); }
.home-hero .lede { color: var(--green-ink); max-width: 36ch; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 18px; }
.home-hero .button.ghost { color: var(--green-ink); box-shadow: inset 0 0 0 2px var(--green-ink); }
.ticks { display: flex; flex-wrap: wrap; gap: 8px 18px; list-style: none; padding: 0; margin: 0 0 20px; font-weight: 600; font-size: 0.95rem; }
.ticks li::before { content: "✓ "; font-weight: 800; }
.howlink { color: var(--green-ink); font-weight: 700; }

.demo { position: relative; justify-self: center; width: min(300px, 80vw); aspect-ratio: 9 / 18.5; border-radius: 40px 40px 0 0; background: var(--green-dark); padding: 12px 12px 0; box-shadow: 0 30px 60px rgb(0 0 0 / 27%); }
.screen { position: relative; height: 100%; border-radius: 30px 30px 0 0; background: #fbfaf6; overflow: hidden; color: var(--ink); }
.frame { position: absolute; inset: 0; padding: 28px 18px; display: grid; align-content: start; gap: 10px; opacity: 0; }
.frame:first-child { opacity: 1; }
.frame p { margin: 0; font-size: 0.9rem; }
.frame .k { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--green-deep); }
.frame .num { font: 800 3rem/1 var(--display); color: var(--green-deep); }
.frame .row { background: #ffffff; border: 1px solid #e2ddd0; border-radius: 12px; padding: 9px 11px; font-size: 0.82rem; display: flex; justify-content: space-between; gap: 8px; }
.frame .row b { color: var(--accent-ink); white-space: nowrap; }
.frame .pill { justify-self: start; background: var(--sun); border-radius: 999px; padding: 2px 10px; font-size: 0.75rem; font-weight: 700; }
.dots { position: absolute; bottom: 14px; left: 0; right: 0; display: flex; gap: 6px; justify-content: center; margin: 0; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: #cfd8cf; }
@media (prefers-reduced-motion: no-preference) {
  .frame { animation: show 15s infinite; }
  .frame:first-child { opacity: 0; }
  .frame:nth-child(2) { animation-delay: 3s; }
  .frame:nth-child(3) { animation-delay: 6s; }
  .frame:nth-child(4) { animation-delay: 9s; }
  .frame:nth-child(5) { animation-delay: 12s; }
  @keyframes show { 0% { opacity: 0; transform: translateY(8px); } 3%, 18% { opacity: 1; transform: none; } 21%, 100% { opacity: 0; } }
}

/* Counters under the hero: numbers from the corpus and the tier constants */
.counters { background: var(--surface); border-bottom: 1px solid var(--line); }
.counters .wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 20px; padding-top: 40px; padding-bottom: 40px; text-align: center; }
.counters p { margin: 0; }
.counters b { display: block; font: 800 clamp(2.2rem, 5vw, 3.2rem)/1.1 var(--display); color: var(--green-deep); font-variant-numeric: tabular-nums; }
.counters span { color: var(--muted); font-weight: 600; font-size: 0.95rem; }

/* Calorie calculator */
.calc-grid { display: grid; gap: 24px; margin-top: 28px; }
@media (min-width: 900px) { .calc-grid { grid-template-columns: 1fr 1fr; } }
.calc-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: grid; gap: 14px; grid-template-columns: 1fr 1fr; align-content: start; }
.calc-form label { display: grid; gap: 6px; font-weight: 600; font-size: 0.92rem; min-width: 0; }
.calc-form .full { grid-column: 1 / -1; }
.calc-result { background: var(--green-dark); color: #ffffff; border-radius: var(--radius); padding: 28px; display: grid; gap: 18px; align-content: start; }
.calc-result p { margin: 0; }
.calc-result .small { color: var(--on-dark); font-size: 0.85rem; }
.calc-result .big { font: 800 clamp(3rem, 7vw, 4.6rem)/1 var(--display); color: var(--sun); font-variant-numeric: tabular-nums; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stats p { background: rgb(255 255 255 / 8%); border-radius: 14px; padding: 12px; }
.stats b { display: block; font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.stats span { font-size: 0.8rem; color: var(--on-dark); }
.calc-result .button { justify-self: start; }

/* The real sample day */
.dayplan { margin-top: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.dayplan header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 24px; align-items: end; margin-bottom: 14px; }
.dayplan header h3 { font-size: 1.5rem; margin: 0; }
.dayplan header .caption { max-width: 48ch; margin: 0; }
.meals { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.meal { border-radius: 16px; padding: 16px; background: var(--band); min-width: 0; }
.meal p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.meal .mt { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-ink); }
.meal h4 { margin: 0.3em 0; }
.totals { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.totals span { background: var(--sun); color: var(--ink); border-radius: 999px; padding: 4px 12px; font-weight: 700; font-size: 0.85rem; }

/* Steps, cards, grids */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 32px 0 0; display: grid; gap: 18px; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); } }
.steps li { counter-increment: step; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 14px; border-radius: 50%;
  background: var(--green); color: var(--green-ink); font: 800 1.1rem var(--display);
}
.steps p { color: var(--muted); margin: 0; font-size: 0.97rem; }

.grid { display: grid; gap: 16px; margin-top: 24px; }
@media (min-width: 720px) { .grid.two, .grid.four { grid-template-columns: repeat(2, 1fr); } .grid.three { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .grid.four { grid-template-columns: repeat(4, 1fr); } }
.grid.features { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); min-width: 0; }
.card p { color: var(--muted); }
.card p:last-child { margin-bottom: 0; }
.ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 14px; }
.ic.g { background: #e3f5e7; color: var(--green-deep); }
.ic.o { background: #ffe9cf; color: var(--accent-ink); }
.ic.y { background: var(--sun-soft); color: #7a5a00; }
.label { display: inline-block; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.75rem; font-weight: 700; color: var(--ink); background: var(--sun); padding: 2px 10px; border-radius: 999px; margin-bottom: 10px; }

.diets { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 28px 0 16px; }
.diets li { background: var(--surface); border: 1.5px solid var(--green); border-radius: 999px; padding: 8px 16px; font-weight: 600; }

/* Weight trend */
.split { display: grid; gap: clamp(32px, 6vw, 64px); align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; } }
.chart { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.chart svg { width: 100%; height: auto; display: block; }
.chart .gridlines { stroke: var(--line); stroke-width: 1; }
.chart .t { fill: var(--muted); font: 500 12px var(--body); }
.chart .area { fill: var(--green); opacity: 0.12; }
.chart .weighins { fill: var(--accent); }
.chart .line { stroke: var(--green-deep); stroke-width: 4; fill: none; stroke-linecap: round; }
.chart .end { fill: var(--green-deep); }
.chart .lbl { fill: var(--ink); font: 700 13px var(--body); }
.chart figcaption { margin-top: 8px; }
.points { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 12px; }
.points li { padding-left: 34px; position: relative; }
.points li::before { content: ""; position: absolute; left: 0; top: 3px; width: 22px; height: 22px; border-radius: 7px; background: var(--accent); }

/* GLP-1 band */
.glp { background: var(--sun-soft); }

/* Dark bands: the comparison and the dated switching offer */
.dark { background: var(--green-dark); color: #ffffff; }
.dark .lead, .dark .caption, .dark .notice { color: var(--on-dark); }
.dark a { color: inherit; }
.dark .eyebrow { color: var(--ink); }
.vs { display: grid; gap: 16px; margin-top: 28px; }
@media (min-width: 800px) { .vs { grid-template-columns: 1fr 1fr; } }
.vs > div { border-radius: var(--radius); padding: 24px; }
.vs .them { background: rgb(255 255 255 / 6%); }
.vs .us { background: var(--green); color: var(--green-ink); }
.vs ul { margin: 10px 0 0; padding-left: 1.1em; }
.vs li { margin-bottom: 8px; }
.dark input, .dark select { border-color: transparent; }
.dark .status.error { color: #ffd9cf; }

/* Pricing */
.plan ul { padding-left: 1.1em; margin: 12px 0 0; color: var(--muted); }
.plan li { margin-bottom: 6px; }
.price, .card .price { font: 800 1.6rem/1.2 var(--display); color: var(--green-deep); margin-bottom: 4px; }
.grid + .caption { margin-top: 20px; }
.plan.highlight { border: 3px solid var(--green); }

.disclaimer { background: var(--surface); border-left: 4px solid var(--accent); border-radius: 8px; padding: 16px 18px; font-size: 0.95rem; }

/* FAQ */
details { border-bottom: 1px solid var(--line); padding: 14px 0; }
summary { cursor: pointer; font-weight: 650; min-height: 32px; }
details p { margin: 10px 0 0; color: var(--muted); }

/* The closing waitlist band */
.join { background: var(--accent); color: var(--accent-text); text-align: center; }
.join .lead, .join .caption, .join .notice { color: var(--accent-text); margin-left: auto; margin-right: auto; }
.join .waitlist { margin: 24px auto 8px; text-align: left; }
.join .button { background: var(--green-dark); color: #ffffff; }
.join input, .join select { border-color: #ffffff; }
.join .status.error { color: var(--accent-text); }
.disclaimer-line { color: var(--muted); font-size: 0.85rem; max-width: 72ch; margin: 32px 0 0; }

/* Waitlist form */
.waitlist { display: grid; gap: 12px; margin: 24px 0 8px; max-width: 560px; }
@media (min-width: 560px) { .waitlist { grid-template-columns: 1fr 1fr; } .waitlist .button, .waitlist .status, .waitlist .notice, .waitlist .consent { grid-column: 1 / -1; } }
.field { display: grid; gap: 6px; }
.field label { font-size: 0.9rem; font-weight: 600; }
.consent label { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; font-size: 0.85rem; }
.consent input { margin-top: 3px; width: auto; min-height: 0; }
input, select {
  min-height: 48px; width: 100%; padding: 0 12px; border: 1.5px solid var(--line); border-radius: 12px;
  background: var(--surface); color: var(--ink); font: inherit;
}
.calc-form input, .calc-form select { background: var(--bg); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.status { min-height: 1.6em; margin: 0; font-weight: 600; }
.status.error { color: var(--accent-ink); }
.notice { color: var(--muted); font-size: 0.85rem; margin: 0; }

/* Footer and legal pages */
.foot { padding: 32px 0; color: var(--muted); font-size: 0.9rem; border-top: 1px solid var(--line); margin-top: 32px; }
.foot .legal a { color: inherit; }
.legal-page { padding: 32px 16px 64px; max-width: 760px; }
.legal-page table { border-collapse: collapse; width: 100%; display: block; overflow-x: auto; font-size: 0.9rem; }
.legal-page th, .legal-page td { border: 1px solid var(--line, #d9d9d9); padding: 6px 8px; text-align: left; vertical-align: top; }
.draft-banner { background: #fff4d6; border: 1px solid #e0b84c; border-radius: 8px; padding: 10px 14px; font-weight: 600; }

/* Lead-magnet downloads (MK-10) */
.downloads { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 12px 20px; }
.downloads li { display: flex; align-items: center; gap: 8px; }

/* Diet-fit quiz (/quiz) and invite page (/join) */
.hero { padding-top: clamp(32px, 6vw, 72px); }
.quiz-form { padding: clamp(32px, 6vw, 72px) 0; }
.quiz-form fieldset { border: 0; padding: 0; margin: 0; }
.quiz-form legend { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 700; line-height: 1.2; margin-bottom: 12px; }
.progress { color: var(--muted); font-weight: 600; margin-bottom: 8px; }
.choices { display: grid; gap: 10px; margin: 16px 0; }
.choice { display: flex; gap: 12px; align-items: center; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.choice:has(input:checked) { border-color: var(--green); box-shadow: 0 0 0 2px var(--green); }
.choice input { width: 20px; height: 20px; min-height: 0; margin: 0; flex: none; }
.hint { color: var(--accent-ink); font-weight: 600; min-height: 1.6em; }
.quiz-form .nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 16px; }
.quiz-form .nav [data-next] { margin-left: auto; }
.result .diet h2:focus { outline: none; }
.result .also ul, .result .notes ul { padding-left: 1.1em; }
.result .condition { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin-bottom: 12px; }
