/* =====================================================================
   BRANDING — swap these when official assets arrive
   ===================================================================== */
:root {
  --font-display: 'Barlow Condensed', 'Arial Narrow', 'Roboto Condensed', system-ui, sans-serif;
  --font-body: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --primary: #4E5976;        /* Food O'Clock slate blue (from logo) */
  --primary-ink: #FFFFFF;    /* text on primary */
  --secondary: #E6E9F1;      /* soft tint of primary */
  --gold: #B8913A;           /* FMG gold — accent only */
  --bg: #F4F5F8;             /* page background */

  --surface: #FFFFFF;
  --ink: #141824;
  --muted: #5C6375;
  --line: #DADDE6;
  --line-strong: #B8BDCB;
  --logo-filter: none;
  --warn-bg: #FFF4DC;
  --warn-ink: #7A4B00;
  --danger: #B42318;
  --radius: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --primary: #A7B3D6; --primary-ink: #10131C; --secondary: #1E2436; --bg: #0D1017; --gold: #D4AF5A;
    --surface: #151923; --ink: #E9ECF3; --muted: #9AA1B2; --line: #262C3A; --line-strong: #3A4254;
    --warn-bg: #2E2410; --warn-ink: #F3C872; --danger: #FF7B6E; --logo-filter: brightness(0) invert(.92);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --primary: #A7B3D6; --primary-ink: #10131C; --secondary: #1E2436; --bg: #0D1017; --gold: #D4AF5A;
  --surface: #151923; --ink: #E9ECF3; --muted: #9AA1B2; --line: #262C3A; --line-strong: #3A4254;
  --warn-bg: #2E2410; --warn-ink: #F3C872; --danger: #FF7B6E; --logo-filter: brightness(0) invert(.92);
  color-scheme: dark;
}

/* =====================================================================
   BASE
   ===================================================================== */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.45 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--primary); }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 6px; }
.num { font-family: var(--font-display); font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: 560px; margin: 0 auto; padding-inline: 16px; }

/* ---------- top ---------- */
.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: var(--bg); border-bottom: 1px solid var(--line);
}
.brandrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 10px 8px; }
.logo { height: 34px; max-width: 150px; object-fit: contain; display: block; }
.logo.fo { filter: var(--logo-filter); }
.logo.fmg { height: 42px; border-radius: 6px; }
.brandrow .x { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); flex: 1; text-align: right; padding-right: 2px; }
.logo-ph {
  display: inline-flex; align-items: center; height: 28px; padding: 0 8px;
  border: 1px dashed var(--line-strong); border-radius: 6px;
  font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); white-space: nowrap;
}
.progress { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; padding-bottom: 8px; }
.progress span { height: 4px; border-radius: 2px; background: var(--line); }
.progress span.on { background: var(--primary); }
.stepline { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding-bottom: 10px; font-size: 13px; color: var(--muted); }
.stepline b { color: var(--ink); font-weight: 600; }

.demo { background: var(--warn-bg); color: var(--warn-ink); font-size: 12.5px; text-align: center; padding: 6px 16px; }

