/**
 * إمبراطور السعادة — presentation site.
 *
 * Arabic-first and RTL, because that is the shop's customer language; French
 * carries the supporting lines, the way signage in Algiers actually reads.
 *
 * The palette is the brand's, transcribed in CLAUDE.md and locked: royal
 * indigo, the logo's cyan, and the deep navy the product photography is shot
 * against. Cream is the one addition — a warm neutral so that a page about
 * dessert is not blue on blue on blue.
 *
 * Every offset is a logical property (inline/block), never left/right, so the
 * RTL layout is the layout rather than a mirrored afterthought.
 */

:root {
  /* Ground */
  --ink: #061431;
  --ink-2: #0b2350;
  --ink-3: #123166;

  /* Brand, from src/theme/colors.ts */
  --primary: #164db1;
  --primary-lift: #1e63d8;
  --azure: #159bda;
  --azure-soft: #61c2f0;

  /* Warm counterweight */
  --cream: #f8f2e7;
  --sand: #e6d8bf;
  --caramel: #c98b3f;

  /* Surfaces and text */
  --canvas: #f3f6fc;
  --surface: #ffffff;
  --fg: #0e2a5e;
  --fg-muted: #4a5b7e;
  --fg-subtle: #7c88a3;
  --on-dark: #eaf1ff;
  --on-dark-muted: #a9bde2;
  --line: rgba(14, 42, 94, 0.12);
  --line-dark: rgba(234, 241, 255, 0.14);

  /* Radii — 12px is the brand's --radius */
  --r-sm: 12px;
  --r-md: 20px;
  --r-lg: 28px;
  --r-xl: 40px;
  --r-full: 999px;

  --shadow-sm: 0 2px 10px rgba(6, 20, 49, 0.06);
  --shadow-md: 0 18px 40px -18px rgba(6, 20, 49, 0.28);
  --shadow-lg: 0 40px 80px -32px rgba(6, 20, 49, 0.45);
  --shadow-glow: 0 0 60px rgba(21, 155, 218, 0.28);

  --gutter: clamp(1.25rem, 4vw, 3rem);
  --max: 1200px;

  --font: 'Cairo', 'Noto Kufi Arabic', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--fg);
  font-family: var(--font);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.75;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

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

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.2;
  text-wrap: balance;
  font-weight: 800;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

::selection {
  background: var(--azure);
  color: #fff;
}

:focus-visible {
  outline: 3px solid var(--azure);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ── Layout ─────────────────────────────────────────────────────────── */

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

.section {
  padding-block: clamp(4.5rem, 9vw, 8rem);
}

.section--tight {
  padding-block: clamp(3rem, 6vw, 5rem);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--azure);
  text-transform: uppercase;
}

.eyebrow::before {
  content: '';
  inline-size: 1.75rem;
  block-size: 2px;
  border-radius: 2px;
  background: currentColor;
  opacity: 0.6;
}

.section__head {
  max-width: 46ch;
  margin-block-end: clamp(2.5rem, 5vw, 4rem);
}

.section__title {
  font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3.1rem);
  margin-block: 0.75rem 1rem;
}

.section__lede {
  color: var(--fg-muted);
  font-size: clamp(1.02rem, 0.98rem + 0.3vw, 1.18rem);
}

/* ── Buttons ────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.95rem 1.7rem;
  border-radius: var(--r-full);
  font-weight: 700;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn--primary {
  background: linear-gradient(135deg, var(--primary-lift), var(--primary));
  color: #fff;
  box-shadow: 0 14px 30px -12px rgba(30, 99, 216, 0.75);
}

.btn--primary:hover {
  box-shadow: 0 20px 40px -14px rgba(30, 99, 216, 0.85);
}

.btn--ghost {
  border-color: var(--line-dark);
  color: var(--on-dark);
  background: rgba(255, 255, 255, 0.04);
}

.btn--ghost:hover {
  border-color: var(--azure);
  background: rgba(21, 155, 218, 0.12);
}

.btn--light {
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow-md);
}

/* ── Header ─────────────────────────────────────────────────────────── */

