/* Base reset (the preview page had this added automatically) */
:root { color-scheme: light; }
body { margin: 0; }
img { max-width: 100%; }
[hidden] { display: none !important; }

/* Layout: sticky slim header; asymmetric hero (thesis left, Strait of Gibraltar schematic right);
   dark "band" for Vision to carry the integrated-chain diagram; light project and future sections. */
:root {
  --bg: #F2F5F7;
  --surface: #FFFFFF;
  --ink: #0C1A2A;
  --muted: #4A5A6A;
  --line: #D2DAE1;
  --azure: #0A5E8E;
  --azure-ink: #FFFFFF;
  --tint: #E2ECF3;
  --land: #D6E0E8;
  --sea: #EAF2F8;
  --band: #0A2540;
  --band-ink: #EAF0F5;
  --band-muted: #A9BACB;
  --band-line: #2A4361;
  --band-accent: #7CC2EC;
  --font-display: 'Instrument Serif', 'Times New Roman', serif;
  --font-body: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #07111C; --surface: #0E1C2B; --ink: #E8EEF3; --muted: #9DB0C1; --line: #1F3246;
    --azure: #6BB8E6; --azure-ink: #07111C; --tint: #12263A; --land: #12283C; --sea: #0A1B2B;
    --band: #0D2238; --band-line: #264059;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #07111C; --surface: #0E1C2B; --ink: #E8EEF3; --muted: #9DB0C1; --line: #1F3246;
  --azure: #6BB8E6; --azure-ink: #07111C; --tint: #12263A; --land: #12283C; --sea: #0A1B2B;
  --band: #0D2238; --band-line: #264059;
  color-scheme: dark;
}
:lang(ar) {
  --font-display: 'Amiri', 'Noto Naskh Arabic', serif;
  --font-body: 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
  --font-mono: 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
:lang(ar) body { line-height: 1.85; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--azure); outline-offset: 3px; }
.band :focus-visible { outline-color: var(--band-accent); }

.wrap { max-width: 1120px; margin-inline: auto; padding-inline: clamp(16px, 4vw, 32px); }
section { scroll-margin-top: calc(72px + env(safe-area-inset-top, 0px)); }

.label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--azure);
  margin: 0;
}
:lang(ar) .label { letter-spacing: 0; text-transform: none; font-size: 0.9rem; font-weight: 500; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 400; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 7.2vw, 5.4rem); line-height: 1.02; letter-spacing: -0.015em; }
h2 { font-size: clamp(2rem, 4.4vw, 3.3rem); line-height: 1.08; letter-spacing: -0.01em; }
h3 { font-size: clamp(1.5rem, 2.6vw, 2rem); line-height: 1.15; }
:lang(ar) h1, :lang(ar) h2, :lang(ar) h3 { letter-spacing: 0; line-height: 1.3; font-weight: 700; }
p { margin: 0; max-width: 64ch; }

