/* وصلنا landing page. Station indicator board world. See ../../DESIGN.md. */

:root {
  /* Brand, from the app */
  --teal: #117c70;
  --teal-deep: #0a5f56;
  --ink-text: #17312e;
  /* Board world */
  --ink: #0b221f;
  --ink-2: #12302c;
  --led: #ffb92e;
  --led-dim: rgba(255, 185, 46, 0.14);
  --paper: #f3f6f4;
  --paper-2: #e6efec;
  --white: #fff;
  --muted: #4a5f59;
  --muted-on-dark: #b4cdc7;
  --line-on-dark: rgba(180, 205, 199, 0.22);

  --display: "Noto Kufi Arabic", "Segoe UI", Tahoma, system-ui, sans-serif;
  --body: "Readex Pro", "Segoe UI", Tahoma, system-ui, sans-serif;

  --gutter: clamp(1.25rem, 5vw, 2.5rem);
  --maxw: 72rem;
  --section: clamp(4rem, 9vw, 7.5rem);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 4.5rem; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.85;
  color: var(--ink-text);
  background: var(--paper);
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--led); outline-offset: 3px; border-radius: 4px; }
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

.skip {
  position: absolute; inset-inline-start: 1rem; top: -4rem; z-index: 100;
  background: var(--ink); color: var(--white); padding: 0.6rem 1rem; border-radius: 0.5rem;
}
.skip:focus { top: 1rem; }

h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.35; text-wrap: balance; }
h2 { font-size: clamp(1.9rem, 4.6vw, 3.1rem); }
h3 { font-size: 1.25rem; font-weight: 600; }
.lede { font-size: clamp(1.1rem, 2vw, 1.3rem); line-height: 1.9; max-width: 38rem; }
.lede strong, .hero__lede strong { font-weight: 600; }

