/* Khao-Piyo landing page.
   Tokens are the same ramp as web/src/styles/tokens.css and
   customer-web/src/theme/tokens.css, so the landing page, the owner app and
   the customer app read as one product. */

:root {
  --veg-50: #f0fdf4;
  --veg-100: #dcfce7;
  --veg-200: #bbf7d0;
  --veg-300: #86efac;
  --veg-400: #4ade80;
  --veg-500: #16a34a;
  --veg-600: #008000; /* brand, primary CTA */
  --veg-700: #166534;
  --veg-800: #14532d;
  --veg-900: #052e16;

  --ink-900: #0f1a14;
  --ink-700: #2d3a33;
  --ink-500: #5c6b62;
  --ink-300: #a8b5ad;
  --ink-200: #d9e0dc;
  --ink-100: #eef2ef;
  --bg: #fbfdfb;
  --card: #ffffff;

  --egg: #d97706;
  --nonveg: #9a3412;

  --font-body: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-full: 9999px;

  --shadow-sm: 0 2px 6px rgba(0, 64, 0, 0.06);
  --shadow-md: 0 8px 24px rgba(0, 64, 0, 0.08);
  --shadow-lg: 0 16px 40px rgba(0, 64, 0, 0.12);
  --shadow-focus: 0 0 0 4px rgba(0, 128, 0, 0.2);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --topbar-h: 68px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar-h) + 12px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-900);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1,
h2,
h3,
p,
ul,
ol {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
  border-radius: var(--r-sm);
}

svg {
  display: block;
}

.wrap {
  width: 100%;
  max-width: 1160px;
  margin-inline: auto;
  padding-inline: max(20px, env(safe-area-inset-left));
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 24px;
  letter-spacing: -0.02em;
  color: var(--veg-600);
  white-space: nowrap;
}

/* ================= BUTTONS ================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding-inline: 16px;
  border-radius: var(--r-md);
  border: 1.5px solid transparent;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 150ms ease,
    border-color 150ms ease,
    color 150ms ease,
    transform 150ms ease,
    box-shadow 150ms ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 150ms ease;
}

.btn:hover svg {
  transform: translateX(3px);
}

.btn-lg {
  height: 52px;
  padding-inline: 24px;
  font-size: 16px;
  border-radius: var(--r-lg);
}

.btn-block {
  width: 100%;
}

.btn-primary {
  background: var(--veg-600);
  color: #fff;
  box-shadow: 0 6px 16px rgba(0, 128, 0, 0.22);
}

.btn-primary:hover {
  background: var(--veg-700);
}

.btn-outline {
  background: var(--card);
  color: var(--veg-700);
  border-color: var(--veg-200);
}

.btn-outline:hover {
  border-color: var(--veg-500);
  background: var(--veg-50);
}

.btn-soft {
  background: var(--veg-100);
  color: var(--veg-800);
}

.btn-soft:hover {
  background: var(--veg-200);
}

/* ================= TOP BAR ================= */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 253, 251, 0.86);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--ink-100);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 40px;
  height: var(--topbar-h);
}

.nav {
  display: flex;
  gap: 28px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-700);
}

.nav a {
  position: relative;
  padding-block: 6px;
}

.nav a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--veg-600);
  transform: scaleX(0);
  transition: transform 200ms var(--ease-out);
}

.nav a:hover {
  color: var(--veg-700);
}

.nav a:hover::after {
  transform: scaleX(1);
}

.topbar-actions {
  display: flex;
  gap: 10px;
  margin-left: auto;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--ink-200);
  border-radius: var(--r-md);
  background: var(--card);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.menu-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink-900);
  transition: transform 200ms var(--ease-out), opacity 150ms ease;
}

.menu-toggle[aria-expanded='true'] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.menu-toggle[aria-expanded='true'] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded='true'] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.mobile-menu {
  border-top: 1px solid var(--ink-100);
  background: var(--bg);
  box-shadow: var(--shadow-md);
}

.mobile-menu-inner {
  display: flex;
  flex-direction: column;
  padding-block: 8px 20px;
}

.mobile-menu-inner > a {
  padding-block: 14px;
  font-size: 17px;
  font-weight: 600;
  color: var(--ink-900);
  border-bottom: 1px solid var(--ink-100);
}