/* Header */
.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: flex; flex-direction: column; text-decoration: none; line-height: 1; gap: 5px; direction: ltr; }
.brand b { font-family: var(--font-body); font-weight: 600; letter-spacing: 0.32em; font-size: 1.05rem; }
.brand span { font-family: 'IBM Plex Mono', monospace; font-size: 0.6rem; letter-spacing: 0.4em; color: var(--azure); }
.nav { display: flex; gap: 28px; font-size: 0.9rem; }
.nav a { text-decoration: none; color: var(--muted); padding-block: 6px; border-bottom: 1px solid transparent; }
.nav a:hover { color: var(--ink); border-bottom-color: var(--azure); }
.lang { display: flex; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.lang button {
  font: inherit; font-size: 0.8rem; background: transparent; color: var(--muted);
  border: 0; padding: 7px 12px; cursor: pointer; min-height: 36px;
}
.lang button + button { border-inline-start: 1px solid var(--line); }
.lang button[aria-pressed="true"] { background: var(--azure); color: var(--azure-ink); }
.lang button:hover:not([aria-pressed="true"]) { color: var(--ink); background: var(--tint); }
@media (max-width: 720px) { .nav { display: none; } }

/* Hero */
.hero { padding-block: clamp(40px, 8vw, 96px) clamp(32px, 5vw, 56px); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.hero-copy { display: flex; flex-direction: column; gap: 28px; align-items: flex-start; }
.hero-copy p { font-size: 1.15rem; color: var(--muted); }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  font-size: 0.95rem; font-weight: 500; padding: 13px 22px; border-radius: 4px;
  border: 1px solid var(--azure); min-height: 46px;
}
.btn.primary { background: var(--azure); color: var(--azure-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { color: var(--azure); }
.btn.ghost:hover { background: var(--tint); }
.btn .arr { transition: transform .2s; display: inline-block; }
.btn:hover .arr { transform: translateY(2px); }
@media (prefers-reduced-motion: reduce) { .btn .arr { transition: none; } }

.map { margin: 0; border: 1px solid var(--line); background: var(--surface); border-radius: 4px; overflow: hidden; }
.map svg { display: block; width: 100%; height: auto; }
.map text { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; fill: var(--muted); }
:lang(ar) .map text { letter-spacing: 0; font-size: 13px; }
.map .tg { fill: var(--ink); font-size: 13px; font-weight: 500; }
:lang(ar) .map .tg { font-size: 16px; font-weight: 600; }
.map figcaption {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 12px 16px; border-top: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); letter-spacing: 0.06em;
}
:lang(ar) .map figcaption { letter-spacing: 0; font-size: 0.85rem; }
.coords { direction: ltr; unicode-bidi: isolate; }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: minmax(0, 1fr); } }

/* Origin */
.origin { padding-block: clamp(56px, 9vw, 112px); border-top: 1px solid var(--line); }
.origin .wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 7vw, 96px); align-items: start; }
.origin .head { display: flex; flex-direction: column; gap: 20px; }
.origin .body { display: flex; flex-direction: column; gap: 24px; padding-top: 6px; }
.origin .body p:first-child { font-size: 1.2rem; }
.origin .body p { color: var(--muted); }
.origin .body p:first-child { color: var(--ink); }
@media (max-width: 860px) { .origin .wrap { grid-template-columns: minmax(0, 1fr); } }

/* Vision band */
.band { background: var(--band); color: var(--band-ink); padding-block: clamp(56px, 9vw, 112px); }
.band .label { color: var(--band-accent); }
.band .intro { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 7vw, 96px); align-items: end; }
.band .intro > div { display: flex; flex-direction: column; gap: 20px; }
.band .intro p { color: var(--band-muted); font-size: 1.1rem; }
@media (max-width: 860px) { .band .intro { grid-template-columns: minmax(0, 1fr); } }

.chain { margin-top: clamp(40px, 6vw, 72px); }
.chain-head {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  border: 1px solid var(--band-accent); border-radius: 4px 4px 0 0; padding: 14px 20px;
  font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--band-accent);
}
:lang(ar) .chain-head { letter-spacing: 0; text-transform: none; font-size: 0.9rem; }
.chain-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--band-line); border-top: 0; border-radius: 0 0 4px 4px; }
.link { padding: clamp(20px, 3vw, 32px); display: flex; flex-direction: column; gap: 10px; position: relative; }
.link + .link { border-inline-start: 1px solid var(--band-line); }
.link h3 { font-size: clamp(1.4rem, 2.4vw, 1.8rem); }
.link p { color: var(--band-muted); font-size: 0.98rem; }
.link .tick { font-family: var(--font-mono); font-size: 1.1rem; color: var(--band-accent); line-height: 1; }
.link .tick::after { content: '→'; }
:lang(ar) .link .tick::after, [dir="rtl"] .link .tick::after { content: '←'; }
.link:last-child .tick { visibility: hidden; }
@media (max-width: 720px) {
  .chain-grid { grid-template-columns: minmax(0, 1fr); }
  .link + .link { border-inline-start: 0; border-top: 1px solid var(--band-line); }
  .link .tick::after { content: '↓'; }
  [dir="rtl"] .link .tick::after { content: '↓'; }
}

