@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('/fonts/bricolage-grotesque.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --bg: #fff8f1;
  --card: #ffffff;
  --text: #2a1e16;
  --muted: #7b6a5c;
  --line: #f1e4d6;
  --brand: #1b5e3b;
  --brand-ink: #ffffff;
  --brand-soft: #e6f3ea;
  --accent: #c2410c;
  --accent-ink: #ffffff;
  --accent-soft: #ffedd5;
  --warn-soft: #fff4dc;
  --warn: #8a5a00;
  --error-soft: #fde8e6;
  --error: #a3261b;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(42, 30, 22, 0.06), 0 6px 18px rgba(42, 30, 22, 0.06);
  --display: 'Bricolage Grotesque', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17120e;
    --card: #221b16;
    --text: #f6eee7;
    --muted: #b8a596;
    --line: #3a2f27;
    --brand: #5cc489;
    --brand-ink: #0f1f15;
    --brand-soft: #1d3326;
    --accent: #fb8a4c;
    --accent-ink: #1f0e04;
    --accent-soft: #3d2414;
    --warn-soft: #3a2e12;
    --warn: #f2c56b;
    --error-soft: #3d1c19;
    --error: #ff9b90;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.wrap { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 16px; }
main { flex: 1; padding-top: 20px; padding-bottom: 40px; outline: none; }

a { color: var(--brand); }
h1 { font-size: 1.6rem; line-height: 1.2; margin: 0 0 8px; }
h2 { font-size: 1.2rem; margin: 28px 0 10px; }
h3 { font-size: 1rem; margin: 0; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }

.site-header { background: var(--brand); color: var(--brand-ink); }
.header-row { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.brand { color: var(--brand-ink); font-weight: 700; text-decoration: none; font-size: 1.1rem; }
.cart-link { color: var(--brand-ink); text-decoration: none; font-weight: 600; display: flex; gap: 6px; align-items: center; }
.badge { background: var(--brand-ink); color: var(--brand); border-radius: 999px; padding: 0 8px; font-size: 0.8rem; font-weight: 700; }

.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 0.875rem; padding: 16px 0; }

.banner { border-radius: var(--radius); padding: 14px 16px; margin-bottom: 16px; }
.banner.open { background: var(--brand-soft); }
.banner.closed { background: var(--warn-soft); color: var(--warn); }
.banner.error { background: var(--error-soft); color: var(--error); }
.banner strong { display: block; }

.cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  color: inherit;
  text-decoration: none;
  display: block;
}
a.card:hover { border-color: var(--brand); }
.card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; margin-bottom: 10px; }
.deal { display: inline-block; background: var(--brand-soft); color: var(--brand); border-radius: 999px; padding: 2px 10px; font-size: 0.85rem; font-weight: 600; margin-top: 8px; }

.menu-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.menu-item .price { font-weight: 600; white-space: nowrap; }
.menu-item .actions { display: flex; align-items: center; gap: 10px; }

button, .button {
  font: inherit;
  border: 0;
  border-radius: 10px;
  padding: 10px 16px;
  background: var(--brand);
  color: var(--brand-ink);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}
button.secondary, .button.secondary { background: transparent; color: var(--brand); border: 1px solid var(--brand); }
button.link { background: none; color: var(--brand); padding: 4px; text-decoration: underline; font-weight: 400; }
button:disabled { opacity: 0.5; cursor: not-allowed; }
.block { width: 100%; }

.qty { display: inline-flex; align-items: center; gap: 4px; }
.qty button { padding: 4px 12px; }
.qty span { min-width: 2ch; text-align: center; }

.totals { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin: 16px 0; }
.totals div { display: flex; justify-content: space-between; padding: 3px 0; }
.totals .discount { color: var(--brand); }
.totals .grand { font-weight: 700; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 8px; }

form .field { margin-bottom: 14px; }
label { display: block; font-weight: 600; margin-bottom: 4px; }
input, textarea {
  font: inherit;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
}
textarea { min-height: 80px; resize: vertical; }
.address-row { display: flex; gap: 8px; }
.address-row input { flex: 1; }
.hint { font-size: 0.875rem; margin-top: 4px; }
.hint.ok { color: var(--brand); }
.hint.bad { color: var(--error); }

