/* Habitat landing page: the community's sign system, in your pocket.
   Brand tokens copied from HabitatFolder/design/habitat-brand-tokens.css (not linked: this page stays standalone). */

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("assets/fonts/manrope-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Noto Sans Arabic";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("assets/fonts/noto-sans-arabic.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

:root {
  /* Sign stock */
  --teal: #1c617e;         /* --habitat-brand: the sign panel */
  --teal-strong: #154b62;  /* --habitat-brand-strong */
  --teal-deep: #0d3142;    /* --habitat-brand-deep: the film hall */
  --ink: #082733;          /* --habitat-brand-ink */
  --mist: #e7f0f3;         /* --habitat-brand-soft: mounting boards */
  --mist-2: #d5e5ea;       /* --habitat-brand-mist */
  --ground: #f4f7f7;       /* daylight pavement */
  --white: #ffffff;
  --muted: #4d5d63;        /* muted text on light, 6.6:1 on --ground */
  --line: #c9d8dd;
  --here: #f2b134;         /* "you are here" amber: location + focus only */

  /* Text on teal is tinted from the teal, never grey */
  --on-teal: #ffffff;
  --on-teal-soft: #cfe3ea;
  --on-teal-line: rgb(255 255 255 / .2);

  --font: "Manrope", "Noto Sans Arabic", "Segoe UI", system-ui, sans-serif;
  --font-ar: "Noto Sans Arabic", "Manrope", "Segoe UI", system-ui, sans-serif;

  --gutter: 16px;
  --max: 1240px;
  --r-sign: 28px;          /* enamel panel corner */
  --r-plate: 14px;         /* pictogram plate corner */
  --ease: cubic-bezier(.16, 1, .3, 1);
  --section: clamp(72px, 11vw, 144px);
}
@media (min-width: 768px) { :root { --gutter: 28px; --r-sign: 36px; } }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 16px; scrollbar-color: var(--teal) var(--mist); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
  caret-color: var(--teal);
  -webkit-font-smoothing: antialiased;
}
:lang(ar) body, body:lang(ar) { font-family: var(--font-ar); line-height: 1.8; }
::selection { background: var(--teal); color: var(--white); }
img, video, svg { display: block; max-width: 100%; }
img, video { height: auto; }
h1, h2, h3 { margin: 0; line-height: 1.05; font-weight: 700; text-wrap: balance; letter-spacing: -.03em; }
:lang(ar) h1, :lang(ar) h2, :lang(ar) h3 { letter-spacing: 0; line-height: 1.3; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-underline-offset: .22em; text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--here); outline-offset: 3px; border-radius: 10px; }

.skip {
  position: absolute; z-index: 20;
  inset-inline-start: var(--gutter); inset-block-start: -100px;
  padding: 10px 16px; border-radius: 999px;
  background: var(--ink); color: var(--white); font-weight: 700; text-decoration: none;
}
.skip:focus { inset-block-start: 12px; }

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

/* Pictograms: solid, one grammar, drawn on a 48 grid */
.picto { width: 1em; height: 1em; fill: currentColor; flex: none; }
.arrow { width: 1em; height: 1em; fill: currentColor; flex: none; transition: transform .35s var(--ease); }
[dir="rtl"] .arrow { transform: scaleX(-1); }

/* ---------- The totem's head: HABITAT at the top of the sign ---------- */
.logo { display: inline-block; border-radius: 8px; }
.logo img { height: 30px; width: auto; }
.totem-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.totem-top .logo img { height: 32px; }
@media (min-width: 768px) { .totem-top .logo img { height: 38px; } }
.lang-switch {
  display: inline-flex; align-items: center;
  min-height: 44px; padding: 0 18px;
  border-radius: 999px; background: rgb(255 255 255 / .14); color: var(--white);
  font-weight: 700; font-size: .9375rem; text-decoration: none;
  transition: background .2s var(--ease);
}
.lang-switch:hover { background: rgb(255 255 255 / .24); }

/* ---------- Hero: the sign stands in the place it serves ---------- */
.hero { position: relative; isolation: isolate; }
.view {
  position: relative; z-index: -1;
  height: 220px;
  background: var(--teal-deep) center 40% / cover no-repeat;
  overflow: hidden;
}
.view video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.view::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgb(8 39 51 / .5), rgb(8 39 51 / 0) 55%);
}
.hero > .wrap { position: relative; margin-block-start: -48px; }

