/* ══════════════════════════════════════════════════════
   RoxCab — Coming Soon
   ══════════════════════════════════════════════════════ */

/* ── Geist, for Latin ─────────────────────────────────── */

@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/geist-latin-400-normal.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: 'Geist';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/geist-latin-500-normal.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: 'Geist';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/geist-latin-600-normal.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: 'Geist';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/geist-latin-700-normal.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;
}

/* ── IBM Plex Sans Arabic, for Arabic ─────────────────── */

@font-face {
  font-family: 'IBM Plex Sans Arabic';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/ibm-plex-sans-arabic-arabic-400-normal.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1,
                 U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF,
                 U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: 'IBM Plex Sans Arabic';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/ibm-plex-sans-arabic-arabic-500-normal.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1,
                 U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF,
                 U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: 'IBM Plex Sans Arabic';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/ibm-plex-sans-arabic-arabic-600-normal.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1,
                 U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF,
                 U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: 'IBM Plex Sans Arabic';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/ibm-plex-sans-arabic-arabic-700-normal.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1,
                 U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF,
                 U+FE70-FE74, U+FE76-FEFC;
}

/* Latin cut of the Arabic family, so "you@example.com" inside an Arabic
   page matches the Arabic around it instead of jumping to Geist */
@font-face {
  font-family: 'IBM Plex Sans Arabic';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/ibm-plex-sans-arabic-latin-400-normal.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: 'IBM Plex Sans Arabic';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/ibm-plex-sans-arabic-latin-500-normal.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: 'IBM Plex Sans Arabic';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/ibm-plex-sans-arabic-latin-600-normal.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: 'IBM Plex Sans Arabic';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/ibm-plex-sans-arabic-latin-700-normal.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;
}

/* ══ Tokens ═══════════════════════════════════════════ */