.mobile-menu-actions {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.mobile-menu-actions .btn {
  height: 48px;
}

/* ================= HERO ================= */

.hero {
  position: relative;
  padding-block: 56px 72px;
  background:
    radial-gradient(60% 70% at 85% 30%, rgba(187, 247, 208, 0.55) 0%, rgba(187, 247, 208, 0) 70%),
    radial-gradient(90% 60% at 10% 0%, var(--veg-50) 0%, rgba(240, 253, 244, 0) 70%),
    var(--bg);
  /* clip, not hidden: hidden would make the hero a scroll container and the
     story's sticky phone would stop pinning. */
  overflow: clip;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 48px;
  align-items: center;
}

/* Desktop, story playing: the copy pins beside the phone for the whole run. */
@media (min-width: 961px) {
  .hero.has-story {
    padding-block: 0;
  }

  .hero.has-story .hero-grid {
    align-items: start;
  }

  .hero.has-story .hero-copy {
    position: sticky;
    top: var(--topbar-h);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    min-height: calc(100vh - var(--topbar-h));
    min-height: calc(100svh - var(--topbar-h));
  }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 10px;
  border-radius: var(--r-full);
  background: var(--card);
  border: 1px solid var(--veg-200);
  color: var(--veg-800);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.eyebrow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--veg-500);
  box-shadow: 0 0 0 4px var(--veg-100);
}

.hero h1 {
  margin-top: 22px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(38px, 5.2vw, 62px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  color: var(--veg-900);
}

.accent {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.68em;
  letter-spacing: -0.025em;
  color: var(--veg-600);
}

/* The brand line breaks after "Just", never at one of its own hyphens. */
.nowrap {
  white-space: nowrap;
}

.lead {
  margin-top: 22px;
  max-width: 34rem;
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.6;
  color: var(--ink-500);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 28px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-700);
}

.hero-points li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero-points li::before,
.checks li::before {
  content: '';
  flex: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23008000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E")
      center / 12px no-repeat,
    var(--veg-100);
}

/* ---- The scroll story: voice → cart → bill ---- */

/* Scroll-driven values, written by the script on .story:
     --t  0→1  the spoken words appear
     --c  0→1  the dishes drop into the cart
     --b  0→1  the bill prints
   These defaults are the no-script picture: order said, cart filled. */
.story {
  --t: 1;
  --c: 1;
  --b: 0;
  --phone-scale: 1;
  position: relative;
}

.story-sticky {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.story-head {
  width: 100%;
  max-width: 460px;
  text-align: center;
}

.story-steps {
  display: flex;
  justify-content: center;
  gap: 4px;
  padding: 5px;
  border-radius: var(--r-full);
  background: var(--card);
  border: 1px solid var(--ink-100);
  box-shadow: var(--shadow-sm);
}

.story-steps li {
  flex: 1 1 0;
  min-width: 0;
}

.story-step {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 7px 10px;
  border: 0;
  border-radius: var(--r-full);
  background: transparent;
  font: 600 13px/1.2 var(--font-body);
  color: var(--ink-500);
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 240ms ease, color 240ms ease;
}

.story-step b {
  font-weight: inherit;
}

/* Phones get one-word step names so all three fit on the pill. */
.step-short {
  display: none;
}

.story-step span {
  display: grid;
  place-items: center;
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--ink-100);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-700);
  transition: background-color 240ms ease, color 240ms ease;
}

.story[data-step='0'] [data-go='0'],
.story[data-step='1'] [data-go='1'],
.story[data-step='2'] [data-go='2'] {
  background: var(--veg-600);
  color: #fff;
}

.story[data-step='0'] [data-go='0'] span,
.story[data-step='1'] [data-go='1'] span,
.story[data-step='2'] [data-go='2'] span {
  background: #fff;
  color: var(--veg-700);
}

/* All three captions share one grid cell, so the box keeps the height of the
   longest and swapping them never shifts the phone. */
.story-captions {
  display: grid;
  margin-top: 12px;
}

.story-caption {
  grid-area: 1 / 1;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-700);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 280ms ease, transform 280ms var(--ease-out);
}

.story[data-step='0'] [data-for='0'],
.story[data-step='1'] [data-for='1'],
.story[data-step='2'] [data-for='2'] {
  opacity: 1;
  transform: none;
}

.story-hint {
  display: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-500);
}

/* The phone is drawn at a fixed 380×600 and scaled to the room the viewport
   leaves (--phone-scale, from the script); .stage reserves the scaled height. */