.head {
  position: sticky;
  inset-block-start: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(6, 20, 49, 0.72);
  border-block-end: 1px solid var(--line-dark);
  transition: background 0.3s ease;
}

.head__inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-block-size: 72px;
}

.head__brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--on-dark);
  font-weight: 800;
}

.head__brand img {
  inline-size: 38px;
  block-size: 38px;
  border-radius: 10px;
  background: #fff;
  padding: 3px;
}

/*
 * AR / FR / EN.
 *
 * Codes rather than names: three scripts side by side in the header would be
 * the very mixing the rest of the page now avoids. Each link carries the full
 * name of its language, in that language, as its title.
 */
.langs {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.2rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  /* Two-letter codes read the same way whatever the page does. */
  direction: ltr;
  /* Whatever comes first after the brand carries the space; below 900px that is
     this switch, above it the navigation. */
  margin-inline-start: auto;
}

.head__nav + .langs {
  margin-inline-start: 0;
}

.langs a,
.langs__on {
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  line-height: 1;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.7);
}

.langs a:hover,
.langs a:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}

.langs__on {
  color: var(--ink);
  background: #fff;
}

.head__nav {
  display: none;
  gap: 1.75rem;
  margin-inline-start: auto;
}

.head__nav a {
  color: var(--on-dark-muted);
  font-weight: 600;
  font-size: 0.95rem;
  position: relative;
  padding-block: 0.35rem;
}

.head__nav a::after {
  content: '';
  position: absolute;
  inset-block-end: 0;
  inset-inline-start: 0;
  inline-size: 0;
  block-size: 2px;
  background: var(--azure);
  transition: inline-size 0.22s ease;
}

.head__nav a:hover {
  color: var(--on-dark);
}

.head__nav a:hover::after {
  inline-size: 100%;
}

.head__cta {
  padding: 0.6rem 1.2rem;
  font-size: 0.92rem;
  /* One line, whichever label is showing. */
  white-space: nowrap;
}

.head__cta-short {
  display: none;
}

@media (max-width: 620px) {
  /* The short label, and a button sized for it: the full wording wrapped onto
     two lines here and took over the header. */
  .head__cta-full {
    display: none;
  }

  .head__cta-short {
    display: inline;
  }

  .head__cta {
    padding: 0.45rem 0.9rem;
    font-size: 0.85rem;
  }
}

@media (min-width: 900px) {
  .head__nav {
    display: flex;
  }
}

/* ── Hero ───────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  background:
    radial-gradient(120% 90% at 85% -10%, rgba(21, 155, 218, 0.35), transparent 60%),
    radial-gradient(90% 80% at 5% 10%, rgba(30, 99, 216, 0.45), transparent 55%),
    linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 55%, var(--ink-3) 100%);
  color: var(--on-dark);
  overflow: hidden;
  isolation: isolate;
}

.hero::after {
  /* A soft grain so the large flat gradient does not band on wide screens. */
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.5;
  background-image: radial-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 3px 3px;
}

.hero__inner {
  display: grid;
  gap: clamp(2.5rem, 6vw, 4rem);
  padding-block: clamp(3.5rem, 8vw, 6.5rem) clamp(4rem, 9vw, 7rem);
  align-items: center;
}

@media (min-width: 980px) {
  .hero__inner {
    /* More of the row goes to the words. The devices keep enough: the cluster
       is about 300px across and the column stays above 370px. */
    grid-template-columns: 1.28fr 0.72fr;
  }
}

/*
 * The copy column measures itself, so the title can be sized against the space
 * it actually has rather than against the window.
 */
.hero__copy {
  container-type: inline-size;
}

