/* Food Facts Daily: foodfactsdaily.com
   Type: Bricolage Grotesque (display) + Geist (text), self-hosted. No third-party requests. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/bricolage-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("/fonts/geist-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --paper: #f4f5f0;
  --surface: #ffffff;
  --sunk: #e9ece4;
  --ink: #14201a;
  --ink-2: #4b5751;
  --ink-3: #6f7a74;
  --line: #dadfd5;
  --basil: #1e6b4a;
  --basil-ink: #ffffff;
  --basil-deep: #164f37;
  --basil-wash: #e2ede5;
  --tomato: #c2412d;
  --amber: #a86400;
  --cobalt: #2f55c4;
  --mark-order: rgba(30, 107, 74, 0.32);
  --mark-sugar: rgba(232, 164, 0, 0.42);
  --mark-allergen: rgba(222, 72, 48, 0.36);
  --mark-term: rgba(47, 85, 196, 0.3);
  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --text: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --r-lg: 28px;
  --r-md: 18px;
  --r-sm: 10px;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1200px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0e1411;
    --surface: #151d19;
    --sunk: #1b2520;
    --ink: #e7ece7;
    --ink-2: #a9b4ad;
    --ink-3: #87938c;
    --line: #26312b;
    --basil: #6cc699;
    --basil-ink: #0b1510;
    --basil-deep: #8fd8b2;
    --basil-wash: #18291f;
    --tomato: #ec7a64;
    --amber: #e3a64a;
    --cobalt: #8ea7f2;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0e1411;
  --surface: #151d19;
  --sunk: #1b2520;
  --ink: #e7ece7;
  --ink-2: #a9b4ad;
  --ink-3: #87938c;
  --line: #26312b;
  --basil: #6cc699;
  --basil-ink: #0b1510;
  --basil-deep: #8fd8b2;
  --basil-wash: #18291f;
  --tomato: #ec7a64;
  --amber: #e3a64a;
  --cobalt: #8ea7f2;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
picture { display: block; }
.frame picture, .step-media picture, .label-photo picture, .join picture { height: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--basil); }
:focus-visible { outline: 2px solid var(--basil); outline-offset: 3px; border-radius: 4px; }
p { margin: 0 0 1em; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; margin: 0; letter-spacing: -0.025em; line-height: 1.05; }
h1 { font-variation-settings: "opsz" 96; }
h2 { font-variation-settings: "opsz" 72; font-size: clamp(2rem, 4.2vw, 3.25rem); letter-spacing: -0.03em; }
h3 { font-variation-settings: "opsz" 24; font-size: 1.2rem; letter-spacing: -0.012em; line-height: 1.25; }
.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; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { top: 12px; }

/* ---------- Header ---------- */
.site-head { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--paper) 86%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--display); font-weight: 700; font-size: 1.16rem; letter-spacing: -0.03em; font-variation-settings: "opsz" 32; white-space: nowrap; }
.logo:hover { color: var(--ink); }
.logo svg { width: 30px; height: 30px; flex: none; }
.logo .leaf { fill: var(--basil); }
.nav { display: flex; align-items: center; gap: 6px; }
.nav a { text-decoration: none; font-size: .95rem; color: var(--ink-2); padding: 8px 12px; border-radius: 999px; }
.nav a:hover { color: var(--ink); background: var(--sunk); }
.nav a[aria-current="page"] { color: var(--ink); }
.nav .btn { color: var(--basil-ink); padding: 10px 18px; margin-left: 6px; }
.nav .btn:hover { color: var(--basil-ink); background: var(--basil-deep); }
@media (max-width: 720px) { .nav .hide-sm { display: none; } }

