/* ==========================================================================
   Cal Habibi — marketing site

   Palette descends from lib/core/theme/tokens.dart, warmed for the web:
   the app's neutrals are cool (#F8F9FB), which makes food photography look
   refrigerated. Everything here is the same hue family, shifted warm.
   ========================================================================== */

:root {
  /* Ink & paper — warm near-black on ivory. The secondary inks are dark
     enough to read as text rather than as a grey wash: the lighter pair
     this replaced made every paragraph on the page feel faint. */
  --ink: #17120F;
  --ink-2: #4A423B;
  --ink-3: #6B625A;
  --paper: #FBF8F2;
  --band: #F3ECE1;
  --line: #E8DFD2;
  --line-2: #D9CDBD;

  /* The one dark surface: warm, not a neutral near-black. */
  --night: #1A1411;
  --night-ink: #F6EFE6;
  --night-ink-2: #BDB1A5;
  --night-line: rgba(246, 239, 230, .14);

  /* Brand — the app's gradient, plus saffron as the supporting warm tone */
  --coral: #FF5E62;
  --apricot: #FF9966;
  --saffron: #E8A33D;
  --grad: linear-gradient(135deg, #FF9966 0%, #FF5E62 100%);

  /* Macro identity, from the app */
  --protein: #FF5E62;
  --carbs: #FF9966;
  --fat: #4C8DFF;

  --radius-s: 12px;
  --radius-m: 18px;
  --radius-l: 26px;
  --radius-xl: 34px;
  --radius-pill: 999px;

  /* Warm-tinted shadows. A neutral-grey shadow on a warm page reads dirty. */
  --shadow-s: 0 1px 2px rgba(60, 40, 25, .05), 0 8px 20px -10px rgba(60, 40, 25, .12);
  --shadow-m: 0 1px 2px rgba(60, 40, 25, .05), 0 26px 50px -22px rgba(60, 40, 25, .24);
  --shadow-chip: 0 2px 6px rgba(60, 40, 25, .07), 0 14px 30px -14px rgba(60, 40, 25, .26);

  --font: "IBM Plex Sans Arabic", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  /* English display only. Instrument Serif ships a single regular weight,
     so anything set in it must stay at 400 or the browser fakes a bold. */
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --page: 1180px;
  --gutter: clamp(20px, 5vw, 44px);
  --ease: cubic-bezier(.22, .68, .28, 1);
}

/* ===== Reset ============================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body, h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding-inline-start: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }

body {
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
::selection { background: rgba(255, 94, 98, .16); }

/* ===== Layout ============================================================ */
.wrap {
  width: 100%;
  max-width: var(--page);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* One vertical-rhythm class. Modifiers change colour only, never padding,
   so no two rules here can cancel each other out. */
.sec { padding-block: clamp(72px, 9.5vw, 128px); }
.sec--band { background: var(--band); }
.sec--tight { padding-block: clamp(44px, 5vw, 72px); }
/* The page's single dark surface. Everything inside it inverts through
   these custom properties, so components need no night variants. */
.sec--night {
  --ink: var(--night-ink);
  --ink-2: var(--night-ink-2);
  --ink-3: var(--night-ink-2);
  --line: var(--night-line);
  --line-2: var(--night-line);
  background: var(--night);
  color: var(--ink);
  /* Glows inside stay inside: without this the stage's light spills a
     pink haze onto the ivory section below. */
  overflow: clip;
}

/* ===== Type ============================================================== */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -.005em;
  color: var(--ink-2);
}
/* A single saffron tick — the section's own small mark. */
.eyebrow::before {
  content: "";
  width: 16px;
  height: 1.5px;
  background: var(--saffron);
  border-radius: 2px;
}

/* Headings are English serif display; the Arabic block at the end of this
   file puts Arabic back in Plex with its own scale. */
.h-sec {
  font-family: var(--serif);
  font-size: clamp(40px, 5.6vw, 68px);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -.015em;
  margin-block-start: 18px;
  max-width: 17ch;
  text-wrap: balance;
}

.lede {
  font-size: clamp(17px, 1.7vw, 19.5px);
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 54ch;
  margin-block-start: 22px;
}

.sec-head { margin-block-end: clamp(40px, 5.5vw, 62px); }

/* ===== Buttons =========================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: none;
  border-radius: var(--radius-pill);
  padding: 15px 28px;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -.01em;
  cursor: pointer;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease);
}
.btn--ink { background: var(--ink); color: #fff; box-shadow: var(--shadow-s); }
.btn--ink:hover { transform: translateY(-2px); box-shadow: var(--shadow-m); }
.btn--sm { padding: 11px 20px; font-size: 14px; }

/* Store badges ------------------------------------------------------------ */
.stores { display: flex; flex-wrap: wrap; gap: 12px; margin-block-start: 32px; }
.store {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 22px 12px 18px;
  border-radius: 15px;
  background: var(--ink);
  color: #fff;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease);
}
.store:hover { transform: translateY(-2px); box-shadow: var(--shadow-m); }
.store svg { flex: none; }
.store .lbl { display: block; }
.store .lbl span { display: block; font-size: 10.5px; font-weight: 400; opacity: .72; letter-spacing: .05em; text-transform: uppercase; line-height: 1.3; }
.store .lbl b { display: block; font-size: 15px; font-weight: 600; line-height: 1.2; letter-spacing: -.01em; }

/* Not-yet-live listings: honest, visibly inert, never a dead href="#". */
.store.is-soon {
  background: transparent;
  color: var(--ink-3);
  box-shadow: inset 0 0 0 1px var(--line-2);
  cursor: not-allowed;
}
.store.is-soon:hover { transform: none; box-shadow: inset 0 0 0 1px var(--line-2); }
.store.is-soon svg { opacity: .45; }
.store.is-soon .lbl b { color: var(--ink-2); }

.stores-note { margin-block-start: 18px; font-size: 13.5px; color: var(--ink-2); }
.stores-note b { font-weight: 500; color: var(--ink); }

/* ===== Header ============================================================ */
.hdr {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 248, 242, .8);
  backdrop-filter: saturate(1.8) blur(16px);
  border-block-end: 1px solid transparent;
  transition: border-color .25s var(--ease), background-color .25s var(--ease);
}
.hdr.is-stuck { border-block-end-color: var(--line); background: rgba(251, 248, 242, .92); }
.hdr .wrap { display: flex; align-items: center; gap: 20px; min-height: 74px; }