.stage {
  position: relative;
  width: 100%;
  height: calc(600px * var(--phone-scale));
}

.stage::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(440px * var(--phone-scale));
  height: calc(440px * var(--phone-scale));
  border-radius: 50%;
  background: radial-gradient(circle, var(--veg-200) 0%, rgba(187, 247, 208, 0) 68%);
  opacity: 0.7;
  transform: translate(-50%, -50%);
}

.stage-inner {
  position: absolute;
  top: 0;
  left: 50%;
  width: 380px;
  height: 600px;
  transform: translateX(-50%) scale(var(--phone-scale));
  transform-origin: top center;
}

.phone {
  position: absolute;
  top: 10px;
  left: 45px;
  width: 290px;
  height: 580px;
  padding: 10px;
  border-radius: 44px;
  background: #0f1a14;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06) inset,
    0 30px 60px rgba(5, 46, 22, 0.28),
    0 10px 20px rgba(5, 46, 22, 0.14);
}

.phone::before {
  content: '';
  position: absolute;
  top: 18px;
  left: 50%;
  width: 84px;
  height: 22px;
  border-radius: 12px;
  background: #0f1a14;
  transform: translateX(-50%);
  z-index: 2;
}

.phone-screen {
  position: relative;
  height: 100%;
  padding: 48px 14px 0;
  border-radius: 34px;
  background: var(--bg);
  overflow: hidden;
}

.app-top {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.app-wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -0.02em;
  color: var(--veg-600);
}

.app-place {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-500);
}

.cart-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 14px 2px 8px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  color: var(--ink-900);
}

.cart-clear {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  color: #dc2626;
  opacity: calc(0.25 + 0.75 * var(--c));
}

.cart-card {
  position: relative;
  min-height: 176px;
  padding: 6px 12px;
  border-radius: var(--r-lg);
  background: var(--card);
  border: 1px solid var(--ink-100);
  box-shadow: 0 2px 8px rgba(0, 64, 0, 0.06);
}

.cart-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-300);
  opacity: clamp(0, calc(1 - var(--c) * 4), 1);
}

/* Each line lands in turn as --c climbs: the first over its first third, the
   second over the next, then the total. */
.cart-line {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--ink-100);
  opacity: clamp(0, calc(var(--c) * 3 - var(--i)), 1);
  transform: translateY(calc((1 - clamp(0, calc(var(--c) * 3 - var(--i)), 1)) * -14px));
}

.cart-line-body {
  flex: 1;
  min-width: 0;
}

.cart-name {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-900);
}

.cart-unit {
  font-size: 11px;
  color: var(--ink-500);
}

.cart-amount {
  width: 38px;
  text-align: right;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-900);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  padding: 12px 0 8px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  color: var(--ink-900);
  opacity: clamp(0, calc(var(--c) * 3 - 2), 1);
}

/* FSSAI-style food mark: a square with a dot (veg). */
.mark {
  position: relative;
  flex: none;
  display: inline-block;
  width: 13px;
  height: 13px;
  border: 1.5px solid var(--veg-600);
  border-radius: 2px;
}

.mark::after {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  width: 45%;
  height: 45%;
  border-radius: 50%;
  background: var(--veg-600);
}

.stepper {
  flex: none;
  padding: 4px 8px;
  border-radius: var(--r-sm);
  color: var(--veg-800);
  background: var(--veg-50);
  border: 1px solid var(--veg-200);
  font-size: 11px;
  font-weight: 700;
  word-spacing: 3px;
}

/* The bottom of the screen follows the step: listening, then Print bill,
   then the printed confirmation. */
.dock {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 18px;
  height: 188px;
}

.dock-panel {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  text-align: center;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 300ms ease, transform 300ms var(--ease-out);
}

.story[data-step='0'] .dock-listen,
.story[data-step='1'] .dock-print,
.story[data-step='2'] .dock-done {
  opacity: 1;
  transform: none;
}

.dock-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--veg-700);
}

.transcript {
  min-height: 52px;
  margin: 6px 0 12px;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--ink-900);
}

/* Word by word as --t climbs from 0 to 1. */
.transcript span {
  opacity: clamp(0, calc(var(--t) * 6 - var(--w)), 1);
}

.mic-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.mic {
  position: relative;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--veg-600);
  box-shadow: 0 10px 22px rgba(0, 128, 0, 0.35);
}