/* ---------- Buttons and forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; background: var(--basil); color: var(--basil-ink); font: 600 .98rem/1 var(--text); padding: 16px 24px; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, transform .15s; }
.btn:hover { background: var(--basil-deep); color: var(--basil-ink); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .7; cursor: progress; }

.waitlist { max-width: 480px; }
.field { display: flex; gap: 6px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; box-shadow: 0 1px 2px rgba(20, 32, 26, .04), 0 8px 24px -12px rgba(20, 32, 26, .12); transition: border-color .15s, box-shadow .15s; }
.field:focus-within { border-color: var(--basil); box-shadow: 0 0 0 4px color-mix(in srgb, var(--basil) 18%, transparent); }
.field input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink); font: 400 1rem var(--text); padding: 0 8px 0 16px; outline: none; }
.field input::placeholder { color: var(--ink-3); }
.field .btn { padding: 14px 20px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-msg { min-height: 1.4em; margin: 10px 0 0; font-size: .93rem; padding-left: 18px; }
.form-msg:empty { min-height: 0; margin: 0; }
.form-msg.ok { color: var(--basil); font-weight: 600; }
.form-msg.err { color: var(--tomato); }
.form-note { font-size: .86rem; color: var(--ink-3); margin: 12px 0 0; padding-left: 18px; }
.form-note a { color: var(--ink-2); }
@media (max-width: 420px) {
  .field { flex-direction: column; border-radius: var(--r-md); padding: 6px; }
  .field input { padding: 14px 12px; }
  .field .btn { width: 100%; border-radius: 12px; }
  .form-msg, .form-note { padding-left: 4px; }
}

/* ---------- Hero ---------- */
.hero { padding: clamp(28px, 6vw, 72px) 0 clamp(56px, 8vw, 104px); }
.hero .wrap { display: grid; grid-template-columns: 1.08fr .92fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.hero h1 { font-size: clamp(2.7rem, 6.4vw, 5.4rem); letter-spacing: -0.045em; line-height: .96; max-width: 11ch; margin-bottom: 26px; }
.hero .sub { font-size: clamp(1.06rem, 1.5vw, 1.22rem); color: var(--ink-2); max-width: 34em; margin-bottom: 30px; line-height: 1.55; }
.status { display: inline-flex; align-items: center; gap: 10px; font-size: .9rem; color: var(--ink-2); margin-bottom: 26px; }
.status i { width: 8px; height: 8px; border-radius: 50%; background: var(--basil); box-shadow: 0 0 0 4px var(--basil-wash); }
.hero-media { position: relative; }
.hero-media .frame { border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 4 / 5; background: var(--sunk); box-shadow: 0 40px 80px -40px rgba(20, 32, 26, .35); }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%; }
.caption { font-size: .82rem; color: var(--ink-3); margin: 12px 4px 0; }
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero h1 { max-width: 12ch; }
  .hero-media .frame { aspect-ratio: 4 / 4.4; }
}

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 9vw, 128px) 0; }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 64px; align-items: end; margin-bottom: clamp(36px, 5vw, 64px); }
.section-head p { color: var(--ink-2); font-size: 1.08rem; margin: 0; max-width: 36em; }
@media (max-width: 860px) { .section-head { grid-template-columns: 1fr; } }
.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* How it works */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 28px); counter-reset: step; }
.steps > li { counter-increment: step; }
.step-media { border-radius: var(--r-md); overflow: hidden; aspect-ratio: 4 / 3.2; background: var(--sunk); margin-bottom: 22px; position: relative; }
.step-media img { width: 100%; height: 100%; object-fit: cover; }
.steps h3 { display: flex; gap: 12px; align-items: baseline; margin-bottom: 8px; font-size: 1.28rem; }
.steps h3::before { content: counter(step); font-family: var(--text); font-weight: 600; font-size: .8rem; color: var(--basil); border: 1.5px solid currentColor; border-radius: 50%; width: 24px; height: 24px; flex: none; display: inline-grid; place-items: center; transform: translateY(-2px); letter-spacing: 0; }
.steps p { color: var(--ink-2); margin: 0; padding-left: 36px; }
@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; gap: 40px; }
}

