/* ==========================================================================
   Rasyat Alyam Establishment — landing page
   Identity: RAE orange #FF751F, black hero/footer, light content sections.
   Type: Inter (Latin) · Noto Kufi Arabic (Arabic) · IBM Plex Mono (data)
   ========================================================================== */

:root {
  --signal: #ff751f;          /* RAE orange */
  --signal-hover: #ff8a3f;
  --signal-deep: #e5640f;     /* icons / strokes on light */
  --signal-text: #c2500a;     /* orange text on white (AA) */
  --signal-soft: #fff2e8;

  --night: #0a0a0b;           /* hero + footer */
  --asphalt: #141518;
  --ink: #15171c;
  --slate: #5b616d;
  --line: #e6e8ec;
  --mist: #f5f6f8;
  --white: #ffffff;

  /* Inter renders Latin; Arabic glyphs fall through to Noto Kufi Arabic */
  --font-display: 'Inter', 'Noto Kufi Arabic', system-ui, sans-serif;
  --font-body: 'Inter', 'Noto Kufi Arabic', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;

  --ease-out: cubic-bezier(.2, .7, .2, 1);
  --radius-lg: 24px;
  --nav-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }

/* Page scrollbar in the brand orange of the Contact button */
html { scrollbar-color: var(--signal) var(--night); }
@supports not (scrollbar-color: auto) {
  ::-webkit-scrollbar { width: 11px; height: 11px; }
  ::-webkit-scrollbar-track { background: var(--night); }
  ::-webkit-scrollbar-thumb { background: var(--signal); border-radius: 999px; border: 2px solid var(--night); }
  ::-webkit-scrollbar-thumb:hover { background: var(--signal-hover); }
}
body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.85;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3 { text-wrap: balance; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button, input, textarea { font: inherit; color: inherit; }
.mono { font-family: var(--font-mono); letter-spacing: .01em; }

.wrap { width: min(100% - 48px, 1200px); margin-inline: auto; }

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

.skip-link {
  position: absolute; top: -100px; inset-inline-start: 16px; z-index: 100;
  padding: 10px 16px; border-radius: 10px;
  background: var(--signal); color: var(--night); font-weight: 600;
}
.skip-link:focus { top: 12px; }

/* ── Buttons ───────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 52px; padding: 0 26px;
  border: 1px solid transparent; border-radius: 999px;
  font-family: var(--font-body); font-size: 16px; font-weight: 600;
  white-space: nowrap; cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s, box-shadow .25s, transform .2s;
}
.btn:active { transform: translateY(1px); }
.btn-sm { height: 42px; padding: 0 18px; font-size: 14.5px; }
.btn-primary { background: var(--signal); color: var(--night); }
.btn-primary:hover { background: var(--signal-hover); box-shadow: 0 10px 28px rgba(255, 117, 31, .32); }
.btn-ghost-dark { color: var(--white); border-color: rgba(255, 255, 255, .22); }
.btn-ghost-dark:hover { border-color: rgba(255, 255, 255, .7); background: rgba(255, 255, 255, .04); }
.btn-dark { background: var(--night); color: var(--white); }
.btn-dark:hover { background: #222429; }
.btn-arrow {
  width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
  transition: transform .25s var(--ease-out);
}
.btn:hover .btn-arrow { transform: translateX(-4px); }

/* ── Navigation ────────────────────────────────────────── */
.nav {
  position: fixed; inset-inline: 0; top: 0; z-index: 50;
  transition: background-color .3s, border-color .3s, backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.nav.is-solid {
  background: rgba(10, 10, 11, .94);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom-color: rgba(255, 255, 255, .06);
}
.nav-inner { height: var(--nav-h); display: flex; align-items: center; gap: 28px; }
.nav-brand { display: flex; align-items: center; gap: 12px; color: var(--white); }
.nav-brand img { height: 60px; width: auto; }
.nav-links { display: flex; gap: 4px; margin-inline-start: auto; }
.nav-links a {
  position: relative; padding: 8px 14px; border-radius: 999px;
  color: rgba(255, 255, 255, .7); font-size: 15px; font-weight: 500;
  transition: color .2s;
}
.nav-links a:hover, .nav-links a.is-active { color: var(--white); }
.nav-toggle {
  display: none; margin-inline-start: auto;
  width: 44px; height: 44px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .16);
  background: transparent; cursor: pointer; position: relative;
}
.nav-toggle span {
  position: absolute; left: 12px; right: 12px; height: 2px; border-radius: 2px; background: var(--white);
  transition: transform .25s var(--ease-out), top .25s;
}
.nav-toggle span:first-child { top: 16px; }
.nav-toggle span:last-child { top: 25px; }
.nav.is-open .nav-toggle span:first-child { top: 20.5px; transform: rotate(45deg); }
.nav.is-open .nav-toggle span:last-child { top: 20.5px; transform: rotate(-45deg); }
.mobile-menu { display: none; }

/* Language switch */
.lang-toggle {
  display: inline-flex; align-items: center; gap: 7px; flex: none;
  height: 38px; padding: 0 13px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .16); background: transparent;
  color: rgba(255, 255, 255, .85); cursor: pointer;
  font-family: var(--font-display); font-size: 13.5px; font-weight: 600; letter-spacing: .02em;
  transition: border-color .2s, color .2s, background-color .2s;
}
.lang-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; transition: transform .5s var(--ease-out); }
.lang-toggle:hover { border-color: var(--signal); color: var(--white); background: rgba(255, 117, 31, .08); }
.lang-toggle:hover svg { transform: rotate(-30deg); }
.lang-toggle:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }
.lang-toggle-label[lang="ar"], .lang-toggle[lang="ar"] .lang-toggle-label { font-family: var(--font-body); }