.mic::before,
.mic::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--veg-500);
  animation: mic-ring 1.8s ease-out infinite;
}

.mic::after {
  animation-delay: 0.9s;
}

.mic svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bars {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 22px;
}

.bars i {
  width: 4px;
  height: 100%;
  border-radius: 3px;
  background: var(--veg-600);
  animation: wave 1s ease-in-out infinite;
}

.bars i:nth-child(2) { animation-delay: -0.75s; }
.bars i:nth-child(3) { animation-delay: -0.4s; }
.bars i:nth-child(4) { animation-delay: -0.2s; }

.dock-said {
  margin-bottom: 14px;
  font-size: 12.5px;
  font-style: italic;
  color: var(--ink-500);
}

.print-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 50px;
  border-radius: var(--r-md);
  background: var(--veg-600);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(0, 128, 0, 0.3);
}

.story[data-step='1'] .print-btn {
  animation: press 1.6s ease-in-out infinite;
}

.print-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.done-check {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 10px;
  border-radius: 50%;
  background: var(--veg-100);
  color: var(--veg-600);
}

.done-check svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.done-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  color: var(--ink-900);
}

.done-sub {
  margin: 2px 0 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--veg-700);
}

/* The printed bill slides out from behind the phone as --b climbs. */
.ticket {
  position: absolute;
  right: 0;
  top: 236px;
  z-index: 3;
  width: 200px;
  padding: 16px 16px 22px;
  background: var(--card);
  color: var(--ink-900);
  font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: 12px;
  box-shadow: var(--shadow-lg);
  opacity: clamp(0, calc(var(--b) * 3), 1);
  transform:
    translateX(calc((1 - var(--b)) * -90px))
    translateY(calc((1 - var(--b)) * 40px))
    rotate(calc(var(--b) * 5deg));
  /* Torn-paper bottom edge, like a slip off the counter's bill printer. */
  -webkit-mask:
    conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 12px 100%;
  mask:
    conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 12px 100%;
}

.ticket-head {
  text-align: center;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.ticket-sub {
  text-align: center;
  font-size: 10.5px;
  color: var(--ink-500);
}

.ticket-rule {
  margin: 10px 0;
  border-top: 1.5px dashed var(--ink-200);
}

.ticket-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  line-height: 1.7;
}

.ticket-total {
  font-weight: 700;
  font-size: 13px;
}

.ticket-paid {
  margin-top: 8px;
  text-align: center;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--veg-600);
  text-transform: uppercase;
}

@keyframes wave {
  0%, 100% { transform: scaleY(0.3); }
  50% { transform: scaleY(1); }
}

@keyframes mic-ring {
  from { transform: scale(1); opacity: 0.7; }
  to { transform: scale(1.7); opacity: 0; }
}

@keyframes press {
  0%, 70%, 100% { transform: scale(1); }
  80% { transform: scale(0.96); }
}

/* ---- Pinned while it plays (the script adds .is-live) ---- */

/* The column is several screens tall and the phone sticks under the top bar
   for the whole run: the column's length is the scroll it takes to play. */
.story.is-live {
  height: 300vh;
}

.story.is-live .story-sticky {
  position: sticky;
  top: var(--topbar-h);
  height: calc(100vh - var(--topbar-h));
  height: calc(100svh - var(--topbar-h));
  justify-content: center;
}

.story.is-live .story-hint {
  display: block;
  transition: opacity 300ms ease;
}

.story.is-live.is-started .story-hint {
  opacity: 0;
}

/* ================= SECTIONS ================= */

.section {
  padding-block: 96px;
}

.section-band {
  background: var(--card);
  border-block: 1px solid var(--ink-100);
}

.section-head {
  max-width: 720px;
  margin-bottom: 48px;
}

.kicker {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--veg-600);
}

.section h2 {
  margin-top: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(28px, 3.6vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: var(--veg-900);
}

.section-lead {
  margin-top: 14px;
  font-size: 17px;
  color: var(--ink-500);
}

/* ---- Offerings ---- */

.offer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.offer {
  display: flex;
  flex-direction: column;
  padding: 28px;
  border-radius: var(--r-xl);
  background: var(--card);
  border: 1px solid var(--ink-100);
  box-shadow: var(--shadow-sm);
  transition: transform 240ms var(--ease-out), box-shadow 240ms var(--ease-out);
}

.offer:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.offer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.tag {
  padding: 5px 12px;
  border-radius: var(--r-full);
  background: var(--veg-50);
  border: 1px solid var(--veg-200);
  color: var(--veg-800);
  font-size: 12.5px;
  font-weight: 600;
}

.offer-icon,
.feature-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: var(--r-md);
  background: var(--veg-100);
}