.hero__title {
  /*
   * Each phrase stays whole on its line.
   *
   * The two lines are one phrase each, split by a <br>; what used to break them
   * further was a size fixed to the viewport while the column stayed narrow.
   * Sized against the column instead, the type shrinks exactly as much as it
   * must and no more. 8.2cqi is one column-width divided by the widest phrase
   * any of the three languages has — 12em, measured in Cairo at weight 800 with
   * this rule's own letter-spacing — with five percent to spare.
   *
   * `balance` is dropped with it: balancing evens out line lengths, which is the
   * opposite of what two deliberate phrases want.
   */
  /* A browser without container queries drops the line below and keeps this
     one, which sizes against the window as the title used to. */
  font-size: clamp(2rem, 1.2rem + 3vw, 3.6rem);
  font-size: clamp(1.55rem, 8.2cqi, 3.6rem);
  text-wrap: pretty;
  margin-block: 1rem 1.25rem;
  color: #fff;
}

.hero__title em {
  font-style: normal;
  background: linear-gradient(120deg, var(--azure-soft), var(--azure) 55%, #fff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__lede {
  color: var(--on-dark-muted);
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.28rem);
  max-width: 52ch;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-block-start: 2.25rem;
}

.hero__note {
  margin-block-start: 1.5rem;
  font-size: 0.9rem;
  color: var(--on-dark-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hero__note span {
  inline-size: 8px;
  block-size: 8px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.18);
}

/* Stats */

.stats {
  display: grid;
  /* Wide enough for a number and its label side by side. The widest pair is
     "150 دج / ابتداءً من"; below this the two would be forced to stack again,
     which is the thing this layout exists to avoid. */
  /*
   * Two per row on a phone, all four in one row from 680px up.
   *
   * The tracks are `auto` rather than `1fr` on purpose: the hero's text column
   * is about 546px at the page's maximum width, so four equal columns would be
   * 136px each and "150 دج ابتداءً من" does not fit in that. Sizing each track
   * to its own content lets the wide pair borrow the room the short ones do not
   * need, and the four together still fill the row.
   *
   * Four across a 390px phone is not possible at a legible size, so below 680px
   * it stays two by two.
   */
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  margin-block-start: clamp(2.5rem, 5vw, 3.5rem);
  background: var(--line-dark);
  border: 1px solid var(--line-dark);
  border-radius: var(--r-md);
  overflow: hidden;
}

@media (min-width: 680px) {
  .stats {
    grid-template-columns: repeat(4, auto);
  }
}

.stat {
  background: rgba(6, 20, 49, 0.6);
  padding: 1rem;
  /* Number and label on one line, sitting on a shared baseline so the small
     text lines up with the foot of the digits rather than their middle. */
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.stat b {
  font-size: clamp(1.3rem, 1.05rem + 0.7vw, 1.6rem);
  color: #fff;
  line-height: 1.1;
  /* "150 دج" is one value and must not break across the space inside it. */
  white-space: nowrap;
}

.stat span {
  font-size: 0.78rem;
  color: var(--on-dark-muted);
  line-height: 1.2;
  /* The label must not break internally either — the flex row keeps it on the
     same line as the number, but its own text could still wrap without this. */
  white-space: nowrap;
}

/* ── Phone mockups ──────────────────────────────────────────────────── */

/*
 * The device mockup. One treatment, used for every screenshot on the page.
 *
 * A bezel around a real capture and nothing more. It draws no notch of its own:
 * the screenshots contain the device's real Dynamic Island, and a drawn one on
 * top gave every mockup two.
 *
 * It also declares no aspect ratio. Each image carries its true width and
 * height, so the browser reserves exactly that shape — a screenshot of any
 * device fits without being cropped, letterboxed or stretched, and adding a
 * capture from a different phone later needs no change here.
 */
.phone {
  /*
   * One device at several sizes.
   *
   * The bezel and the corner radius are proportions of the frame's width, not
   * fixed pixels. With a fixed 10px bezel the 158px phone in the hero wore a
   * band 6.3% of its width while the 300px one wore 3.3% — the two read as
   * different handsets standing next to each other. Deriving both from
   * `--phone-w` keeps every mockup the same device, just nearer or further away.
   *
   * The ratios are the real thing's: about 3.3% of the body width in bezel, and
   * a corner radius of about 14%.
   */
  --phone-w: 300px;
  --phone-bezel: calc(var(--phone-w) * 0.033);
  --phone-radius: calc(var(--phone-w) * 0.14);

  position: relative;
  inline-size: 100%;
  max-inline-size: var(--phone-w);
  padding: var(--phone-bezel);
  border-radius: var(--phone-radius);
  background: linear-gradient(160deg, #2c3a55, #0a1428 60%);
  /* The lift, plus a tight contact shadow so the device sits on the page
     instead of hovering above it. */
  box-shadow:
    var(--shadow-lg),
    0 2px 6px rgba(6, 20, 49, 0.4);
  margin-inline: auto;
  /* Kills the inline-descender gap that would otherwise show as a sliver of
     bezel along the bottom edge only. */
  line-height: 0;
}

/* The bezel edge catching light, as on the reference device. */
.phone::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.14),
    inset 0 1px 1px rgba(255, 255, 255, 0.18);
}

.phone img {
  inline-size: 100%;
  block-size: auto;
  /* Concentric with the frame: outer radius minus the bezel, so the corners
     stay parallel instead of drifting by a pixel. */
  border-radius: calc(var(--phone-radius) - var(--phone-bezel));
  /* Behind the capture, so no sub-pixel seam shows white at the edges. */
  background: #0a1428;
  display: block;
}

.phone--glow {
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.hero__phones {
  position: relative;
  display: grid;
  place-items: center;
  min-block-size: 520px;
}

.hero__phones .phone:first-child {
  transform: rotate(-4deg) translateX(6%);
  z-index: 1;
}

.hero__device {
  /*
   * The supplied mockup, placed as it came: its own bezel, Dynamic Island and
   * home indicator are part of the picture, so no frame is drawn around it.
   *
   * Its corners are cut to the device silhouette, which lets the hero's
   * gradient show through instead of a rectangle of the flat blue it was
   * composed against — and lets the shadow follow the device's outline rather
   * than a box.
   */
  position: absolute;
  inset-block-end: 2%;
  inset-inline-end: 19%;
  inline-size: 152px;
  block-size: auto;
  transform: rotate(5deg);
  z-index: 2;
  filter: drop-shadow(0 26px 34px rgba(6, 20, 49, 0.55));
}

/*
 * The tracking map, a third device tucked behind the rider — the two together
 * say the order is followed, not only sent. Drawn in the CSS frame, unlike the
 * rider beside it, because this one is a plain screenshot.
 */
.hero__map {
  --phone-w: 124px;
  position: absolute;
  inset-block-end: 11%;
  inset-inline-end: 0;
  margin-inline: 0;
  rotate: -7deg;
  z-index: 1;
}

@media (max-width: 620px) {
  /*
   * The devices at four fifths, and the block they stand in with them.
   *
   * On a phone the cluster was most of a screenful before a word of the page had
   * been read. Every size here is the desktop one scaled by the same amount, and
   * the positions are percentages, so the arrangement is the same group seen
   * from further away rather than a second composition.
   */
  .hero__phones {
    min-block-size: 340px;
  }

  .hero__phones > .phone--glow {
    --phone-w: 240px;
  }

  .hero__map {
    --phone-w: 100px;
  }

  .hero__device {
    inline-size: 120px;
    inset-inline-end: -2%;
  }
}

/* ── Two audiences ──────────────────────────────────────────────────── */

.split {
  display: grid;
  gap: clamp(1.25rem, 3vw, 2rem);
}

@media (min-width: 900px) {
  .split {
    grid-template-columns: 1fr 1fr;
  }
}

.audience {
  border-radius: var(--r-lg);
  padding: clamp(1.75rem, 3vw, 2.5rem);
  display: grid;
  gap: 1.5rem;
  align-content: start;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

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

.audience--driver {
  background: linear-gradient(150deg, var(--ink-2), var(--ink));
  border-color: transparent;
  color: var(--on-dark);
}

.audience--driver .audience__lede,
.audience--driver li {
  color: var(--on-dark-muted);
}

.audience__tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  align-self: start;
  padding: 0.4rem 0.9rem;
  border-radius: var(--r-full);
  font-size: 0.82rem;
  font-weight: 700;
  background: rgba(22, 77, 177, 0.1);
  color: var(--primary);
}

.audience--driver .audience__tag {
  background: rgba(21, 155, 218, 0.16);
  color: var(--azure-soft);
}

.audience__title {
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem);
}

.audience__lede {
  color: var(--fg-muted);
}

.audience ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.7rem;
}