/* App UI mock (real HTML, so it stays sharp) */
.ui-stage { display: grid; place-items: end center; background: linear-gradient(180deg, var(--basil-wash), color-mix(in srgb, var(--basil-wash) 60%, var(--sunk))); padding-top: 26px; }
.phone { width: min(72%, 280px); background: #0f1512; border-radius: 34px 34px 0 0; padding: 9px 9px 0; box-shadow: 0 30px 60px -30px rgba(10, 30, 20, .45); }
.screen { background: #fff; color: #14201a; border-radius: 26px 26px 0 0; padding: 16px 14px 0; font-size: 11.5px; line-height: 1.35; height: 100%; }
.screen .bar { display: flex; justify-content: space-between; font-weight: 600; font-size: 10px; margin-bottom: 12px; padding: 0 4px; }
.screen .prod { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.screen .thumb { width: 38px; height: 38px; border-radius: 10px; background: #efe6d6 radial-gradient(circle at 35% 40%, #d7b98a 0 22%, transparent 23%), #efe6d6; flex: none; display: grid; place-items: center; }
.screen .prod b { display: block; font-size: 12.5px; font-family: var(--display); letter-spacing: -0.01em; }
.screen .prod small { color: #6f7a74; font-size: 10.5px; }
.screen .pills { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 10px; }
.pill { font-size: 10px; font-weight: 600; padding: 3px 8px; border-radius: 999px; }
.pill.al { background: #fbe5e0; color: #a3321f; }
.pill.su { background: #fbefd6; color: #8a5200; }
.pill.ex { background: #e3e9fa; color: #2a4cb0; }
.screen ul { list-style: none; margin: 0; padding: 0; }
.screen li { display: grid; grid-template-columns: 8px 1fr; gap: 9px; padding: 9px 2px; border-top: 1px solid #edf0ea; }
.screen li i { width: 8px; height: 8px; border-radius: 50%; margin-top: 4px; }
.screen li b { display: block; font-weight: 600; }
.screen li span { color: #5f6a64; }
.dot-al { background: var(--tomato); } .dot-su { background: #d08a12; } .dot-ex { background: #2f55c4; }

/* ---------- The label (signature) ---------- */
.label-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: start; }
.label-photo { position: relative; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 3 / 2; background: #e6e2da; }
.label-photo img, .label-photo svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.label-photo svg polygon { mix-blend-mode: multiply; transform-box: fill-box; transform-origin: left center; transition: transform .7s cubic-bezier(.2, .7, .2, 1), opacity .3s; }
/* site.js adds .armed before the label is on screen, then .is-in to sweep the marks in once. */
[data-label].armed .label-photo polygon { transform: scaleX(0); }
.label-photo [data-k="order"] { fill: var(--mark-order); }
.label-photo [data-k="sugar"] { fill: var(--mark-sugar); }
.label-photo [data-k="allergen"] { fill: var(--mark-allergen); }
.label-photo [data-k="term"] { fill: var(--mark-term); }
[data-label].armed.is-in .label-photo polygon { transform: scaleX(1); }
[data-label].is-in .label-photo polygon:nth-child(2) { transition-delay: .12s; }
[data-label].is-in .label-photo polygon:nth-child(3) { transition-delay: .22s; }
[data-label].is-in .label-photo polygon:nth-child(4) { transition-delay: .32s; }
[data-label].is-in .label-photo polygon:nth-child(5) { transition-delay: .45s; }
[data-label].is-in .label-photo polygon:nth-child(6) { transition-delay: .58s; }
[data-label].is-in .label-photo polygon:nth-child(7) { transition-delay: .7s; }
[data-label][data-active="order"] polygon:not([data-k="order"]),
[data-label][data-active="sugar"] polygon:not([data-k="sugar"]),
[data-label][data-active="allergen"] polygon:not([data-k="allergen"]),
[data-label][data-active="term"] polygon:not([data-k="term"]) { opacity: .12; }
@media (prefers-reduced-motion: reduce) { .label-photo svg polygon, [data-label].armed .label-photo polygon { transition: opacity .2s; transform: none; } }
.photo-note { font-size: .82rem; color: var(--ink-3); margin: 12px 4px 0; }

.flags { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.flags button { width: 100%; text-align: left; background: transparent; border: 1px solid transparent; border-radius: var(--r-md); padding: 16px 18px; font: inherit; color: inherit; cursor: pointer; display: grid; grid-template-columns: 14px 1fr; gap: 4px 14px; transition: background .2s, border-color .2s; }
.flags button:hover { background: var(--surface); }
.flags button[aria-pressed="true"] { background: var(--surface); border-color: var(--line); box-shadow: 0 10px 30px -18px rgba(20, 32, 26, .3); }
.flags .sw { width: 14px; height: 14px; border-radius: 4px; margin-top: 5px; }
.flags b { font-family: var(--display); font-size: 1.16rem; letter-spacing: -0.015em; font-weight: 700; }
.flags span.d { grid-column: 2; color: var(--ink-2); font-size: .97rem; line-height: 1.5; }
.flags small { grid-column: 2; color: var(--ink-3); font-size: .82rem; margin-top: 4px; display: none; }
.flags button[aria-pressed="true"] small { display: block; }
.sw-order { background: var(--basil); } .sw-sugar { background: #d99a1a; } .sw-allergen { background: var(--tomato); } .sw-term { background: var(--cobalt); }
.also { margin-top: 22px; color: var(--ink-2); font-size: .97rem; padding: 0 18px; }
@media (max-width: 960px) { .label-grid { grid-template-columns: 1fr; } }

/* ---------- Facts ---------- */
.fact-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(24px, 5vw, 72px); }
.fact-list > li { border-top: 1px solid var(--line); padding: 28px 0 32px; }
.fact-list .topic { font-size: .85rem; color: var(--basil); font-weight: 600; margin-bottom: 10px; display: block; }
.fact-list h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); margin-bottom: 10px; text-wrap: balance; }
.fact-list p { color: var(--ink-2); max-width: 40em; }
.src { font-size: .88rem; color: var(--ink-3); margin: 0; }
.src a { color: var(--ink-2); }
.more-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--basil); text-decoration: none; margin-top: 28px; }
.more-link:hover { text-decoration: underline; }
@media (max-width: 760px) { .fact-list { grid-template-columns: 1fr; } }

/* ---------- Join band ---------- */
.join { display: grid; grid-template-columns: 1.1fr 1fr; border-radius: var(--r-lg); overflow: hidden; background: var(--basil-deep); }
:root .join { background: #164f37; color: #fff; }
.join picture, .join img { width: 100%; height: 100%; object-fit: cover; min-height: 320px; }
.join-copy { padding: clamp(32px, 5vw, 64px); display: flex; flex-direction: column; justify-content: center; }
.join h2 { color: #fff; margin-bottom: 16px; }
.join-copy > p { color: rgba(255, 255, 255, .82); font-size: 1.08rem; margin-bottom: 28px; max-width: 30em; }
.join .field { background: #fff; border-color: transparent; }
.join .field input { color: #14201a; }
.join .field input::placeholder { color: #6f7a74; }
.join .btn { background: #14201a; color: #fff; }
.join .btn:hover { background: #000; color: #fff; }
.join .form-note { color: rgba(255, 255, 255, .7); }
.join .form-note a { color: #fff; }
.join .form-msg.ok { color: #fff; }
.join .form-msg.err { color: #ffd2c8; }
@media (max-width: 860px) { .join { grid-template-columns: 1fr; } .join picture, .join img { min-height: 0; aspect-ratio: 3 / 2; } }

/* ---------- Socials ---------- */
.tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tiles a { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); text-decoration: none; transition: border-color .15s, transform .15s; }
.tiles a:hover { border-color: var(--ink-3); color: var(--ink); }
.tile-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--sunk); display: grid; place-items: center; flex: none; }
.tile-text { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.tile-text b { font-weight: 600; }
.tile-text span { color: var(--ink-3); font-size: .9rem; overflow: hidden; text-overflow: ellipsis; }
.tile-arrow { margin-left: auto; color: var(--ink-3); flex: none; }
@media (max-width: 960px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .tiles { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-foot { border-top: 1px solid var(--line); padding: 56px 0 40px; margin-top: clamp(40px, 6vw, 80px); font-size: .93rem; color: var(--ink-2); }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.foot-grid h4 { font: 600 .9rem var(--text); color: var(--ink); margin: 0 0 12px; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot-grid a { text-decoration: none; color: var(--ink-2); }
.foot-grid a:hover { color: var(--ink); }
.foot-about p { max-width: 30em; margin: 14px 0 18px; }
.icons, .foot-grid .icons { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; }
.icons a { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: var(--ink-2); border: 1px solid var(--line); }
.icons a:hover { color: var(--ink); border-color: var(--ink-3); }
.icons svg { width: 18px; height: 18px; }
.foot-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); font-size: .85rem; color: var(--ink-3); }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-about { grid-column: 1 / -1; } }

/* ---------- Facts page ---------- */
.page-head { padding: clamp(40px, 7vw, 96px) 0 clamp(28px, 4vw, 48px); }
.page-head h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); letter-spacing: -0.045em; line-height: .98; margin-bottom: 20px; }
.page-head .lead { font-size: clamp(1.05rem, 1.5vw, 1.2rem); color: var(--ink-2); max-width: 40em; margin: 0; }
.filters { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 12px; margin-bottom: 8px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filters button { flex: none; font: 500 .92rem var(--text); color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); padding: 9px 16px; border-radius: 999px; cursor: pointer; }
.filters button:hover { color: var(--ink); }
.filters button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.fact-list.full .src::before { content: ""; }

/* ---------- Document pages (privacy, terms, waitlist reply) ---------- */
.doc { max-width: 720px; margin: 0 auto; padding: clamp(40px, 7vw, 88px) var(--gutter) 40px; }
.doc h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); letter-spacing: -0.04em; margin-bottom: 14px; }
.doc .lead { color: var(--ink-3); font-size: 1rem; margin-bottom: 40px; }
.doc h2 { font-size: 1.45rem; letter-spacing: -0.02em; margin: 44px 0 12px; }
.doc p, .doc li { color: var(--ink-2); }
.doc ul { padding-left: 1.2em; margin: 0 0 1em; }
.doc li { margin-bottom: 6px; }
.doc a { color: var(--basil); }
.doc .toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px 22px; margin-bottom: 8px; }
.doc .toc p { margin: 0 0 6px; color: var(--ink); font-weight: 600; font-size: .92rem; }
.doc .toc ul { margin: 0; columns: 2; column-gap: 24px; }
@media (max-width: 520px) { .doc .toc ul { columns: 1; } }