.mark {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -.02em;
  margin-inline-end: auto;
}
.mark img { width: 31px; height: 31px; border-radius: 9px; }

.nav { display: flex; align-items: center; gap: 32px; }
.nav a { font-size: 14.5px; font-weight: 500; color: var(--ink-2); transition: color .18s var(--ease); }
.nav a:hover { color: var(--ink); }
/* .nav a outranks .btn--ink, which left the header button's label in grey
   on near-black. The button keeps its own white. */
.nav .btn--ink, .nav .btn--ink:hover { color: #fff; }
.nav .lang {
  font-size: 13.5px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  box-shadow: inset 0 0 0 1px var(--line-2);
  transition: box-shadow .18s var(--ease), color .18s var(--ease);
}
.nav .lang:hover { box-shadow: inset 0 0 0 1px var(--ink); }

.burger { display: none; width: 42px; height: 42px; align-items: center; justify-content: center; background: none; border: none; cursor: pointer; border-radius: var(--radius-s); }
.burger:hover { background: var(--band); }
.burger i { display: block; position: relative; width: 18px; height: 1.5px; background: var(--ink); border-radius: 2px; transition: background-color .22s var(--ease); }
.burger i::before, .burger i::after { content: ""; position: absolute; inset-inline-start: 0; width: 18px; height: 1.5px; background: var(--ink); border-radius: 2px; transition: transform .26s var(--ease); }
.burger i::before { transform: translateY(-6px); }
.burger i::after { transform: translateY(6px); }
.burger[aria-expanded="true"] i { background: transparent; }
.burger[aria-expanded="true"] i::before { transform: rotate(45deg); }
.burger[aria-expanded="true"] i::after { transform: rotate(-45deg); }

/* ===== Hero ============================================================== */
.hero { position: relative; padding-block: clamp(44px, 6.5vw, 92px) clamp(56px, 7vw, 96px); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr);
  align-items: center;
  gap: clamp(44px, 6vw, 80px);
}

/* A plain line of text with a saffron point — a badge would compete with
   the headline directly beneath it. */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--saffron); flex: none; }
