/*
 * mealoop.app: the app's "kitchen chit" palette (src/constants/theme.ts),
 * system fonts only. No web fonts and no third-party requests, so the privacy
 * policy can say the site loads nothing from anyone else.
 */
:root {
  --ink: #1b1e17;
  --ink-2: #545b4d;
  --ink-3: #767d70;
  --pandan: #e8ede1;
  --pandan-deep: #dbe2d1;
  --enamel: #fcfdfa;
  --rule: #d2d9c9;
  --rule-soft: #e4e9dd;
  --jade: #2e6b4c;
  --jade-ink: #245a3e;
  --jade-fill: #e3ede4;
  --kaya-ink: #8a5f0e;
  --kaya-fill: #f7ebd2;
  --kaya-rule: #e8d3a4;
  --chilli-ink: #9e3225;
  --tide-fill: #e1eaf1;
  --radius: 14px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

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

html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--pandan);
  color: var(--ink);
  font: 17px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--jade-ink); }
h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.3rem, 5.5vw, 3.6rem); letter-spacing: -0.025em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); letter-spacing: -0.02em; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 720px; }
.center { text-align: center; }
.muted { color: var(--ink-2); }
.eyebrow { color: var(--jade-ink); font-weight: 700; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.75em; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: var(--enamel); padding: 8px 12px; border-radius: 8px; z-index: 10; }
mark.todo { background: var(--kaya-fill); color: var(--kaya-ink); padding: 0 4px; border-radius: 4px; }

/* Header and footer */
.site-header { position: sticky; top: 0; z-index: 5; background: rgba(232, 237, 225, 0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--rule-soft); }
.header-row { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.15rem; }
.nav { display: flex; gap: 20px; margin-left: auto; }
.nav a { color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.nav a:hover { color: var(--ink); }
@media (max-width: 720px) { .nav { display: none; } .header-row > .button { margin-left: auto; } }

.site-footer { border-top: 1px solid var(--rule); background: var(--pandan-deep); padding: 40px 0 24px; margin-top: 64px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.footer-grid nav { display: flex; flex-direction: column; gap: 6px; }
.footer-grid h2 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-2); }
.footer-grid nav a { color: var(--ink); text-decoration: none; }
.footer-grid nav a:hover { text-decoration: underline; }
.fine { margin-top: 24px; color: var(--ink-3); font-size: 0.85rem; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; } }

/* Buttons and the sign-up form */
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px; border: 0; border-radius: 12px; background: var(--jade); color: var(--enamel); font: 700 1rem var(--font); text-decoration: none; cursor: pointer; }
.button:hover { background: var(--jade-ink); }
.button.small { min-height: 40px; padding: 0 14px; font-size: 0.9rem; }
.button[disabled] { opacity: 0.6; cursor: default; }

.join { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; max-width: 520px; }
.center .join { margin-left: auto; margin-right: auto; justify-content: center; }
.join input[type="email"] { flex: 1 1 240px; min-height: 48px; padding: 0 14px; border: 1px solid var(--rule); border-radius: 12px; background: var(--enamel); font: 1rem var(--font); color: var(--ink); }
.join input[type="email"]:focus { outline: 2px solid var(--jade); outline-offset: 1px; }
.join .trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-note { flex-basis: 100%; margin: 4px 0 0; font-size: 0.9rem; color: var(--ink-2); }
.form-note.ok { color: var(--jade-ink); font-weight: 600; }
.form-note.error { color: var(--chilli-ink); font-weight: 600; }