.totem {
  position: relative;
  display: flex; flex-direction: column; gap: 26px;
  padding: 24px 22px;
  border-radius: var(--r-sign);
  background: var(--teal); color: var(--on-teal);
  box-shadow: 0 24px 60px rgb(8 39 51 / .28);
}
.totem h1 { font-size: clamp(2.375rem, 9.4vw, 4.5rem); max-width: 12ch; }
.totem .lede { font-size: clamp(1.0625rem, 2.2vw, 1.1875rem); color: var(--on-teal-soft); max-width: 34ch; }
:lang(ar) .totem h1 { font-size: clamp(2.125rem, 7.2vw, 3.75rem); }

.here {
  position: absolute; z-index: 1; inset-block-start: 16px; inset-inline-end: 16px;
  display: inline-flex; align-items: center; gap: 10px; margin: 0;
  padding: 9px 16px 9px 12px; border-radius: 999px;
  background: var(--white); color: var(--ink); font-size: .9375rem; font-weight: 700;
  box-shadow: 0 10px 28px rgb(8 39 51 / .22);
}
[dir="rtl"] .here { padding: 9px 12px 9px 16px; }
.here .dot { position: relative; width: 14px; height: 14px; border-radius: 50%; background: var(--here); box-shadow: 0 0 0 3px rgb(242 177 52 / .28); }
.here .dot::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid var(--here); animation: here 2.8s var(--ease) infinite; }
@keyframes here { from { transform: scale(.7); opacity: .9; } to { transform: scale(2.4); opacity: 0; } }

@media (min-width: 768px) {
  .hero { display: flex; align-items: flex-end; min-height: 100svh; padding-block: 24px; }
  .view { position: absolute; inset: 0; height: auto; }
  .view::after { background: linear-gradient(to right, rgb(8 39 51 / .45), rgb(8 39 51 / 0) 60%), linear-gradient(to top, rgb(8 39 51 / .35), rgb(8 39 51 / 0) 40%); }
  [dir="rtl"] .view::after { background: linear-gradient(to left, rgb(8 39 51 / .45), rgb(8 39 51 / 0) 60%), linear-gradient(to top, rgb(8 39 51 / .35), rgb(8 39 51 / 0) 40%); }
  .hero > .wrap { margin: 0 auto; }
  .totem { width: min(100%, 560px); padding: 36px 40px 34px; gap: 24px; box-shadow: 0 40px 100px rgb(8 39 51 / .4); }
  .totem h1 { font-size: clamp(2.75rem, 4.4vw, 4rem); }
  .here { inset-block-start: auto; inset-block-end: 32px; inset-inline-end: 32px; }
}

/* The directory: the sign rows that point to each part of daily life */
.directory { margin: 0; padding: 0; list-style: none; border-block-start: 1px solid var(--on-teal-line); }
.directory li { border-block-end: 1px solid var(--on-teal-line); }
.dir {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px;
  min-height: 66px; padding-block: 10px; color: inherit; text-decoration: none;
}
.dir .plate {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: var(--r-plate);
  background: var(--white); color: var(--teal); font-size: 30px;
  transition: background .3s var(--ease), color .3s var(--ease), transform .4s var(--ease);
}
.dir strong { display: block; font-size: 1.375rem; line-height: 1.15; letter-spacing: -.02em; }
.dir > span > span { display: block; font-size: .9375rem; color: var(--on-teal-soft); line-height: 1.35; }
:lang(ar) .dir strong { line-height: 1.45; letter-spacing: 0; }
:lang(ar) .dir > span > span { margin-block-start: 6px; }
.dir .arrow { font-size: 32px; }
.dir:hover .arrow, .dir:focus-visible .arrow { transform: translateX(6px); }
[dir="rtl"] .dir:hover .arrow, [dir="rtl"] .dir:focus-visible .arrow { transform: scaleX(-1) translateX(6px); }
.dir:hover .plate, .dir:focus-visible .plate { background: var(--teal-deep); color: var(--white); transform: rotate(-4deg); }
.dir:focus-visible { outline-offset: -2px; }
@media (min-width: 960px) {
  .dir { min-height: 74px; gap: 18px; }
  .dir .plate { width: 54px; height: 54px; border-radius: 16px; font-size: 36px; }
  .dir strong { font-size: 1.75rem; }
  .dir .arrow { font-size: 40px; }
}