.pill .dot svg { display: none; }

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(54px, 8vw, 104px);
  font-weight: 400;
  line-height: .96;
  letter-spacing: -.02em;
  margin-block-start: 26px;
  text-wrap: balance;
}
.hero h1 em { font-style: normal; color: inherit; }
.hero .lede { font-size: clamp(17.5px, 1.8vw, 20px); margin-block-start: 28px; }

/* Signature: you are looking through the app's viewfinder ------------------ */
.scan { position: relative; aspect-ratio: 4 / 5; width: 100%; max-width: 520px; margin-inline: auto; }
.scan-shot {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-m);
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(60, 40, 25, .06), 0 40px 80px -40px rgba(60, 40, 25, .45);
}
.scan-shot img { width: 100%; height: 100%; object-fit: cover; }
/* A soft vignette so white chips and frame read against any photograph,
   however busy or bright the crop turns out to be. */
.scan-shot::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(23, 18, 15, .34) 0%, transparent 38%),
    radial-gradient(120% 100% at 50% 50%, transparent 46%, rgba(23, 18, 15, .3) 100%);
}

.scan-frame { position: absolute; inset: 6%; pointer-events: none; overflow: visible; }
.scan-frame path {
  fill: none;
  stroke: #fff;
  stroke-width: 1.1;
  stroke-linecap: round;
  opacity: .8;
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, .35));
}

/* Labels the scan reads off the plate: small, frosted, inside the frame
   rather than hanging off it. */
.chip {
  position: absolute;
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: rgba(251, 248, 242, .88);
  backdrop-filter: blur(10px);
  box-shadow: 0 6px 20px -8px rgba(23, 18, 15, .35);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}
