/* Cheto Market. One stylesheet for every shopper page: the pages run under a
 * CSP without inline styles, so nothing visual lives anywhere else. Brand
 * tokens follow the landing page (src/utils/LandingPage.js). Mobile first. */

@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/plus-jakarta-sans-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/plus-jakarta-sans-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/plus-jakarta-sans-latin-ext-600-normal.woff2) format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/plus-jakarta-sans-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 800; font-display: swap; src: url(/fonts/plus-jakarta-sans-latin-ext-800-normal.woff2) format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 800; font-display: swap; src: url(/fonts/plus-jakarta-sans-latin-800-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

:root {
  --accent: #3D5AFE;
  --accent-dark: #2C47E6;
  --accent-soft: #E8ECFF;
  --ink: #0E1633;
  --muted: #5A6480;
  --line: #E3E7F0;
  --ground: #F6F7FB;
  --card: #FFFFFF;
  --ok: #1F8A70;
  --ok-soft: #E3F6F0;
  --warn: #9A5B00;
  --warn-soft: #FFF3D6;
  --danger: #B42318;
  --danger-soft: #FDECEA;
  --on-accent: #FFFFFF;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(14, 22, 51, .06), 0 4px 16px rgba(14, 22, 51, .06);
  --shadow-lg: 0 2px 6px rgba(14, 22, 51, .05), 0 18px 48px rgba(14, 22, 51, .12);
}
@media (prefers-color-scheme: dark) {
  :root {
    --accent: #7C8FFF;
    --accent-dark: #A3B0FF;
    --accent-soft: #1D2550;
    --ink: #E8EBF5;
    --muted: #A2AAC2;
    --line: #2A3150;
    --ground: #0D1226;
    --card: #151B35;
    --ok: #5DD3B0;
    --ok-soft: #12302A;
    --warn: #FFC66B;
    --warn-soft: #3A2C10;
    --danger: #FF8A80;
    --danger-soft: #3A1614;
    /* Dark ink on the light accent: white on #7C8FFF is too faint to read. */
    --on-accent: #0D1226;
    --shadow: none;
    --shadow-lg: 0 18px 48px rgba(0, 0, 0, .35);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--ground);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent-dark); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: 1.75rem; font-weight: 800; letter-spacing: -.01em; }
h2 { font-size: 1.2rem; font-weight: 700; }
h3 { font-size: 1rem; font-weight: 700; }
p { margin: 0 0 .75em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.main { padding-top: 20px; padding-bottom: 48px; min-height: 60vh; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--card); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; top: 8px; }

/* header, banners, footer: one quiet line each */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--ground); }
@supports (backdrop-filter: blur(1px)) {
  .site-header { background: color-mix(in srgb, var(--ground) 85%, transparent); backdrop-filter: saturate(1.4) blur(12px); }
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; }
.brand { font-weight: 800; font-size: 1.35rem; color: var(--ink); text-decoration: none; letter-spacing: -.02em; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a { color: var(--ink); text-decoration: none; }
.nav-links a:hover { color: var(--accent); }
.nav-icon { position: relative; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; }
.nav-icon:hover { background: var(--accent-soft); }
.icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-lang { display: grid; place-items: center; min-width: 38px; height: 30px; margin-left: 6px; padding: 0 8px; border: 1px solid var(--line); border-radius: 999px; font-size: .75rem; font-weight: 800; letter-spacing: .05em; }
.nav-links .nav-lang { color: var(--muted); }
.badge { display: inline-block; min-width: 1.5em; padding: 0 .4em; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: .8rem; font-weight: 700; text-align: center; }
.nav-basket .badge { position: absolute; top: 3px; right: 1px; min-width: 18px; height: 18px; padding: 0 5px; font-size: .68rem; line-height: 18px; }
.banner { margin: 0; padding: 5px 16px; text-align: center; font-size: .8rem; font-weight: 600; }
.banner-test { background: var(--warn-soft); color: var(--warn); }
.banner-soon { background: var(--accent-soft); color: var(--accent-dark); }
.site-footer { padding: 8px 0 28px; font-size: .82rem; }
.footer { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; margin: 0; }
.footer a { color: var(--muted); text-decoration: none; }
.footer a:hover { color: var(--accent); text-decoration: underline; }

/* buttons, chips */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid transparent; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-dark); color: var(--on-accent); }
.btn-ghost { background: transparent; color: var(--accent); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: .9rem; }
.btn-lg { min-height: 52px; padding: 0 24px; font-size: 1.05rem; }
.btn:disabled, .is-disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); text-decoration: underline; cursor: pointer; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.chip-form, .inline-form { display: inline; margin: 0; }
.chip { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-size: .95rem; text-decoration: none; cursor: pointer; }
.chip:hover { border-color: var(--accent); color: var(--accent); }