/* Hide the Arabic source for a moment while English is applied on load */
.i18n-pending body { visibility: hidden; }

/* ── Hero ──────────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  padding: calc(var(--nav-h) + 48px) 0 96px;
  background:
    radial-gradient(60% 70% at 22% 45%, rgba(255, 117, 31, .10), transparent 70%),
    var(--night);
  color: var(--white);
}
.hero-map {
  position: absolute; inset: 0; z-index: -1;
}
.hero-map svg {
  width: 100%; height: 100%;
  -webkit-mask-image: linear-gradient(to left, rgba(0,0,0,.18) 0%, rgba(0,0,0,.35) 34%, #000 60%);
          mask-image: linear-gradient(to left, rgba(0,0,0,.18) 0%, rgba(0,0,0,.35) 34%, #000 60%);
}
#heroMap .blk { fill: #111215; }
#heroMap .blk.park { fill: #12160f; }
#heroMap .st { stroke: #1b1c20; stroke-width: 1; }
#heroMap .st.major { stroke: #26282e; stroke-width: 2.4; }
#heroMap .artery { fill: none; stroke: #2a2c32; stroke-width: 10; stroke-linecap: round; }
#heroMap .artery-core { fill: none; stroke: #3a3c44; stroke-width: 1.2; stroke-dasharray: 10 12; }
#heroMap .poi { fill: #3a3c43; }
#heroMap .route-plan {
  fill: none; stroke: rgba(255, 117, 31, .34); stroke-width: 4;
  stroke-linecap: round; stroke-linejoin: round;
}
#heroMap .route-glow {
  fill: none; stroke: var(--signal); stroke-width: 16; opacity: .2;
  stroke-linecap: round; stroke-linejoin: round; filter: blur(7px);
}
#heroMap .route-done {
  fill: none; stroke: var(--signal); stroke-width: 4.5;
  stroke-linecap: round; stroke-linejoin: round;
}
#heroMap .origin { fill: var(--night); stroke: var(--white); stroke-width: 3; }
#heroMap .marker-dot { fill: var(--signal); stroke: var(--white); stroke-width: 3; }
#heroMap .marker-pulse {
  fill: var(--signal); opacity: .35; transform-box: fill-box; transform-origin: center;
  animation: pulse 1.8s ease-out infinite;
}
#heroMap .dest-pin { fill: var(--signal); }
#heroMap .dest-core { fill: var(--night); }
#heroMap .dest-ripple {
  fill: none; stroke: var(--signal); stroke-width: 2; opacity: 0;
  transform-box: fill-box; transform-origin: center;
}
#heroMap .is-arrived .dest-ripple { animation: ripple 1.6s ease-out infinite; }
#heroMap .dest { transition: opacity .4s; }

@keyframes pulse { 0% { transform: scale(1); opacity: .45; } 100% { transform: scale(3.2); opacity: 0; } }
@keyframes ripple { 0% { transform: scale(.6); opacity: .8; } 100% { transform: scale(2.6); opacity: 0; } }

.telemetry {
  position: absolute; top: 20%; inset-inline-end: 4%;
  width: 290px; padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, .09); border-radius: 18px;
  background: rgba(20, 21, 24, .72);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
  font-size: 13px; line-height: 1.6;
  opacity: 0; transform: translateY(10px);
  animation: tel-in .8s var(--ease-out) .9s forwards;
}
@keyframes tel-in { to { opacity: 1; transform: none; } }
.telemetry-head { display: flex; align-items: center; gap: 8px; color: rgba(255, 255, 255, .85); font-weight: 600; }
.telemetry-id { margin-inline-start: auto; font-family: var(--font-mono); font-size: 11.5px; color: rgba(255, 255, 255, .4); }
.telemetry dl { margin-top: 12px; display: grid; gap: 6px; }
.telemetry dl div { display: flex; justify-content: space-between; gap: 12px; }
.telemetry dt { color: rgba(255, 255, 255, .45); }
.telemetry dd { color: var(--white); font-weight: 500; }
.telemetry dd.mono { font-size: 12.5px; white-space: nowrap; }
.telemetry dt { white-space: nowrap; }
.telemetry-bar { margin-top: 12px; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.telemetry-bar span { display: block; height: 100%; width: 0%; background: var(--signal); border-radius: inherit; margin-inline-start: auto; }

.hero-inner { position: relative; }
.hero-copy { max-width: 700px; }
.eyebrow { font-size: 15px; font-weight: 600; color: var(--signal-text); }
.eyebrow-on-dark { color: var(--signal-hover); }
.hero h1 {
  margin-top: 18px;
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(31px, 4.4vw, 62px); line-height: 1.3;
}
.h1-route { display: block; color: var(--signal); }
.hero-lead { margin-top: 24px; max-width: 540px; font-size: 18.5px; color: rgba(255, 255, 255, .7); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

/* Headline entrance: the two lines glide in from opposite sides of the page
   (first from the reading-start side), then settle into place. */
