/* Chai & Chill Cafe website. Palette and lettering follow the cafe's own logo and menu card:
   cream paper, brand orange, deep chai brown, and the sky blue of the logo's cloud used sparingly. */
:root {
  --bg: #fff4e0;
  --paper: #fffaf0;
  --card: #ffffff;
  --ink: #3a1d10;
  --ink-soft: #7a5a48;
  --line: #ecd9bb;
  --orange: #d9600a;
  --orange-deep: #b24a04;
  --orange-wash: #fde3c6;
  --sky: #8fc9e6;
  --sky-wash: #e3f2fa;
  --ok: #2f7d4f;
  --bad: #b3261e;
  --shadow: 0 10px 30px -12px rgba(120, 60, 10, .35);
  --f-display: "Baloo 2", "Trebuchet MS", system-ui, sans-serif;
  --f-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-script: "Kaushan Script", "Brush Script MT", cursive;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1d110a; --paper: #261710; --card: #2f1d14; --ink: #fbe9cf; --ink-soft: #c9a98c; --line: #4a3223;
    --orange: #f28a3a; --orange-deep: #ffb070; --orange-wash: #4a2a14; --sky: #8fc9e6; --sky-wash: #1f3340;
    --ok: #6fcf97; --bad: #ff8a80; --shadow: 0 10px 30px -12px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1d110a; --paper: #261710; --card: #2f1d14; --ink: #fbe9cf; --ink-soft: #c9a98c; --line: #4a3223;
  --orange: #f28a3a; --orange-deep: #ffb070; --orange-wash: #4a2a14; --sky: #8fc9e6; --sky-wash: #1f3340;
  --ok: #6fcf97; --bad: #ff8a80; --shadow: 0 10px 30px -12px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 130px; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 16px; line-height: 1.55;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; border-radius: 6px; }
.wrap { max-width: 1120px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
h1, h2, h3 { font-family: var(--f-display); line-height: 1.08; margin: 0; text-wrap: balance; }
.script { font-family: var(--f-script); color: var(--orange); }
.eyebrow { font-weight: 800; letter-spacing: .12em; text-transform: uppercase; font-size: 12.5px; color: var(--orange-deep); }
.muted { color: var(--ink-soft); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; padding: 12px 22px;
  font-weight: 800; background: var(--orange); color: #fff; text-decoration: none; transition: transform .12s, background .12s; }
.btn:hover { background: var(--orange-deep); transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); }
.btn.ghost:hover { background: var(--orange-wash); }
.btn.small { padding: 8px 14px; font-size: 14px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.ic { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* header */
.top { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 95%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 16px; padding-block: 10px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; min-width: 0; }
.brand img { width: 44px; height: 44px; object-fit: contain; mix-blend-mode: multiply; }
:root[data-theme="dark"] .brand img { mix-blend-mode: normal; }
.brand b { font-family: var(--f-display); font-size: 22px; line-height: 1; white-space: nowrap; }
.brand small { display: block; font-family: var(--f-script); color: var(--orange); font-size: 13px; line-height: 1.1; margin-top: 2px; white-space: nowrap; }
.nav { display: flex; gap: 22px; font-weight: 800; }
.nav a { text-decoration: none; padding: 6px 2px; border-bottom: 2px solid transparent; }
.nav a:hover { border-color: var(--orange); }
.cart-btn { position: relative; }
.cart-count { background: var(--ink); color: var(--bg); border-radius: 999px; min-width: 22px; height: 22px; padding: 0 6px; display: inline-grid; place-items: center; font-size: 13px; }
.status-chip { white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; padding: 6px 14px; font-weight: 800; font-size: 14px; background: var(--sky-wash); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ink-soft); }
.status-chip.open .dot { background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 25%, transparent); }
.status-chip.closed .dot { background: var(--bad); }

/* hero */
.hero { padding-block: 40px 28px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(38px, 6vw, 68px); font-weight: 800; letter-spacing: -.01em; margin: 10px 0 14px; }
.hero h1 em { font-style: normal; color: var(--orange); }
.hero p.lead { font-size: 18px; max-width: 34em; color: var(--ink-soft); margin: 0 0 22px; }
.hero .script { font-size: clamp(22px, 3.2vw, 30px); display: block; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 20px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 22px; font-weight: 700; color: var(--ink-soft); font-size: 15px; }
.facts span { display: inline-flex; align-items: center; gap: 8px; }
.facts .ic { color: var(--orange); }
.hero-art { position: relative; }
.hero-art .photo { border-radius: 36px; overflow: hidden; box-shadow: var(--shadow); border: 6px solid var(--card); aspect-ratio: 860 / 440; }
.hero-art .photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-art .badge { position: absolute; left: -6px; bottom: -22px; width: 118px; height: 118px; border-radius: 50%; background: var(--paper); border: 4px solid var(--orange);
  display: grid; place-items: center; box-shadow: var(--shadow); }
.hero-art .badge img { width: 84px; mix-blend-mode: multiply; }
:root[data-theme="dark"] .hero-art .badge img { mix-blend-mode: normal; }
.notice { background: var(--orange-wash); border-radius: 14px; padding: 10px 16px; font-weight: 700; margin-top: 16px; }

/* sections */
section { padding-block: 34px; }
.sec-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 8px 20px; margin-bottom: 18px; }
.sec-head h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; }