/* ---------- LED lettering ---------- */
.led {
  --pitch: 4px;
  --dot: 1.65px;
  display: block;
  font-family: var(--display);
  font-weight: 800;
  line-height: 1.25;
  color: var(--led);
  background-image: radial-gradient(circle, var(--led-dim) 0 calc(var(--dot) - 0.2px), transparent var(--dot));
  background-size: var(--pitch) var(--pitch);
  -webkit-mask-image: radial-gradient(circle, #000 0 calc(var(--dot) - 0.1px), transparent var(--dot));
  mask-image: radial-gradient(circle, #000 0 calc(var(--dot) - 0.1px), transparent var(--dot));
  -webkit-mask-size: var(--pitch) var(--pitch);
  mask-size: var(--pitch) var(--pitch);
  font-variant-numeric: tabular-nums;
}
.led--xl { font-size: clamp(3.4rem, 11vw, 5.6rem); }
.led--l { font-size: clamp(2.6rem, 8vw, 3.6rem); --pitch: 3.4px; --dot: 1.4px; }

/* ---------- Top bar ---------- */
.top { position: absolute; inset-inline: 0; top: 0; z-index: 20; color: var(--white); }
.top__in { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; height: 4.5rem; }
.brand { display: inline-flex; align-items: center; gap: 0.7rem; text-decoration: none; font-family: var(--display); font-weight: 800; font-size: 1.35rem; }
.brand__mark { width: 2.25rem; height: 2.25rem; }
.top__nav { display: none; gap: 1.75rem; font-size: 0.95rem; }
.top__nav a { text-decoration: none; opacity: 0.85; padding-block: 0.4rem; }
.top__nav a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 6px; }
@media (min-width: 52rem) { .top__nav { display: flex; } }

/* ---------- Phone frame ---------- */
.phone {
  position: relative;
  width: min(100%, 19rem);
  aspect-ratio: 598 / 1300;
  padding: 0.5rem;
  border-radius: 2.9rem;
  background: #07100f;
  box-shadow:
    0 0 0 1.5px rgba(255, 255, 255, 0.16) inset,
    0 2.2rem 3.5rem -1rem rgba(2, 15, 13, 0.55),
    0 0.6rem 1rem rgba(2, 15, 13, 0.25);
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 2.4rem; background: var(--ink-2); }

/* ---------- Board ---------- */
.board {
  background: var(--ink);
  color: var(--led);
  border-radius: 1.1rem;
  padding: 1rem 1.1rem 1.1rem;
  box-shadow: 0 1.4rem 2.4rem -0.8rem rgba(2, 15, 13, 0.6), 0 0 0 1px rgba(255, 185, 46, 0.18) inset;
}
.board__row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; font-size: 0.82rem; line-height: 1.4; margin-bottom: 0.5rem; }
.board__tag { color: var(--muted-on-dark); font-weight: 300; }
.board__dist { font-family: var(--display); font-weight: 600; color: var(--led); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: var(--white);
  background:
    linear-gradient(0deg, rgba(5, 40, 36, 0.35), transparent 40%),
    var(--teal-deep);
  padding-block: calc(4.5rem + clamp(2rem, 6vw, 4.5rem)) var(--section);
  overflow: hidden;
}
.hero__in { display: grid; gap: clamp(2.5rem, 6vw, 4rem); align-items: center; }
.hero h1 { font-size: clamp(3.1rem, 12.5vw, 5.4rem); line-height: 1.12; letter-spacing: -0.01em; }
.hero__lede { margin-top: 1.6rem; font-size: clamp(1.12rem, 2.4vw, 1.4rem); line-height: 1.9; max-width: 30rem; color: #e6f3f0; }
.hero__note { margin-top: 1.1rem; font-size: 0.95rem; color: #bfe0da; }

.stores { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.store {
  display: flex; flex-direction: column; align-items: flex-start; gap: 0.45rem;
  flex: 1 1 9.5rem; max-width: 13rem; padding: 0.75rem 1.1rem 0.85rem;
  background: var(--ink); color: var(--white);
  border-radius: 0.9rem; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14) inset;
}
.store__name { font-weight: 600; font-size: 1.1rem; line-height: 1.2; letter-spacing: 0.01em; direction: ltr; }
.soon { font-family: var(--display); font-weight: 600; font-size: 0.74rem; line-height: 1; padding: 0.38rem 0.6rem; border-radius: 99px; background: var(--led); color: var(--ink); }

/* Phone widths: the board sits first, then the text, then the phone. */
.hero__visual { display: contents; }
.board--float { order: -1; width: 100%; max-width: 21rem; }
.hero__text { order: 1; }
.phone--hero { order: 2; justify-self: center; width: min(72vw, 17.5rem); transform: rotate(-2.5deg); margin-top: 0.5rem; }
@media (min-width: 52rem) {
  .hero__in { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
  .hero__visual { position: relative; display: grid; justify-items: end; }
  .phone--hero { order: 0; width: min(100%, 19.5rem); margin-top: 0; }
  .board--float {
    order: 0; position: absolute; inset-inline-start: -2.5rem; bottom: 12%; width: 16.5rem;
    transform: rotate(1.5deg);
  }
}

/* LED ignition: the one authored moment */
.hero .led, .hero .board__dist { animation: ignite 1.1s steps(1, end) 0.15s both; }
@keyframes ignite {
  0% { opacity: 0; } 14% { opacity: 1; } 22% { opacity: 0.15; } 38% { opacity: 1; } 48% { opacity: 0.4; } 62%, 100% { opacity: 1; }
}

/* ---------- Demo ---------- */
.demo { background: var(--ink); color: var(--white); padding-block: var(--section); }
.demo__grid { display: grid; gap: clamp(2.5rem, 6vw, 4rem); align-items: start; }
.demo .lede { margin-top: 1rem; color: #d6e7e3; }
.demo .lede strong { color: var(--led); }
.demo__main { min-width: 0; }
.demo .phone--demo { width: min(52vw, 14rem); justify-self: center; background: #050d0c; }
@media (min-width: 52rem) {
  .demo__grid { grid-template-columns: minmax(0, 1fr) 17rem; }
  .demo .phone--demo { width: 100%; position: sticky; top: 6rem; }
}

.panel {
  margin-top: 2rem;
  background: var(--ink-2);
  border-radius: 1.4rem;
  padding: clamp(1.1rem, 3vw, 1.75rem);
  box-shadow: 0 0 0 1px var(--line-on-dark) inset;
  transition: box-shadow 0.3s var(--ease);
}
.panel[data-ringing="true"] { box-shadow: 0 0 0 2px var(--led) inset; }
.panel__head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 0.9rem; color: var(--muted-on-dark); font-size: 0.95rem; }
.tag { font-size: 0.78rem; line-height: 1; padding: 0.4rem 0.65rem; border-radius: 99px; border: 1px solid var(--line-on-dark); color: var(--muted-on-dark); white-space: nowrap; }
.panel[data-ringing="true"] .led--xl { animation: blink 0.9s steps(1, end) infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.28; } }

/* Strip map: the journey, with the alarm zone lit at its end */
.strip { position: relative; height: 3.4rem; margin-block: 1.5rem 0.4rem; }
.strip__line { position: absolute; inset-inline: 0; top: 50%; height: 4px; margin-top: -2px; border-radius: 4px; background: rgba(180, 205, 199, 0.28); }
.strip__zone {
  position: absolute; inset-block: 0.5rem; inset-inline-end: 0; width: calc(var(--zone, 0.0625) * 100%);
  border-radius: 0.7rem; background: repeating-linear-gradient(-45deg, rgba(255, 185, 46, 0.34) 0 6px, rgba(255, 185, 46, 0.14) 6px 12px);
  box-shadow: 0 0 0 1px rgba(255, 185, 46, 0.55) inset;
}
.strip__stop {
  position: absolute; inset-inline-end: 0; bottom: -1.5rem; font-size: 0.8rem; line-height: 1; color: var(--muted-on-dark);
}
.strip__stop::before {
  content: ""; position: absolute; inset-inline-end: 0; bottom: 1.45rem; width: 1.15rem; height: 1.15rem; border-radius: 50%;
  background: var(--ink-2); border: 3px solid var(--led);
}
.strip__bus {
  position: absolute; top: 50%; inset-inline-start: calc(var(--pos, 0) * 100%); width: 1.15rem; height: 1.15rem; margin-top: -0.575rem; margin-inline-start: -0.575rem;
  border-radius: 50%; background: var(--white); box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.2);
}
.panel[data-ringing="true"] .strip__bus { background: var(--led); box-shadow: 0 0 0 5px rgba(255, 185, 46, 0.3); }

.ctl-label { display: block; margin-top: 2.4rem; font-size: 0.95rem; color: var(--muted-on-dark); }
input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 2.75rem; margin: 0.35rem 0 0; background: transparent; cursor: grab;
}
input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 6px; background: rgba(180, 205, 199, 0.35); }
input[type="range"]::-moz-range-track { height: 6px; border-radius: 6px; background: rgba(180, 205, 199, 0.35); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 2rem; height: 2rem; margin-top: -13px; border-radius: 50%; background: var(--led); border: 4px solid var(--ink-2); box-shadow: 0 0 0 2px var(--led); }
input[type="range"]::-moz-range-thumb { width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--led); border: 4px solid var(--ink-2); box-shadow: 0 0 0 2px var(--led); }
input[type="range"]:active { cursor: grabbing; }