/* ---------- headings / text ---------- */
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.05; margin: 0; text-wrap: balance; }
h1 { font-size: 34px; letter-spacing: .005em; text-transform: uppercase; }
h2 { font-size: 24px; text-transform: uppercase; letter-spacing: .02em; }
h3 { font-size: 19px; text-transform: uppercase; letter-spacing: .04em; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.lede { color: var(--muted); margin: 8px 0 0; max-width: 60ch; }
.small { font-size: 13.5px; color: var(--muted); }
.section { padding-block: 22px 8px; }
.stack { display: grid; gap: 12px; }

.usd-note {
  display: inline-block; margin-top: 12px; padding: 4px 8px; border-radius: 4px;
  background: var(--ink); color: var(--bg); font-size: 11.5px; font-weight: 700; letter-spacing: .1em;
}

.notice { border-radius: var(--radius); padding: 12px 14px; font-size: 14.5px; }
.notice.early { background: var(--secondary); }
.notice.warn { background: var(--warn-bg); color: var(--warn-ink); }
.notice.error { border: 1.5px solid var(--danger); color: var(--danger); background: var(--surface); }
.notice strong { display: block; margin-bottom: 2px; }

/* ---------- step 1: days ---------- */
.days { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.day {
  display: grid; gap: 2px; text-align: left; padding: 14px 14px 12px; min-height: 92px;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius);
}
.day .dow { font-size: 13px; color: var(--muted); font-weight: 500; }
.day .date { font-family: var(--font-display); font-size: 30px; font-weight: 700; line-height: 1; text-transform: uppercase; }
.day .check { font-size: 13px; font-weight: 600; color: var(--muted); margin-top: 6px; }
.day[aria-pressed="true"] { border-color: var(--primary); background: var(--secondary); }
.day[aria-pressed="true"] .check { color: var(--primary); }

.facts { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.facts li { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.facts li span:first-child { color: var(--muted); }
.facts li span:last-child { text-align: right; font-weight: 500; }

/* ---------- step 2: build ---------- */
.daytabs {
  display: flex; gap: 6px; overflow-x: auto; padding-bottom: 10px; scrollbar-width: none;
}
.daytabs::-webkit-scrollbar { display: none; }
.daytab {
  flex: 1 0 auto; min-width: 76px; display: grid; gap: 1px; padding: 7px 10px; text-align: left;
  border: 1.5px solid var(--line); border-radius: 8px; background: var(--surface);
}
.daytab .d { font-family: var(--font-display); font-weight: 700; font-size: 18px; text-transform: uppercase; line-height: 1.1; }
.daytab .s { font-size: 12px; color: var(--muted); }
.daytab.empty .s { color: var(--danger); }
.daytab[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.daytab[aria-selected="true"] .s { color: inherit; opacity: .75; }

.cat { padding-top: 22px; }
.cat-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding-bottom: 6px; }
.cat-head .rule { font-size: 12.5px; color: var(--muted); text-align: right; }
.list { border-top: 1.5px solid var(--ink); }
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); min-height: 64px; }
.row-name { font-weight: 600; font-size: 16px; }
.row-meta { font-size: 13px; color: var(--muted); }
.row-meta .line-price { color: var(--ink); font-weight: 600; }
.row.has .row-name::after { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--primary); margin-left: 7px; vertical-align: middle; }

.stepper { display: flex; align-items: center; gap: 4px; flex: none; }
.st-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--line-strong);
  background: var(--surface); font-size: 22px; line-height: 1; display: grid; place-items: center; padding: 0;
}
.st-btn.inc { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.st-btn:disabled { opacity: .3; cursor: default; }
.st-val { min-width: 64px; text-align: center; font-size: 21px; font-weight: 700; }
.st-val.zero { color: var(--muted); font-weight: 500; }

.meter { padding: 10px 0 2px; }
.meter-top { display: flex; justify-content: space-between; font-size: 14px; }
.meter-top b { font-weight: 700; }
.meter-bar { position: relative; height: 8px; border-radius: 4px; background: var(--line); margin-top: 6px; overflow: hidden; }
.meter-fill { position: absolute; inset: 0 auto 0 0; background: var(--primary); border-radius: 4px; transition: width .15s ease; }
.meter-tick { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; background: var(--bg); }
.meter-scale { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 3px; }
.meter-scale span:nth-child(2) { transform: translateX(-50%); position: relative; left: 0; }

.contact-more { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }

/* ---------- step 3: delivery ---------- */
.choice {
  display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; text-align: left; width: 100%;
  padding: 14px; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius);
}
.choice .dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-strong); margin-top: 1px; display: grid; place-items: center; }
.choice[aria-checked="true"] { border-color: var(--primary); background: var(--secondary); }
.choice[aria-checked="true"] .dot { border-color: var(--primary); }
.choice[aria-checked="true"] .dot::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); }
.choice .t { font-weight: 700; font-size: 16.5px; }
.choice .d { font-size: 14px; color: var(--muted); margin-top: 2px; }

.check-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.check-row input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--primary); flex: none; }
.check-row .t { font-weight: 600; }
.check-row .d { font-size: 13.5px; color: var(--muted); }