.tips { display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 0; margin: 0 0 8px; }
.tips label { font-weight: 500; margin: 0; }
.tips input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tips span { display: inline-block; border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.tips input:checked + span { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.tips input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }

.steps { list-style: none; padding: 0; display: flex; gap: 6px; margin: 16px 0; flex-wrap: wrap; }
.steps li { flex: 1; min-width: 90px; text-align: center; padding: 8px; border-radius: 8px; background: var(--card); border: 1px solid var(--line); color: var(--muted); font-size: 0.875rem; }
.steps li.done { background: var(--brand-soft); color: var(--brand); border-color: transparent; font-weight: 600; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 88px;
  transform: translateX(-50%);
  background: var(--text);
  color: var(--bg);
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  max-width: calc(100% - 32px);
}

/* ---- Hero, photos, menu polish ---- */
.hero {
  background: linear-gradient(135deg, var(--brand) 0%, #2f8f63 100%);
  color: var(--brand-ink);
  border-radius: var(--radius);
  padding: 24px 20px 8px;
  margin-bottom: 8px;
}
.hero h1 { font-size: 1.8rem; }
.hero .tagline { opacity: 0.9; margin-bottom: 16px; }
.hero .banner { color: var(--text); }

.card { padding: 0; overflow: hidden; }
.card .card-body { padding: 12px 16px 16px; }
.card-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; margin: 0; border-radius: 0; }
.card-img.placeholder {
  aspect-ratio: 3 / 1;
  display: grid; place-items: center; font-size: 2.4rem; font-weight: 800;
  background: var(--brand-soft); color: var(--brand);
}
.banner-img { width: 100%; max-height: 220px; object-fit: cover; border-radius: var(--radius); margin: 10px 0; display: block; }

.menu-item .item-text { flex: 1; min-width: 0; }
.menu-item .item-text .price { display: block; margin-top: 4px; }
.menu-item .item-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.thumb { width: 88px; height: 88px; object-fit: cover; border-radius: 10px; }
.line-details { margin: 2px 0 4px; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 8px; position: sticky; top: 0; background: var(--bg); z-index: 1; }
.chip { background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; white-space: nowrap; font-weight: 500; }

.cart-bar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 16px;
  width: calc(100% - 32px); max-width: 728px;
  background: var(--brand); color: var(--brand-ink); text-align: center; text-decoration: none;
  padding: 14px 16px; border-radius: 999px; font-weight: 700; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18); z-index: 5;
}
.cart-bar[hidden] { display: none; }
main:has(.cart-bar:not([hidden])) { padding-bottom: 96px; }

/* ---- Options sheet ---- */
.sheet {
  border: 0; padding: 0; border-radius: var(--radius); width: min(560px, calc(100% - 24px));
  max-height: calc(100% - 24px); background: var(--card); color: var(--text);
}
.sheet::backdrop { background: rgba(0, 0, 0, 0.45); }
.sheet-body { padding: 18px 18px 20px; }
.sheet-close { position: absolute; right: 8px; top: 6px; font-size: 1.2rem; text-decoration: none; }
.sheet-img { width: 100%; max-height: 200px; object-fit: cover; border-radius: 10px; margin-bottom: 10px; display: block; }
.opt-group { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px 10px; margin: 0 0 12px; }
.opt-group legend { font-weight: 700; padding: 0 4px; }
.opt { display: flex; align-items: center; gap: 10px; font-weight: 500; padding: 6px 0; margin: 0; }
.opt input { width: auto; }
.opt span:nth-child(2) { flex: 1; }
.sheet .row { display: flex; justify-content: center; margin: 4px 0 10px; }
select#when-at { margin-top: 6px; }
.brand { display: inline-flex; align-items: center; gap: 8px; }
.logo { border-radius: 7px; }

/* ---- Account, receipts ---- */
.header-links { display: flex; gap: 16px; align-items: center; }
.order-list { display: grid; gap: 10px; margin-bottom: 20px; }
.order-link .card-body { padding: 12px 16px; }
.order-link .price { text-align: right; }
.receipt { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin: 16px 0; }
.receipt .totals { border: 0; padding: 0; margin: 8px 0 0; }
input[readonly] { opacity: 0.75; }