.speeds { border: 0; padding: 0; margin: 1.25rem 0 0; display: flex; flex-wrap: wrap; gap: 0.6rem; min-width: 0; }
.speeds legend { padding: 0; margin-bottom: 0.6rem; font-size: 0.95rem; color: var(--muted-on-dark); float: inline-start; width: 100%; }
.speeds__opt { position: relative; cursor: pointer; flex: 1 1 0; min-width: 0; }
.speeds__opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.speeds__opt span {
  display: flex; flex-direction: column; align-items: center; padding: 0.55rem 0.4rem; border-radius: 0.8rem; text-align: center;
  border: 1px solid var(--line-on-dark); font-weight: 600; line-height: 1.5; transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.speeds__opt small { font-weight: 300; font-size: 0.78rem; color: var(--muted-on-dark); }
.speeds__opt input:checked + span { background: var(--led); border-color: var(--led); color: var(--ink); }
.speeds__opt input:checked + span small { color: #3d3210; }
.speeds__opt input:focus-visible + span { outline: 3px solid var(--white); outline-offset: 3px; }

.readout { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.6rem; padding-top: 1.3rem; border-top: 1px solid var(--line-on-dark); }
.readout dt { font-size: 0.85rem; color: var(--muted-on-dark); line-height: 1.5; }
.readout dd { font-family: var(--display); font-weight: 600; font-size: 1.35rem; line-height: 1.5; color: var(--white); font-variant-numeric: tabular-nums; }
.status { margin-top: 1.2rem; min-height: 3.6em; font-size: 1rem; line-height: 1.8; color: #d6e7e3; }
.panel[data-ringing="true"] .status { color: var(--led); font-weight: 600; }
.fineprint { margin-top: 1.1rem; font-size: 0.88rem; line-height: 1.8; color: var(--muted-on-dark); max-width: 38rem; }

/* ---------- How it works ---------- */
.how { background: var(--paper); padding-block: var(--section); }
.how h2 { margin-bottom: clamp(2.5rem, 6vw, 4rem); }
.steps { display: grid; gap: 3rem; }
.step { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: 1.4rem; align-items: center; }
.phone--step { width: 100%; padding: 0.35rem; border-radius: 1.6rem; }
.phone--step img { border-radius: 1.3rem; }
.step__no {
  display: inline-grid; place-items: center; min-width: 3rem; height: 3rem; padding-inline: 0.8rem; margin-bottom: 0.7rem;
  font-family: var(--display); font-weight: 800; font-size: 1.7rem; line-height: 1; color: var(--led);
  background: var(--ink); border-radius: 0.7rem; box-shadow: 0 0 0 1px rgba(255, 185, 46, 0.25) inset;
}
.step h3 { margin-bottom: 0.4rem; }
.step p { color: var(--muted); max-width: 26rem; }
@media (min-width: 52rem) {
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem; align-items: start; }
  .step { grid-template-columns: 1fr; gap: 1.6rem; justify-items: start; }
  .step:nth-child(2) { margin-top: -2.5rem; }
  .phone--step { width: min(100%, 15rem); padding: 0.45rem; border-radius: 2.4rem; }
  .phone--step img { border-radius: 1.95rem; }
}

/* ---------- Details: the route line ---------- */
.details { background: var(--paper-2); padding-block: var(--section); }
.details__in { display: grid; gap: clamp(2rem, 5vw, 3.5rem); }
.route { position: relative; display: grid; gap: 2.2rem; padding-inline-start: 2.6rem; }
.route::before {
  content: ""; position: absolute; inset-inline-start: 0.62rem; top: 0.6rem; bottom: 0.6rem; width: 4px; border-radius: 4px; background: var(--teal); opacity: 0.35;
}
.route__stop { position: relative; }
.route__stop::before {
  content: ""; position: absolute; inset-inline-start: -2.6rem; top: 0.45rem; width: 1.5rem; height: 1.5rem; border-radius: 50%;
  background: var(--paper-2); border: 5px solid var(--teal);
}
.route__stop h3 { margin-bottom: 0.35rem; }
.route__stop p { color: var(--muted); max-width: 36rem; }
@media (min-width: 52rem) {
  .details__in { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); align-items: start; }
  .details h2 { position: sticky; top: 6rem; }
}

/* ---------- Notices ---------- */
.notices { background: var(--ink); color: var(--white); padding-block: var(--section); }
.lede--board { margin-top: 0.8rem; color: var(--muted-on-dark); }
.notice-list { margin-top: 2.2rem; display: grid; gap: 0; border-top: 1px solid var(--line-on-dark); max-width: 46rem; }
.notice {
  position: relative; padding-block: 1.15rem; padding-inline: 1.9rem 0; border-bottom: 1px solid var(--line-on-dark); color: #dcebe8;
  line-height: 1.9;
}
.notice::before {
  content: ""; position: absolute; inset-inline-start: 0; top: 1.65rem; width: 0.7rem; height: 0.7rem; background: var(--led); transform: rotate(45deg);
}

/* ---------- Close ---------- */
.soon-band { background: var(--teal-deep); color: var(--white); padding-block: var(--section); }
.soon-band h2 { font-size: clamp(2.4rem, 8vw, 4.6rem); line-height: 1.2; }
.soon-band p { margin-top: 1.2rem; font-size: 1.15rem; color: #d6ece8; }
.stores--close { margin-top: 2rem; }

/* ---------- Footer ---------- */
.foot { background: var(--ink); color: var(--muted-on-dark); padding-block: 2.2rem; font-size: 0.95rem; }
.foot__in { display: grid; gap: 0.3rem; }
.foot__brand { font-family: var(--display); font-weight: 800; font-size: 1.4rem; color: var(--white); line-height: 1.6; }
.foot a { color: var(--white); text-underline-offset: 5px; }
.foot__small { font-size: 0.85rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
