/* ==========================================================================
   Luxury Baalbaki: shared stylesheet (English index.html + Arabic ar/index.html)
   Brand: Deep Navy #092443 · Ivory Cream #F6EEDF · Brushed Gold #C9AE78
   ========================================================================== */
/* ==========================================================================
   Self-hosted fonts (SIL Open Font License; see fonts/README.md). Same origin as the page, so no
   third-party stylesheet blocks first paint. A face downloads only on the page that uses it.
   Latin faces are Google's variable "latin" subsets; the Arabic faces are text= subsets
   (basic Arabic letters, diacritics, Arabic punctuation and ASCII).
   ========================================================================== */
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 300 700; font-display: swap; src: url("../fonts/cormorant-garamond.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Cormorant Garamond"; font-style: italic; font-weight: 300 700; font-display: swap; src: url("../fonts/cormorant-garamond-italic.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 100 700; font-display: swap; src: url("../fonts/ibm-plex-sans.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Amiri"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/amiri-400-sub.woff2") format("woff2"); }
@font-face { font-family: "Amiri"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/amiri-700-sub.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans Arabic"; font-style: normal; font-weight: 300; font-display: swap; src: url("../fonts/ibm-plex-sans-arabic-300-sub.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans Arabic"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-sans-arabic-400-sub.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans Arabic"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/ibm-plex-sans-arabic-500-sub.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans Arabic"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/ibm-plex-sans-arabic-600-sub.woff2") format("woff2"); }
@font-face { font-family: "Aref Ruqaa"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/aref-ruqaa-400-sub.woff2") format("woff2"); }
/* the one Arabic word on the English page (the language link): a 2KB subset of Plex Sans Arabic 500 */
@font-face { font-family: "LB Arabic Link"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/plex-arabic-link-500-sub.woff2") format("woff2"); }

:root {
  --navy: #092443;
  --navy-900: #06192f;
  --navy-700: #12325a;
  --ivory: #f6eedf;
  --ivory-2: #ede2cc;
  --paper: #faf6ee;
  --gold: #c9ae78;
  --gold-600: #a2864f;
  --gilt-ink: #806637;            /* small gold-coloured text on paper / ivory (never on ivory-2) */
  --ink: #13233a;
  --ink-soft: #4b5a6e;
  --on-navy: #f6eedf;
  --on-navy-soft: rgba(246, 238, 223, .72);
  --on-navy-mute: rgba(246, 238, 223, .62);   /* floor for small text on navy */
  --line: rgba(9, 36, 67, .14);
  --line-light: rgba(246, 238, 223, .14);
  --focus: var(--navy);

  --wrap: 1320px;
  --gutter: clamp(16px, 4.2vw, 56px);
  --section: clamp(96px, 13vw, 200px);
  --section-tight: clamp(64px, 8vw, 120px);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-in-out: cubic-bezier(.76, 0, .24, 1);

}

/* Direction tokens: for what logical properties cannot express */
html[dir="ltr"] { --dir: 1; --start: left; --end: right; --glow-x: 12%; }
html[dir="rtl"] { --dir: -1; --start: right; --end: left; --glow-x: 88%; }

/* Role-based font tokens */
html[lang="en"] {
  --f-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --f-body: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --f-fig: "Cormorant Garamond", Georgia, serif;
  --f-hand: "Cormorant Garamond", Georgia, serif;
  --hand-style: italic;
}
html[lang="ar"] {
  --f-display: "Amiri", "Times New Roman", serif;
  --f-body: "IBM Plex Sans Arabic", system-ui, sans-serif;
  --f-fig: "Cormorant Garamond", "Times New Roman", serif;
  --f-hand: "Aref Ruqaa", "Amiri", serif;
  --hand-style: normal;
}

/* Focus colour by ground */
.hero, .chapters, .solutions, .closing, .contact, .footer, .nav, .lightbox, .intro { --focus: var(--gold); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
@media (prefers-reduced-motion: no-preference) {
  html:not(.motion) { scroll-behavior: smooth; }
}
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
html[lang="en"] body { line-height: 1.65; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 700; text-wrap: balance; }
p { text-wrap: pretty; hyphens: manual; }
p, figure, blockquote, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
strong { font-weight: 600; }
html[lang="en"] strong { font-weight: 500; }
abbr[title] { text-decoration: none; cursor: inherit; }
::selection { background: var(--gold); color: var(--navy); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
[tabindex="-1"]:focus { outline: none; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* Latin runs inside Arabic text (Arabic page only) */
.latin { font-family: var(--f-fig); letter-spacing: .01em; unicode-bidi: isolate; }
.fig { font-family: var(--f-fig); unicode-bidi: isolate; }
.hand { font-family: var(--f-hand); font-style: var(--hand-style); font-weight: 400; }
.container { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; inset-inline-start: 12px; top: -80px; z-index: 200; background: var(--gold); color: var(--navy); padding: 10px 16px; font-weight: 500; --focus: var(--ivory); }
.skip:focus { top: 12px; }

/* ---------- Grain: static, viewport-sized ---------- */
.grain {
  position: fixed; inset: 0; z-index: 90; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: .045;
}

/* ---------- Intro: the Doorway ---------- */
.intro { display: none; }
.js.motion:not(.intro-seen) .intro {
  display: grid; place-items: center;
  position: fixed; inset: 0; z-index: 150; color: var(--ivory);
}
.intro__door { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; fill: var(--navy); display: block; }
.intro__inner { display: grid; justify-items: center; gap: 22px; }
.intro__mark { width: 74px; clip-path: inset(100% 0 0 0); }
.intro__count { overflow: hidden; height: 1.1em; font-size: clamp(56px, 9vw, 120px); line-height: 1.1; }
.intro__count span { display: block; font-weight: 300; font-variant-numeric: lining-nums tabular-nums; transform: translateY(110%); }
.intro__line { color: var(--gold); opacity: 0; }
html[lang="en"] .intro__line { font-size: 20px; }
html[lang="ar"] .intro__line { font-family: var(--f-body); font-style: normal; font-size: 14px; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset-inline: 0; top: 0; z-index: 60;
  padding-block: 26px;
  transition: transform .7s var(--ease), background .5s var(--ease), padding .5s var(--ease);
}
.nav.is-solid { background: rgba(6, 25, 47, .9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); padding-block: 14px; }
.nav.is-hidden { transform: translateY(-100%); }
.nav__inner { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); display: flex; align-items: center; gap: 24px; }
.nav__brand { margin-inline-end: auto; color: var(--ivory); display: block; }
.nav__brand svg { fill: currentColor; display: block; height: 48px; width: auto; transition: height .5s var(--ease); }
.nav.is-solid .nav__brand svg { height: 38px; }
.nav__links { display: flex; align-items: center; gap: clamp(20px, 2.4vw, 38px); }
.nav__links a { position: relative; color: rgba(246, 238, 223, .78); font-size: 15px; transition: color .4s; }
html[lang="en"] .nav__links a { font-size: 14.5px; letter-spacing: .01em; }
.nav__links a::after {
  content: ""; position: absolute; inset-inline: 0; bottom: -4px; height: 1px; background: var(--gold);
  transform: scaleX(0); transform-origin: var(--start); transition: transform .6s var(--ease);
}
.nav__links a:hover, .nav__links a.is-active { color: var(--ivory); }
.nav__links a:hover::after, .nav__links a.is-active::after { transform: scaleX(1); }
.nav__links .nav__menu-cta { display: none; }

.lang {
  position: relative; display: inline-flex; align-items: center; min-height: 44px;
  font: 500 15px/1 var(--f-body); color: var(--on-navy-soft); transition: color .4s;
}
html[lang="en"] .lang[lang="ar"] { font-family: "LB Arabic Link", "IBM Plex Sans Arabic", system-ui, sans-serif; }
.lang span {
  background: linear-gradient(var(--gold), var(--gold)) no-repeat;
  background-size: 0 1px; background-position: var(--start) 100%;
  padding-bottom: 4px; transition: background-size .6s var(--ease);
}
.lang:hover { color: var(--ivory); }
.lang:hover span { background-size: 100% 1px; }
.nav .lang { padding-inline-start: 24px; }
.nav .lang::before { content: ""; position: absolute; inset-inline-start: 0; top: 50%; width: 1px; height: 16px; margin-top: -8px; background: var(--line-light); }

.nav__cta { position: relative; display: inline-flex; align-items: center; min-height: 44px; border: 1px solid rgba(201, 174, 120, .55); padding: 0 20px; font-size: 15px; color: var(--gold); overflow: hidden; isolation: isolate; transition: color .5s var(--ease); }
html[lang="en"] .nav__cta { font-size: 14.5px; }
.nav__cta::before { content: ""; position: absolute; inset: 0; background: var(--gold); transform: translateY(101%); transition: transform .5s var(--ease); z-index: -1; }
.nav__cta:hover { color: var(--navy); }
.nav__cta:hover::before { transform: none; }
.nav__progress { position: absolute; inset-inline: 0; bottom: 0; height: 1px; background: var(--gold); transform-origin: var(--start); transform: scaleX(0); opacity: 0; transition: opacity .4s; }
.nav.is-solid .nav__progress { opacity: .8; }
.nav__toggle { display: none; width: 44px; height: 44px; background: none; border: 0; cursor: pointer; position: relative; color: var(--ivory); }
.nav__toggle span { position: absolute; inset-inline: 10px; height: 1.5px; background: var(--ivory); transition: transform .5s var(--ease), top .5s var(--ease), inset .5s var(--ease); }
.nav__toggle span:first-child { top: 17px; }
.nav__toggle span:last-child { top: 26px; inset-inline-start: 18px; }
.nav__toggle[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:last-child { top: 21px; inset-inline-start: 10px; transform: rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 14px;
  min-height: 54px; padding: 0 32px;
  font: 500 15px/1.2 var(--f-body); letter-spacing: .01em;
  border: 1px solid transparent; cursor: pointer; background: none;
  transition: color .5s var(--ease), border-color .5s var(--ease);
}
html[lang="ar"] .btn { letter-spacing: 0; }
.btn span { position: relative; }
.btn--gold { background: var(--gold); color: var(--navy); }
.btn--gold::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--ivory); transform: scaleX(0); transform-origin: var(--end); transition: transform .7s var(--ease); }
.btn--gold:hover::before { transform: scaleX(1); transform-origin: var(--start); }
.btn--ghost { border-color: rgba(246, 238, 223, .4); color: var(--ivory); }
.btn--ghost::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--gold); transform: translateY(101%); transition: transform .6s var(--ease); }
.btn--ghost:hover { color: var(--navy); border-color: var(--gold); }
.btn--ghost:hover::before { transform: none; }
.btn--text { padding: 0; min-height: 54px; color: var(--ivory); overflow: visible; }
.btn--text i { width: 46px; height: 1px; background: currentColor; position: relative; transition: width .6s var(--ease); scale: calc(var(--dir) * -1) 1; }
.btn--text i::after { content: ""; position: absolute; left: 0; top: -3px; width: 7px; height: 7px; border-left: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: rotate(45deg); }
.btn--text:hover { color: var(--gold); }
.btn--text:hover i { width: 70px; }
.btn--line { border-color: rgba(9, 36, 67, .5); color: var(--navy); }
.btn--line::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--navy); transform: translateY(101%); transition: transform .6s var(--ease); }
.btn--line:hover { color: var(--ivory); border-color: var(--navy); }
.btn--line:hover::before { transform: none; }
.btn:active { transform: translateY(1px); }