.chip data { font-size: 12.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.chip--1 { inset-block-start: 11%; inset-inline-start: 10%; }
.chip--2 { inset-block-start: 40%; inset-inline-end: 8%; }
.chip--3 { inset-block-end: 26%; inset-inline-start: 10%; }

/* The total. Centred with logical insets and auto margins, never with
   inset + translate: in RTL, inset-inline-end is the LEFT edge, so a
   translate(50%) pushed this card off the right of the screen. */
.tally {
  position: absolute;
  inset-block-end: -30px;
  inset-inline: 0;
  margin-inline: auto;
  width: fit-content;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 16px 24px;
  border-radius: var(--radius-m);
  background: var(--paper);
  box-shadow: 0 1px 2px rgba(60, 40, 25, .06), 0 24px 48px -24px rgba(60, 40, 25, .4);
}
.tally-k { font-size: 12.5px; color: var(--ink-3); line-height: 1.3; }
.tally-v { font-family: var(--serif); font-size: 44px; line-height: 1; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.tally-macros { display: flex; gap: 18px; padding-inline-start: 22px; border-inline-start: 1px solid var(--line); }
.tally-macro { text-align: center; }
.tally-macro b { display: block; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tally-macro span { display: block; font-size: 12px; color: var(--ink-3); }
/* Macro identity as a short bar, not coloured text: coral and apricot on
   paper do not reach 4.5:1 at this size. */
.tally-macro::before { content: ""; display: block; width: 16px; height: 3px; border-radius: 2px; margin: 0 auto 7px; }
.tally-macro:nth-child(1)::before { background: var(--protein); }
.tally-macro:nth-child(2)::before { background: var(--carbs); }
.tally-macro:nth-child(3)::before { background: var(--fat); }

/* ===== Knows-this ticker =================================================
   The dishes it recognises, moving past like a menu board. Content, not
   decoration: this list *is* the differentiator. */
.ticker {
  border-block: 1px solid var(--line);
  background: var(--paper);
  padding-block: 20px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 9%, #000 91%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 9%, #000 91%, transparent);
}
.ticker-row { display: flex; width: max-content; animation: slide 46s linear infinite; }
.ticker:hover .ticker-row { animation-play-state: paused; }
.ticker-seq { display: flex; align-items: center; gap: 38px; padding-inline-end: 38px; }
.ticker-item { display: inline-flex; align-items: baseline; gap: 10px; font-size: 17px; font-weight: 500; letter-spacing: -.02em; white-space: nowrap; }
.ticker-item span { font-size: 15px; color: var(--ink-3); }
.ticker-sep { width: 5px; height: 5px; border-radius: 50%; background: var(--saffron); flex: none; align-self: center; }

@keyframes slide { to { transform: translateX(-50%); } }
[dir="rtl"] .ticker-row { animation-name: slide-rtl; }
@keyframes slide-rtl { to { transform: translateX(50%); } }

/* ===== Steps =============================================================
   A real sequence, so it is numbered — in the display serif, large enough
   to carry the column on the dark section without any other ornament. */
.steps { display: grid; gap: 0; counter-reset: step; }
.step {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  column-gap: 20px;
  padding-block: 26px;
  border-block-start: 1px solid var(--line-2);
}
.step:last-child { border-block-end: 1px solid var(--line-2); }
.step::before {
  counter-increment: step;
  content: counter(step);
  grid-row: span 2;
  font-family: var(--serif);
  font-size: 44px;
  line-height: .9;
  color: var(--saffron);
}
.step h3 { font-size: 21px; font-weight: 600; letter-spacing: -.02em; line-height: 1.3; }
.step p { color: var(--ink-2); font-size: 16.5px; margin-block-start: 8px; max-width: 46ch; }

/* ===== Pillars ===========================================================
   One lead card for logging — the thing people do every day — and two
   supporting cards stacked beside it. Hierarchy comes from size and
   surface, not from ticks and badges. */
.pillars {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(16px, 2vw, 22px);
}
.pillar {
  background: var(--paper);
  border-radius: var(--radius-m);
  padding: clamp(28px, 3.2vw, 44px);
  box-shadow: inset 0 0 0 1px var(--line-2);
}
/* The lead card is as tall as the two beside it; its list settles to the
   bottom so the height reads as composition, not as leftover space. */
.pillar:first-child {
  grid-row: span 2;
  display: flex;
  flex-direction: column;
  background: var(--band);
  box-shadow: none;
  padding: clamp(32px, 4.4vw, 60px);
}
.pillar:first-child ul { margin-block-start: auto; padding-block-start: 32px; }
.pillar-ico { color: var(--coral); }
.pillar-ico svg { width: 26px; height: 26px; }
.pillar h3 {
  font-family: var(--serif);
  font-size: clamp(28px, 2.6vw, 34px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -.01em;
  margin-block: 20px 14px;
}
.pillar:first-child h3 { font-size: clamp(36px, 3.8vw, 50px); margin-block: 28px 22px; }
.pillar li { padding-block: 13px; font-size: 16px; line-height: 1.55; color: var(--ink-2); border-block-start: 1px solid var(--line); }
.pillar li:first-of-type { border-block-start: none; padding-block-start: 0; }
.pillar li b { font-weight: 600; color: var(--ink); }
.pillar:first-child li { font-size: 17.5px; padding-block: 18px; border-color: var(--line-2); }
.pillar:first-child li:first-of-type { padding-block-start: 0; }

/* ===== Regional ==========================================================
   Type-led: the heading at full display size with its other-language twin
   beneath it, then the argument in two columns. The hero already carries
   the photograph; showing it twice made the page feel short of material. */
.regional .h-sec { font-size: clamp(46px, 7vw, 92px); max-width: 14ch; }
/* Shrink-wrapped so the other-language line sits under the heading's
   leading edge; as a full-width RTL block it drifted to the far side. */
.regional-twin {
  width: fit-content;
  margin-block-start: 18px;
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 500;
  line-height: 1.5;
  color: var(--ink-3);
}
.regional-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 64px);
  margin-block-start: clamp(40px, 5vw, 64px);
  padding-block-start: clamp(28px, 3vw, 40px);
  border-block-start: 1px solid var(--line-2);
}
.regional-body .lede { margin-block-start: 0; }

/* ===== Credibility ======================================================= */
.credit { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(30px, 4vw, 60px); align-items: start; }
.credit-note { border-inline-start: 2px solid var(--saffron); padding-inline-start: 28px; }
.credit-note p { color: var(--ink-2); font-size: 17px; }
.credit-note p + p { margin-block-start: 18px; }
.credit-note b { color: var(--ink); font-weight: 600; }

/* ===== FAQ =============================================================== */
.faq { max-width: 780px; }
.faq details { border-block-end: 1px solid var(--line-2); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-block: 26px;
  font-size: clamp(18px, 1.8vw, 20.5px);
  font-weight: 500;
  letter-spacing: -.015em;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  width: 11px; height: 11px;
  border-inline-end: 1.5px solid var(--ink-3);
  border-block-end: 1.5px solid var(--ink-3);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform .25s var(--ease);
}
.faq details[open] summary::after { transform: rotate(225deg) translate(-2px, -2px); }
.faq details p { padding-block-end: 25px; color: var(--ink-2); max-width: 62ch; }
.faq details a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.faq details[open] p { animation: fade-up .32s var(--ease); }

/* ===== Closing CTA =======================================================
   The one place the geometry shows: an eight-fold star grid, hairline, at
   the threshold of visible. Structure borrowed, not ornament applied. */
.close-cta {
  position: relative;
  border-radius: var(--radius-xl);
  padding: clamp(52px, 6.5vw, 88px) var(--gutter);
  text-align: center;
  background: var(--ink);
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}
.close-cta .geo {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  color: #fff;
  opacity: .07;
  z-index: -1;
}
.close-cta::before {
  content: "";
  position: absolute;
  inset-block-start: -46%;
  inset-inline-start: 50%;
  translate: -50% 0;
  width: min(820px, 125%);
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(255, 94, 98, .32) 0%, rgba(232, 163, 61, .12) 44%, transparent 68%);
  pointer-events: none;
  z-index: -1;
}
.close-cta h2 {
  font-family: var(--serif);
  font-size: clamp(44px, 6.4vw, 80px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -.015em;
  max-width: 16ch;
  margin-inline: auto;
  text-wrap: balance;
}
.close-cta p { color: rgba(255, 255, 255, .66); margin-block-start: 20px; }
.close-cta .stores { justify-content: center; }
.close-cta .store.is-soon { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2); color: rgba(255, 255, 255, .48); }
.close-cta .store.is-soon .lbl b { color: rgba(255, 255, 255, .8); }
.close-cta .store.is-soon:hover { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2); }
.close-cta .stores-note { color: rgba(255, 255, 255, .5); }
.close-cta .stores-note b { color: rgba(255, 255, 255, .74); }