.audience li {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  color: var(--fg-muted);
  font-size: 0.98rem;
}

.audience li::before {
  content: '✓';
  flex: none;
  inline-size: 20px;
  block-size: 20px;
  margin-block-start: 4px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--azure), var(--primary));
}

.audience__shot {
  margin-block-start: 0.5rem;
}

.audience__shot .phone {
  /* Was 250px. The list beside it is the argument; the screenshot is evidence,
     and evidence does not need to be the tallest thing in the card. */
  --phone-w: 190px;
}

/* The copy, as one column. */
.audience__body {
  display: grid;
  gap: 1.5rem;
  align-content: start;
}

@media (min-width: 900px) {
  /*
   * Copy beside the phone, both starting on the same line.
   *
   * This used to be attempted by spanning the shot across rows of the card's
   * own grid — `grid-row: 1 / -1`. That silently fails: `-1` counts against the
   * *explicit* grid, and the card declared no rows, so the shot took row 1
   * alone, made that row as tall as itself, and pushed every line of copy
   * beneath it. Wrapping the copy in its own column removes the need to span
   * anything.
   */
  .audience {
    grid-template-columns: 1fr auto;
    align-items: start;
  }
}

@media (max-width: 620px) {
  /*
   * The same card, with less room around it.
   *
   * Nothing is dropped and nothing is hidden: the padding, the gaps, the type and
   * the screenshot all come down together, so the card keeps its proportions and
   * simply stops filling a phone screen on its own. It sits after the rules it
   * overrides, which is what lets a single class win.
   */
  .audience {
    padding: 1.15rem;
    gap: 1.1rem;
  }

  .audience__body {
    gap: 1rem;
  }

  .audience__tag {
    padding: 0.32rem 0.75rem;
    font-size: 0.76rem;
  }

  .audience__title {
    font-size: 1.3rem;
  }

  .audience__lede {
    font-size: 0.95rem;
  }

  .audience ul {
    gap: 0.5rem;
  }

  .audience li {
    gap: 0.55rem;
    font-size: 0.9rem;
  }

  .audience li::before {
    inline-size: 18px;
    block-size: 18px;
    margin-block-start: 3px;
    font-size: 0.64rem;
  }

  .audience__shot {
    margin-block-start: 0.25rem;
  }

  .audience__shot .phone {
    --phone-w: 150px;
  }
}

