/* Meghboroni guest feedback — built on the Modernist design tokens. */
:root {
  --color-bg: #f3f2f2;
  --color-surface: #eae9e9;
  --color-text: #201e1d;
  --color-accent: #ec3013;
  --color-divider: color-mix(in srgb, #201e1d 40%, transparent);

  --color-neutral-200: #eae7e7;
  --color-neutral-300: #d7d3d3;
  --color-neutral-500: #9b9797;
  --color-neutral-600: #7d7979;
  --color-neutral-700: #605d5d;
  --color-neutral-800: #444141;

  --color-accent-100: #fff2ef;
  --color-accent-400: #ff9783;
  --color-accent-600: #dd2b0f;
  --color-accent-700: #ae1800;
  --color-accent-800: #7c1405;

  --navy: #141838;
  --gold: #e2b45c;
  --gold-hover: #ecc576;

  --shadow-lg: 0 12px 32px color-mix(in srgb, #2d2b2b 22%, transparent);
  --font: Archivo, 'Noto Sans Bengali', system-ui, sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--color-surface); color: var(--color-text);
  font-family: var(--font); font-size: 15px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
button, textarea { font-family: inherit; }
button { -webkit-appearance: none; appearance: none; }
h1, h2 { margin: 0; font-weight: 800; }
p { margin: 0; }
img { display: block; max-width: 100%; }
a { color: var(--color-accent); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--color-accent) 30%, transparent); }

@keyframes mbUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes mbDraw { to { stroke-dashoffset: 0; } }
@keyframes mbBox { from { transform: scale(.4) rotate(-12deg); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
}

/* ── shell ─────────────────────────────────────────── */
.app {
  position: relative; width: 100%; max-width: 480px; margin: 0 auto;
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; background: var(--color-bg);
}
.app.is-thanks { background: var(--navy); }
@media (min-width: 520px) { .app { box-shadow: var(--shadow-lg); } }

.main { flex: 1; display: flex; flex-direction: column; }
.screen { animation: mbUp .45s ease both; }
.no-anim .screen, .no-anim .thanks * { animation: none !important; }
.no-anim .check path { stroke-dashoffset: 0; }
.screen.pad { padding: 26px 24px 24px; }

/* ── header ────────────────────────────────────────── */
.header {
  position: sticky; top: 0; z-index: 5; background: var(--color-bg);
  padding-top: calc(10px + var(--safe-top));
}
.header-row { display: flex; align-items: center; gap: 12px; padding: 6px 20px 12px; }
.icon-btn {
  width: 36px; height: 36px; flex: none; border: 1px solid var(--color-divider);
  background: transparent; display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--color-text); padding: 0;
}
.icon-btn:hover { background: var(--color-neutral-200); }
.brand-wrap { flex: 1; min-width: 0; }
.brand { font-size: 15px; font-weight: 800; letter-spacing: -.01em; line-height: 1.1; }
.step-label { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--color-neutral-700); }
.progress { display: flex; gap: 2px; padding: 0 20px; }
.progress span { flex: 1; height: 4px; background: var(--color-neutral-300); transition: background .3s; }
.progress span.on { background: var(--color-accent); }