/* ===== Footer ============================================================ */
.ftr { border-block-start: 1px solid var(--line); padding-block: 46px; }
.ftr .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; }
.ftr-links { display: flex; flex-wrap: wrap; gap: 27px; margin-inline-start: auto; }
.ftr a { font-size: 14px; color: var(--ink-2); transition: color .18s var(--ease); }
.ftr a:hover { color: var(--ink); }
.ftr small { font-size: 13px; color: var(--ink-3); }

/* ===== Legal pages ======================================================= */
.legal { max-width: 700px; }
.legal h1 { font-size: clamp(33px, 4.4vw, 48px); font-weight: 600; letter-spacing: -.04em; line-height: 1.08; }
.legal .updated { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin-block-start: 15px; }
.legal h2 { font-size: 20px; font-weight: 600; letter-spacing: -.02em; margin-block: 44px 13px; }
.legal p { color: var(--ink-2); }
.legal ul { color: var(--ink-2); padding-inline-start: 1.25em; margin-block: 13px; list-style: disc; }
.legal li { margin-block: 6px; }
.legal a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* ===== Accessibility ===================================================== */
.skip {
  position: absolute;
  inset-inline-start: -9999px;
  inset-block-start: 0;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 14px 20px;
  border-end-end-radius: var(--radius-s);
}
.skip:focus { inset-inline-start: 0; }

:where(a, button, summary, [tabindex]):focus-visible {
  outline: 2.5px solid var(--coral);
  outline-offset: 3px;
  border-radius: 5px;
}

/* ===== Motion ============================================================
   One orchestrated load in the hero: the frame draws, then the read
   resolves, then the total lands. Everything else is a quiet reveal. */
.scan-frame path {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: draw .8s var(--ease) .2s forwards;
}
.chip, .tally { opacity: 0; animation: pop .5s cubic-bezier(.2, .84, .3, 1) forwards; }
.chip--1 { animation-delay: .60s; }
.chip--2 { animation-delay: .72s; }
.chip--3 { animation-delay: .84s; }
.tally   { animation-delay: 1.00s; }