.fee { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 12px 14px; border-radius: var(--radius); background: var(--warn-bg); color: var(--warn-ink); }
.fee .num { font-size: 22px; font-weight: 700; }

/* ---------- step 4: info ---------- */
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: 14.5px; }
.field input[type="text"], .field input[type="tel"] {
  width: 100%; height: 52px; padding: 0 14px; border-radius: var(--radius);
  border: 1.5px solid var(--line-strong); background: var(--surface); font-size: 17px;
}
.field input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--secondary); }
.field input:disabled { opacity: .5; }
.field .err { color: var(--danger); font-size: 13.5px; }
.field.invalid input { border-color: var(--danger); }
.inline-check { display: flex; align-items: center; gap: 10px; font-size: 15px; padding: 4px 0; cursor: pointer; }
.inline-check input { width: 22px; height: 22px; accent-color: var(--primary); margin: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.allergy { padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; gap: 10px; }

/* ---------- step 5: review ---------- */
.rv-day { padding-top: 18px; }
.rv-day h3 { padding-bottom: 6px; border-bottom: 1.5px solid var(--ink); display: flex; justify-content: space-between; align-items: baseline; }
.rv-day h3 small { font-family: var(--font-body); font-size: 12.5px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--muted); }
.rv-cat { padding: 8px 0 6px; border-bottom: 1px solid var(--line); }
.rv-cat .lbl { font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 2px; }
.rv-line { display: flex; justify-content: space-between; gap: 10px; font-size: 15px; padding: 2px 0; }
.rv-line.total { font-weight: 600; }
.rv-sub { display: flex; justify-content: space-between; padding: 10px 0 0; font-weight: 700; }

.totals { margin-top: 22px; border-top: 2px solid var(--ink); }
.totals .t-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.totals .t-row .k { font-size: 12.5px; letter-spacing: .12em; font-weight: 700; text-transform: uppercase; }
.totals .t-row .v { font-size: 26px; font-weight: 700; }
.totals .t-row.mxn .v { font-size: 22px; }
.early-box { margin-top: 14px; padding: 14px; border-radius: var(--radius); background: var(--secondary); display: grid; gap: 8px; }
.early-box .pair { display: flex; justify-content: space-between; font-size: 15px; }
.early-box .pair.hl { font-weight: 700; font-size: 17px; }

.kv { list-style: none; padding: 0; margin: 0; }
.kv li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.kv li span:first-child { color: var(--muted); flex: none; }
.kv li span:last-child { text-align: right; font-weight: 500; overflow-wrap: anywhere; }

/* ---------- bottom bar ---------- */
.bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: var(--surface); border-top: 1px solid var(--line);
  padding: 10px 0 calc(10px + env(safe-area-inset-bottom, 0px));
}
.bar-inner { display: grid; gap: 8px; }
.bar-sum { display: flex; justify-content: space-between; align-items: baseline; font-size: 13.5px; color: var(--muted); }
.bar-sum .num { font-size: 22px; color: var(--ink); font-weight: 700; }
.bar-btns { display: flex; gap: 8px; }
.btn {
  min-height: 52px; padding: 0 18px; border-radius: var(--radius); border: 1.5px solid transparent;
  font-weight: 700; font-size: 16px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none;
}
.btn.primary { background: var(--primary); color: var(--primary-ink); flex: 1; }
.btn.ghost { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.btn.wa { background: #1FA855; color: #fff; }
.btn.small { min-height: 40px; font-size: 14px; padding: 0 12px; }
.btn:disabled { opacity: .55; cursor: default; }
.spacer { height: 150px; }

/* ---------- done / closed ---------- */
.hero-id { font-family: var(--font-display); font-size: 56px; font-weight: 700; line-height: 1; letter-spacing: .01em; margin: 6px 0 2px; }
.center-screen { padding-block: 40px 24px; display: grid; gap: 16px; }
.wa-num { font-size: 14px; color: var(--muted); }
.wa-num b { color: var(--ink); user-select: all; }

@media (min-width: 520px) {
  h1 { font-size: 42px; }
  .days { grid-template-columns: repeat(4, 1fr); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
