/* Zill, Mizwala. Concept build. */
@font-face { font-family: "Archivo"; src: url(fonts/archivo-var.woff2) format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: "Archivo Fallback"; src: local("Arial"), local("Helvetica Neue"); size-adjust: 103%; ascent-override: 87%; descent-override: 21%; line-gap-override: 0%; }
@font-face { font-family: "Kufi"; src: url(fonts/kufi-arabic.woff2) format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "Kufi Fallback"; src: local("Geeza Pro"), local("Tahoma"), local("Arial"); size-adjust: 104%; ascent-override: 112%; descent-override: 52%; unicode-range: U+0600-06FF, U+FB50-FDFF, U+FE70-FEFC; }

:root {
  --lime: #EAE4D8;      /* bleached limestone, page */
  --lime-2: #E1D9C9;    /* alt band */
  --paper: #F3EFE6;     /* raised surfaces */
  --ink: #14303A;       /* shade petrol */
  --ink-2: #3D525A;     /* muted text on light */
  --line: rgba(20, 48, 58, .16);
  --line-2: rgba(20, 48, 58, .32);
  --sea: #0A7470;       /* the one accent */
  --sea-d: #075F5C;
  --on-sea: #F4F1EA;
  --on-ink: #EDE8DD;
  --on-ink-2: #A9B4B6;

  --f: "Archivo", "Archivo Fallback", "Kufi", "Kufi Fallback", system-ui, sans-serif;
  --e-out: cubic-bezier(.16, 1, .3, 1);
  --e-io: cubic-bezier(.76, 0, .24, 1);
  --e-ui: cubic-bezier(.23, 1, .32, 1);
  --t-fast: 180ms;
  --pad: clamp(20px, 4.2vw, 64px);
  --r: 2px;
  --nav-h: 64px;
}
:root:lang(ar) { --f: "Kufi", "Kufi Fallback", "Archivo", "Archivo Fallback", system-ui, sans-serif; }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body { margin: 0; background: var(--lime); color: var(--ink); font: 400 17px/1.55 var(--f); font-stretch: 100%; font-optical-sizing: auto; -webkit-font-smoothing: antialiased; overflow-x: clip; }
:lang(ar) body, body:lang(ar) { line-height: 1.85; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
::selection { background: var(--ink); color: var(--lime); }
:focus-visible { outline: 2px solid var(--sea); outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--lime); padding: 10px 14px; }
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: 1440px; margin-inline: auto; padding-inline: var(--pad); }
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[dir="rtl"] .ic { transform: scaleX(-1); }
.note { font-size: 13px; color: var(--ink-2); margin: 10px 0 0; }

/* language-conditional bits */
[data-when="ar"] { display: none; }
:root:lang(ar) [data-when="ar"] { display: revert; }
:root:lang(ar) [data-when="en"] { display: none; }
:root:lang(ar) .legal[data-when="ar"] { display: block; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 22px; border: 0; border-radius: var(--r); font-weight: 560; font-size: 15px; letter-spacing: .01em; text-decoration: none; cursor: pointer; transition: background-color var(--t-fast) var(--e-ui), transform 120ms var(--e-ui); }
:lang(ar) .btn { letter-spacing: 0; }
.btn:active { transform: scale(.97); }
.btn-sea { background: var(--sea); color: var(--on-sea); }
.btn-sea:hover { background: var(--sea-d); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn-line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn-line:hover { background: var(--lime-2); }
.btn .ic { transition: transform var(--t-fast) var(--e-ui); }
.btn:hover .ic { transform: translateX(3px); }
[dir="rtl"] .btn:hover .ic { transform: scaleX(-1) translateX(3px); }
.link-btn { background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: 14px; color: var(--ink-2); }

/* ---------- nav ---------- */
.nav { position: fixed; inset-inline: 0; top: 0; z-index: 50; height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-inline: var(--pad); transition: background-color .3s var(--e-ui), box-shadow .3s var(--e-ui); }
.nav.solid { background: rgba(234, 228, 216, .9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 1px 0 var(--line); }
.mark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.mark svg { width: 28px; height: 28px; fill: none; stroke: var(--ink); stroke-width: 1.6; }
.mark .dot { fill: var(--sea); stroke: none; }
.mark-w { font-weight: 720; font-stretch: 125%; letter-spacing: .14em; font-size: 15px; }
:lang(ar) .mark-w { letter-spacing: 0; font-size: 19px; font-weight: 700; }
.nav-links { display: none; gap: 30px; font-size: 14px; }
.nav-links a { text-decoration: none; position: relative; padding-block: 6px; }
.nav-links a::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .35s var(--e-out); }
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }
[dir="rtl"] .nav-links a::after { transform-origin: left; }
[dir="rtl"] .nav-links a:hover::after { transform-origin: right; }
.nav-end { display: flex; align-items: center; gap: 8px; }
.lang { background: transparent; border: 0; min-height: 40px; padding: 0 12px; cursor: pointer; font-size: 14px; border-radius: var(--r); box-shadow: inset 0 0 0 1px var(--line-2); transition: background-color var(--t-fast) var(--e-ui); }
.lang:hover { background: var(--lime-2); }
.lang [lang="ar"] { font-family: "Kufi", "Kufi Fallback", sans-serif; font-size: 14px; }
.nav .btn-sm { display: none; }