/* ── Features ───────────────────────────────────────────────────────── */

.grid-3 {
  display: grid;
  gap: clamp(1rem, 2.4vw, 1.6rem);
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 1.75rem;
  display: grid;
  gap: 0.7rem;
  align-content: start;
  transition:
    transform 0.28s ease,
    box-shadow 0.28s ease,
    border-color 0.28s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(21, 155, 218, 0.4);
  box-shadow: var(--shadow-md);
}

.card__icon {
  /* A little larger than it was for the emoji it replaced: these are modelled
     icons with their own light and shadow, and they were cramped at 46px. */
  inline-size: 56px;
  block-size: 56px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, rgba(22, 77, 177, 0.12), rgba(21, 155, 218, 0.16));
  margin-block-end: 0.4rem;
}

.card__icon img {
  inline-size: 40px;
  block-size: 40px;
  object-fit: contain;
}

.card h3 {
  font-size: 1.15rem;
}

.card p {
  color: var(--fg-muted);
  font-size: 0.97rem;
}

/* ── Journey ────────────────────────────────────────────────────────── */

.journey {
  background: var(--surface);
  border-block: 1px solid var(--line);
}

/* ── The app, screen by screen ────────────────────────────────────────────
 *
 * A plain horizontal scroller. Native overflow already drags with a finger,
 * takes a trackpad and answers the keyboard, so nothing here needs a script:
 * with JavaScript off every screen is still reachable. web/app.js adds only the
 * drift and the two arrows on top, and the arrows stay hidden in the markup
 * until it does, so a dead control is never shown.
 */

