/* 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 {
  --ticker-h: 62px;       /* the departures board under the hero */
  /* 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; }
:root:lang(ar) { --ticker-h: 68px; }
::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; background: var(--teal-deep); }
.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; }
/* The loop fades in over the photo once it is actually playing, so there is no jump. */
.js .hero-media { opacity: 0; transition: opacity 1s var(--ease); }
.js .hero-media.is-playing { opacity: 1; }
.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) {
  /* The hero leaves room for the departures board, so the ticker shows on the first screen too. */
  .hero { display: flex; align-items: flex-start; min-height: calc(100svh - var(--ticker-h)); padding-block: clamp(16px, 3vh, 48px); }
  .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; }
  /* Sized by height as well as width, so the whole sign, badges included, fits the first screen of a laptop. */
  .totem { width: min(100%, 560px); padding: clamp(24px, 3.4vh, 36px) 40px clamp(22px, 3.2vh, 34px); gap: clamp(14px, 2.2vh, 24px); box-shadow: 0 40px 100px rgb(8 39 51 / .4); }
  .totem h1 { font-size: clamp(2.25rem, min(4.4vw, 6.4vh), 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: clamp(54px, 7vh, 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; }
}

/* Short laptop screens: tighter rows so the badges stay on the first screen */
@media (min-width: 768px) and (max-height: 1010px) {
  .totem .lede { max-width: 42ch; font-size: 1.0625rem; }
  .dir { min-height: 0; padding-block: 7px; }
  .dir .plate { width: 46px; height: 46px; border-radius: 14px; font-size: 30px; }
  .dir strong { font-size: 1.375rem; }
  .dir .arrow { font-size: 32px; }
  :lang(ar) .dir strong { line-height: 1.3; }
  :lang(ar) .dir > span > span { margin-block-start: 2px; }
}

@media (min-width: 768px) and (max-height: 840px) {
  .totem h1 { font-size: clamp(2rem, 5.6vh, 3rem); }
  .totem .lede { font-size: 1rem; }
  .dir { padding-block: 4px; gap: 14px; }
  .dir .plate { width: 40px; height: 40px; border-radius: 12px; font-size: 26px; }
  .dir strong { font-size: 1.1875rem; }
  .dir > span > span { font-size: .875rem; }
  .dir .arrow { font-size: 28px; }
  :lang(ar) .totem h1 { font-size: clamp(1.75rem, 4.8vh, 2.625rem); }
  :lang(ar) .totem .lede { line-height: 1.6; }
}

/* ---------- 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) {
  .ready .lockup .leaf { transform-box: fill-box; transform-origin: 50% 50%; animation: leaf .75s var(--ease) both; animation-delay: calc(.2s + var(--i) * .06s); }
  .ready .lockup .word { animation: word .8s var(--ease) .65s both; }
  .ready .directory li { animation: mount .7s var(--ease) both; animation-delay: calc(.3s + var(--n, 0) * .06s); }
  .js .directory li:nth-child(2) { --n: 1; } .js .directory li:nth-child(3) { --n: 2; } .js .directory li:nth-child(4) { --n: 3; }
  .js .directory li:nth-child(5) { --n: 4; } .js .directory li:nth-child(6) { --n: 5; } .js .directory li:nth-child(n+7) { --n: 6; }
}
/* First screen arrives as one piece: photo, sign and plaque together once the head script says ready. */
.js .view, .js .here { opacity: 0; }
.js .totem { opacity: 0; }
.ready .view, .ready .here, .ready .totem { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .js .view { transition: opacity .9s var(--ease); }
  .js .totem { translate: 0 22px; transition: opacity .7s var(--ease) .1s, translate 1s var(--ease) .1s; }
  .ready .totem { translate: none; }
  .js .here { translate: 0 10px; transition: opacity .6s var(--ease) .7s, translate .8s var(--ease) .7s; }
  .ready .here { translate: none; }
  .js:not(.ready) .lockup .leaf, .js:not(.ready) .lockup .word, .js:not(.ready) .directory li { opacity: 0; }
}
@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 {
  min-height: var(--ticker-h); box-sizing: border-box;
  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%; } }