/* ---------- Animated HABITAT mark ---------- */
.totem-top .logo { display: block; }
.lockup { height: 36px; width: auto; overflow: visible; }
@media (min-width: 768px) { .lockup { height: 44px; } }
.lockup path { fill: var(--white); }
@media (prefers-reduced-motion: no-preference) {
  .js .lockup .leaf { transform-box: fill-box; transform-origin: 50% 50%; animation: leaf .75s var(--ease) both; animation-delay: calc(.25s + var(--i) * .09s); }
  .js .lockup .word { animation: word .9s var(--ease) 1.1s both; }
  .js .directory li { animation: mount .7s var(--ease) both; animation-delay: calc(.9s + var(--n, 0) * .07s); }
  .js .directory li:nth-child(2) { --n: 1; } .js .directory li:nth-child(3) { --n: 2; } .js .directory li:nth-child(4) { --n: 3; }
}
@keyframes leaf { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }
@keyframes word { from { opacity: 0; clip-path: inset(0 100% 0 0); } to { opacity: 1; clip-path: inset(0 0 0 0); } }
@keyframes mount { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- Official store badges ---------- */
.badges { --badge-h: 44px; display: flex; flex-wrap: wrap; align-items: center; gap: calc(var(--badge-h) * .3); margin: 0; padding: 0; list-style: none; }
.badges a { display: block; border-radius: 9px; }
.badges img { height: var(--badge-h); width: auto; }
/* Google's artwork ships with built-in clear space: scale it so the visible badge matches Apple's height */
.badge-gp img { height: calc(var(--badge-h) * 250 / 168); margin: calc(var(--badge-h) * -41 / 168); }

/* ---------- Departures board: app states rolling past ---------- */
.ticker {
  display: flex; overflow: hidden; padding-block: 18px;
  background: var(--teal-deep); color: var(--on-teal);
  mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}
@media (max-width: 767px) { .ticker { margin-block-start: 24px; } }
.ticker ul { display: flex; flex: none; gap: 56px; margin: 0; padding-inline-end: 56px; list-style: none; animation: ticker 40s linear infinite; }
.ticker li { display: inline-flex; align-items: center; gap: 12px; white-space: nowrap; font-weight: 700; font-size: 1.0625rem; }
.ticker li .picto { font-size: 24px; color: var(--on-teal-soft); }
.ticker li::after { content: ""; width: 8px; height: 8px; margin-inline-start: 44px; border-radius: 50%; background: var(--on-teal-line); }
.ticker:hover ul { animation-play-state: paused; }
[dir="rtl"] .ticker ul { animation-name: ticker-rtl; }
@keyframes ticker { to { transform: translateX(-100%); } }
@keyframes ticker-rtl { to { transform: translateX(100%); } }

/* ---------- The walk: one route line, four stops, one mounted screen ---------- */
.walk { padding-block: clamp(72px, 10vw, 136px) clamp(40px, 6vw, 80px); }
.walk > .wrap { display: grid; }
.stops { position: relative; }

/* The route line every stop hangs from; JS sets --progress as you walk it */
.line {
  position: absolute; inset-block: 26px 0; inset-inline-start: 24px;
  width: 4px; border-radius: 4px; background: var(--mist-2);
}
.line::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--teal);
  transform-origin: top; transform: scaleY(var(--progress, 0));
}
.walker {
  position: absolute; inset-inline-start: 50%; inset-block-start: 0;
  width: 18px; height: 18px; margin-inline-start: -9px; margin-block-start: -9px; border-radius: 50%;
  background: var(--here); box-shadow: 0 0 0 5px var(--ground), 0 0 0 7px rgb(242 177 52 / .45);
  transform: translateY(var(--walker, 0px));
}
[dir="rtl"] .walker { margin-inline-start: 0; margin-inline-end: -9px; inset-inline-start: auto; inset-inline-end: 50%; }