/* the home page: the motion graphic (bottom of this file), one question */
.page-home .main { padding-top: 8px; }
.home { text-align: center; padding: 8px 0 0; }
.home-title { margin: 22px 0 14px; font-size: 1.9rem; letter-spacing: -.025em; }
.has-thread .home { display: none; }

/* the assistant */
.assistant { display: flex; flex-direction: column; max-width: 760px; margin: 0 auto; }
.thread { display: flex; flex-direction: column; gap: 14px; margin: 12px 0; }
.assistant.is-empty .thread { margin: 0; }
.msg { max-width: 100%; }
.msg-who { margin: 0 0 2px; font-size: .78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.msg-text { margin: 0; padding: 10px 14px; border-radius: var(--radius); white-space: pre-line; }
.msg-user { align-self: flex-end; text-align: right; }
.msg-user .msg-text { background: var(--accent); color: var(--on-accent); display: inline-block; text-align: left; border-radius: 20px; }
.msg-bot .msg-text { background: var(--card); border: 1px solid var(--line); display: inline-block; }
.typing { display: inline-flex; align-self: flex-start; margin: 4px 0; padding: 14px 16px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); }
.dots { display: flex; gap: 5px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: dots 1.2s ease-in-out infinite; }
.dots i:nth-child(2) { animation-delay: .15s; }
.dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dots { 0%, 60%, 100% { opacity: .35; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }
.notice { padding: 10px 14px; border-radius: 10px; background: var(--accent-soft); color: var(--ink); }
.notice-error { background: var(--danger-soft); color: var(--danger); }

/* The composer: one rounded field with the send arrow inside, like a chat
   app. Docked to the bottom of the screen while a conversation runs. */
.composer-dock { position: sticky; bottom: 0; z-index: 5; padding: 12px 0 14px; background: linear-gradient(to bottom, transparent, var(--ground) 35%); }
.composer { display: flex; align-items: flex-end; gap: 8px; padding: 7px 7px 7px 20px; border: 1px solid var(--line); border-radius: 28px; background: var(--card); box-shadow: var(--shadow-lg); }
.composer:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow-lg); }
.composer textarea { flex: 1; min-height: 42px; max-height: 160px; resize: none; padding: 10px 0; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 1.03rem; outline: none; }
.composer textarea::placeholder { color: var(--muted); opacity: 1; }
.send { flex: none; display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 0; border-radius: 50%; background: var(--accent); color: var(--on-accent); cursor: pointer; }
.send:hover { background: var(--accent-dark); }
.send:disabled { opacity: .45; cursor: default; }
.send svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* First visit: question, field, then the example chips, centred. */
.assistant.is-empty .composer-dock { order: 1; position: static; padding: 0; background: none; }
.assistant.is-empty .suggest { order: 2; }
.assistant.is-empty .suggest .chips { justify-content: center; margin: 14px 0 0; }
.assistant.is-empty .typing, .assistant.is-empty .notice { order: 3; }

/* place picker: one line until opened */
.location { max-width: 760px; margin: 6px auto 0; text-align: center; }
.location summary { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: 999px; color: var(--muted); font-size: .9rem; font-weight: 600; cursor: pointer; list-style: none; }
.location summary::-webkit-details-marker { display: none; }
.location summary:hover, .location[open] summary { color: var(--ink); background: var(--accent-soft); }
.pin { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.location-form { display: flex; gap: 8px; max-width: 440px; margin: 10px auto 0; }
.location-form input { flex: 1; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink); font: inherit; }
.location .place-list { justify-content: center; }
.location .inline-form { display: block; margin-top: 8px; font-size: .9rem; }
.place-list, .place-results { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }

/* cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 12px; margin-top: 10px; }
.card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.card-media { display: block; aspect-ratio: 1 / 1; background: var(--accent-soft); text-decoration: none; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-ph { display: grid; place-items: center; width: 100%; height: 100%; font-size: 3rem; font-weight: 800; color: var(--accent); }
.card-body { display: flex; flex-direction: column; gap: 4px; padding: 12px; flex: 1; }
.card-title { margin: 0; font-size: 1rem; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-shop { margin: 0; font-size: .85rem; color: var(--muted); }
.card-shop a { color: var(--muted); }
.card-desc { margin: 0; font-size: .875rem; color: var(--muted); }
.card-price { margin: 4px 0 0; font-weight: 800; font-size: 1.05rem; }
.badges { list-style: none; padding: 0; margin: 4px 0; display: flex; flex-wrap: wrap; gap: 4px; }
.badges li { padding: 2px 8px; border-radius: 999px; font-size: .75rem; font-weight: 600; background: var(--accent-soft); color: var(--accent-dark); }
.badges .b-ok { background: var(--ok-soft); color: var(--ok); }
.badges .b-warn { background: var(--warn-soft); color: var(--warn); }
.card-actions { margin-top: auto; padding-top: 6px; }
.card-actions .btn { width: 100%; }

/* product and shop pages */
.crumbs { font-size: .9rem; }
.product { display: grid; gap: 20px; }
.gallery { display: grid; gap: 8px; }
.gallery img { border-radius: var(--radius); }
.gallery-empty { aspect-ratio: 1 / 1; background: var(--accent-soft); border-radius: var(--radius); }
.product-price { font-size: 1.4rem; font-weight: 800; }
.product-desc { white-space: pre-line; }
.buy { display: grid; gap: 12px; margin-top: 12px; }
.choice { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 0; }
.choice legend { font-weight: 700; padding: 0 4px; }
.opt { display: flex; align-items: center; gap: 8px; min-height: 36px; }
.qty input { width: 80px; min-height: 40px; margin-left: 8px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: var(--card); color: var(--ink); }
.seller { margin-top: 28px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.seller dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0; font-size: .9rem; }
.seller dt { color: var(--muted); }
.seller dd { margin: 0; }
.seller-note { margin: 12px 0 0; }
.shop-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 20px; }
.shop-logo { border-radius: 50%; width: 72px; height: 72px; object-fit: cover; }
.facts { padding-left: 18px; margin: 0; }

/* basket, checkout, orders */
.basket-shop { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 14px; }
.basket-shop-blocked { border-color: var(--warn); }
.lines { list-style: none; padding: 0; margin: 0 0 8px; }
.line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.line-name { flex: 1 1 200px; }
.line-total { font-weight: 700; margin-left: auto; }
.line-off .line-name { text-decoration: line-through; color: var(--muted); }
.qty-form input { width: 64px; min-height: 36px; padding: 0 6px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: var(--card); color: var(--ink); }
.fulfilment-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0; }
.fulfilment-form select { min-height: 36px; margin-left: 6px; border-radius: 8px; border: 1px solid var(--line); font: inherit; background: var(--card); color: var(--ink); }
.fee, .subtotal { display: flex; justify-content: space-between; gap: 12px; margin: 4px 0; }
.subtotal { font-weight: 700; }
.problems { margin: 8px 0; padding-left: 18px; color: var(--warn); font-size: .9rem; }
.problem { color: var(--warn); font-size: .9rem; }
.grand { margin-top: 8px; }
.grand .subtotal strong, .grand-total strong { font-size: 1.3rem; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.checkout { max-width: 720px; }
.form-block { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin: 0 0 16px; background: var(--card); }
.form-block legend { font-weight: 700; padding: 0 4px; }
.field { display: grid; gap: 4px; margin: 0 0 12px; }
.field input, .field textarea { min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: var(--ground); color: var(--ink); width: 100%; }
.field textarea { min-height: 64px; }
.has-error input { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: .85rem; }
.grid2, .grid3 { display: grid; gap: 0 12px; grid-template-columns: 1fr; }
.check { display: flex; gap: 10px; align-items: flex-start; }
.check input { margin-top: 5px; width: 18px; height: 18px; }
.summary { margin: 16px 0; }
.seller-mini { margin-top: 8px; font-size: .9rem; }
.seller-mini summary { cursor: pointer; color: var(--muted); }
.orders { list-style: none; padding: 0; }
.order-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }

