/* ------------------------------------------------------------------
   AR Table Menu — guest app
   Pure black ground, no borders anywhere: separation comes from raised
   surfaces and space, never from a line. Every colour, radius and font
   below is a token that menu.json can override.
   ------------------------------------------------------------------ */

@font-face{font-family:'Fraunces';font-style:normal;font-weight:300 700;font-display:swap;
  src:url(assets/fraunces.woff2) format('woff2')}
@font-face{font-family:'Inter';font-style:normal;font-weight:300 700;font-display:swap;
  src:url(assets/inter.woff2) format('woff2')}

:root{
  --bg:#000000;
  --surface:#121110;
  --surface2:#1c1a17;
  --ink:#f4efe7;
  --muted:#8d857b;
  --accent:#c8a45c;
  --accentInk:#12100a;
  --veg:#6a9a63;
  --nonveg:#c2564a;
  --radius:18px;
  --font:'Inter',ui-sans-serif,-apple-system,'Segoe UI',system-ui,sans-serif;
  --display:'Fraunces',ui-serif,Georgia,'Times New Roman',serif;

  --gut:22px;
  --bar-h:calc(72px + env(safe-area-inset-bottom));
}

*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;padding:0;background:var(--bg)}
body{
  color:var(--ink);
  font-family:var(--font);
  font-size:15px;
  line-height:1.5;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
button{font:inherit;color:inherit;background:none;border:0;padding:0;cursor:pointer}
img{max-width:100%;display:block}

/* On a laptop the demo sits in a phone-width column so it reads the way a
   guest will actually see it. */
.stage{max-width:460px;margin:0 auto;position:relative;min-height:100vh;background:var(--bg)}
@media (min-width:900px){
  .stage{margin:28px auto;min-height:calc(100vh - 56px);border-radius:34px;overflow:hidden}
}

.app{padding:0 var(--gut) calc(var(--bar-h) + 28px)}

/* ---------------- header ---------------- */
.top{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;
  padding:calc(26px + env(safe-area-inset-top)) 0 8px}
.brand b{display:block;font-family:var(--display);font-weight:600;font-size:27px;
  letter-spacing:-.015em;line-height:1.05}
.brand span{display:block;margin-top:7px;font-size:10px;letter-spacing:.22em;
  text-transform:uppercase;color:var(--muted)}
.table-pill{display:flex;align-items:center;gap:7px;background:var(--surface);
  border-radius:999px;padding:8px 14px;font-size:12px;color:var(--muted);white-space:nowrap}
.table-pill b{color:var(--ink);font-weight:600}

.eyebrow{font-size:10px;letter-spacing:.22em;text-transform:uppercase;color:var(--muted);
  margin:24px 0 14px}
.eyebrow.tight{margin-top:14px}

.back{display:inline-flex;align-items:center;gap:8px;color:var(--muted);font-size:13px;
  padding:18px 0 2px}
.back:active{color:var(--ink)}

/* ---------------- category grid ---------------- */
/* Photo fills the card with the label over a gradient. Title and blurb are each
   clamped to one line, so every card's text sits on the same baseline no matter
   how long the words are. */
.cat-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.cat{position:relative;aspect-ratio:1/1.16;border-radius:var(--radius);overflow:hidden;
  background:var(--surface);text-align:left;
  display:flex;flex-direction:column;justify-content:flex-end;transition:transform .18s ease}
.cat:active{transform:scale(.985)}
.cat-media{position:absolute;inset:0;display:block}
.cat-media::before{content:'';position:absolute;inset:0;z-index:1;
  background:radial-gradient(90% 70% at 50% 8%,color-mix(in srgb,var(--tint) 24%,transparent),transparent 70%)}
.cat-media::after{content:'';position:absolute;inset:0;z-index:1;
  background:linear-gradient(180deg,rgba(0,0,0,.12) 0%,rgba(0,0,0,.34) 40%,rgba(0,0,0,.88) 72%,rgba(0,0,0,1) 100%)}
.cat-photo{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;
  object-position:50% 42%;opacity:.92}
.cat-text{position:relative;z-index:2;display:block;padding:16px}
.cat h3{margin:0;font-family:var(--display);font-weight:600;font-size:17px;
  letter-spacing:-.01em;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cat p{margin:4px 0 0;font-size:11px;color:var(--muted);line-height:1.35;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cat .count{position:absolute;top:12px;right:12px;z-index:2;font-size:11px;color:var(--ink);
  background:rgba(0,0,0,.5);backdrop-filter:blur(8px);
  border-radius:999px;min-width:24px;height:24px;display:grid;place-items:center;padding:0 7px}

/* ---------------- diet filter ----------------
   Six filters on one line: the row scrolls sideways and fades at the right
   edge so it is obvious there is more than fits. */
.seg{display:flex;gap:8px;margin:2px calc(var(--gut) * -1) 22px 0;
  padding:2px calc(var(--gut) + 6px) 2px 0;
  overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch;
  scroll-snap-type:x proximity;
  -webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 46px),transparent 100%);
  mask-image:linear-gradient(90deg,#000 calc(100% - 46px),transparent 100%)}
.seg::-webkit-scrollbar{display:none}
.seg button{flex:0 0 auto;background:var(--surface);border-radius:999px;padding:10px 15px;
  font-size:13px;color:var(--muted);display:inline-flex;align-items:center;gap:7px;
  white-space:nowrap;scroll-snap-align:center;transition:.16s}
.seg button[aria-pressed="true"]{background:var(--surface2);color:var(--ink)}

.dot{width:13px;height:13px;border:1.4px solid currentColor;border-radius:3px;
  display:inline-grid;place-items:center;flex:none}
.dot i{width:6px;height:6px;border-radius:50%;background:currentColor;display:block}
.dot.veg{color:var(--veg)}
.dot.nonveg{color:var(--nonveg)}
.dot.egg{color:#cfa257}

/* ---------------- item rows ---------------- */
.list{display:flex;flex-direction:column;gap:10px}
.item{display:flex;flex-direction:column;text-align:left;width:100%;
  background:var(--surface);border-radius:var(--radius);padding:16px;
  transition:transform .18s ease}
.item:active{transform:scale(.99)}
.item-top{display:flex;gap:14px;align-items:flex-start;width:100%}
.item-main{flex:1;min-width:0}
.item-head{display:flex;align-items:center;gap:9px}
.item-head h4{margin:0;font-family:var(--display);font-weight:600;font-size:19px;
  letter-spacing:-.01em;line-height:1.25}
.desc{margin:8px 0 0;color:var(--muted);font-size:13.5px;line-height:1.55}
.price{margin-top:12px;font-size:15px;font-weight:500;letter-spacing:.01em}
.meta{display:flex;flex-wrap:wrap;gap:6px;margin-top:14px;width:100%}
.meta:empty{display:none}
.chip{background:var(--surface2);border-radius:999px;padding:5px 11px;font-size:11px;
  color:var(--muted);display:inline-flex;align-items:center;gap:6px;white-space:nowrap}
.chip.tag{background:color-mix(in srgb,var(--accent) 16%,transparent);
  color:color-mix(in srgb,var(--accent) 88%,white)}
.chip.diet-flag{background:color-mix(in srgb,var(--veg) 18%,transparent);
  color:color-mix(in srgb,var(--veg) 72%,white)}

.thumb{position:relative;width:94px;height:94px;flex:none;border-radius:14px;
  overflow:hidden;background:var(--surface2)}
.thumb img{width:100%;height:100%;object-fit:cover;object-position:50% 48%;scale:1.14}
.thumb .ph{display:grid;place-items:center;height:100%;font-family:var(--display);
  font-size:26px;color:#39322b}
.ar-badge{position:absolute;left:6px;bottom:6px;background:var(--accent);color:var(--accentInk);
  font-size:9px;font-weight:600;letter-spacing:.1em;padding:4px 6px;border-radius:6px;
  display:inline-flex;align-items:center;gap:3px;line-height:1}
.ar-badge svg{width:9px;height:9px}

.empty{color:var(--muted);font-size:13.5px;line-height:1.6;padding:26px 18px;
  background:var(--surface);border-radius:var(--radius)}

/* ---------------- sheet ---------------- */
/* Above .bar (z-index 50): the page's cart bar is fixed at the root, so with the
   sheet below it the "Review order" bar painted over the sheet's own Add bar. */
.sheet{position:fixed;inset:0;z-index:60;pointer-events:none}
.stage .sheet{max-width:460px;margin:0 auto}
@media (min-width:900px){.sheet{inset:28px 0}}
.sheet .scrim{position:absolute;inset:0;background:rgba(0,0,0,.72);opacity:0;
  transition:opacity .26s ease;backdrop-filter:blur(2px)}
.sheet-body{position:absolute;left:0;right:0;bottom:0;max-height:96%;overflow-y:auto;
  -webkit-overflow-scrolling:touch;background:var(--bg);
  border-radius:26px 26px 0 0;
  transform:translateY(102%);transition:transform .32s cubic-bezier(.22,.9,.3,1);
  padding-bottom:calc(var(--bar-h) + 20px)}
.sheet.open{pointer-events:auto}
.sheet.open .scrim{opacity:1}
.sheet.open .sheet-body{transform:none}
.grabber{width:38px;height:4px;border-radius:99px;background:#2e2823;margin:10px auto 0}

.viewer{position:relative;margin:6px 0 0;height:340px;
  background:radial-gradient(70% 55% at 50% 42%,#171412 0%,var(--bg) 78%)}
model-viewer{width:100%;height:100%;--poster-color:transparent;background:transparent}
model-viewer::part(default-ar-button){display:none}
.viewer-photo{width:100%;height:100%;object-fit:cover;object-position:50% 50%}
.viewer-fallback{height:100%;display:grid;place-items:center;color:#39322b;
  font-family:var(--display);font-size:15px}
/* Introduces itself as a pill, then collapses to a 40px circle so it stops
   sitting on the food. One property does the work — `width`, from the measured
   pill width (pinned by armPill) to 40px — with padding and gap riding the same
   curve so the collapsed shape is an exact 40x40 circle. */
/* right edge lines up with the sheet's text gutter, not the image edge */
.ar-cta{position:absolute;top:18px;right:var(--gut);
  display:inline-flex;align-items:center;justify-content:center;gap:9px;
  height:46px;min-width:46px;padding:0 17px;border-radius:999px;overflow:hidden;
  background:var(--accent);color:var(--accentInk);
  font-weight:600;font-size:13.5px;white-space:nowrap;
  /* resting shadow — also where the halo lands when it stops */
  box-shadow:0 6px 20px rgba(0,0,0,.5),
    0 0 16px color-mix(in srgb,var(--accent) 28%,transparent);
  /* three pulses, then it settles: enough to catch the eye once the pill has
     shrunk to an icon, not enough to nag for the rest of the meal */
  animation:cta-glow 2.6s ease-out 3;
  transition:width .42s cubic-bezier(.22,.9,.28,1),padding .42s cubic-bezier(.22,.9,.28,1),
    gap .42s cubic-bezier(.22,.9,.28,1),transform .14s ease}
@keyframes cta-glow{
  0%   {box-shadow:0 6px 20px rgba(0,0,0,.5),
        0 0 0 0 color-mix(in srgb,var(--accent) 50%,transparent),
        0 0 16px color-mix(in srgb,var(--accent) 28%,transparent)}
  70%  {box-shadow:0 6px 20px rgba(0,0,0,.5),
        0 0 0 13px color-mix(in srgb,var(--accent) 0%,transparent),
        0 0 22px color-mix(in srgb,var(--accent) 34%,transparent)}
  100% {box-shadow:0 6px 20px rgba(0,0,0,.5),
        0 0 0 0 color-mix(in srgb,var(--accent) 0%,transparent),
        0 0 16px color-mix(in srgb,var(--accent) 28%,transparent)}
}
.ar-cta:active{transform:scale(.96)}
.ar-cta .ar-cta-ico{display:grid;place-items:center;flex:none}
.ar-cta svg{width:19px;height:19px;display:block}
/* The label's own width is animated to 0 alongside the button (both pinned in JS,
   same curve). Letting flexbox squeeze it instead leaves it 21px wide at the end,
   which pushes the icon off-centre — or, without min-width:0, straight out of the
   box and under the overflow clip: a circle with nothing in it. */
.ar-cta .ar-cta-label{display:block;min-width:0;overflow:hidden;
  transition:width .42s cubic-bezier(.22,.9,.28,1),opacity .2s ease .08s}
.ar-cta.mini{padding:0;gap:0}
.ar-cta.mini .ar-cta-label{opacity:0;transition:opacity .14s ease}
@media (prefers-reduced-motion:reduce){
  .ar-cta,.ar-cta .ar-cta-label{transition:none}
  .ar-cta{animation:none;box-shadow:0 6px 20px rgba(0,0,0,.5),
    0 0 18px color-mix(in srgb,var(--accent) 30%,transparent)}
}
.ar-note{text-align:center;color:var(--muted);font-size:11.5px;letter-spacing:.04em;
  margin:14px 0 0;padding:0 var(--gut);line-height:1.45;transition:color .2s ease}
.ar-note.flash{color:var(--accent)}

.sheet h2{margin:22px var(--gut) 0;font-family:var(--display);font-weight:600;font-size:27px;
  letter-spacing:-.02em;line-height:1.15}
.sheet .head-row{display:flex;align-items:center;gap:10px;margin:22px var(--gut) 0}
.sheet .head-row h2{margin:0}
.desc-full{margin:12px var(--gut) 0;color:var(--muted);font-size:14px;line-height:1.65}

/* the hairlines between spec cells are the black ground showing through the
   grid gap — not borders */
.specs{display:grid;grid-template-columns:1fr 1fr;gap:2px;margin:24px var(--gut) 0;
  border-radius:var(--radius);overflow:hidden}
.spec{padding:16px;background:var(--surface)}
.spec dt{font-size:9.5px;letter-spacing:.18em;text-transform:uppercase;color:var(--muted)}
.spec dd{margin:7px 0 0;font-size:14.5px;font-weight:500;display:flex;align-items:center;gap:8px}

.spice{display:inline-flex;gap:3px}
.spice span{width:4px;height:11px;border-radius:2px;background:#332d28}
.spice span.on{background:var(--nonveg)}

/* ---------------- bottom bar ---------------- */
.bar{position:fixed;left:0;right:0;bottom:0;z-index:50;max-width:460px;margin:0 auto;
  background:linear-gradient(180deg,rgba(0,0,0,0),rgba(0,0,0,.92) 32%,var(--bg) 64%);
  padding:20px var(--gut) calc(16px + env(safe-area-inset-bottom))}
.sheet .bar{position:absolute}
@media (min-width:900px){.bar{bottom:28px}.sheet .bar{bottom:0}}
.bar-inner{display:flex;gap:10px;align-items:center}
.btn{flex:1;background:var(--accent);color:var(--accentInk);font-weight:600;font-size:15px;
  padding:16px 18px;border-radius:999px;text-align:center;letter-spacing:.005em;
  transition:transform .14s ease,opacity .14s}
.btn:active{transform:scale(.985)}
.btn[disabled]{opacity:.6}
.btn.ghost{background:var(--surface);color:var(--ink)}
.qty{display:flex;align-items:center;gap:2px;background:var(--surface);border-radius:999px;
  padding:4px}
.qty button{width:38px;height:38px;border-radius:50%;font-size:17px;color:var(--muted)}
.qty button:active{background:var(--surface2);color:var(--ink)}
.qty b{min-width:22px;text-align:center;font-weight:600;font-size:15px}

/* ---------------- cart / confirmation ---------------- */
.cart-row{display:flex;justify-content:space-between;gap:16px;padding:16px 18px;
  background:var(--surface);border-radius:var(--radius);margin-bottom:8px;font-size:14.5px}
.cart-row small{display:block;color:var(--muted);font-size:12px;margin-top:5px}
.cart-row a{color:var(--muted)}
.totals{margin-top:18px;padding:16px 18px;background:var(--surface);border-radius:var(--radius);
  font-size:14px}
.totals div{display:flex;justify-content:space-between;padding:6px 0;color:var(--muted)}
.totals .grand{margin-top:8px;padding-top:12px;color:var(--ink);font-size:17px;font-weight:600}
textarea{width:100%;margin-top:14px;background:var(--surface);color:var(--ink);
  border:0;border-radius:var(--radius);padding:16px;font:inherit;font-size:14px;
  min-height:88px;resize:none}
textarea:focus{outline:none;background:var(--surface2)}
textarea::placeholder{color:#5a534b}
.note-card{margin-top:14px;border-radius:var(--radius);padding:16px 18px;
  color:var(--muted);font-size:12.5px;line-height:1.6;background:var(--surface)}
.note-card b{color:var(--ink);font-weight:500}

.done{text-align:center;padding:52px 6px 10px}
.tick{width:58px;height:58px;margin:0 auto 22px;border-radius:50%;
  background:color-mix(in srgb,var(--accent) 15%,transparent);
  color:var(--accent);display:grid;place-items:center;font-size:22px}
.done h2{margin:0;font-family:var(--display);font-weight:600;font-size:26px;letter-spacing:-.015em}
.done p{margin:12px auto 0;max-width:280px;color:var(--muted);font-size:13.5px;line-height:1.6}
.pay-actions{display:flex;flex-direction:column;gap:10px;margin-top:24px}
.pay-actions a{text-decoration:none;display:block}

/* ---------------- kitchen board ---------------- */
.k-wrap{max-width:560px;margin:0 auto;padding:0 var(--gut) 40px}
.k-tools{display:flex;align-items:center;gap:8px}
.k-toggle{background:var(--surface);border-radius:999px;padding:8px 14px;font-size:12px;
  color:var(--muted)}
.k-toggle[aria-pressed="true"]{background:color-mix(in srgb,var(--accent) 20%,var(--surface));
  color:color-mix(in srgb,var(--accent) 90%,white)}

.k-stations{display:flex;gap:8px;margin:16px 0 4px}
.k-station{background:var(--surface);border-radius:999px;padding:8px 15px;font-size:12.5px;
  color:var(--muted);text-decoration:none}
.k-station.on{background:var(--surface2);color:var(--ink)}

.order{border-radius:var(--radius);padding:18px;margin-bottom:12px;background:var(--surface);
  transition:background .3s ease}
.order.new{background:color-mix(in srgb,var(--accent) 11%,var(--surface))}
/* a ticket's age is the only number a kitchen really runs on */
.order.warn{background:color-mix(in srgb,#c8922e 14%,var(--surface))}
.order.late{background:color-mix(in srgb,var(--nonveg) 16%,var(--surface))}
.order.done{background:var(--surface);opacity:.5}
.order-top{display:flex;justify-content:space-between;align-items:baseline;gap:12px}
.order-top h3{margin:0;font-family:var(--display);font-weight:600;font-size:20px}
.age{font-size:15px;font-weight:600;font-variant-numeric:tabular-nums;color:var(--muted);
  letter-spacing:.02em;white-space:nowrap}
.age.warn{color:#e0a94a}
.age.late{color:var(--nonveg)}
.order-sub{margin-top:6px;font-size:10.5px;color:var(--muted);letter-spacing:.1em;
  text-transform:uppercase}
.order ul{list-style:none;margin:14px 0 0;padding:0}
.order li{display:flex;gap:10px;padding:4px 0;font-size:14.5px}
.order li b{color:var(--accent);font-weight:600;min-width:26px}
.k-elsewhere{margin-top:10px;font-size:11.5px;color:var(--muted);letter-spacing:.04em}
.order .k-note{margin-top:12px;color:color-mix(in srgb,var(--accent) 85%,white);font-size:13px;
  font-style:italic}
.order .actions{display:flex;gap:8px;margin-top:16px}
.order .actions button{flex:1;padding:12px;border-radius:999px;font-size:13.5px;font-weight:500;
  background:var(--surface2);color:var(--muted)}
.order .actions button.primary{background:var(--accent);color:var(--accentInk);font-weight:600}
.order .actions button.undo{flex:0 0 auto;padding:12px 16px;font-size:12.5px}