.stop { position: relative; padding-inline-start: 72px; padding-block-end: clamp(96px, 14vw, 168px); scroll-margin-top: 24px; }
.stop:last-child { padding-block-end: 0; }
.stop-head { display: flex; align-items: center; gap: 18px; margin-inline-start: -72px; margin-block-end: 22px; }
.stop-head .plate {
  position: relative; z-index: 1; display: grid; place-items: center; flex: none;
  width: 52px; height: 52px; border-radius: 16px;
  background: var(--teal); color: var(--white); font-size: 34px;
  box-shadow: 0 0 0 6px var(--ground);
  transition: background .4s var(--ease), color .4s var(--ease), transform .5s var(--ease);
}
.stop-head h2 { font-size: clamp(1.75rem, 4.6vw, 3.25rem); }
.stop.is-active .stop-head .plate {
  transform: scale(1.08); box-shadow: 0 0 0 6px var(--ground), 0 0 0 9px var(--here);
}
.stop:target .stop-head .plate { background: var(--here); color: var(--ink); }

.moment {
  font-size: clamp(1.5rem, 3.4vw, 2.375rem); line-height: 1.18; font-weight: 600; letter-spacing: -.025em;
  max-width: 19ch; margin-block-end: 32px; color: var(--ink);
}
:lang(ar) .moment { letter-spacing: 0; line-height: 1.5; }

@media (min-width: 768px) {
  .line { inset-inline-start: 34px; }
  .stop { padding-inline-start: 104px; }
  .stop-head { margin-inline-start: -104px; gap: 30px; }
  .stop-head .plate { width: 72px; height: 72px; border-radius: 20px; font-size: 46px; }
}

/* Directions: numbered only because order matters */
.route { margin: 0; padding: 0; list-style: none; counter-reset: step; max-width: 34rem; }
.route li {
  counter-increment: step;
  display: grid; grid-template-columns: 36px 1fr; gap: 14px; align-items: center;
  padding-block: 14px; border-block-start: 1px solid var(--line); color: var(--muted);
}
.route li:last-child { border-block-end: 1px solid var(--line); }
.route li::before {
  content: counter(step);
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
  background: var(--mist); color: var(--teal-strong); font-weight: 700; font-size: .9375rem;
}
.route li strong { color: var(--ink); font-weight: 700; }
.route--plain li { grid-template-columns: 28px 1fr; }
.route--plain li::before { content: none; }
.route--plain .arrow { font-size: 24px; color: var(--teal); }
.stop .note { margin-block-start: 20px; color: var(--muted); max-width: 36rem; }

.next {
  display: inline-flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-block-start: 28px; min-height: 52px; padding: 8px 12px 8px 20px;
  border-radius: 999px; color: var(--teal-strong); text-decoration: none; font-weight: 700;
  box-shadow: inset 0 0 0 1.5px var(--line);
  transition: background .25s var(--ease), box-shadow .25s var(--ease);
}
[dir="rtl"] .next { padding: 8px 20px 8px 12px; }
.next span { color: var(--muted); font-weight: 600; }
.next .arrow { font-size: 26px; }
.next:hover { background: var(--mist); box-shadow: inset 0 0 0 1.5px var(--mist); }
.next:hover .arrow { transform: translateX(5px); }
[dir="rtl"] .next:hover .arrow { transform: scaleX(-1) translateX(5px); }

/* The mounting board a real screen hangs on */
.board {
  position: relative; display: grid; place-items: center;
  aspect-ratio: 5 / 5.6; margin: 0 0 28px; padding: 64px 28px 28px;
  border-radius: var(--r-sign); background: var(--mist); overflow: hidden;
}
/* App screens sit whole inside a phone frame, never cropped by the board */
.board img {
  height: 100%; width: auto; max-width: 100%; min-height: 0; object-fit: contain;
  border: 8px solid var(--ink); border-radius: 38px; background: var(--ink);
  box-shadow: 0 2px 0 1px rgb(8 39 51 / .08), 0 28px 60px rgb(8 39 51 / .22);
}
@media (min-width: 768px) { .board { padding: 72px 40px 40px; } .board img { border-width: 10px; border-radius: 46px; } }
.board--photo { padding: 0; place-items: stretch; }
.board--photo img { width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: center top; border: 0; border-radius: 0; box-shadow: none; }
.plaque {
  position: absolute; z-index: 1; inset-block-start: 16px; inset-inline-start: 16px;
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 10px; border-radius: 999px;
  background: var(--white); color: var(--teal-strong); font-size: .875rem; font-weight: 700;
  box-shadow: 0 6px 18px rgb(8 39 51 / .12);
}
[dir="rtl"] .plaque { padding: 8px 10px 8px 14px; }
.plaque .picto { font-size: 18px; }

