/* Taza Perfecta demo — tokens pulled from the printed menu and logo */
:root {
  --blush: #F6D3CE;      /* logo background */
  --paper: #FCEFEA;      /* menu sheet */
  --sand: #EAD8C5;       /* printed menu paper */
  --rose: #C65D5B;       /* menu ink */
  --rose-deep: #A3423F;
  --cocoa: #4A2218;      /* logo line work */
  --cocoa-soft: #7A4A3C;
  --matcha: #6F8A4E;
  --line: rgba(74, 34, 24, .16);

  --display: "Bowlby One", "Arial Black", system-ui, sans-serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;

  --step--1: .875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3rem;
  --step-2: 1.75rem;
  --step-3: clamp(2rem, 4vw, 2.75rem);
  --step-4: clamp(2.6rem, 6.4vw, 4.6rem);

  --wrap: 1180px;
  --pad: clamp(1.1rem, 4vw, 2.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }

body {
  margin: 0;
  background: var(--blush);
  color: var(--cocoa);
  font: 400 var(--step-0)/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.02; margin: 0 0 .5em; color: var(--rose); letter-spacing: -.005em; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); }
p { margin: 0 0 1em; max-width: 62ch; }
:focus-visible { outline: 3px solid var(--cocoa); outline-offset: 3px; border-radius: 6px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Demo notice */
.demo-bar { background: var(--cocoa); color: var(--paper); text-align: center; font-size: var(--step--1); padding: .4rem 1rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 1.5rem;
  padding: .65rem var(--pad);
  background: color-mix(in srgb, var(--blush) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; font-family: var(--display); font-size: 1.15rem; color: var(--cocoa); }
.brand img { border-radius: 50%; }
.main-nav { display: flex; gap: 1.4rem; margin-left: auto; }
.main-nav a { text-decoration: none; font-weight: 600; font-size: .98rem; padding: .3rem 0; border-bottom: 2px solid transparent; }
.main-nav a:hover { border-color: var(--rose); }
.cart-btn {
  display: inline-flex; align-items: center; gap: .45rem;
  font: 700 .98rem var(--body); color: var(--paper); background: var(--rose);
  border: 0; border-radius: 999px; padding: .6rem 1rem; cursor: pointer;
}
.cart-btn:hover { background: var(--rose-deep); }
.cart-count { background: var(--paper); color: var(--rose-deep); min-width: 1.5rem; height: 1.5rem; border-radius: 999px; display: grid; place-items: center; font-size: .82rem; }
.cart-count.bump { animation: bump .35s ease; }
@keyframes bump { 50% { transform: scale(1.35); } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  font: 700 1rem/1 var(--body); text-decoration: none; cursor: pointer;
  padding: .95rem 1.4rem; border-radius: 999px; border: 2px solid var(--rose);
  background: var(--paper); color: var(--rose-deep);
}
.btn-primary { background: var(--rose); color: var(--paper); }
.btn-primary:hover { background: var(--rose-deep); border-color: var(--rose-deep); }
.btn-ghost { background: transparent; color: var(--cocoa); border-color: var(--cocoa); }
.btn-ghost:hover, .btn-outline:hover { background: var(--paper); }
.btn-outline { background: transparent; }
.btn-small { padding: .6rem 1rem; font-size: .92rem; }
.btn-link { background: none; border: 0; text-decoration: underline; color: var(--cocoa-soft); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* Wavy frame — the signature, drawn by app.js like the printed menu border */
.wavy { position: relative; }
.wavy > svg.wave { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; z-index: 2; }
.wave path { fill: none; stroke: var(--rose); stroke-width: 14; stroke-linejoin: round; }

/* Hero */
.hero {
  max-width: var(--wrap); margin: 0 auto;
  padding: clamp(2rem, 6vw, 4.5rem) var(--pad) 2.5rem;
  display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center;
}
.hero-kicker { font-weight: 600; color: var(--cocoa-soft); margin-bottom: 1rem; }
.hero h1 { font-size: var(--step-4); color: var(--cocoa); max-width: 12ch; }
.hero-lede { font-size: 1.15rem; max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.6rem 0 1.2rem; }
.cutoff { display: inline-flex; align-items: center; gap: .55rem; font-weight: 600; font-size: .98rem; background: var(--paper); border-radius: 999px; padding: .5rem 1rem .5rem .8rem; }
.cutoff::before { content: ""; width: .6rem; height: .6rem; border-radius: 50%; background: var(--matcha); box-shadow: 0 0 0 4px color-mix(in srgb, var(--matcha) 25%, transparent); }
.hero-media { margin: 0; padding: 22px; }
.hero-media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 34px; }

/* Steps — a real sequence, so they’re numbered */
.steps { max-width: var(--wrap); margin: 0 auto; padding: 1rem var(--pad) 3rem; }
.steps ol { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.steps li { counter-increment: s; display: grid; grid-template-columns: auto 1fr; column-gap: .9rem; align-items: start; }
.steps li::before { content: counter(s); grid-row: span 2; font-family: var(--display); font-size: 1.5rem; color: var(--paper); background: var(--rose); width: 2.6rem; height: 2.6rem; border-radius: 50%; display: grid; place-items: center; }
.steps strong { font-size: 1.1rem; }
.steps span { color: var(--cocoa-soft); }

/* Menu sheet */
.menu-section { background: var(--sand); padding: clamp(2.5rem, 6vw, 5rem) var(--pad); }
.menu-sheet { max-width: 1040px; margin: 0 auto; background: var(--sand); padding: clamp(3rem, 7vw, 5rem) clamp(1.6rem, 6vw, 5rem); text-align: left; }
.menu-eyebrow { text-align: center; letter-spacing: .55em; font-weight: 600; font-size: .85rem; margin: 0 auto .2rem; max-width: none; }
.menu-title { text-align: center; font-size: clamp(3.5rem, 11vw, 7rem); margin-bottom: .1em; }
.menu-sub { text-align: center; margin: 0 auto 2.5rem; color: var(--cocoa-soft); }
.menu-grid { columns: 2 380px; column-gap: clamp(2rem, 6vw, 5rem); }
.menu-cat { break-inside: avoid; margin-bottom: 2.4rem; }
.menu-cat h3 { font-size: clamp(1.6rem, 3.2vw, 2.15rem); margin-bottom: .1rem; display: flex; align-items: baseline; gap: .4rem; }
.menu-cat h3 small { font-family: var(--body); font-weight: 500; font-size: 1rem; color: var(--rose); }
.squiggle { display: block; width: 100%; height: 12px; margin-bottom: .6rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='12'%3E%3Cpath d='M0 6 Q7 0 14 6 T28 6' fill='none' stroke='%23C65D5B' stroke-width='2.6'/%3E%3C/svg%3E") repeat-x left center; }
.menu-item { display: flex; align-items: center; gap: .6rem; margin: 0 -.5rem; }
.mi-main {
  flex: 1; display: grid; grid-template-columns: 1fr auto; gap: .15rem .8rem; align-items: center;
  background: none; border: 0; text-align: left; font: inherit; color: inherit; cursor: pointer;
  padding: .55rem .5rem; border-radius: 12px;
}
.mi-main:hover { background: color-mix(in srgb, var(--paper) 70%, transparent); }
.mi-main .n { font-weight: 700; color: var(--rose-deep); font-size: 1.04rem; }
.mi-main .p { font-weight: 600; color: var(--rose); font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.mi-main .d { grid-column: 1 / -1; font-size: .9rem; color: var(--cocoa-soft); }
.plus { flex: none; width: 2.5rem; height: 2.5rem; border-radius: 50%; border: 2px solid var(--rose); background: transparent; color: var(--rose); font: 700 1.3rem/1 var(--body); cursor: pointer; margin-right: .5rem; }
.plus:hover, .plus:active { background: var(--rose); color: var(--paper); }

/* Favorites — illustrated cups until real photos arrive */
.favorites { max-width: 1040px; margin: 0 auto 2rem; }
.favorites h2 { color: var(--cocoa); }
.fav-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1rem; }
.fav { background: var(--paper); border-radius: 24px; padding: 1rem 1rem 1.1rem; display: flex; flex-direction: column; }
.fav-art { background: var(--blush); border-radius: 18px; aspect-ratio: 1; display: grid; place-items: center; margin-bottom: .8rem; }
.fav-art svg { width: 62%; height: auto; }
.fav h3 { font-size: 1.05rem; color: var(--rose-deep); margin-bottom: .2rem; }
.fav-meta { font-size: .88rem; color: var(--cocoa-soft); margin-bottom: .8rem; }
.fav-actions { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: .4rem; flex-wrap: wrap; }
.fav-actions .btn-link { padding: 0; font: 600 .88rem var(--body); cursor: pointer; }

/* Sticky category links */
.menu-cats { position: sticky; top: 72px; z-index: 20; max-width: 1040px; margin: 0 auto 1.2rem; display: flex; gap: .5rem; overflow-x: auto; padding: .5rem; background: color-mix(in srgb, var(--sand) 94%, transparent); backdrop-filter: blur(6px); border-radius: 999px; scrollbar-width: none; }
.menu-cats::-webkit-scrollbar { display: none; }
.menu-cats a { flex: none; text-decoration: none; font-weight: 600; font-size: .92rem; padding: .45rem .9rem; border-radius: 999px; background: var(--paper); color: var(--rose-deep); }
.menu-cats a:hover { background: var(--rose); color: var(--paper); }
.menu-cat { scroll-margin-top: 140px; }
.sf { font-size: .78rem; font-weight: 600; color: var(--matcha); margin-left: .35rem; white-space: nowrap; }

/* Delivery */
.delivery { max-width: var(--wrap); margin: 0 auto; padding: clamp(3rem, 7vw, 5.5rem) var(--pad); }
.delivery-intro h2 { color: var(--cocoa); font-size: var(--step-4); max-width: 13ch; }
.delivery-intro p { font-size: 1.12rem; }
.delivery-grid { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 1.25rem; margin-top: 2rem; align-items: start; }
.offer { background: var(--paper); border-radius: 28px; padding: 1.6rem; }
.offer h3 { color: var(--cocoa); }
.offer-photo { padding: 0; overflow: hidden; display: grid; grid-template-rows: 260px auto; background: var(--rose); color: var(--paper); }
.offer-photo img { width: 100%; height: 100%; object-fit: cover; }
.offer-photo > div { padding: 1.5rem 1.6rem 1.7rem; }
.offer-photo h3 { color: var(--paper); }
.offer-photo .btn { border-color: var(--paper); }
.offer-photo .btn-outline { color: var(--paper); }
.offer-photo .btn-outline:hover { background: var(--rose-deep); }
.box-buttons { display: flex; flex-wrap: wrap; gap: .6rem; }
.facts { list-style: none; padding: 0; margin: 0 0 1.2rem; }
.facts li { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px dashed var(--line); }
.facts span { color: var(--cocoa-soft); }
.zip-check label { font-weight: 600; display: block; margin-bottom: .35rem; }
.zip-row { display: flex; gap: .5rem; }
input, select, textarea { font: inherit; color: var(--cocoa); background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: .65rem .8rem; width: 100%; }
input:focus, select:focus { border-color: var(--rose); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--rose) 25%, transparent); }
.zip-result { min-height: 1.5em; margin: .5rem 0 0; font-weight: 600; }
.zip-result.ok { color: var(--matcha); }
.zip-result.no { color: var(--rose-deep); }
.fineprint { font-size: .88rem; color: var(--cocoa-soft); margin: .8rem 0 0; }
.center { text-align: center; margin-left: auto; margin-right: auto; }
.event-form { display: grid; gap: .7rem; }
.event-form label { font-weight: 600; font-size: .92rem; display: grid; gap: .25rem; }
.form-msg { min-height: 1.4em; margin: 0; font-weight: 600; font-size: .95rem; }
.form-msg.ok { color: var(--matcha); }
.form-msg.err { color: var(--rose-deep); }

/* Rewards */
.rewards { background: var(--cocoa); color: var(--paper); padding: clamp(3rem, 7vw, 5.5rem) var(--pad); display: grid; grid-template-columns: 1fr minmax(320px, 440px); gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.rewards > * { max-width: 620px; }
.rewards-copy { justify-self: end; }
.rewards h2 { color: var(--blush); font-size: var(--step-4); max-width: 11ch; }
.rewards-copy p { font-size: 1.12rem; }
.perks { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .6rem; }
.perks li { padding-left: 1.6rem; position: relative; color: color-mix(in srgb, var(--paper) 85%, transparent); }
.perks li::before { content: ""; position: absolute; left: 0; top: .45em; width: .8rem; height: .8rem; border-radius: 50%; background: var(--rose); }
.perks strong { color: var(--paper); }
.stamp-card { background: var(--blush); color: var(--cocoa); border-radius: 30px; padding: 1.6rem; transform: rotate(-1.5deg); box-shadow: 0 30px 60px -30px rgba(0,0,0,.55); }
.stamp-head { display: flex; gap: .9rem; align-items: center; margin-bottom: 1.2rem; }
.stamp-head img { border-radius: 50%; }
.stamp-name { font-family: var(--display); font-size: 1.3rem; color: var(--rose); margin: 0; }
.stamp-status { margin: 0; font-weight: 600; color: var(--cocoa-soft); }
.stamps { display: grid; grid-template-columns: repeat(5, 1fr); gap: .6rem; margin-bottom: 1.3rem; }
.stamp { aspect-ratio: 1; border-radius: 50%; border: 2px dashed color-mix(in srgb, var(--rose) 55%, transparent); display: grid; place-items: center; color: var(--rose); }
.stamp svg { width: 62%; height: 62%; opacity: .25; }
.stamp.on { background: var(--rose); border: 2px solid var(--rose); color: var(--paper); }
.stamp.on svg { opacity: 1; }
.stamp.free { font-family: var(--display); font-size: .7rem; text-align: center; line-height: 1.05; }
.stamp.new { animation: stampIn .5s cubic-bezier(.2,1.6,.4,1); }
@keyframes stampIn { from { transform: scale(.2) rotate(-30deg); } }
.join-form { display: grid; gap: .7rem; }
.join-form label { display: grid; gap: .25rem; font-weight: 600; font-size: .92rem; }
.member-tools .ref { margin-bottom: .6rem; }
.member-actions { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }

/* Shop */
.shop { max-width: var(--wrap); margin: 0 auto; padding: clamp(3rem, 7vw, 5.5rem) var(--pad) 2rem; }
.shop h2 { color: var(--cocoa); }
.shop-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.product img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 28px 28px 120px 28px; margin-bottom: 1rem; }
.product:nth-child(2) img { border-radius: 120px 28px 28px 28px; }
.product h3 { color: var(--rose-deep); margin-bottom: .3rem; }
.product p { color: var(--cocoa-soft); font-size: .98rem; }
.product-foot { display: flex; justify-content: space-between; align-items: center; gap: .8rem; }
.price { font-weight: 700; font-size: 1.1rem; }

/* Hours + press */
.hours { max-width: var(--wrap); margin: 0 auto; padding: clamp(2.5rem, 6vw, 4.5rem) var(--pad); display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.hours h2 { color: var(--cocoa); }
.hours-table { border-collapse: collapse; width: 100%; max-width: 520px; font-size: 1.05rem; }
.hours-table th, .hours-table td { text-align: left; padding: .65rem 0; border-bottom: 1px solid var(--line); }
.hours-table th { font-weight: 600; width: 40%; }
.hours-table tr.today th, .hours-table tr.today td { color: var(--rose-deep); font-weight: 700; }
.hours-table td.closed { color: var(--cocoa-soft); }
.hours-table .note { display: block; font-size: .85rem; font-weight: 500; color: var(--cocoa-soft); }
.press { margin: 0; max-width: 380px; justify-self: center; }
.press-frame { padding: 16px; }
.press img { border-radius: 44px; }
.press figcaption { text-align: center; font-weight: 600; margin-top: 1.1rem; font-size: .95rem; }

/* Instagram */
.gram { max-width: var(--wrap); margin: 0 auto; padding: 1rem var(--pad) clamp(3rem, 7vw, 5rem); }
.gram-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.gram-head h2 { margin: 0; color: var(--cocoa); }
.gram-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; }
.gram-grid a { display: block; overflow: hidden; border-radius: 20px; aspect-ratio: 1; }
.gram-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.gram-grid a:hover img { transform: scale(1.04); }

/* Footer */
.site-footer { background: var(--rose); color: var(--paper); padding: 2.5rem var(--pad); display: flex; gap: 1.5rem; align-items: center; flex-wrap: wrap; }
.site-footer img { border-radius: 50%; }
.site-footer p { margin: 0 0 .2rem; }
.foot-title { font-family: var(--display); font-size: 1.3rem; }
.foot-links { margin-left: auto; display: flex; gap: 1.2rem; font-weight: 600; }

/* Item dialog */
dialog { border: 0; padding: 0; border-radius: 28px; background: var(--paper); color: var(--cocoa); width: min(460px, calc(100vw - 2rem)); box-shadow: 0 40px 80px -30px rgba(74,34,24,.6); }
dialog::backdrop { background: rgba(74, 34, 24, .45); }
.item-dialog form { padding: 1.8rem; position: relative; }
.item-dialog h3 { font-size: 1.7rem; padding-right: 2rem; }
.item-meta { color: var(--cocoa-soft); }
.close { position: absolute; top: 1rem; right: 1rem; width: 2.4rem; height: 2.4rem; border-radius: 50%; border: 0; background: var(--blush); color: var(--cocoa); font-size: 1.5rem; line-height: 1; cursor: pointer; }
.item-options { display: grid; gap: 1rem; margin: 1rem 0 1.2rem; }
.opt-group { border: 0; padding: 0; margin: 0; }
.opt-group legend { font-weight: 700; margin-bottom: .45rem; }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.chips label { position: relative; }
.chips input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chips span { display: inline-block; padding: .45rem .85rem; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; font-weight: 500; font-size: .95rem; }
.chips input:checked + span { background: var(--rose); border-color: var(--rose); color: var(--paper); }
.chips input:focus-visible + span { outline: 3px solid var(--cocoa); outline-offset: 2px; }
.check { display: flex; gap: .55rem; align-items: center; font-weight: 500; }
.check input { width: 1.15rem; height: 1.15rem; accent-color: var(--rose); }
.qty { display: flex; align-items: center; gap: 1rem; justify-content: center; margin-bottom: 1.2rem; }
.qty button { width: 2.6rem; height: 2.6rem; border-radius: 50%; border: 2px solid var(--rose); background: transparent; color: var(--rose); font-size: 1.3rem; cursor: pointer; }
.qty output { font-weight: 700; font-size: 1.3rem; min-width: 2ch; text-align: center; }

/* Drawer */
.drawer-scrim { position: fixed; inset: 0; background: rgba(74,34,24,.4); z-index: 40; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100vw); background: var(--paper); z-index: 50; display: flex; flex-direction: column; transform: translateX(105%); transition: transform .35s cubic-bezier(.2,.8,.2,1); box-shadow: -20px 0 60px -30px rgba(74,34,24,.6); }
.drawer.open { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 1.3rem 1.5rem; border-bottom: 1px solid var(--line); position: relative; }
.drawer-head h2 { margin: 0; font-size: 1.8rem; }
.drawer-head .close { position: static; }
.drawer-body { overflow-y: auto; padding: 1.2rem 1.5rem 2rem; }
.empty { text-align: center; padding: 2rem 0; color: var(--cocoa-soft); }
.line { display: grid; grid-template-columns: 1fr auto; gap: .2rem 1rem; padding: .8rem 0; border-bottom: 1px dashed var(--line); }
.line .ln { font-weight: 700; }
.line .lo { font-size: .88rem; color: var(--cocoa-soft); grid-column: 1; }
.line .lp { font-weight: 600; font-variant-numeric: tabular-nums; }
.line .lq { grid-column: 2; grid-row: 2; display: flex; gap: .35rem; align-items: center; justify-self: end; }
.line .lq button { width: 1.8rem; height: 1.8rem; border-radius: 50%; border: 1.5px solid var(--rose); background: transparent; color: var(--rose); cursor: pointer; font-weight: 700; }
.upsell { background: var(--blush); border-radius: 16px; padding: .8rem 1rem; margin: 1rem 0 0; font-size: .95rem; display: flex; justify-content: space-between; gap: .8rem; align-items: center; }
.checkout { margin-top: 1.4rem; display: grid; gap: 1rem; }
.checkout[hidden] { display: none; }
.seg, .pay { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.pay { grid-template-columns: repeat(3, 1fr); }
.seg legend, .pay legend, .field-label { font-weight: 700; margin-bottom: .45rem; display: block; }
.seg label, .pay label { position: relative; text-align: center; padding: .7rem .5rem; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; cursor: pointer; font-weight: 600; font-size: .92rem; }
.seg input, .pay input { position: absolute; opacity: 0; }
.seg label:has(input:checked), .pay label:has(input:checked) { border-color: var(--rose); background: var(--blush); color: var(--rose-deep); }
.seg label:has(input:focus-visible), .pay label:has(input:focus-visible) { outline: 3px solid var(--cocoa); outline-offset: 2px; }
.field { display: grid; gap: .3rem; font-weight: 700; }
.field input, .field select { font-weight: 400; }
.delivery-fields { display: grid; gap: 1rem; }
.delivery-fields[hidden] { display: none; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: .4rem; }
.slot { border: 1.5px solid var(--line); background: #fff; border-radius: 12px; padding: .45rem .3rem; font: 600 .9rem var(--body); color: var(--cocoa); cursor: pointer; display: grid; gap: .05rem; }
.slot small { font-weight: 500; font-size: .72rem; color: var(--cocoa-soft); }
.slot[aria-checked="true"] { background: var(--rose); border-color: var(--rose); color: var(--paper); }
.slot[aria-checked="true"] small { color: var(--paper); }
.slot:disabled { opacity: .4; cursor: not-allowed; text-decoration: line-through; }
.reward-box:empty { display: none; }
.reward-box { background: var(--cocoa); color: var(--paper); border-radius: 16px; padding: .9rem 1rem; font-size: .95rem; }
.reward-box .check { margin-top: .4rem; }
.totals { margin: 0; display: grid; grid-template-columns: 1fr auto; gap: .35rem 1rem; }
.totals dt { color: var(--cocoa-soft); }
.totals dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.totals .grand { font-size: 1.25rem; color: var(--cocoa); font-weight: 700; padding-top: .5rem; border-top: 1px solid var(--line); }
.totals .save { color: var(--matcha); }

/* Confirmation */
.confirm-inner { padding: 2rem; text-align: center; }
.confirm-inner img { border-radius: 50%; margin: 0 auto 1rem; }
.confirm-inner h3 { font-size: 1.8rem; }
.confirm-inner .order-no { font-family: var(--display); font-size: 2.2rem; color: var(--cocoa); margin: .2rem 0 .6rem; }
.confirm-inner p { margin-left: auto; margin-right: auto; }

/* Mobile order bar */
.mobile-order { position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 35; display: flex; justify-content: space-between; align-items: center; border: 0; border-radius: 999px; padding: 1rem 1.4rem; background: var(--rose); color: var(--paper); font: 700 1.05rem var(--body); box-shadow: 0 16px 40px -14px rgba(74,34,24,.7); cursor: pointer; }
.mobile-order[hidden] { display: none; }

/* Responsive */
@media (max-width: 960px) {
  .main-nav { display: none; }
  .cart-btn { margin-left: auto; }
  .hero { grid-template-columns: 1fr; }
  .hero-media { max-width: 520px; }
  .delivery-grid { grid-template-columns: 1fr; }
  .offer-photo { grid-template-rows: 220px auto; }
  .rewards { grid-template-columns: 1fr; }
  .rewards-copy { justify-self: start; }
  .stamp-card { transform: none; }
  .shop-grid { grid-template-columns: 1fr 1fr; }
  .hours { grid-template-columns: 1fr; }
  .gram-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .brand { font-size: 1rem; gap: .5rem; }
  .brand img { width: 44px; height: 44px; }
  .steps ol { grid-template-columns: 1fr; }
  .shop-grid { grid-template-columns: 1fr; }
  .menu-sheet { padding: 3rem 1.6rem; }
  .pay { grid-template-columns: 1fr; }
  .foot-links { margin-left: 0; }
}
@media (min-width: 961px) { .mobile-order { display: none !important; } }

/* ---------- Conversion features ---------- */

/* Hero: returning customer */
.usual { margin: 1.4rem 0 0; }
.usual-hi { font-weight: 700; margin-bottom: .5rem; }
.usual-card { background: var(--paper); border: 2px solid var(--rose); border-radius: 22px; padding: 1rem 1rem 1rem 1.2rem; display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; max-width: 560px; }
.usual-text { display: grid; gap: .1rem; min-width: 0; }
.usual-label { font-size: .85rem; font-weight: 600; color: var(--rose-deep); }
.usual-text small { color: var(--cocoa-soft); font-size: .9rem; }
.usual:not([hidden]) + .hero-actions .btn-primary { background: transparent; color: var(--rose-deep); }
.usual:not([hidden]) + .hero-actions .btn-primary:hover { background: var(--paper); }

/* Hero: cutoff + reminders */
.cutoff-wrap { display: grid; gap: .5rem; justify-items: start; }
.cutoff { margin: 0; }
.cutoff-wrap.missed .cutoff { background: var(--cocoa); color: var(--paper); }
.cutoff-wrap.missed .cutoff::before { background: var(--rose); box-shadow: 0 0 0 4px color-mix(in srgb, var(--rose) 35%, transparent); }
.remind-link { background: none; border: 0; padding: .2rem .2rem; font: 600 .95rem var(--body); color: var(--rose-deep); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.cutoff-wrap.missed .remind-link { background: var(--rose); color: var(--paper); text-decoration: none; padding: .6rem 1rem; border-radius: 999px; }
.remind-link[hidden] { display: none; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 1.2rem; transform: translate(-50%, 20px); opacity: 0; z-index: 60; display: flex; align-items: center; gap: .9rem; background: var(--cocoa); color: var(--paper); padding: .75rem .9rem .75rem 1.2rem; border-radius: 999px; box-shadow: 0 18px 40px -16px rgba(74,34,24,.7); transition: opacity .25s, transform .25s; max-width: calc(100vw - 2rem); font-size: .95rem; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast button { background: none; border: 0; color: var(--blush); font: 700 .92rem var(--body); cursor: pointer; padding: .25rem .2rem; white-space: nowrap; }
.toast button:last-child { background: var(--rose); color: var(--paper); border-radius: 999px; padding: .45rem .9rem; }
.toast[hidden] { display: none; }

/* Drawer additions */
.drawer-clock { margin: 0; padding: .6rem 1.5rem; background: var(--cocoa); color: var(--paper); font-weight: 600; font-size: .92rem; max-width: none; }
.drawer-clock:empty { display: none; }
.summary-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; background: #fff; border: 1.5px solid var(--line); border-radius: 14px; padding: .75rem 1rem; }
.summary-row[hidden] { display: none; }
.summary-row > div { display: grid; }
.summary-row .field-label { margin: 0; font-size: .82rem; color: var(--cocoa-soft); font-weight: 600; }
.summary-row .btn-link { font: 700 .92rem var(--body); cursor: pointer; padding: .3rem; color: var(--rose-deep); }
.when-picker, .contact-fields { display: grid; gap: 1rem; }
.when-picker[hidden], .contact-fields[hidden] { display: none; }
.reward-box p { margin: 0 0 .3rem; }
.reward-box .nudge { color: var(--blush); font-weight: 700; }
.btn-apple { background: #000; color: #fff; border-color: #000; }
.btn-apple:hover { background: #222; }
.other-pay { text-align: center; }
.other-pay summary { cursor: pointer; font-weight: 600; color: var(--cocoa-soft); padding: .3rem; }
.other-pay-row { display: flex; gap: .5rem; justify-content: center; margin-top: .6rem; flex-wrap: wrap; }
.empty .btn { margin: .25rem; }

/* Mobile bar countdown */
.mo-left { display: grid; text-align: left; }
.mo-left small { font-weight: 500; font-size: .8rem; opacity: .9; }

/* Pickup explainer */
.pickup-how { list-style: none; margin: 0 0 2rem; padding: 0; display: grid; gap: .8rem; max-width: 560px; }
.pickup-how li { padding-left: 2rem; position: relative; color: var(--cocoa-soft); }
.pickup-how li::before { content: ""; position: absolute; left: 0; top: .2em; width: 1.2rem; height: 1.2rem; border-radius: 50%; background: var(--rose); box-shadow: inset 0 0 0 4px var(--blush), 0 0 0 2px var(--rose); }
.pickup-how strong { color: var(--cocoa); }
.hours-title { color: var(--cocoa); font-size: var(--step-2); }

/* Reminder dialog */
.remind-inner { padding: 1.8rem; position: relative; display: grid; gap: .9rem; }
.remind-inner h3 { font-size: 1.6rem; padding-right: 2.4rem; margin: 0; }
.remind-inner p { margin: 0; }
.remind-inner .check { align-items: flex-start; font-size: .92rem; }
.remind-inner .check input { margin-top: .2rem; flex: none; }

@media (max-width: 960px) {
  .fav-row { grid-template-columns: repeat(3, 1fr); }
  .menu-cats { top: 70px; }
}
@media (max-width: 620px) {
  .fav-row { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 calc(var(--pad) * -1); padding: 0 var(--pad) .4rem; }
  .fav { flex: 0 0 44%; scroll-snap-align: start; }
  .usual-card .btn { width: 100%; }
  .hero h1 { font-size: 2.5rem; }
  .toast { bottom: 5.6rem; }
}
@media (max-width: 620px) {
  .menu-sheet { padding: 3rem 1.7rem 3rem 2rem; }
  .menu-item { margin: 0 -.25rem 0 0; }
  .mi-main { padding: .5rem .3rem; }
  .plus { margin-right: 0; }
}
.toast { width: max-content; }
.toast > span { flex: 1; min-width: 0; }

/* ---------- Scroll animations (anim.js) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .anim-ready [data-anim] {
    transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1);
    transition-delay: calc(var(--i, 0) * 90ms);
  }
  .anim-ready [data-anim="pop"], .anim-ready [data-anim="polaroid"], .anim-ready [data-anim="spin"] {
    transition-timing-function: ease, cubic-bezier(.34,1.56,.64,1);
  }
  .anim-ready [data-anim="rise"]:not(.in) { opacity: 0; transform: translateY(28px); }
  .anim-ready [data-anim="slide"]:not(.in) { opacity: 0; transform: translateX(-26px); }
  .anim-ready [data-anim="pop"]:not(.in) { opacity: 0; transform: scale(.86) rotate(-2.5deg); }
  .anim-ready [data-anim="tilt"]:not(.in) { opacity: 0; transform: translateY(40px) rotate(-9deg); }
  .anim-ready [data-anim="polaroid"]:not(.in) { opacity: 0; transform: translateY(30px) scale(.9) rotate(var(--tilt, -8deg)); }
  .gram-grid a:nth-child(even) { --tilt: 8deg; }
  .anim-ready [data-anim="spin"]:not(.in) { opacity: 0; transform: rotate(-200deg) scale(.6); }
  .anim-ready [data-anim="spin"] { transition-duration: .6s, 1.1s; }

  /* Step numbers bounce after their card lands */
  .anim-ready .steps li.in::before { animation: numBounce .6s cubic-bezier(.34,1.56,.64,1) both; animation-delay: calc(var(--i, 0) * 90ms + .25s); }
  @keyframes numBounce { 0% { transform: scale(.2); } 60% { transform: scale(1.18); } 100% { transform: scale(1); } }

  /* Favorite cups fill up with their drink */
  .fav .fill { transition: transform 1.2s cubic-bezier(.3,.8,.3,1); transition-delay: calc(var(--i, 0) * 90ms + .3s); }
  .anim-ready .fav:not(.in) .fill { transform: translateY(118px); }
  .fav:hover .fav-art svg { animation: cupWiggle .5s ease; }
  @keyframes cupWiggle { 25% { transform: rotate(-6deg); } 60% { transform: rotate(5deg); } 100% { transform: rotate(0); } }

  /* Menu squiggles draw across */
  .menu-cat .squiggle { transition: width 1.1s cubic-bezier(.45,.05,.25,1) .25s; }
  .anim-ready .menu-cat:not(.in) .squiggle { width: 0; }

  /* Stamps pop onto the card one by one */
  .stamp-card .stamp { transition: opacity .3s ease, transform .5s cubic-bezier(.34,1.56,.64,1); transition-delay: calc(var(--s, 0) * 70ms + .45s); }
  .anim-ready .stamp-card:not(.in) .stamp { opacity: 0; transform: scale(.3) rotate(-25deg); }

  /* Product images settle from a little zoom */
  .product img { transition: transform 1s cubic-bezier(.2,.7,.2,1); transition-delay: calc(var(--i, 0) * 90ms + .1s); }
  .anim-ready .product:not(.in) img { transform: scale(1.08); }

  /* Hero: the cutoff dot gently pulses so the deadline catches the eye */
  .cutoff::before { animation: pulse 2.4s ease-in-out infinite; }
  @keyframes pulse { 50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--matcha) 0%, transparent); } }
}

/* Bowlby One's "1" is a thin stem in a wide box; trim its side space so "10th" reads as one word */
.digit-1 { margin: 0 -.13em 0 -.11em; }

/* Header logo hello: the cup bobs and the name ripples letter by letter.
   Plays shortly after load and again on hover. */
.brand { position: relative; }
.brand-letters { display: inline-block; white-space: nowrap; }
.brand-letters i { font-style: normal; display: inline-block; }
@media (prefers-reduced-motion: no-preference) {
  @keyframes cup-set { 0% { transform: translateY(0) rotate(0); } 25% { transform: translateY(-5px) rotate(-7deg); }
    50% { transform: translateY(1px) rotate(5deg) scale(1.04, .96); } 72% { transform: translateY(0) rotate(-2deg); } 100% { transform: none; } }
  @keyframes letter-hop { 0% { transform: none; } 40% { transform: translateY(-6px) rotate(-6deg); color: var(--rose); } 100% { transform: none; } }
  .brand.hello img { animation: cup-set .8s cubic-bezier(.4,0,.3,1); transform-origin: 50% 85%; }
  .brand.hello .brand-letters i { animation: letter-hop .55s ease-in-out both; animation-delay: calc(.35s + var(--i) * 45ms); }
}

/* Solicai demo countdown badge: sit above the mobile order bar when it shows. */
@media (max-width: 960px) { body:has(.mobile-order:not([hidden])) #sw-badge { bottom: 5.4rem; } }

/* Menu sections: each category has its own tint and ink so you can tell where you are at a glance.
   Hot = toasted caramel, iced = cool blue, non coffee = matcha, protein = peach, kids = strawberry, bottles = lavender. */
#cat-hot       { --tint: #F3DFC8; --ink: #7E4122; }
#cat-iced      { --tint: #DCE8EC; --ink: #335C6E; }
#cat-noncoffee { --tint: #E2E9D1; --ink: #4C6630; }
#cat-protein   { --tint: #F8DCC8; --ink: #94431F; }
#cat-kids      { --tint: #F8D7DF; --ink: #9C3157; }
#cat-bottles   { --tint: #E6DDEE; --ink: #62467D; }
.menu-cat { background: var(--tint, transparent); border-radius: 26px; padding: 1.3rem 1.2rem 1rem; }
.menu-cat h3, .menu-cat h3 small, .menu-cat .mi-main .n, .menu-cat .mi-main .p, .menu-cat .sf { color: var(--ink, var(--rose-deep)); }
.menu-cat .squiggle { background: var(--ink); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='12'%3E%3Cpath d='M0 6 Q7 0 14 6 T28 6' fill='none' stroke='black' stroke-width='2.6'/%3E%3C/svg%3E") repeat-x left center; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='12'%3E%3Cpath d='M0 6 Q7 0 14 6 T28 6' fill='none' stroke='black' stroke-width='2.6'/%3E%3C/svg%3E") repeat-x left center; }
.menu-cat .plus { border-color: var(--ink); color: var(--ink); background: color-mix(in srgb, var(--paper) 55%, transparent); }
.menu-cat .plus:hover, .menu-cat .plus:active { background: var(--ink); color: var(--paper); }
.menu-cat .mi-main:hover { background: color-mix(in srgb, var(--paper) 60%, transparent); }
/* Category chips wear their section's colors; the one you're reading is filled in. */
.menu-cats a { background: var(--tint, var(--paper)); color: var(--ink, var(--rose-deep)); transition: background .25s, color .25s; }
.menu-cats a:hover, .menu-cats a.on { background: var(--ink, var(--rose)); color: var(--paper); }
.menu-cats a[href="#cat-hot"]       { --tint: #F3DFC8; --ink: #7E4122; }
.menu-cats a[href="#cat-iced"]      { --tint: #DCE8EC; --ink: #335C6E; }
.menu-cats a[href="#cat-noncoffee"] { --tint: #E2E9D1; --ink: #4C6630; }
.menu-cats a[href="#cat-protein"]   { --tint: #F8DCC8; --ink: #94431F; }
.menu-cats a[href="#cat-kids"]      { --tint: #F8D7DF; --ink: #9C3157; }
.menu-cats a[href="#cat-bottles"]   { --tint: #E6DDEE; --ink: #62467D; }
@media (max-width: 620px) { .menu-cat { padding: 1.1rem .8rem .8rem; } }