.h1-line { display: block; }
.h1-lead  { --from: 1;  animation: h1-in 1.15s var(--ease-out) .15s both; }
.h1-route { --from: -1; animation: h1-in 1.15s var(--ease-out) .42s both; }
html[dir="ltr"] .h1-lead  { --from: -1; }
html[dir="ltr"] .h1-route { --from: 1; }
@keyframes h1-in {
  0%   { opacity: 0; transform: translateX(calc(var(--from) * 42vw)); }
  60%  { opacity: 1; }
  100% { opacity: 1; transform: none; }
}

/* ── Sections ──────────────────────────────────────────── */
.section { position: relative; padding: 128px 0; overflow-x: clip; }
.section-mist { background: var(--mist); isolation: isolate; overflow: hidden; }
.section-mist::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: url('assets/topo.svg') no-repeat left -220px top -160px / 1000px auto;
  opacity: .055;
}
.section h2 {
  margin-top: 14px;
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(30px, 3.4vw, 46px); line-height: 1.3;
}
.section-head { max-width: 720px; margin-bottom: 56px; }
.section-head h2:first-child { margin-top: 0; }
.section-head-split {
  max-width: none; display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: end;
}
.lead { font-size: 19px; color: var(--slate); line-height: 1.9; }

.icon-tile { display: block; flex-shrink: 0; line-height: 0; }
.icon-tile svg {
  width: 30px; height: 30px; fill: none; stroke: var(--signal-deep);
  stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}
.icon-tile.icon-sm svg { width: 22px; height: 22px; margin-top: 3px; }

/* ── About ─────────────────────────────────────────────── */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.about-copy .lead { margin-top: 24px; color: var(--ink); }
.about-copy p:not(.lead):not(.eyebrow) { margin-top: 16px; color: var(--slate); }