.gallery__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-block-start: 1.6rem;
}

.chip {
  padding: 0.5rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--fg-muted);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}

.chip:hover {
  color: var(--fg);
  border-color: var(--primary);
}

.chip.is-on {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}

.gallery__frame {
  position: relative;
  margin-block-start: 2rem;
}

.gallery__track {
  display: flex;
  gap: clamp(1rem, 2.4vw, 1.75rem);
  margin: 0;
  padding-block: 0.5rem 0.25rem;
  /* The strip runs the full width of the window while its first card still
     lines up with the heading above it. */
  padding-inline: max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter)));
  list-style: none;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  cursor: grab;
  /* No scroll snapping: it fights the drift, dragging each card back as the
     strip tries to pass it. */
  /* The cards are their own affordance and the arrows say the rest; a bar would
     sit across the captions. */
  scrollbar-width: none;
}

.gallery__track::-webkit-scrollbar {
  display: none;
}

.gallery__track:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 4px;
}

.gallery__track.is-dragging {
  cursor: grabbing;
  /* A drag that ends on a card must not also open it. */
  user-select: none;
}

.shot {
  flex: 0 0 auto;
  inline-size: 196px;
}

.shot[hidden] {
  display: none;
}

.shot figure {
  margin: 0;
}

.shot .phone {
  --phone-w: 196px;
}

.shot__cap {
  display: grid;
  gap: 0.1rem;
  margin-block-start: 0.85rem;
  text-align: center;
}

.shot__cap span {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--azure);
}

.shot__cap strong {
  font-size: 0.98rem;
  color: var(--fg);
}

.gallery__arrow {
  position: absolute;
  /* Level with the device, not with the caption under it. */
  inset-block-start: 38%;
  z-index: 2;
  inline-size: 46px;
  block-size: 46px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--fg);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(6px);
  transition:
    color 0.2s ease,
    border-color 0.2s ease;
}

.gallery__arrow:hover {
  color: var(--primary);
  border-color: var(--primary);
}

.gallery__arrow[data-step='-1'] {
  inset-inline-start: clamp(0.5rem, 2vw, 1.5rem);
}

.gallery__arrow[data-step='1'] {
  inset-inline-end: clamp(0.5rem, 2vw, 1.5rem);
}

/* One chevron drawing, mirrored for the arrow that goes the other way — and the
   pair swaps again when the page reads right to left. */
[dir='ltr'] .gallery__arrow[data-step='-1'] svg,
[dir='rtl'] .gallery__arrow[data-step='1'] svg {
  transform: scaleX(-1);
}

/* ── Branches ───────────────────────────────────────────────────────── */

.branches {
  background: linear-gradient(160deg, var(--ink), var(--ink-2));
  color: var(--on-dark);
}

.branches .section__lede {
  color: var(--on-dark-muted);
}

.branches__map {
  display: grid;
  gap: 0.6rem;
  align-content: start;
}