.hero-copy > * { opacity: 0; animation: fade-up .7s var(--ease) forwards; }
.hero-copy > *:nth-child(1) { animation-delay: .05s; }
.hero-copy > *:nth-child(2) { animation-delay: .13s; }
.hero-copy > *:nth-child(3) { animation-delay: .21s; }
.hero-copy > *:nth-child(4) { animation-delay: .29s; }
.hero-copy > *:nth-child(5) { animation-delay: .37s; }

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
/* Children stagger within a revealed group. */
.stagger > * { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.stagger.is-in > * { opacity: 1; transform: none; }
.stagger.is-in > *:nth-child(1) { transition-delay: .04s; }
.stagger.is-in > *:nth-child(2) { transition-delay: .13s; }
.stagger.is-in > *:nth-child(3) { transition-delay: .22s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0ms !important;
  }
  .scan-frame path { stroke-dashoffset: 0; }
  .chip, .tally, .hero-copy > * { opacity: 1; }
  .reveal, .stagger > * { opacity: 1; transform: none; }
  .ticker-row { animation: none; }
}

/* ===== Arabic typography =================================================
   Arabic is a connected script: the negative tracking that tightens Latin
   display type pinches the joins and crowds the diacritics. Reset it, and
   give the headings back the leading the marks need. */
[lang="ar"] .h-sec,
[lang="ar"] .hero h1,
[lang="ar"] .close-cta h2,
[lang="ar"] .legal h1,
[lang="ar"] .legal h2,
[lang="ar"] .step h3,
[lang="ar"] .pillar h3,
[lang="ar"] .faq summary,
[lang="ar"] .mark,
[lang="ar"] .btn,
[lang="ar"] .lede,
[lang="ar"] .store .lbl b {
  letter-spacing: normal;
}
[lang="ar"] .legal h1 { line-height: 1.3; }

/* Arabic display is Plex, not the Latin serif, and it is scaled on its own
   terms: a size smaller than the serif (Arabic reads larger at the same
   em), heavier, and with the leading the marks above and below need. */
[lang="ar"] .hero h1,
[lang="ar"] .h-sec,
[lang="ar"] .close-cta h2,
[lang="ar"] .pillar h3 {
  font-family: var(--font);
  font-weight: 600;
}
[lang="ar"] .hero h1 { font-size: clamp(44px, 6.4vw, 80px); line-height: 1.3; }
[lang="ar"] .h-sec { font-size: clamp(32px, 4.4vw, 52px); line-height: 1.38; max-width: 20ch; }
[lang="ar"] .regional .h-sec { font-size: clamp(38px, 5.4vw, 70px); line-height: 1.32; }
[lang="ar"] .close-cta h2 { font-size: clamp(34px, 5vw, 60px); line-height: 1.34; }
[lang="ar"] .pillar h3 { font-size: clamp(22px, 2vw, 25px); line-height: 1.5; }
[lang="ar"] .pillar:first-child h3 { font-size: clamp(28px, 3vw, 36px); }
[lang="ar"] .step h3 { letter-spacing: normal; }
[lang="ar"] body { line-height: 1.85; }
[lang="ar"] .lede { line-height: 1.9; }
[lang="ar"] .pillar li { line-height: 1.85; }
[lang="ar"] .faq summary { letter-spacing: normal; }
/* The twin line under the Arabic heading is English: give it the serif. */
[lang="ar"] .regional-twin { font-family: var(--serif); font-weight: 400; line-height: 1.15; }
/* The eyebrow's wide tracking is a Latin small-caps device; in Arabic it
   just separates letters that should be joined. */
[lang="ar"] .eyebrow { letter-spacing: .04em; }
/* Latin runs inside Arabic copy (dish names, store names) keep their own. */
[lang="ar"] [lang="en"] { letter-spacing: -.01em; }

/* ===== Responsive ======================================================== */
@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: 1fr; gap: 60px; }
  .hero-copy { max-width: 640px; }
  .scan { max-width: 470px; }
  .regional-body { grid-template-columns: 1fr; }
  .credit { grid-template-columns: 1fr; }
  .pillars { grid-template-columns: 1fr; }
  .pillar:first-child { grid-row: auto; }
}