@media (min-width: 640px) {
  .grid2 { grid-template-columns: 1fr 1fr; }
  .grid3 { grid-template-columns: 1fr 1fr 1fr; }
  .product { grid-template-columns: 1fr 1fr; align-items: start; }
  .home-title { font-size: 2.4rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}

/* ── the home page's motion graphic ────────────────────────────────────────
   One purchase on a 16-second loop, in the spirit of ChatGPT's shopping demo:
   the request is typed and sent (0–34%), the shops' products arrive with
   what Cheto understood (34–64%), the basket is paid in one go (64–97%).
   Every element runs its own keyframes over the same 16 s, so they stay in
   step without any script. Sizes are in --u, a hundredth of the frame's
   width (container query units), so the scene scales as one picture; a
   narrow frame gets a bigger --u and two cards instead of three. */
.demo { container-type: inline-size; width: min(100%, 500px); margin: 0 auto; }
.demo-screen {
  --u: 1cqw;
  position: relative;
  height: calc(80 * var(--u));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: calc(5 * var(--u));
  background: linear-gradient(165deg, var(--card) 35%, var(--accent-soft));
  box-shadow: var(--shadow-lg);
  color: var(--ink);
  font-size: calc(3 * var(--u));
  line-height: 1.25;
  text-align: left;
}
.demo i { font-style: normal; }
.demo b { font-weight: 700; }
.demo svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.demo-top { position: absolute; top: calc(3.8 * var(--u)); left: calc(5 * var(--u)); right: calc(5 * var(--u)); display: flex; align-items: center; justify-content: space-between; }
.demo-brand { font-size: calc(3.8 * var(--u)); font-weight: 800; letter-spacing: -.02em; }
.demo-bag { position: relative; width: calc(5.4 * var(--u)); height: calc(5.4 * var(--u)); }
.demo-count { position: absolute; top: calc(-1.4 * var(--u)); right: calc(-1.8 * var(--u)); display: grid; place-items: center; width: calc(3.6 * var(--u)); height: calc(3.6 * var(--u)); border-radius: 50%; background: var(--accent); color: var(--on-accent); font-size: calc(2.1 * var(--u)); font-weight: 800; opacity: 0; animation: demo-count 16s infinite; }
.demo-count i { grid-area: 1 / 1; }
.demo-count i:first-child { animation: demo-n1 16s infinite; }
.demo-count i:last-child { opacity: 0; animation: demo-n2 16s infinite; }

.demo-ask { position: absolute; top: calc(12 * var(--u)); right: calc(5 * var(--u)); max-width: calc(74 * var(--u)); margin: 0; padding: calc(2.1 * var(--u)) calc(3.8 * var(--u)); border-radius: calc(4.6 * var(--u)); background: var(--accent); color: var(--on-accent); font-size: calc(3.5 * var(--u)); font-weight: 600; opacity: 0; animation: demo-ask 16s infinite; }
.demo-dot { position: absolute; top: calc(25 * var(--u)); left: calc(6 * var(--u)); width: calc(3.6 * var(--u)); height: calc(3.6 * var(--u)); border-radius: 50%; background: var(--ink); opacity: 0; animation: demo-dot 16s infinite; }

.demo-cards { position: absolute; top: calc(23 * var(--u)); left: calc(5 * var(--u)); right: calc(5 * var(--u)); display: grid; grid-template-columns: repeat(3, 1fr); gap: calc(2.8 * var(--u)); align-items: start; }
.demo-card { position: relative; display: flex; flex-direction: column; min-width: 0; padding: calc(1.8 * var(--u)); border: 1px solid var(--line); border-radius: calc(3.4 * var(--u)); background: var(--card); box-shadow: 0 calc(1 * var(--u)) calc(4 * var(--u)) rgba(14, 22, 51, .10); opacity: 0; }
.demo-card.c1 { order: 2; z-index: 2; animation: demo-hero 16s infinite; }
.demo-card.c2 { order: 1; animation: demo-side-a 16s infinite; }
.demo-card.c3 { order: 3; animation: demo-side-b 16s infinite; }
.demo-card b, .demo-card small { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.demo-card b { margin-top: calc(1.6 * var(--u)); font-size: calc(2.8 * var(--u)); }
.demo-card small { font-size: calc(2.2 * var(--u)); color: var(--muted); }
.demo-card em { margin-top: calc(.6 * var(--u)); font-size: calc(3 * var(--u)); font-style: normal; font-weight: 800; }
.demo-img { display: block; aspect-ratio: 10 / 7; border-radius: calc(2.2 * var(--u)); }
.demo-btn { position: relative; display: grid; place-items: center; min-height: calc(5.4 * var(--u)); margin-top: calc(1.4 * var(--u)); border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: calc(2.3 * var(--u)); font-weight: 700; }
.demo-btn i { grid-area: 1 / 1; white-space: nowrap; }
.c1 .demo-btn { animation: demo-btn 16s infinite; }
.c1 .demo-btn i:first-child { animation: demo-btn-a 16s infinite; }
.c1 .demo-btn i:nth-child(2) { opacity: 0; animation: demo-btn-b 16s infinite; }

.demo-pill { position: absolute; padding: calc(1.1 * var(--u)) calc(2.4 * var(--u)); border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: calc(2.3 * var(--u)); font-weight: 700; white-space: nowrap; box-shadow: 0 calc(.8 * var(--u)) calc(3 * var(--u)) rgba(61, 90, 254, .30); opacity: 0; }
/* Around the picture, never over the name or the price. */
.demo-pill.p1 { top: calc(-3.4 * var(--u)); left: calc(-5 * var(--u)); animation: demo-pill-1 16s infinite; }
.demo-pill.p2 { top: calc(4.6 * var(--u)); right: calc(-12 * var(--u)); animation: demo-pill-2 16s infinite; }
.demo-pill.p3 { top: calc(12.4 * var(--u)); left: calc(-12 * var(--u)); animation: demo-pill-3 16s infinite; }

.demo-input { position: absolute; left: calc(5 * var(--u)); right: calc(5 * var(--u)); bottom: calc(4.4 * var(--u)); display: flex; align-items: center; gap: calc(1.6 * var(--u)); height: calc(9.4 * var(--u)); padding: 0 calc(1.4 * var(--u)) 0 calc(3.8 * var(--u)); border: 1px solid var(--line); border-radius: 999px; background: var(--card); box-shadow: 0 calc(.6 * var(--u)) calc(2.4 * var(--u)) rgba(14, 22, 51, .08); animation: demo-input 16s infinite; }
.demo-typed { flex: 0 1 auto; min-width: 0; max-width: 0; overflow: hidden; white-space: nowrap; border-right: .1em solid var(--accent); font-size: calc(3.3 * var(--u)); animation: demo-type 16s linear infinite, demo-caret 1s step-end infinite; }
.demo-send { position: relative; flex: none; margin-left: auto; width: calc(6.6 * var(--u)); height: calc(6.6 * var(--u)); padding: calc(1.5 * var(--u)); border-radius: 50%; background: var(--accent); color: var(--on-accent); animation: demo-send 16s infinite; }

.demo-sheet { position: absolute; left: 0; right: 0; bottom: 0; height: calc(59 * var(--u)); padding: calc(4.4 * var(--u)) calc(5.5 * var(--u)) 0; border-top: 1px solid var(--line); border-radius: calc(5 * var(--u)) calc(5 * var(--u)) 0 0; background: var(--card); box-shadow: 0 calc(-1 * var(--u)) calc(6 * var(--u)) rgba(14, 22, 51, .12); transform: translateY(105%); animation: demo-sheet 16s infinite; }
.demo-sheet-title { display: block; font-size: calc(4 * var(--u)); font-weight: 800; }
.demo-sheet-sub { display: block; margin-top: calc(.4 * var(--u)); font-size: calc(2.5 * var(--u)); color: var(--muted); }
.demo-line { display: flex; align-items: center; gap: calc(2.4 * var(--u)); margin: calc(2.2 * var(--u)) 0 0; font-size: calc(2.9 * var(--u)); font-weight: 600; }
.demo-line .demo-img { flex: none; width: calc(7 * var(--u)); height: calc(7 * var(--u)); aspect-ratio: auto; border-radius: calc(1.8 * var(--u)); }
.demo-line em, .demo-total em { margin-left: auto; font-style: normal; font-weight: 800; }
.demo-total { display: flex; margin: calc(3 * var(--u)) 0 0; padding-top: calc(2.4 * var(--u)); border-top: 1px solid var(--line); font-size: calc(3.1 * var(--u)); }
.demo-pay, .demo-done { position: absolute; left: calc(5.5 * var(--u)); right: calc(5.5 * var(--u)); bottom: calc(4.4 * var(--u)); height: calc(8.6 * var(--u)); }
.demo-pay { display: grid; place-items: center; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: calc(3.3 * var(--u)); font-weight: 800; animation: demo-pay 16s infinite; }
.demo-done { display: flex; align-items: center; justify-content: center; gap: calc(2.4 * var(--u)); opacity: 0; animation: demo-done 16s infinite; }
.demo-done b, .demo-done small { display: block; }
.demo-done b { font-size: calc(3.3 * var(--u)); font-weight: 800; }
.demo-done small { font-size: calc(2.4 * var(--u)); color: var(--muted); }
.demo-check { position: relative; flex: none; width: calc(7.4 * var(--u)); height: calc(7.4 * var(--u)); border-radius: 50%; background: var(--ok); }
.demo-check::after { content: ""; position: absolute; left: 36%; top: 22%; width: 24%; height: 42%; border: solid #fff; border-width: 0 calc(.9 * var(--u)) calc(.9 * var(--u)) 0; transform: rotate(45deg); }

.demo-tap { position: absolute; left: 50%; top: 50%; width: calc(10 * var(--u)); height: calc(10 * var(--u)); margin: calc(-5 * var(--u)) 0 0 calc(-5 * var(--u)); border: 2px solid rgba(255, 255, 255, .9); border-radius: 50%; background: rgba(14, 22, 51, .22); opacity: 0; pointer-events: none; }
.demo-send .demo-tap { animation: demo-tap-send 16s infinite; }
.demo-btn .demo-tap { animation: demo-tap-add 16s infinite; }
.demo-pay .demo-tap { animation: demo-tap-pay 16s infinite; }

/* Product pictures without photos: patterns that read as the dish. */
.img-baklava { background: repeating-linear-gradient(45deg, rgba(255, 255, 255, .3) 0 calc(.35 * var(--u)), transparent 0 calc(2.6 * var(--u))), repeating-linear-gradient(-45deg, rgba(255, 255, 255, .3) 0 calc(.35 * var(--u)), transparent 0 calc(2.6 * var(--u))), linear-gradient(135deg, #F8CF5B, #D88A06); }
.img-kunefe { background: repeating-radial-gradient(circle at 50% 62%, rgba(255, 255, 255, .22) 0 calc(.4 * var(--u)), transparent 0 calc(1.8 * var(--u))), linear-gradient(135deg, #FFA149, #E2531B); }
.img-sutlac { background: radial-gradient(circle at 50% 48%, #B8692C 0 14%, #EFCB98 15% 36%, #FFF7EA 37% 44%, transparent 45%), linear-gradient(160deg, #FDF1DD, #EBCFA4); }
.img-kupa { background: radial-gradient(ellipse 40% 26% at 50% 30%, rgba(255, 255, 255, .45), transparent), linear-gradient(135deg, #5CCBC9, #2B7A8B); }

.demo-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; width: min(100%, 500px); margin: 14px auto 0; padding: 0; list-style: none; }
.demo-steps li { display: grid; gap: 7px; font-size: .88rem; font-weight: 700; color: var(--muted); text-align: left; }
.demo-bar { display: block; height: 3px; overflow: hidden; border-radius: 3px; background: var(--line); }
.demo-bar i { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; }
.demo-steps .s1 { animation: demo-s1 16s infinite; }
.demo-steps .s2 { animation: demo-s2 16s infinite; }
.demo-steps .s3 { animation: demo-s3 16s infinite; }
.demo-steps .s1 i { animation: demo-b1 16s linear infinite; }
.demo-steps .s2 i { animation: demo-b2 16s linear infinite; }
.demo-steps .s3 i { animation: demo-b3 16s linear infinite; }

/* A phone-sized frame: everything about a third bigger, two cards, the hero
   first. (The short-laptop frame below stays wider than this, on purpose.) */
@container (max-width: 400px) {
  .demo-screen { --u: 1.3cqw; }
  .demo-cards { grid-template-columns: 1fr 1fr; }
  .demo-card.c1 { order: 1; }
  .demo-card.c2 { order: 2; }
  .demo-card.c3 { display: none; }
  .demo-card .demo-img { aspect-ratio: 10 / 6; }
  .demo-pill.p1 { left: calc(4 * var(--u)); }
  .demo-pill.p2 { top: calc(6 * var(--u)); right: calc(-14 * var(--u)); }
  .demo-pill.p3 { top: calc(15 * var(--u)); left: auto; right: calc(-9 * var(--u)); }
}

/* A wide but short screen (a laptop): a smaller frame keeps the question,
   the field and the examples above the fold. */
@media (min-width: 600px) and (max-height: 800px) {
  .demo, .demo-steps { width: min(100%, 440px); }
  .home-title { margin-top: 16px; }
}

/* 1. ask */
@keyframes demo-type {
  0% { max-width: 0; }
  3% { max-width: 0; animation-timing-function: steps(24, end); }
  17% { max-width: 27ch; }
  19.9% { max-width: 27ch; }
  20%, 100% { max-width: 0; }
}
@keyframes demo-caret { 50% { border-right-color: transparent; } }
@keyframes demo-send {
  0%, 3% { opacity: .4; transform: none; }
  5%, 18% { opacity: 1; transform: none; }
  19% { opacity: 1; transform: scale(.85); }
  20.5% { opacity: 1; transform: none; }
  22%, 100% { opacity: .4; transform: none; }
}
@keyframes demo-tap-send { 0%, 18% { opacity: 0; transform: scale(.4); } 19% { opacity: 1; transform: scale(.8); } 21%, 100% { opacity: 0; transform: scale(1.5); } }
@keyframes demo-ask {
  0%, 19.9% { opacity: 0; transform: translateY(calc(52 * var(--u))) scale(.92); }
  20% { opacity: 1; transform: translateY(calc(52 * var(--u))) scale(.92); animation-timing-function: cubic-bezier(.2, .8, .2, 1); }
  24%, 96% { opacity: 1; transform: none; }
  99%, 100% { opacity: 0; transform: none; }
}
@keyframes demo-dot {
  0%, 24% { opacity: 0; transform: scale(.4); }
  25.5% { opacity: 1; transform: none; }
  28% { opacity: 1; transform: scale(.7); }
  30.5% { opacity: 1; transform: none; }
  33% { opacity: 1; transform: scale(.7); }
  34.5%, 100% { opacity: 0; transform: scale(.4); }
}
/* 2. pick */
@keyframes demo-side-a {
  0%, 34% { opacity: 0; transform: translateY(calc(6 * var(--u))); }
  37% { opacity: 1; transform: none; }
  41%, 62% { opacity: .5; transform: none; }
  65%, 100% { opacity: 0; transform: translateY(calc(-3 * var(--u))); }
}
@keyframes demo-hero {
  0%, 35% { opacity: 0; transform: translateY(calc(6 * var(--u))); }
  38% { opacity: 1; transform: none; }
  41%, 62% { opacity: 1; transform: scale(1.05); }
  65%, 100% { opacity: 0; transform: translateY(calc(-3 * var(--u))) scale(1.05); }
}
@keyframes demo-side-b {
  0%, 36% { opacity: 0; transform: translateY(calc(6 * var(--u))); }
  39% { opacity: 1; transform: none; }
  41%, 62% { opacity: .5; transform: none; }
  65%, 100% { opacity: 0; transform: translateY(calc(-3 * var(--u))); }
}
@keyframes demo-pill-1 { 0%, 41% { opacity: 0; transform: scale(.5); } 43% { opacity: 1; transform: scale(1.1); } 44.5%, 59% { opacity: 1; transform: none; } 61%, 100% { opacity: 0; transform: scale(.9); } }
@keyframes demo-pill-2 { 0%, 43% { opacity: 0; transform: scale(.5); } 45% { opacity: 1; transform: scale(1.1); } 46.5%, 59% { opacity: 1; transform: none; } 61%, 100% { opacity: 0; transform: scale(.9); } }
@keyframes demo-pill-3 { 0%, 45% { opacity: 0; transform: scale(.5); } 47% { opacity: 1; transform: scale(1.1); } 48.5%, 59% { opacity: 1; transform: none; } 61%, 100% { opacity: 0; transform: scale(.9); } }
@keyframes demo-tap-add { 0%, 50.5% { opacity: 0; transform: scale(.4); } 51.5% { opacity: 1; transform: scale(.8); } 53.5%, 100% { opacity: 0; transform: scale(1.5); } }
@keyframes demo-btn { 0%, 51% { background: var(--accent); transform: none; } 52% { background: var(--accent); transform: scale(.92); } 53%, 100% { background: var(--ok); transform: none; } }
@keyframes demo-btn-a { 0%, 52.4% { opacity: 1; } 52.6%, 99% { opacity: 0; } 100% { opacity: 1; } }
@keyframes demo-btn-b { 0%, 52.4% { opacity: 0; } 52.6%, 99% { opacity: 1; } 100% { opacity: 0; } }
@keyframes demo-count {
  0%, 52.5% { opacity: 0; transform: scale(.4); }
  54% { opacity: 1; transform: scale(1.35); }
  55.5%, 62.5% { opacity: 1; transform: none; }
  64% { opacity: 1; transform: scale(1.35); }
  65.5%, 97% { opacity: 1; transform: none; }
  99%, 100% { opacity: 0; transform: none; }
}
@keyframes demo-n1 { 0%, 63% { opacity: 1; } 63.2%, 100% { opacity: 0; } }
@keyframes demo-n2 { 0%, 63% { opacity: 0; } 63.2%, 99% { opacity: 1; } 100% { opacity: 0; } }
/* 3. pay */
@keyframes demo-input { 0%, 64% { opacity: 1; transform: none; } 67%, 96% { opacity: 0; transform: translateY(calc(5 * var(--u))); } 99%, 100% { opacity: 1; transform: none; } }
@keyframes demo-sheet {
  0%, 64% { transform: translateY(105%); animation-timing-function: cubic-bezier(.2, .8, .2, 1); }
  69%, 95% { transform: none; animation-timing-function: ease-in; }
  99%, 100% { transform: translateY(105%); }
}
@keyframes demo-pay { 0%, 76.5% { opacity: 1; transform: none; } 77.5% { opacity: 1; transform: scale(.95); } 79% { opacity: 1; transform: none; } 80.5%, 100% { opacity: 0; transform: scale(.9); } }
@keyframes demo-tap-pay { 0%, 76.5% { opacity: 0; transform: scale(.4); } 77.5% { opacity: 1; transform: scale(.8); } 79.5%, 100% { opacity: 0; transform: scale(1.5); } }
@keyframes demo-done { 0%, 80% { opacity: 0; transform: scale(.85); } 82.5% { opacity: 1; transform: scale(1.05); } 84%, 100% { opacity: 1; transform: none; } }
/* the step bars under the frame */
@keyframes demo-b1 { 0% { transform: scaleX(0); } 34%, 98.5% { transform: scaleX(1); } 99.5%, 100% { transform: scaleX(0); } }
@keyframes demo-b2 { 0%, 34% { transform: scaleX(0); } 64.5%, 98.5% { transform: scaleX(1); } 99.5%, 100% { transform: scaleX(0); } }
@keyframes demo-b3 { 0%, 64.5% { transform: scaleX(0); } 97%, 98.5% { transform: scaleX(1); } 99.5%, 100% { transform: scaleX(0); } }
@keyframes demo-s1 { 0%, 34% { color: var(--ink); } 34.5%, 100% { color: var(--muted); } }
@keyframes demo-s2 { 0%, 34% { color: var(--muted); } 34.5%, 64.5% { color: var(--ink); } 65%, 100% { color: var(--muted); } }
@keyframes demo-s3 { 0%, 64.5% { color: var(--muted); } 65%, 98.5% { color: var(--ink); } 99.5%, 100% { color: var(--muted); } }

/* Still picture for prefers-reduced-motion: the products scene. */
@media (prefers-reduced-motion: reduce) {
  .demo *, .demo-steps li, .demo-steps i, .dots i { animation: none !important; }
  .demo-ask, .demo-card, .demo-pill { opacity: 1; transform: none; }
  .demo-card.c2, .demo-card.c3 { opacity: .5; }
  .demo-card.c1 { transform: scale(1.05); }
  .demo-typed { border-right-color: transparent; }
  .demo-dot, .demo-tap, .demo-sheet, .demo-count { display: none; }
  .demo-steps li { color: var(--ink); }
  .demo-bar i { transform: none; }
}
/* Browsers without container query units would draw the scene wrong. */
@supports not (width: 1cqw) {
  .demo, .demo-steps { display: none; }
}