.offer-icon svg,
.feature-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: var(--veg-700);
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.offer h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink-900);
}

.offer-lead {
  margin-top: 4px;
  font-size: 15.5px;
  color: var(--ink-500);
}

.checks {
  display: grid;
  gap: 12px;
  margin-block: 22px 26px;
  font-size: 15px;
  color: var(--ink-700);
}

.checks li {
  display: flex;
  gap: 10px;
  line-height: 1.45;
}

.checks li::before {
  margin-top: 1px;
}

/* ---- Features ---- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.feature {
  padding: 24px;
  border-radius: var(--r-lg);
  background: var(--bg);
  border: 1px solid var(--ink-100);
  transition: border-color 200ms ease, background-color 200ms ease;
}

.feature:hover {
  border-color: var(--veg-200);
  background: var(--veg-50);
}

.feature-icon {
  width: 44px;
  height: 44px;
  margin-bottom: 18px;
  background: var(--card);
  border: 1px solid var(--veg-200);
}

.feature h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink-900);
}

.feature p {
  margin-top: 6px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-500);
}

/* ---- Steps ---- */

.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  counter-reset: none;
}

.steps::before {
  content: '';
  position: absolute;
  top: 27px;
  left: 16%;
  right: 16%;
  border-top: 2px dashed var(--veg-200);
}

.step {
  position: relative;
  text-align: center;
  padding-inline: 12px;
}

.step-num {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 20px;
  border-radius: 50%;
  background: var(--veg-600);
  color: #fff;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  box-shadow: 0 0 0 8px var(--bg), 0 8px 20px rgba(0, 128, 0, 0.25);
}

.step h3 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  color: var(--ink-900);
}

.step p {
  max-width: 21rem;
  margin: 8px auto 0;
  font-size: 15px;
  color: var(--ink-500);
}

/* ---- Audience CTA ---- */

/* ================= FOOTER ================= */

.footer {
  padding-block: 56px calc(28px + env(safe-area-inset-bottom));
  background: var(--card);
  border-top: 1px solid var(--ink-100);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
}

.footer-brand p {
  max-width: 18rem;
  margin-top: 10px;
  font-size: 14.5px;
  color: var(--ink-500);
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14.5px;
  color: var(--ink-700);
}

.footer-col a:hover {
  color: var(--veg-600);
}

.footer-title {
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-900);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid var(--ink-100);
  font-size: 13.5px;
  color: var(--ink-500);
}

.footer-bottom p:last-child {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--veg-600);
}

/* ---- AI Waiter ---- */

.waiter-section {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(60% 80% at 20% 60%, rgba(22, 163, 74, 0.35) 0%, rgba(22, 163, 74, 0) 70%),
    radial-gradient(50% 60% at 100% 0%, rgba(74, 222, 128, 0.12) 0%, rgba(74, 222, 128, 0) 70%),
    var(--veg-900);
  color: rgba(255, 255, 255, 0.78);
}

.waiter-section .kicker {
  color: var(--veg-300);
}

.waiter-section h2 {
  color: #fff;
}

.waiter-section .section-lead {
  color: rgba(255, 255, 255, 0.76);
}

.waiter-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 56px;
  align-items: center;
}

/* The waiter and the chat sit side by side and never overlap, so both of
   his hands — the wave and the one at his side — stay in view. */
.waiter-visual {
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
}

.waiter-figure {
  position: relative;
  flex: none;
  display: flex;
  justify-content: center;
}

.waiter-glow {
  position: absolute;
  left: 50%;
  top: 45%;
  width: 440px;
  height: 440px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(74, 222, 128, 0.4) 0%, rgba(74, 222, 128, 0) 68%);
  transform: translate(-50%, -50%);
}

/* A still of the app's own 3D waiter (customer-web/public/avatar/waiter-idle.glb),
   rendered with the avatar page's lighting: the whole figure, so he stands on
   a soft floor shadow. */
.waiter-img {
  position: relative;
  display: block;
  height: 600px;
  width: auto;
}

.waiter-figure::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 70%;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0));
  transform: translateX(-50%);
}

