/* Old Ibra Villages — palette and type taken from the proposal deck */
:root {
  --earth: #4e403a;
  --earth-deep: #3f332e;
  --earth-line: rgba(227, 216, 200, .22);
  --sand: #bba995;
  --sand-soft: #cfc1ad;
  --on-dark: #ece3d6;
  --on-dark-muted: #cdbfab;
  --cream: #f5f0e7;
  --cream-2: #ebe3d6;
  --ink: #2f2622;
  --ink-muted: #63544a;
  --clay: #8e7d6b;
  --palm: #4f7d3f;
  --radius: 18px;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --font: "IBM Plex Sans", "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-ar: "IBM Plex Sans Arabic", "IBM Plex Sans", "Geeza Pro", "Segoe UI", Tahoma, sans-serif;
  --motif: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cpath d='M14 4h12l-6 9zM14 36h12l-6-9zM4 14v12l9-6zM36 14v12l-9-6z' fill='%23bba995'/%3E%3C/svg%3E");
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--font);
  font-size: clamp(17px, 1.05vw + 12px, 19px);
  line-height: 1.7;
  color: var(--ink);
  background: var(--earth);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
html[lang="ar"] body { font-family: var(--font-ar); line-height: 1.85; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 400; line-height: 1.15; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
[role="list"] { list-style: none; }
strong { font-weight: 600; }

/* Language switching: hide the inactive language everywhere */
html[lang="en"] .ar, html[lang="ar"] .en { display: none !important; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: fixed; inset-inline-start: 12px; top: -60px; z-index: 100;
  background: var(--cream); color: var(--ink); padding: 10px 16px; border-radius: 10px;
  font-weight: 600; text-decoration: none; transition: top .2s;
}
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid #f0c987; outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- Loading screen (every page load) ---------- */
.loader { display: none; }
.is-loading body { overflow: hidden; }
.is-loading .loader, .loader.leaving {
  display: grid; place-items: center; position: fixed; inset: 0; z-index: 200;
  background: var(--earth); color: var(--on-dark);
}
.loader.leaving { transition: background-color .8s ease .25s; pointer-events: none; }
.loader.leaving.fade { background-color: transparent; }
.loader.leaving.done { opacity: 0; transition: opacity .2s ease; }
.loader-inner { display: grid; justify-items: center; gap: 18px; padding: 24px; text-align: center; }
.loader-house { width: min(46vw, 210px); clip-path: inset(100% 0 0 0); animation: build 1.5s cubic-bezier(.3,0,.2,1) .15s forwards; }
.loader-house img { width: 100%; height: auto; }
.loader-ground {
  display: block; width: min(70vw, 340px); height: 2px; margin-top: -18px; border-radius: 2px;
  background: var(--sand); transform: scaleX(0); animation: grow .9s ease-out forwards;
}
.loader-name { display: grid; gap: 2px; opacity: 0; animation: rise .8s ease-out .6s forwards; }
.loader-ar { font-family: var(--font-ar); font-size: clamp(24px, 3vw, 30px); color: var(--sand); line-height: 1.4; }
.loader-en { font-size: 13px; letter-spacing: .3em; text-transform: uppercase; color: var(--on-dark-muted); }
.loader-bar { display: block; width: 140px; height: 2px; border-radius: 2px; background: var(--earth-line); overflow: hidden; }
.loader-bar i { display: block; height: 100%; background: var(--sand); transform: scaleX(0); transform-origin: left; animation: grow 1.6s ease-in-out .2s forwards; }
@keyframes build { to { clip-path: inset(0 0 0 0); } }
@keyframes grow { to { transform: scaleX(1); } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background-color .3s, box-shadow .3s;
}
.site-header.scrolled { background: rgba(63, 51, 46, .94); box-shadow: 0 1px 0 var(--earth-line); }
@supports (backdrop-filter: blur(8px)) {
  .site-header.scrolled { background: rgba(63, 51, 46, .82); backdrop-filter: blur(12px); }
}
.bar {
  max-width: 1320px; margin-inline: auto; padding: 14px var(--gutter);
  display: flex; align-items: center; gap: 24px; min-height: 72px;
}
.brand { display: flex; align-items: center; text-decoration: none; color: var(--on-dark); font-weight: 500; letter-spacing: .02em; }
.nav { margin-inline-start: auto; }
.nav ul { display: flex; gap: 4px; list-style: none; }
.nav a {
  display: block; padding: 8px 12px; border-radius: 999px; color: var(--on-dark-muted);
  text-decoration: none; font-size: 15px; transition: color .2s, background-color .2s;
}
.nav a:hover, .nav a[aria-current="true"] { color: var(--on-dark); background: rgba(236, 227, 214, .1); }
.bar-actions { display: flex; align-items: center; gap: 8px; }
.lang-toggle {
  font: inherit; font-size: 15px; font-weight: 500; cursor: pointer;
  color: var(--earth); background: var(--sand); border: 0; border-radius: 999px;
  padding: 7px 16px; min-height: 40px; transition: background-color .2s;
}
.lang-toggle .en { font-family: var(--font-ar); }
.lang-toggle .ar { font-family: "IBM Plex Sans", system-ui, sans-serif; }
.lang-toggle:hover { background: var(--sand-soft); }
.menu-toggle {
  display: none; width: 44px; height: 44px; border-radius: 12px; cursor: pointer;
  background: transparent; border: 1px solid var(--earth-line); color: var(--on-dark);
  align-items: center; justify-content: center;
}
.menu-icon, .menu-icon::before, .menu-icon::after {
  display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px;
  position: relative; transition: transform .25s, opacity .2s;
}
.menu-icon::before, .menu-icon::after { content: ""; position: absolute; inset-inline-start: 0; }
.menu-icon::before { top: -6px; }
.menu-icon::after { top: 6px; }
.menu-toggle[aria-expanded="true"] .menu-icon { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-icon::before { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-icon::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 900px) {
  .menu-toggle { display: inline-flex; }
  .nav {
    position: absolute; inset: 100% 0 auto 0; margin: 0;
    background: var(--earth-deep); border-top: 1px solid var(--earth-line);
    box-shadow: 0 20px 40px rgba(0,0,0,.25);
    display: none;
  }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; padding: 8px var(--gutter) 18px; gap: 0; }
  .nav a { font-size: 18px; padding: 14px 4px; border-radius: 0; border-bottom: 1px solid var(--earth-line); }
  .nav a:hover { background: transparent; }
  .bar-actions { margin-inline-start: auto; }
}

/* ---------- Motif band (from the deck) ---------- */
.motif-band {
  height: 30px; margin-inline: var(--gutter);
  background-image: var(--motif); background-size: 30px 30px; background-repeat: repeat-x;
  background-position: center; opacity: .9;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 50px;
  padding: 12px 24px; border-radius: 999px; font: inherit; font-size: 16px; font-weight: 500;
  text-decoration: none; cursor: pointer; transition: background-color .2s, color .2s, transform .2s;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-solid { background: var(--sand); color: var(--earth); border: 1px solid var(--sand); }
.btn-solid:hover { background: var(--sand-soft); }
.btn-line { background: transparent; color: var(--on-dark); border: 1px solid rgba(236,227,214,.45); }
.btn-line:hover { background: rgba(236,227,214,.1); }
.btn:active { transform: translateY(1px); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: space-between;
  padding-top: 78px; background: var(--earth); color: var(--on-dark); overflow: hidden;
}
.hero-inner {
  flex: 1; display: grid; grid-template-columns: 1.1fr .9fr; align-items: end; gap: 24px;
  position: relative; z-index: 2; padding-top: clamp(24px, 6vh, 80px);
}
.hero-copy { padding-bottom: clamp(140px, 22vh, 230px); }
.eyebrow { color: var(--on-dark-muted); font-size: 15px; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 18px; }
html[lang="ar"] .eyebrow { text-transform: none; letter-spacing: 0; font-size: 17px; }
.hero-title { color: var(--sand); font-weight: 300; }
.hero-title > span { display: flex; flex-direction: column; }
.t-big { font-size: clamp(56px, 9vw, 128px); line-height: .95; letter-spacing: -.01em; }
.t-small { font-size: clamp(18px, 1.6vw, 24px); letter-spacing: .12em; margin-top: 14px; color: var(--on-dark-muted); }
html[lang="ar"] .t-small { letter-spacing: 0; margin: 0 0 6px; font-size: clamp(22px, 2vw, 30px); }
html[lang="ar"] .t-big { line-height: 1.2; font-weight: 400; }
.hero-lede { max-width: 34em; margin-top: 26px; color: var(--on-dark); font-size: clamp(17px, 1.2vw + 10px, 21px); font-weight: 300; }
.hero-house { margin: 0; align-self: end; justify-self: end; width: min(100%, 520px); margin-bottom: clamp(36px, 7vh, 66px); }
.hero-house img { width: 100%; height: auto; transform: scale(calc(1 + var(--hp, 0) * .1)); transform-origin: center bottom; }
.hero-copy { opacity: calc(1 - var(--hp, 0) * .9); transform: translateY(calc(var(--hp, 0) * -50px)); }
html[dir="rtl"] .hero-house { justify-self: start; }
.hero-ground {
  position: absolute; inset: auto 0 0 0; height: clamp(110px, 17vh, 170px);
  background: var(--sand); z-index: 1;
}
.hero-ground::before {
  content: ""; position: absolute; inset-inline-end: 4%; bottom: 100%; width: 52%; height: 70px;
  background: var(--sand); clip-path: polygon(0 100%, 30% 55%, 62% 40%, 100% 70%, 100% 100%);
  opacity: .9;
}
html[dir="rtl"] .hero-ground::before { transform: scaleX(-1); }
.hero-award {
  position: relative; z-index: 3; color: var(--earth); font-size: 15px; font-weight: 500;
  padding-bottom: 22px; max-width: var(--wrap);
}

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; align-items: start; }
  .hero-copy { padding-bottom: 0; }
  .hero-house { justify-self: center !important; width: min(78%, 360px); margin: 28px auto 22px; }
  .hero-ground { height: 150px; }
  .hero-ground::before { width: 80%; inset-inline-end: 10%; }
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(72px, 11vw, 140px); position: relative; }
.section > .motif-band { margin-top: calc(clamp(72px, 11vw, 140px) * -0.55); margin-bottom: clamp(40px, 6vw, 70px); }
.light { background: var(--cream); color: var(--ink); }
.dark { background: var(--earth); color: var(--on-dark); }
.sand { background: var(--sand); color: var(--earth-deep); }
.kicker {
  font-size: 14px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--clay); margin-bottom: 16px;
}
html[lang="ar"] .kicker { letter-spacing: 0; font-size: 17px; text-transform: none; }
.dark .kicker { color: var(--sand); }
.sand .kicker { color: var(--earth); }
.h1 { font-size: clamp(38px, 5.2vw, 72px); font-weight: 300; letter-spacing: -.01em; }
.h2 { font-size: clamp(30px, 3.6vw, 48px); font-weight: 300; }
.h3 { font-size: clamp(22px, 2vw, 28px); font-weight: 400; }
html[lang="ar"] .h1, html[lang="ar"] .h2 { font-weight: 400; line-height: 1.3; letter-spacing: 0; }
.dark .h1, .dark .h2 { color: var(--sand); }
.light .h1, .light .h2 { color: var(--earth); }
.prose { display: grid; gap: 1.1em; max-width: 38em; }
.prose-wide { max-width: 52em; margin-bottom: clamp(36px, 5vw, 56px); }
.dark .prose { color: var(--on-dark); }
.light .prose { color: var(--ink); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.section-head { margin-bottom: clamp(40px, 6vw, 72px); }

/* Overview stats */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  margin-top: clamp(56px, 8vw, 100px);
}
.stat {
  border: 1px solid #d6cab9; border-radius: var(--radius); padding: 26px 22px 24px;
  background: #fbf8f3; display: flex; flex-direction: column; gap: 10px;
}
.stat-num { font-size: clamp(44px, 5vw, 64px); font-weight: 300; line-height: 1; color: var(--earth); font-variant-numeric: tabular-nums; }
.stat-label { color: var(--ink-muted); font-size: 16px; line-height: 1.45; }
@media (max-width: 860px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- The Great House (story) ---------- */
.house-intro { margin-bottom: clamp(16px, 3vw, 40px); }
.house-intro .h1 { margin-bottom: 22px; }
.house-lede { max-width: 34em; color: var(--on-dark); font-size: clamp(18px, 1.3vw + 10px, 22px); font-weight: 300; }

/* Shared scrollytelling layout: a sticky picture beside steps that scroll past it */
.story { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 5vw, 80px); position: relative; }
.story-stage {
  position: sticky; top: calc(72px + 5vh); height: calc(100vh - 72px - 10vh); min-height: 380px;
  align-self: start; display: flex; flex-direction: column; gap: 14px;
}
.phases .story-stage { top: calc(124px + 4vh); height: calc(100vh - 124px - 8vh); }
.story-steps { padding-block: 22vh 30vh; }
.story-step { min-height: 72vh; display: flex; flex-direction: column; justify-content: center; gap: 12px; transition: opacity .5s ease; }
.js .story-step { opacity: .28; }
.js .story-step.is-active { opacity: 1; }
.story-step:first-child { min-height: 50vh; }
.step-when { color: var(--sand); font-weight: 600; font-size: 14px; letter-spacing: .12em; text-transform: uppercase; }
html[lang="ar"] .step-when { letter-spacing: 0; font-size: 17px; text-transform: none; }
.story-step h3 { font-size: clamp(26px, 2.6vw, 38px); font-weight: 300; color: var(--on-dark); line-height: 1.25; }
html[lang="ar"] .story-step h3 { font-weight: 400; line-height: 1.45; }
.story-step p:not(.step-when) { color: var(--on-dark-muted); max-width: 30em; }

