/* Tably website · "Mango Masala": kadai orange actions, mango highlights, cream background,
   ink text with 2px outlines and hard shadows. Bricolage Grotesque headings, Inter for everything else.
   Mobile-first; each section has one quiet animation, and none at all for people who prefer reduced motion. */

:root {
  --orange: #C2410C; --orange-dark: #9A3412; --mango: #FFC94A; --cream: #FFF7EC; --ink: #1F1A17;
  --paper: #FFFFFF; --soft: #FCEBD7; --line: #F0D9BE; --text2: #4A3F38; --muted: #6B5A4C;
  --ok: #2F6B12; --ok-soft: #EAF6D9; --bad: #B42318;
  --display: 'Bricolage Grotesque', 'Inter', system-ui, sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --shadow: 4px 4px 0 var(--ink);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 16px/1.55 var(--body); }
img, svg { display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -0.03em; line-height: 1.1; margin: 0; }
h1 { font-size: clamp(36px, 9vw, 64px); font-weight: 800; }
h2 { font-size: clamp(26px, 6.5vw, 40px); font-weight: 800; margin-bottom: 20px; }
h3 { font-size: 18px; font-weight: 700; letter-spacing: -0.015em; }
p { margin: 0; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-left)) 0 max(16px, env(safe-area-inset-right)); }
.narrow { max-width: 760px; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--orange-dark); margin-bottom: 10px; }
.small { font-size: 13px; color: var(--muted); }
.note { font-size: 14px; color: var(--text2); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 22px; border-radius: 12px; border: 2px solid var(--ink);
  font: 700 16px/1 var(--body); cursor: pointer; text-decoration: none; box-shadow: 3px 3px 0 var(--ink); transition: transform .08s, box-shadow .08s, background .15s; -webkit-tap-highlight-color: transparent; }
.btn:active { transform: translate(3px, 3px); box-shadow: none; }
.btn:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible { outline: 3px solid var(--mango); outline-offset: 2px; }
.btn-p { background: var(--orange); color: #fff; }
.btn-p:hover { background: var(--orange-dark); }
.btn-s { background: var(--paper); color: var(--ink); }
.btn-s:hover { background: var(--soft); }
.btn-q { background: none; border-color: transparent; box-shadow: none; color: var(--orange-dark); }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 14px; }
.wide { width: 100%; }

/* Header */
.bar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; justify-content: space-between;
  padding: calc(10px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left));
  background: color-mix(in srgb, var(--cream) 92%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 2px solid var(--ink); }
.lockup { display: flex; align-items: center; gap: 8px; text-decoration: none; font: 800 24px/1 var(--display); letter-spacing: -0.04em; }
.bar-links { display: none; gap: 22px; font-weight: 600; font-size: 15px; }
.bar-links a { text-decoration: none; }
.bar-links a:hover { color: var(--orange-dark); }