#map {
  /* The map has the section to itself now, so it takes the height the
     branch list used to stand beside. */
  block-size: clamp(360px, 64vh, 680px);
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--line-dark);
  background: rgba(255, 255, 255, 0.04);
}

.branches__hint {
  font-size: 0.85rem;
  color: var(--on-dark-muted);
}

/*
 * The marker is two elements, and that is not decoration.
 *
 * `mapboxgl.Marker` writes `element.style.transform` on every animation frame to
 * position what it is given. An inline style beats a class rule, so a transform
 * on the element Mapbox owns is overwritten before it ever paints — the pin
 * never rotated, the selected state never scaled, and a `transition: transform`
 * here made Mapbox's own position writes ease, so markers lagged behind the map
 * on every flyTo.
 *
 * So the outer element is a bare box that Mapbox may position freely, and the
 * pin inside it carries every transform of ours.
 */
.marker {
  inline-size: 26px;
  block-size: 26px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  /* Deliberately no transform and no transform transition: this element
     belongs to Mapbox. */
}

.marker__pin {
  display: block;
  inline-size: 100%;
  block-size: 100%;
  border: 2.5px solid #fff;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: var(--primary);
  box-shadow: 0 6px 14px -4px rgba(6, 20, 49, 0.6);
  transition:
    background 0.18s ease,
    transform 0.18s ease;
}

.marker:hover .marker__pin {
  background: var(--primary-lift);
}

.marker.is-selected .marker__pin {
  background: var(--azure);
  transform: rotate(-45deg) scale(1.35);
}

.marker.is-selected {
  z-index: 2;
}

/* Mapbox's own controls, tuned to the dark section they sit in. */
.mapboxgl-ctrl-group {
  border-radius: var(--r-sm) !important;
  overflow: hidden;
}

/* ── Closing call to action ─────────────────────────────────────────── */

.cta {
  background:
    radial-gradient(80% 120% at 100% 0%, rgba(21, 155, 218, 0.35), transparent 60%),
    linear-gradient(135deg, var(--primary), var(--ink-2));
  color: #fff;
  border-radius: var(--r-xl);
  padding: clamp(2.5rem, 6vw, 4.5rem);
  text-align: center;
  display: grid;
  gap: 1.25rem;
  justify-items: center;
  box-shadow: var(--shadow-lg);
}

.cta h2 {
  font-size: clamp(1.8rem, 1.3rem + 2.2vw, 3rem);
  max-width: 22ch;
}

.cta p {
  color: rgba(255, 255, 255, 0.85);
  max-width: 50ch;
}

.cta__note {
  font-size: 0.85rem;
  /* Quieter than the sentence above it: a practical footnote, not a pitch. */
  color: rgba(255, 255, 255, 0.62) !important;
}

/* ── Footer ─────────────────────────────────────────────────────────── */

.foot {
  background: var(--ink);
  color: var(--on-dark-muted);
  padding-block: 3rem 2rem;
}

.foot__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  justify-content: space-between;
}

.foot__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--on-dark);
}

.foot__brand img {
  inline-size: 42px;
  block-size: 42px;
  border-radius: 12px;
  background: #fff;
  padding: 4px;
}

.foot__brand strong {
  display: block;
}

.foot__brand span {
  font-size: 0.85rem;
  color: var(--on-dark-muted);
}

.foot__links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.foot__links a:hover {
  color: var(--azure-soft);
}

.foot__legal {
  margin-block-start: 2rem;
  padding-block-start: 1.5rem;
  border-block-start: 1px solid var(--line-dark);
  font-size: 0.85rem;
}

/* ── Motion ─────────────────────────────────────────────────────────── */

.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-reveal].is-in {
  opacity: 1;
  transform: none;
}

[data-reveal][data-delay='1'] {
  transition-delay: 0.08s;
}
[data-reveal][data-delay='2'] {
  transition-delay: 0.16s;
}
[data-reveal][data-delay='3'] {
  transition-delay: 0.24s;
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