@media (max-width: 760px) {
  .burger { display: inline-flex; }
  .nav {
    position: absolute;
    inset-inline: 0;
    inset-block-start: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 16px var(--gutter) 26px;
    background: var(--paper);
    border-block-end: 1px solid var(--line);
    box-shadow: var(--shadow-m);
  }
  .nav.is-open { display: flex; animation: fade-up .3s var(--ease); }
  .nav a { padding-block: 13px; font-size: 16px; color: var(--ink); }
  .nav .lang { align-self: flex-start; margin-block-start: 6px; }
  .nav .btn { margin-block-start: 12px; }

  .chip { font-size: 12px; padding: 7px 12px; }
  .chip data { font-size: 11.5px; }
  .chip--1, .chip--3 { inset-inline-start: 7%; }
  .chip--2 { inset-inline-end: 7%; }
  .tally { gap: 16px; padding: 13px 18px; }
  .tally-v { font-size: 34px; }
  .tally-macros { gap: 13px; padding-inline-start: 16px; }
  .step { grid-template-columns: 40px minmax(0, 1fr); column-gap: 14px; }
  .step::before { font-size: 36px; }

  .ticker-item { font-size: 15px; }
  .ftr-links { margin-inline-start: 0; width: 100%; }
}

/* ===== Cookie consent banner ============================================= */
.consent {
  position: fixed;
  inset-inline: 0;
  inset-block-end: 0;
  z-index: 60;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
  padding: 18px var(--gutter);
  background: var(--paper);
  border-block-start: 1px solid var(--line);
  box-shadow: var(--shadow-m);
  animation: consent-up .32s var(--ease);
}
.consent[hidden] { display: none; }
.consent p {
  flex: 1 1 320px;
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-2);
}
.consent p a { color: var(--ink); text-decoration: underline; }
.consent-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.consent-actions .btn { padding: 12px 22px; font-size: 14px; }
.btn--outline {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-2);
}
.btn--outline:hover { background: var(--band); }

@keyframes consent-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .consent { animation: none; }
}

@media (max-width: 560px) {
  .consent { flex-direction: column; align-items: stretch; }
  .consent-actions { width: 100%; }
  .consent-actions .btn { flex: 1; }
}

/* ===== Password reset ====================================================
   reset.html only — the page an Appwrite recovery mail links to. Narrow
   measure and a single column: there is exactly one thing to do here, and
   the marketing layout's width would make a two-field form look lost.
   ========================================================================== */
.reset { max-width: 520px; }
.reset h1 {
  font-size: clamp(29px, 4vw, 40px);
  font-weight: 600;
  letter-spacing: -.035em;
  line-height: 1.1;
}
.reset-lede { color: var(--ink-2); margin-block-start: 15px; }
.reset-note { color: var(--ink-3); font-size: 14px; margin-block-start: 8px; }
.reset form { margin-block-start: 30px; }

.field { display: block; margin-block-start: 22px; }
.field > span {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-block-end: 8px;
}
.field input {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-s);
  padding: 14px 16px;
}
.field input:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 1px;
  border-color: transparent;
}

/* Danger is stated in words as well as colour — the message says what is
   wrong, so the red is reinforcement rather than the only signal. */
.reset-error {
  color: #C2312F;
  font-size: 14px;
  font-weight: 500;
  margin-block-start: 18px;
}
.reset-done {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -.02em;
  margin-block-start: 18px;
}
.reset .btn { margin-block-start: 26px; }
.reset .btn[disabled] { opacity: .6; cursor: default; transform: none; }

/* ===== Group invite ========================================================
   join/index.html only — the landing page an invite link opens when the app
   is not installed. Shares .reset's narrow single-column measure: this page
   also has exactly one thing to do. Deliberately never shows a group name —
   see the groups spec §3, "keep the public /join/<code> page private".
   ========================================================================== */
.join-code {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: clamp(28px, 6vw, 40px);
  font-weight: 500;
  letter-spacing: .12em;
  text-align: center;
  color: var(--ink);
  background: var(--band);
  border-radius: var(--radius-s);
  padding: 18px 12px;
  margin-block-start: 22px;
  user-select: all;
}
.join-copied {
  display: block;
  text-align: center;
  color: var(--ink-2);
  font-size: 14px;
  margin-block-start: 10px;
  min-height: 1.2em;
}
.reset .btn--outline { margin-block-start: 12px; }