/* Phones: each stop carries its own board. Desktop: one sticky stage swaps screens as you walk. */
.stage { display: none; }
@media (min-width: 960px) {
  .walk > .wrap { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); column-gap: clamp(48px, 6vw, 96px); align-items: start; }
  .board--inline { display: none; }
  .stop { padding-block-end: 34vh; }
  .stage { display: block; position: sticky; inset-block-start: 8vh; height: 84vh; }
  .stage-board { position: relative; height: 100%; }
  .stage-board .board {
    position: absolute; inset: 0; margin: 0; aspect-ratio: auto;
    opacity: 0; transform: translateY(32px) scale(.96) rotate(1deg);
    transition: opacity .6s var(--ease), transform .9s var(--ease);
  }
  .stage-board .board { padding: 80px 48px 48px; }
  .stage-board .board--photo { padding: 0; }
  .stage-board .board img { transform: translateY(40px); transition: transform 1.1s var(--ease); }
  .stage-board .board--photo img { transform: scale(1.08); }
  .stage-board .board.is-active { opacity: 1; transform: none; }
  .stage-board .board.is-active img { transform: none; }
}

/* ---------- Film hall ---------- */
.film { padding-block: clamp(72px, 10vw, 136px) clamp(56px, 8vw, 104px); background: var(--teal-deep); color: var(--on-teal); }
.film-head { display: grid; gap: 14px; margin-block-end: 44px; }
@media (min-width: 960px) { .film-head { grid-template-columns: 1fr 1fr; align-items: end; gap: 72px; } }
.film h2 { font-size: clamp(2.5rem, 7.4vw, 5.5rem); max-width: 11ch; }
.film-head p { color: var(--on-teal-soft); max-width: 40ch; font-size: 1.125rem; }
.film video { width: 100%; aspect-ratio: 16 / 9; background: #000; display: block; object-fit: cover; }
.player { position: relative; margin: 0; }
.player--main video { max-height: 92svh; }
.clips video { border-radius: 22px; }
.play {
  position: absolute; inset: 0 0 auto 0; aspect-ratio: 16 / 9; max-height: 92svh;
  display: grid; place-content: center; justify-items: center; gap: 12px;
  border: 0; cursor: pointer; color: var(--white); font: inherit; font-weight: 700;
  background: linear-gradient(to top, rgb(8 39 51 / .55), rgb(8 39 51 / .05) 60%);
}
.play[hidden] { display: none; }
.play .picto { font-size: clamp(64px, 9vw, 112px); filter: drop-shadow(0 10px 24px rgb(8 39 51 / .35)); transition: transform .35s var(--ease); }
.play span { padding: 6px 14px; border-radius: 999px; background: rgb(8 39 51 / .62); }
.play:hover .picto, .play:focus-visible .picto { transform: scale(1.06); }
.play:focus-visible { outline-offset: -6px; }
.clips .play { border-radius: 22px; }
.clips .play .picto { font-size: 60px; }
.player figcaption { display: flex; align-items: center; gap: 10px; margin-block-start: 14px; font-weight: 700; }
.player figcaption .picto { font-size: 22px; color: var(--on-teal-soft); }
.clips { display: grid; gap: 20px; margin: 48px 0 0; padding: 0; list-style: none; }
@media (min-width: 768px) { .clips { grid-template-columns: 1fr 1fr; } }

/* ---------- Close: get the app, ask a person, one ground to the footer ---------- */
.close { padding-block: clamp(72px, 10vw, 136px) clamp(48px, 6vw, 72px); background: var(--teal); color: var(--on-teal); }
.exit { display: grid; gap: 32px; }
@media (min-width: 960px) { .exit { grid-template-columns: 1fr auto; align-items: end; gap: 56px; } }
.exit h2 { display: flex; align-items: center; gap: .25em; font-size: clamp(3rem, 10vw, 6rem); }
.exit h2 .arrow { font-size: .78em; }
.exit p { color: var(--on-teal-soft); font-size: 1.1875rem; margin-block-start: 14px; }
.exit .badges { --badge-h: 56px; }
.info {
  display: grid; grid-template-columns: auto 1fr; gap: 20px;
  margin-block-start: clamp(56px, 8vw, 96px); padding-block-start: clamp(32px, 5vw, 48px);
  border-block-start: 1px solid var(--on-teal-line);
}
.info .plate { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--white); color: var(--teal); font-size: 32px; }
.info h2 { font-size: clamp(1.5rem, 3.6vw, 2.25rem); margin-block: 6px 12px; }
.info p { color: var(--on-teal-soft); font-size: clamp(1.0625rem, 2.2vw, 1.25rem); max-width: 48ch; }
.info .op { color: var(--white); font-weight: 600; margin-block-start: 10px; }
.info a { color: var(--white); font-weight: 700; overflow-wrap: anywhere; }