/* ---------- hero ---------- */
.hero { position: relative; height: 330svh; }
.stage { position: sticky; top: 0; height: 100svh; overflow: hidden; touch-action: pan-y; }
.tower { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .9s var(--e-out); }
.tower.on { opacity: 1; }
.stage::before { content: ""; position: absolute; inset-inline: 0; top: 0; height: 50svh; z-index: 1; pointer-events: none; background: linear-gradient(to bottom, rgba(234, 228, 216, .94) 0%, rgba(234, 228, 216, .82) 55%, rgba(234, 228, 216, 0) 100%); }
.stage::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 230px; z-index: 1; pointer-events: none; background: linear-gradient(to top, rgba(234, 228, 216, .9) 0%, rgba(234, 228, 216, .7) 60%, rgba(234, 228, 216, 0) 100%); }
.hero-copy, .chapters, .floors, .hero-end, .sun, .floor-tag { z-index: 2; }
.stage::before { transform-origin: top; transition: transform .8s var(--e-out); }
.hero.past-title .stage::before { transform: scaleY(.72); }
.hero.at-end .stage::before { transform: scaleY(.42); }
@media (max-width: 999px) { .hero.past-title.at-end .floors { opacity: 0; } }
@media (max-height: 700px) and (max-width: 999px) {
  .sun { bottom: 50px; gap: 6px 12px; padding-top: 8px; }
  .sun-hint { display: none; }
  .sun-time { font-size: 24px; }
  .sun-track { padding-bottom: 12px; }
  .stage::after { height: 170px; }
  .h-mega { font-size: clamp(34px, 10.4vw, 60px); }
  .hero-sub { margin-top: 12px; font-size: 14px; }
}
.poster { position: absolute; inset-inline: 0; bottom: 14svh; margin-inline: auto; height: 62svh; width: auto; transition: opacity .6s var(--e-out); }
.poster.off { opacity: 0; }

.hero-copy { position: absolute; inset-inline: var(--pad); top: calc(var(--nav-h) + 3svh); pointer-events: none; }
.kicker { margin: 0 0 14px; font-size: 13px; letter-spacing: .02em; color: var(--ink-2); max-width: 30ch; }
:lang(ar) .kicker { letter-spacing: 0; }
.h-mega { margin: 0; font-weight: 640; font-stretch: 125%; text-transform: uppercase; font-size: clamp(36px, 11vw, 176px); line-height: .9; letter-spacing: -.035em; }
.h-mega .ln { display: block; overflow: hidden; padding-block-end: .04em; }
.h-mega .ln > span { display: block; transition: transform 1.1s var(--e-out); }
:lang(ar) .h-mega { font-weight: 700; font-size: clamp(46px, 13vw, 168px); line-height: 1.22; letter-spacing: 0; }
.hero-sub { margin: 18px 0 0; max-width: 34ch; font-size: 15px; color: var(--ink-2); transition: opacity .5s var(--e-out); }
.js .h-mega .ln > span { transform: translateY(105%); }
.booted .h-mega .ln > span { transform: none; }
.booted .h-mega .ln:nth-child(2) > span { transition-delay: .08s; }
.hero.past-title .h-mega .ln > span { transform: translateY(-108%); transition-duration: .7s; transition-timing-function: var(--e-io); }
.hero.past-title .hero-sub, .hero.past-title .kicker { opacity: 0; }
.kicker { transition: opacity .5s var(--e-out); }

