/* Calwell landing page. The look follows the Calwell store covers (sky gradient, white pill
   chips, the bear, the real Today screen) and src/theme.ts. Logical properties throughout —
   ar/ needs no CSS of its own. */

:root {
  --paper: #ffffff;
  --surface: #ffffff;
  --ink: #141414;
  --ink-soft: #52555a;
  --ink-faint: #6e7176;
  --border: rgba(20, 20, 20, 0.08);
  --border-strong: rgba(20, 20, 20, 0.16);

  /* The cover sky, sampled from the store covers: blue up top, warm horizon below. */
  --sky-top: #477fd0;
  --sky-mid: #6fa0e2;
  --sky-low: #cfdff5;
  --sky-horizon: #f3dcc2;
  --well: #f1f1f1;
  --sky-deep: #3c76c4;
  --sky-wash: #eaf2fc;

  --brand: #13a56d;
  --brand-deep: #0c7a50;
  --screen: #f5f3fb;

  --diet: #ea9008;
  --water: #0dbcf7;
  --water-deep: #0084ad;
  --fodmap: #d83b8c;
  --progress: #8b5cf6;
  --streak: #e2611b;
  --protein: #d83b8c;
  --carb: #8ba81c;
  --fat: #ea8a26;

  --font-latin: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-round: "Baloo 2", "Inter", system-ui, sans-serif;
  --font-arabic: "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  --font: var(--font-latin);

  --radius-card: 20px;
  --radius-tile: 14px;
  --radius-cover: clamp(24px, 4vw, 40px);
  --radius-pill: 999px;

  --page: 72rem;
  --gutter: clamp(1rem, 3.5vw, 2.5rem);
  --section: clamp(4.5rem, 10vw, 7.5rem);

  --shadow-soft: 0 1px 2px rgba(17, 24, 39, 0.05), 0 12px 32px rgba(17, 24, 39, 0.07);
  --shadow-lift: 0 2px 6px rgba(17, 24, 39, 0.08), 0 28px 64px rgba(42, 86, 150, 0.28);
  --shadow-chip: 0 2px 10px rgba(42, 86, 150, 0.18);
}

html[lang="ar"] { --font: var(--font-arabic); --font-round: var(--font-arabic); }

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
::selection { background: #cfe3fa; }

.wrap {
  max-width: var(--page);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Type ---------- */

h1, h2, h3 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.028em;
  line-height: 1.08;
  text-wrap: balance;
}

html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3 {
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.45;
}

.display { font-size: clamp(2.375rem, 5.6vw, 3.875rem); }
.title { font-size: clamp(2rem, 3.2vw, 2.875rem); }

.kicker {
  font-size: clamp(1.125rem, 1.7vw, 1.5rem);
  font-weight: 500;
  line-height: 1.1;
  color: #868686;
}

.lead {
  font-size: clamp(1.125rem, 1.8vw, 1.3125rem);
  color: var(--ink-soft);
  max-inline-size: 36rem;
  text-wrap: pretty;
}

/* ---------- Top bar ---------- */

/* Full width and white on the hero sky; once the page scrolls it gathers into a floating glass pill. */
.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  color: #fff;
  pointer-events: none;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
}

.topbar .wrap {
  pointer-events: auto;
  max-width: calc(77.5rem + 2 * var(--gutter));
  display: flex;
  align-items: center;
  gap: 1.5rem;
  block-size: clamp(4.5rem, 12.2vw, 11rem);
  padding-block-start: clamp(0rem, 3.4vw, 3rem);
  border-radius: var(--radius-pill);
  transition: max-width 0.6s var(--ease), block-size 0.6s var(--ease), padding 0.6s var(--ease),
    margin 0.6s var(--ease), background-color 0.4s ease, box-shadow 0.4s ease, color 0.4s ease;
}
.topbar.scrolled { color: var(--ink); }
.topbar.scrolled .wrap {
  max-width: min(46rem, calc(100% - 1.5rem));
  block-size: 3.5rem;
  margin-block-start: 0.75rem;
  padding-block-start: 0;
  padding-inline: 1.25rem 0.4375rem;
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  box-shadow: inset 0 0 0 1px rgba(20, 20, 20, 0.06), 0 10px 30px rgba(17, 24, 39, 0.1);
}

/* The Calwell logo, layer for layer from the Figma exports: the light one (inline) on the sky,
   the dark one (assets/logo-dark.svg, Figma 1015:36543) once the bar turns white. */
.wordmark { display: grid; align-items: center; line-height: 0; }
.wordmark > * { grid-area: 1 / 1; inline-size: clamp(5.5rem, 8vw, 7.25rem); block-size: auto; transition: inline-size 0.6s var(--ease), opacity 0.4s ease; }
.topbar.scrolled .wordmark > * { inline-size: 4.875rem; }
.wm-dark { opacity: 0; }
.topbar.scrolled .wm-dark { opacity: 1; }
.topbar.scrolled .wordmark svg { opacity: 0; }