.site-footer { padding-block: 28px 40px; background: var(--teal); color: var(--on-teal-soft); font-size: .9375rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; border-block-start: 1px solid var(--on-teal-line); padding-block-start: 28px; }
.site-footer .logo img { height: 26px; }
.site-footer ul { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0; padding: 0; list-style: none; }
.site-footer a { color: var(--on-teal-soft); }
.site-footer a:hover { color: var(--white); }
.site-footer small { font-size: inherit; }

/* ---------- Scroll-linked motion (progressive: content is always visible without it) ---------- */
@media (prefers-reduced-motion: reduce) {
  .here .dot::after { animation: none; opacity: 0; }
  .ticker ul { animation: none; flex-wrap: wrap; row-gap: 12px; }
  .ticker ul + ul { display: none; }
  .ticker { mask-image: none; }
  .stage-board .board, .stage-board .board img { transition: opacity .2s linear; transform: none !important; }
}
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    /* Depth: the footage settles back while the sign lifts away */
    .view video { animation: settle-video linear both; animation-timeline: scroll(root); animation-range: 0 100svh; }
    @keyframes settle-video { from { transform: scale(1.02); } to { transform: scale(1.14) translateY(5%); } }
    @media (min-width: 768px) {
      .totem { animation: lift linear both; animation-timeline: scroll(root); animation-range: 0 100svh; }
      @keyframes lift { to { transform: translateY(-14vh); } }
    }

    /* Stops and panels rise into place as you reach them */
    .reveal, .stop-head, .moment, .route, .next, .board--inline {
      animation: rise linear both; animation-timeline: view(); animation-range: entry 0% cover 26%;
    }
    @keyframes rise { from { opacity: 0; transform: translateY(44px); } to { opacity: 1; transform: none; } }

    /* The main film opens out to full width: two curtains in the hall's colour slide back over it.
       The video itself is never transformed or clipped, since some GPUs stop painting a video that is. */
    .player--main::before, .player--main::after {
      content: ""; position: absolute; z-index: 2; inset-block-start: 0; pointer-events: none;
      height: min(56.25vw, 92svh); background: var(--teal-deep);
      animation: curtain linear both; animation-timeline: view(); animation-range: entry 10% cover 50%;
    }
    .player--main::before { inset-inline-start: 0; }
    .player--main::after { inset-inline-end: 0; }
    @keyframes curtain {
      from { width: max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter))); }
      to { width: 0; }
    }
    .film-head h2 { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% cover 30%; }
  }
}

/* Phones: keep the store badges on the first screen */
@media (max-width: 767px) {
  .view { height: 150px; }
  .hero > .wrap { margin-block-start: -40px; }
  .here { inset-block-start: 12px; inset-inline-end: 12px; padding-block: 7px; font-size: .875rem; }
  .totem { gap: 20px; padding: 22px 20px 22px; }
  .totem h1 { font-size: clamp(2.125rem, 9vw, 2.625rem); }
  :lang(ar) .totem h1 { font-size: clamp(1.875rem, 8vw, 2.375rem); }
  .totem .lede { font-size: 1rem; }
  .dir { min-height: 58px; padding-block: 8px; gap: 12px; }
  .dir .plate { width: 42px; height: 42px; font-size: 27px; border-radius: 12px; }
  .dir strong { font-size: 1.1875rem; }
  .dir > span > span { font-size: .8125rem; }
  .dir .arrow { font-size: 26px; }
}