@media print {
  .site-header, .site-footer, .no-print, .cart-bar, .chips, .toast { display: none !important; }
  body { background: #fff; color: #000; }
  .receipt { border: 0; padding: 0; }
  a { color: #000; text-decoration: none; }
}
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.row.spread { justify-content: space-between; }
.receipt .row h2 { margin: 0; }
button.small { padding: 6px 10px; font-size: 0.875rem; }
.order-link .card-body { flex-wrap: nowrap; align-items: flex-start; }

/* ===================================================================== */
/* Bold & warm                                                            */
/* ===================================================================== */

h1, h2, h3, .brand, .hero .tagline, .step h3, button, .button, .cart-bar {
  font-family: var(--display);
}
h1 { font-size: 1.9rem; font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: 1.35rem; font-weight: 750; letter-spacing: -0.01em; }
h3 { font-weight: 700; }

.site-header { box-shadow: 0 2px 0 rgba(0, 0, 0, 0.05); }
.brand { font-size: 1.2rem; font-weight: 800; letter-spacing: -0.01em; }
.badge { background: var(--accent); color: var(--accent-ink); }

button, .button {
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 999px;
  font-weight: 700;
  padding: 11px 20px;
  transition: transform 0.08s ease, filter 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.08);
}
button:hover:not(:disabled), .button:hover { filter: brightness(1.05); }
button:active:not(:disabled), .button:active { transform: scale(0.98); }
button.secondary, .button.secondary { background: transparent; color: var(--accent); border: 2px solid var(--accent); box-shadow: none; }
button.link { box-shadow: none; color: var(--accent); }
button.danger { background: var(--error); }
input, textarea, select { border-radius: 12px; border-width: 1.5px; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
a { color: var(--accent); }
.tips input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.qty button { padding: 4px 12px; }

/* Hero: big type, address search, like a delivery app's front page */
.hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(90% 70% at 105% 0%, var(--accent-soft) 0%, transparent 70%), var(--card);
  color: var(--text);
  border-radius: 28px;
  padding: 26px 20px 18px;
  margin: 4px 0 8px;
  box-shadow: var(--shadow);
}
.hero-art { position: absolute; right: -24px; top: 10px; width: 180px; pointer-events: none; }
.hero .kicker { color: var(--accent); font-family: var(--display); font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.85rem; margin: 0 0 6px; }
.hero h1 { margin: 0 0 10px; line-height: 0.95; color: var(--text); font-size: inherit; }
.hero-big { display: block; font-size: 2.6rem; font-weight: 800; text-transform: uppercase; letter-spacing: -0.02em; }
.hero-script { display: block; font-size: 2.5rem; font-style: italic; font-weight: 800; color: var(--accent); text-transform: capitalize; transform: rotate(-3deg); transform-origin: left; margin-top: 6px; }
.hero .tagline { color: var(--muted); font-weight: 600; max-width: 26ch; margin-bottom: 14px; }
.address-search {
  position: relative; display: flex; align-items: center; gap: 8px;
  background: var(--card); border-radius: 999px; padding: 6px 6px 6px 16px;
  box-shadow: 0 6px 22px rgba(42, 30, 22, 0.14); border: 1px solid var(--line);
}
.address-search .pin { width: 20px; height: 20px; flex: none; }
.address-search input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 10px 4px; font-size: 1rem; }
.address-search input:focus { outline: none; }
.address-search:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.search-go { flex: none; width: 48px; height: 48px; padding: 0; border-radius: 50%; background: var(--accent); display: grid; place-items: center; }
.search-go img { width: 22px; height: 22px; }
.address-result .banner { margin: 10px 0 0; }
.view-all {
  display: block; margin: 14px auto 12px; background: none; color: var(--text); padding: 6px 0;
  text-transform: uppercase; letter-spacing: 0.08em; font-weight: 800; font-size: 0.95rem; box-shadow: none;
}
.view-all:hover { color: var(--accent); background: none; }
.hero .banner { margin-bottom: 0; }
@media (max-width: 480px) {
  .hero-art { width: 120px; right: -18px; top: 8px; }
  .hero-big { font-size: 2.15rem; }
  .hero-script { font-size: 2.1rem; }
}