/* language switch */
.lang { display: flex; border: 1px solid var(--color-divider); }
.lang button {
  border: 0; padding: 7px 9px; font-size: 12px; font-weight: 800; cursor: pointer;
  background: transparent; color: var(--color-text); line-height: 1.2;
}
.lang button[aria-pressed="true"] { background: var(--color-text); color: var(--color-bg); }
.lang.dark {
  position: absolute; top: calc(12px + var(--safe-top)); right: 14px;
  background: rgba(26,18,12,.55); border-color: rgba(255,255,255,.35);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.lang.dark button { padding: 6px 10px; color: #fff; }
.lang.dark button[aria-pressed="true"] { background: rgba(255,255,255,.92); color: #1a120c; }

/* ── type ──────────────────────────────────────────── */
.h2 { font-size: 30px; line-height: 1.08; letter-spacing: -.02em; text-wrap: balance; }
.lede { margin-top: 10px; font-size: 15px; line-height: 1.5; color: var(--color-neutral-800); text-wrap: pretty; }
.kicker { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--color-accent-700); }
.muted-sm { font-size: 11px; font-weight: 600; color: var(--color-neutral-700); }
.rule { border-top: 2px solid var(--color-divider); }

/* ── welcome ───────────────────────────────────────── */
.hero { position: relative; }
.hero img { width: 100%; height: 236px; object-fit: cover; object-position: 50% 52%; }
.welcome-head { padding: 20px 24px 8px; }
.welcome-head h1 { font-size: 28px; line-height: 1.06; letter-spacing: -.025em; text-wrap: balance; }
.welcome-head p { margin-top: 12px; font-size: 15px; line-height: 1.5; color: var(--color-neutral-800); text-wrap: pretty; }
.welcome-rule { margin: 14px 24px 0; height: 2px; background: var(--color-divider); }
.welcome-rows { padding: 18px 24px 20px; display: flex; flex-direction: column; gap: 22px; }
.no-signup { font-size: 12px; font-weight: 600; color: var(--color-neutral-700); }

/* rating row */
.rate { display: flex; flex-direction: column; gap: 10px; border: 0; margin: 0; padding: 0; min-width: 0; }
.rate-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.rate-q { font-size: 15px; font-weight: 600; line-height: 1.3; padding: 0; }
.rate-word { font-size: 13px; font-weight: 800; white-space: nowrap; color: var(--color-neutral-600); }
.rate-word.good { color: var(--color-text); }
.rate-word.bad { color: var(--color-accent-700); }
.scale { display: grid; grid-template-columns: repeat(5, 1fr); border: 2px solid var(--color-text); }
.cell {
  position: relative; height: 50px; border: 0; border-left: 2px solid var(--color-text); padding: 0;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  background: transparent; transition: background .18s;
}
.cell:first-child { border-left: 0; }
.cell-num { position: absolute; top: 4px; left: 6px; font-size: 10px; font-weight: 800; line-height: 1.2; color: var(--color-neutral-600); }
.cell-emo {
  font-size: 26px; line-height: 1;
  transition: transform .22s cubic-bezier(.3,1.7,.5,1), filter .2s, opacity .2s;
}
.scale.has-value .cell-emo { filter: grayscale(1); opacity: .45; }
.cell[aria-checked="true"] { background: var(--color-accent-100); }
.cell[aria-checked="true"] .cell-num { color: var(--color-accent-700); }
.cell[aria-checked="true"] .cell-emo { filter: none; opacity: 1; transform: scale(1.18); }
.cell.pop .cell-emo { transform: scale(1.4); }

/* ── dishes & tags ─────────────────────────────────── */
.ordered-head { margin-top: 22px; padding-top: 14px; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.dishes {
  margin-top: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 2px;
  background: var(--color-text); border: 2px solid var(--color-text);
}
.dish {
  position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 6px;
  padding: 10px 10px 12px; border: 0; text-align: left; cursor: pointer;
  background: var(--color-bg); transition: background .15s; color: var(--color-text);
}
.dish:hover { background: var(--color-neutral-200); }
.dish-box {
  position: absolute; top: 8px; right: 8px; z-index: 1; width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--color-neutral-500); background: transparent;
}
.dish-box svg { opacity: 0; }
.dish-img {
  width: 100%; height: 96px; background-size: contain; background-repeat: no-repeat; background-position: center;
  transition: transform .25s cubic-bezier(.3,1.5,.5,1);
}
.dish-name { font-size: 13.5px; font-weight: 800; line-height: 1.2; }
.dish[aria-pressed="true"] { background: var(--color-accent-100); color: var(--color-accent-800); }
.dish[aria-pressed="true"] .dish-box { background: var(--color-accent); border-color: var(--color-accent); }
.dish[aria-pressed="true"] .dish-box svg { opacity: 1; }
.dish[aria-pressed="true"] .dish-img { transform: scale(1.06); }

.also { margin-top: 14px; font-size: 12px; font-weight: 700; color: var(--color-neutral-700); }
.chips { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font-size: 13.5px; font-weight: 600; padding: 9px 12px; cursor: pointer; line-height: 1.3;
  background: transparent; color: var(--color-text); border: 1px solid var(--color-divider);
  transition: background .15s, color .15s;
}
.chip.sm { font-size: 13px; padding: 8px 11px; }
.chip[aria-pressed="true"] { background: var(--color-text); border-color: var(--color-text); color: #fff; }
.chip.neg[aria-pressed="true"] { background: var(--color-accent); border-color: var(--color-accent); }

.group { margin-top: 24px; padding-top: 14px; }
.group-row { margin-top: 12px; }
.group-sub { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--color-neutral-700); }
.sign {
  width: 16px; height: 16px; display: flex; align-items: center; justify-content: center;
  background: var(--color-text); color: #fff; font-size: 13px; font-weight: 800; line-height: 1;
}
.sign.neg { background: var(--color-accent-700); }

.comment { margin-top: 22px; padding-top: 14px; }
.comment label { display: flex; justify-content: space-between; gap: 8px; font-size: 15px; font-weight: 800; }
.comment label span { font-size: 11px; font-weight: 600; color: var(--color-neutral-700); letter-spacing: .04em; }
.textarea {
  margin-top: 10px; width: 100%; resize: none; border: 1px solid var(--color-divider); border-radius: 0;
  padding: 12px; font-size: 16px; line-height: 1.5; color: var(--color-text);
  background: var(--color-surface); caret-color: var(--color-accent);
}
.textarea:focus { outline: none; border-color: var(--color-accent); }
.textarea.on-surface { margin-top: 12px; background: var(--color-bg); }

/* ── review ────────────────────────────────────────── */
.summary {
  margin-top: 20px; display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 2px solid var(--color-text); border-bottom: 2px solid var(--color-text);
}
.summary > div { padding: 12px 10px 12px 12px; border-left: 2px solid var(--color-divider); }
.summary > div:first-child { border-left: 0; }
.summary-k { font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--color-neutral-700); }
.summary-v { margin-top: 2px; font-size: 28px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.summary-v.bad { color: var(--color-accent-700); }
.summary-v small { font-size: 13px; color: var(--color-neutral-600); }

.sorry { margin-top: 20px; background: var(--color-surface); padding: 16px; }
.sorry-t { font-size: 16px; font-weight: 800; line-height: 1.35; text-wrap: pretty; }
.private { margin-top: 8px; display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--color-accent-700); }

.google { margin-top: 20px; background: var(--color-text); color: var(--color-bg); padding: 18px 16px 16px; }
.google .kicker { color: var(--color-accent-400); }
.google-t { margin-top: 6px; font-size: 21px; font-weight: 800; line-height: 1.15; letter-spacing: -.015em; }
.google p { margin-top: 8px; font-size: 14px; line-height: 1.5; color: var(--color-neutral-300); }
.link-btn {
  margin-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  height: 52px; padding: 0 16px; background: var(--color-bg); color: var(--color-text);
  font-size: 15px; font-weight: 800; text-decoration: none;
}
.link-btn:hover { background: var(--color-accent-100); color: var(--color-text); }

/* ── thank you ─────────────────────────────────────── */
.thanks {
  position: relative; overflow: hidden; flex: 1; color: #fff;
  padding: calc(20px + var(--safe-top)) 24px calc(40px + var(--safe-bottom));
  display: flex; flex-direction: column;
}
.beam {
  position: absolute; left: -40px; top: 300px; width: 560px; height: 1.5px;
  background: linear-gradient(90deg, rgba(226,180,92,0), rgba(240,200,120,.85) 55%, rgba(226,180,92,0));
  transform: rotate(-24deg); transform-origin: left center; box-shadow: 0 0 14px rgba(240,200,120,.5);
  pointer-events: none;
}
.beam.thin {
  left: 150px; top: 190px; width: 320px; height: 1px; box-shadow: none;
  background: linear-gradient(90deg, rgba(226,180,92,0), rgba(240,200,120,.6), rgba(226,180,92,0));
}
.thanks > *:not(.beam) { position: relative; }
.logo {
  width: 56px; height: 56px; flex: none; border-radius: 50%; background: #0b0e26; border: 2px solid #3f72e0;
  display: flex; align-items: center; justify-content: center;
}
.logo img { width: 80%; height: auto; }
.check {
  margin-top: 44px; width: 84px; height: 84px; background: var(--gold);
  display: flex; align-items: center; justify-content: center;
  animation: mbBox .5s cubic-bezier(.3,1.5,.5,1) both;
}
.check path { stroke-dasharray: 24; stroke-dashoffset: 24; animation: mbDraw .4s .35s ease-out forwards; }
.thanks h1 { margin-top: 28px; font-size: 44px; line-height: 1.02; letter-spacing: -.03em; text-wrap: balance; animation: mbUp .5s .5s ease both; }
.thanks-sub { margin-top: 14px; font-size: 20px; font-weight: 700; line-height: 1.35; animation: mbUp .5s .6s ease both; }
.gold-btn {
  margin-top: 22px; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  height: 54px; padding: 0 16px; background: var(--gold); color: var(--navy);
  font-size: 15px; font-weight: 800; text-decoration: none; animation: mbUp .5s .7s ease both;
}
.gold-btn:hover { background: var(--gold-hover); color: var(--navy); }
.gold-note { margin-top: 8px; font-size: 12px; font-weight: 600; color: #c9c6dc; animation: mbUp .5s .75s ease both; }
.incentive { margin-top: auto; padding-top: 32px; animation: mbUp .5s .8s ease both; }
.incentive-card { background: var(--color-bg); color: var(--color-text); padding: 18px 16px 16px; }
.incentive-t { margin-top: 6px; font-size: 24px; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
.coupon {
  margin-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  border: 2px dashed var(--color-text); padding: 12px 14px;
  font: 800 18px ui-monospace, Menlo, monospace; letter-spacing: .14em;
}
.coupon span { font: 600 11px var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--color-neutral-700); }
.incentive-card p { margin-top: 12px; font-size: 12.5px; line-height: 1.5; color: var(--color-neutral-800); }

/* ── CTA bar ───────────────────────────────────────── */
.cta-bar {
  position: sticky; bottom: 0; z-index: 5; background: var(--color-bg);
  padding: 14px 20px calc(16px + var(--safe-bottom)); border-top: 2px solid var(--color-divider);
}
.cta {
  width: 100%; height: 58px; border: 0; background: var(--color-accent); color: #fff;
  font-size: 16px; font-weight: 800; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; padding: 0 18px;
  transition: opacity .2s, background .15s;
}
.cta:hover { background: var(--color-accent-600); }
.cta:active { background: var(--color-accent-700); }
.cta:disabled { opacity: .45; cursor: default; background: var(--color-accent); }