/* ---------- App tour: a demo phone you can tap, with a sign that explains each part ---------- */
.tour { padding-block: clamp(72px, 10vw, 136px); background: var(--mist); overflow: clip; }
.tour-head { display: grid; gap: 12px; margin-block-end: clamp(32px, 5vw, 56px); max-width: 44rem; }
.tour-head h2 { font-size: clamp(2.25rem, 6.6vw, 4.5rem); max-width: 14ch; }
.tour-head p { color: var(--muted); font-size: clamp(1.0625rem, 2.2vw, 1.25rem); }
.tour-stage { display: grid; justify-items: center; gap: 24px; position: relative; }
@media (min-width: 960px) {
  .tour-stage { grid-template-columns: 360px minmax(0, 420px); justify-content: center; align-items: start; gap: 64px; }
  .tour-stage .phone { width: 360px; }
}

/* The phone: every size inside is relative to its width, so it scales cleanly on any screen */
.phone {
  container-type: inline-size;
  width: min(100%, 360px); aspect-ratio: 9 / 19.2;
  padding: 10px; border-radius: 52px; background: var(--ink);
  box-shadow: 0 2px 0 1px rgb(255 255 255 / .06) inset, 0 40px 90px rgb(8 39 51 / .28);
}
.ph-screen {
  position: relative; height: 100%; overflow: hidden; border-radius: 42px;
  background: #f6f6f6; color: #161a1c; font: 400 3.9cqw/1.4 var(--font);
  display: flex; flex-direction: column;
}
.ph-screen button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.ph-screen .picto { width: 1.25em; height: 1.25em; }
.ph-status { display: flex; justify-content: space-between; align-items: center; padding: .7em 1.9em .2em; font-weight: 700; font-size: .92em; }
.ph-island { width: 6.4em; height: 1.7em; border-radius: 999px; background: #000; }
.ph-sig { width: 2.4em; height: .8em; border-radius: 3px; background: #161a1c; opacity: .8; }

.ph-head {
  display: flex; align-items: center; gap: .4em; margin: .4em .8em 0; padding: .45em .55em;
  border-radius: 1.5em; background: linear-gradient(#fff, #f4f8f9); box-shadow: 0 .4em 1.2em rgb(8 39 51 / .08);
}
.ph-ic { display: grid; place-items: center; width: 2.4em; height: 2.4em; border-radius: .8em; color: #154b62; }
.ph-plus { background: #e7f0f3; }
.ph-bell { position: relative; }
.ph-dot { position: absolute; top: .45em; right: .5em; width: .5em; height: .5em; border-radius: 50%; background: #d4622a; }
.ph-title { flex: 1; display: flex; justify-content: center; margin: 0; font-weight: 700; font-size: 1.15em; color: #154b62; }
.ph-word img { height: 1.5em; width: auto; }
.ph-named { display: none; align-items: center; gap: .35em; }
.phone:not([data-screen^="home"]) .ph-word { display: none; }
.phone:not([data-screen^="home"]) .ph-named { display: inline-flex; }

.ph-sub { display: none; gap: 1.2em; padding: .9em 1.3em .2em; overflow-x: auto; scrollbar-width: none; white-space: nowrap; font-size: .9em; color: #5d696e; }
.ph-sub :is(button, span) { padding-block: .3em; border-bottom: 2px solid transparent; }
.ph-sub :is(button, span).is-on { color: #1c617e; font-weight: 700; border-color: #1c617e; }
.phone[data-screen^="home"] .ph-sub[data-sub="home"],
.phone[data-screen^="connect"] .ph-sub[data-sub="connect"],
.phone[data-screen^="community"] .ph-sub[data-sub="community"] { display: flex; }

.ph-body { flex: 1; overflow-y: auto; scrollbar-width: none; padding: .9em .9em 6.2em; }
.ph-body::-webkit-scrollbar, .ph-sub::-webkit-scrollbar { display: none; }
.ph-view { display: grid; gap: .8em; align-content: start; }
.ph-view[hidden] { display: none; }
/* Mobility: the map runs edge to edge under the floating header, card and tab bar, as in the app */
.ph-status, .ph-head { position: relative; z-index: 1; }
.phone[data-screen="mobility"] .ph-body { overflow: hidden; }
.ph-view--map { position: absolute; inset: 0; z-index: 0; gap: 0; }

.ph-row { display: flex; align-items: center; justify-content: space-between; gap: .6em; }
.ph-muted { color: #5d696e; font-size: .88em; margin: 0; }
.ph-teal { color: #1c617e; font-weight: 700; margin: 0; font-size: .92em; }
.ph-soft { color: #d5e5ea; margin: 0; font-size: .85em; }
.ph-h { margin: 0 0 .5em; font-weight: 700; }
.ph-big { margin: .1em 0 0; font-size: 1.9em; font-weight: 700; letter-spacing: -.02em; color: #154b62; }
.ph-card, .ph-post, .ph-stories { display: grid; gap: .45em; padding: .95em; border-radius: 1.1em; background: #fff; }
.ph-card strong, .ph-post strong { font-size: .98em; }
.ph-actions, .ph-btns { justify-content: flex-start; gap: 1em; }
.ph-link { color: #1c617e; font-weight: 700; font-size: .9em; }
.ph-pill { padding: .2em .65em; border-radius: 999px; background: #e7f0f3; color: #154b62; font-size: .75em; font-weight: 700; white-space: nowrap; }
.ph-pill--ok { background: #e8f4ed; color: #24734d; }
.ph-pill--warn { background: #fff3df; color: #9a611f; justify-self: start; }
.ph-brief { display: grid; gap: .5em; padding: 1em; border-radius: 1.3em; background: #0d3142; color: #fff; }
.ph-brief strong { font-size: 1.1em; }
.ph-brief .ph-row span { font-size: .8em; color: #d5e5ea; }
.ph-line { margin: 0; padding-block-start: .5em; border-top: 1px solid rgb(255 255 255 / .16); font-size: .9em; }
.ph-story-row { justify-content: flex-start; gap: .55em; }
.ph-av { display: grid; place-items: center; flex: none; width: 3.2em; height: 3.2em; border-radius: 50%; color: #fff; font-weight: 700; background: #1c617e; box-shadow: 0 0 0 2px #fff, 0 0 0 4px #1c617e; }
.ph-av--sm { width: 2.2em; height: 2.2em; box-shadow: none; font-size: .9em; }
.ph-av--lg { width: 5.2em; height: 5.2em; font-size: 1.3em; }
.ph-av--add { background: #e7f0f3; color: #1c617e; }
.ph-av--a { background: #1c617e; } .ph-av--b { background: #9a611f; } .ph-av--c { background: #24734d; } .ph-av--d { background: #6d3fd1; }
.ph-av--topic { background: #e7f0f3; color: #1c617e; box-shadow: none; }
.ph-author { justify-content: flex-start; }
.ph-post p { margin: 0; font-size: .92em; }
.ph-meta { justify-content: flex-start; gap: 1.1em; font-size: .85em; }
.ph-meta span { display: inline-flex; align-items: center; gap: .3em; }
.ph-meta .picto { width: 1.1em; height: 1.1em; color: #5d696e; }
.ph-photo { position: relative; border-radius: .8em; aspect-ratio: 16 / 10; background: #cfdcdf center / cover; }
.ph-photo--plaza { background-image: url("assets/img/community.webp"); }
.ph-photo--sunset { background-image: linear-gradient(160deg, #f2b134, #d4622a 55%, #0d3142); }
.ph-photo--bike { background-image: linear-gradient(135deg, #cfe3ea, #1c617e); }
.ph-photo--drill { background-image: linear-gradient(135deg, #f6e4c4, #9a611f); }
.ph-photo--herbs { background-image: linear-gradient(135deg, #d8ecd9, #24734d); }
.ph-photo--toys { background-image: linear-gradient(135deg, #e6dcfb, #6d3fd1); }
.ph-photo--cafe { background-image: linear-gradient(135deg, #f3ddc3, #b8733f 60%, #5a3a22); }
.ph-photo--pitch { background-image: url("assets/img/community.webp"); background-position: center 70%; }
.ph-price { position: absolute; top: .5em; left: .5em; padding: .2em .55em; border-radius: .5em; background: #1c617e; color: #fff; font-size: .75em; font-weight: 700; }
.ph-chips, .ph-seg { display: flex; gap: .4em; overflow-x: auto; scrollbar-width: none; }
.ph-chips span, .ph-seg span { flex: none; padding: .35em .8em; border-radius: 999px; background: #fff; color: #5d696e; font-size: .82em; font-weight: 600; }
.ph-chips .is-on, .ph-seg .is-on { background: #1c617e; color: #fff; }
.ph-seg { padding: .25em; border-radius: 999px; background: #e7f0f3; }
.ph-seg span { flex: 1; text-align: center; background: none; }
.ph-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .6em; }
.ph-item { display: grid; gap: .25em; padding: .5em; border-radius: 1em; background: #fff; }
.ph-item strong { font-size: .88em; }
.ph-item .ph-muted { font-size: .75em; }
.ph-bar { height: .5em; border-radius: 999px; background: #e7f0f3; overflow: hidden; }
.ph-bar span { display: block; height: 100%; border-radius: inherit; background: #1c617e; }
.ph-search { display: flex; align-items: center; gap: .5em; padding: .65em .9em; border-radius: 999px; background: #fff; color: #78858a; font-size: .9em; }
.ph-chat { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .7em; padding: .7em .8em; border-radius: 1em; background: #fff; }
.ph-chat > span:nth-child(2) { display: grid; }
.ph-chat .ph-av { box-shadow: none; width: 2.8em; height: 2.8em; }
.ph-badge { display: grid; place-items: center; min-width: 1.6em; height: 1.6em; border-radius: 999px; background: #1c617e; color: #fff; font-size: .75em; font-weight: 700; }
.ph-field { padding: .7em .9em; border-radius: .8em; border: 1px solid #d9e0e2; color: #78858a; font-size: .9em; }
.ph-btn { display: inline-flex; align-items: center; justify-content: center; gap: .4em; padding: .55em 1em; border-radius: 999px; background: #1c617e; color: #fff; font-weight: 700; font-size: .88em; }
.ph-btn--ghost { background: #e7f0f3; color: #154b62; }
.ph-btn--sm { padding: .4em .8em; font-size: .78em; }
.ph-btn--block { display: flex; width: 100%; }
.ph-btn--lg { padding: .95em 1em; font-size: 1em; border-radius: 1em; }
.ph-person { justify-content: flex-start; }
.ph-person .ph-btn { margin-inline-start: auto; }
.ph-two { display: grid; grid-template-columns: 1fr 1fr; gap: .6em; }
.ph-tile { display: grid; justify-items: center; gap: .35em; padding: .9em .5em; border-radius: 1em; background: #fff; color: #154b62; font-weight: 700; font-size: .88em; }
.ph-tile .picto { width: 1.8em; height: 1.8em; color: #1c617e; }
.ph-steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: .3em; }
.ph-steps span { height: .4em; border-radius: 999px; background: #e7f0f3; }
.ph-steps .done { background: #1c617e; } .ph-steps .now { background: #f2b134; }
.ph-slot { display: flex; align-items: center; justify-content: space-between; padding: .7em .9em; border-radius: 1em; background: #fff; font-weight: 600; font-size: .92em; }
.ph-qr-code { display: grid; place-items: center; padding: .6em; border-radius: .8em; background: #f6f6f6; color: #082733; }
.ph-qr-code .picto { width: 6.5em; height: 6.5em; }
.ph-map { position: absolute; inset: 0; }
.ph-map svg { width: 100%; height: 100%; display: block; }
.ph-fab { position: absolute; right: .9em; display: grid; place-items: center; width: 3em; height: 3em; border-radius: 50%; background: #fff; color: #1c617e; box-shadow: 0 .4em 1em rgb(8 39 51 / .2); }
.ph-fab.is-on { background: #1c617e; color: #fff; }
.ph-fab--1 { top: 8.4em; } .ph-fab--2 { top: 12.2em; } .ph-fab--3 { top: 16em; }
.ph-closest { position: absolute; left: .9em; right: .9em; bottom: 5.6em; box-shadow: 0 .6em 1.6em rgb(8 39 51 / .15); }
.ph-me { display: grid; justify-items: center; gap: .3em; padding-block: .6em; text-align: center; }
.ph-me .ph-av { margin-block-end: .3em; }
.ph-pulse .ph-num { margin: 0; font-size: 2em; font-weight: 700; }
.ph-pulse small { font-size: .45em; color: #d5e5ea; }
.ph-list { display: grid; border-radius: 1.1em; background: #fff; overflow: hidden; }
.ph-list span { display: flex; justify-content: space-between; padding: .9em 1em; border-bottom: 1px solid #eef2f3; font-weight: 600; font-size: .92em; }
.ph-list em { font-style: normal; color: #78858a; }

.ph-tabs {
  position: absolute; left: .8em; right: .8em; bottom: .9em;
  display: grid; grid-template-columns: repeat(5, 1fr); padding: .4em; border-radius: 1.6em;
  background: rgb(255 255 255 / .92); backdrop-filter: blur(12px); box-shadow: 0 .6em 1.6em rgb(8 39 51 / .14);
}
.ph-tabs :is(button, span) { display: grid; place-items: center; height: 3.4em; border-radius: 1.1em; color: #78858a; transition: background .22s var(--ease), color .22s var(--ease); }
.ph-tabs :is(button, span) .picto { width: 1.7em; height: 1.7em; }
.ph-tabs :is(button, span).is-on { background: #e7f0f3; color: #1c617e; }

/* Tap targets and the highlight that ties the sign to what you tapped */
.phone [data-tip] { cursor: pointer; transition: box-shadow .25s var(--ease), transform .25s var(--ease); }
.phone [data-tip]:focus-visible { outline: 3px solid var(--here); outline-offset: 2px; }
.phone .is-tipped { box-shadow: 0 0 0 3px var(--here), 0 0 0 7px rgb(242 177 52 / .3) !important; border-radius: 1em; }
.phone .hint { position: relative; }
.phone .hint::after {
  content: ""; position: absolute; top: .3em; right: .3em; width: .9em; height: .9em; border-radius: 50%;
  background: var(--here); box-shadow: 0 0 0 0 rgb(242 177 52 / .6); animation: hint 2s var(--ease) infinite; pointer-events: none;
}
.phone.touched .hint::after { display: none; }
@keyframes hint { 70% { box-shadow: 0 0 0 .8em rgb(242 177 52 / 0); } 100% { box-shadow: 0 0 0 0 rgb(242 177 52 / 0); } }

/* The explanation sign */
.tip {
  position: relative; width: 100%; max-width: 420px; padding: 26px 26px 24px; border-radius: var(--r-sign);
  background: var(--teal); color: var(--on-teal); box-shadow: 0 30px 70px rgb(8 39 51 / .25);
  transition: transform .5s var(--ease), opacity .3s var(--ease);
}
.tip-title { font-size: clamp(1.5rem, 3vw, 2rem); margin: 0 0 16px; padding-inline-end: 40px; }
.tip-points { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.tip-points li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; color: var(--on-teal-soft); font-size: 1.0625rem; line-height: 1.45; }
.tip-points .arrow { font-size: 22px; color: var(--white); margin-block-start: 2px; }
.tip-close { display: none; position: absolute; top: 14px; inset-inline-end: 14px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgb(255 255 255 / .14); color: var(--white); cursor: pointer; }
.tip-close .picto { width: 20px; height: 20px; transform: rotate(45deg); }
.tip.is-swap .tip-title, .tip.is-swap .tip-points { animation: tipin .45s var(--ease); }
@keyframes tipin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (min-width: 960px) {
  .tip { transform: translateY(var(--tip-y, 0px)); }
  .tip::before { content: ""; position: absolute; top: 34px; inset-inline-start: -10px; width: 20px; height: 20px; background: var(--teal); transform: rotate(45deg); border-radius: 3px; }
}
/* Phones: the sign slides up from the bottom when you tap, and can be closed */
@media (max-width: 959px) {
  .tip { position: fixed; z-index: 30; left: 12px; right: 12px; bottom: 12px; width: auto; max-width: none; margin: 0 auto;
         padding: 22px 20px 20px; border-radius: 26px; transform: translateY(130%); opacity: 0; pointer-events: none; }
  .tip.is-open { transform: none; opacity: 1; pointer-events: auto; }
  .tip-close { display: grid; place-items: center; }
  .tip-title { font-size: 1.375rem; margin-bottom: 12px; }
  .tip-points { gap: 8px; }
  .tip-points li { font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .phone .hint::after { animation: none; }
  .tip, .tip.is-swap .tip-title, .tip.is-swap .tip-points { transition: none; animation: none; }
}

/* Small phones: both store badges on one line inside the first screen */
@media (max-width: 400px) {
  .totem .badges { --badge-h: 38px; gap: 10px; }
  .totem { gap: 18px; }
  .totem .lede { font-size: .9375rem; }
  .dir { min-height: 54px; }
}
.phone [data-tip=briefing].hint::after { top: auto; bottom: .6em; }

/* Tour: the "+" create menu and the demo forms it opens */
.ph-create {
  position: absolute; z-index: 3; top: 4.6em; right: .9em; width: 68%;
  display: grid; padding: .4em; border-radius: 1.1em; background: #fff;
  box-shadow: 0 1em 2.4em rgb(8 39 51 / .22); animation: phmenu .25s var(--ease);
}
.ph-create[hidden] { display: none; }
.ph-create button { display: flex; align-items: center; gap: .7em; padding: .62em .7em; border-radius: .7em; text-align: start; font-weight: 600; font-size: .9em; color: #154b62; }
.ph-create button:hover { background: #f1f6f7; }
.ph-create .picto { width: 1.3em; height: 1.3em; color: #1c617e; flex: none; }
.phone.menu-open .ph-plus { background: #0d3142; color: #fff; }
@keyframes phmenu { from { opacity: 0; transform: translateY(-.4em) scale(.97); } to { opacity: 1; transform: none; } }
.ph-form { gap: .35em; }
.ph-form-title { font-size: 1.25em !important; color: #154b62; }
.ph-label { margin-top: .35em; font-size: .8em; font-weight: 700; color: #161a1c; }
.ph-select { display: flex; justify-content: space-between; color: #161a1c; }
.ph-select em { font-style: normal; color: #78858a; }
.ph-area { min-height: 3.6em; color: #161a1c; }
.ph-btn--fit { justify-self: start; margin-top: .3em; }
.ph-form .ph-btns { margin-top: .5em; }

/* Short phones: a shorter photo strip and tighter rows keep the badges on the first screen */
@media (max-width: 767px) and (max-height: 800px) {
  .view { height: 112px; }
  .dir { min-height: 50px; padding-block: 5px; }
  .totem { gap: 16px; }
}

/* ---------- Feature demos: scripted phones on the walk (tools/demos.html, run by hero.js) ----------
   The finished state is the default; the script adds .dm-live and then .on to each part as its step arrives. */
.board--demo { padding-block-start: 72px; }
.dm-wrap { display: grid; place-items: center; height: 100%; min-height: 0; width: 100%; }
.board--demo .phone { height: 100%; width: auto; max-width: 100%; }
.board--demo .phone { padding: 2.8%; border-radius: 14.4% / 6.8%; }
.board--demo .ph-screen { border-radius: 12.4% / 5.6%; }
@media (max-width: 959px) {
  .board--demo { padding: 64px 14px 20px; }
  .board--demo .phone { height: auto; width: min(100%, 320px); }
}
.dm .ph-screen { transition: opacity .4s var(--ease); }
.dm.dm-out .ph-body { opacity: 0; transition: opacity .4s var(--ease); }
.dm .ph-body { position: relative; }
.dm .ph-view .picto { flex: none; }

/* Taps: an amber ring where a finger would press */
.dm-t { position: relative; }
.dm-tap {
  position: absolute; z-index: 5; left: 50%; top: 50%; width: 2.8em; height: 2.8em; margin: -1.4em 0 0 -1.4em;
  border-radius: 50%; border: 2px solid var(--here); background: rgb(242 177 52 / .35); opacity: 0; pointer-events: none;
}
.dm-tap.tapping { animation: dmtap .75s var(--ease) both; }
@keyframes dmtap { 0% { opacity: 0; transform: scale(1.5); } 35% { opacity: 1; transform: scale(.75); } 60% { opacity: 1; transform: scale(.85); } 100% { opacity: 0; transform: scale(1.7); } }

/* Shared moves: swap one text for another, fade a part in, slide a sheet up */
.dm-swap { display: inline-grid; }
.dm-swap > * { grid-area: 1 / 1; display: inline-flex; align-items: center; gap: .3em; transition: opacity .3s var(--ease); }
.dm-swap > :first-child { opacity: 0; }
.dm-live .dm-swap:not(.on) > :first-child { opacity: 1; }
.dm-live .dm-swap:not(.on) > :last-child { opacity: 0; }
.dm-in { transition: opacity .5s var(--ease), translate .6s var(--ease); }
.dm-live .dm-in:not(.on) { opacity: 0; translate: 0 .8em; }
.dm-up { transition: translate .6s var(--ease), opacity .4s var(--ease); }
.dm-live .dm-up:not(.on) { translate: 0 130%; opacity: 0; }

/* Buggy: pins drop in, the closest one lifts, a walking route draws to it */
.dm-pin { transform-box: fill-box; transform-origin: 50% 100%; transition: transform .5s var(--ease) calc(var(--d) * 110ms), opacity .3s linear calc(var(--d) * 110ms); }
.dm-live .dm-pin:not(.on) { opacity: 0; transform: translateY(-18px) scale(.6); }
.dm-pin--near.on, .dm:not(.dm-live) .dm-pin--near { transform: scale(1.18); }
.dm-route { stroke-dasharray: 1; stroke-dashoffset: 0; transition: stroke-dashoffset 1.4s var(--ease); }
.dm-live .dm-route:not(.on) { stroke-dashoffset: 1; }
.dm-halo { transform-box: fill-box; transform-origin: center; animation: dmhalo 2.4s var(--ease) infinite; }
@keyframes dmhalo { from { transform: scale(.5); opacity: .5; } to { transform: scale(1.5); opacity: 0; } }
.dm-press { transition: background .25s var(--ease), color .25s var(--ease); }
.dm-press.on, .dm:not(.dm-live) .dm-press { background: #1c617e; color: #fff; }
.dm .ph-closest { display: grid; gap: .45em; }
.dm .ph-closest .ph-row { padding: .45em .6em; margin-inline: -.6em; border-radius: .7em; transition: background .4s var(--ease); }
.dm .ph-closest .ph-row > span:first-child { display: inline-flex; align-items: center; gap: .4em; font-weight: 700; }
.dm .ph-closest .picto { color: #1c617e; }
.dm-near.on, .dm:not(.dm-live) .dm-near { background: #e7f0f3; }

/* Maintenance: type, choose, add a photo, send; then the request follows itself */
.dm-stack { position: relative; display: grid; }
.dm-stack > * { grid-area: 1 / 1; align-self: start; }
.dm-stack > .ph-form { transition: opacity .4s var(--ease); }
.dm-stack:has(> .dm-over.on) > .ph-form, .dm:not(.dm-live) .dm-stack > .ph-form { opacity: 0; }
.dm-typed { color: #161a1c; min-height: 2.6em; }
.dm-type { display: inline-block; white-space: nowrap; clip-path: inset(0 0 0 0); transition: clip-path 1.5s steps(22, end); }
.dm-live .dm-type:not(.on) { clip-path: inset(0 100% 0 0); }
.dm-type::after { content: ""; display: inline-block; width: 2px; height: 1.1em; margin-inline-start: 1px; vertical-align: -.2em; background: #1c617e; animation: dmcaret 1s steps(1) infinite; }
@keyframes dmcaret { 50% { opacity: 0; } }
.ph-select { display: flex; justify-content: space-between; align-items: center; }
.ph-select em { font-style: normal; }
.dm-ink { color: #161a1c; font-weight: 600; }
.dm-media { display: flex; gap: .6em; }
.dm-add, .dm-shot { width: 4.4em; height: 4.4em; border-radius: .8em; }
.dm-add { display: grid; place-items: center; border: 1.5px dashed #b7c4c8; color: #1c617e; }
.dm-add .picto { width: 1.6em; height: 1.6em; }
.dm-shot { position: relative; overflow: hidden; background: linear-gradient(170deg, #eef3f4, #cad7db); box-shadow: inset 0 0 0 1px #d9e0e2; }
.dm-shot::before { content: ""; position: absolute; left: 14%; right: 14%; top: 28%; height: 30%; border-radius: .35em; background: #fff; box-shadow: 0 .25em .5em rgb(8 39 51 / .15); }
.dm-shot::after { content: ""; position: absolute; left: 22%; right: 22%; top: 50%; height: 2px; background: #b7c4c8; box-shadow: 0 -.3em 0 #d9e0e2; }
.dm-send { margin-top: .5em; }
.dm-over { position: relative; z-index: 2; display: grid; gap: .5em; box-shadow: 0 .8em 2em rgb(8 39 51 / .16); }
.dm-track { display: grid; gap: .2em; margin: .3em 0 0; padding: 0; list-style: none; }
.dm-track li { position: relative; display: grid; grid-template-columns: 2em 1fr; gap: .7em; align-items: start; padding-block: .45em; }
.dm-track li:not(:last-child)::before { content: ""; position: absolute; left: .95em; top: 2.4em; bottom: -.5em; width: 2px; background: #e1e7e9; }
.dm-track b { display: grid; place-items: center; width: 2em; height: 2em; border-radius: 50%; background: #eef2f3; color: #fff; transition: background .4s var(--ease); }
.dm-track b .picto { width: 1.05em; height: 1.05em; }
.dm-track li > span { display: grid; }
.dm-track strong { font-size: .92em; }
.dm-track .ph-muted { font-size: .8em; }
.dm-track li:not(.dm-done):not(.dm-now) strong { color: #78858a; }
.dm-done.on b, .dm:not(.dm-live) .dm-done b { background: #1c617e; }
.dm-now.on b, .dm:not(.dm-live) .dm-now b { background: #f2b134; color: #082733; box-shadow: 0 0 0 .3em rgb(242 177 52 / .25); }
.dm-live .dm-track li:not(.on) b .picto { opacity: 0; }

/* Bookings: pick a day, pick a slot, book */
.dm-pitch { display: grid; grid-template-columns: 5.6em 1fr; gap: .8em; align-items: center; }
.dm-pitch .ph-photo { aspect-ratio: 1; }
.dm-pitch p { margin: 0; font-size: .82em; }
.dm-days { display: grid; grid-template-columns: repeat(5, 1fr); gap: .4em; }
.dm-days > span { display: grid; justify-items: center; gap: .1em; padding: .5em 0; border-radius: .9em; background: #fff; color: #5d696e; font-size: .8em; font-weight: 600; transition: background .3s var(--ease), color .3s var(--ease); }
.dm-days b { font-size: 1.35em; color: #161a1c; transition: color .3s var(--ease); }
.dm-days .dm-pick.on, .dm:not(.dm-live) .dm-days .dm-pick { background: #1c617e; color: #d5e5ea; }
.dm-days .dm-pick.on b, .dm:not(.dm-live) .dm-days .dm-pick b { color: #fff; }
.dm-taken { color: #9aa5a9; background: #eef2f3; }
.ph-slot.dm-pick { transition: box-shadow .3s var(--ease); }
.ph-slot.dm-pick.on, .dm:not(.dm-live) .ph-slot.dm-pick { box-shadow: inset 0 0 0 2px #1c617e; }
.dm-sheet { position: absolute; z-index: 3; left: .9em; right: .9em; bottom: 5.4em; display: grid; justify-items: center; gap: .3em; padding: 1.2em 1em; text-align: center; box-shadow: 0 -.4em 2em rgb(8 39 51 / .2); }
.dm-sheet strong { font-size: 1.15em; color: #154b62; }
.dm-sheet p { margin: 0; }
.dm-check { display: grid; place-items: center; width: 2.8em; height: 2.8em; border-radius: 50%; background: #24734d; color: #fff; }
.dm-check .picto { width: 1.5em; height: 1.5em; }

/* Community: say you are going, join the faces, see the chatter */
.dm-event { display: grid; gap: .45em; }
.dm-event .ph-photo { aspect-ratio: 16 / 8; }
.dm-faces { display: flex; }
.dm-faces .ph-av { box-shadow: 0 0 0 2px #fff; }
.dm-faces .ph-av + .ph-av { margin-inline-start: -.5em; }
.dm-me { background: #f2b134; color: #082733; font-size: .62em; }
.dm-go { transition: background .3s var(--ease), color .3s var(--ease); }
.dm-go.on, .dm:not(.dm-live) .dm-go { background: #24734d; }
.dm-go .picto { width: 1.1em; height: 1.1em; }
.dm-gopill.on, .dm:not(.dm-live) .dm-gopill { background: #e8f4ed; color: #24734d; }
.dm-heart .picto { transition: color .3s var(--ease), transform .4s var(--ease); }
.dm-heart.on .picto, .dm:not(.dm-live) .dm-heart .picto { color: #d4622a; }
.dm-heart.on .picto { transform: scale(1.25); }