/* How do I order? Dark card with big step tiles */
.how {
  margin: 22px 0 6px; padding: 30px 20px 26px; border-radius: 34px; text-align: center; color: #fff;
  background:
    repeating-linear-gradient(172deg, rgba(255, 255, 255, 0.025) 0 2px, transparent 2px 7px),
    repeating-linear-gradient(8deg, rgba(0, 0, 0, 0.18) 0 1px, transparent 1px 5px),
    #1d1814;
  box-shadow: var(--shadow);
}
.how h2 { color: #fff; margin: 0; font-size: 1.9rem; font-weight: 800; text-transform: uppercase; letter-spacing: -0.01em; }
.how-sub { color: #e2b93b; font-weight: 600; margin: 4px 0 18px; }
.how-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 26px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.how-steps li { display: flex; flex-direction: column; align-items: center; }
.tile { width: 96px; height: 96px; border-radius: 26px; display: grid; place-items: center; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35); margin-bottom: 12px; }
.tile img { width: 54px; height: 54px; }
.tile.orange { background: #ea580c; }
.tile.gold { background: #c9a227; }
.step-no { color: #fb8a4c; font-family: var(--display); font-weight: 800; font-size: 1.35rem; text-transform: uppercase; }
.how-steps h3 { color: #fff; margin: 2px 0 4px; font-size: 1.1rem; }
.how-steps p { color: rgba(255, 255, 255, 0.78); margin: 0; font-size: 0.92rem; max-width: 26ch; }

.section-sub { margin: -6px 0 12px; font-weight: 600; }

/* Install as an app */
.app-promo { display: flex; gap: 16px; align-items: center; margin: 26px 0 6px; padding: 18px; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.app-promo h2 { margin: 0 0 4px; font-size: 1.25rem; }
.app-promo .accent { color: var(--accent); }
.app-promo p { margin: 0 0 10px; }
.app-icon { width: 72px; height: 72px; border-radius: 18px; flex: none; }

/* Bottom tab bar (phones) */
.tabbar { display: none; }
@media (max-width: 640px) {
  .header-links { display: none; }
  .tabbar {
    display: grid; grid-template-columns: repeat(4, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 6;
    background: var(--card); border-top: 1px solid var(--line);
    padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 18px rgba(42, 30, 22, 0.08);
  }
  .tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--muted); text-decoration: none; font-size: 0.78rem; font-weight: 600; padding: 4px 0; }
  .tabbar a[aria-current='page'] { color: var(--accent); }
  .tabbar svg { width: 24px; height: 24px; }
  .tabbar .badge { position: absolute; top: 0; left: calc(50% + 6px); font-size: 0.7rem; min-width: 18px; padding: 1px 5px; }
  body > .site-footer { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  /* Keeps focused or scrolled-to items clear of the tab bar. */
  html { scroll-padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
  .cart-bar { bottom: calc(76px + env(safe-area-inset-bottom)); }
  main:has(.cart-bar:not([hidden])) { padding-bottom: 72px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .cards .card-body { padding: 10px 12px 12px; }
  .cards .card-body h3 { font-size: 1rem; }
  .cards .card-img.placeholder { aspect-ratio: 4 / 3; }
  .cards .card-img { aspect-ratio: 4 / 3; }
}
@media print { .tabbar { display: none !important; } }

/* Restaurant cards */
.card { border: 0; box-shadow: var(--shadow); border-radius: var(--radius); transition: transform 0.12s ease, box-shadow 0.12s ease; }
a.card:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(42, 30, 22, 0.12); border-color: transparent; }
.card-img.placeholder { color: #fff; font-family: var(--display); font-size: 3rem; aspect-ratio: 16 / 7; }
.card-img.tone-0, .restaurant-banner.tone-0 { background: linear-gradient(135deg, #f97316, #fbbf24); }
.card-img.tone-1, .restaurant-banner.tone-1 { background: linear-gradient(135deg, #1b5e3b, #22c55e); }
.card-img.tone-2, .restaurant-banner.tone-2 { background: linear-gradient(135deg, #dc2626, #f97316); }
.card-img.tone-3, .restaurant-banner.tone-3 { background: linear-gradient(135deg, #7c2d12, #ea580c); }
.card-img.tone-4, .restaurant-banner.tone-4 { background: linear-gradient(135deg, #0f766e, #84cc16); }
.card-img.tone-5, .restaurant-banner.tone-5 { background: linear-gradient(135deg, #b45309, #facc15); }
.deal { background: var(--accent-soft); color: var(--accent); font-weight: 700; }

/* Restaurant page */
.restaurant-banner { border-radius: 24px; padding: 26px 20px; margin: 10px 0 14px; color: #fff; display: flex; align-items: flex-end; min-height: 120px; }
.restaurant-banner h1 { color: #fff; margin: 0; font-size: 2.1rem; }
.menu-card { background: var(--card); border: 0; border-radius: var(--radius); padding: 14px 16px; margin-bottom: 10px; box-shadow: var(--shadow); }
.menu-card .price { color: var(--text); }
.chip { border-width: 1.5px; font-family: var(--display); font-weight: 600; }
.cart-bar { background: var(--accent); color: var(--accent-ink); }

/* Banners and panels */
.banner { border-radius: 16px; }
.totals, .receipt, .panel { border: 0; box-shadow: var(--shadow); border-radius: var(--radius); }

/* Footer */
.site-footer { background: var(--brand); color: var(--brand-ink); border: 0; padding: 26px 0 30px; margin-top: 20px; }
.site-footer a { color: var(--brand-ink); }
.footer-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.footer-grid h3 { font-size: 1rem; margin-bottom: 6px; }
.footer-grid p { margin: 0 0 4px; opacity: 0.9; font-size: 0.92rem; }

main:has(.hero) { padding-top: 14px; }

/* Header and footer stay deep green in both themes. */
.site-header, .site-footer { background: #1b5e3b; color: #fff; }
.site-header .brand, .site-header .cart-link, .site-header .header-link, .site-footer a { color: #fff; }

/* Policy pages (terms, privacy, refunds). */
.legal { line-height: 1.6; }
.legal h2 { margin-top: 26px; }
.legal ul { padding-left: 20px; }
.legal li { margin-bottom: 6px; }
.legal-nav { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; font-size: 0.92rem; }
.legal-nav a[aria-current='page'] { font-weight: 700; text-decoration: none; }
.policy-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.policy-table th, .policy-table td { text-align: left; vertical-align: top; padding: 8px; border-bottom: 1px solid var(--line); }
.consent { font-size: 0.85rem; margin: 8px 0 0; }