:root {
  /* sampled straight out of the brand artwork — rgb(44,198,93) */
  --green:        #2CC65D;
  --green-deep:   #17A146;
  --green-light:  #79E9A2;
  --green-wash:   #EFFBF3;
  /* Green for TEXT only. The brand green is 2.25:1 on white, which fails
     WCAG AA even for large type, so small green copy uses this instead.
     Nothing else on the page changes colour. */
  --green-text:   #0F7A38;   /* 5.4:1 on white, 4.9:1 over the tinted areas */

  --ink:          #0B0F0D;
  --ink-soft:     #414D47;
  --ink-mute:     #4E5B52;   /* holds 4.5:1 even with a map line running
                                behind it; still lighter than --ink-soft */
  --line:         #E6EBE8;
  --paper:        #FFFFFF;

  --land:         #F3F9F5;
  --coastline:    #A9C5B5;   /* the country outline; the palest thing that still reads */
  --road:         #CADCD1;
  --street:       #C8DCD1;
  --node:         #B4CCBE;

  --frame-inset:  clamp(10px, 1.6vw, 22px);
  --frame-radius: clamp(14px, 1.8vw, 26px);
  --shell-pad:    clamp(18px, min(3.2vw, 5.4vh), 44px);

  --ease:         cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

html[dir='rtl'] body {
  font-family: 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, system-ui, sans-serif;
  line-height: 1.75;          /* Arabic ascenders and marks want more room */
  font-synthesis: none;       /* never fake a weight the family doesn't have */
}

/* Arabic is not letter-spaced, and IBM Plex Sans Arabic tops out at 700 */
html[dir='rtl'] .title {
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.28;
}

html[dir='rtl'] .eyebrow,
html[dir='rtl'] .lang { letter-spacing: 0; }

/* ══ Background: the city ═════════════════════════════ */

.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

/* two stacked layers sharing one viewBox and preserveAspectRatio, so the
   cars land exactly on the roads underneath them */
.bg-map,
.bg-traffic {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* non-scaling-stroke keeps the linework equally fine whether the map is
   scaled up on a 27" display or shrunk onto a phone */
.border {
  fill: var(--land);
  stroke: var(--coastline);
  stroke-width: 1.4;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.roads path {
  fill: none;
  stroke: var(--road);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

/* city streets are dense, so they want a hairline; any heavier and each
   city reads as a solid blob instead of a street pattern */
.local path {
  fill: none;
  stroke: var(--street);
  stroke-width: .75;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.places circle {
  fill: var(--paper);
  stroke: var(--node);
  stroke-width: 1.8;
  vector-effect: non-scaling-stroke;
}

.places .minor { stroke-width: 1.4; }

/* traffic — the only thing on this page that moves on its own */
.car rect { fill: var(--green); }

.car--local rect { opacity: .74; }
.car--slow rect  { opacity: .62; }
.car--faint rect { opacity: .42; }

/* a soft wash of paper under the words, so the map never fights the type */
.bg-lift {
  position: absolute;
  inset: 0;
  background:
    /* Sized to the text column, not to the page. A wide wash bleaches the
       middle of the map and the country outline disappears into it; over
       plain land the type needs no help at all, only where a road or the
       border happens to pass behind small text. */
    radial-gradient(32% 30% at 50% 46%,
      rgba(255,255,255,.90) 0%,
      rgba(255,255,255,.68) 58%,
      rgba(255,255,255,0) 100%),
    /* just enough paper under the footer line, where a road or the border
       can otherwise run straight behind 11px text */
    linear-gradient(to top,
      rgba(255,255,255,.82) 0%,
      rgba(255,255,255,.42) 7%,
      rgba(255,255,255,0) 15%),
    radial-gradient(135% 135% at 50% 50%,
      rgba(255,255,255,0) 74%,
      rgba(255,255,255,.55) 100%);
}

/* ══ Animated frame ═══════════════════════════════════ */

.frame {
  position: fixed;
  inset: var(--frame-inset);
  z-index: 3;
  pointer-events: none;
  border-radius: var(--frame-radius);
}

.frame-line {
  position: absolute;
  inset: 0;
  border: 1px solid var(--line);
  border-radius: inherit;
}

/* A ring-shaped window. The light behind it is what rotates, so the
   animation stays on transform rather than repainting a gradient. */
.frame-beam {
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 2px;
  overflow: hidden;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
          mask-composite: exclude;
}

.frame-beam::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 150vmax;
  height: 150vmax;
  margin: -75vmax 0 0 -75vmax;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    transparent 296deg,
    rgba(44, 198, 93, .10) 322deg,
    var(--green-light) 344deg,
    var(--green) 354deg,
    var(--green-deep) 358deg,
    transparent 360deg
  );
  animation: beamSpin 7s linear infinite;
  will-change: transform;
}

@keyframes beamSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ══ Layout ═══════════════════════════════════════════ */

.shell {
  position: relative;
  z-index: 2;
  min-height: 100dvh;
  padding: calc(var(--frame-inset) + var(--shell-pad));
}

.wrap {
  max-width: 1400px;
  margin: 0 auto;
  min-height: calc(100dvh - 2 * (var(--frame-inset) + var(--shell-pad)));
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 44px;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 1;
}

.brand img {
  height: clamp(26px, 2.9vw, 36px);
  width: auto;
  display: block;
}

/* ══ Language toggle ══════════════════════════════════ */

.lang {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.7);
  backdrop-filter: blur(8px);
  color: var(--ink-soft);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  padding: 9px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color .35s var(--ease), color .35s var(--ease),
              transform .35s var(--ease);
}

.lang:hover {
  border-color: var(--green);
  color: var(--green-deep);
  transform: translateY(-1px);
}

.lang:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

/* ══ Stage ════════════════════════════════════════════ */

.stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: clamp(16px, 2.4vh, 24px);
  padding: clamp(18px, 3.4vh, 46px) 0;
}

.eyebrow {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--green-text);
}

html[dir='rtl'] .eyebrow {
  font-size: 14px;
  text-transform: none;
  font-weight: 600;
}

.title {
  margin: 0;
  font-size: clamp(34px, min(6.1vw, 9vh), 72px);
  line-height: 1.04;
  letter-spacing: -.035em;
  font-weight: 700;
  max-width: 15ch;
}

.title span { display: block; }

/* 72px bold counts as large text, where the bar is 3:1. The brand green
   manages only 2.25:1, so the headline uses the deep green at 3.4:1. */
.title-accent { color: var(--green-deep); }