/* deals */
.deals { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 310px); gap: 14px; overflow-x: auto; padding: 4px 2px 14px; scroll-snap-type: x proximity; }
.deal { scroll-snap-align: start; background: var(--orange); color: #fff; border-radius: 24px; padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 8px; position: relative; overflow: hidden; min-height: 210px; }
.deal::after { content: ""; position: absolute; right: -40px; top: -40px; width: 130px; height: 130px; border-radius: 50%; background: rgba(255, 255, 255, .13); }
.deal h3 { font-size: 22px; font-weight: 800; position: relative; }
.deal ul { margin: 0; padding-left: 18px; font-size: 14.5px; opacity: .95; flex: 1; position: relative; }
.deal .row { display: flex; align-items: center; justify-content: space-between; gap: 10px; position: relative; }
.deal .price { font-family: var(--f-display); font-size: 26px; font-weight: 800; }
.deal .btn { background: #fff; color: var(--orange-deep); }
:root[data-theme="dark"] .deal { background: #8a3d07; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .deal { background: #8a3d07; } }

/* menu */
.menu-bar { position: sticky; top: 64px; z-index: 30; background: var(--bg); padding-block: 10px 8px; border-bottom: 1px solid var(--line); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.chip { flex: none; border: 0; background: var(--card); box-shadow: inset 0 0 0 2px var(--line); border-radius: 999px; padding: 8px 16px; font-weight: 800; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); box-shadow: none; }
.search { display: flex; gap: 10px; align-items: center; background: var(--card); border-radius: 999px; box-shadow: inset 0 0 0 2px var(--line); padding: 0 16px; margin-bottom: 10px; }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 11px 0; font: inherit; color: inherit; outline: none; }
.group { padding-top: 22px; }
.group > h3 { font-size: 26px; font-weight: 800; margin-bottom: 4px; }
.cat-name { font-weight: 800; color: var(--orange-deep); margin: 16px 0 8px; font-size: 15px; letter-spacing: .06em; text-transform: uppercase; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.item { display: flex; align-items: center; gap: 12px; background: var(--card); border-radius: 20px; padding: 12px 14px 12px 12px; box-shadow: 0 1px 0 var(--line), 0 6px 16px -14px rgba(120, 60, 10, .6); min-width: 0; }
.item .glyph { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--orange-wash); color: var(--orange-deep); flex: none; }
.item .glyph .ic { width: 28px; height: 28px; }
.item .glyph img { width: 100%; height: 100%; object-fit: cover; border-radius: 16px; }
.item .meta { flex: 1; min-width: 0; }
.item .name { font-weight: 800; line-height: 1.25; overflow-wrap: anywhere; }
.item .desc { font-size: 13.5px; color: var(--ink-soft); line-height: 1.35; }
.item .price { font-family: var(--f-display); font-weight: 700; color: var(--orange-deep); font-size: 17px; }
.add { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--orange); color: #fff; display: grid; place-items: center; flex: none; transition: transform .12s, background .12s; }
.add:hover { background: var(--orange-deep); transform: scale(1.06); }
.add .ic { width: 20px; height: 20px; stroke-width: 2.4; }
.step { display: inline-flex; align-items: center; gap: 2px; background: var(--ink); color: var(--bg); border-radius: 999px; padding: 3px; flex: none; }
.step button { width: 34px; height: 34px; border: 0; border-radius: 50%; background: transparent; color: inherit; display: grid; place-items: center; }
.step button:hover { background: rgba(255, 255, 255, .16); }
.step b { min-width: 22px; text-align: center; }
.empty { padding: 30px; text-align: center; color: var(--ink-soft); }

/* photo cards (shown for a category once any of its items has a photo) */
.grid.photos { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.pcard { display: flex; flex-direction: column; background: var(--card); border-radius: 22px; overflow: hidden; box-shadow: 0 1px 0 var(--line), 0 10px 22px -16px rgba(120, 60, 10, .65); min-width: 0; }
.pcard .pic { aspect-ratio: 4 / 3; background: var(--orange-wash); display: grid; place-items: center; color: var(--orange-deep); }
.pcard .pic img { width: 100%; height: 100%; object-fit: cover; }
.pcard .pic .ic { width: 46px; height: 46px; opacity: .65; }
.pcard .body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.pcard .name { font-weight: 800; line-height: 1.25; overflow-wrap: anywhere; }
.pcard .desc { font-size: 13.5px; color: var(--ink-soft); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard .foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: auto; padding-top: 8px; flex-wrap: wrap; }
.pcard .price { font-family: var(--f-display); font-weight: 700; color: var(--orange-deep); font-size: 18px; }
.deal.has-img { padding-top: 0; }
.deal-img { width: calc(100% + 36px); margin: 0 -18px 4px; height: 130px; object-fit: cover; position: relative; }

/* how it works + visit */
.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.how > div { background: var(--paper); border: 2px solid var(--line); border-radius: 22px; padding: 20px; }
.how b.n { font-family: var(--f-display); font-size: 40px; color: var(--orange); line-height: 1; }
.how h3 { font-size: 21px; margin: 6px 0; }
.visit { display: grid; grid-template-columns: 1.1fr 1fr; gap: 20px; }
.panel { background: var(--paper); border: 2px solid var(--line); border-radius: 26px; padding: 24px; }
.panel h3 { font-size: 26px; margin-bottom: 10px; }
.lines { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.lines li { display: flex; gap: 12px; align-items: flex-start; font-weight: 700; }
.lines .ic { color: var(--orange); margin-top: 3px; }
.lines a { text-decoration: none; border-bottom: 2px solid var(--line); }
.panel.dark { background: var(--ink); color: var(--bg); border-color: transparent; }
.panel.dark .script { color: #ffb070; font-size: 28px; }
.footer { padding-block: 28px 110px; text-align: center; color: var(--ink-soft); font-size: 14px; }
.social { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.social a { border: 2px solid currentColor; border-radius: 999px; padding: 6px 14px; font-weight: 800; font-size: 14px; text-decoration: none; }

/* cart bar + drawer */
.cart-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); pointer-events: none; }
.cart-bar button { pointer-events: auto; display: flex; width: min(560px, 100%); margin: 0 auto; align-items: center; justify-content: space-between; gap: 12px; border: 0; background: var(--ink); color: var(--bg); border-radius: 999px; padding: 14px 22px; font-weight: 800; box-shadow: var(--shadow); }
.overlay { position: fixed; inset: 0; z-index: 70; background: rgba(40, 18, 8, .55); display: flex; justify-content: flex-end; align-items: stretch; }
.sheet { background: var(--bg); width: min(470px, 100%); height: 100%; display: flex; flex-direction: column; box-shadow: -20px 0 50px -20px rgba(0, 0, 0, .5); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--line); padding-top: max(16px, env(safe-area-inset-top, 0px)); }
.sheet-head h2 { font-size: 26px; font-weight: 800; }
.x { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--card); display: grid; place-items: center; }
.sheet-body { flex: 1; overflow-y: auto; padding: 16px 18px; }
.sheet-foot { border-top: 1px solid var(--line); padding: 14px 18px calc(14px + env(safe-area-inset-bottom, 0px)); background: var(--paper); }
.line { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.line .nm { flex: 1; min-width: 0; font-weight: 800; overflow-wrap: anywhere; }
.line .pr { font-weight: 800; min-width: 74px; text-align: right; }
.sum { display: grid; gap: 6px; margin-bottom: 12px; }
.sum div { display: flex; justify-content: space-between; }
.sum .tot { font-family: var(--f-display); font-size: 24px; font-weight: 800; }
.field { margin-bottom: 12px; }
.field label { display: block; font-weight: 800; font-size: 14px; margin-bottom: 4px; }
.field input, .field select, .field textarea { width: 100%; border: 2px solid var(--line); background: var(--card); color: var(--ink); border-radius: 14px; padding: 11px 14px; font: inherit; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--orange); outline: none; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg button { border: 2px solid var(--line); background: var(--card); border-radius: 14px; padding: 11px; font-weight: 800; }
.seg button[aria-pressed="true"] { border-color: var(--orange); background: var(--orange-wash); }
.err { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); border-radius: 12px; padding: 10px 14px; font-weight: 700; margin-bottom: 12px; }
.hp { position: absolute; left: -9999px; }
.pay-note { font-size: 14px; color: var(--ink-soft); background: var(--sky-wash); border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; }

/* tracker */
.track-no { font-family: var(--f-display); font-size: 44px; font-weight: 800; color: var(--orange); line-height: 1; }
.steps { list-style: none; margin: 18px 0; padding: 0; display: grid; gap: 0; }
.steps li { display: flex; gap: 14px; align-items: flex-start; position: relative; padding-bottom: 20px; font-weight: 800; color: var(--ink-soft); }
.steps li::before { content: ""; position: absolute; left: 13px; top: 28px; bottom: 0; width: 2px; background: var(--line); }
.steps li:last-child::before { display: none; }
.steps .pt { width: 28px; height: 28px; border-radius: 50%; background: var(--card); box-shadow: inset 0 0 0 3px var(--line); flex: none; display: grid; place-items: center; }
.steps li.done { color: var(--ink); }
.steps li.done .pt { background: var(--ok); box-shadow: none; color: #fff; }
.steps li.now .pt { background: var(--orange); box-shadow: 0 0 0 6px color-mix(in srgb, var(--orange) 25%, transparent); }
.steps li.now { color: var(--orange-deep); }
.steps .pt .ic { width: 16px; height: 16px; stroke-width: 3; }
.toast { position: fixed; left: 50%; bottom: calc(86px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-weight: 800; z-index: 90; box-shadow: var(--shadow); }

@media (max-width: 860px) {
  .hero-grid, .visit { grid-template-columns: 1fr; }
  .how { grid-template-columns: 1fr; }
  .nav { display: none; }
  .hero { padding-top: 22px; }
  .hero-art { margin-bottom: 26px; }
  .brand small { display: none; }
  .top-in { gap: 8px; }
  .brand img { width: 38px; height: 38px; }
  .brand b { font-size: 19px; }
  .status-chip { padding: 5px 10px; font-size: 13px; }
  .menu-bar { top: 62px; }
}
@media (max-width: 520px) {
  .grid { grid-template-columns: 1fr; }
  .grid.photos { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pcard .body { padding: 10px 11px 12px; }
  .pcard .price { font-size: 16px; }
  .pcard .step button { width: 30px; height: 30px; }
  .hide-sm { display: none; }
  .sheet { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