.chapters { list-style: none; margin: 0; padding: 0; position: absolute; inset-inline: var(--pad); top: calc(var(--nav-h) + 3svh); pointer-events: none; }
.chapters li { position: absolute; inset-inline: 0; top: 0; max-width: 66%; opacity: 0; transform: translateY(18px); transition: opacity .5s var(--e-out), transform .7s var(--e-out); }
.chapters li.on { opacity: 1; transform: none; }
.ch-n { display: block; font-stretch: 125%; font-weight: 300; font-size: 15px; color: var(--ink-2); font-variant-numeric: tabular-nums; margin-bottom: 8px; }
.chapters h2 { margin: 0 0 10px; font-weight: 620; font-stretch: 112%; font-size: clamp(24px, 6.4vw, 40px); line-height: 1.02; letter-spacing: -.02em; }
:lang(ar) .chapters h2 { letter-spacing: 0; line-height: 1.4; font-weight: 700; }
.chapters p { margin: 0; font-size: 15px; color: var(--ink-2); max-width: 34ch; }
:lang(ar) .chapters p { font-size: 14px; line-height: 1.7; }
:lang(ar) .chapters h2 { font-size: clamp(22px, 5.6vw, 40px); }

.floors { position: absolute; inset-inline-end: var(--pad); top: calc(var(--nav-h) + 3svh); display: flex; align-items: baseline; gap: 8px; font-size: 12px; color: var(--ink-2); pointer-events: none; }
.floors b { font-weight: 260; font-stretch: 125%; font-size: 30px; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1; }
.floors i { font-style: normal; font-stretch: 125%; }
.floors { opacity: 0; transition: opacity .5s var(--e-out); }
.hero.past-title .floors { opacity: 1; }
.floors > span { max-width: 8ch; line-height: 1.2; }

.hero-end { position: absolute; inset-inline-start: var(--pad); top: calc(var(--nav-h) + 3svh + 30px); display: inline-flex; align-items: center; gap: 12px; font-weight: 600; font-stretch: 112%; font-size: 20px; text-decoration: none; opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .5s var(--e-out), transform .6s var(--e-out); border-bottom: 1px solid currentColor; padding-bottom: 6px; }
.hero-end.on { opacity: 1; transform: none; pointer-events: auto; }

/* the sun instrument */
.sun { position: absolute; inset-inline: var(--pad); bottom: 54px; display: grid; grid-template-columns: auto 1fr; grid-template-areas: "read date" "track track" "hint hint"; gap: 10px 16px; align-items: center; padding-top: 12px; border-top: 1px solid var(--line-2); }
.sun-read { grid-area: read; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.sun-time { font-weight: 300; font-stretch: 125%; font-size: 30px; line-height: 1; font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.sun-meta { font-size: 11px; color: var(--ink-2); display: none; }
.sun-meta b { font-weight: 560; color: var(--ink); font-variant-numeric: tabular-nums; margin-inline-end: 10px; direction: ltr; unicode-bidi: isolate; }
.sun-date { grid-area: date; justify-self: end; display: flex; box-shadow: inset 0 0 0 1px var(--line-2); border-radius: var(--r); }
.sun-date button { background: none; border: 0; min-height: 36px; padding: 0 10px; font-size: 12px; cursor: pointer; color: var(--ink-2); border-radius: var(--r); transition: background-color var(--t-fast) var(--e-ui), color var(--t-fast) var(--e-ui); }
.sun-date button[aria-pressed="true"] { background: var(--ink); color: var(--lime); }
.sun-track { grid-area: track; position: relative; display: block; padding-bottom: 16px; }
.sun-track input { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; margin: 0; cursor: pointer; }
.sun-track input::-webkit-slider-runnable-track { height: 1px; background: var(--ink); }
.sun-track input::-moz-range-track { height: 1px; background: var(--ink); }
.sun-track input::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -11px; border-radius: 50%; background: var(--sea); border: 3px solid var(--lime); box-shadow: 0 0 0 1px var(--sea); }
.sun-track input::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--sea); border: 3px solid var(--lime); box-shadow: 0 0 0 1px var(--sea); }
.sun-ticks { position: absolute; inset-inline: 11px; bottom: 0; height: 12px; font-size: 10px; color: var(--ink-2); font-variant-numeric: tabular-nums; pointer-events: none; }
.sun-ticks i { font-style: normal; position: absolute; inset-inline-start: var(--x); transform: translateX(-50%); }
[dir="rtl"] .sun-ticks i { transform: translateX(50%); }
.sun-hint { grid-area: hint; margin: 0; font-size: 12px; color: var(--ink-2); }
.sun-hint .fine { display: none; }
@media (hover: hover) and (pointer: fine) { .sun-hint .fine { display: inline; } .sun-hint .coarse { display: none; } }