/* ---------- Typography helpers ---------- */
.kicker { display: flex; align-items: center; gap: 14px; color: var(--gilt-ink); font-size: 14px; font-weight: 500; margin-bottom: 26px; }
html[lang="en"] .kicker { font-size: 13px; line-height: 1.4; letter-spacing: .06em; }
.kicker::after { content: ""; flex: 0 0 56px; height: 1px; background: currentColor; opacity: .55; }
.kicker--light { color: var(--gold); }
.display { font-family: var(--f-display); font-size: clamp(40px, 5.4vw, 86px); line-height: 1.22; color: var(--navy); }
.display--light { color: var(--ivory); }
.display--sm { font-size: clamp(32px, 3.8vw, 58px); }
html[lang="en"] .display { font-weight: 400; font-size: clamp(40px, 5vw, 80px); line-height: 1.06; letter-spacing: -.015em; }
html[lang="en"] .display--sm { font-size: clamp(32px, 3.6vw, 56px); line-height: 1.1; letter-spacing: -.01em; }

/* split words (built by JS) */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding: .22em .05em .1em; margin: -.22em -.05em -.1em; }
html[lang="en"] .w { padding-bottom: .22em; margin-bottom: -.22em; }
.w > .wi { display: inline-block; will-change: transform; }

/* ---------- Arch ---------- */
.arch { position: relative; clip-path: url(#arch); -webkit-clip-path: url(#arch); aspect-ratio: 3 / 4; background: var(--navy-700); }
.arch--tall { aspect-ratio: 3 / 4.3; }
.arch__reveal { position: absolute; inset: 0; overflow: hidden; }
.arch__reveal img { width: 100%; height: 100%; object-fit: cover; }
.plate { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 12px; margin-top: 18px; font-size: 13px; color: var(--ink-soft); }
.plate__no { font-family: var(--f-fig); font-style: italic; font-size: 15px; color: var(--gilt-ink); unicode-bidi: isolate; }
.plate::after { content: ""; flex: 1; height: 1px; background: var(--line); align-self: center; min-width: 24px; }
.plate__loc { order: 2; flex-basis: 100%; margin-top: 4px; display: none; }
html[lang="en"] .plate { font-variant-numeric: oldstyle-nums proportional-nums; }

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 100dvh;
  background: radial-gradient(90% 70% at var(--glow-x) 0%, #10305a 0%, var(--navy) 50%, var(--navy-900) 100%);
  color: var(--ivory);
  padding: clamp(130px, 15vw, 190px) var(--gutter) 40px;
  display: grid; grid-template-rows: 1fr auto;
}
.hero__ghost {
  position: absolute; z-index: -1; inset-inline-end: -3vw; bottom: -9vw;
  font-size: 40vw; line-height: .8; font-weight: 300; font-variant-numeric: lining-nums tabular-nums;
  color: transparent; -webkit-text-stroke: 1px rgba(201, 174, 120, .14);
  user-select: none; pointer-events: none;
}
.hero__grid { width: 100%; max-width: var(--wrap); margin-inline: auto; display: grid; grid-template-columns: 1.3fr .7fr; gap: clamp(32px, 6vw, 110px); align-items: end; }
.hero__eyebrow { display: flex; align-items: baseline; gap: 14px; color: var(--gold); margin-bottom: clamp(20px, 2.4vw, 34px); }
html[lang="ar"] .hero__eyebrow .hand { font-size: 30px; line-height: 1; }
html[lang="ar"] .hero__eyebrow .latin { font-size: 17px; letter-spacing: .32em; font-style: italic; }
html[lang="en"] .hero__eyebrow { font-size: clamp(20px, 1.6vw, 24px); line-height: 1.2; }
.hero__title { font-family: var(--f-display); font-size: clamp(52px, 8.2vw, 136px); line-height: 1.16; font-weight: 700; }
.hero__title em { font-style: normal; color: var(--gold); white-space: nowrap; }
html[lang="en"] .hero__title { font-weight: 300; font-size: clamp(54px, 7.4vw, 124px); line-height: 1; letter-spacing: -.02em; }
.hero__foot { display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: end; margin-top: clamp(32px, 4vw, 56px); padding-top: 28px; border-top: 1px solid var(--line-light); }
.hero__lead { max-width: 34em; color: var(--on-navy-soft); font-size: clamp(15px, 1.15vw, 17px); font-weight: 300; }
.hero__lead .latin { font-size: 1.15em; color: var(--ivory); }
html[lang="en"] .hero__lead { max-width: 52ch; font-size: clamp(16px, 1.15vw, 18px); line-height: 1.6; }
.hero__actions { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.hero__arch { position: relative; align-self: end; max-width: 460px; width: 100%; justify-self: end; }
.hero__arch .plate { color: var(--on-navy-mute); }
.hero__arch .plate__no { color: var(--gold); }
.hero__arch .plate::after { background: var(--line-light); }
.arch-wrap { position: relative; }
.arch__line { position: absolute; inset: -14px; width: calc(100% + 28px); height: calc(100% + 28px); overflow: visible; pointer-events: none; }
.arch__line path { fill: none; stroke: var(--gold); stroke-width: 1; vector-effect: non-scaling-stroke; opacity: .7; }
/* Motion: hidden until JS has measured the on-screen length and set the dash (no flash of a full line) */
.motion .arch__line:not(.is-ready) { visibility: hidden; }
/* Vertical coordinates label: rides the arch's outer (inline-end) side, reads bottom-to-top */
.hero__side {
  position: absolute; bottom: 0;
  direction: ltr; unicode-bidi: isolate;
  writing-mode: vertical-rl; transform: rotate(180deg);
  display: flex; align-items: center; gap: 14px; white-space: nowrap;
  font-size: 12px; line-height: 1.2; color: var(--on-navy-mute);
}
/* physical offsets: logical insets would resolve against the label's own vertical writing mode */
html[dir="ltr"] .hero__side { left: calc(100% + 28px); }
html[dir="rtl"] .hero__side { right: calc(100% + 28px); }
html[lang="en"] .hero__side { letter-spacing: .08em; }
.hero__side i { width: 1px; height: 64px; background: currentColor; }
.hero__side .fig { font-size: 13px; font-style: italic; }
.hero__stats { width: 100%; max-width: var(--wrap); margin: clamp(48px, 6vw, 80px) auto 0; display: grid; grid-template-columns: repeat(3, 1fr); }
.hero__stats > div { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 6px; padding-inline-start: 22px; border-inline-start: 1px solid var(--line-light); }
.hero__stats > div:first-child { padding-inline-start: 0; border: 0; }
.hero__stats dt { font-size: 13px; line-height: 1.45; color: var(--on-navy-mute); }
.hero__stats dd { font-family: var(--f-fig); font-size: clamp(34px, 3.6vw, 54px); line-height: 1; font-weight: 300; color: var(--ivory); direction: ltr; text-align: var(--start); font-variant-numeric: lining-nums tabular-nums; }
.hero__stats sup { font-size: .42em; color: var(--gold); vertical-align: top; }
.odo { display: inline-flex; align-items: flex-start; direction: ltr; overflow: hidden; height: 1em; vertical-align: top; }
.odo__col { display: flex; flex-direction: column; }
.odo__col span { display: block; height: 1em; line-height: 1; text-align: center; }

/* ---------- Story ---------- */
.story { padding-block: var(--section) var(--section-tight); background: var(--paper); }
.story__grid { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: clamp(16px, 2vw, 32px); }
.story__head { grid-column: 1 / 9; grid-row: 1; }
.story__photo { grid-column: 7 / 13; grid-row: 1 / 3; margin-top: clamp(120px, 14vw, 220px); align-self: start; transform: rotate(calc(1.4deg * var(--dir))); }
.story__photo-frame { background: #fffdf8; padding: clamp(10px, 1.2vw, 16px) clamp(10px, 1.2vw, 16px) clamp(36px, 3.6vw, 52px); box-shadow: 0 1px 1px rgba(9, 36, 67, .06), 0 30px 60px -28px rgba(9, 36, 67, .38); }
.story__photo-frame img { width: 100%; filter: sepia(.28) contrast(1.02); }
.story__photo figcaption { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: -40px; padding-inline: 18px; position: relative; }
.story__photo figcaption .hand { font-size: clamp(18px, 1.6vw, 23px); color: var(--navy); line-height: 1.2; }
html[lang="en"] .story__photo figcaption .hand { font-size: clamp(19px, 1.6vw, 23px); }
.story__photo figcaption .meta { font-size: 13px; color: var(--ink-soft); }
html[lang="ar"] .story__photo figcaption .meta { font-family: var(--f-fig); font-style: italic; }
.story__text { grid-column: 1 / 6; grid-row: 2; margin-top: clamp(40px, 5vw, 72px); }
.story__text p { color: var(--ink-soft); max-width: 62ch; }
.story__text p + p { margin-top: 22px; }
.lede { font-family: var(--f-display); font-size: clamp(21px, 1.8vw, 27px); line-height: 1.75; color: var(--navy) !important; }
.lede strong { color: var(--gilt-ink); font-weight: 700; }
html[lang="en"] .lede { font-size: clamp(22px, 1.9vw, 28px); line-height: 1.4; max-width: 30em; font-variant-numeric: oldstyle-nums proportional-nums; }
html[lang="en"] .lede strong { font-weight: 500; }

/* ---------- Milestones (CSS sticky + scrubbed x; never a ScrollTrigger pin) ---------- */
.chapters { background: var(--navy); color: var(--ivory); position: relative; overflow: clip; }
.chapters__pin { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding-top: clamp(80px, 12vh, 128px); overflow: clip; }
.chapters__bar { max-width: var(--wrap); width: 100%; margin-inline: auto; padding-inline: var(--gutter); display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 28px; align-items: center; }
.chapters__label { font-family: var(--f-body); font-size: 13px; font-weight: 500; line-height: 1.4; color: var(--gold); }
html[lang="en"] .chapters__label { letter-spacing: .06em; }
.chapters__rail { --p: 0; height: 1px; background: var(--line-light); position: relative; grid-column: 2; grid-row: 1; }
.chapters__rail span { position: absolute; inset: 0; background: var(--gold); transform-origin: var(--start); transform: scaleX(var(--p)); }
/* The travelling marker: a small pointed arch, the site's own motif, riding the rail */
.chapters__rail::after {
  content: ""; position: absolute; inset-inline-start: 0; bottom: -1px; width: 12px; height: 16px; display: none;
  translate: calc(var(--p) * var(--rail-w, 0px) * var(--dir) - 6px * var(--dir)) 0;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 16'%3E%3Cpath d='M.6 16V6.4C.6 3.6 3 1.5 6 .7c3 .8 5.4 2.9 5.4 5.7V16' fill='none' stroke='%23000' stroke-width='1.2'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 16'%3E%3Cpath d='M.6 16V6.4C.6 3.6 3 1.5 6 .7c3 .8 5.4 2.9 5.4 5.7V16' fill='none' stroke='%23000' stroke-width='1.2'/%3E%3C/svg%3E") center / contain no-repeat;
  background-color: var(--gold);
}
.chapters__stations { display: none; grid-column: 2; grid-row: 2; position: relative; height: 34px; margin: 0; padding: 0; list-style: none; }
.chapters__stations li { position: absolute; top: 0; inset-inline-start: calc(var(--at) * 100%); translate: calc(-50% * var(--dir)) 0; }
.station {
  display: flex; flex-direction: column; align-items: center; gap: 9px;
  background: none; border: 0; padding: 0 6px 4px; cursor: pointer;
  font-family: var(--f-display); font-size: 15px; line-height: 1.2; white-space: nowrap;
  color: var(--on-navy-mute); transition: color .5s var(--ease);
}
html[lang="en"] .station { font-style: italic; font-size: 16px; }
.station i { width: 1px; height: 11px; margin-top: -11px; background: currentColor; opacity: .6; transform: scaleY(.64); transform-origin: top; transition: transform .5s var(--ease), opacity .5s; }
.station:hover, .station:focus-visible { color: var(--ivory); }
.station.is-active { color: var(--gold); }
.station.is-active i { transform: none; opacity: 1; }
.station:focus-visible { outline: 1px solid var(--gold); outline-offset: 2px; }
@media (min-width: 1101px) and (min-height: 700px) {
  .motion .chapters__stations { display: block; }
  .motion .chapters__rail::after { display: block; }
  .motion .chapters__bar { row-gap: 2px; }
}
.chapters__track { flex: 1; display: flex; align-items: stretch; width: max-content; padding-inline: max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter))) 14vw; will-change: transform; }
.chapter {
  width: clamp(440px, 44vw, 700px); flex: none;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: clamp(24px, 4vh, 56px) 0 clamp(32px, 6vh, 88px);
  padding-inline-end: clamp(40px, 5vw, 96px);
  margin-inline-end: clamp(40px, 5vw, 96px);
  border-inline-end: 1px solid var(--line-light);
}
.chapter--media { width: clamp(720px, 70vw, 1120px); display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr auto; column-gap: clamp(32px, 4vw, 64px); align-content: end; }
.chapter--media .chapter__year { grid-column: 1; grid-row: 1; align-self: end; }
.chapter--media .chapter__body { grid-column: 1; grid-row: 2; }
.chapter--media .chapter__img { grid-column: 2; grid-row: 1 / 3; align-self: end; }
.chapter:last-child { border: 0; margin: 0; }
.chapter__year {
  display: block; font-family: var(--f-fig); font-size: clamp(96px, min(14vw, 22vh), 230px); line-height: .9; font-weight: 300; font-variant-numeric: lining-nums tabular-nums;
  color: transparent; -webkit-text-stroke: 1px var(--gold);
  margin-bottom: clamp(16px, 3vh, 44px); transition: color .8s var(--ease);
}
.chapter__year--word { font-family: var(--f-display); font-weight: 700; font-size: clamp(48px, min(7.4vw, 11vh), 120px); line-height: 1.25; }
html[lang="en"] .chapter__year--word { font-weight: 300; font-style: italic; font-size: clamp(48px, min(6.8vw, 11vh), 112px); line-height: 1; letter-spacing: -.01em; -webkit-text-stroke: 0; color: rgba(201, 174, 120, .6); }
.chapter.is-active .chapter__year { color: var(--gold); }
.chapter__body h3 { font-family: var(--f-display); font-size: clamp(24px, 2.2vw, 34px); line-height: 1.45; margin-bottom: 14px; }
html[lang="en"] .chapter__body h3 { font-weight: 500; font-size: clamp(23px, 2.1vw, 32px); line-height: 1.2; }
.chapter__body h3 .latin { font-weight: 500; }
.chapter__body p { color: rgba(246, 238, 223, .68); font-size: 16px; max-width: 40ch; }
html[lang="en"] .chapter__body p { line-height: 1.6; }
.chapter__body strong { color: var(--ivory); }
.chapter__body .latin { color: var(--ivory); font-size: 1.08em; }
.chapter__img { position: relative; }
.chapter__img img { width: auto; max-width: 100%; max-height: calc(100vh - 300px); aspect-ratio: 4 / 5; object-fit: cover; filter: grayscale(.35) contrast(1.05); }
.chapter__img figcaption { position: absolute; bottom: 14px; inset-inline-start: 14px; background: var(--navy); padding: 4px 12px; font-family: var(--f-fig); font-size: 15px; font-style: italic; color: var(--gold); }
html[lang="en"] .chapter__img figcaption { font-variant-numeric: oldstyle-nums proportional-nums; }

/* ---------- Partners ---------- */
.partners { background: var(--paper); padding-block: var(--section-tight); overflow: hidden; }
.partners__head { margin-bottom: clamp(40px, 5vw, 72px); display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 32px; }
.partners__head h2 { max-width: 18ch; }
.marquee { position: relative; border-top: 1px solid var(--line); }
.marquee:last-child { border-bottom: 1px solid var(--line); }
.marquee__tag { position: absolute; top: 12px; inset-inline-start: var(--gutter); font-size: 12px; color: var(--ink-soft); z-index: 1; }
html[lang="en"] .marquee__tag { letter-spacing: .06em; }
.marquee__track { overflow: hidden; direction: ltr; padding-block: clamp(48px, 4.4vw, 58px) clamp(14px, 2vw, 22px); }
.marquee__list { display: flex; width: max-content; will-change: transform; }
.marquee__list li {
  flex: none; display: flex; align-items: center;
  font-size: clamp(34px, 4.4vw, 70px); line-height: 1.4; padding-inline: .8em;
  color: var(--navy); transition: color .5s var(--ease);
}
.marquee__list li:hover { color: var(--gilt-ink); }

/* ---------- About ---------- */
.about { --vis-h: clamp(440px, 60vw, 94vh); background: var(--ivory); padding-block: 0 var(--section); overflow: clip; }
/* Full-bleed photograph that dissolves into the section, so the text sits in its faded lower part */
.about__visual {
  position: relative; margin: 0; height: var(--vis-h); overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 46%, rgba(0, 0, 0, .55) 64%, rgba(0, 0, 0, .14) 78%, transparent 90%);
          mask-image: linear-gradient(to bottom, #000 0%, #000 46%, rgba(0, 0, 0, .55) 64%, rgba(0, 0, 0, .14) 78%, transparent 90%);
}
.about__visual img { position: absolute; inset: -6% 0 auto; width: 100%; height: 112%; object-fit: cover; object-position: 30% 42%; }
.about__visual + .container { position: relative; margin-top: calc(var(--vis-h) * -.24); }
.about__sticky { position: absolute; inset: 0; overflow: hidden; }
/* Wide screens: the photograph takes the left half, stays put while the text scrolls past on the right,
   and fades sideways into the section. It sits on the left in both languages so the fade never reaches the sign. */
@media (min-width: 1101px) {
  .about { position: relative; padding-block: var(--section); }
  .about__visual {
    position: absolute; inset-block: 0; left: 0; width: 56vw; height: auto; overflow: clip;
    -webkit-mask-image: linear-gradient(to right, #000 0%, #000 50%, rgba(0, 0, 0, .55) 68%, rgba(0, 0, 0, .14) 84%, transparent 98%);
            mask-image: linear-gradient(to right, #000 0%, #000 50%, rgba(0, 0, 0, .55) 68%, rgba(0, 0, 0, .14) 84%, transparent 98%);
  }
  .about__sticky { position: sticky; inset: auto; top: 0; height: 100vh; max-height: 100%; }
  .about__visual img { object-position: 24% 50%; }
  .about__visual + .container { margin-top: 0; }
  .about__visual + .container > * { width: min(560px, 44%); margin-left: auto; margin-right: 0; }
  .about .about__head { grid-template-columns: 1fr; row-gap: 24px; }
  .about .about__notes { grid-template-columns: 1fr; gap: clamp(40px, 4vw, 64px); }
  .about .note:nth-child(2) { margin-top: 0; }
}
.about__head { display: grid; grid-template-columns: 1.2fr .8fr; column-gap: clamp(32px, 6vw, 110px); align-items: end; margin-bottom: clamp(64px, 8vw, 120px); }
.about__head .kicker { grid-column: 1 / -1; }
.about__intro { color: var(--ink-soft); font-size: clamp(16px, 1.2vw, 18px); max-width: 62ch; }
.about__intro .latin { font-size: 1.12em; color: var(--navy); }
.about__notes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(32px, 4vw, 72px); align-items: start; }
.note { padding-top: 30px; border-top: 1px solid var(--line); }
.note:nth-child(2) { margin-top: clamp(0px, 5vw, 80px); }
.note h3 { font-family: var(--f-display); font-size: clamp(23px, 2vw, 30px); line-height: 1.45; color: var(--navy); margin-bottom: 12px; }
html[lang="en"] .note h3 { font-weight: 500; font-size: clamp(23px, 2.1vw, 32px); line-height: 1.2; }
.note p { color: var(--ink-soft); font-size: 16px; max-width: 46ch; }
.facts { display: grid; gap: 14px; }
.facts div { display: grid; grid-template-columns: 96px 1fr; align-items: baseline; gap: 16px; padding-bottom: 14px; border-bottom: 1px dashed var(--line); }
.facts div:last-child { border: 0; padding: 0; }
.facts dt { font-family: var(--f-fig); font-size: 38px; line-height: 1; font-weight: 300; color: var(--navy); font-variant-numeric: lining-nums tabular-nums; }
.facts dd { color: var(--ink-soft); font-size: 16px; }

/* ---------- Solutions ---------- */
.solutions { background: var(--navy); color: var(--ivory); padding-block: var(--section); position: relative; }
/* Showroom walk-through. Static (phones, reduced motion, no JS): each picture followed by its text.
   Tour mode (.motion on a wide, tall enough screen): a sticky stage where pictures wipe in as you scroll. */
.tour__grid { display: flex; flex-direction: column; }
.tour__text, .tour__captions, .tour__frame { display: contents; }
.tour__head { order: 0; margin-bottom: clamp(16px, 3vw, 32px); }
.tour__slide { margin: clamp(36px, 6vw, 56px) 0 0; aspect-ratio: 4 / 3; overflow: hidden; background: var(--navy-700); }
.tour__slide img { width: 100%; height: 100%; object-fit: cover; }
.tour__cap { margin-top: 18px; }
.tour__slide:nth-child(1) { order: 1; } .tour__cap:nth-child(1) { order: 2; }
.tour__slide:nth-child(2) { order: 3; } .tour__cap:nth-child(2) { order: 4; }
.tour__slide:nth-child(3) { order: 5; } .tour__cap:nth-child(3) { order: 6; }
.tour__slide:nth-child(4) { order: 7; } .tour__cap:nth-child(4) { order: 8; }
.tour__index, .tour__progress { display: none; }
.tour__num { display: block; font-family: var(--f-fig); font-style: italic; font-size: 18px; color: var(--gold); line-height: 1; margin-bottom: 12px; }
html[dir="rtl"] .tour__num { direction: ltr; text-align: right; }
.tour__title { font-family: var(--f-display); font-weight: 400; font-size: clamp(30px, 3.6vw, 56px); line-height: 1.15; color: var(--ivory); }
html[lang="en"] .tour__title { font-weight: 300; letter-spacing: -.012em; }
html[lang="ar"] .tour__title { font-weight: 700; line-height: 1.4; }
.tour__desc { margin-top: 14px; max-width: 34ch; font-size: 16px; color: var(--on-navy-mute); }

@media (min-width: 861px) and (min-height: 600px) {
  .motion .solutions { padding-block: 0; }
  .motion .tour { height: 420vh; }
  .motion .tour__stage { position: sticky; top: 0; height: 100vh; display: flex; align-items: center; overflow: clip; padding-top: 72px; }
  .motion .tour__grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(36px, 5vw, 96px); height: min(calc(100vh - 140px), 760px); }
  .motion .tour__text { display: flex; flex-direction: column; justify-content: space-between; min-height: 0; }
  .motion .tour__head { margin: 0; }
  html.motion .tour__heading.display { font-size: clamp(30px, 2.8vw, 44px); line-height: 1.1; }
  .motion .tour__captions { display: block; position: relative; flex: 1; min-height: 0; }
  .motion .tour__cap { position: absolute; inset-inline: 0; top: 50%; translate: 0 -50%; margin: 0; opacity: 0; }
  .motion .tour__cap:first-child { opacity: 1; }
  .motion .tour__index { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
  .motion .tour__frame { display: block; position: relative; overflow: hidden; background: var(--navy-700); }
  .motion .tour__slide { position: absolute; inset: 0; margin: 0; aspect-ratio: auto; }
  .motion .tour__slide + .tour__slide { clip-path: inset(100% 0% 0% 0%); }
  .motion .tour__progress { display: block; position: absolute; inset: auto 0 0; height: 2px; background: rgba(246, 238, 223, .18); z-index: 2; }
  .motion .tour__progress span { position: absolute; inset: 0; background: var(--gold); transform-origin: var(--start); transform: scaleX(0); }
}
.tour__link {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 6px 0; background: none; border: 0; cursor: pointer; text-align: start;
  font: 400 15px/1.4 var(--f-body); color: var(--on-navy-mute); transition: color .5s var(--ease);
}
.tour__link::before { content: ""; width: 14px; height: 1px; background: currentColor; transition: width .6s var(--ease), background .5s; }
.tour__link:hover, .tour__link:focus-visible { color: var(--ivory); }
.tour__link.is-active { color: var(--gold); }
.tour__link.is-active::before { width: 44px; background: var(--gold); }
.tour__link:focus-visible { outline: 1px solid var(--gold); outline-offset: 3px; }

/* ---------- Projects ---------- */
.projects { background: var(--ivory); padding-block: var(--section) var(--section-tight); overflow: hidden; }
.projects__head { display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(32px, 6vw, 110px); align-items: end; margin-bottom: clamp(56px, 7vw, 100px); }
.projects__intro { color: var(--ink-soft); font-size: clamp(16px, 1.2vw, 18px); max-width: 62ch; }
.ledger__group { position: relative; display: grid; grid-template-columns: 5fr 7fr; gap: clamp(24px, 4vw, 64px); padding-block: clamp(32px, 4vw, 56px); }
.ledger__group::before { content: ""; position: absolute; inset: 0 0 auto; height: 1px; background: var(--navy); opacity: .5; transform: scaleX(var(--draw, 1)); transform-origin: var(--start); }
.ledger__cat h3 { font-family: var(--f-display); font-size: clamp(24px, 2.3vw, 36px); line-height: 1.4; color: var(--navy); }
html[lang="en"] .ledger__cat h3 { font-weight: 500; font-size: clamp(23px, 2.1vw, 32px); line-height: 1.2; }
.ledger__rows li { display: grid; grid-template-columns: minmax(150px, 1fr) 1.4fr 3em; gap: 20px; align-items: baseline; padding-block: 16px; border-bottom: 1px solid var(--line); transition: translate .6s var(--ease); }
html[lang="en"] .ledger__rows li { grid-template-columns: minmax(200px, 1fr) 1.3fr 3em; }
.ledger__rows li:first-child { padding-top: 6px; }
.ledger__rows li:last-child { border-bottom: 0; }
@media (hover: hover) { .ledger__rows li:hover { translate: calc(10px * var(--dir)) 0; } }
.ledger__rows strong { color: var(--navy); font-size: 17px; }
html[lang="en"] .ledger__rows strong { font-weight: 500; }
.ledger__rows span { color: var(--ink-soft); font-size: 15px; }
.ledger__rows em { text-align: end; font-family: var(--f-fig); font-style: italic; color: var(--gilt-ink); font-size: 18px; }
html[lang="en"] .ledger__rows em { font-variant-numeric: oldstyle-nums proportional-nums; }
.cities-wrap { margin-top: clamp(56px, 7vw, 100px); }
.cities { overflow: hidden; border-block: 1px solid var(--line); padding-block: 22px; }
.motion .cities { -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.cities__track { display: flex; width: max-content; }
.motion .cities__track { animation: cities-ltr 38s linear infinite; }
html.motion[dir="rtl"] .cities__track { animation-name: cities-rtl; }
.cities.is-paused .cities__track { animation-play-state: paused; }
.cities__track span { font-family: var(--f-display); font-size: clamp(22px, 2.2vw, 32px); color: var(--navy); display: flex; align-items: center; white-space: nowrap; }
html[lang="en"] .cities__track span { font-style: italic; font-weight: 400; }
.cities__track span::after { content: ""; width: 22px; height: 1px; margin-inline: 26px; background: var(--gold); }
@keyframes cities-ltr { to { transform: translateX(-50%); } }
@keyframes cities-rtl { to { transform: translateX(50%); } }
.cities-wrap { display: flex; flex-direction: column; align-items: flex-end; }
.cities-wrap .cities { align-self: stretch; }

/* ---------- Archive ---------- */
.archive { background: var(--paper); padding-block: var(--section); }
.archive__head { display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(32px, 6vw, 110px); align-items: end; margin-bottom: clamp(48px, 6vw, 80px); }
.archive__intro { color: var(--ink-soft); max-width: 62ch; }
.filters { display: flex; flex-wrap: wrap; gap: 4px 28px; margin-bottom: 40px; border-bottom: 1px solid var(--line); }
.filters button {
  position: relative; background: none; border: 0; cursor: pointer; min-height: 44px;
  font: 500 15px/1 var(--f-body); color: var(--ink-soft); padding: 14px 0 18px;
  transition: color .4s var(--ease); white-space: nowrap;
}
.filters button .fig { font-size: 16px; font-style: italic; font-weight: 500; margin-inline-start: 2px; color: var(--gilt-ink); }
html[lang="en"] .filters button .fig { font-variant-numeric: oldstyle-nums proportional-nums; }
.filters button::after { content: ""; position: absolute; inset-inline: 0; bottom: -1px; height: 2px; background: var(--navy); transform: scaleX(0); transform-origin: var(--start); transition: transform .6s var(--ease); }
.filters button:hover, .filters button[aria-pressed="true"] { color: var(--navy); }
.filters button[aria-pressed="true"]::after { transform: scaleX(1); }

/* Justified rows: reading order is row by row, nothing is cropped */
.gallery { --row-h: 260px; display: flex; flex-wrap: wrap; gap: 16px; }
.gallery__item { font: inherit;
  flex: var(--r) 1 calc(var(--r) * var(--row-h)); aspect-ratio: var(--r); min-width: 0;
  display: block; margin: 0; padding: 0; border: 0;
  position: relative; overflow: hidden; background: var(--ivory-2); cursor: zoom-in;
}
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.6s var(--ease), filter .8s; filter: saturate(.8) contrast(1.02); }
.gallery__spacer { flex: 10 1 0; }
.motion .gallery__item { clip-path: inset(0 0 100% 0); }
.motion .gallery__item.is-in { clip-path: inset(0 0 0 0); transition: clip-path 1.2s var(--ease); }
.motion .gallery__item img { transform: scale(1.12); }
.motion .gallery__item.is-in img { transform: scale(1); }
.gallery__item:hover img { transform: scale(1.05) !important; filter: saturate(1); }
.gallery__item::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.gallery__item:focus-visible { outline: none; }
.gallery__item:focus-visible::after { box-shadow: inset 0 0 0 2px var(--navy), inset 0 0 0 4px var(--paper); }
.gallery__tag { position: absolute; inset-inline-start: 12px; bottom: 12px; background: var(--navy); color: var(--ivory); font-size: 12.5px; line-height: 1.4; padding: 6px 12px; opacity: 0; transform: translateY(8px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.gallery__item:hover .gallery__tag, .gallery__item:focus-visible .gallery__tag { opacity: 1; transform: none; }
.gallery__fallback { display: none; position: absolute; inset: 0; place-items: center; padding: 8px; font-size: 13px; color: var(--ink-soft); text-align: center; }
.gallery__item.is-broken img { visibility: hidden; }
.gallery__item.is-broken .gallery__fallback { display: grid; }
.gallery__item.is-broken .gallery__tag { display: none; }
.gallery__empty { color: var(--ink-soft); font-size: 15px; }
.gallery__more { display: flex; justify-content: center; margin-top: 36px; }

/* ---------- Lightbox ---------- */
.lightbox { border: 0; padding: 0; margin: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; background: rgba(6, 18, 34, .97); color: var(--ivory); overflow: hidden; }
.lightbox::backdrop { background: rgba(6, 18, 34, .97); }
.lightbox[open] { display: flex; align-items: center; justify-content: center; animation: lbIn .5s var(--ease); }
@keyframes lbIn { from { opacity: 0; } }
.lightbox figure { max-width: min(1400px, 86vw); }
.lightbox img { max-height: 80dvh; width: auto; margin-inline: auto; animation: lbImg .7s var(--ease); }
@keyframes lbImg { from { opacity: 0; transform: scale(.96); } }
.lightbox figcaption { text-align: center; margin-top: 18px; font-size: 14px; color: rgba(246, 238, 223, .65); }
.lightbox figcaption .fig { font-style: italic; font-size: 15px; }
.lb-count { margin-inline-start: 14px; padding-inline-start: 14px; border-inline-start: 1px solid var(--line-light); font-variant-numeric: lining-nums tabular-nums; }
.lightbox button { position: absolute; background: none; border: 1px solid rgba(246, 238, 223, .4); color: var(--ivory); width: 54px; height: 54px; cursor: pointer; transition: border-color .4s, color .4s; }
.lightbox button:hover { border-color: var(--gold); color: var(--gold); }
.lightbox__close { top: 22px; inset-inline-end: 22px; }
.lightbox__close i { position: absolute; left: 50%; top: 50%; width: 20px; height: 1px; background: currentColor; transform: translate(-50%, -50%) rotate(45deg); }
.lightbox__close i + i { transform: translate(-50%, -50%) rotate(-45deg); }
.lightbox__nav { top: 50%; transform: translateY(-50%); }
.lightbox__nav--prev { inset-inline-start: 22px; }
.lightbox__nav--next { inset-inline-end: 22px; }
.lightbox__nav i { position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-top: 1px solid currentColor; border-right: 1px solid currentColor; scale: var(--dir) 1; }
.lightbox__nav--next i { transform: translateX(-2px) rotate(45deg); }
.lightbox__nav--prev i { transform: translateX(2px) rotate(-135deg); }

/* ---------- Closing ---------- */
.closing { background: var(--navy); color: var(--ivory); padding-block: clamp(120px, 15vw, 220px); }
.closing__inner { max-width: 1120px; }
.closing__mark { width: 58px; margin-bottom: 44px; }
.closing__quote { font-family: var(--f-display); font-size: clamp(28px, 3.7vw, 58px); line-height: 1.6; }
html[lang="en"] .closing__quote { font-weight: 300; font-size: clamp(30px, 3.6vw, 56px); line-height: 1.22; letter-spacing: -.01em; font-variant-numeric: oldstyle-nums proportional-nums; }

/* ---------- Contact ---------- */
.contact { background: var(--navy-900); color: var(--ivory); padding-block: var(--section) var(--section-tight); }
.contact__top { display: grid; grid-template-columns: 1.3fr .7fr; gap: clamp(32px, 6vw, 110px); align-items: end; margin-bottom: clamp(56px, 7vw, 100px); }
.contact__title { font-family: var(--f-display); font-size: clamp(48px, 7.4vw, 124px); line-height: 1.15; }
html[lang="en"] .contact__title { font-weight: 300; font-size: clamp(46px, 6.6vw, 108px); line-height: 1.02; letter-spacing: -.02em; }
.contact__intro { color: rgba(246, 238, 223, .65); margin-bottom: 28px; max-width: 62ch; }
.contact__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.contact__actions:empty { display: none; }
.contact__grid { display: grid; grid-template-columns: 1fr 1fr 1fr 1.4fr; border-top: 1px solid var(--line-light); }
.contact__cell { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 28px 0 0; padding-inline-end: 24px; min-width: 0; }
.contact__cell[hidden] { display: none; }
.contact__cell + .contact__cell { padding-inline-start: 24px; border-inline-start: 1px solid var(--line-light); }
.contact__label { font-size: 13px; color: var(--gold); margin-bottom: 4px; }
html[lang="en"] .contact__label { letter-spacing: .06em; }
.contact__value { font-size: 18px; color: var(--ivory); }
a.contact__value { display: inline-flex; align-items: center; justify-content: flex-start; min-height: 44px; transition: color .4s; }
a.contact__value:hover { color: var(--gold); }
.contact__value.num { font-family: var(--f-body); font-size: clamp(19px, 1.6vw, 22px); font-weight: 500; font-variant-numeric: lining-nums tabular-nums; }
html[lang="ar"] .contact__value.num { font-family: var(--f-fig); font-size: clamp(21px, 1.8vw, 26px); }
[data-field="email"] { font-size: clamp(17px, 1.4vw, 21px) !important; overflow-wrap: normal; word-break: normal; }
.contact__sub { font-size: 14px; color: var(--on-navy-mute); }
.contact__sub .num { font-variant-numeric: lining-nums tabular-nums; }
.contact__sub:empty { display: none; }

/* ---------- Footer ---------- */
.footer { background: var(--navy-900); color: var(--on-navy-mute); padding-bottom: 36px; overflow: hidden; }
.footer__nav { display: flex; flex-wrap: wrap; gap: 0 32px; padding-top: 24px; border-top: 1px solid var(--line-light); font-size: 15px; }
.footer__nav a { display: inline-flex; align-items: center; min-height: 44px; transition: color .4s; }
.footer__nav a:hover { color: var(--gold); }
.footer__mega { margin-block: clamp(48px, 7vw, 96px) clamp(28px, 4vw, 48px); color: rgba(246, 238, 223, .92); }
.footer__mega svg { fill: currentColor; display: block; width: 100%; height: auto; }
.footer__meta { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 4px 24px; font-size: 13.5px; color: var(--on-navy-mute); }
.footer__meta .lang { font-size: 13.5px; color: var(--on-navy-soft); min-width: 44px; justify-content: flex-start; }
.footer__top { display: inline-flex; align-items: center; min-height: 44px; }
.footer__top:hover { color: var(--gold); }

/* ---------- Motion initial states (only when JS + motion are on) ---------- */
.motion [data-intro] { opacity: 0; transform: translateY(12px); }
.motion:not(.intro-seen) [data-hero] { opacity: 0; transform: translateY(24px); }
.motion .hero__title { opacity: 0; }
.motion [data-hero-arch], .motion [data-arch] { clip-path: inset(100% 0 0 0); }
.motion .hero__stats > div { opacity: 0; }
.motion .ledger__group { --draw: 0; }
.motion .chapter__img img { clip-path: inset(0 0 100% 0); transition: clip-path 1.4s var(--ease); }
.motion .chapter.is-seen .chapter__img img { clip-path: inset(0 0 0 0); }

/* ---------- Responsive ---------- */
@media (min-width: 1101px) {
  .hero__side { display: flex; }
  /* the label (≈16px) sits 28px outside the arch: reserve that 44px inside the grid so it never enters the page gutter */
  .hero__arch { margin-inline-end: 44px; width: calc(100% - 44px); }
  .hero__arch .plate__loc { display: none; }
}

/* Milestones stack when the viewport is narrow OR short (content must never be clipped) */
@media (max-width: 1100px), (max-height: 699px) {
  .chapters__pin { position: relative; height: auto; padding-block: clamp(80px, 12vw, 120px); }
  .chapters__bar { grid-template-columns: auto 1fr; }
  .chapters__track { width: auto; flex-direction: column; padding-inline: max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter))); }
  .chapter, .chapter--media { width: auto; margin: 0; padding: 48px 0; border: 0; border-bottom: 1px solid var(--line-light); display: block; }
  .chapter:last-child { border: 0; }
  .chapter__year { font-size: clamp(84px, 20vw, 150px); }
  .chapter__year--word, html[lang="en"] .chapter__year--word { font-size: clamp(48px, 11vw, 80px); }
  .chapter__img { margin-top: 28px; max-width: 520px; }
  .chapter__img img { width: 100%; max-height: none; aspect-ratio: 3 / 2; }
}

@media (max-width: 1100px) {
  .nav__toggle { display: block; }
  .nav__cta { display: none; }
  .nav .lang { padding-inline-start: 0; min-width: 44px; justify-content: center; }
  .nav .lang::before { display: none; }
  .nav__inner { gap: 8px; }
  .nav__links {
    position: fixed; inset: 0; z-index: -1;
    flex-direction: column; justify-content: center; align-items: flex-start; gap: 6px;
    padding-inline: var(--gutter);
    background: var(--navy);
    visibility: hidden;
    clip-path: inset(0 0 100% 0);
    transition: clip-path .8s var(--ease-in-out), visibility 0s .8s;
  }
  .nav__links a { font-family: var(--f-display); font-size: clamp(34px, 8vw, 56px); line-height: 1.5; }
  html[lang="en"] .nav__links a { font-size: clamp(36px, 9vw, 44px); line-height: 1.3; letter-spacing: 0; }
  .nav__links a::after { bottom: 4px; }
  .nav__links .nav__menu-cta {
    display: inline-flex; align-items: center; min-height: 52px; margin-top: 24px; padding: 0 24px;
    font: 500 16px/1 var(--f-body) !important; letter-spacing: 0 !important; color: var(--gold);
    border: 1px solid rgba(201, 174, 120, .55);
  }
  .nav__links .nav__menu-cta::after { display: none; }
  .nav.is-open .nav__links { visibility: visible; clip-path: inset(0); transition-delay: 0s; }
  .nav.is-open { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; transform: none; }

  .hero__grid { grid-template-columns: 1fr; }
  .hero__arch { justify-self: start; max-width: 380px; width: 78vw; }
  html[lang="en"] .hero__arch { justify-self: end; }
  .hero__foot { grid-template-columns: 1fr; }
  .hero__side { display: none; }
  .hero__arch .plate__loc { display: block; }

  .story__head, .story__photo, .story__text { grid-column: 1 / -1; grid-row: auto; }
  .story__photo { margin-top: 56px; max-width: 640px; }
  .story__text { max-width: 640px; }

  .about__notes { grid-template-columns: 1fr; }
  .about { --vis-h: clamp(380px, 92vw, 620px); }
  .about__visual + .container { margin-top: calc(var(--vis-h) * -.16); }
  .about__visual img { object-position: 18% 40%; }
}


@media (max-width: 860px) {
  .partners__head, .about__head, .projects__head, .archive__head, .contact__top { grid-template-columns: 1fr; }
  .note:nth-child(2) { margin-top: 0; }
  .ledger__group { grid-template-columns: 1fr; }
  .gallery { --row-h: 200px; }
  .contact__grid { grid-template-columns: 1fr 1fr; }
  .contact__cell:nth-child(odd) { padding-inline-start: 0; border: 0; }
  .contact__cell { padding-bottom: 24px; }
}

@media (max-width: 1100px) and (min-width: 861px) {
  .gallery { --row-h: 200px; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .nav { padding-block: 16px; }
  .nav__brand svg { height: 38px; }
  .nav.is-solid .nav__brand svg { height: 32px; }
  .hero { padding-top: 120px; }
  .hero__ghost { font-size: 62vw; bottom: -14vw; }
  .hero__actions { gap: 22px; }
  .hero__stats > div { padding-inline-start: 12px; }
  .hero__stats dt { font-size: 12px; }
  .ledger__rows li, html[lang="en"] .ledger__rows li { grid-template-columns: 1fr auto; column-gap: 12px; row-gap: 2px; }
  .ledger__rows li span { grid-column: 1 / -1; grid-row: 2; }
  .ledger__rows li em { grid-row: 1; grid-column: 2; }
  .filters { flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; padding-block: 4px; gap: 24px; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
  .filters::-webkit-scrollbar { display: none; }
  .filters { -webkit-mask-image: linear-gradient(to var(--end), #000 82%, transparent); mask-image: linear-gradient(to var(--end), #000 82%, transparent); }
  .filters button { flex: none; }
  .filters button::after { bottom: 0; }
  .filters button:focus-visible { outline-offset: -3px; }
  /* two 3:2 photos (the most common ratio) must fit one row: (content width - gap) / 2 / 1.5, with headroom */
  .gallery { --row-h: calc((100vw - 2 * var(--gutter) - 10px) / 3.2); gap: 10px; }
  .lightbox__nav { top: auto; bottom: 22px; transform: none; }
  .contact__actions .btn { width: 100%; }
  .contact__grid { grid-template-columns: 1fr; }
  .contact__cell, .contact__cell + .contact__cell { padding-inline: 0; border: 0; border-bottom: 1px solid var(--line-light); }
  .footer__nav { display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px; }
  .footer__meta { flex-direction: column; align-items: flex-start; }
  .facts div { grid-template-columns: 80px 1fr; }
  .facts dt { font-size: 32px; }
}

/* Arabic is never tracked: tracking breaks the letter joins */
html[lang="ar"] .intro__line,
html[lang="ar"] .chapters__label,
html[lang="ar"] .marquee__tag,
html[lang="ar"] .kicker,
html[lang="ar"] .contact__label,
html[lang="ar"] .nav__links a { letter-spacing: 0; }

/* ---------- Static mode: reduced motion or no GSAP (html:not(.motion)) ---------- */
html:not(.motion) .chapters__pin { position: relative; height: auto; padding-block: clamp(80px, 10vw, 128px); }
html:not(.motion) .chapters__bar { grid-template-columns: auto 1fr; }
html:not(.motion) .chapters__track { width: auto; flex-direction: column; padding-inline: max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter))); }
html:not(.motion) .chapter, html:not(.motion) .chapter--media { width: auto; margin: 0; padding: 56px 0; border: 0; border-bottom: 1px solid var(--line-light); display: block; }
html:not(.motion) .chapter:last-child { border: 0; }
html:not(.motion) .chapter__year { color: var(--gold); }
html:not(.motion) .chapter__img { margin-top: 28px; max-width: 520px; }
html:not(.motion) .chapter__img img { width: 100%; max-height: none; aspect-ratio: 3 / 2; }
html:not(.motion) .marquee__track { direction: inherit; overflow: visible; padding-inline: var(--gutter); }
html:not(.motion) .marquee__list { flex-wrap: wrap; width: auto; }
html:not(.motion) .marquee__list li { white-space: normal; }
html:not(.motion) .cities__track { flex-wrap: wrap; width: auto; row-gap: 8px; }

@media (prefers-reduced-motion: reduce) {
  .cities__track { animation: none !important; }
  .lightbox[open], .lightbox img { animation: none; }
  *, *::before, *::after { transition-duration: .15s !important; transition-delay: 0s !important; }
}

/* ---------- Partner logos: single-colour silhouettes, sized to equal visual weight ---------- */
.brand { display: inline-block; height: calc(var(--k, 1.24) * var(--hf) * 1em); aspect-ratio: var(--r); vertical-align: middle; background-color: currentColor; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.brand--ideal-standard { --m: url(../img/partners/ideal-standard.png); --r: 1.869; --hf: 0.700; }
.brand--roca { --m: url(../img/partners/roca.png); --r: 2.266; --hf: 0.664; }
.brand--fondital { --m: url(../img/partners/fondital.png); --r: 4.234; --hf: 0.486; }
.brand--kohler { --m: url(../img/partners/kohler.png); --r: 4.506; --hf: 0.471; }
.brand--jacob-delafon { --m: url(../img/partners/jacob-delafon.png); --r: 2.888; --hf: 0.588; }
.brand--porcelanosa { --m: url(../img/partners/porcelanosa.png); --r: 9.189; --hf: 0.330; }
.brand--gessi { --m: url(../img/partners/gessi.png); --r: 1.81; --hf: 0.700; }
.brand--flaminia { --m: url(../img/partners/flaminia.png); --r: 8.851; --hf: 0.336; }
.brand--bongio { --m: url(../img/partners/bongio.png); --r: 2.507; --hf: 0.632; }
.brand--panaria { --m: url(../img/partners/panaria.png); --r: 3.06; --hf: 0.572; }
.chapter__brands { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 34px; margin-top: 22px; font-size: clamp(30px, 2.6vw, 38px); color: rgba(246, 238, 223, .85); }
.chapter__brands li { display: flex; }
.ledger__rows .brand { --k: 2.7; font-size: 15px; margin-inline: .2em; color: var(--navy); }
.ledger__rows .brand--flaminia { --k: 2.1; }
@media (forced-colors: active) { .brand { background-color: CanvasText; } }