/* House stage */
.stage-frame {
  position: relative; flex: 1; min-height: 0; overflow: hidden;
  border-radius: var(--radius); background: var(--earth-deep); border: 1px solid var(--earth-line);
}
.stage-layer { position: absolute; inset: 0; display: grid; place-items: center; transition: opacity .8s ease; }
.illus-box {
  position: relative; height: 82%; aspect-ratio: 312 / 338; max-width: 92%;
  transition: transform 1.2s cubic-bezier(.65,0,.25,1);
}
.illus-box img { width: 100%; height: 100%; object-fit: contain; }
.layer-photo { opacity: 0; background: var(--sand-soft); }
.layer-photo img {
  width: 100%; height: 100%; object-fit: cover; mix-blend-mode: multiply;
  object-position: var(--focus, 50% 50%); transform-origin: var(--focus, 50% 50%); transform: scale(var(--zoom, 1));
  transition: transform 1.3s cubic-bezier(.65,0,.25,1), object-position 1.3s cubic-bezier(.65,0,.25,1);
}
.stage-lights i {
  position: absolute; width: 13%; aspect-ratio: 1; border-radius: 50%; translate: -50% -50%;
  background: radial-gradient(circle, rgba(255,214,140,.95) 0, rgba(243,181,90,.55) 35%, rgba(243,181,90,0) 70%);
  mix-blend-mode: screen; opacity: 0; transition: opacity 1s ease;
}
.stage-lights i:nth-child(1) { left: 19%; top: 50%; }
.stage-lights i:nth-child(2) { left: 30%; top: 50%; }
.stage-lights i:nth-child(3) { left: 41.5%; top: 50%; }
.stage-lights i:nth-child(4) { left: 8%; top: 76%; }
.stage-lights i:nth-child(5) { left: 29%; top: 77%; }
.stage-lights i:nth-child(6) { left: 41%; top: 78%; }
.stage-ring {
  position: absolute; left: var(--rx, 50%); top: var(--ry, 50%); width: 26%; aspect-ratio: 1; translate: -50% -50%;
  border: 2px solid rgba(245,240,231,.85); border-radius: 50%; opacity: 0; transition: opacity .6s ease;
  pointer-events: none;
}
.stage-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.stage-caption { display: grid; color: var(--on-dark); font-size: 15px; font-weight: 500; }
.stage-caption > span { grid-area: 1 / 1; opacity: 0; transition: opacity .5s ease; }
.stage-dots { display: flex; gap: 8px; flex: none; }
.stage-dots li { width: 8px; height: 8px; border-radius: 50%; background: var(--earth-line); transition: background-color .4s, transform .4s; }