.bridge { margin-top: clamp(56px, 8vw, 96px); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 7vw, 96px); align-items: center; }
.bridge .txt { display: flex; flex-direction: column; gap: 20px; }
.bridge .txt p { color: var(--band-muted); }
.nodes { display: grid; grid-template-columns: minmax(0, 1fr) 36px minmax(0, 1fr) 36px minmax(0, 1fr); align-items: stretch; }
.node {
  border: 1px solid var(--band-line); border-radius: 4px; padding: 16px 12px; text-align: center;
  display: flex; align-items: center; justify-content: center; min-height: 92px;
  font-size: 0.92rem; line-height: 1.35;
}
.node.core { background: var(--band-accent); border-color: var(--band-accent); color: #07111C; font-weight: 600; letter-spacing: 0.04em; }
.span { align-self: center; height: 1px; background: var(--band-accent); position: relative; }
.span::before, .span::after { content: ''; position: absolute; top: -3px; width: 7px; height: 7px; border-top: 1px solid var(--band-accent); }
.span::before { inset-inline-start: 0; border-inline-start: 1px solid var(--band-accent); transform: rotate(-45deg); }
[dir="rtl"] .span::before { transform: rotate(45deg); }
.span::after { inset-inline-end: 0; border-inline-end: 1px solid var(--band-accent); transform: rotate(45deg); }
[dir="rtl"] .span::after { transform: rotate(-45deg); }
@media (max-width: 860px) { .bridge { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 480px) {
  .nodes { grid-template-columns: minmax(0, 1fr); }
  .span { width: 1px; height: 24px; justify-self: center; }
  .span::before, .span::after { display: none; }
}

/* Project */
.project { padding-block: clamp(56px, 9vw, 112px); }
.project .head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 7vw, 96px); align-items: end; }
.project .head > div { display: flex; flex-direction: column; gap: 20px; }
.project .head p { color: var(--muted); font-size: 1.1rem; }
@media (max-width: 860px) { .project .head { grid-template-columns: minmax(0, 1fr); } }
.art { margin: clamp(32px, 5vw, 56px) 0 0; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; background: var(--tint); }
.art svg { display: block; width: 100%; height: auto; }
.art figcaption { padding: 12px 16px; border-top: 1px solid var(--line); background: var(--surface); font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.06em; color: var(--muted); }
:lang(ar) .art figcaption { letter-spacing: 0; font-size: 0.85rem; }
.program { margin-top: 32px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.program > div { border-top: 2px solid var(--azure); padding-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.program h3 { font-size: 1.6rem; }
.program p { color: var(--muted); font-size: 0.98rem; }
@media (max-width: 960px) { .program { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .program { grid-template-columns: minmax(0, 1fr); } }

/* Future */
.future { padding-block: clamp(56px, 9vw, 112px); border-top: 1px solid var(--line); background: var(--surface); }
.future .wrap { display: flex; flex-direction: column; gap: 24px; }
.future p.sub { color: var(--muted); font-size: 1.15rem; }
.path { margin-top: 32px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.step { position: relative; padding-top: 22px; border-top: 2px solid var(--azure); font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.06em; color: var(--ink); padding-inline-end: 12px; }
:lang(ar) .step { letter-spacing: 0; font-size: 0.95rem; }
.step::before { content: ''; position: absolute; top: -7px; inset-inline-start: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--azure); border: 2px solid var(--azure); }
.step.s2 { border-top-style: dashed; }
.step.s2::before { background: var(--surface); }
.step.s3 { border-top: 2px dotted var(--line); color: var(--muted); }
.step.s3::before { background: var(--surface); border-color: var(--line); }

/* Photos: each slot shows the image when the file exists, otherwise a labelled placeholder */
.photo-row { padding-bottom: clamp(48px, 8vw, 96px); }
.photo { margin: 0; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; background: var(--tint); }
.photo img { display: block; width: 100%; height: auto; aspect-ratio: var(--ratio, 21 / 9); object-fit: cover; }
.photo .slot { display: none; }
.photo.missing img { display: none; }
.photo.missing .slot {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  aspect-ratio: var(--ratio, 21 / 9); min-height: 150px; padding: 16px; text-align: center;
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.06em; color: var(--muted);
  background: repeating-linear-gradient(135deg, var(--tint) 0 12px, var(--surface) 12px 24px);
}
:lang(ar) .photo.missing .slot { letter-spacing: 0; font-size: 0.9rem; }
.photo .slot b { color: var(--ink); font-weight: 500; direction: ltr; unicode-bidi: isolate; }
.band .photo { border-color: var(--band-line); background: var(--band); margin-top: clamp(40px, 6vw, 72px); }
.band .photo.missing .slot { color: var(--band-muted); background: repeating-linear-gradient(135deg, var(--band) 0 12px, var(--band-line) 12px 24px); }
.band .photo .slot b { color: var(--band-ink); }
.future .photo { margin-top: 40px; }
.art img.render { display: block; width: 100%; height: auto; aspect-ratio: 2 / 1; object-fit: cover; }
.art:not(.has-photo) img.render { display: none; }
.art.has-photo svg { display: none; }
.art .cap-photo { display: none; }
.art.has-photo .cap-photo { display: block; }
.art.has-photo .cap-illus { display: none; }

/* Placeholder visuals fill the slot until the real image file exists */
.photo.missing .slot { display: block; position: relative; padding: 0; min-height: 0; background: none; font-size: inherit; letter-spacing: 0; color: inherit; }
.band .photo.missing .slot { background: none; }
.photo .slot svg { display: block; width: 100%; height: 100%; }
.photo .slot .chip {
  position: absolute; inset-block-end: 10px; inset-inline-start: 10px; max-width: calc(100% - 20px);
  display: flex; flex-wrap: wrap; gap: 4px 8px; padding: 5px 9px; border-radius: 3px;
  background: color-mix(in srgb, var(--surface) 90%, transparent); color: var(--muted);
  font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 0.68rem; letter-spacing: 0.04em;
}
:lang(ar) .photo .slot .chip { font-family: var(--font-body); letter-spacing: 0; font-size: 0.8rem; }
.photo .slot .chip b { color: var(--ink); font-weight: 500; }
.band .photo .slot .chip b { color: var(--ink); }

/* ---------- Motion and 3D ---------- */
.top { transition: box-shadow .3s ease; }
.top.scrolled { box-shadow: 0 8px 28px -14px rgba(0, 0, 0, 0.4); }
.nav a { transition: color .2s ease, border-color .2s ease; }
.btn { transition: background .2s ease, filter .2s ease, transform .25s ease; }
.btn:hover { transform: translateY(-2px); }
main, footer { transition: opacity .2s ease; }
.swap main, .swap footer { opacity: 0; }

@keyframes rise { from { opacity: .55; transform: translateY(26px); } }
@keyframes tiltIn { from { opacity: .55; transform: perspective(900px) rotateY(-24deg) rotateX(7deg) translateY(30px); } }
.hero-copy > * { animation: rise .9s cubic-bezier(.2, .7, .2, 1) backwards; }
.hero-copy > :nth-child(2) { animation-delay: .08s; }
.hero-copy > :nth-child(3) { animation-delay: .16s; }
.hero-copy > :nth-child(4) { animation-delay: .24s; }
.hero .map { animation: tiltIn 1.3s cubic-bezier(.2, .7, .2, 1) .2s backwards; }

[data-tilt] { transform: perspective(900px) rotateX(var(--tx, 0deg)) rotateY(var(--ty, 0deg)); transition: transform .35s ease; will-change: transform; }

.js-anim .rv { translate: 0 30px; opacity: .45; transition: translate .9s cubic-bezier(.2, .7, .2, 1), opacity .9s ease; transition-delay: var(--d, 0ms); }
.js-anim .rv.in { translate: 0 0; opacity: 1; }

.js-par .photo img, .js-par .photo .slot svg { transform: translate3d(0, var(--py, 0px), 0) scale(1.1); will-change: transform; }

.scene3d { margin: clamp(32px, 5vw, 56px) 0 0; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; background: var(--surface); }
.stage {
  position: relative; direction: ltr; display: flex; align-items: center; justify-content: center;
  perspective: 1800px; perspective-origin: 50% 35%; overflow: hidden; cursor: grab;
  touch-action: pan-y; user-select: none; -webkit-user-select: none;
  background: linear-gradient(180deg, var(--tint), var(--surface));
}
.stage:active { cursor: grabbing; }
.stage:focus-visible { outline-offset: -4px; }
.world {
  flex: none; position: relative; width: 700px; height: 470px; transform-style: preserve-3d; translate: 0 calc(28px * var(--s, 1));
  transform: scale(var(--s, 1)) rotateX(var(--rx, 58deg)) rotateZ(var(--rz, -38deg));
}
.world .plate { position: absolute; inset: 0; background: var(--land); border: 1px solid var(--line); }
.world .sea { position: absolute; left: 520px; top: 0; width: 180px; height: 470px; background: var(--sea); border-left: 2px solid var(--line); transform: translateZ(1px); }
.world .road { position: absolute; background: var(--line); opacity: .7; transform: translateZ(2px); }
.world .sh { position: absolute; left: 0; top: 0; background: rgba(0, 0, 0, .2); filter: blur(5px); transform-style: flat; }
.bx { position: absolute; left: 0; top: 0; transform-style: preserve-3d; transform: translate3d(var(--x), var(--y), var(--lift, 0px)); transition: transform .45s cubic-bezier(.2, .7, .2, 1); }
.bx .f { position: absolute; background-color: var(--c); }
.bx .t { background-color: color-mix(in srgb, var(--c) 78%, #fff); }
.bx .fr { filter: brightness(.9); }
.bx .lf { filter: brightness(.8); }
.bx .rt { filter: brightness(.7); }
.bx .bk { filter: brightness(.62); }
.bx.win .fr, .bx.win .bk, .bx.win .lf, .bx.win .rt {
  background-image: repeating-linear-gradient(0deg, transparent 0 12px, rgba(255, 255, 255, .22) 12px 14px),
                    repeating-linear-gradient(90deg, transparent 0 14px, rgba(255, 255, 255, .12) 14px 16px);
}
.bx.hl { --lift: 18px; }
.bx.hl .t { filter: brightness(1.12); }
.bx .tag { position: absolute; width: 0; height: 0; transform-style: preserve-3d; transform: translateZ(var(--th)) rotateZ(calc(var(--rz, -38deg) * -1)) rotateX(calc(var(--rx, 58deg) * -1)); pointer-events: none; }
.bx .tag span {
  position: absolute; left: 0; bottom: 6px; transform: translateX(-50%) scale(calc(1 / var(--s, 1))); transform-origin: 50% 100%;
  white-space: nowrap; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 3px;
  padding: 3px 9px; font-family: var(--font-body); font-size: 12px; font-weight: 500; line-height: 1.4;
}
.scene3d figcaption { padding: 12px 16px; border-top: 1px solid var(--line); background: var(--surface); font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.06em; color: var(--muted); }
:lang(ar) .scene3d figcaption { letter-spacing: 0; font-size: 0.85rem; }

@media (prefers-reduced-motion: reduce) {
  .hero-copy > *, .hero .map { animation: none; }
  .btn, .btn:hover, [data-tilt], .bx, main, footer, .top, .nav a { transition: none; transform: none; }
  [data-tilt] { transform: none; }
}

footer { padding-block: 32px calc(32px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); font-size: 0.85rem; color: var(--muted); }
footer .wrap { display: flex; justify-content: space-between; gap: 12px 32px; flex-wrap: wrap; }

/* MRiviera gallery */
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: clamp(16px, 2.5vw, 28px); }
.gallery figure { margin: 0; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; background: var(--tint); }
.gallery img { display: block; width: 100%; height: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.gallery .g1 { grid-column: 1 / -1; }
.gallery .g1 img { aspect-ratio: 21 / 9; }
@media (max-width: 700px) { .gallery { grid-template-columns: 1fr; } }
.gallery .g6 { grid-column: 1 / -1; }
.gallery .g6 img { aspect-ratio: 21 / 9; }

/* ---------- Refinement: image-led hero, compact and restrained imagery ---------- */
.hero {
  position: relative; display: flex; align-items: center; color: #fff;
  min-height: min(78vh, 720px);
  padding-block: clamp(56px, 9vw, 120px);
  background:
    linear-gradient(100deg, rgba(6, 20, 36, .90) 0%, rgba(6, 20, 36, .74) 46%, rgba(6, 20, 36, .38) 100%),
    url("https://res.cloudinary.com/fqldx0f4/image/upload/f_webp,q_auto:eco,w_1500,c_limit/site/tangier-sunset.jpg") center / cover no-repeat;
}
@media (max-width: 720px) {
  .hero {
    background:
      linear-gradient(180deg, rgba(6, 20, 36, .84), rgba(6, 20, 36, .72)),
      url("https://res.cloudinary.com/fqldx0f4/image/upload/f_webp,q_auto:eco,w_900,c_limit/site/tangier-sunset.jpg") center / cover no-repeat;
  }
}
.hero .wrap { width: 100%; }
.hero .label { color: #9FD3F2; }
.hero h1 { color: #fff; }
.hero-copy p { color: rgba(255, 255, 255, .86); }
.hero .btn.primary { background: #fff; color: #0A2540; border-color: #fff; }
.hero .btn.ghost { color: #fff; border-color: rgba(255, 255, 255, .55); }
.hero .btn.ghost:hover { background: rgba(255, 255, 255, .12); }
.hero .map {
  --sea: #EAF2F8; --land: #D6E0E8; --line: #D2DAE1; --ink: #0C1A2A; --muted: #4A5A6A; --surface: #FFFFFF;
  width: 100%; max-width: 440px; justify-self: end;
  background: rgba(255, 255, 255, .94); border-color: rgba(255, 255, 255, .5);
  box-shadow: 0 28px 60px -30px rgba(0, 0, 0, .65);
}
@media (max-width: 860px) { .hero .map { justify-self: start; max-width: 520px; } }

/* Origin: the gateway map sits under the text, at column width */
.origin-map { margin-top: 12px; border-radius: 6px; }

/* Vision: quiet photographic background behind the navy band */
.band {
  background:
    linear-gradient(rgba(10, 37, 64, .93), rgba(10, 37, 64, .90)),
    url("https://res.cloudinary.com/fqldx0f4/image/upload/f_webp,q_auto:eco,w_1600,c_limit/site/tangier-terrace.jpg") center / cover no-repeat;
}

/* MRiviera: calmer render, compact three-column gallery */
.art img.render { aspect-ratio: 21 / 9; }
.gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.gallery .g1, .gallery .g6 { grid-column: auto; }
.gallery img, .gallery .g1 img, .gallery .g6 img { aspect-ratio: 4 / 3; }
.gallery figure { border-radius: 6px; }
@media (max-width: 700px) { .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* No empty placeholders on the live site */
.photo.missing { display: none; }
.future .photo { display: none; }

/* Gallery with five tiles: first one spans two columns */
.gallery .g1 { grid-column: span 2; }
.gallery .g1 img { aspect-ratio: 8 / 3; }
@media (max-width: 700px) { .gallery .g1 img { aspect-ratio: 4 / 3; } }
.project .gallery { margin-top: clamp(32px, 5vw, 56px); }

/* Hero map: refined glass panel with a line drawing of the Strait */
.hero .map {
  max-width: 460px; padding: 0; overflow: hidden; border-radius: 10px;
  background: rgba(8, 26, 46, .42);
  -webkit-backdrop-filter: blur(16px) saturate(1.2); backdrop-filter: blur(16px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, .20);
  box-shadow: 0 30px 70px -34px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .12);
}
.hero .map svg { display: block; width: 100%; height: auto; }
.hero .map .grat line { stroke: rgba(255, 255, 255, .07); stroke-width: 1; }
.hero .map .land { fill: rgba(255, 255, 255, .07); stroke: rgba(255, 255, 255, .34); stroke-width: 1; }
.hero .map .route { fill: none; stroke: rgba(255, 255, 255, .6); stroke-width: 1.2; stroke-dasharray: 3 6; stroke-linecap: round; }
.hero .map .from { fill: rgba(255, 255, 255, .85); }
.hero .map .dot { fill: #9FD3F2; }
.hero .map .ring { fill: none; stroke: #9FD3F2; stroke-width: 1.2; transform-box: fill-box; transform-origin: center; animation: pulse 2.8s ease-out infinite; }
@keyframes pulse { 0% { transform: scale(.7); opacity: .9; } 80%, 100% { transform: scale(2.6); opacity: 0; } }
.hero .map text { fill: rgba(255, 255, 255, .62); font-size: 10.5px; letter-spacing: .22em; }
.hero .map .tg { fill: #fff; font-size: 13px; font-weight: 500; letter-spacing: .24em; }
.hero .map figcaption {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 18px;
  border-top: 1px solid rgba(255, 255, 255, .14); color: rgba(255, 255, 255, .78);
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .08em;
}
@media (prefers-reduced-motion: reduce) { .hero .map .ring { animation: none; opacity: .5; } }

/* MRiviera: link to the project's own website */
.project-more {
  margin-top: clamp(40px, 6vw, 72px); padding-top: 28px; border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 20px 32px; flex-wrap: wrap;
}
.project-more p { color: var(--muted); max-width: 52ch; }
.project-more .btn { flex: none; }
.btn .ext { transition: transform .2s; }
.btn:hover .ext { transform: translate(2px, -2px); }
:lang(ar) .hero .map text, :lang(ar) .hero .map .tg, :lang(ar) .hero .map figcaption { letter-spacing: 0; }

/* ---------- Header with logo slot ---------- */
.top { background: #0A2540; border-bottom: 0; backdrop-filter: none; -webkit-backdrop-filter: none; }
.top .wrap { min-height: 72px; }
.brand { display: block; line-height: 0; }
.logo-box {
  display: block; width: clamp(132px, 16vw, 176px); height: 48px; border-radius: 6px;
  background: #fff; box-shadow: 0 1px 0 rgba(255, 255, 255, .25);
  overflow: hidden;
}
.logo-box img { display: block; width: 100%; height: 100%; object-fit: contain; padding: 6px 10px; }
.top .nav a { color: rgba(255, 255, 255, .78); }
.top .nav a:hover { color: #fff; border-bottom-color: #9FD3F2; }
.top .lang { border-color: rgba(255, 255, 255, .28); }
.top .lang button { color: rgba(255, 255, 255, .8); }
.top .lang button + button { border-inline-start-color: rgba(255, 255, 255, .22); }
.top .lang button:hover:not([aria-pressed="true"]) { background: rgba(255, 255, 255, .1); color: #fff; }
.top .lang button[aria-pressed="true"] { background: #fff; color: #0A2540; }
.top.scrolled { box-shadow: 0 8px 24px -14px rgba(0, 0, 0, .6); }

/* ---------- Tighter vertical rhythm ---------- */
.hero { min-height: min(60vh, 520px); padding-block: clamp(36px, 5vw, 64px); }
.origin, .project, .future, .band { padding-block: clamp(32px, 4.5vw, 56px); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
.origin .wrap, .origin .head, .origin .body, .band .intro, .band .intro > div, .project .head, .project .head > div { gap: clamp(14px, 2.4vw, 28px); }
.origin .head, .band .intro > div, .project .head > div { gap: 14px; }
.chain { margin-top: clamp(24px, 3vw, 36px); }
.bridge { margin-top: clamp(28px, 4vw, 48px); }
.project .gallery { margin-top: clamp(20px, 3vw, 32px); }
.program { margin-top: 28px; }
.project-more { margin-top: clamp(24px, 3vw, 40px); padding-top: 22px; }
.future .wrap { gap: 14px; }
.path { margin-top: 20px; }
footer { padding-block: 22px; }

/* ---------- Use the full width of laptop and desktop screens ---------- */
.wrap { max-width: 1700px; padding-inline: clamp(20px, 4.2vw, 80px); }
@media (min-width: 1500px) { html { font-size: 112.5%; } }
@media (min-width: 1900px) { html { font-size: 125%; } }
.hero .map { max-width: clamp(460px, 34vw, 640px); }
.origin-map { margin-top: 8px; }
.origin .head { align-self: stretch; }

/* Header: company name as a wordmark (no logo box) */
.brand { display: flex; flex-direction: column; gap: 5px; line-height: 1; }
.brand b { color: #fff; font-size: 1.2rem; letter-spacing: .32em; }
.brand span { color: #9FD3F2; font-size: .62rem; letter-spacing: .42em; }

/* Origin: map on the left, title and text on the right */
.origin .wrap { grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); align-items: center; gap: clamp(28px, 5vw, 80px); }
.origin-copy { display: flex; flex-direction: column; gap: clamp(16px, 2vw, 26px); }
.origin-copy .head, .origin-copy .body { display: flex; flex-direction: column; gap: 14px; padding-top: 0; }
.origin-map { margin: 0; }
.js-par .origin-map img { transform: none; will-change: auto; }
@media (max-width: 860px) {
  .origin .wrap { grid-template-columns: minmax(0, 1fr); }
  .origin-copy { order: -1; }
}

/* ---------- Future: navy band ---------- */
.future { background: var(--band); color: var(--band-ink); border-top: 0; }
.future .label { color: var(--band-accent); }
.future p.sub { color: var(--band-muted); }
.step { color: var(--band-ink); border-top-color: var(--band-accent); }
.step::before { background: var(--band-accent); border-color: var(--band-accent); }
.step.s2::before { background: var(--band); }
.step.s3 { border-top-color: var(--band-line); color: var(--band-muted); }
.step.s3::before { background: var(--band); border-color: var(--band-line); }

/* ---------- Contact ---------- */
.contact { padding-block: clamp(32px, 4.5vw, 56px); background: var(--surface); }
.contact .wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(24px, 5vw, 80px); align-items: center; }
.contact-head { display: flex; flex-direction: column; gap: 14px; }
.contact-head p:last-child { color: var(--muted); font-size: 1.05rem; }
.contact-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.contact-card {
  display: flex; align-items: center; gap: 16px; text-decoration: none; color: var(--ink);
  padding: 20px 22px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.contact-card:not([aria-disabled="true"]):hover { border-color: var(--azure); box-shadow: 0 14px 30px -20px rgba(10, 37, 64, .5); transform: translateY(-2px); }
.contact-card .ic { flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: #0A2540; color: #fff; }
.contact-card .txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.contact-card .k { font-family: var(--font-mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .14em; color: var(--azure); }
:lang(ar) .contact-card .k { letter-spacing: 0; text-transform: none; font-size: .9rem; }
.contact-card .v { font-size: 1.05rem; font-weight: 500; overflow-wrap: anywhere; unicode-bidi: isolate; }
.contact-card .go { flex: none; color: var(--muted); font-size: 1.1rem; }
.contact-card[aria-disabled="true"] { cursor: default; }
.contact-card[aria-disabled="true"] .v { color: var(--muted); font-weight: 400; }
.contact-card[aria-disabled="true"] .go { visibility: hidden; }
@media (max-width: 860px) { .contact .wrap { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .contact-cards { grid-template-columns: minmax(0, 1fr); } }
.project-more { justify-content: flex-start; }

/* Header logo: transparent artwork that sits directly on the navy bar */
.brand { display: block; line-height: 0; }
.brand img { display: block; height: clamp(46px, 5vw, 58px); width: auto; }