.topnav {
  display: none;
  gap: 1.8125rem;
  margin-inline-start: auto;
  font-size: 1.125rem;
  font-weight: 500;
  transition: gap 0.6s var(--ease), font-size 0.6s var(--ease);
}
.topbar.scrolled .topnav { gap: 1.5rem; font-size: 0.9375rem; }

.topbar .actions {
  margin-inline-start: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Links sit at 70% and roll to full white on hover: the label slides up and an identical copy slides in. */
.topnav a, .lang {
  text-decoration: none;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}
.topnav a:hover, .topnav a:focus-visible, .lang:hover, .lang:focus-visible { opacity: 1; }
.lang { display: grid; place-items: center; inline-size: 2.5rem; block-size: 2.5rem; border-radius: 50%; transition: opacity 0.3s ease, background-color 0.3s ease; }
.lang svg { inline-size: 1.5rem; block-size: 1.5rem; transition: inline-size 0.6s var(--ease), block-size 0.6s var(--ease); }
.lang:hover { background: rgba(255, 255, 255, 0.14); }
.topbar.scrolled .lang:hover { background: rgba(20, 20, 20, 0.06); }
.topbar.scrolled .lang svg { inline-size: 1.25rem; block-size: 1.25rem; }

.roll { display: inline-flex; overflow: hidden; block-size: 1.2em; line-height: 1.2em; vertical-align: top; }
.roll-c { display: grid; white-space: pre; transition: translate 0.28s cubic-bezier(0.34, 0.85, 0.25, 1); transition-delay: calc(var(--i, 0) * 12ms); }
.roll-c > span { block-size: 1.2em; }
a:hover > .roll .roll-c, a:focus-visible > .roll .roll-c { translate: 0 -1.2em; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.375rem;
  border-radius: var(--radius-pill);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:active { transform: scale(0.98); }
.btn-ink { background: #252525; color: #fff; }
.btn-ink:hover { box-shadow: 0 8px 24px rgba(20, 20, 20, 0.25); }
.topbar .btn {
  font-size: clamp(0.9375rem, 1.25vw, 1.125rem);
  font-weight: 500;
  line-height: 1.5;
  padding: 0.6875rem 1.375rem;
  transition: padding 0.6s var(--ease), font-size 0.6s var(--ease), transform 0.15s ease, box-shadow 0.15s ease;
}
.topbar.scrolled .btn { padding: 0.4375rem 1.125rem; font-size: 0.9375rem; }
@media (min-width: 1100px) {
  .topbar:not(.scrolled) .btn { padding: 0.9375rem 1.625rem; }
  .topbar:not(.scrolled) .wordmark { margin-block-end: 1.75rem; }
}

@media (min-width: 880px) {
  .topnav { display: flex; }
  .topbar .actions { margin-inline-start: 2.5rem; }
  .topbar.scrolled .actions { margin-inline-start: 1.75rem; }
}
.topbar .btn { white-space: nowrap; }
@media (max-width: 419px) {
  .topbar .actions { gap: 0.5rem; }
  .topbar .btn, .topbar.scrolled .btn { padding: 0.5rem 1rem; font-size: 0.875rem; }
}

/* Entrance: the bar, then the headline, drift down into place. */
@keyframes drop-in { from { opacity: 0; transform: translate3d(0, -20px, 0); } }
/* The headline only moves (no fade) so it still counts as the first big paint. */
@keyframes drop-in-move { from { transform: translate3d(0, -20px, 0); } }
.topbar .wrap { animation: drop-in 1.3s var(--ease) both; }
.hero-head { animation: drop-in-move 1.3s cubic-bezier(0.23, 1, 0.32, 1) 0.12s both; }
@media (prefers-reduced-motion: reduce) {
  .topbar .wrap, .hero-head { animation: none; }
  .roll-c { transition: none; }
}

/* ---------- Hero (Figma 1012:36048, laid out on a 1440 frame) ---------- */

/* The stage is the phone + bear + food group: 1040 × 1035 in the frame, phone centred on the page. */
.hero {
  --stage-w: min(65rem, 150vw);
  --stage-h: calc(var(--stage-w) * 1035 / 1040);
  position: relative;
  direction: ltr; /* the stage is a picture; keep it unmirrored so its offset works in Arabic */
  overflow-x: clip;
  padding-block-start: clamp(7.5rem, 18vw, 16.375rem);
}

.hero-sky {
  position: absolute;
  inset: 0 0 calc(var(--stage-h) * 0.234);
  z-index: -1;
}
.hero-sky img { inline-size: 100%; block-size: 100%; object-fit: cover; object-position: 50% 0; }
.hero-sky::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  block-size: calc(var(--stage-h) * 0.314);
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff 96%);
}

html[dir="rtl"] .hero-head { direction: rtl; }
.hero-head { display: grid; justify-items: center; gap: 1.3125rem; text-align: center; color: #fff; }

.hero-pill {
  margin: 0;
  padding: 0.4375rem 0.875rem;
  border-radius: var(--radius-pill);
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.17), rgba(255, 255, 255, 0.12));
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-size: clamp(0.8125rem, 1.1vw, 1rem);
  font-weight: 500;
  line-height: 1.2;
}