.lede {
  margin: 0;
  max-width: 46ch;
  color: var(--ink-soft);
  font-size: clamp(15px, 1.5vw, 17.5px);
  line-height: 1.68;
  text-wrap: pretty;
}

/* ══ Notify form ══════════════════════════════════════ */

.notify {
  width: min(100%, 500px);
  margin-top: 4px;
}

.notify-field {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(10px);
  transition: border-color .35s var(--ease), box-shadow .35s var(--ease);
}

.notify-field:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(44, 198, 93, .13);
}

.notify-field input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 15.5px;
  color: var(--ink);
  padding: 10px 16px;
  outline: none;
}

/* the address itself stays LTR, but it should start at the edge the
   reader's eye starts from */
html[dir='rtl'] .notify-field input { text-align: right; }

.notify-field input::placeholder { color: var(--ink-mute); }

.btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 22px;
  cursor: pointer;
  transition: background .35s var(--ease), transform .35s var(--ease);
}

.btn:hover {
  background: var(--green-deep);
  transform: translateY(-1px);
}

.btn:active { transform: translateY(0); }

.btn:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

.btn-arrow {
  width: 17px;
  height: 17px;
  transition: transform .35s var(--ease);
}

.btn:hover .btn-arrow { transform: translateX(3px); }
html[dir='rtl'] .btn-arrow { transform: scaleX(-1); }
html[dir='rtl'] .btn:hover .btn-arrow { transform: scaleX(-1) translateX(3px); }

.notify-note {
  margin: 12px 0 0;
  font-size: 13.5px;
  color: var(--ink-mute);
  transition: color .35s var(--ease);
}

.notify-note.is-ok    { color: var(--green-deep); font-weight: 600; }
.notify-note.is-error { color: #D6453C; font-weight: 600; }

.notify.is-done .notify-field { opacity: .45; pointer-events: none; }

/* ══ Footer ═══════════════════════════════════════════ */

.footbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.copy p {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-mute);
}

/* required by the ODbL licence on the map data, so it stays visible,
   just quiet */
.copy .credit {
  margin-top: 3px;
  font-size: 11.5px;
  color: var(--ink-mute);    /* no opacity: that would cut the contrast */
}

.socials {
  display: flex;
  gap: 8px;
}

.socials a {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink-soft);
  background: rgba(255,255,255,.7);
  transition: border-color .35s var(--ease), color .35s var(--ease),
              transform .35s var(--ease);
}

.socials a:hover {
  border-color: var(--green);
  color: var(--green-deep);
  transform: translateY(-2px);
}

.socials a:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

.socials svg {
  width: 17px;
  height: 17px;
  fill: currentColor;      /* the brand marks are solid glyphs, not outlines */
}

/* ══ Entrance ═════════════════════════════════════════ */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  animation: rise .8s var(--ease) forwards;
  animation-delay: var(--d, 0ms);
}

@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

/* ══ Short screens ════════════════════════════════════ */

@media (max-height: 780px) and (min-width: 621px) {
  .stage { padding: 14px 0; gap: 16px; }
  .lede  { font-size: 15px; line-height: 1.6; }
  .notify { margin-top: 0; }
  .notify-note { margin-top: 9px; }
}

/* ══ Small screens ════════════════════════════════════ */

@media (max-width: 620px) {
  .stage { gap: 16px; padding: 12px 0; }

  .lede { font-size: 15px; line-height: 1.62; }

  .notify { margin-top: 0; }
  .notify-note { margin-top: 10px; }

  .notify-field {
    flex-direction: column;
    align-items: stretch;
    border-radius: 20px;
    padding: 8px;
  }

  .notify-field input {
    padding: 12px 16px;
    text-align: center;
  }

  .btn { justify-content: center; border-radius: 14px; padding: 14px 22px; }

  .footbar { justify-content: center; text-align: center; }
}

/* ══ Reduced motion ═══════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
  /* the ring stays, the light stops running around it */
  .frame-beam::before { display: none; }

  .frame-beam {
    background: linear-gradient(120deg, var(--green-light), var(--green));
    opacity: .45;
  }

  /* the traffic is parked by app.js via pauseAnimations(), which is the
     only reliable way to stop SMIL; the cars stay on the map */

  .reveal {
    opacity: 1;
    transform: none;
    animation: none;
  }
}