.layers { position: relative; }
.layers-stage { position: relative; aspect-ratio: 1 / .92; perspective: 1400px; }
.layer {
  --gap: 0px;
  position: absolute; left: 20%; right: 20%; top: 26%; aspect-ratio: 1;
  border-radius: 22px;
  transform: rotateX(58deg) rotateZ(-42deg) translateZ(calc(var(--i) * var(--gap)));
  transition: transform 1.2s var(--ease-out);
}
.layer svg { width: 100%; height: 100%; }
.layer-base { --i: 0; background: var(--white); border: 1px solid var(--line); box-shadow: 0 40px 80px rgba(21, 23, 28, .14); }
.layer-data { --i: 1; background: rgba(255, 117, 31, .05); border: 1px solid rgba(255, 117, 31, .28); }
.layer-route { --i: 2; border: 1px dashed rgba(21, 23, 28, .22); }
.layers.is-open .layer { --gap: 62px; }
.layers.is-open:hover .layer { --gap: 78px; }
.lb-grid path { fill: none; stroke: #eceef2; stroke-width: 1; }
.lb-road { fill: none; stroke: #d8dbe2; stroke-width: 7; stroke-linecap: round; }
.lb-road-thin { stroke-width: 3.5; }
.lb-park { fill: #eef4ea; }
.layer-data circle { fill: var(--signal); }
.layer-data .ld-ring { fill: none; stroke: var(--signal); stroke-width: 1.2; opacity: .5; }
.lr-path {
  fill: none; stroke: var(--ink); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1 9;
}
.lr-start { fill: var(--white); stroke: var(--ink); stroke-width: 3; }
.lr-end { fill: var(--signal); stroke: var(--white); stroke-width: 3; }
.layers-legend {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px;
  margin-top: 8px; font-size: 14px; color: var(--slate);
}
.layers-legend span { display: inline-flex; align-items: center; gap: 8px; }
.layers-legend i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.lg-base { background: var(--white); border: 1px solid #cfd3da; }
.lg-data { background: var(--signal); }
.lg-route { border: 2px dotted var(--ink); }

/* ── Vision & mission: route story ─────────────────────── */
/* Mission = the route, vision = the destination. Static by default (both
   statements visible, route complete); app.js adds .vm-live and plays the
   route on a loop while the section is on screen. */
.vm-story { padding: 0; overflow: clip; }
.vm-sticky { padding: 128px 0; }
.vm-layout {
  display: grid; gap: 0 72px; align-items: center;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  grid-template-areas: "head map" "tabs map" "steps map";
}
.vm-head { grid-area: head; align-self: end; }
.vm-steps { grid-area: steps; display: grid; gap: 40px; margin-top: 36px; align-self: start; }
.vm-tabs { grid-area: tabs; display: none; }
.vm-map { grid-area: map; }

.vm-kicker { display: flex; align-items: baseline; gap: 10px; font-size: 16px; font-weight: 700; color: var(--signal-text); }
.vm-kicker-sub { font-size: 14px; font-weight: 500; color: var(--slate); }
.vm-kicker-sub::before { content: '/'; margin-inline-end: 10px; color: #c9cdd4; }
.vm-text {
  margin-top: 12px; max-width: 560px;
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(19px, 1.55vw, 23px); line-height: 1.8; color: var(--ink);
}
.vm-text em { font-style: normal; color: var(--signal-deep); }
html[lang="en"] .vm-text { line-height: 1.55; letter-spacing: -.012em; }


/* Map card */
.vm-map {
  position: relative; margin: 0; aspect-ratio: 600 / 520; border-radius: 26px; overflow: hidden;
  border: 1px solid var(--line); background: var(--white);
  box-shadow: 0 30px 70px rgba(21, 23, 28, .08);
}
.vm-map svg { display: block; width: 100%; height: 100%; }
html[dir="ltr"] #vmMap { transform: scaleX(-1); }
.vm-river { fill: none; stroke: #e8eef5; stroke-width: 22; stroke-linecap: round; }
.vm-blocks rect { fill: #f4f5f7; }
.vm-blocks .vm-park { fill: #eef3ea; }
.vm-streets path { fill: none; stroke: #e3e5ea; stroke-width: 7; }
.vm-streets-minor path { stroke: #eceef2; stroke-width: 3; }
.vm-plan { fill: none; stroke: #c9cdd4; stroke-width: 3; stroke-dasharray: 2 9; stroke-linecap: round; stroke-linejoin: round; }
.vm-route { fill: none; stroke: var(--signal); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.vm-origin { fill: var(--white); stroke: var(--ink); stroke-width: 4; }
.vm-dest-pin { fill: var(--signal); }
.vm-dest-core { fill: var(--white); }
.vm-dest-ripple { fill: rgba(255, 117, 31, .22); transform-box: fill-box; transform-origin: center; }
.vm-marker-halo { fill: rgba(255, 117, 31, .18); }
.vm-marker-dot { fill: var(--signal); stroke: var(--white); stroke-width: 3; }
.vm-marker { opacity: 0; }

/* Map labels (HTML so they translate); inline-end mirrors with the map */
.vm-chip {
  position: absolute; padding: 6px 12px; border-radius: 8px;
  background: var(--white); border: 1px solid var(--line);
  box-shadow: 0 6px 18px rgba(21, 23, 28, .08);
  font-size: 13.5px; font-weight: 600; color: var(--ink); white-space: nowrap;
  transition: color .3s, border-color .3s;
}
/* centred under each point: origin (70,450) and pin (500,90) in a 600x520 map */
.vm-chip-start { top: 86.5%; inset-inline-end: calc(11.7% + 18px); transform: translate(0, -50%); }
.vm-chip-end { top: 22%; inset-inline-end: 83.3%; transform: translate(-50%, 0); }
html[dir="ltr"] .vm-chip-end { transform: translate(50%, 0); }

/* ── Live (auto-playing loop, set up by app.js) ── */
.vm-live .vm-steps { gap: 0; }
.vm-live .vm-step {
  grid-area: 1 / 1; opacity: 0; transform: translateY(18px);
  transition: opacity .5s var(--ease-out), transform .6s var(--ease-out);
  pointer-events: none;
}
.vm-live .vm-steps[data-active="mission"] [data-step="mission"],
.vm-live .vm-steps[data-active="vision"] [data-step="vision"] { opacity: 1; transform: none; pointer-events: auto; }
.vm-live .vm-marker { opacity: 1; }
.vm-live .vm-dest.is-arrived .vm-dest-ripple { animation: vm-ripple 1.8s var(--ease-out) infinite; }
@keyframes vm-ripple { 0% { transform: scale(.6); opacity: 1; } 100% { transform: scale(2.4); opacity: 0; } }
.vm-live .vm-chip.is-on { color: var(--signal-text); border-color: rgba(255, 117, 31, .45); }

/* Tabs: show that the other statement exists and when it will appear;
   each bar fills while its statement is on screen. Click to jump. */
.vm-live .vm-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; max-width: 460px; margin-top: 32px; }
.vm-live .vm-kicker { display: none; }
.vm-live .vm-steps { margin-top: 22px; }
.vm-tab {
  display: grid; gap: 10px; padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; color: var(--slate); text-align: start;
}
.vm-tab-label { display: flex; align-items: baseline; gap: 8px; }
.vm-tab-label b { font-size: 16px; font-weight: 700; transition: color .3s; }
.vm-tab-label small { font-size: 13px; font-weight: 500; color: #9aa0aa; }
.vm-tab[aria-selected="true"] .vm-tab-label b { color: var(--signal-text); }
.vm-tab:hover .vm-tab-label b { color: var(--ink); }
.vm-tab[aria-selected="true"]:hover .vm-tab-label b { color: var(--signal-text); }
.vm-tab:focus-visible { outline: 2px solid var(--signal); outline-offset: 6px; border-radius: 4px; }
.vm-tab-bar { position: relative; height: 3px; border-radius: 3px; background: #dfe2e7; overflow: hidden; }
.vm-tab-bar i { position: absolute; inset-block: 0; inset-inline-start: 0; width: 0; background: var(--signal); border-radius: inherit; }

/* ── Expertise ─────────────────────────────────────────── */
.ex-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.ex-card {
  --mx: 50%; --my: 0%;
  position: relative; overflow: hidden;
  padding: 36px 32px 40px; border-radius: 22px;
  border: 1px solid var(--line);
  background: var(--white);
  transition: border-color .25s;
}
.ex-card:hover { border-color: #cfd3da; }
.ex-card h3 { margin-top: 26px; font-family: var(--font-display); font-weight: 600; font-size: 21px; line-height: 1.5; }
.ex-card p { margin-top: 10px; color: var(--slate); font-size: 16px; }

/* ── Projects ──────────────────────────────────────────── */
.projects { display: grid; gap: 24px; }
.project {
  display: grid; grid-template-columns: 1fr 1.1fr;
  border-radius: 28px; overflow: hidden;
  background: var(--white); border: 1px solid var(--line);
  box-shadow: 0 30px 80px rgba(21, 23, 28, .06);
}
.project-media {
  position: relative; isolation: isolate;
  display: grid; place-items: center; padding: 56px;
  background: linear-gradient(160deg, #fff7f0, var(--signal-soft));
}
.project-media::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: url('assets/topo.svg') no-repeat center / 140% auto; opacity: .07;
}
.project-media picture { display: block; width: 100%; max-width: 420px; }
.project-media img { display: block; width: 100%; }
.project-body { padding: 52px 48px; display: flex; flex-direction: column; justify-content: center; }
.project-title { font-family: var(--font-display); font-weight: 600; font-size: clamp(24px, 2.4vw, 32px); line-height: 1.3; }
.project-sep { color: #d0d3da; font-weight: 300; margin-inline: 4px; }
.project-tagline { margin-top: 12px; font-size: 18px; font-weight: 600; color: var(--signal-text); }
.project-desc { margin-top: 12px; color: var(--slate); }
.project-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 22px; }
.project-links li {
  padding: 5px 14px; border-radius: 8px; border: 1px solid var(--line);
  font-size: 14px; font-weight: 500; color: var(--ink);
}
.project-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 32px; }
.project-url { font-size: 13px; color: var(--slate); }

/* ── Contact ───────────────────────────────────────────── */
.contact { display: grid; grid-template-columns: .9fr 1.1fr; gap: 72px; align-items: start; }
.contact-copy .lead { margin-top: 20px; }
.contact-facts { display: grid; gap: 18px; margin-top: 40px; }
.contact-facts li { display: flex; align-items: center; gap: 14px; }
.contact-facts span:not(.icon-tile) { display: block; font-size: 13.5px; color: var(--slate); line-height: 1.5; }
.contact-facts strong { font-weight: 600; font-size: 16.5px; }
.contact-facts strong.mono { font-size: 15.5px; }

.contact-form {
  padding: 36px; border-radius: var(--radius-lg);
  background: var(--white); border: 1px solid var(--line);
  box-shadow: 0 30px 80px rgba(21, 23, 28, .07);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 16px; }
.field { display: flex; flex-direction: column; }
.field-full { grid-column: 1 / -1; }
.field label { margin-bottom: 8px; font-size: 14.5px; font-weight: 600; }
.optional { font-weight: 400; color: var(--slate); }
.field input, .field textarea {
  width: 100%; padding: 0 16px; height: 52px;
  border: 1px solid #dadde3; border-radius: 12px; background: #fafafb;
  font-size: 16px; outline: none;
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.field textarea { height: auto; min-height: 148px; padding: 14px 16px; resize: vertical; line-height: 1.7; }
.field input:hover, .field textarea:hover { border-color: #c4c8d0; }
.field input:focus, .field textarea:focus { border-color: var(--signal); background: var(--white); box-shadow: 0 0 0 4px rgba(255, 117, 31, .15); }
.field input[dir="ltr"] { text-align: left; }
.field.has-error input, .field.has-error textarea { border-color: #d92d20; background: #fffbfa; }
.field.has-error input:focus, .field.has-error textarea:focus { box-shadow: 0 0 0 4px rgba(217, 45, 32, .12); }
.field-error { font-size: 13.5px; color: #b42318; line-height: 1.5; }
.field-error:not(:empty) { margin-top: 6px; }

.form-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 24px; }
.btn-submit { min-width: 170px; }
.spinner {
  display: none; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(10, 10, 11, .25); border-top-color: var(--night);
  animation: spin .7s linear infinite;
}
.btn-submit.is-loading { pointer-events: none; opacity: .85; }
.btn-submit.is-loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.form-status { font-size: 14.5px; line-height: 1.6; }
.form-status.is-success { color: #067647; }
.form-status.is-error { color: #b42318; }

/* ── Footer ────────────────────────────────────────────── */
/* Layout follows the BMD site footer (brand + partners, two link columns,
   contact, divider, bottom bar with registration box) in RAE colours. */
.footer {
  background: linear-gradient(135deg, #0b0b0d 0%, #111114 55%, #0a0a0b 100%);
  color: rgba(255, 255, 255, .5); font-size: 13px;
}
.ft-grid {
  display: grid; gap: 48px; align-items: start;
  grid-template-columns: 1.25fr .62fr .72fr 1.05fr;
  padding: 88px 0 64px;
}
.ft-logo { width: 130px; height: auto; display: block; }
.ft-name { margin-top: 14px; font-size: 14px; font-weight: 700; color: #f5f0e8; }
.ft-tagline { margin-top: 8px; max-width: 320px; font-size: 12.5px; line-height: 1.9; color: rgba(255, 255, 255, .4); }

.ft-partners { margin-top: 26px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .06); max-width: 320px; }
.ft-partners-label {
  display: flex; align-items: center; gap: 10px;
  font-size: 11.5px; font-weight: 800; color: rgba(255, 117, 31, .8);
}
.ft-partners-label::after { content: ''; width: 34px; height: 1px; background: linear-gradient(to left, transparent, rgba(255, 117, 31, .6)); }
html[dir="ltr"] .ft-partners-label::after { background: linear-gradient(to right, transparent, rgba(255, 117, 31, .6)); }
.ft-partners-grid { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 14px; }
.ft-partner {
  display: grid; place-items: center; height: 48px; padding: 6px 12px; border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .08); background: rgba(255, 255, 255, .03);
  transition: border-color .25s, background-color .25s, transform .25s var(--ease-out);
}
.ft-partner img { height: 34px; width: auto; }
.ft-partner:hover { border-color: rgba(255, 117, 31, .5); background: rgba(255, 117, 31, .06); transform: translateY(-2px); }
.ft-partner:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }

.ft-col h4 { margin-bottom: 18px; font-size: 12.5px; font-weight: 700; color: var(--signal); }
.ft-col ul { display: grid; gap: 14px; }
.ft-col a { color: rgba(255, 255, 255, .5); transition: color .2s; }
.ft-col a:hover { color: var(--white); }

.ft-contact li { display: flex; align-items: flex-start; gap: 10px; line-height: 1.6; }
.ft-icon { flex: none; display: inline-grid; place-items: center; width: 20px; height: 20px; color: var(--signal); }
.ft-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

.ft-cta {
  display: grid; gap: 10px; margin-top: 22px; padding: 18px 20px; border-radius: 14px;
  border: 1px solid rgba(255, 117, 31, .22); background: rgba(255, 255, 255, .03);
  color: #f5f0e8 !important; font-size: 15px; font-weight: 700;
  transition: border-color .25s, background-color .25s;
}
.ft-cta:hover { border-color: rgba(255, 117, 31, .55); background: rgba(255, 117, 31, .06); }
.ft-cta-link { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--signal); }
.ft-cta-link .btn-arrow { width: 16px; height: 16px; }
.ft-cta:hover .btn-arrow { transform: translateX(-4px); }
html[dir="ltr"] .ft-cta:hover .btn-arrow { transform: scaleX(-1) translateX(-4px); }

.ft-divider { height: 1px; background: linear-gradient(90deg, transparent, rgba(255, 117, 31, .3) 20%, rgba(255, 117, 31, .18) 50%, rgba(255, 117, 31, .3) 80%, transparent); }
.ft-bottom { padding: 18px 0; }
.ft-bottom-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.ft-bottom-row p { font-size: 12.5px; color: rgba(255, 255, 255, .45); }
.ft-reg {
  display: flex; align-items: center; gap: 16px; padding: 8px 16px; border-radius: 14px;
  border: 1px solid rgba(255, 117, 31, .14); background: rgba(255, 255, 255, .03);
}
.ft-reg-item { display: flex; align-items: center; gap: 10px; }
.ft-reg-text { display: grid; line-height: 1.35; }
.ft-reg-label { font-size: 10.5px; color: rgba(255, 117, 31, .75); }
.ft-reg-value { font-family: var(--font-mono); font-size: 13px; font-weight: 500; color: #f5f0e8; }
.ft-reg-value.ft-active { font-family: var(--font-body); color: #4ade80; }
.ft-reg-divider { width: 1px; height: 26px; background: rgba(255, 255, 255, .1); }

/* ── Reveal on scroll ──────────────────────────────────── */
.js [data-reveal] {
  opacity: 0; transform: translateY(20px);
  transition: opacity .9s var(--ease-out) var(--d, 0ms), transform .9s var(--ease-out) var(--d, 0ms);
}
.js [data-reveal].is-visible { opacity: 1; transform: none; }

/* Headings glide in from the reading-start side (right in Arabic, left in
   English); "end" comes from the opposite side. */
.js [data-reveal="start"], .js [data-reveal="end"] {
  --side: 1;
  transform: translateX(calc(var(--side) * min(22vw, 280px)));
  transition:
    opacity 1s var(--ease-out) var(--d, 0ms),
    transform 1.1s var(--ease-out) var(--d, 0ms);
}
.js [data-reveal="end"] { --side: -1; }
html[dir="ltr"].js [data-reveal="start"] { --side: -1; }
html[dir="ltr"].js [data-reveal="end"] { --side: 1; }
.js [data-reveal="start"].is-visible, .js [data-reveal="end"].is-visible { transform: none; }

/* ── English (LTR) ─────────────────────────────────────── */
html[dir="ltr"] .btn-arrow { transform: scaleX(-1); }
html[dir="ltr"] .btn:hover .btn-arrow { transform: scaleX(-1) translateX(-4px); }
/* Mirror the hero map so the route stays on the side away from the text */
html[dir="ltr"] #heroMap { transform: scaleX(-1); }
html[dir="ltr"] .hero {
  background:
    radial-gradient(60% 70% at 78% 45%, rgba(255, 117, 31, .10), transparent 70%),
    var(--night);
}
html[lang="en"] body { line-height: 1.65; }
html[lang="en"] .hero h1, html[lang="en"] h2, html[lang="en"] h3 { letter-spacing: -.022em; }

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 1080px) {
  .nav-links a { padding: 8px 10px; font-size: 14.5px; }
  .ex-card { padding: 30px 26px 34px; }
}

@media (max-width: 960px) {
  .nav-links, .nav-cta { display: none; }
  .nav-inner { gap: 10px; }
  .lang-toggle { margin-inline-start: auto; height: 44px; border-radius: 12px; }
  .nav-toggle { display: block; margin-inline-start: 0; }
  .mobile-menu {
    display: block; overflow: hidden; max-height: 0;
    background: rgba(10, 10, 11, .96); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    transition: max-height .4s var(--ease-out);
  }
  .nav.is-open { background: rgba(10, 10, 11, .96); }
  .nav.is-open .mobile-menu { max-height: 420px; border-top: 1px solid rgba(255, 255, 255, .06); }
  .mobile-menu nav { display: flex; flex-direction: column; gap: 2px; padding: 12px 0 24px; }
  .mobile-menu a:not(.btn) { padding: 12px 4px; color: rgba(255, 255, 255, .8); font-size: 16.5px; border-bottom: 1px solid rgba(255, 255, 255, .06); }
  .mobile-menu .btn { margin-top: 16px; }
}

@media (max-width: 900px) {
  .section { padding: 88px 0; }
  /* phones: the hero fills the screen and the map runs behind it, as on desktop */
  .hero {
    flex-direction: column; align-items: stretch; justify-content: flex-start;
    min-height: 100vh; min-height: 100svh;
    padding: calc(var(--nav-h) + 44px) 0 32px;
  }
  .hero-inner { flex: none; }
  /* the grid runs behind the copy, quieter there, full strength around the route */
  .hero-map svg {
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,.3) 0%, rgba(0,0,0,.3) 38%, #000 62%);
            mask-image: linear-gradient(to bottom, rgba(0,0,0,.3) 0%, rgba(0,0,0,.3) 38%, #000 62%);
  }
  .telemetry { display: none; }
  .about, .contact, .section-head-split, .project { grid-template-columns: 1fr; }
  .about { gap: 32px; }
  .contact { gap: 48px; }
  .section-head-split { gap: 16px; }
  .ex-grid { grid-template-columns: 1fr; }
  .vm-sticky { padding: 88px 0; }
  .vm-layout { grid-template-columns: 1fr; grid-template-areas: "head" "map" "tabs" "steps"; }
  .vm-map { margin-top: 28px; max-width: 520px; }
  .vm-steps { margin-top: 28px; }
  .vm-live .vm-tabs { margin-top: 26px; max-width: none; }
  .layers { max-width: 460px; margin-inline: auto; width: 100%; }
  .project-media { padding: 40px 32px; }
  .project-body { padding: 36px 28px 40px; }
  .ft-grid { grid-template-columns: 1fr 1fr; gap: 40px 32px; padding: 64px 0 48px; }
  .ft-brand { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .wrap { width: min(100% - 36px, 1200px); }
  .hero h1 { margin-top: 18px; font-size: 31px; line-height: 1.4; }
  .hero-lead { margin-top: 22px; font-size: 16.5px; line-height: 1.95; }
  /* the two hero buttons share one row, with room around them */
  .hero-actions { flex-wrap: nowrap; gap: 12px; margin-top: clamp(36px, calc(16svh - 60px), 88px); }
  .hero-actions .btn { flex: 1 1 0; min-width: 0; height: 54px; padding: 0 12px; gap: 8px; font-size: 15px; }
  .hero-actions .btn-arrow { width: 16px; height: 16px; }
  html[lang="en"] .hero-actions .btn-arrow { display: none; } /* the longer English label needs the space */
  .lead { font-size: 17.5px; }
  .contact-form { padding: 24px 20px; }
  .form-grid { grid-template-columns: 1fr; }
  .btn-submit { width: 100%; }
  .ft-grid { grid-template-columns: 1fr; }
  .ft-bottom-row { flex-direction: column-reverse; text-align: center; }
  .ft-reg { flex-wrap: wrap; justify-content: center; }
}

@media (max-width: 400px) {
  .hero-actions .btn-arrow { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js [data-reveal], .js [data-reveal="start"], .js [data-reveal="end"] { opacity: 1; transform: none; filter: none; }
  .telemetry { opacity: 1; transform: none; }
}
