/* Quattro café identity: deep navy blue, warm gold, serif display. Dark by design. */
:root {
  color-scheme: dark;
  --bg: #12213a;
  --surface: #1a2d4d;
  --ink: #f3efe4;
  --muted: #a9b6cc;
  --line: #2f4468;
  --brand: #c9a560;
  --brand-ink: #12213a;
  --brand-soft: #223a60;
  --ok: #8fd19a;
  --radius: 16px;
  --shadow: 0 6px 20px rgba(0, 0, 0, .22);
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.5 var(--sans);
  padding-bottom: 96px;
}
button, input, textarea { font: inherit; color: inherit; }
a { color: var(--brand); }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }

header.top { background: var(--bg); position: relative; text-align: center; padding: 34px 0 18px; }
header.top .wrap { display: flex; flex-direction: column; align-items: center; }
.kicker { margin-top: 6px; font-size: .72rem; letter-spacing: .32em; text-transform: uppercase; color: var(--brand); }
.logo { font: 400 2.5rem/1.15 "Marcellus", var(--serif); letter-spacing: .14em; text-transform: uppercase; padding-left: .14em; color: var(--ink); text-decoration: none; }
header.top .wrap { position: relative; }
.mascot { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 52px; height: auto; color: var(--ink); }
@media (min-width: 640px) { .mascot { width: 76px; left: 0; } }
@media (max-width: 480px) { .logo { font-size: 2.05rem; } header.top .wrap { padding-inline: 62px; } } /* room for the mascot and the cart */
@media (max-width: 380px) { .logo { font-size: 1.7rem; letter-spacing: .09em; } .kicker { letter-spacing: .2em; font-size: .66rem; } .mascot { width: 44px; } }
.hdr-actions { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; }
@media (min-width: 640px) { .hdr-actions { right: 0; } }
.cart { position: relative; width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--brand); border-radius: 50%; color: var(--brand); text-decoration: none; }
.cart svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.cart .badge { position: absolute; top: -5px; right: -5px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--brand); color: var(--brand-ink); font: 700 .72rem/19px var(--sans); text-align: center; }
.track { font-size: .72rem; font-weight: 600; text-decoration: none; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); white-space: nowrap; }
.banner { display: flex; justify-content: center; align-items: center; gap: 28px; padding: 8px 16px; background: #efe3cf; color: #7b4a26; overflow: hidden; }
.banner svg { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
/* carousel: two identical groups side by side, the belt slides exactly one group */
.banner:has(.belt) { justify-content: flex-start; }
.banner .belt { display: flex; width: max-content; animation: belt 70s linear infinite; }
.banner .group { display: flex; gap: 40px; padding-right: 40px; }
@keyframes belt { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .banner .belt { animation: none; } }

/* landing */
.hero { padding: 36px 0 12px; }
.hero h1 { font: 700 2rem/1.15 var(--serif); margin: 0 0 6px; }
.hero p { margin: 0; color: var(--muted); }
.hero { padding: 24px 0 4px; }
.hero h1 { font-size: 1.6rem; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0 8px; } /* side by side, also on phones */
.choice {
  display: flex; flex-direction: column; gap: 6px; text-align: left; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 14px; box-shadow: var(--shadow); text-decoration: none; color: inherit;
  transition: border-color .15s, transform .15s;
}
.choice:hover { border-color: var(--brand); }
.choice:active { transform: scale(.985); }
.choice svg { width: 36px; height: 36px; stroke: var(--brand); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.choice h2 { margin: 0; font: 700 1.05rem/1.2 var(--serif); }
.choice p { margin: 0; color: var(--muted); font-size: .85rem; }
.choice .more, .choice .go { display: none; }
/* desktop: the larger cards, as before */
@media (min-width: 640px) {
  .hero { padding: 36px 0 12px; }
  .hero h1 { font-size: 2rem; }
  .choices { gap: 14px; margin: 22px 0; }
  .choice { gap: 10px; padding: 22px 20px; }
  .choice svg { width: 44px; height: 44px; }
  .choice h2 { font-size: 1.35rem; }
  .choice p { font-size: .95rem; }
  .choice .more { display: inline; }
  .choice .go { display: block; margin-top: auto; padding-top: 4px; color: var(--brand); font-weight: 700; }
}

/* menu grid on the home screen: photo (or icon) on top, name below */
.sechead { display: flex; justify-content: space-between; align-items: baseline; margin: 26px 0 12px; }
.sechead h2 { margin: 0; font: 500 1.8rem/1.1 var(--serif); }
.sechead a { font-weight: 700; text-decoration: none; font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; }
.cats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (min-width: 640px) { .cats { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 639px) { /* odd count: the last card takes the full row, in a shorter frame */
  .cats .cat-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .cats .cat-card:last-child:nth-child(odd) img, .cats .cat-card:last-child:nth-child(odd) .pic { aspect-ratio: 16 / 7; }
}
.cat-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit; box-shadow: var(--shadow); }
.cat-card img, .cat-card .pic { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: flex; align-items: center; justify-content: center; }
.cat-card .pic { background: #efe3cf; color: #7b4a26; }
.cat-card .pic svg { width: 48px; height: 48px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.cat-card .lbl { padding: 14px 8px; text-align: center; font: 500 1rem/1.25 var(--serif); letter-spacing: .02em; }
.cfrow { display: flex; align-items: center; gap: 10px; margin: 10px 0 0; font-weight: 500; }
.pay .lock { margin-left: auto; display: grid; color: var(--brand); }
.pay .lock svg, .btn .btnicon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.btn .btnicon { display: inline-block; margin-right: 8px; vertical-align: -3px; }
.cardbox { margin-top: 10px; padding: 12px 14px 14px; border: 1px dashed var(--brand); border-radius: 12px; }
.cardbox .demo { margin: 0 0 2px; font-size: .82rem; color: var(--brand); }
.cardbox .two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cardbox .secure { display: flex; justify-content: space-between; gap: 8px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.cardbox .secure span { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; font-size: .7rem; line-height: 1.2; color: var(--muted); }
.cardbox .secure i { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 50%; color: var(--brand); }
.cardbox .secure svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.cardbox .pci { margin: 12px 0 0; text-align: center; font-size: .74rem; color: var(--muted); }
.line { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.line .info { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.line .qty button { min-width: 32px; height: 32px; padding: 0 10px; }
.line .side { display: flex; align-items: center; gap: 6px; }
.line .price { font-weight: 700; white-space: nowrap; }
.trash { display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 50%; background: none; color: var(--muted); cursor: pointer; }
.trash:hover { color: var(--brand); background: var(--brand-soft); }
.trash svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.suggest .row { align-items: center; padding: 8px 0; }
.suggest .add { height: 36px; min-width: 0; padding: 0 14px; font-size: .9rem; }
.foot { margin-top: 20px; padding: 8px 0 6px; text-align: left; color: var(--muted); font-size: .76rem; }
.foot .social { display: flex; justify-content: flex-start; gap: 10px; margin: 12px 0 10px; }
.foot .social a { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--brand); transition: border-color .15s; }
.foot .social a:hover { border-color: var(--brand); }
.foot .social svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.foot p { margin: 2px 0; }
.foot .help { margin: 0 0 8px; }
.foot .help a, .helpbox a { color: var(--brand); font-weight: 700; text-decoration: none; }
.helpbox { margin: 14px 0 4px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; font-size: .88rem; color: var(--muted); }
.foot .copy { color: var(--ink); letter-spacing: .06em; }
.foot .captcha { font-size: .72rem; }
.foot .legal { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 4px; font-size: .72rem; }
.foot .legal a { color: var(--ink); text-decoration: none; }
.foot .legal a:hover { text-decoration: underline; color: var(--brand); }
.slogan { text-align: center; margin: 40px 0 16px; }
.slogan .divider { display: flex; align-items: center; gap: 14px; color: var(--brand); }
.slogan .divider::before, .slogan .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.slogan .divider svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.slogan p { margin: 14px auto 0; max-width: 24em; font: 400 .85rem/1.7 "Marcellus", var(--serif); letter-spacing: .22em; text-transform: uppercase; color: var(--ink); text-wrap: balance; }
.modebar.pick { flex-direction: column; align-items: stretch; }
.modebar.pick .pickbtns { display: flex; gap: 8px; }
.modebar.pick .btn { margin: 0; flex: 1; }

/* step screens */
.step { padding-top: 18px; }
.step h1 { font: 700 1.6rem/1.2 var(--serif); margin: 6px 0 4px; }
.step .sub { color: var(--muted); margin: 0 0 14px; }
.back { background: none; border: 0; color: var(--brand); cursor: pointer; padding: 6px 0; font-weight: 600; }
.map { height: 300px; border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; box-shadow: var(--shadow); z-index: 0; }
[hidden] { display: none !important; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 14px 0; box-shadow: var(--shadow); }
.card h3 { margin: 0 0 4px; font: 700 1.1rem/1.3 var(--serif); }
.card p { margin: 2px 0; }
.muted { color: var(--muted); }
label { display: block; font-weight: 600; margin: 14px 0 4px; font-size: .92rem; }
input[type=text], input[type=tel], input[type=password], textarea, select {
  width: 100%; border: 1px solid var(--line); background: var(--bg); border-radius: 12px; padding: 12px 14px;
}
input:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.hint { color: var(--muted); font-size: .82rem; margin: 4px 0 0; }
.error { color: var(--brand); font-weight: 600; margin: 12px 0 0; }

.btn {
  display: block; width: 100%; border: 0; border-radius: 14px; background: var(--brand); color: var(--brand-ink);
  padding: 15px; font-weight: 700; cursor: pointer; text-align: center; text-decoration: none; margin-top: 14px;
}
.btn:disabled { opacity: .5; cursor: default; }
.btn.ghost { background: transparent; color: var(--brand); border: 1.5px solid var(--brand); }
.btn.small { display: inline-block; width: auto; padding: 9px 14px; margin: 10px 8px 0 0; font-size: .92rem; }

/* menu */
.modebar { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; margin: 16px 0 4px; }
.modebar svg { width: 26px; height: 26px; stroke: var(--brand); fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.modebar .txt { flex: 1; min-width: 0; line-height: 1.3; }
.modebar b { display: block; }
.modebar small { color: var(--muted); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chips { display: flex; gap: 10px; overflow-x: auto; padding: 14px 0; scrollbar-width: none; position: sticky; top: 0; background: var(--bg); z-index: 4; border-bottom: 1px solid var(--line); }
.chips button { flex: none; border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 9px 18px; cursor: pointer; font-weight: 500; }
.chips button.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); font-weight: 700; }
h2.cat { margin: 30px 0 14px; font: 500 1.8rem/1.2 var(--serif); scroll-margin-top: 80px; }
/* the sticky category bar covers the top of the screen, so jumps must stop below it */
section[id^="cat-"] { scroll-margin-top: 92px; }
.item.pic { flex-direction: column; align-items: stretch; padding: 0; overflow: hidden; }
.item.pic img { display: block; width: 100%; height: auto; }
.item.pic .body { display: flex; gap: 14px; align-items: center; justify-content: space-between; padding: 14px 16px; }
.item { display: flex; gap: 14px; align-items: center; justify-content: space-between; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 10px; }
.item h3 { margin: 0; font-size: 1.02rem; }
.item p { margin: 2px 0 6px; color: var(--muted); font-size: .88rem; }
.price { font-weight: 700; }
.qty { display: inline-flex; align-items: center; gap: 10px; }
.qty button, .add { border: 0; background: var(--brand); color: var(--brand-ink); border-radius: 999px; min-width: 40px; height: 40px; cursor: pointer; font-weight: 700; padding: 0 16px; }
.qty button.minus { background: var(--line); color: var(--ink); }

.cartbar { position: fixed; left: 0; right: 0; bottom: 0; background: var(--surface); border-top: 1px solid var(--line); padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); z-index: 6; }
.cartbar .btn { margin: 0; }

.row { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.row.total { font-weight: 800; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; }
.pay { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; margin-top: 8px; font-weight: 500; margin-bottom: 0; }
.pay.off { opacity: .55; }

/* order progress: two columns, a small bar per step that fills as the order advances */
.steps { list-style: none; padding: 0; margin: 20px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 20px 16px; }
.steps li { position: relative; color: var(--muted); font-size: .95rem; }
.steps li::before { content: ""; display: block; width: 100%; height: 4px; border-radius: 2px; background: var(--line); margin-bottom: 8px; }
.steps li::after { content: ""; position: absolute; left: 0; top: 0; height: 4px; width: 0; border-radius: 2px; background: var(--brand); }
.steps li.done { color: var(--ink); }
.steps li.done::after { width: 100%; }
.steps li.now { color: var(--ink); font-weight: 700; }
.steps li.now::after { animation: fillbar 2.8s ease-in-out infinite; }
@keyframes fillbar { 0% { width: 0; opacity: 1; } 75% { width: 100%; opacity: 1; } 100% { width: 100%; opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .steps li.now::after { animation: none; width: 50%; } }
/* tracker scene: mascot bakes bread (one 8 s loop, everything keyed to the same clock) */
/* review after delivery */
.review { text-align: center; }
.review h3 { margin: 0 0 8px; font: 700 1.2rem/1.3 var(--serif); }
.review .stars { display: flex; justify-content: center; gap: 4px; margin: 6px 0; }
.review .star { background: none; border: 0; padding: 4px; color: var(--brand); line-height: 0; cursor: pointer; }
.review span.star { cursor: default; }
.review .star svg { width: 36px; height: 36px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; transition: transform .12s; }
.review .star.on svg { fill: currentColor; }
.review button.star:hover svg { transform: scale(1.12); }
.review .starlabel { margin: 0 0 10px; color: var(--muted); font-size: .9rem; min-height: 1.3em; }
.review .quote { margin: 8px 0; font-style: italic; color: var(--muted); overflow-wrap: anywhere; }
.review textarea { text-align: left; }
.bake { text-align: center; margin: 4px 0 6px; color: var(--ink); }
.bake svg { width: 100%; max-width: 150px; height: auto; overflow: visible; }
.bake p { margin: 2px 0 0; font-size: .85rem; color: var(--muted); }
.bake .peel { animation: peel 8s ease-in-out infinite; }
.bake .arm { transform-box: fill-box; transform-origin: 0 50%; animation: arm 8s ease-in-out infinite; }
.bake .onpeel { animation: onpeel 8s step-end infinite; }
.bake .inoven { animation: inoven 8s linear infinite; opacity: 0; }
.bake .steam { animation: steam 8s ease-out infinite; }
.bake .glow { animation: glow 2.4s ease-in-out infinite; }
.bake .flame path { transform-box: fill-box; transform-origin: 50% 100%; animation: flame .9s ease-in-out infinite alternate; }
.bake .flame path:nth-child(2) { animation-delay: .35s; }
.bake .bob { animation: bob 1.4s ease-in-out infinite alternate; }
.bake .smoke { fill: currentColor; stroke: none; opacity: 0; animation: smoke 3.2s ease-out infinite; }
.bake .smoke.s2 { animation-delay: 1.4s; }
@keyframes peel { 0%, 12% { transform: translateX(0); } 38%, 50% { transform: translateX(35px); } 74%, 100% { transform: translateX(0); } }
@keyframes arm { 0%, 12% { transform: scaleX(1); } 38%, 50% { transform: scaleX(3.26); } 74%, 100% { transform: scaleX(1); } }
@keyframes onpeel { 0% { opacity: 1; } 49% { opacity: 0; } 100% { opacity: 1; } }
@keyframes inoven { 0%, 48% { opacity: 0; } 50%, 90% { opacity: 1; } 98%, 100% { opacity: 0; } }
@keyframes steam { 0%, 52% { opacity: 0; transform: translateY(2px); } 62% { opacity: .85; } 90% { opacity: .5; transform: translateY(-6px); } 100% { opacity: 0; } }
@keyframes glow { 0%, 100% { opacity: .18; } 50% { opacity: .4; } }
@keyframes flame { from { transform: scaleY(.8); } to { transform: scaleY(1.12); } }
@keyframes bob { to { transform: translateY(-1.5px); } }
@keyframes smoke { 0% { opacity: 0; transform: translate(0, 0) scale(.8); } 25% { opacity: .55; } 100% { opacity: 0; transform: translate(7px, -22px) scale(1.5); } }
@media (prefers-reduced-motion: reduce) { .bake * { animation: none !important; } .bake .onpeel { opacity: 1; } }
.code { font: 700 2rem/1.1 var(--serif); letter-spacing: .14em; }

/* admin tray */
.orders { display: grid; gap: 12px; margin-top: 14px; }
.order { background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); padding: 14px; }
.order.new { border-color: var(--brand); }
.order.done { opacity: .6; }
.tag { display: inline-block; font-size: .75rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--line); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.actions button { flex: 1; min-width: 120px; padding: 10px; border-radius: 10px; border: 0; background: var(--brand); color: var(--brand-ink); font-weight: 700; cursor: pointer; }
.actions button.ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); flex: none; min-width: 0; }