.hero-title {
  font-size: clamp(2.5rem, 4.6vw, 4.125rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: initial;
}
html[lang="ar"] .hero-title { line-height: 1.35; letter-spacing: 0; }

.hero-stage {
  position: relative;
  inline-size: var(--stage-w);
  aspect-ratio: 1040 / 1035;
  margin-block-start: clamp(2.5rem, 4vw, 3.5rem);
  margin-left: calc(50% - var(--stage-w) * 0.41415);
}
.hero-stage img { position: absolute; max-width: none; }
.hero-phone { left: 18.75%; top: 2.9%; width: 45.33%; filter: drop-shadow(0 30px 60px rgba(17, 24, 39, 0.18)); }
.hero-bear { left: 49.04%; top: 24.83%; width: 49.71%; }
.food { width: var(--w); translate: -50% -50%; rotate: var(--r); }
.food.hat { left: 7.02%; top: 6.34%; --w: 8.56%; --r: -30.58deg; }
.food.chicken { left: 10.11%; top: 42.84%; --w: 11.53%; --r: 16.35deg; }
.food.sandwich { left: 80.34%; top: 18.51%; --w: 10.93%; --r: 30deg; }
.food.salad { left: 66.25%; top: 8.09%; --w: 9.78%; --r: 15deg; }

@media (max-width: 719px) {
  .hero-title br { display: none; }
}


.store-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  border-radius: 14px;
  padding: 0.625rem 1.125rem;
  min-block-size: 3.25rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.store-badge:hover { box-shadow: 0 10px 28px rgba(20, 20, 20, 0.3); transform: translateY(-1px); }
.store-badge svg { inline-size: 1.5rem; block-size: 1.5rem; flex: none; }
.store-badge .lines { display: grid; line-height: 1.2; text-align: start; }
.store-badge .pre { font-size: 0.6875rem; opacity: 0.75; }
.store-badge .name { font-size: 1.0625rem; font-weight: 600; }
.hero-cta { margin-block-start: 2rem; gap: 0.75rem; padding: 0.75rem 1.75rem; min-block-size: 4.25rem; border-radius: 18px; box-shadow: 0 12px 32px rgba(17, 24, 39, 0.22); }
.hero-cta svg { inline-size: 2rem; block-size: 2rem; }
.hero-cta .pre { font-size: 0.8125rem; }
.hero-cta .name { font-size: 1.5rem; letter-spacing: -0.01em; }

/* ---------- Sections (canvas "Main", laid out on a 1440 frame) ---------- */

:root {
  --tray: #f4f4f4;
  --heading: #222222;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --faint: #a1a1a6;
  --check: #0071e3;
  --content: 73.75rem;
}

.block { padding: clamp(6rem, 12.5vw, 11.25rem) 1.5rem 0; }
.block-inner { max-width: var(--content); margin-inline: auto; }
.h-xl {
  color: var(--heading);
  font-size: clamp(2.25rem, 4.2vw, 3.75rem);
  line-height: 1.067;
  font-weight: 600;
  letter-spacing: -0.03em;
}
html[lang="ar"] .h-xl { line-height: 1.3; letter-spacing: 0; font-weight: 600; }
.sub { margin: 0; font-size: clamp(1.0625rem, 1.5vw, 1.3125rem); line-height: 1.43; font-weight: 500; color: var(--muted); }

/* ---------- Phone mockup: iPhone 14 Pro Max frame over a screenshot ---------- */

.phone { --w: 300px; position: relative; inline-size: var(--w); aspect-ratio: 943 / 1924; }
.phone-screen {
  position: absolute;
  left: 4.77%;
  top: 1.98%;
  width: 90.47%;
  height: 96.01%;
  border-radius: calc(var(--w) * 0.1187);
  overflow: hidden;
  background: #fff;
}
.phone-screen img { inline-size: 100%; }
.phone-frame { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; pointer-events: none; }

/* ---------- Log sentence with rotating pills ---------- */

.log { text-align: center; }
.log-sentence {
  margin: 0 auto;
  max-width: 67.5rem;
  font-size: clamp(1.75rem, 3.9vw, 3.5rem);
  line-height: 1.536;
  font-weight: 600;
  letter-spacing: -0.0286em;
  color: var(--heading);
  text-wrap: balance;
}
html[lang="ar"] .log-sentence { letter-spacing: 0; line-height: 1.7; }

.nobr { white-space: nowrap; }

.pill {
  position: relative;
  top: -0.107em;
  display: inline-flex;
  align-items: center;
  block-size: 1.357em;
  margin-inline: 0.107em;
  border-radius: 0.68em;
  background: var(--tray);
  vertical-align: middle;
  white-space: nowrap;
  transition: inline-size 1.1s cubic-bezier(0.34, 1.2, 0.5, 1);
}
.pill-item {
  display: inline-flex;
  align-items: center;
  gap: 0.18em;
  padding-inline: 0.18em 0.464em;
  inset-block-start: 0;
  inset-inline-start: 0;
}
.pill-item img {
  inline-size: 1.357em;
  block-size: 1.357em;
  margin-block: -0.18em;
  object-fit: contain;
  rotate: var(--r, 0deg);
}
.pill-item.is-leaving, .pill-item.is-entering { position: absolute; block-size: 100%; }
.pill-item.is-leaving { animation: pillOut 0.8s cubic-bezier(0.4, 0, 1, 1) forwards; }
.pill-item.is-entering { animation: pillIn 1.3s cubic-bezier(0.2, 0.9, 0.3, 1) 0.2s both; }
.pill-item.is-entering img { animation: iconIn 1.4s cubic-bezier(0.3, 1.5, 0.4, 1) 0.2s both; }
.pill.gp { animation: gpPop 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both; }

@keyframes pillOut { to { opacity: 0; transform: translateY(-45%); filter: blur(6px); } }
@keyframes pillIn {
  from { opacity: 0; transform: translateY(45%); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: none; }
}
@keyframes iconIn {
  from { transform: scale(0.4) rotate(-24deg); }
  70% { transform: scale(1.1) rotate(4deg); }
  to { transform: none; }
}
@keyframes gpPop {
  0% { opacity: 0; transform: translateY(18px) scale(0.86); }
  60% { opacity: 1; transform: translateY(-3px) scale(1.03); }
  100% { opacity: 1; transform: none; }
}

.visually-hidden {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- Feature cards in a grey tray ---------- */

.tray {
  margin: clamp(3.5rem, 6.7vw, 6rem) auto 0;
  max-width: var(--content);
  padding: 12px;
  border-radius: 40px;
  background: var(--tray);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.tile {
  min-block-size: 23.75rem;
  border-radius: 28px;
  background: #fff;
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  text-align: start;
}
.tag {
  align-self: flex-start;
  block-size: 28px;
  padding-inline: 10px;
  border-radius: 8px;
  background: var(--tray);
  color: var(--muted);
  display: flex;
  align-items: center;
  font-size: 0.8125rem;
  font-weight: 600;
}
.tile-title { margin: 1.25rem 0 0; font-size: 1.5rem; line-height: 1.25; font-weight: 600; letter-spacing: -0.017em; color: var(--heading); }
.tile-text { margin: 0.375rem 0 0; font-size: 1rem; line-height: 1.375; font-weight: 500; color: var(--faint); }
.tile img { margin: auto auto 0; inline-size: 190px; block-size: 150px; object-fit: contain; padding-block-start: 1.5rem; box-sizing: content-box; }

@media (max-width: 1023px) {
  .tray { grid-template-columns: repeat(2, 1fr); }
  .tile { min-block-size: 21rem; }
}
@media (max-width: 599px) {
  .tray {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 74%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 12px;
    scrollbar-width: none;
    border-radius: 32px;
  }
  .tray::-webkit-scrollbar { display: none; }
  .tile { scroll-snap-align: start; min-block-size: 20rem; border-radius: 22px; padding: 1.5rem 1.25rem; }
  .tile img { inline-size: 160px; block-size: 126px; }
}

/* ---------- How it works ---------- */

.how-head { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: end; }
.how-head .sub { margin-block-end: 0.5rem; }
.steps { margin-block-start: 4.5rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step {
  block-size: 42.5rem;
  border-radius: 36px;
  background: var(--tray);
  padding: 2.25rem 2.25rem 2.5rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  text-align: start;
}
.step .tag { block-size: 30px; padding-inline: 12px; border-radius: 15px; background: #fff; font-size: 0.875rem; }
.step h3 { margin: 1.25rem 0 0; font-size: 2.25rem; line-height: 1.11; font-weight: 700; letter-spacing: -0.028em; color: var(--text); }
html[lang="ar"] .step h3 { line-height: 1.4; letter-spacing: 0; }
.step p { margin: 0.75rem 0 0; font-size: 1.125rem; line-height: 1.5; font-weight: 500; color: var(--muted); }
.step-window { margin: auto auto -2.5rem; padding-block-start: 1.5rem; inline-size: 300px; max-inline-size: 100%; block-size: 400px; overflow: hidden; }
.step-window .phone { --w: min(300px, 100%); }

@media (max-width: 1099px) {
  .step { padding: 1.75rem 1.5rem 2.5rem; }
  .step h3 { font-size: 1.75rem; }
  .step p { font-size: 1rem; }
}
@media (max-width: 899px) {
  .how-head { grid-template-columns: none; gap: 1.25rem; }
  .steps { margin-block-start: 3rem; grid-template-columns: none; max-inline-size: 32rem; margin-inline: auto; }
  .step { block-size: auto; }
  .step h3 { font-size: 2rem; }
  .step-window { margin-block-start: 2rem; }
}

/* ---------- Features icon list ---------- */

.features .h-xl { margin-inline: auto; max-inline-size: 56rem; text-align: center; }
.feature-list {
  margin: 6rem 0 0;
  padding: 0 5rem;
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 4rem;
  row-gap: 3.5rem;
}
.feature-list li { display: flex; align-items: center; gap: 1.75rem; }
.feature-list img { inline-size: 112px; block-size: 112px; object-fit: contain; flex: none; }
.feature-list h3 { font-size: 1.3125rem; line-height: 1.24; font-weight: 600; letter-spacing: -0.014em; color: var(--text); }
html[lang="ar"] .feature-list h3 { line-height: 1.5; letter-spacing: 0; }
.feature-list p { margin: 0.25rem 0 0; max-inline-size: 21.25rem; font-size: 1.0625rem; line-height: 1.47; color: var(--muted); }

@media (max-width: 1023px) { .feature-list { padding: 0; column-gap: 2.5rem; } }
@media (max-width: 719px) {
  .feature-list { margin-block-start: 3.5rem; grid-template-columns: none; row-gap: 2rem; }
  .feature-list li { gap: 1.25rem; }
  .feature-list img { inline-size: 80px; block-size: 80px; }
  .feature-list h3 { font-size: 1.1875rem; }
  .feature-list p { font-size: 1rem; }
}

/* ---------- Arabic, too ---------- */

.bilingual {
  max-width: var(--content);
  block-size: 38.75rem;
  margin-inline: auto;
  border-radius: 36px;
  background: var(--tray);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.bilingual-copy { padding-block: 4.5rem; padding-inline-start: 4.5rem; display: flex; flex-direction: column; justify-content: center; }
.lang-switch { align-self: flex-start; display: flex; padding: 4px; border-radius: 22px; background: #fff; box-shadow: 0 6px 20px rgba(17, 24, 39, 0.06); }
.lang-switch a {
  block-size: 36px;
  padding-inline: 16px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}
.lang-switch a[lang="ar"] { font-family: var(--font-arabic); font-size: 1rem; }
.lang-switch a[aria-current] { background: var(--text); color: #fff; }
.bilingual .h-xl { margin-block-start: 1.75rem; font-size: clamp(2rem, 3.4vw, 3rem); line-height: 1.125; letter-spacing: -0.029em; }
html[lang="ar"] .bilingual .h-xl { line-height: 1.35; letter-spacing: 0; }
.bilingual .sub { margin-block-start: 1.25rem; max-inline-size: 27.5rem; font-size: 1.1875rem; line-height: 1.47; }
.checks { margin: 2rem 0 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.checks li { display: flex; align-items: center; gap: 12px; font-size: 1.0625rem; font-weight: 600; color: var(--text); }
.checks li::before {
  content: "";
  inline-size: 24px;
  block-size: 24px;
  flex: none;
  border-radius: 12px;
  background: var(--check) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / 14px no-repeat;
}

.bilingual-stage { position: relative; direction: ltr; }
.bilingual-phones { position: absolute; inset: 0; }
.bilingual-phones .phone { --w: 280px; position: absolute; }
.bilingual-phones .phone.back { left: 40px; top: 205px; rotate: -6deg; opacity: 0.95; }
.bilingual-phones .phone.front { left: 250px; top: 168px; }

@media (max-width: 1099px) {
  .bilingual-copy { padding-inline-start: 3rem; }
  .bilingual-phones { transform: scale(0.82); transform-origin: 0 50%; }
}
@media (max-width: 899px) {
  .bilingual { block-size: auto; grid-template-columns: none; }
  .bilingual-copy { padding: 3rem 1.75rem 0; }
  .bilingual .h-xl br { display: none; }
  .bilingual-stage { block-size: 26rem; }
  .bilingual-phones { inset: 0 auto auto 50%; inline-size: 530px; block-size: 26rem; transform: translateX(-50%) translateY(-120px); transform-origin: 50% 0; }
}
@media (max-width: 559px) {
  .bilingual { border-radius: 28px; }
  .bilingual-copy { padding: 2.25rem 1.5rem 0; }
  .bilingual .sub { font-size: 1.0625rem; }
  .bilingual-stage { block-size: 19rem; }
  .bilingual-phones { transform: translateX(-50%) translateY(-88px) scale(0.68); }
}

/* ---------- FAQ ---------- */

.faq-block { padding-block-end: 6.25rem; }
.faq-layout { display: grid; grid-template-columns: 23.75rem 1fr; gap: 4rem; align-items: start; }
.faq-intro .sub { margin-block-start: 1.25rem; font-size: 1.1875rem; line-height: 1.47; }
.faq-intro img { margin-block-start: 2.5rem; inline-size: 120px; block-size: 120px; object-fit: contain; }
.faq-list { display: grid; gap: 12px; }
.faq-list details { border-radius: 24px; background: var(--tray); }
.faq-list summary {
  min-block-size: 80px;
  padding: 1rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 1.25rem;
  line-height: 1.35;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  list-style: none;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "";
  inline-size: 36px;
  block-size: 36px;
  flex: none;
  border-radius: 18px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231D1D1F' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center / 16px no-repeat;
}
.faq-list details[open] summary::after {
  background: var(--text) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M5 12h14'/%3E%3C/svg%3E") center / 16px no-repeat;
}
.faq-list summary:focus-visible { outline: 2px solid var(--check); outline-offset: 2px; border-radius: 24px; }
.faq-list .answer p { margin: -0.25rem 0 0; padding: 0 1.75rem 1.625rem; max-inline-size: 38rem; font-size: 1.0625rem; line-height: 1.53; font-weight: 500; color: var(--muted); }

@media (max-width: 999px) {
  .faq-layout { grid-template-columns: none; gap: 2.5rem; }
  .faq-intro img { display: none; }
}
@media (max-width: 599px) {
  .faq-list details { border-radius: 20px; }
  .faq-list summary { min-block-size: 64px; padding: 0.875rem 1.25rem; font-size: 1.0625rem; }
  .faq-list summary::after { inline-size: 32px; block-size: 32px; }
  .faq-list .answer p { padding: 0 1.25rem 1.25rem; font-size: 1rem; }
}

/* ---------- Closing sky, with the footer on it ---------- */

.closing { position: relative; overflow: hidden; background: #2f7de1; padding: 100px 24px 0; text-align: center; }
.closing-sky { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; object-fit: cover; object-position: 50% 0; }
.closing > :not(.closing-sky) { position: relative; }
.closing h2 { font-size: clamp(2.75rem, 5.6vw, 5rem); line-height: 1.05; font-weight: 600; letter-spacing: -0.03em; color: #fff; }
html[lang="ar"] .closing h2 { line-height: 1.35; letter-spacing: 0; }
.closing-lead { margin: 1.25rem auto 0; max-inline-size: 36rem; font-size: clamp(1.0625rem, 1.5vw, 1.3125rem); font-weight: 500; line-height: 1.4; color: rgba(255, 255, 255, 0.88); }
.closing-ctas { margin-block-start: 2.5rem; display: flex; flex-direction: column; align-items: center; gap: 20px; }
.qr-card { inline-size: 176px; block-size: 176px; padding: 18px; border-radius: 28px; background: #fff; box-shadow: 0 16px 40px rgba(17, 24, 39, 0.1); display: block; }
.qr-card img { inline-size: 140px; block-size: 140px; image-rendering: pixelated; }
.closing .hero-cta { margin: 0; }
.closing-phone { display: block; inline-size: min(380px, 78vw); margin: 56px auto calc(min(380px, 78vw) * -0.947); }

.site-foot { margin-inline: -24px; border-block-start: 1px solid rgba(0, 0, 0, 0.08); padding: 28px 24px 20px; text-align: start; font-size: 0.8125rem; color: var(--muted); }
.site-foot .foot-row { max-width: var(--content); margin-inline: auto; display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.site-foot .foot-logo { block-size: 22px; inline-size: auto; }
.foot-links { display: flex; flex-wrap: wrap; gap: 24px; }
.foot-links a { color: var(--muted); text-decoration: none; }
.foot-links a:hover { color: var(--text); }
.foot-note { margin: 0.75rem auto 0; max-width: var(--content); font-size: 0.75rem; color: var(--muted); }

@media (max-width: 599px) {
  .closing { padding-block-start: 72px; }
  .site-foot .foot-row { flex-direction: column; align-items: flex-start; }
}

/* ---------- App Store QR on hover (hero) ---------- */

.qr-anchor { position: relative; display: inline-flex; }
.qr-pop {
  position: absolute;
  inset-block-start: calc(100% + 14px);
  inset-inline-start: 50%;
  translate: -50% 6px;
  padding: 14px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(17, 24, 39, 0.16);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, translate 0.2s ease, visibility 0.2s;
  z-index: 5;
}
html[dir="rtl"] .qr-pop { translate: 50% 6px; }
.qr-pop img { inline-size: 120px; block-size: 120px; image-rendering: pixelated; }
.qr-pop span { display: block; margin-block-start: 8px; font-size: 0.75rem; font-weight: 600; color: var(--muted); text-align: center; }
@media (hover: hover) and (min-width: 900px) {
  .qr-anchor:hover .qr-pop, .qr-anchor:focus-within .qr-pop { opacity: 1; visibility: visible; translate: -50% 0; }
  html[dir="rtl"] .qr-anchor:hover .qr-pop, html[dir="rtl"] .qr-anchor:focus-within .qr-pop { translate: 50% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .pill, .pill.gp, .pill-item, .pill-item img { animation: none; transition: none; }
  .qr-pop { transition: none; }
}

/* ---------- Reveal on scroll ---------- */

.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .store-badge { transition: none; }
}

/* Nav: logo start, links truly centred, actions end. */
.topbar .wrap { display: grid; grid-template-columns: 1fr auto 1fr; }
.topbar .wordmark { justify-self: start; }
.topbar .topnav { margin-inline-start: 0; align-items: center; }
.topbar .actions, .topbar.scrolled .actions { justify-self: end; margin-inline-start: 0; }
@media (max-width: 879px) { .topbar .wrap { grid-template-columns: 1fr auto; } }

/* The sentence always sits on the same three lines; landing.js scales the type so the longest words fit. */
.log-sentence { max-width: none; text-wrap: initial; }
.ls-line { display: block; white-space: nowrap; }
.log-sentence { position: relative; }

/* Footer: a solid black band under the closing sky. */
.site-foot { position: relative; background: #000; border-block-start: 0; color: rgba(255, 255, 255, 0.6); }
.site-foot .foot-logo { filter: brightness(0) invert(1); }
.foot-links a, .foot-note { color: rgba(255, 255, 255, 0.6); }
.foot-links a:hover { color: #fff; }
.site-foot { z-index: 2; }
.pill-item { white-space: nowrap; inline-size: max-content; }

/* Softer, springier word change: the old word drifts up and dissolves, the new one rises, overshoots a touch and settles. */
@keyframes pillOut2 {
  0% { opacity: 1; transform: none; filter: blur(0); }
  100% { opacity: 0; transform: translateY(-38%) scale(0.92); filter: blur(8px); }
}
@keyframes pillIn2 {
  0% { opacity: 0; transform: translateY(42%) scale(0.9); filter: blur(8px); }
  55% { opacity: 1; transform: translateY(-6%) scale(1.02); filter: blur(0); }
  78% { transform: translateY(2%) scale(0.995); }
  100% { opacity: 1; transform: none; filter: blur(0); }
}
@keyframes iconIn2 {
  0% { transform: scale(0.35) rotate(-28deg); }
  50% { transform: scale(1.12) rotate(calc(var(--r, 0deg) + 8deg)); }
  75% { transform: scale(0.97) rotate(calc(var(--r, 0deg) - 3deg)); }
  100% { transform: scale(1) rotate(var(--r, 0deg)); }
}
.pill-item.is-leaving { animation: pillOut2 0.7s cubic-bezier(0.55, 0, 0.75, 0.2) forwards; }
.pill-item.is-entering { animation: pillIn2 1.25s cubic-bezier(0.22, 1, 0.36, 1) 0.18s both; }
.pill-item.is-entering img { rotate: none; animation: iconIn2 1.35s cubic-bezier(0.22, 1, 0.36, 1) 0.18s both; }
.block { padding-block-start: clamp(10rem, 25vw, 22.5rem); }

/* Scrolled bar: even breathing room on both ends, and links centred on the same line as logo and button. */
.topbar.scrolled .wrap { padding-inline: 1.25rem 0.625rem; }
.topnav { align-self: center; }
.topnav a { display: inline-flex; align-items: center; }
.topnav .roll { vertical-align: middle; }

/* Food cards fanned on a slowly turning arc above the footer (graphicalui-style). */
.food-arc { position: relative; z-index: 2; margin-inline: -24px; block-size: clamp(260px, 30vw, 400px); background: #000; overflow: hidden; }
.arc-card {
  position: absolute; left: 50%; inline-size: clamp(150px, 15vw, 220px); aspect-ratio: 22 / 15;
  border-radius: clamp(18px, 1.8vw, 26px); padding: clamp(12px, 1.2vw, 18px);
  display: flex; flex-direction: column; justify-content: space-between;
  font-weight: 600; color: #222; will-change: transform;
}
.arc-card img { position: absolute; inset-inline-end: 6%; inset-block-end: 8%; inline-size: 52%; block-size: 70%; object-fit: contain; }
.arc-card b { font-size: clamp(0.8rem, 1.05vw, 1.0625rem); letter-spacing: -0.01em; max-inline-size: 55%; line-height: 1.2; }
.arc-card span { font-size: clamp(0.7rem, 0.85vw, 0.875rem); font-weight: 500; opacity: 0.6; }
.arc-card.dark { color: #fff; }
.arc-card span { position: relative; z-index: 1; max-inline-size: 48%; } .arc-card img { inline-size: 48%; }
.arc-card { inline-size: clamp(160px, 17vw, 250px); transition: none; box-shadow: 0 18px 40px rgba(0,0,0,0.35); } .food-arc { block-size: clamp(300px, 34vw, 480px); }
.block { padding-block-start: clamp(8rem, 19vw, 17rem); }
.faq-list summary::after { transition: background-color 0.3s ease, rotate 0.4s cubic-bezier(0.22, 1, 0.36, 1); }
.faq-list details[open]:not(.closing) summary::after { rotate: 180deg; }
.faq-list details.closing summary::after {
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231D1D1F' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center / 16px no-repeat;
}
.arc-card { aspect-ratio: auto; inline-size: auto; padding: 1.1em 1.2em; box-shadow: 0 1.4em 3em rgba(0, 0, 0, 0.4); }
.arc-card b { font-size: 1.15em; } .arc-card span { font-size: 0.9em; }
.food-arc { block-size: auto; }
.faq-list .answer { display: flow-root; }

/* Floating QR widget (desktop). */
.qr-float {
  position: fixed; inset-inline-end: 28px; inset-block-end: 0; z-index: 60; inline-size: 300px;
  display: flex; flex-direction: column; align-items: center;
  opacity: 0; transform: translateY(40px) scale(0.96); pointer-events: none;
  transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.qr-float.is-in { opacity: 1; transform: none; pointer-events: auto; }
.qr-float-code { display: block; padding: 20px; border-radius: 28px; background: #fff; box-shadow: 0 16px 40px rgba(17, 24, 39, 0.14); }
.qr-float-code img { display: block; inline-size: 150px; block-size: 150px; image-rendering: pixelated; }
.qr-float-bubble { position: relative; margin-block-start: 16px; inline-size: 100%; box-sizing: border-box; padding: 20px 48px 20px 24px; border-radius: 26px; background: #fff; box-shadow: 0 16px 40px rgba(17, 24, 39, 0.14); color: #1d1d1f; text-align: start; }
.qr-float-bubble b { display: block; font-size: 1.125rem; line-height: 1.3; letter-spacing: -0.01em; }
.qr-float-bubble p { margin: 6px 0 0; font-size: 0.9375rem; line-height: 1.45; color: #6e6e73; }
.qr-float-bubble button { position: absolute; inset-block-start: 10px; inset-inline-end: 10px; inline-size: 36px; block-size: 36px; border: 0; border-radius: 18px; background: transparent; color: #86868b; display: grid; place-items: center; cursor: pointer; }
.qr-float-bubble button:hover { background: #f4f4f4; }
.qr-float-dot { align-self: flex-start; border-radius: 50%; background: #fff; box-shadow: 0 6px 16px rgba(17, 24, 39, 0.14); }
.qr-float-dot.a { margin: 10px 0 0 34px; inline-size: 18px; block-size: 18px; }
.qr-float-dot.b { margin: 6px 0 0 54px; inline-size: 10px; block-size: 10px; }
html[dir="rtl"] .qr-float-dot.a { margin: 10px 34px 0 0; } html[dir="rtl"] .qr-float-dot.b { margin: 6px 54px 0 0; }
.qr-float-bear { margin-block-start: -4px; inline-size: 170px; block-size: auto; }
@media (prefers-reduced-motion: reduce) { .qr-float { transition: none; } }
.qr-float { inline-size: 260px; } .qr-float-code img { inline-size: 120px; block-size: 120px; } .qr-float-code { padding: 16px; border-radius: 24px; } .qr-float-bear { inline-size: 140px; }
/* Footer fan: bare 3D food objects, no card or label. */
.arc-card.arc-food { background: none; box-shadow: none; padding: 0; border-radius: 0; }
.arc-card.arc-food img { position: static; inline-size: 100%; block-size: 100%; object-fit: contain; filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.45)); }

/* Footer: a row of food "stamps" peeking up from the bottom edge (altitude.xyz style).
   Hovering lifts a stamp and its neighbours less and less; they spring back on leave. */
.food-arc { display: none; }
.food-stamps {
  --stamp-w: clamp(93px, 10.5vw, 152px);
  --stamp-lift: calc(var(--stamp-w) * -0.1659);
  position: relative; z-index: 2; margin-inline: -24px; background: #000;
  display: flex; justify-content: center; gap: clamp(16px, 2.2vw, 32px);
  block-size: calc(var(--stamp-w) * 0.82); padding-block-start: 32px; overflow: hidden;
}
.stamp { flex: none; inline-size: var(--stamp-w); aspect-ratio: 480 / 610; }
.stamp-art {
  position: relative; display: block; block-size: 100%; border: calc(var(--stamp-w) * 0.075) solid #fff;
  box-sizing: border-box; display: grid; place-items: center;
  transform: translateY(var(--stamp-shift, 0px)) scale(var(--stamp-pop, 1));
  transition: transform 0.44s cubic-bezier(0.34, 2.7, 0.64, 1);
}
.stamp-art::before {
  content: ""; position: absolute; inset: calc(var(--stamp-w) * -0.075 - 5px);
  background:
    radial-gradient(circle, #000 4.5px, transparent 5px) 0 0 / 15px 10px repeat-x,
    radial-gradient(circle, #000 4.5px, transparent 5px) 0 100% / 15px 10px repeat-x,
    radial-gradient(circle, #000 4.5px, transparent 5px) 0 0 / 10px 15px repeat-y,
    radial-gradient(circle, #000 4.5px, transparent 5px) 100% 0 / 10px 15px repeat-y;
  pointer-events: none;
}
.stamp-art img { inline-size: 82%; block-size: 82%; object-fit: contain; }
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .stamp:hover .stamp-art { --stamp-shift: var(--stamp-lift); --stamp-pop: 1.05; }
  .stamp:hover + .stamp .stamp-art, .stamp:has(+ .stamp:hover) .stamp-art { --stamp-shift: calc(var(--stamp-lift) * 0.62); }
  .stamp:hover + .stamp + .stamp .stamp-art, .stamp:has(+ .stamp + .stamp:hover) .stamp-art { --stamp-shift: calc(var(--stamp-lift) * 0.36); }
  .stamp:hover + .stamp + .stamp + .stamp .stamp-art, .stamp:has(+ .stamp + .stamp + .stamp:hover) .stamp-art { --stamp-shift: calc(var(--stamp-lift) * 0.16); }
  .food-stamps:has(.stamp:hover) .stamp-art { transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1); }
}