.floor-tag { position: absolute; z-index: 5; pointer-events: none; background: var(--ink); color: var(--on-ink); padding: 10px 12px; font-size: 12px; line-height: 1.4; border-radius: var(--r); white-space: nowrap; transform: translate(14px, -50%); }
[dir="rtl"] .floor-tag { transform: translate(calc(-100% - 14px), -50%); }
.floor-tag b { display: block; font-stretch: 125%; font-weight: 600; font-size: 14px; }
.floor-tag em { font-style: normal; color: var(--on-ink-2); }

/* ---------- reveals (headings and images only) ---------- */
.rv > span { display: inline-block; }
.js .rv { clip-path: inset(-12% -100vw 100% -100vw); transform: translateY(26px); transition: clip-path 1.1s var(--e-out), transform 1.1s var(--e-out); }
.js .rv.in { clip-path: inset(-12% -100vw -16% -100vw); transform: none; }
.js .ph img { clip-path: inset(100% 0 0 0); transform: scale(1.16); transition: clip-path 1.3s var(--e-io), transform 1.8s var(--e-out); }
.js .ph.in img { clip-path: inset(0); transform: none; }

/* ---------- thesis ---------- */
.thesis { padding-block: clamp(96px, 16vw, 220px) clamp(72px, 10vw, 140px); }
.thesis-p { margin: 0; font-weight: 340; font-size: clamp(25px, 3.5vw, 54px); line-height: 1.16; letter-spacing: -.018em; max-width: 24em; text-wrap: pretty; }
:lang(ar) .thesis-p { letter-spacing: 0; line-height: 1.75; font-weight: 400; font-size: clamp(22px, 2.9vw, 44px); }
.thesis-sign { margin: 28px 0 0; font-size: 13px; color: var(--ink-2); }

/* ---------- method ---------- */
.method { padding-bottom: clamp(80px, 12vw, 180px); }
.h-sec { margin: 0 0 clamp(32px, 6vw, 80px); font-weight: 300; font-stretch: 125%; font-size: clamp(15px, 1.4vw, 18px); letter-spacing: .02em; color: var(--ink-2); border-top: 1px solid var(--line-2); padding-top: 14px; }
:lang(ar) .h-sec { letter-spacing: 0; }
.step { display: grid; grid-template-columns: 1fr; gap: 22px; position: relative; margin-bottom: clamp(72px, 12vw, 180px); }
.step-n { font-weight: 160; font-stretch: 125%; font-size: clamp(96px, 26vw, 300px); line-height: .8; letter-spacing: -.05em; color: var(--ink); opacity: .14; font-variant-numeric: tabular-nums; }
.step-k { margin: 0 0 10px; font-size: 13px; color: var(--ink-2); }
.h-step { margin: 0 0 16px; font-weight: 600; font-stretch: 112%; font-size: clamp(30px, 4.2vw, 62px); line-height: 1; letter-spacing: -.025em; max-width: 14ch; }
:lang(ar) .h-step { letter-spacing: 0; line-height: 1.45; font-weight: 700; font-size: clamp(26px, 3.4vw, 50px); }
.step-text p:not(.step-k) { margin: 0; max-width: 40ch; color: var(--ink-2); }
.step-img { margin: 0; overflow: hidden; aspect-ratio: 4 / 5; background: var(--lime-2); }
.step-img img { width: 100%; height: 100%; object-fit: cover; }
.step-dwg { margin: 0; background: var(--paper); padding: clamp(18px, 3vw, 40px); }
.dwg { width: 100%; height: auto; overflow: visible; }
.dwg path, .dwg circle { fill: none; stroke: var(--ink); stroke-width: 1; vector-effect: non-scaling-stroke; }
.dwg .dwg-l path, .dwg .dwg-l circle { stroke-opacity: .45; }
.dwg .dwg-f path { stroke-width: 2.2; stroke-linecap: round; }
.dwg text { font: 500 11px var(--f); fill: var(--ink); text-anchor: middle; font-stretch: 125%; }
.dwg .dwg-h path { stroke-opacity: .35; }
.dwg .dwg-h text { font-size: 9px; fill: var(--ink-2); font-weight: 400; }
.dwg .gnomon { stroke-width: 2.2; }
.js .dwg path { stroke-dasharray: var(--len, 600); stroke-dashoffset: var(--len, 600); transition: stroke-dashoffset 1.6s var(--e-out); }
.js .dwg .dwg-d path[stroke-dasharray] { stroke-dasharray: 3 4; stroke-dashoffset: 0; }
.js .step-dwg.in .dwg path { stroke-dashoffset: 0; }