/* Hero */
.hero { padding: 56px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.lede { font-size: 1.2rem; color: var(--ink-2); max-width: 34em; }
@media (max-width: 880px) { .hero-grid { grid-template-columns: 1fr; } .hero-phone { order: 2; } }

/* Phone mock-ups, drawn from the app's own screens */
.phone { width: 300px; max-width: 100%; margin: 0 auto; padding: 12px; border-radius: 44px; background: var(--ink); box-shadow: 0 30px 60px -30px rgba(27, 30, 23, 0.55); }
.screen { background: var(--pandan); border-radius: 34px; padding: 18px 12px 16px; display: flex; flex-direction: column; gap: 10px; font-size: 13px; line-height: 1.3; }
.app-head { display: flex; align-items: center; justify-content: space-between; padding: 0 4px; }
.app-head strong { display: block; font-size: 20px; }
.app-head small { color: var(--ink-2); }
.dots { width: 30px; height: 30px; border-radius: 9px; background: var(--enamel); border: 1px solid var(--rule); display: grid; place-items: center; }
.day { background: var(--enamel); border: 1px solid var(--rule); border-radius: 12px; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.day.today { border: 2px solid var(--ink); }
.day-head { font-weight: 700; display: flex; align-items: center; gap: 4px; }
.day-head span { color: var(--ink-3); font-weight: 400; }
.day-head em { margin-left: auto; font-style: normal; background: var(--ink); color: var(--enamel); border-radius: 99px; padding: 0 8px; font-size: 11px; }
.slot { display: flex; align-items: center; gap: 8px; }
.meal { width: 44px; color: var(--ink-2); font-size: 11px; }
.fill { flex: 1; display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px; border-radius: 8px; border: 1px solid var(--rule); }
.fill b { display: block; font-size: 13px; }
.fill small { display: flex; align-items: center; gap: 4px; color: var(--ink-2); font-size: 11px; }
.fill.cooked { background: var(--jade-fill); border-color: #bbd3c2; }
.fill.out { background: var(--kaya-fill); border-color: var(--kaya-rule); color: var(--kaya-ink); padding-left: 8px; }
.fill.blank { border-style: dashed; color: var(--ink-3); padding-left: 8px; }
.pic { width: 34px; height: 34px; border-radius: 6px; background: var(--enamel); display: grid; place-items: center; font-size: 19px; flex: none; }
.pic.big { width: 100%; height: 72px; font-size: 40px; border-radius: 10px; background: var(--kaya-fill); }
.av { width: 16px; height: 16px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 9px; font-style: normal; font-weight: 700; color: var(--enamel); }
.av.a1 { background: #8a5f0e; }
.av.a2 { background: #2c5474; }
.av.a3 { background: #9e3225; width: 22px; height: 22px; font-size: 11px; }

/* The reel-to-plan demo */
.demo-band { background: var(--enamel); border-block: 1px solid var(--rule-soft); padding: 56px 0; }
.demo-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 40px; align-items: center; }
@media (max-width: 880px) { .demo-grid { grid-template-columns: 1fr; } }
.demo { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stage { display: flex; flex-direction: column; gap: 8px; transition: opacity 0.4s, transform 0.4s; }
.stage .caption { font-size: 0.85rem; font-weight: 700; color: var(--ink-2); text-align: center; }
.demo.animated .stage { opacity: 0.25; transform: scale(0.97); }
.demo.animated .stage.on { opacity: 1; transform: none; }
@media (max-width: 640px) { .demo { grid-template-columns: repeat(2, 1fr); } }
.card { background: var(--pandan); border: 1px solid var(--rule); border-radius: 12px; padding: 10px; font-size: 12.5px; line-height: 1.35; min-height: 190px; display: flex; flex-direction: column; gap: 6px; }
.card ul { margin: 0; padding-left: 16px; }
.reel { background: var(--ink); color: var(--enamel); border-color: var(--ink); }
.reel-top { display: flex; align-items: center; gap: 6px; }
.reel-body { flex: 1; display: grid; place-items: center; font-size: 42px; background: #2b3026; border-radius: 8px; min-height: 70px; }
.reel p { margin: 0; }
.share { align-self: flex-start; background: var(--enamel); color: var(--ink); border-radius: 99px; padding: 2px 8px; font-size: 11px; }
.reading ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.reading li.done::before { content: "✓ "; color: var(--jade); font-weight: 800; }
.recipe small { color: var(--ink-2); }
.planned { justify-content: center; }
.toast { margin: 8px 0 0; background: var(--jade-fill); color: var(--jade-ink); border-radius: 8px; padding: 6px 8px; font-weight: 700; }

/* Three steps */
.steps { padding: 64px 0; }
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 24px; }
@media (max-width: 880px) { .three { grid-template-columns: 1fr; } }
.step { background: var(--enamel); border: 1px solid var(--rule); border-radius: var(--radius); padding: 24px; }
.step p { color: var(--ink-2); margin: 0; }
.num { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--jade); color: var(--enamel); font-weight: 800; margin-bottom: 12px; }

/* Feature rows */
.feature { padding: 56px 0; }
.feature.alt { background: var(--enamel); border-block: 1px solid var(--rule-soft); }
.feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.feature-grid.flip .feature-copy { order: 2; }
@media (max-width: 880px) { .feature-grid { grid-template-columns: 1fr; } .feature-grid.flip .feature-copy { order: 0; } }
.feature-copy p { color: var(--ink-2); font-size: 1.05rem; }
.ticks { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.ticks li::before { content: "✓"; color: var(--jade); font-weight: 800; margin-right: 8px; }

.mini-phone { width: 300px; max-width: 100%; margin: 0 auto; padding: 12px; border-radius: 44px; background: var(--ink); }
.progress { margin: 0 4px; color: var(--ink-2); }
.group { background: var(--enamel); border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; }
.group h4 { margin: 0; padding: 8px 10px; font-size: 12.5px; border-bottom: 1px solid var(--rule-soft); display: flex; justify-content: space-between; }
.group h4 span { color: var(--ink-3); font-weight: 400; }
.group.basket h4 { border-bottom: 0; color: var(--ink-2); }
.row { display: flex; align-items: center; gap: 8px; margin: 0; padding: 8px 10px; border-bottom: 1px solid var(--rule-soft); }
.row:last-child { border-bottom: 0; }
.row span { margin-left: auto; color: var(--ink-2); }
.box { width: 16px; height: 16px; border: 1.5px solid var(--ink-3); border-radius: 4px; flex: none; }

.translate { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lang { min-height: 0; background: var(--pandan); font-size: 14px; }
.lang small { color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.08em; font-size: 11px; }
.lang b { font-size: 17px; }
.lang.en { background: var(--tide-fill); }

/* Extras */
.extras { padding: 64px 0 24px; }
.four { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 24px; }
@media (max-width: 880px) { .four { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .four { grid-template-columns: 1fr; } }
.four article { background: var(--enamel); border: 1px solid var(--rule); border-radius: var(--radius); padding: 20px; }
.four p { color: var(--ink-2); margin: 0; font-size: 0.95rem; }
.icon { font-size: 26px; display: block; margin-bottom: 8px; }

/* FAQ and closing */
.faq-teaser { padding: 48px 0; }
details { background: var(--enamel); border: 1px solid var(--rule); border-radius: 12px; padding: 14px 18px; margin-bottom: 10px; }
summary { cursor: pointer; font-weight: 700; }
details p { margin: 10px 0 0; color: var(--ink-2); }
.closing { padding: 56px 0 24px; }
.closing p { color: var(--ink-2); }

/* Text pages: FAQ, support, legal */
.page { padding: 48px 0 16px; }
.page h1 { font-size: clamp(2rem, 4.5vw, 2.8rem); }
.page h2 { font-size: 1.35rem; margin-top: 1.8em; }
.page h3 { margin-top: 1.4em; }
.page p, .page li { color: #2f3429; }
.page ul, .page ol { padding-left: 1.3em; }
.page li { margin-bottom: 0.35em; }
.page .updated { color: var(--ink-3); }
.callout { background: var(--jade-fill); border: 1px solid #bbd3c2; border-radius: 12px; padding: 16px 18px; margin: 20px 0; }
.callout p:last-child { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .stage { transition: none; }
}