/* Phones: screens size by width so they stay readable; the board grows to fit the whole frame */
@media (max-width: 959px) {
  .board { aspect-ratio: auto; padding: 68px 24px 28px; }
  .board img { height: auto; width: min(76%, 320px); }
  .board--photo { aspect-ratio: 4 / 5; padding: 0; }
  .board--photo img { width: 100%; height: 100%; }
}

/* "Next" stays one tidy pill: label and destination on one line, arrow always inline */
.next { flex-wrap: nowrap; max-width: 100%; }
.next strong { min-width: 0; }
@media (max-width: 480px) {
  .next { gap: 8px; padding: 8px 10px 8px 16px; font-size: .875rem; }
  [dir="rtl"] .next { padding: 8px 16px 8px 10px; }
  .next span { display: none; }
  .next strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

/* Jumping to a stop lands with its sign below the top edge, and the last stop leaves room
   for the pinned screen so it never scrolls away mid-view */
.stop { scroll-margin-top: 10vh; }
@media (min-width: 960px) {
  .stop:last-child { padding-block-end: 30vh; }
}

/* ---------- Legal and support pages: the resident app's texts, set for reading ---------- */
.legal { background: var(--ground); }
.legal-head { background: var(--teal); color: var(--on-teal); padding-block: 20px clamp(40px, 6vw, 72px); }
.legal-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-block-end: clamp(40px, 7vw, 88px); }
.legal-bar .logo img { height: 34px; width: auto; }
.legal-back {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 18px 0 14px;
  border-radius: 999px; background: rgb(255 255 255 / .14); color: var(--white); font-weight: 700; text-decoration: none;
}
.legal-back .arrow { font-size: 22px; transform: scaleX(-1); }
.legal-back:hover { background: rgb(255 255 255 / .24); }
.legal-head h1 { font-size: clamp(2.5rem, 7vw, 4.75rem); max-width: 16ch; }
.legal-updated { margin-block-start: 16px; color: var(--on-teal-soft); }
.legal-nav { display: flex; flex-wrap: wrap; gap: 10px; margin: 32px 0 0; padding: 0; list-style: none; }
.legal-nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px;
  color: var(--white); font-weight: 700; text-decoration: none; box-shadow: inset 0 0 0 1.5px var(--on-teal-line);
}
.legal-nav a:hover { background: rgb(255 255 255 / .12); }
.legal-nav a[aria-current="page"] { background: var(--white); color: var(--teal-strong); box-shadow: none; }
.legal-body { padding-block: clamp(48px, 7vw, 96px) clamp(72px, 10vw, 128px); }
.legal-text { max-width: 68ch; }
.legal-text p { color: var(--muted); font-size: 1.0625rem; line-height: 1.7; }
.legal-text p + p { margin-block-start: 14px; }
.legal-intro { font-size: clamp(1.1875rem, 2.4vw, 1.375rem) !important; color: var(--ink) !important; line-height: 1.55 !important; }
.legal-text section { margin-block-start: clamp(36px, 5vw, 52px); padding-block-start: clamp(28px, 4vw, 40px); border-block-start: 1px solid var(--line); }
.legal-text h2 { font-size: clamp(1.375rem, 3vw, 1.875rem); letter-spacing: -.02em; margin-block-end: 14px; }
.legal-text a { color: var(--teal-strong); font-weight: 700; }
.legal-text a:hover { color: var(--ink); }
.legal-callout { margin-block-start: 28px; padding: 22px 24px; border-radius: 20px; background: var(--mist); }
.legal-callout strong { display: block; font-size: 1.125rem; margin-block-end: 6px; color: var(--ink); }
.legal-callout p { color: var(--ink) !important; }
.legal .site-footer { margin: 0; }
.legal-actions { display: flex; align-items: center; gap: 10px; }
[dir="rtl"] .legal-back { padding: 0 14px 0 18px; }
[dir="rtl"] .legal-back .arrow { transform: none; }
@media (max-width: 480px) { .legal-back span { display: none; } .legal-back { padding: 0 12px; } }
:lang(ar) .legal-text p { line-height: 1.95; }
:lang(ar) .legal-intro { line-height: 1.85 !important; }
.board--icon { place-items: center; color: var(--teal); }
.board--icon .picto { width: 38%; height: auto; aspect-ratio: 1; }
@media (max-width: 959px) { .board--icon { aspect-ratio: 16 / 9; padding: 0; } .board--icon .picto { width: 26%; } }