.chat {
  flex: 1;
  min-width: 0;
  max-width: 270px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bubble {
  max-width: 88%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.4;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.bubble-diner {
  align-self: flex-end;
  background: #fff;
  color: var(--ink-900);
  border-bottom-right-radius: 4px;
}

.bubble-waiter {
  align-self: flex-start;
  background: var(--veg-600);
  color: #fff;
  border-bottom-left-radius: 4px;
}

/* The script adds .will-animate only when it can also add .in-view, so the
   bubbles are never left hidden. */
.chat.will-animate .bubble {
  opacity: 0;
  transform: translateY(10px);
}

.chat.in-view .bubble {
  animation: bubble-in 500ms var(--ease-out) forwards;
}

.chat.in-view .bubble:nth-child(2) { animation-delay: 700ms; }
.chat.in-view .bubble:nth-child(3) { animation-delay: 1500ms; }
.chat.in-view .bubble:nth-child(4) { animation-delay: 2200ms; }

@keyframes bubble-in {
  to {
    opacity: 1;
    transform: none;
  }
}

.waiter-points {
  display: grid;
  gap: 20px;
  margin-top: 30px;
}

.waiter-points li {
  display: flex;
  gap: 14px;
}

.waiter-point-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.waiter-point-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--veg-300);
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.waiter-points h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: #fff;
}

.waiter-points p {
  margin-top: 2px;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.72);
}

/* ---- Featured with ---- */

.featured {
  padding-block: 72px 88px;
  border-top: 1px solid var(--ink-100);
  text-align: center;
}

.featured-title {
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--veg-900);
}

.logo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 36px;
}

.logo-card {
  display: grid;
  place-items: center;
  height: 128px;
  padding: 18px 24px;
  border-radius: var(--r-lg);
  background: var(--card);
  border: 1px solid var(--ink-100);
  box-shadow: var(--shadow-sm);
}

.logo-card img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 84px;
  object-fit: contain;
}

/* A stacked icon-over-wordmark lockup needs more height to read at the same
   size as the wide wordmarks beside it. */
.logo-card-tall {
  padding-block: 10px;
}

.logo-card-tall img {
  max-height: 106px;
}

.footer-social {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* WhatsApp and Instagram appear in their own brand colours, never tinted
   by the line-icon styles around them. */
.brand-icon,
.feature-icon svg.brand-icon {
  flex: none;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: none;
}

.feature-icon-brand svg.brand-icon {
  width: 26px;
  height: 26px;
}

/* ================= RESPONSIVE ================= */

@media (max-width: 1080px) {
  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .hero-copy {
    text-align: center;
  }

  .lead {
    margin-inline: auto;
  }

  .hero-cta,
  .hero-points {
    justify-content: center;
  }

  .story.is-live {
    height: 280vh;
  }


  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
  .waiter-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .waiter-visual {
    order: 2;
    width: 100%;
    max-width: 560px;
    margin-inline: auto;
    justify-content: center;
  }

  .waiter-img {
    height: 520px;
  }
}

@media (max-width: 1000px) {
  .nav,
  .topbar-actions {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }
}

@media (max-width: 720px) {
  .section {
    padding-block: 72px;
  }

  .steps {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }

  .steps::before {
    top: 28px;
    bottom: 28px;
    left: 50%;
    right: auto;
    border-top: 0;
    border-left: 2px dashed var(--veg-200);
    display: none;
  }

  .offer-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .logo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .logo-card {
    height: 104px;
    padding: 14px 16px;
  }

  .logo-card img {
    max-height: 72px;
  }

  .logo-card-tall {
    padding-block: 6px;
  }

  .logo-card-tall img {
    max-height: 90px;
  }
}

@media (max-width: 560px) {
  .hero {
    padding-block: 40px 56px;
  }

  .hero-cta .btn {
    flex: 1 1 100%;
  }

  .story-step {
    padding-inline: 6px;
  }

  .step-long {
    display: none;
  }

  .step-short {
    display: inline;
  }

  .story-caption {
    font-size: 14px;
  }

  .feature-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .offer {
    padding: 24px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .waiter-visual {
    flex-direction: column;
    gap: 8px;
  }

  .waiter-img {
    height: 460px;
  }

  .waiter-glow {
    width: 320px;
    height: 320px;
  }

  .chat {
    width: 100%;
    max-width: 340px;
  }

  .bubble {
    padding: 8px 12px;
    font-size: 12.5px;
  }

}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