/* 1 · Hero */
.hero { padding: 40px 0 56px; }
.hero-grid { display: grid; gap: 36px; align-items: center; }
.hero-copy { display: flex; flex-direction: column; gap: 18px; }
.lead { font-size: 18px; color: var(--text2); max-width: 560px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.cta-row .btn { flex: 1 1 150px; }
.hero-art { display: flex; justify-content: center; }
.stand { width: min(280px, 80vw); background: var(--paper); border: 2px solid var(--ink); border-radius: 22px; box-shadow: 6px 6px 0 var(--ink); padding: 20px; text-align: center; transform: rotate(-2deg); }
.stand-name { font: 800 22px/1.1 var(--display); }
.stand-cta { font-size: 14px; color: var(--text2); margin: 6px 0 14px; }
.stand-table { font: 800 26px/1 var(--display); margin-top: 14px; }
.qr { position: relative; width: 168px; height: 168px; margin: 0 auto; padding: 12px; border: 2px solid var(--ink); border-radius: 12px; overflow: hidden; background: #fff; }
.qr svg { width: 100%; height: 100%; }
.scan { position: absolute; left: 6px; right: 6px; top: 10px; height: 3px; border-radius: 3px; background: var(--orange); box-shadow: 0 0 12px 2px rgba(194, 65, 12, .45); animation: scan 3.2s ease-in-out infinite; }
@keyframes scan { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(142px); } }

/* Sections */
.sec { padding: 56px 0; border-top: 2px solid var(--ink); scroll-margin-top: 64px; }
.sec-alt { background: var(--paper); }
.split { display: grid; gap: 32px; align-items: center; }
.list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.list li { position: relative; padding-left: 30px; color: var(--text2); }
.list li::before { content: ''; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border-radius: 6px; background: var(--mango); border: 2px solid var(--ink); }

/* 2 · Steps: tick in one after another when they scroll into view */
.steps { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.steps li { display: flex; gap: 14px; align-items: flex-start; background: var(--paper); border: 2px solid var(--ink); border-radius: 18px; box-shadow: var(--shadow); padding: 16px; }
.steps p { color: var(--text2); margin-top: 4px; font-size: 15px; }
.tick { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font: 800 16px/1 var(--display); background: var(--mango); border: 2px solid var(--ink); }
.steps.reveal li { opacity: 0; transform: translateY(10px); transition: opacity .5s ease, transform .5s ease; }
.steps.reveal.in li { opacity: 1; transform: none; }
.steps.reveal.in li:nth-child(2) { transition-delay: .12s; }
.steps.reveal.in li:nth-child(3) { transition-delay: .24s; }
.steps.reveal.in li:nth-child(4) { transition-delay: .36s; }

/* 3 · Floor: one table chip quietly cycles new order → cooking → paid */
.floor { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tcard { display: flex; flex-direction: column; gap: 8px; background: var(--paper); border: 2px solid var(--ink); border-radius: 16px; box-shadow: var(--shadow); padding: 14px; min-height: 108px; }
.tcard b { font: 800 20px/1 var(--display); }
.tcard em { font-style: normal; font-weight: 700; margin-top: auto; }
.tcard.empty { border-style: dashed; box-shadow: none; background: transparent; }
.tcard.live { box-shadow: 4px 4px 0 var(--orange); }
.chip { align-self: flex-start; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; border: 1.5px solid var(--ink); background: var(--soft); }
.chip.ok { background: var(--ok-soft); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.chip.cycle { position: relative; display: inline-grid; background: var(--orange); color: #fff; animation: chipbg 7.5s steps(1) infinite; }
.chip.cycle i { grid-area: 1 / 1; font-style: normal; opacity: 0; animation: chiptxt 7.5s steps(1) infinite; }
.chip.cycle i:nth-child(2) { animation-delay: 2.5s; }
.chip.cycle i:nth-child(3) { animation-delay: 5s; }
@keyframes chiptxt { 0% { opacity: 1; } 33.34%, 100% { opacity: 0; } }
@keyframes chipbg { 0% { background: var(--orange); color: #fff; } 33.34% { background: #FFF1CC; color: #9A5B00; } 66.67% { background: var(--ok-soft); color: var(--ok); } }

/* 4 · Loyalty card: stamps fill in once */
.stamps { background: var(--paper); border: 2px dashed var(--orange); border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 14px; max-width: 420px; }
.stamps-head { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; letter-spacing: .04em; }
.stamp-row { display: flex; gap: 10px; }
.st { flex: 1; aspect-ratio: 1; border-radius: 50%; border: 2px dashed var(--line); display: grid; place-items: center; font-size: 22px; }
.st.gift { border: 2px solid var(--orange); }
.stamps.reveal .st:not(.gift) { transition: background .35s ease, border-color .35s ease, transform .35s ease; }
.stamps.reveal.in .st:not(.gift) { background: var(--orange); border: 2px solid var(--ink); transform: scale(1.02); }
.stamps.reveal.in .st:nth-child(2) { transition-delay: .15s; }
.stamps.reveal.in .st:nth-child(3) { transition-delay: .3s; }
.stamps.reveal.in .st:nth-child(4) { transition-delay: .45s; }
.stamps-foot { font-size: 15px; color: var(--text2); }

/* 5 · Pricing: cards rise into place */
.prices { display: grid; gap: 16px; }
.price { background: var(--cream); border: 2px solid var(--ink); border-radius: 18px; box-shadow: var(--shadow); padding: 20px; display: flex; flex-direction: column; gap: 6px; }
.price.hot { background: var(--mango); }
.amt { font: 800 30px/1.1 var(--display); letter-spacing: -0.03em; margin-top: 6px; }
.amt small { font: 600 14px/1 var(--body); letter-spacing: 0; color: var(--text2); }
.mo { font-weight: 700; }
.prices.reveal .price { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease; }
.prices.reveal.in .price { opacity: 1; transform: none; }
.prices.reveal.in .price:nth-child(2) { transition-delay: .1s; }
.prices.reveal.in .price:nth-child(3) { transition-delay: .2s; }
.pilot { margin-top: 20px; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; background: var(--cream); border: 2px dashed var(--ink); border-radius: 18px; padding: 18px; }
.pilot p { color: var(--text2); }

/* 6 · FAQ: answers slide open */
.faq { display: flex; flex-direction: column; gap: 10px; }
.faq details { background: var(--paper); border: 2px solid var(--ink); border-radius: 14px; box-shadow: 3px 3px 0 var(--ink); }
.faq summary { cursor: pointer; list-style: none; padding: 16px 48px 16px 16px; font-weight: 700; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font: 800 22px/1 var(--display); transition: transform .2s ease; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { padding: 0 16px 16px; color: var(--text2); }
.faq details[open] p { animation: open .3s ease both; }
@keyframes open { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.final { margin-top: 48px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.final h2 { margin: 0; }
.final p { color: var(--text2); }

/* Footer */
.foot { border-top: 2px solid var(--ink); background: var(--paper); padding: 28px 0 calc(28px + env(safe-area-inset-bottom)); }
.foot-row { display: flex; flex-direction: column; gap: 14px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 18px; font-weight: 600; font-size: 15px; }

/* Lead dialog */
dialog { border: 2px solid var(--ink); border-radius: 22px; box-shadow: 6px 6px 0 var(--ink); padding: 0; width: min(440px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); background: var(--cream); color: var(--ink); }
dialog::backdrop { background: rgba(31, 26, 23, .55); }
dialog[open] { animation: pop .22s ease-out both; }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
#leadForm { position: relative; padding: 24px 20px calc(20px + env(safe-area-inset-bottom)); }
.step { display: flex; flex-direction: column; gap: 14px; }
.step h2 { font-size: 26px; margin: 0 28px 4px 0; }
.x { position: absolute; right: 10px; top: 10px; width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--ink); background: var(--paper); font: 700 22px/1 var(--body); cursor: pointer; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; color: var(--text2); }
input[type=text], input[type=email], input:not([type]), .phone input { width: 100%; font: 400 16px/1.2 var(--body); color: var(--ink); background: var(--paper); border: 2px solid var(--ink); border-radius: 12px; padding: 13px 14px; }
.phone { display: flex; align-items: stretch; }
.phone span { display: grid; place-items: center; padding: 0 12px; border: 2px solid var(--ink); border-right: none; border-radius: 12px 0 0 12px; background: var(--soft); font-weight: 700; color: var(--ink); }
.phone input { border-radius: 0 12px 12px 0; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--orange); flex: none; }
.err { color: var(--bad); font-size: 14px; font-weight: 600; min-height: 0; }
.err:empty { display: none; }
.roles { display: flex; flex-direction: column; gap: 10px; }
.role { display: flex; gap: 12px; align-items: center; background: var(--paper); border: 2px solid var(--ink); border-radius: 14px; padding: 14px; cursor: pointer; }
.role input { width: 22px; height: 22px; accent-color: var(--orange); flex: none; margin: 0; }
.role span { display: flex; flex-direction: column; gap: 2px; }
.role small { color: var(--muted); font-size: 13px; }
.role:has(input:checked) { background: var(--mango); box-shadow: 3px 3px 0 var(--ink); }

/* Bigger screens */
@media (min-width: 760px) {
  .bar-links { display: flex; }
  .hero { padding: 72px 0 88px; }
  .hero-grid { grid-template-columns: 1.15fr .85fr; }
  .cta-row .btn { flex: 0 0 auto; }
  .sec { padding: 88px 0; }
  .split { grid-template-columns: 1fr 1fr; gap: 56px; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prices { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pilot { flex-direction: row; align-items: center; justify-content: space-between; }
  .foot-row { flex-direction: row; align-items: center; justify-content: space-between; }
}

/* No movement for people who ask for less */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .steps.reveal li, .prices.reveal .price { opacity: 1; transform: none; }
  .scan { display: none; }
  .chip.cycle { background: var(--orange); color: #fff; }
  .chip.cycle i:first-child { opacity: 1; }
}