/* ---------- material ---------- */
.material { background: var(--ink); color: var(--on-ink); display: grid; grid-template-columns: 1fr; }
.mat-img { margin: 0; overflow: hidden; height: 72svh; }
.mat-img img { width: 100%; height: 100%; object-fit: cover; }
.mat-copy { padding: clamp(48px, 7vw, 110px) var(--pad); align-self: center; }
.h-big { margin: 0; font-weight: 600; font-stretch: 118%; font-size: clamp(34px, 5.2vw, 84px); line-height: .98; letter-spacing: -.03em; max-width: 15ch; text-wrap: balance; }
:lang(ar) .h-big { letter-spacing: 0; line-height: 1.4; font-weight: 700; font-size: clamp(30px, 4.2vw, 64px); }
.spec { margin: 40px 0 0; display: grid; grid-template-columns: 1fr; border-top: 1px solid rgba(237, 232, 221, .22); }
.spec div { display: grid; grid-template-columns: 7.5em 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid rgba(237, 232, 221, .22); font-size: 15px; }
.spec dt { color: var(--on-ink-2); }
.spec dd { margin: 0; }
.material .note { color: var(--on-ink-2); }

/* ---------- residences ---------- */
.res { padding-block: clamp(88px, 12vw, 180px); }
.res-head { display: grid; gap: 20px; margin-bottom: clamp(36px, 5vw, 64px); }
.res-intro { margin: 0; max-width: 42ch; color: var(--ink-2); }
.explorer { display: grid; grid-template-columns: 1fr; gap: 32px; }
.f-group { border: 0; margin: 0 0 22px; padding: 0; min-width: 0; }
.f-group legend { font-size: 13px; color: var(--ink-2); margin-bottom: 10px; padding: 0; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { min-height: 40px; padding: 0 14px; background: transparent; border: 0; border-radius: var(--r); box-shadow: inset 0 0 0 1px var(--line-2); cursor: pointer; font-size: 14px; transition: background-color var(--t-fast) var(--e-ui), color var(--t-fast) var(--e-ui); }
.seg button small { font-size: 11px; opacity: .7; font-variant-numeric: tabular-nums; margin-inline-start: 2px; }
.seg button:hover { background: var(--lime-2); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--lime); box-shadow: none; }
.summary { border-top: 1px solid var(--line-2); padding-top: 16px; }
.sum-n { margin: 0; font-size: 15px; }
.sum-n b { font-weight: 280; font-stretch: 125%; font-size: 44px; line-height: 1; font-variant-numeric: tabular-nums; margin-inline-end: 6px; }
.sum-p { margin: 6px 0 10px; font-size: 14px; color: var(--ink-2); }