/* House stage states, driven by data-active on .story */
[data-story="house"][data-active="0"] [data-cap="0"],
[data-story="house"][data-active="1"] [data-cap="1"],
[data-story="house"][data-active="2"] [data-cap="2"],
[data-story="house"][data-active="3"] [data-cap="3"],
[data-story="house"][data-active="4"] [data-cap="4"] { opacity: 1; }
[data-active="0"] .stage-dots li:nth-child(-n+1),
[data-active="1"] .stage-dots li:nth-child(-n+2),
[data-active="2"] .stage-dots li:nth-child(-n+3),
[data-active="3"] .stage-dots li:nth-child(-n+4),
[data-active="4"] .stage-dots li:nth-child(-n+5) { background: var(--sand); }
[data-story="house"][data-active="1"] .layer-photo,
[data-story="house"][data-active="2"] .layer-photo { opacity: 1; }
/* move the point of interest to the centre, then enlarge */
/* the photo stays cropped to fill the frame; --focus is the point the zoom grows from */
[data-story="house"][data-active="1"] .layer-photo img { --focus: 17% 86%; --zoom: 1.9; }
[data-story="house"][data-active="2"] .layer-photo img { --focus: 50% 57%; --zoom: 1.45; }
[data-story="house"][data-active="1"] .stage-ring { --rx: 17%; --ry: 84%; }
[data-story="house"][data-active="3"] .illus-box { transform: scale(1.9) translate(19%, 1%); }
[data-story="house"][data-active="1"] .stage-ring,
[data-story="house"][data-active="3"] .stage-ring { opacity: 1; }
[data-story="house"][data-active="4"] .stage-lights i { opacity: 1; }
[data-story="house"][data-active="4"] .stage-frame { background: #2c2420; }

@media (max-width: 900px) {
  .story { grid-template-columns: 1fr; gap: 0; }
  .story-stage, .phases .story-stage {
    top: 80px; height: 44vh; height: 44svh; min-height: 260px; z-index: 2;
    background: var(--earth); padding-bottom: 12px;
  }
  .phases .story-stage { top: 132px; height: 40vh; height: 40svh; }
  .story-steps { padding-block: 6vh 20vh; }
  .story-step, .story-step:first-child { min-height: 58vh; min-height: 58svh; justify-content: center; }
  .stage-caption { font-size: 14px; }
}

/* ---------- Village landmarks pop-up (opened from the route stops) ---------- */
.village-dialog {
  width: min(560px, calc(100vw - 32px)); max-height: min(86vh, 760px); padding: 0; border: 0;
  border-radius: calc(var(--radius) + 4px); background: var(--cream); color: var(--ink);
  box-shadow: 0 30px 80px rgba(20, 14, 11, .45); overflow: auto; overscroll-behavior: contain;
}
.village-dialog::backdrop { background: rgba(31, 24, 20, .62); }
.village-dialog[open] { animation: pop .38s cubic-bezier(.2,.9,.3,1.2); }
.village-dialog[open]::backdrop { animation: fade .3s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.92); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } }
.vd-inner { padding: 22px 24px 24px; }
.vd-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.vd-kicker { font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--clay); }
html[lang="ar"] .vd-kicker { letter-spacing: 0; font-size: 15px; text-transform: none; }
.vd-close {
  width: 44px; height: 44px; flex: none; border-radius: 50%; border: 1px solid #d6cab9; background: #fbf8f3;
  color: var(--earth); font-size: 26px; line-height: 1; cursor: pointer; transition: background-color .2s;
}
.vd-close:hover { background: var(--cream-2); }
.vd-tabs { display: flex; gap: 6px; margin: 16px 0 6px; padding: 4px; border-radius: 999px; background: var(--cream-2); }
.vd-tabs button {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px;
  border: 0; border-radius: 999px; background: transparent; color: var(--ink-muted);
  font: inherit; font-size: 15px; font-weight: 500; cursor: pointer; transition: background-color .25s, color .25s;
}
.vd-tabs b {
  display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  border: 1px solid currentColor; font-size: 13px; font-weight: 500;
}
.vd-tabs button[aria-selected="true"] { background: var(--earth); color: var(--cream); }
.vd-panel { padding-top: 14px; }
.js .vd-panel:not(.is-shown) { display: none; }
.vd-panel h3 { display: flex; align-items: center; gap: 12px; font-size: clamp(26px, 4vw, 32px); font-weight: 300; color: var(--earth); margin-bottom: 8px; }
html[lang="ar"] .vd-panel h3 { font-weight: 400; }
.vd-no {
  display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%;
  background: var(--earth); color: var(--sand); font-size: 18px; font-weight: 400;
}
.village-list { list-style: none; counter-reset: lm; display: grid; }
.village-list li {
  counter-increment: lm; display: grid; grid-template-columns: 28px 1fr; gap: 8px;
  padding-block: 10px; border-bottom: 1px dashed #e0d5c5; font-size: 16px; line-height: 1.5; color: var(--ink);
}
.village-list li:last-child { border-bottom: 0; }
.village-list li::before { content: counter(lm); color: var(--clay); font-weight: 600; font-variant-numeric: tabular-nums; }
html[lang="ar"] .village-list li::before { content: counter(lm, arabic-indic); }
.vd-panel.is-shown .village-list li { animation: item-in .4s ease both; animation-delay: calc(.08s + var(--i) * .05s); }
@keyframes item-in { from { opacity: 0; transform: translateY(8px); } }
.vd-note { margin-top: 14px; padding-top: 14px; border-top: 1px solid #e0d5c5; font-size: 15px; color: var(--ink-muted); }
@media (max-width: 640px) {
  .village-dialog { width: 100vw; max-width: none; margin: auto 0 0; max-height: 88vh; border-radius: 22px 22px 0 0; }
  .village-dialog[open] { animation-name: sheet; }
  @keyframes sheet { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
  .vd-tabs button { font-size: 14px; gap: 6px; }
}

/* ---------- Vision ---------- */
.vision { overflow: hidden; }
.vision::after {
  content: ""; position: absolute; inset-block: 0; inset-inline-end: -4%; width: 44%;
  background: url("assets/bait-al-oud.svg") no-repeat center / contain; opacity: .14;
  pointer-events: none;
}
.vision-inner { position: relative; z-index: 1; }
.quote { font-size: clamp(28px, 3.6vw, 50px); font-weight: 300; line-height: 1.25; max-width: 22em; color: var(--earth-deep); }
html[lang="ar"] .quote { font-weight: 400; line-height: 1.5; }
.vision-note { margin-top: 30px; max-width: 36em; color: var(--earth-deep); }

/* ---------- Phases ---------- */
.phase-rail {
  position: sticky; top: 72px; z-index: 30; background: var(--earth-deep);
  border-block: 1px solid var(--earth-line);
}
.phase-rail ol { display: flex; gap: 6px; overflow-x: auto; padding-block: 10px; scrollbar-width: none; }
.phase-rail ol::-webkit-scrollbar { display: none; }
.phase-rail a {
  display: flex; align-items: center; gap: 10px; white-space: nowrap; text-decoration: none;
  color: var(--on-dark-muted); font-size: 15px; padding: 6px 14px 6px 6px; border-radius: 999px;
  transition: background-color .2s, color .2s;
}
html[dir="rtl"] .phase-rail a { padding: 6px 6px 6px 14px; }
.phase-rail b {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--sand); color: var(--sand); font-weight: 500; font-size: 14px;
}
.phase-rail a:hover, .phase-rail a[aria-current="true"] { background: rgba(236,227,214,.1); color: var(--on-dark); }
.phase-rail a[aria-current="true"] b { background: var(--sand); color: var(--earth); }

.phase { scroll-margin-top: 56px; }
.phase-head { margin-bottom: clamp(32px, 5vw, 56px); }
.phase-tag { display: flex; align-items: center; gap: 14px; font-size: 15px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 18px; }
html[lang="ar"] .phase-tag { letter-spacing: 0; font-size: 17px; text-transform: none; }
.dark .phase-tag { color: var(--sand); }
.light .phase-tag { color: var(--clay); }
.phase-no {
  font-size: 15px; letter-spacing: 0; padding: 4px 12px; border-radius: 999px; border: 1px solid currentColor;
}

.cards { display: grid; gap: 16px; }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
.split .cards-3 { grid-template-columns: 1fr; }
.card {
  border-radius: var(--radius); padding: 26px 24px;
  display: grid; grid-template-columns: auto 1fr; column-gap: 18px; row-gap: 6px; align-items: start;
}
.card-icon { width: 52px; height: 52px; grid-row: span 2; flex: none; }
.card h3 { font-size: 20px; font-weight: 500; line-height: 1.3; }
.card p { font-size: 16px; line-height: 1.6; }
.dark .card { background: rgba(236,227,214,.06); border: 1px solid var(--earth-line); }
.dark .card-icon { color: var(--sand); }
.dark .card h3 { color: var(--on-dark); }
.dark .card p { color: var(--on-dark-muted); }
.light .card { background: #fbf8f3; border: 1px solid #ddd2c2; }
.light .card-icon { color: var(--clay); }
.light .card h3 { color: var(--earth); }
.light .card p { color: var(--ink-muted); }
@media (max-width: 1000px) { .cards-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .cards-3 { grid-template-columns: 1fr; } }

/* Promenade (story) */
.route {
  margin: 0; flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center;
  background: rgba(236,227,214,.05); border: 1px solid var(--earth-line); border-radius: var(--radius);
  padding: clamp(12px, 2vw, 24px);
}
.route svg { width: 100%; height: auto; max-height: 100%; min-height: 0; flex: 1; overflow: visible; }
.route-line { fill: none; stroke: rgba(187,169,149,.35); stroke-width: 3; stroke-dasharray: 8 10; stroke-linecap: round; }
.route-walk { fill: none; stroke: var(--sand); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 1 1; stroke-dashoffset: 0; }
.js .route-walk { stroke-dashoffset: 1; }
.route-lamps .halo { fill: url(#lamp-glow); opacity: 0; transition: opacity .6s ease; }
.route-lamps .bulb { fill: #6f5f54; transition: fill .6s ease; }
.route-lamps .lit .halo { opacity: 1; }
.route-lamps .lit .bulb { fill: #ffd58a; }
.stop circle { fill: var(--earth); stroke: var(--sand); stroke-width: 2.5; transition: fill .5s ease; }
.stop .stop-pulse { fill: none; stroke: var(--sand); opacity: 0; transform-box: fill-box; transform-origin: center; }
.stop-n { fill: var(--sand); font-size: 26px; text-anchor: middle; font-family: var(--font); transition: fill .5s ease; }
.stop-label { fill: var(--on-dark); font-size: 28px; text-anchor: middle; font-family: var(--font); }
.stop-label.ar { font-family: var(--font-ar); }
.stop.reached circle:not(.stop-pulse) { fill: var(--sand); }
.stop.reached .stop-n { fill: var(--earth); }
.stop.current .stop-pulse { animation: pulse 2s ease-out infinite; }
.stop[role="button"] { cursor: pointer; outline: none; }
.stop[role="button"] > circle:not(.stop-pulse) { transition: fill .5s ease, stroke-width .2s ease; }
.stop[role="button"]:hover > circle:not(.stop-pulse),
.stop[role="button"]:focus-visible > circle:not(.stop-pulse) { stroke: #f0c987; stroke-width: 5; }
.route-hint {
  display: inline-flex; align-items: center; gap: 8px; margin-inline-end: 10px; padding: 4px 12px; border-radius: 999px;
  background: rgba(236,227,214,.1); color: var(--on-dark); font-weight: 500;
}
.route-hint::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--sand); animation: blink 1.4s ease-in-out infinite; }
.walker circle:first-child { fill: rgba(245,240,231,.22); }
.walker circle:last-child { fill: var(--cream); }
.js .walker { opacity: 0; transition: opacity .4s ease; }
.js [data-story="route"]:not([data-active="0"]) .walker { opacity: 1; }
.route figcaption { color: var(--on-dark-muted); font-size: 14px; margin-top: 8px; text-align: center; }
.ticks { display: grid; gap: 10px; margin-top: 8px; }
.ticks li { display: flex; gap: 12px; align-items: center; color: var(--on-dark); }
.ticks li::before { content: ""; width: 18px; height: 18px; flex: none; background: var(--motif) center / contain no-repeat; }
@keyframes pulse { 0% { opacity: .7; transform: scale(1); } 100% { opacity: 0; transform: scale(1.9); } }

/* Infrastructure (map follows the list) */
.infra { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(28px, 4vw, 56px); align-items: start; }
.map { margin: 0; position: sticky; top: 140px; }
.map-frame {
  width: min(100%, calc((100vh - 230px) * 851 / 1040)); aspect-ratio: 851 / 1040; margin-inline: auto;
  position: relative; overflow: hidden; border-radius: var(--radius); box-shadow: 0 20px 50px rgba(47,38,34,.18); background: #cfc6b8; }
.map-frame img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.65,0,.25,1), filter 1s ease; }
.map-overlay { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-overlay g { opacity: 0; transition: opacity .7s ease; }
.map-overlay circle { transform-box: fill-box; transform-origin: center; }
.ov-trees circle { fill: rgba(185,240,143,.18); stroke: #b9f08f; stroke-width: 10; }
.ov-park circle { fill: rgba(245,240,231,.22); stroke: #fff4dd; stroke-width: 12; stroke-dasharray: 24 14; }
.ov-lights circle { fill: url(#glow); mix-blend-mode: screen; }
.map-tag {
  position: absolute; inset-block-start: 12px; inset-inline-start: 12px; padding: 4px 12px; border-radius: 999px;
  background: rgba(47,38,34,.75); color: var(--cream); font-size: 13px; font-weight: 500; opacity: 0; transition: opacity .6s ease;
}
.map[data-map-step="0"] .map-frame img { transform: scale(1.18); }
.map[data-map-step="1"] .ov-trees,
.map[data-map-step="2"] .ov-park,
.map[data-map-step="3"] .ov-lights,
.map[data-map-step="3"] .map-tag { opacity: 1; }
.map[data-map-step="1"] .ov-trees circle { animation: pulse 2.2s ease-out infinite; animation-delay: calc(var(--i) * .16s); }
.map[data-map-step="2"] .ov-park circle { animation: spin 9s linear infinite; }
.map[data-map-step="3"] .map-frame img { filter: brightness(.42) saturate(.55) sepia(.25); }
.map[data-map-step="3"] .ov-lights circle { animation: flicker 3s ease-in-out infinite; animation-delay: calc(var(--i) * -.37s); }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes flicker { 0%, 100% { opacity: .75; } 50% { opacity: 1; } }
.legend { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 16px; font-size: 15px; color: var(--ink-muted); }
.legend li { display: flex; align-items: center; gap: 8px; }
.legend i { display: inline-block; flex: none; }
.lg-lane { width: 24px; height: 4px; border-radius: 4px; background: #3b2a24; }
.lg-tree { width: 14px; height: 14px; border-radius: 50%; background: var(--palm); }
.lg-park { width: 16px; height: 16px; border-radius: 50%; background: #6a5a52; border: 1.5px dashed #2f2622; }
.infra-list { display: grid; gap: 14px; }
.infra-item {
  display: grid; grid-template-columns: auto 1fr; gap: 18px; padding: 24px;
  background: #fbf8f3; border: 1px solid #ddd2c2; border-radius: var(--radius);
  transition: border-color .4s ease, box-shadow .4s ease, background-color .4s ease;
}
.infra-item.is-active { border-color: var(--clay); background: #fffdf9; box-shadow: 0 14px 34px rgba(47,38,34,.1); }
.infra-item .card-icon { color: var(--clay); grid-row: auto; }
.infra-item h3 { font-size: 20px; font-weight: 500; color: var(--earth); margin-bottom: 10px; }
.infra-item ul { display: grid; gap: 6px; list-style: none; }
.infra-item li { position: relative; padding-inline-start: 18px; font-size: 16px; color: var(--ink-muted); line-height: 1.55; }
.infra-item li::before {
  content: ""; position: absolute; inset-inline-start: 0; top: .62em; width: 7px; height: 7px;
  background: var(--sand); transform: rotate(45deg);
}
@media (min-width: 901px) {
  .infra-list { padding-bottom: 20vh; }
  .infra-item { min-height: 46vh; align-content: center; }
}
@media (max-width: 900px) {
  .infra { grid-template-columns: 1fr; }
  .map { top: 128px; z-index: 3; background: var(--cream); padding-block: 8px 10px; }
  .map-frame { width: calc(34svh * 851 / 1040); }
  .legend { justify-content: center; font-size: 13px; margin-top: 10px; gap: 6px 14px; }
  .infra-list { padding-bottom: 30vh; }
}

/* ---------- Timeline ---------- */
.timeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; position: relative; }
.timeline::before {
  content: ""; position: absolute; top: 31px; inset-inline: 32px; height: 1px; background: var(--sand); opacity: .5;
}
.timeline::after {
  content: ""; position: absolute; top: 30px; inset-inline-start: 32px; width: calc(100% - 64px); height: 3px;
  background: var(--sand); border-radius: 3px; transform: scaleX(var(--tp, 0)); transform-origin: left center;
}
html[dir="rtl"] .timeline::after { transform-origin: right center; }
.tl { position: relative; }
.tl-mark {
  width: 64px; height: 64px; border-radius: 50%; border: 1.5px solid var(--sand); background: var(--earth);
  display: grid; place-items: center; position: relative; z-index: 1; margin-bottom: 22px;
}
.tl-mark { transition: background-color .5s ease; }
.tl-n { font-size: 28px; font-weight: 300; color: var(--sand); transition: color .5s ease; }
.tl.reached .tl-mark { background: var(--sand); }
.tl.reached .tl-n { color: var(--earth); }
.tl-dur {
  display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--earth); background: var(--sand); border-radius: 999px; padding: 3px 12px; margin-bottom: 14px;
}
html[lang="ar"] .tl-dur { letter-spacing: 0; font-size: 15px; }
.tl h3 { font-size: 20px; font-weight: 500; color: var(--on-dark); line-height: 1.35; margin-bottom: 10px; }
.tl p:last-child { font-size: 16px; color: var(--on-dark-muted); line-height: 1.6; }
@media (max-width: 960px) {
  .timeline { grid-template-columns: 1fr; gap: 0; }
  .timeline::before { top: 0; bottom: 0; inset-inline-start: 31px; inset-inline-end: auto; width: 1px; height: auto; }
  .timeline::after { top: 0; inset-inline-start: 30px; width: 3px; height: 100%; transform: scaleY(var(--tp, 0)); transform-origin: center top; }
  html[dir="rtl"] .timeline::after { transform-origin: center top; }
  .tl { display: grid; grid-template-columns: 64px 1fr; column-gap: 22px; padding-bottom: 36px; }
  .tl-mark { grid-row: span 3; margin: 0; }
  .tl-dur { justify-self: start; }
}

/* ---------- Impact ---------- */
.impact { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.impact-num {
  display: flex; align-items: center; gap: 24px; padding: 28px 32px; border-radius: 999px;
  border: 1.5px solid var(--sand); background: #fbf8f3;
}
.impact-num .big {
  flex: none; display: grid; place-items: center; width: clamp(96px, 11vw, 132px); aspect-ratio: 1; border-radius: 50%;
  background: var(--sand); color: var(--earth-deep); font-size: clamp(34px, 4vw, 48px); font-weight: 400;
  font-variant-numeric: tabular-nums;
}
.impact-num .lbl { font-size: clamp(20px, 2vw, 26px); color: var(--earth); line-height: 1.3; }
@media (max-width: 760px) {
  .impact { grid-template-columns: 1fr; }
  .impact-num { border-radius: calc(var(--radius) + 8px); padding: 18px; }
}
.partners { margin-top: clamp(48px, 7vw, 80px); }
.partners .h3 { color: var(--earth); margin-bottom: 22px; }
.partners ul { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.partners li {
  padding: 20px 22px; border-radius: 14px; background: var(--cream-2); color: var(--ink);
  font-weight: 500; line-height: 1.45; border-inline-start: 4px solid var(--sand);
}
@media (max-width: 900px) { .partners ul { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .partners ul { grid-template-columns: 1fr; } }

/* ---------- Closing & footer ---------- */
.closing { background: var(--earth); color: var(--on-dark); padding-top: 34px; padding-bottom: clamp(64px, 9vw, 110px); }
.closing-inner { padding-top: clamp(48px, 7vw, 90px); }
.closing-text { font-size: clamp(21px, 2.1vw, 30px); font-weight: 300; line-height: 1.55; max-width: 34em; }
html[lang="ar"] .closing-text { line-height: 1.8; }
.closing-text strong { color: var(--sand); font-weight: 400; display: block; margin-top: .8em; }
.closing-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }

.site-footer { background: var(--earth); }
.footer-ground { background: var(--sand); color: var(--earth-deep); margin-top: 120px; }
.footer-inner { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 24px; }
.footer-text { padding-block: 36px; display: grid; gap: 8px; font-size: 15px; line-height: 1.55; }
.footer-title { font-size: 22px; font-weight: 500; color: var(--earth); }
.footer-place { color: var(--earth); opacity: .85; }
.to-top { margin-top: 10px; font-weight: 600; color: var(--earth); text-underline-offset: 4px; }
.footer-house { width: clamp(150px, 20vw, 250px); height: auto; margin-top: -120px; }
@media (max-width: 640px) {
  .footer-inner { grid-template-columns: 1fr; }
  .footer-house { order: -1; margin-top: -110px; width: 160px; justify-self: end; }
  html[dir="rtl"] .footer-house { justify-self: start; }
  .footer-text { padding-top: 6px; }
}

/* ---------- Reveal on scroll (only when JS is running and motion is OK) ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }
.js .hero .reveal { transition-duration: 1s; }
.js .hero-house { opacity: 0; transform: translateY(30px); transition: opacity 1.2s ease .2s, transform 1.4s cubic-bezier(.2,.7,.2,1) .2s; }
.js .hero-house.in { opacity: 1; transform: none; }

/* ---------- Icons: draw in, keep moving, and every few seconds flick off and redraw ---------- */
/* The line drawing lives on each icon's outer <g>; the strokes inherit it. */
.icon * { transform-box: fill-box; }
.js .icon .dr { stroke-dasharray: 1 1.2; stroke-dashoffset: inherit; }
.js .icon > g { stroke-dashoffset: 1; transition: stroke-dashoffset 1.4s cubic-bezier(.5,0,.2,1) .15s; }
.js .icon { opacity: 0; transition: opacity .3s ease .1s; }
.js .in .icon { opacity: 1; }
.js .in .icon > g { stroke-dashoffset: 0; }
.in.playing .icon > g { animation: flick 5s ease-in-out calc(2s + var(--stagger, 0s)) infinite; }
.card:nth-child(2), .infra-item:nth-child(2) { --stagger: .4s; }
.card:nth-child(3), .infra-item:nth-child(3) { --stagger: .8s; }
.card:nth-child(4), .infra-item:nth-child(4) { --stagger: 1.2s; }
.card:nth-child(5) { --stagger: 1.6s; }
.card:nth-child(6) { --stagger: 2s; }

.a-glow { fill: currentColor; fill-opacity: 0; }
.in.playing .a-tilt { animation: tilt 3.2s ease-in-out 1s infinite; transform-origin: 80% 100%; }
.in.playing .a-steam { animation: steam 2s ease-in-out 1s infinite; }
.in.playing .a-steam.d2 { animation-delay: 1.5s; }
.in.playing .a-steam.d3 { animation-delay: 2s; }
.in.playing .a-glow { animation: glow 1.6s ease-in-out 1s infinite; }
.in.playing .a-wave { animation: wave 1.2s linear infinite; }
.in.playing .a-bob { animation: bob 1.2s ease-in-out 1s infinite alternate; }
.in.playing .a-sway { animation: sway 2s ease-in-out 1s infinite alternate; transform-origin: 50% 100%; }
.in.playing .a-sway.d2 { animation-duration: 1.6s; }
.in.playing .a-bounce { animation: bounce 1.1s ease-in-out 1s infinite; }
.in.playing .a-shadow { animation: shadow 1.1s ease-in-out 1s infinite; transform-origin: center; }
.in.playing .a-blink { animation: blink 1.4s ease-in-out 1s infinite; transform-origin: center; }
.in.playing .a-drive { animation: drive 1.4s ease-in-out 1s infinite alternate; }
.in.playing .a-rays { animation: rays 1.2s ease-in-out 1s infinite; transform-origin: center; }
.in.playing .a-nod { animation: nod 1.3s ease-in-out 1s infinite alternate; transform-origin: 50% 100%; }
.in.playing .a-lift { animation: lift 1.3s ease-in-out 1s infinite alternate; }
@keyframes flick { 0%, 90% { stroke-dashoffset: 0; } 93% { stroke-dashoffset: 1; } 100% { stroke-dashoffset: 0; } }
@keyframes tilt { 0%, 40%, 100% { transform: rotate(0); } 55%, 80% { transform: rotate(-22deg); } }
@keyframes steam { 0% { opacity: 0; transform: translateY(5px); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(-8px); } }
@keyframes glow { 0%, 100% { fill-opacity: .1; } 50% { fill-opacity: .95; } }
@keyframes wave { to { transform: translateX(-12px); } }
@keyframes bob { from { transform: translateY(0) rotate(0); } to { transform: translateY(-6px) rotate(-10deg); } }
@keyframes sway { from { transform: rotate(-12deg); } to { transform: rotate(12deg); } }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes shadow { 0%, 100% { transform: scaleX(1); opacity: .5; } 50% { transform: scaleX(.5); opacity: .2; } }
@keyframes blink { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .4; transform: scale(1.15); } }
@keyframes drive { from { transform: translateX(-3px); } to { transform: translateX(4px); } }
@keyframes rays { 0%, 100% { opacity: .1; transform: scale(.9); } 50% { opacity: 1; transform: scale(1.15); } }
@keyframes nod { from { transform: translateX(-2px) rotate(-15deg); } to { transform: translateX(2px) rotate(15deg); } }
@keyframes lift { to { transform: translateY(-5px); } }

/* ---------- Reduced motion: same content and states, no movement ---------- */
@media (prefers-reduced-motion: reduce) {
  .js .reveal, .js .hero-house { opacity: 1 !important; transform: none !important; transition: none !important; }
  .hero-house img, .hero-copy { transform: none !important; opacity: 1 !important; }
  .js .icon, .js .icon > g { opacity: 1; stroke-dashoffset: 0; transition: none; }
  *, *::before, *::after { animation: none !important; }
  .loader-house { clip-path: none; }
  .loader-ground, .loader-bar i { transform: none; }
  .loader-name { opacity: 1; }
  .loader.leaving { transition: none; }
  .stage-layer, .illus-box, .layer-photo img, .stage-lights i, .stage-ring, .story-step,
  .map-frame img, .map-overlay g, .route-lamps *, .stop * { transition: none !important; }
}

/* ---------- Print: a clean document for officials ---------- */
@media print {
  @page { margin: 16mm; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .loader, .site-header, .phase-rail, .skip, .closing-actions, .to-top, .motif-band, .vision::after, .story-stage, .map-overlay, .map-tag { display: none !important; }
  .story { display: block; }
  .story-steps { padding: 0; }
  .story-step, .js .story-step { min-height: 0; opacity: 1 !important; padding-block: 8pt; }
  .story-step h3, .story-step p, .step-when { color: #000 !important; }
  .map-frame img { transform: none !important; filter: none !important; }
  .js .icon, .js .icon > g { opacity: 1; stroke-dashoffset: 0; animation: none; }
  .village-dialog { display: block; position: static; width: auto; max-height: none; box-shadow: none; background: #fff; }
  .vd-tabs, .vd-close { display: none; }
  .js .vd-panel:not(.is-shown) { display: block; }
  .hero-house img, .hero-copy { transform: none !important; opacity: 1 !important; }
  .hero { min-height: auto; padding: 0; background: #fff; color: #000; }
  .hero-ground { display: none; }
  .hero-house { width: 200px; margin: 0; }
  .hero-title, .hero-lede, .hero-award, .eyebrow { color: #000 !important; }
  .section, .closing { padding-block: 18pt; background: #fff !important; color: #000 !important; break-inside: avoid-page; }
  .dark .h1, .dark .h2, .light .h1, .h1, .h2, .quote, .kicker, .phase-tag, .tl-n, .house-lede { color: #000 !important; }
  .prose, .dark .prose, .card p, .dark .card p, .dark .card h3, .tl h3, .tl p:last-child, .ticks li, .closing-text, .vision-note { color: #222 !important; }
  .card, .infra-item, .stat, .partners li, .impact-num, .route { background: #fff !important; border: 1px solid #bbb !important; box-shadow: none !important; break-inside: avoid; }
  .tl-mark { background: #fff; }
  .js .reveal, .js .hero-house { opacity: 1 !important; transform: none !important; }
  .map { position: static; background: none; }
  .map-frame { height: auto; width: 60%; }
  .timeline::after { display: none; }
  .footer-ground { margin-top: 0; background: #fff; }
  .footer-house { margin-top: 0; }
}

/* =====================================================================
   v11 additions: logo, proposal notice, Vision 2040, visiting, events,
   promotion and budget
   ===================================================================== */

/* ---------- Logo: four triangles that meet in the middle ---------- */
.brand { gap: 10px; }
.brand-mark { width: 28px; height: 28px; color: var(--sand); flex: none; }
.brand-mark path, .loader-logo path { transform-box: fill-box; transform-origin: center; }
.brand:hover .brand-mark { animation: logo-turn .9s cubic-bezier(.5,0,.2,1); }
@keyframes logo-turn { to { transform: rotate(90deg); } }
/* Loader logo: the four triangles fly in, lock together, breathe, then fly to the header */
.loader-logo { width: 68px; height: 68px; color: var(--sand); overflow: visible; transform-origin: center; }
.loader-logo path, .ll-spin, .ll-ring { transform-box: view-box; transform-origin: 20px 20px; }
.ll-spin { animation: ll-spin 1.2s cubic-bezier(.2,.8,.2,1) both; }
.loader-logo .lg-t { animation: lg-in-t .9s cubic-bezier(.2,.9,.25,1.25) both, br-t 1.8s ease-in-out 1.2s infinite; }
.loader-logo .lg-r { animation: lg-in-r .9s cubic-bezier(.2,.9,.25,1.25) .08s both, br-r 1.8s ease-in-out 1.2s infinite; }
.loader-logo .lg-b { animation: lg-in-b .9s cubic-bezier(.2,.9,.25,1.25) .16s both, br-b 1.8s ease-in-out 1.2s infinite; }
.loader-logo .lg-l { animation: lg-in-l .9s cubic-bezier(.2,.9,.25,1.25) .24s both, br-l 1.8s ease-in-out 1.2s infinite; }
.ll-ring { fill: none; stroke: var(--sand); stroke-width: 1; opacity: 0; animation: ll-ring 1.8s ease-out 1s infinite; }
@keyframes ll-spin { from { transform: rotate(-180deg) scale(.6); } }
@keyframes lg-in-t { from { opacity: 0; transform: translateY(-40px) rotate(180deg); } }
@keyframes lg-in-r { from { opacity: 0; transform: translateX(40px) rotate(180deg); } }
@keyframes lg-in-b { from { opacity: 0; transform: translateY(40px) rotate(180deg); } }
@keyframes lg-in-l { from { opacity: 0; transform: translateX(-40px) rotate(180deg); } }
@keyframes br-t { 50% { transform: translateY(-2.5px); } }
@keyframes br-r { 50% { transform: translateX(2.5px); } }
@keyframes br-b { 50% { transform: translateY(2.5px); } }
@keyframes br-l { 50% { transform: translateX(-2.5px); } }
@keyframes ll-ring { 0% { opacity: .6; transform: scale(.7); } 100% { opacity: 0; transform: scale(1.7); } }
/* Leaving: everything else fades, the logo travels to the header mark */
.loader.leaving .loader-inner > :not(.loader-logo) { filter: opacity(0); transition: filter .35s ease; }
.loader.leaving .ll-ring { animation: none; opacity: 0; }
.loader.flying .loader-logo { transition: transform .95s cubic-bezier(.65,0,.2,1); }
.loader.flying .loader-logo path { animation-play-state: paused; }
.is-loading .brand-mark, .logo-flying .brand-mark { opacity: 0; }
.brand-mark { transition: opacity .2s ease; }
.footer-title { display: flex; align-items: center; gap: 10px; }
.footer-mark { width: 26px; height: 26px; color: var(--earth); flex: none; }
.footer-draft { font-weight: 600; color: var(--earth); }

/* ---------- Proposal notice ---------- */
.draft-note {
  display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; max-width: 40em;
  margin-bottom: 26px; padding: 10px 16px; border-radius: 14px;
  border: 1px dashed rgba(236,227,214,.45); background: rgba(236,227,214,.07);
  color: var(--on-dark); font-size: 15px; line-height: 1.5;
}
.draft-note b {
  display: inline-block; margin-inline-end: 8px; padding: 1px 10px; border-radius: 999px;
  background: var(--sand); color: var(--earth-deep); font-size: 12px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; vertical-align: 1px;
}
html[lang="ar"] .draft-note b { letter-spacing: 0; font-size: 13px; }

/* ---------- Oman Vision 2040 ---------- */
.align-head { display: grid; grid-template-columns: auto 1fr; gap: clamp(24px, 4vw, 48px); align-items: center; margin-bottom: clamp(36px, 5vw, 60px); }
.align-head .h1 { margin-bottom: 14px; }
.align-lede { color: var(--ink-muted); max-width: 34em; }
.v2040-logo {
  width: clamp(210px, 24vw, 300px); display: grid; place-items: center; padding: 12px 16px;
  border-radius: 20px; background: #fbf8f3; border: 1.5px solid var(--sand);
}
.v2040-logo img { width: 100%; height: auto; }
.v2040-fallback { display: grid; justify-items: center; line-height: 1.1; color: var(--earth); }
.v-ar { font-family: var(--font-ar); font-size: clamp(20px, 2vw, 26px); font-weight: 500; }
.v-num { font-size: clamp(32px, 3.6vw, 46px); font-weight: 300; letter-spacing: .02em; }
.v-en { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--clay); margin-top: 4px; }
.js .reveal.in .v2040-logo { animation: logo-spin-in 1.1s cubic-bezier(.2,.8,.2,1) both; }
@keyframes logo-spin-in { from { transform: scale(.85); opacity: 0; } }
@media (max-width: 640px) { .align-head { grid-template-columns: 1fr; justify-items: start; } }

.align-list { display: grid; gap: 10px; counter-reset: none; }
.align-row {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 12px 40px; align-items: center;
  padding: 20px 24px; border-radius: 16px; background: #fbf8f3; border: 1px solid #ddd2c2; overflow: hidden;
}
.align-row::after {
  content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: 4px; background: var(--sand);
  transform: scaleY(0); transform-origin: top; transition: transform .8s cubic-bezier(.2,.7,.2,1) .25s;
}
.align-row.in::after { transform: scaleY(1); }
.align-pri { display: flex; align-items: center; gap: 14px; font-weight: 500; color: var(--earth); line-height: 1.35; }
.align-n {
  flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--earth); color: var(--sand); font-size: 15px; font-weight: 600;
}
.align-do { color: var(--ink-muted); font-size: 16px; line-height: 1.6; position: relative; padding-inline-start: 34px; }
.align-do::before {
  content: ""; position: absolute; inset-inline-start: 0; top: .78em; width: 20px; height: 2px; background: var(--clay);
  transform: scaleX(0); transform-origin: left; transition: transform .6s ease .5s;
}
html[dir="rtl"] .align-do::before { transform-origin: right; }
.align-row.in .align-do::before { transform: scaleX(1); }
@media (max-width: 760px) {
  .align-row { grid-template-columns: 1fr; padding: 18px 18px 18px 22px; }
  .align-do { padding-inline-start: 50px; }
  .align-do::before { display: none; }
}

/* ---------- Visiting: carts at the entrances ---------- */
.entrances { margin-top: clamp(36px, 5vw, 56px); padding: 26px 24px; border-radius: var(--radius); border: 1px solid var(--earth-line); }
.entrances-title { color: var(--sand); font-weight: 600; font-size: 14px; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 18px; }
html[lang="ar"] .entrances-title { letter-spacing: 0; font-size: 16px; }
.entrance-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.entrance-list li {
  display: grid; justify-items: center; gap: 10px; padding: 18px 12px; border-radius: 14px;
  background: rgba(236,227,214,.06); color: var(--on-dark); font-weight: 500; text-align: center;
}
.carts { display: flex; gap: 10px; color: var(--sand); }
.carts svg { width: 44px; height: 44px; }
.entrances.in.playing .carts svg { animation: cart-roll 2.4s ease-in-out infinite alternate; }
.entrances.in.playing .carts svg + svg { animation-delay: -1.2s; }
.entrances.in.playing li:nth-child(2) .carts svg { animation-duration: 2.8s; }
.entrances.in.playing li:nth-child(3) .carts svg { animation-duration: 2.1s; }
@keyframes cart-roll { from { transform: translateX(-6px); } to { transform: translateX(6px); } }
@media (max-width: 560px) {
  .entrance-list { grid-template-columns: 1fr; }
  .entrance-list li { grid-template-columns: auto 1fr; justify-items: start; align-items: center; text-align: start; }
}

/* ---------- Events: venues ---------- */
.venues { margin-top: clamp(40px, 6vw, 64px); }
.venues .h3 { color: var(--earth); margin-bottom: 18px; }
.venues ul { display: flex; flex-wrap: wrap; gap: 10px; }
.venues li {
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px 12px 14px; border-radius: 999px;
  background: var(--earth); color: var(--on-dark); font-weight: 500; line-height: 1.3;
}
.venues li::before {
  content: ""; width: 14px; height: 18px; flex: none; background: var(--sand);
  clip-path: path("M7 18C7 18 0 10.5 0 6.5a7 7 0 0 1 14 0C14 10.5 7 18 7 18z");
}
.venues.in.playing li::before { animation: bounce 1.4s ease-in-out infinite; animation-delay: calc(var(--i) * .18s); }
.js .venues li { opacity: 0; transform: translateY(10px); transition: opacity .5s ease, transform .5s ease; transition-delay: calc(.2s + var(--i) * .08s); }
.js .venues.in li { opacity: 1; transform: none; }

/* ---------- Budget ---------- */
.budget-inner { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 90px); align-items: center; }
.budget-num { display: grid; gap: 4px; margin: 6px 0 18px; color: var(--earth-deep); }
.budget-num .num { font-size: clamp(60px, 9vw, 120px); font-weight: 300; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.budget-num .cur { font-size: clamp(18px, 1.6vw, 22px); font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--earth); }
html[lang="ar"] .budget-num .cur { letter-spacing: 0; }
.budget-num .num, .budget-num .num span { direction: ltr; unicode-bidi: isolate; }
.budget-lede { color: var(--earth-deep); max-width: 28em; }
.budget-partner {
  justify-self: end; width: min(100%, 420px); padding: clamp(28px, 4vw, 44px); border-radius: 22px;
  background: var(--earth); color: var(--on-dark); display: grid; gap: 10px;
}
html[dir="rtl"] .budget-partner { justify-self: start; }
.bp-kicker { color: var(--sand); font-size: 14px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
html[lang="ar"] .bp-kicker { letter-spacing: 0; font-size: 16px; }
.bp-name { font-family: "IBM Plex Sans", sans-serif; font-size: clamp(34px, 4vw, 52px); font-weight: 300; line-height: 1.1; color: var(--cream); }
@media (max-width: 860px) { .budget-partner, html[dir="rtl"] .budget-partner { justify-self: stretch; width: auto; } }
@media print { .budget-partner { background: #fff !important; color: #000 !important; border: 1px solid #bbb; } .bp-name, .bp-kicker { color: #000 !important; } }
.budget-split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.budget-split li {
  display: grid; gap: 4px; padding: 20px 22px; border-radius: 16px; background: rgba(251,248,243,.6);
  color: var(--ink-muted); font-size: 16px; line-height: 1.5; border-top: 4px solid var(--earth);
}
.budget-split b { font-size: 20px; font-weight: 500; color: var(--earth-deep); }
.js .budget-split li.reveal { transition-delay: calc(var(--i) * .1s); }
@media (max-width: 860px) { .budget-inner { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .budget-split { grid-template-columns: 1fr; } }

/* ---------- New icon motions ---------- */
.in.playing .a-walk { animation: walk 3s ease-in-out 1s infinite alternate; }
.in.playing .a-wheel { animation: blink 1s ease-in-out 1s infinite; transform-origin: center; }
.in.playing .a-pan { animation: pan 3s ease-in-out 1s infinite alternate; transform-origin: 0% 50%; }
.in.playing .a-rec { animation: rec 1s steps(2, jump-none) infinite; }
.in.playing .a-scan { animation: steam 2s ease-in-out 1s infinite; }
.in.playing .a-swing { animation: swing 2.2s ease-in-out 1s infinite alternate; transform-origin: 50% 0%; }
.in.playing .a-rock { animation: rock 2.4s ease-in-out 1s infinite alternate; transform-origin: center; }
.in.playing .a-rays.d2 { animation-delay: 1.6s; }
.in.playing .a-bounce.d2 { animation-delay: 1.3s; }
.in.playing .a-bounce.d3 { animation-delay: 1.6s; }
.in.playing .a-flap { animation: flap 1.4s ease-in-out 1s infinite alternate; transform-origin: 0% 50%; }
.in.playing .a-pop { animation: pop-star 1.6s ease-in-out 1s infinite; transform-origin: center; }
@keyframes walk { from { transform: translateX(0); } to { transform: translateX(20px); } }
@keyframes pan { from { transform: rotate(-12deg); } to { transform: rotate(10deg); } }
@keyframes rec { 0% { opacity: 1; } 100% { opacity: .1; } }
@keyframes swing { from { transform: rotate(-14deg); } to { transform: rotate(14deg); } }
@keyframes rock { from { transform: rotate(-18deg); } to { transform: rotate(12deg); } }
@keyframes flap { from { transform: skewY(-6deg) scaleX(.94); } to { transform: skewY(6deg) scaleX(1.04); } }
@keyframes pop-star { 0%, 100% { transform: scale(1) rotate(0); } 50% { transform: scale(1.18) rotate(12deg); } }
.card:nth-child(5) { --stagger: 1.6s; }

@media (prefers-reduced-motion: reduce) {
  .js .venues li, .align-row::after, .align-do::before { opacity: 1; transform: none !important; transition: none !important; }
}

@media print {
  .draft-note { border-color: #999; color: #000; background: none; }
  .align-row, .budget-split li, .entrances, .entrance-list li, .venues li { background: #fff !important; color: #000 !important; border: 1px solid #bbb !important; }
  .align-row::after, .align-do::before { transform: none; }
  .js .venues li { opacity: 1; transform: none; }
  .budget-num, .budget-num .cur, .budget-split b, .align-pri, .entrance-list li, .entrances-title { color: #000 !important; }
  .align-n { background: #fff; color: #000; border: 1px solid #000; }
}