.elev { display: grid; justify-items: center; align-content: start; gap: 10px; }
.elev-svg { width: auto; height: min(62svh, 520px); max-width: 100%; overflow: visible; }
.elev-svg .row-l { font: 500 6px var(--f); fill: var(--ink-2); font-variant-numeric: tabular-nums; }
.elev-svg rect.u { fill: var(--lime-2); stroke: rgba(20, 48, 58, .2); stroke-width: .4; cursor: pointer; transition: fill .2s var(--e-ui); }
.elev-svg rect.u.m { fill: var(--ink); stroke: var(--ink); }
.elev-svg rect.u.m.rsv { fill: url(#hatch); }
.elev-svg rect.u.sel { fill: var(--sea); stroke: var(--sea); }
.elev-svg rect.u:hover { fill: var(--ink-2); }
.elev-svg .ground { stroke: var(--ink); stroke-width: .8; }
.elev-cap { margin: 0; font-size: 12px; color: var(--ink-2); text-align: center; max-width: 26ch; }

.r-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-2); }
.r-item { border-bottom: 1px solid var(--line); }
.r-item button { width: 100%; display: grid; grid-template-columns: 4.2em 1fr auto; grid-template-areas: "code meta price" "code meta st"; gap: 2px 14px; align-items: center; text-align: start; background: transparent; border: 0; padding: 14px 6px; cursor: pointer; transition: background-color var(--t-fast) var(--e-ui); }
.r-item button:hover { background: var(--lime-2); }
[dir="rtl"] .r-code, [dir="rtl"] .d-code { text-align: right; }
.r-item button[aria-pressed="true"] { background: var(--paper); box-shadow: inset 3px 0 0 var(--sea); }
[dir="rtl"] .r-item button[aria-pressed="true"] { box-shadow: inset -3px 0 0 var(--sea); }
.r-code { grid-area: code; font-stretch: 125%; font-weight: 500; font-size: 18px; font-variant-numeric: tabular-nums; direction: ltr; text-align: start; }
.r-meta { grid-area: meta; font-size: 14px; color: var(--ink-2); line-height: 1.4; }
.r-meta b { color: var(--ink); font-weight: 560; }
.r-price { grid-area: price; justify-self: end; font-size: 14px; font-weight: 560; font-variant-numeric: tabular-nums; white-space: nowrap; }
.r-st { grid-area: st; justify-self: end; font-size: 12px; color: var(--ink-2); }
.r-st.rsv { text-decoration: line-through; }
.results .btn-line { margin-top: 18px; }
.r-empty { color: var(--ink-2); }

.detail { margin-top: clamp(40px, 6vw, 80px); display: grid; grid-template-columns: 1fr; gap: 36px; background: var(--paper); padding: clamp(22px, 4vw, 56px); scroll-margin-top: 80px; }
.d-k { margin: 0; font-size: 13px; color: var(--ink-2); }
.d-code { margin: 4px 0 18px; font-weight: 260; font-stretch: 125%; font-size: clamp(64px, 10vw, 140px); line-height: .9; letter-spacing: -.04em; font-variant-numeric: tabular-nums; direction: ltr; text-align: start; }
.d-spec { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; }
.d-spec div { border-top: 1px solid var(--line); padding-top: 8px; }
.d-spec dt { font-size: 12px; color: var(--ink-2); }
.d-spec dd { margin: 2px 0 0; font-weight: 560; }
.d-price { margin: 22px 0 0; font-size: 22px; font-weight: 600; font-stretch: 112%; font-variant-numeric: tabular-nums; }
.h-form { margin: 0 0 18px; font-weight: 600; font-stretch: 112%; font-size: 24px; letter-spacing: -.01em; }
:lang(ar) .h-form { letter-spacing: 0; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; color: var(--ink-2); }
.field input, .field select { min-height: 50px; padding: 0 14px; border: 0; border-radius: var(--r); background: var(--lime); box-shadow: inset 0 0 0 1px var(--line-2); font-size: 16px; width: 100%; }
.field input:focus, .field select:focus { outline: none; box-shadow: inset 0 0 0 2px var(--ink); }
.field input[aria-invalid="true"] { box-shadow: inset 0 0 0 2px #9B2C2C; }
[dir="rtl"] .field input[dir="ltr"] { text-align: right; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; margin: 6px 0 16px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--ink); flex: none; }
.f-err { min-height: 1.2em; margin: 0 0 10px; font-size: 13px; color: #9B2C2C; }
.f-ok { margin-top: 18px; display: flex; gap: 12px; align-items: flex-start; padding: 16px; background: var(--lime); box-shadow: inset 0 0 0 1px var(--line-2); }
.f-ok .ic { color: var(--sea); margin-top: 3px; }
.f-ok p { margin: 0; font-size: 15px; }

/* ---------- governance ---------- */
.gov { background: var(--lime-2); padding-block: clamp(88px, 12vw, 170px); }
.gov-grid { display: grid; grid-template-columns: 1fr; gap: 40px; }
.gov-head p { margin: 20px 0 0; max-width: 40ch; color: var(--ink-2); }
.gov-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; counter-reset: g; }
.gov-list li { border-top: 1px solid var(--line-2); padding: 18px 0 26px; counter-increment: g; display: grid; grid-template-columns: 2.6em 1fr; }
.gov-list li::before { content: counter(g, decimal-leading-zero); font-stretch: 125%; font-size: 13px; color: var(--ink-2); padding-top: 4px; }
.gov-list h3 { margin: 0 0 6px; font-size: 19px; font-weight: 600; font-stretch: 108%; grid-column: 2; }
.gov-list p { margin: 0; color: var(--ink-2); grid-column: 2; max-width: 40ch; }
.org { grid-column: 1 / -1; padding-top: 8px; }
.org-k { margin: 0 0 14px; font-size: 13px; color: var(--ink-2); }
.org-top, .org-row div { padding: 14px 16px; background: var(--lime); box-shadow: inset 0 0 0 1px var(--line-2); font-size: 15px; font-weight: 520; }
.org-top { max-width: 320px; margin-inline: auto; text-align: center; position: relative; }
.org-row { margin-top: 36px; display: grid; grid-template-columns: 1fr; gap: 10px; position: relative; text-align: center; }
.org-row::before { content: ""; position: absolute; inset-inline-start: 50%; top: -36px; height: 36px; width: 1px; background: var(--line-2); }

/* ---------- pull ---------- */
.pull { padding-block: clamp(110px, 16vw, 240px); }
.pull-q { margin: 0; }
.pull-q p { margin: 0; font-weight: 250; font-stretch: 125%; font-size: clamp(38px, 7.4vw, 124px); line-height: .98; letter-spacing: -.04em; max-width: 13ch; }
:lang(ar) .pull-q p { letter-spacing: 0; line-height: 1.5; font-weight: 400; font-size: clamp(34px, 5.6vw, 92px); }
.pull-s { margin: 26px 0 0; font-size: 13px; color: var(--ink-2); }

/* ---------- contact ---------- */
.contact { padding-bottom: clamp(96px, 14vw, 200px); }
.contact-grid { display: grid; grid-template-columns: 1fr; gap: 32px; border-top: 1px solid var(--line-2); padding-top: clamp(28px, 4vw, 48px); }
.contact-body > p { margin: 0 0 24px; max-width: 42ch; color: var(--ink-2); }
.c-lines { list-style: none; margin: 0 0 32px; padding: 0; }
.c-lines li { display: grid; grid-template-columns: 7.5em 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
.c-lines span { color: var(--ink-2); font-size: 14px; }
.c-lines a { text-decoration: none; justify-self: start; }
.c-lines a:hover { text-decoration: underline; text-underline-offset: 3px; }
.c-lines em { font-style: normal; }

/* ---------- footer ---------- */
.foot { background: var(--ink); color: var(--on-ink); padding: clamp(48px, 6vw, 80px) 0 90px; overflow: hidden; }
.foot-word { margin: 0 0 clamp(28px, 4vw, 56px); font-weight: 760; font-stretch: 125%; font-size: 33vw; line-height: .76; letter-spacing: -.03em; color: var(--on-ink); }
.foot-word [lang="ar"] { font-family: "Kufi", "Kufi Fallback", sans-serif; font-size: .8em; line-height: 1.1; letter-spacing: 0; font-weight: 800; }
.foot-grid { display: grid; grid-template-columns: 1fr; gap: 18px; font-size: 14px; color: var(--on-ink-2); }
.foot-grid p { margin: 0; }
.foot-grid nav { display: flex; flex-wrap: wrap; gap: 18px; }
.foot-grid nav a { color: var(--on-ink); text-decoration: none; }
.foot-grid nav a:hover { text-decoration: underline; }
.legal { color: var(--on-ink); }
.credits { max-width: 70ch; }

/* concept badge */
.concept-badge { position: fixed; left: 12px; bottom: 12px; z-index: 60; display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: var(--r); background: var(--ink); color: var(--lime); font: 500 12px/1.2 "Archivo", "Archivo Fallback", sans-serif; text-decoration: none; box-shadow: 0 8px 24px -12px rgba(20, 48, 58, .6); direction: ltr; transition: transform var(--t-fast); }
.concept-badge:hover { transform: translateY(-1px); }

/* ---------- larger screens ---------- */
@media (min-width: 760px) {
  .nav .btn-sm { display: inline-flex; }
  .sun-meta { display: inline; }
  .spec { grid-template-columns: 1fr 1fr; column-gap: 32px; }
  .gov-list { grid-template-columns: 1fr 1fr; column-gap: 40px; }
  .org-row { grid-template-columns: repeat(3, 1fr); }
  .org-row::after { content: ""; position: absolute; inset-inline: 16.66%; top: -18px; height: 1px; background: var(--line-2); }
  .org-row::before { top: -36px; height: 18px; }
  .org-row div { position: relative; }
  .org-row div::before { content: ""; position: absolute; inset-inline-start: 50%; top: -18px; height: 18px; width: 1px; background: var(--line-2); }
  .detail { grid-template-columns: 1fr 1fr; }
  .foot-grid { grid-template-columns: 1fr auto; }
  .foot-grid .legal, .foot-grid .credits, .foot-grid .copy { grid-column: 1 / -1; }
  .chapters li { max-width: 56%; }
}

@media (min-width: 1000px) {
  :root { --nav-h: 76px; }
  .nav-links { display: flex; }
  .hero { height: 360svh; }
  .hero-copy { top: auto; bottom: 200px; max-width: 54vw; }
  .h-mega { font-size: clamp(64px, 8.6vw, 170px); }
  :lang(ar) .h-mega { font-size: clamp(64px, 8vw, 150px); }
  .chapters { top: auto; bottom: 168px; width: min(460px, 34vw); inset-inline-end: auto; }
  .chapters li { top: auto; bottom: 0; max-width: none; }
  .chapters h2 { font-size: clamp(30px, 2.7vw, 44px); }
  .floors { top: calc(var(--nav-h) + 40px); }
  .floors b { font-size: 72px; }
  .sun { bottom: 28px; inset-inline-start: calc(var(--pad) + 280px); grid-template-columns: auto 1fr auto; grid-template-areas: "read track date" "hint hint hint"; column-gap: 32px; }
  .sun-time { font-size: 40px; }
  [dir="rtl"] .sun { inset-inline-start: var(--pad); inset-inline-end: calc(var(--pad) + 280px); }
  .hero-end { top: auto; bottom: 200px; }
  .stage::before { height: 30svh; background: linear-gradient(to bottom, rgba(234, 228, 216, .7), rgba(234, 228, 216, 0)); }
  .stage::after { height: 160px; }
  .poster { bottom: 10svh; inset-inline-start: 30vw; }

  .step { grid-template-columns: repeat(12, 1fr); column-gap: 24px; align-items: end; }
  .step-n { position: absolute; top: -.32em; z-index: 0; pointer-events: none; }
  .step-a { margin-top: clamp(60px, 8vw, 140px); }
  .step-a .step-n { inset-inline-start: var(--pad); }
  .step-a .step-text { grid-column: 1 / span 5; grid-row: 1; padding-bottom: 40px; position: relative; }
  .step-a .step-img { grid-column: 7 / -1; grid-row: 1; aspect-ratio: 5 / 6; }
  .step-b .step-n { inset-inline-end: var(--pad); }
  .step-b .step-dwg { grid-column: 1 / span 6; grid-row: 1; }
  .step-b .step-text { grid-column: 8 / -1; grid-row: 1; position: relative; }
  .step-c .step-n { inset-inline-start: calc(var(--pad) + 8%); }
  .step-c .step-text { grid-column: 2 / span 5; grid-row: 1; position: relative; padding-bottom: 20px; }
  .step-c .step-dwg { grid-column: 8 / span 4; grid-row: 1; margin-top: 60px; }

  .material { grid-template-columns: 7fr 5fr; min-height: 100svh; }
  .mat-img { height: auto; min-height: 100%; }
  .spec { grid-template-columns: 1fr; }

  .res-head { grid-template-columns: 7fr 5fr; align-items: end; }
  .explorer { grid-template-columns: 4fr 2fr 6fr; gap: 40px; align-items: start; }
  .filters { position: sticky; top: calc(var(--nav-h) + 24px); }
  .elev { position: sticky; top: calc(var(--nav-h) + 24px); }

  .gov-grid { grid-template-columns: 5fr 7fr; column-gap: 64px; }
  .contact-grid { grid-template-columns: 6fr 6fr; column-gap: 64px; }
}

@media (max-width: 759px) {
  .explorer .elev { order: 1; }
  .explorer .filters { order: 0; }
  .explorer .results { order: 2; }
  .elev-svg { height: 360px; }
  .r-item button { grid-template-columns: 3.8em 1fr; grid-template-areas: "code meta" "code price" "code st"; }
  .r-price, .r-st { justify-self: start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  .js .rv, .js .ph img { clip-path: none; transform: none; }
  .js .dwg path { stroke-dashoffset: 0; }
  .js .h-mega .ln > span { transform: none; }
  .hero { height: auto; }
  .stage { position: relative; height: 100svh; min-height: 640px; }
  .chapters, .floors, .hero-end { display: none; }
}
[dir="rtl"] .legal[lang="en"] { text-align: right; }
