/* مقتنى — قاعات. Muqtana's own tokens (MOQTNA UI/UX reference v1.1).
   No gradient fills, no glass, no heavy shadows: depth comes from light,
   layering and line. Gold is for hairlines, numerals and frames only. */
/* BRAND THEME: change brand colours and fonts HERE ONLY (muqtana-website#18).
   Every brand colour and font family on the site reads one of these tokens.
   - --deep            dark hall background, page base
   - --deep-dark       darker green: door frame inset and sill
   - --forest(-hover)  buttons and solid green blocks
   - --mint            main text on the dark halls; --mint-soft lighter mint
   - --mint-glow       soft ambient glow behind the halls
   - --mint-2/3/4      secondary text on dark (keep the ratios noted below)
   - --gold            accent: hairlines, frames, numerals (= logo copper)
   - --gold-dark / --gold-soft / --gold-text  gold on light, gold tint, small gold text
   - --cream           warm light of the diamond motif
   - --focus           focus ring and scan line green
   - --canvas / --paper / --ink / --muted / --line  light sections
   - --ar-display / --ar-body / --lat-display / --lat-body  fonts (--ar-digits
     follows --ar-display)
   Colours used with transparency also have a "-rgb" twin (three numbers, no
   commas). When you change a colour, change its -rgb twin to the same value. */
:root {
  --deep: #102f29;
  --deep-rgb: 16 47 41;
  --deep-dark: #0b231e;
  --hall-glow-rgb: 31 74 64; /* lit centre of the dark halls, a lighter --deep */
  --forest: #173e35;
  --forest-hover: #215247;
  --mint: #dcebe4;
  --mint-rgb: 220 235 228;
  --mint-soft: #eef6f1;
  --mint-glow: #e8f2ea;
  /* v29: the client logo's copper (Moqtna_v7.pdf, #BC8A61) is the accent; the
     other golds keep their OKLCH offsets from it (CHANGES-v2 row 29). */
  --gold: #bc8a61;      /* = logo. On --deep 4.8:1 (was 4.6) */
  --gold-rgb: 188 138 97;
  --gold-dark: #906442; /* on canvas 4.6:1, paper 5.1:1 (was 4.55 / 5.06) */
  --gold-soft: #f7ece2;
  --canvas: #f3f3ef;
  --paper: #ffffff;
  --ink: #172622;
  --muted: #66716d;
  --line: #e3e5df;
  /* text on the dark halls: solid colours, never low opacity (CONTRAST.md).
     Ratios on --deep, and in brackets under the torch's brightest point. */
  --mint-2: #b7c9c2;    /* secondary body      8.3:1 (7.1) */
  --mint-3: #9fb3ac;    /* captions, quiet     6.5:1 (5.6) */
  --mint-4: #8fa79f;    /* inactive, >= 24px   5.6:1 (4.8) */
  --gold-text: #d5a67d; /* gold text < 24px    6.6:1 (was 6.4) */
  --gold-text-rgb: 213 166 125;
  --cream: #f4e7d6;
  --focus: #397f70;
  --focus-rgb: 57 127 112;

  /* pass 2: Markazi Text keeps every haraka tight on its letter (Amiri lifted
     the damma to ascender height); Readex Pro reads clearer small on dark green */
  --ar-display: "Markazi Text", "Amiri", serif;
  --ar-body: "Readex Pro", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --lat-display: "Markazi Text", Georgia, serif;
  --lat-body: "Readex Pro", "IBM Plex Sans", system-ui, sans-serif;
  --ar-digits: "Markazi Digits", var(--ar-display); /* big numerals, follows --ar-display */

  /* 8px scale */
  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px; --s5: 48px; --s6: 64px; --s7: 96px; --s8: 128px;
  --gutter: clamp(24px, 6vw, 112px);
  --ease-light: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; }
html { background: var(--deep); color: var(--mint); }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0;
  font-family: var(--ar-body);
  font-size: 18px;
  line-height: 1.85;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
::selection { background: var(--gold); color: var(--deep); }
:focus-visible { outline: 1px solid var(--gold); outline-offset: 4px; }

/* ---------- ambient layers ---------- */
.torch {
  position: fixed; inset: 0; pointer-events: none; z-index: 1;
}
.torch::before {
  content: ""; position: absolute;
  width: 640px; height: 640px; margin: -320px 0 0 -320px;
  left: 0; top: 0; border-radius: 50%;
  background: var(--mint-glow); opacity: .055; filter: blur(110px);
  transform: translate3d(var(--tx, 50vw), var(--ty, 40vh), 0);
}
.grain {
  position: fixed; inset: -50%; pointer-events: none; z-index: 60; opacity: .05;
  /* v41: the same feTurbulence noise, baked to a 160px tile (320px for 2x screens).
     Safari re-filtered the live SVG over this 2x2-screen layer at every animation step,
     15-30 ms a frame. */
  background-image: url("web/grain.webp"); background-size: 160px 160px;
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain { 0%{transform:translate(0,0)} 33%{transform:translate(-3%,2%)} 66%{transform:translate(2%,-3%)} 100%{transform:translate(0,0)} }

/* ---------- cursor ---------- */
html.has-cursor, html.has-cursor a, html.has-cursor button, html.has-cursor .ex-list li { cursor: none; }
html.has-cursor input { cursor: text; }
.cursor { position: fixed; inset: 0; pointer-events: none; z-index: 80; }
.cursor i, .cursor b { position: absolute; left: 0; top: 0; border-radius: 50%; will-change: transform; }
.cursor i { width: 34px; height: 34px; margin: -17px 0 0 -17px; border: 1.5px solid rgb(var(--gold-text-rgb) / .8);
  transition: width .5s var(--ease-light), height .5s var(--ease-light), margin .5s var(--ease-light), background-color .4s, opacity .3s; }
.cursor b { width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px; background: var(--gold-text); transition: opacity .3s; }
.cursor.is-link i { width: 64px; height: 64px; margin: -32px 0 0 -32px; background: rgb(var(--gold-text-rgb) / .12); }
.cursor.is-text i, .cursor.is-text b, .cursor.is-loupe i, .cursor.is-loupe b, .cursor.is-out i, .cursor.is-out b { opacity: 0; }
body.on-paper .cursor i { border-color: var(--gold-dark); }
body.on-paper .cursor b { background: var(--gold-dark); }

/* ---------- header ---------- */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; gap: var(--s4);
  padding: var(--s3) var(--gutter);
  transition: background .6s var(--ease-light), padding .6s var(--ease-light);
}
.bar::after {
  content: ""; position: absolute; inset: auto var(--gutter) 0 var(--gutter);
  height: 1.5px; background: var(--gold); opacity: .5; transform-origin: right;
  transform: scaleX(var(--bar-line, 0)); transition: transform 1.4s var(--ease-light);
}
.bar.is-solid { background: var(--deep); padding-block: var(--s2); }
/* v36: over the entrance's sunset sky the solid band drew a hard edge across it. There the
   band clears and a soft dusk scrim keeps the nav legible, fading into the sky; the gold
   rule goes with it. diamond3d.js sets .over-sky while the sky is up behind the bar */
.bar::before {
  content: ""; position: absolute; inset: 0 0 -48px 0; z-index: -1; pointer-events: none; opacity: 0;
  background: linear-gradient(to bottom, rgba(10,13,28,.72) 0, rgba(10,13,28,.4) 55%, rgba(10,13,28,0) 100%);
  transition: opacity .8s var(--ease-light);
}
.bar.is-solid.over-sky { background-color: transparent; }
.bar.over-sky::before { opacity: 1; }
.bar.over-sky::after { opacity: 0; }
.bar::after { transition: transform 1.4s var(--ease-light), opacity .8s var(--ease-light); }
.logo-slot {
  position: relative; display: inline-flex; flex-direction: column; align-items: center;
  padding: 2px var(--s2) 4px; border: 1.5px dashed rgb(var(--gold-rgb) / .75);
}
.logo-word { font-family: var(--ar-display); font-weight: 600; font-size: 34px; line-height: 1.2; color: var(--mint); }
.logo-tag { font-size: 11px; letter-spacing: 0; white-space: nowrap; color: var(--gold-text); line-height: 1; padding-bottom: 2px; }
/* the client's own logo (img/muqtana-logo.svg), shown as supplied */
.logo-mark { display: inline-flex; flex: none; }
.logo-mark img { display: block; height: 72px; width: auto; transition: height .6s var(--ease-light); }
.bar.is-solid .logo-mark img { height: 56px; }
.bar-nav { display: flex; gap: var(--s4); margin-inline-start: var(--s4); }
.bar-nav a { font-size: 15px; color: var(--mint-2); transition: color .4s; position: relative; }
.bar-nav a:hover { color: var(--mint-soft); }
.bar-nav a::after {
  content: ""; position: absolute; inset: auto 0 -6px 0; height: 1px; background: var(--gold);
  transform: scaleX(0); transform-origin: right; transition: transform .6s var(--ease-light);
}
.bar-nav a:hover::after, .bar-nav a.is-here::after { transform: scaleX(1); }
.bar-nav a.is-here { color: var(--mint-soft); }
.verify {
  margin-inline-start: auto; display: flex; align-items: center; gap: var(--s2);
  border-bottom: 1.5px solid rgb(var(--gold-rgb) / .85); padding-bottom: 4px;
}
.verify-label { font-size: 14px; color: var(--mint-2); white-space: nowrap; }
.verify input {
  width: 128px; background: none; border: 0; color: var(--mint); font: 400 15px var(--lat-body);
  font-variant-numeric: tabular-nums; direction: ltr; text-align: right; outline: none;
}
.verify input::placeholder { color: var(--mint-3); opacity: 0; font-family: var(--ar-body); }
.verify button { background: none; border: 0; padding: 4px; cursor: pointer; }
.verify svg { width: 18px; height: 18px; fill: none; stroke: var(--gold); stroke-width: 1.8; }
.lang {
  background: none; border: 1px solid rgb(var(--mint-rgb) / .25); color: var(--mint);
  font: 400 12px var(--lat-body); padding: 6px 10px; cursor: pointer;
}

/* muqtana#91: booking icon and its form */
.book {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 4px;
  background: none; border: 0; color: var(--mint); font: 500 14px/1 var(--ar-body); cursor: pointer; white-space: nowrap;
}
.book svg { width: 22px; height: 22px; fill: none; stroke: var(--gold); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.book:hover { color: var(--mint-soft); }
/* #22: client sign-in link, same weight as the booking button */
.signin {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; min-width: 44px; padding: 0 4px;
  color: var(--mint); font: 500 14px/1 var(--ar-body); white-space: nowrap; transition: color .4s;
}
.signin svg { width: 22px; height: 22px; fill: none; stroke: var(--gold); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.signin:hover { color: var(--mint-soft); }
.booking {
  width: min(520px, calc(100vw - 32px)); max-height: calc(100svh - 32px); overflow: auto; padding: 0;
  border: 1.5px solid var(--gold); background: var(--deep); color: var(--mint);
  overscroll-behavior: contain;
}
.booking::backdrop { background: rgba(10,13,28,.7); }
/* #15: the gold cursor sits under the dialog's top layer, so the form gets the system cursor back */
html:has(.booking[open]) .cursor { display: none; }
html.has-cursor .booking { cursor: auto; }
html.has-cursor .booking button, html.has-cursor .booking label, html.has-cursor .booking input[type="radio"] { cursor: pointer; }
.booking-form { display: flex; flex-direction: column; gap: var(--s2); padding: var(--s4); font-family: var(--ar-body); }
.booking-form h2 { margin: 0; font-family: var(--ar-display); font-weight: 500; font-size: 28px; color: var(--mint-soft); }
.booking-form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--mint-2); }
.booking-form input:not([type="radio"]), .booking-form textarea {
  min-height: 44px; padding: 8px 10px; background: transparent; color: var(--mint);
  border: 1px solid rgb(var(--mint-rgb) / .3); font: 400 16px var(--ar-body);
}
.booking-form input:focus-visible, .booking-form textarea:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.booking-form fieldset { display: flex; flex-wrap: wrap; gap: var(--s3); margin: 0; padding: 0; border: 0; }
.booking-form legend { margin-bottom: 6px; font-size: 14px; color: var(--mint-2); }
.booking-form fieldset label { flex-direction: row; align-items: center; min-height: 44px; color: var(--mint); font-size: 15px; }
.booking-result { margin: 0; padding: 10px 12px; border-inline-start: 3px solid var(--gold); color: var(--mint-soft); font-size: 15px; }
.booking-trap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.booking-actions { display: flex; gap: var(--s2); margin-top: var(--s1); }
.booking-actions .btn { background: var(--mint-soft); color: var(--deep); border: 0; cursor: pointer; font-family: var(--ar-body); }
.booking-close { min-height: 52px; padding: 0 var(--s3); background: none; border: 1px solid rgb(var(--mint-rgb) / .3); color: var(--mint); cursor: pointer; font: 400 15px var(--ar-body); }

/* ---------- floor plan ---------- */
.plan { position: fixed; z-index: 40; left: var(--s4); top: 50%; transform: translateY(-50%); }
.plan ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s2); }
.plan a { display: flex; align-items: center; gap: var(--s2); flex-direction: row-reverse; }
.plan b { font-family: var(--ar-display); font-weight: 500; font-size: 22px; line-height: 1.5; color: var(--mint-3); width: 18px; text-align: center; transition: color .6s; }
.plan a:hover b, .plan a.is-here b { color: var(--gold-text); font-weight: 700; }
.plan span {
  font-size: 14px; line-height: 1.6; color: var(--mint); white-space: nowrap; opacity: 0; transform: translateX(-8px);
  transition: opacity .5s, transform .6s var(--ease-light);
}
.plan a::before { content: ""; width: 18px; height: 1px; background: var(--mint-3); transform-origin: left; transform: scaleX(.4); transition: transform .8s var(--ease-light); }
.plan a.is-here::before { transform: scaleX(1.6); background: var(--gold); }
.plan a.is-here span, .plan:hover span { opacity: 1; transform: none; }
.plan:hover a:not(.is-here) span { color: var(--mint-2); }
.plan-toggle { display: none; }
/* on the paper ground of the reading room the plan turns to ink */
.plan b, .plan span, .plan a::before { transition: color .6s, background-color .6s, opacity .5s, transform .6s var(--ease-light); }
body.on-paper .plan b { color: var(--muted); }
body.on-paper .plan span { color: var(--ink); }
/* pass 6: a rail label never reads over a passing band: it carries its own ground */
.plan span { background-color: var(--deep); padding: 0 8px; margin-inline: -8px; }
body.on-paper .plan span { background-color: var(--canvas); }
body.on-paper .plan a::before { background: var(--muted); }
body.on-paper .plan a.is-here b { color: var(--gold-dark); }
body.on-paper .plan a.is-here::before { background: var(--gold-dark); }

/* ---------- halls ---------- */
.hall { position: relative; min-height: 100vh; overflow: hidden; z-index: 2; }
.pattern { position: absolute; pointer-events: none; color: var(--gold); }
.pattern svg { width: 100%; height: 100%; display: block; }
.pattern .hl { fill: none; stroke: currentColor; stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.pattern .dots { fill: currentColor; }
/* solids fade in once the strokes have drawn, so the ornament gains weight */
.pattern .fl { fill: currentColor; stroke: none; opacity: 0; transition: opacity 2.6s var(--ease-light); }
.pattern.is-drawn .fl { opacity: .38; }
/* in flow after the pinned door, so it never runs under the plate */
.pattern-hijazi { position: relative; margin: var(--s5) var(--gutter) var(--s5) calc(var(--gutter) + 72px); height: 104px; opacity: .5; }
/* pass 6: on short screens the hall's copy and the plate run past the pinned
   frame; app.js (clearFrieze) pushes the frieze below whatever text is lowest */
.pattern-hijazi { margin-top: var(--frieze-gap, var(--s5)); }
/* pass 6: the lattice is the vitrine's own surround, in the stage's grid cell and
   the column gaps beside it, never behind the heading, the list or the notes.
   The torch mask reads local coordinates (--lmx/--lmy, set in app.js). */
.pattern-mangour {
  grid-column: 2 / 3; grid-row: 2 / 3; inset: 0 -40px -36px -40px; opacity: .34; color: var(--gold); z-index: 0;
  -webkit-mask-image: radial-gradient(circle 420px at var(--lmx, 50%) var(--lmy, 45%), #000 0, rgba(0,0,0,.4) 45%, transparent 100%);
          mask-image: radial-gradient(circle 420px at var(--lmx, 50%) var(--lmy, 45%), #000 0, rgba(0,0,0,.4) 45%, transparent 100%);
}
.pattern-mangour .hl { stroke-width: 1.2; }
.pattern-mangour .fl { opacity: .5; }
.exhibits-pin { position: relative; }
.exhibits-pin > :not(.pattern-mangour) { position: relative; z-index: 1; }

.eyebrow { display: flex; align-items: baseline; gap: var(--s2); margin: 0 0 var(--s4); font-size: 14px; color: var(--mint-2); }
.eyebrow .num { font-family: var(--ar-display); font-weight: 600; font-size: 32px; line-height: 1; color: var(--gold); }
.display {
  font-family: var(--ar-display); font-weight: 500; margin: 0;
  font-size: clamp(56px, 7.2vw, 122px); line-height: 1.12; color: var(--mint-soft);
}
/* The reveal mask needs room for tashkeel: fatha/shadda above, kasra/tanween below.
   Padding widens the mask, the negative margin keeps the line spacing unchanged. */
/* flex column: the negative margins of sibling lines add up instead of collapsing */
.display { display: flex; flex-direction: column; }
.display .line { display: block; overflow: hidden; padding-block: .34em; margin-block: -.34em; }
.display .line > span { display: inline-block; }
.lead { max-width: 30em; font-size: 19px; color: var(--mint-2); margin: var(--s4) 0 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px;
  padding: 0 var(--s4); font-size: 16px; font-weight: 500; position: relative; overflow: hidden;
  transition: color .5s var(--ease-light), border-color .5s;
}
.btn-primary { background: var(--mint-soft); color: var(--deep); }
.btn-primary::before {
  content: ""; position: absolute; inset: 0; background: var(--gold-soft);
  transform: scaleX(0); transform-origin: left; transition: transform .7s var(--ease-light);
}
.btn-primary:hover::before { transform: scaleX(1); }
.btn > * , .btn { isolation: isolate; }
.btn-primary { z-index: 0; }
.btn-primary::before { z-index: -1; }
.btn-ghost { color: var(--mint); border: 1.5px solid rgb(var(--gold-rgb) / .95); }
.btn-ghost:hover { border-color: var(--gold); }
.ctas { display: flex; gap: var(--s2); margin-top: var(--s5); flex-wrap: wrap; }

/* ---------- vitrine: one lit exhibit ---------- */
.vitrine { position: relative; margin: 0; }
.exhibit { position: absolute; overflow: hidden; background: var(--deep); }
.exhibit img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.exhibit .exhibit-img { filter: brightness(.5) saturate(.85); transform: scale(1.06); }
.exhibit .exhibit-lit {
  -webkit-mask-image: radial-gradient(circle at var(--lx, 50%) var(--ly, 45%), #000 0, rgba(0,0,0,.6) 18%, transparent 46%);
          mask-image: radial-gradient(circle at var(--lx, 50%) var(--ly, 45%), #000 0, rgba(0,0,0,.6) 18%, transparent 46%);
  filter: brightness(1.08) saturate(1.05); transform: scale(1.06);
}
/* living light (living.js): the canvas takes over once its texture is in */
.exhibit .exhibit-gl { position: absolute; inset: 0; width: 100%; height: 100%; transform: scale(1.06); opacity: 0; transition: opacity 1.2s var(--ease-light); }
.exhibit.has-gl .exhibit-gl { opacity: 1; }
.exhibit.has-gl .exhibit-img, .exhibit.has-gl .exhibit-lit { visibility: hidden; }
.sweep {
  position: absolute; top: -20%; bottom: -20%; width: 22%; left: -40%;
  background: #fff6e2; opacity: 0; filter: blur(34px); mix-blend-mode: overlay;
  transform: skewX(-16deg); pointer-events: none;
}
.plate {
  position: absolute; display: flex; flex-direction: column; gap: 2px;
  padding-top: var(--s2); border-top: 1.5px solid rgb(var(--gold-rgb) / .85);
}
.plate-no { font-family: var(--ar-display); font-weight: 500; font-size: 28px; color: var(--gold); line-height: 1.3; }
.plate-name { font-size: 15px; color: var(--mint); }
.plate-meta { font-size: 13px; color: var(--mint-3); }

/* ---------- hall 1 · entrance ---------- */
/* v31: one stone, a real 3D brilliant (diamond3d.js). The hall is tall; the stage
   sticks (clip, not hidden, so sticky still works) while the stone turns, tips
   face-up and comes forward. --dp (0..1) is its presence, written by the script. */
.hall-entrance { overflow: clip; padding: 0; }
.dia-stage {
  position: sticky; top: 0; height: 100vh; height: 100svh; margin: 0 0 -100vh; margin-bottom: -100svh; z-index: 1;
  --dp: 0; --su: 0; --sun: 255,245,230; --hor: 140,143,133;
  /* v32: the pale glow that follows the stone gives way to the sky (::before) as the sun
     sets, so warm never sits on the bare green (it went olive); the top of the hall dims
     toward dusk. --sun, --hor, --su, --dia-y written by diamond3d.js */
  background:
    radial-gradient(ellipse calc(40% + 14% * var(--su)) calc(46% + 10% * var(--su)) at var(--dia-x, 25%) var(--dia-y, 37%), rgba(var(--sun),calc(.10 * (1 - var(--su)))) 0, rgba(var(--sun),calc(.04 * (1 - var(--su)))) 34%, rgba(var(--sun),0) 72%),
    linear-gradient(to bottom, rgba(8,14,22,calc(.32 * var(--su))) 0, rgba(8,14,22,0) 40%),
    radial-gradient(ellipse 70% 60% at 50% 46%, rgb(var(--hall-glow-rgb) / calc(.35 + .4 * var(--dp))) 0, rgb(var(--deep-rgb) / 0) 72%);
}
/* v32: the sky the stone sets into. Dusk above, a corona around the stone in the sun's
   colour, the horizon warm under it, the hall's green as the land below. It arrives with
   the scroll (--su) and stays muted, so the hall still reads as the house's green */
.dia-stage::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  opacity: calc(.9 * var(--su));
  background:
    radial-gradient(circle at var(--dia-x, 25%) var(--dia-y, 37%), rgba(var(--sun),.42) 0, rgba(var(--hor),.3) 22vmin, rgba(var(--hor),.1) 48vmin, rgba(var(--hor),0) 80vmin),
    linear-gradient(to bottom, rgba(14,14,38,.82) 0, rgba(40,26,52,.5) 36%, rgba(var(--hor),.4) 66%, rgba(var(--hor),.24) 82%, rgb(var(--deep-rgb) / .5) 100%);
}
.dia-gl, .dia-still { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* #14: the still is frame 1 of the render, at the exact spot and size diamond-frames.js
   draws it at the top (centre 27.5% / 52.5%; side = 640/307 * 0.31 * min(W,H) * min(1, W/1.25H)),
   so the stone does not jump when the canvas takes over. It stays until the first draw. */
.dia-still { inset: auto; left: calc(27.5% - min(25.85%, 32.313svh)); top: 52.5%; width: min(51.7%, 64.625svh); height: auto; transform: translateY(-50%); }
.dia-stage:not(.has-gl) ~ .dia-run { height: 0; } /* nothing turns, so no run to scroll through */
.dia-stage.is-drawn .dia-still { display: none; }
.dia-line {
  position: absolute; left: 0; right: 0; bottom: 6svh; z-index: 2; margin: 0; opacity: 0; text-align: center;
  font-family: var(--ar-display); font-weight: 500; font-size: clamp(30px, 3vw, 46px); line-height: 1.6; color: var(--mint-soft);
}
.dia-stage .plate { left: calc(var(--gutter) + 72px); bottom: var(--s5); width: 300px; z-index: 3; }
.entrance-front {
  position: relative; z-index: 3; min-height: 100vh; min-height: 100svh;
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: center;
  gap: var(--s6); padding: var(--s8) var(--gutter) var(--s7);
}
.dia-run { height: 175svh; } /* the stone's own time on screen, once the copy has gone */
.entrance-copy { position: relative; z-index: 3; padding-inline-start: var(--s2); }
.scroll-cue {
  position: absolute; bottom: var(--s5); right: 50%; transform: translateX(50%);
  display: flex; flex-direction: column; align-items: center; gap: var(--s1); font-size: 13px; color: var(--mint-3); z-index: 3;
}
.scroll-cue i { width: 1px; height: 48px; background: var(--gold); transform-origin: top; animation: cue 2.8s var(--ease-light) infinite; }
@keyframes cue { 0%{transform:scaleY(0)} 50%{transform:scaleY(1);transform-origin:top} 51%{transform-origin:bottom} 100%{transform:scaleY(0);transform-origin:bottom} }

/* ---------- hall 2 · heritage ---------- */
.hall-heritage { min-height: auto; }
.heritage-pin {
  height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center; gap: var(--s7); padding: var(--s7) var(--gutter) var(--s6) calc(var(--gutter) + 72px);
}
.display-2 { font-size: clamp(52px, 5.9vw, 98px); line-height: 1.14; }
.heritage-text { max-width: 30em; margin-top: var(--s4); }
.heritage-text p { margin: 0 0 var(--s2); color: var(--mint-2); }
.accred {
  margin-top: var(--s5);
  padding: var(--s3) 0; border-top: 1.5px solid rgb(var(--gold-rgb) / .6); border-bottom: 1.5px solid rgb(var(--gold-rgb) / .6);
  max-width: 34em;
}
.accred dl { margin: 0; display: grid; gap: 6px; }
.accred dl div { display: flex; gap: var(--s2); font-size: 14px; }
.accred dt { color: var(--mint-3); min-width: 8.5em; }
.accred dd { margin: 0; color: var(--mint); }

/* the doorway keeps the photo's own proportions (1792 x 2400) */
.vitrine-heritage { height: min(66vh, 640px); aspect-ratio: 3 / 4; justify-self: center; margin-bottom: 72px; }
.vitrine-heritage::before { /* the jamb: a deep reveal in the wall, framed by one firm gold line */
  content: ""; position: absolute; inset: -16px; border: 1.5px solid rgb(var(--gold-rgb) / .95);
  box-shadow: inset 0 0 0 15px var(--deep-dark);
}
.vitrine-heritage .exhibit { inset: 0; }
.vitrine-heritage .exhibit::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 70% at 50% 100%, rgba(5,18,15,.0) 40%, rgba(5,18,15,.55) 100%); }

/* ---------- the door ---------- */
.door { position: absolute; inset: 0; perspective: 2000px; perspective-origin: 50% 42%; pointer-events: none; }
.door-leaf { position: absolute; top: 0; height: 100%; transform-style: preserve-3d; will-change: transform; }
.door-l { left: 0; width: 52.4%; transform-origin: 0 50%; }   /* carries the carved meeting stile */
.door-r { right: 0; width: 47.6%; transform-origin: 100% 50%; }
.leaf-face { position: absolute; inset: 0; background: center / 100% 100% no-repeat; backface-visibility: hidden; }
/* #24: the photo leaves load once the hall is about a screen away (.is-near, set in landing) */
.hall-heritage.is-near .door-l .leaf-face { background-image: url("web/door-l.webp"); }
.hall-heritage.is-near .door-r .leaf-face { background-image: url("web/door-r.webp"); }
/* thickness: about 6 cm of teak, turned 90 degrees back from the free edge */
.leaf-edge { position: absolute; top: 0; height: 100%; width: 16px; background: #2a1a0e url("web/door-edge.jpg") center / 100% 100%; }
.door-l .leaf-edge { left: 100%; transform-origin: 0 50%; transform: rotateY(90deg); }
.door-r .leaf-edge { right: 100%; transform-origin: 100% 50%; transform: rotateY(-90deg); }
.door-l .leaf-edge::after, .door-r .leaf-edge::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255,214,150,.18), rgba(0,0,0,.45)); }
/* the leaf darkens as it turns away from the light: opacity set per frame */
.leaf-shade { position: absolute; inset: 0; opacity: 0; backface-visibility: hidden; }
.door-l .leaf-shade { background: linear-gradient(90deg, rgba(4,12,10,.55), rgba(4,12,10,.95)); }
.door-r .leaf-shade { background: linear-gradient(270deg, rgba(4,12,10,.6), rgba(4,12,10,.98)); }
/* lamplight from the room behind, seen first through the crack */
.door-glow {
  position: absolute; inset: 0; opacity: 0;
  background: radial-gradient(38% 60% at 52.4% 46%, rgba(255,205,140,.55), rgba(255,190,120,.12) 55%, transparent 80%);
  mix-blend-mode: screen;
}
.door-dust { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; mix-blend-mode: screen; }
/* the door as a 3D model (door3d.js); the photo leaves above stay as the no-WebGL fallback */
.door-3d { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.door--3d .door-leaf { display: none; }
.door-sill { position: absolute; left: -16px; right: -16px; bottom: -16px; height: 16px; background: var(--deep-dark); border-top: 1.5px solid rgb(var(--gold-rgb) / .6); }
.vitrine-heritage .plate { right: -16px; top: calc(100% + 28px); width: 72%; }
.pattern-qatt-rule { inset: auto var(--gutter) var(--s3) calc(var(--gutter) + 72px); height: 88px; opacity: .42; } /* pass 6: clear of the side rail */

/* ---------- hall 3 · exhibits: one stage, six pieces ---------- */
.hall-exhibits { background: var(--deep); }
.exhibits-pin {
  height: 100vh; display: grid; grid-template-columns: 250px minmax(0, 1fr) 320px; grid-template-rows: auto minmax(0, 1fr);
  column-gap: var(--s6); row-gap: var(--s4); padding: 112px var(--gutter) var(--s5) calc(var(--gutter) + 72px);
}
.exhibits-head { grid-column: 1 / -1; display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s5); }
.exhibits-head .eyebrow { margin: 0 0 12px; }
.display-3 { font-size: clamp(40px, 3.8vw, 64px); line-height: 1.2; text-align: left; }
.display-3 .line { display: block; }

.ex-list { list-style: none; margin: 0; padding: 0; align-self: center; display: flex; flex-direction: column; gap: var(--s2); }
/* v40: the list answers with the piece (was .9s / 1.1s) */
.ex-list li { display: flex; align-items: baseline; gap: var(--s2); font-family: var(--ar-display); font-weight: 500; font-size: 32px; line-height: 1.4; color: var(--mint-4); transition: color .4s var(--ease-light); position: relative; cursor: pointer; }
.ex-list li b { font-weight: 600; font-size: 26px; color: var(--mint-3); width: 24px; transition: color .4s var(--ease-light); }
.ex-list li:hover { color: var(--mint-2); }
.ex-list li.is-on b { color: var(--gold-text); }
.ex-list li::after { content: ""; height: 1.5px; flex: 1; background: var(--gold); opacity: .9; transform: scaleX(0); transform-origin: right; transition: transform .55s var(--ease-light); align-self: center; }
.ex-list li.is-on { color: var(--mint-soft); }
.ex-list li.is-on::after { transform: scaleX(1); }

.ex-stage { position: relative; min-height: 0; cursor: none; perspective: 1400px; }
.ex-stage .ex-slides, .ex-stage .ex-frame { will-change: transform; }
/* the vitrine glass: one soft reflection that slides as the piece tilts */
.ex-glass {
  position: absolute; inset: -10% -30%; pointer-events: none; z-index: 2; mix-blend-mode: screen;
  background: linear-gradient(112deg, transparent 38%, rgb(var(--mint-rgb) / .07) 46%, rgb(var(--mint-rgb) / .12) 49%, rgb(var(--mint-rgb) / .05) 53%, transparent 60%);
}
.ex-stage .exhibit { inset: 0; }
.ex-slide { opacity: 0; }
.ex-slide.is-on { opacity: 1; }
.ex-stage .exhibit-lit { opacity: 0; }
.ex-stage .exhibit-lit.is-on { opacity: 1; }
.ex-frame { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.ex-frame i { position: absolute; width: 40px; height: 40px; border-color: var(--gold); border-style: solid; border-width: 0; z-index: 3; }
.ex-frame i:nth-child(1) { top: -10px; right: -10px; border-top-width: 2px; border-right-width: 2px; }
.ex-frame i:nth-child(2) { top: -10px; left: -10px; border-top-width: 2px; border-left-width: 2px; }
.ex-frame i:nth-child(3) { bottom: -10px; right: -10px; border-bottom-width: 2px; border-right-width: 2px; }
.ex-frame i:nth-child(4) { bottom: -10px; left: -10px; border-bottom-width: 2px; border-left-width: 2px; }
.loupe {
  position: absolute; left: 0; top: 0; width: 200px; height: 200px; margin: -100px 0 0 -100px; border-radius: 50%;
  border: 1px solid var(--gold); overflow: hidden; pointer-events: none; z-index: 4; opacity: 0; transform: scale(.6);
  background: var(--deep);
}
.loupe-img { position: absolute; inset: 0; background-repeat: no-repeat; }
.loupe::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; border: 1.5px solid rgb(var(--gold-rgb) / .6); }
.loupe-mark { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); font: 400 12px var(--lat-body); color: var(--gold); direction: ltr; }
.ex-count { position: absolute; top: -54px; left: 52px; margin: 0; display: flex; align-items: center; gap: var(--s2); font-family: var(--ar-display); font-weight: 600; font-size: 28px; color: var(--gold); }
.ex-count i { width: 56px; height: 1.5px; background: var(--gold); opacity: .9; }

.ex-notes { position: relative; align-self: center; height: 260px; }
.ex-note { position: absolute; inset: 0; opacity: 0; visibility: hidden; }
.ex-note.is-on { opacity: 1; visibility: visible; }
.ex-note h3 { margin: 0 0 var(--s2); font-family: var(--ar-display); font-weight: 500; font-size: 48px; line-height: 1.25; color: var(--mint-soft); }
.ex-note p { margin: 0 0 var(--s3); color: var(--mint-2); font-size: 17px; }
.ex-note dl { margin: 0; padding-top: var(--s2); border-top: 1.5px solid rgb(var(--gold-rgb) / .6); }
.ex-note dl div { display: flex; gap: var(--s2); font-size: 14px; }
.ex-note dt { color: var(--gold-text); }
.ex-note dd { margin: 0; color: var(--mint-2); }


/* ---------- hall 4 · journey: horizontal, right to left ---------- */
.hall-journey { min-height: auto; }
.jr-view { height: 100vh; position: relative; overflow: hidden; }
/* the track fades at its edges: stations arrive out of the dark, not from under the plan */
.jr-track { -webkit-mask-image: linear-gradient(90deg, transparent 0, transparent 120px, #000 300px, #000 calc(100% - 100px), transparent 100%);
            mask-image: linear-gradient(90deg, transparent 0, transparent 120px, #000 300px, #000 calc(100% - 100px), transparent 100%);
            -webkit-mask-size: 100vw 100%; mask-size: 100vw 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
            -webkit-mask-position: var(--mx, 0) 0; mask-position: var(--mx, 0) 0; }
.jr-track { position: absolute; top: 0; bottom: 0; right: 0; display: flex; align-items: stretch; padding-inline: calc(var(--gutter) + 0px) 30vw; will-change: transform; }
.jr-panel { position: relative; flex: 0 0 auto; width: 34vw; padding: calc(27vh - var(--jr-lift, 0px)) var(--s5) 0; }
.jr-intro { width: 44vw; padding-inline-start: 0; }
.jr-intro .lead { max-width: 22em; }
.jr-line { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.jr-path { fill: none; stroke: var(--gold); stroke-width: 2.2; stroke-linejoin: miter; }
.jr-path-ghost { fill: none; stroke: var(--gold); stroke-width: 1.5; opacity: .3; }
.jr-step::before {
  content: ""; position: absolute; top: calc(var(--jr-y, 70vh) - 6px); right: var(--s5); width: 11px; height: 11px;
  border: 1px solid var(--gold); background: var(--deep); transform: rotate(45deg) scale(.7); transition: background .8s var(--ease-light), transform .8s var(--ease-light);
}
.jr-step.is-lit::before { background: var(--gold); transform: rotate(45deg) scale(1.15); }
/* unlit stations: the numeral is drawn as a gold outline (stroke 4.6:1 on large text); lit, it fills.
   The variable Markazi keeps overlapping contours, so the stroke drew their seams inside the digit;
   the numerals use a static 600 instance with the overlaps merged (vendor/fonts/MarkaziText-600-digits.woff2). */
@font-face { font-family: "Markazi Digits"; font-weight: 600; font-display: block; src: url("vendor/fonts/MarkaziText-600-digits.woff2") format("woff2"); unicode-range: U+0030-0039; }
.jr-no { display: block; font-family: var(--ar-digits); font-weight: 600; font-size: 140px; line-height: 1.1; color: rgb(var(--gold-rgb) / 0); -webkit-text-stroke: 1.8px var(--gold); transition: color 1.1s var(--ease-light); }
.jr-step.is-lit .jr-no { color: var(--gold); }
.jr-step h3 { margin: var(--s3) 0 var(--s2); font-family: var(--ar-display); font-weight: 500; font-size: 48px; line-height: 1.25; color: var(--mint-soft); }
.jr-step p { margin: 0; max-width: 22em; color: var(--mint-2); }
/* pass 6: the line sits below the longest station text at any length. app.js
   measures the texts and sets --jr-y (the line) and --jr-lift (raises the
   panels when the screen is too short to fit text, line and roles) */
.jr-step .jr-role { position: absolute; top: calc(var(--jr-y, 70vh) + 28px); right: var(--s5); font-size: 14px; color: var(--gold-text); }
.jr-figure { width: 40vw; margin: 0; padding: max(116px, calc(20vh - var(--jr-lift, 0px))) var(--s4) 0; }
.jr-figure .exhibit { position: relative; height: 44vh; border: 1.5px solid rgb(var(--gold-rgb) / .68); }
.jr-figure .plate { position: absolute; top: calc(var(--jr-y, 70vh) + 20px); right: var(--s4); border-top: 0; padding-top: 0; }  /* below the line, like the station roles */
.jr-progress { position: absolute; left: var(--gutter); right: calc(var(--gutter) + 72px); bottom: var(--s5); height: 2px; background: rgb(var(--gold-rgb) / .3); }
.jr-progress i { position: absolute; inset: 0; background: var(--gold); transform-origin: right; transform: scaleX(0); }


/* ---------- hall 5 · purposes: a lit list ---------- */
.hall-purposes { padding: var(--s8) var(--gutter) var(--s8) calc(var(--gutter) + 72px); }
.pp-head { margin-bottom: var(--s6); }
.pp-body { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: var(--s7); align-items: start; }
.pp-list { list-style: none; margin: 0; padding: 0; border-top: 1.5px solid rgb(var(--gold-rgb) / .6); }
.pp-row {
  position: relative; display: grid; grid-template-columns: 48px minmax(0, 1fr) minmax(0, 1.1fr); align-items: baseline; gap: var(--s3);
  padding: var(--s4) 0 var(--s4) var(--s5); border-bottom: 1.5px solid rgb(var(--gold-rgb) / .6); cursor: default;
}
.pp-row::after { content: ""; position: absolute; right: 0; left: 0; bottom: -1px; height: 1px; background: var(--gold); transform: scaleX(0); transform-origin: right; transition: transform 1.1s var(--ease-light); }
.pp-row.is-on::after { transform: scaleX(1); }
.pp-no { font-family: var(--ar-display); font-weight: 600; font-size: 28px; color: var(--gold); }
.pp-row h3 { margin: 0; font-family: var(--ar-display); font-weight: 500; font-size: clamp(36px, 3.3vw, 54px); line-height: 1.25; color: var(--mint-4); transition: color .8s var(--ease-light), transform .9s var(--ease-light); }
.pp-row p { margin: 0; font-size: 16px; color: var(--mint-2); opacity: 0; transform: translateX(-10px); transition: opacity .8s var(--ease-light), transform .9s var(--ease-light); }
.pp-row.is-on h3 { color: var(--mint-soft); transform: translateX(-8px); }
.pp-row.is-on p { opacity: 1; transform: none; }
.pp-tick { position: absolute; left: 0; top: 50%; transform: translateY(-50%) rotate(0deg); font: 300 22px var(--lat-body); color: var(--gold-text); transition: transform .9s var(--ease-light); }
.pp-row.is-on .pp-tick { transform: translateY(-50%) rotate(45deg); }
/* pass 6: the piece travels beside the row in focus (app.js), so it is no longer
   sticky, and a little shorter (5:4) so it has room to travel along the list */
.pp-view { position: relative; will-change: transform; }
.pp-frame { position: relative; aspect-ratio: 5 / 4; overflow: hidden; border: 1.5px solid rgb(var(--gold-rgb) / .68); background: var(--deep); }
.pp-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.pp-frame img.is-on { opacity: 1; }
.pp-cap { margin: var(--s2) 0 0; display: flex; align-items: baseline; gap: var(--s2); font-size: 13px; color: var(--mint-3); }
.pp-cap-no { font-family: var(--ar-display); font-weight: 600; font-size: 28px; color: var(--gold-text); }


/* ---------- hall 6 · report: the reading room ---------- */
.hall-report { background: var(--deep); padding: 0; }
.rp-room {
  background: var(--canvas); color: var(--ink); min-height: 100vh;
  display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: var(--s7); align-items: center;
  padding: var(--s8) var(--gutter) var(--s7) calc(var(--gutter) + 72px);
  clip-path: inset(0 0 0 0);
}
.hall-report .eyebrow { color: var(--ink); opacity: 1; }
.hall-report .eyebrow .num { color: var(--gold-dark); }
.hall-report .display { color: var(--ink); }
.rp-lead { max-width: 30em; margin: var(--s4) 0 0; color: var(--ink); opacity: .85; }
.rp-keys { list-style: none; margin: var(--s5) 0 0; padding: 0; border-top: 1px solid var(--line); max-width: 30em; }
.rp-keys li { display: flex; gap: var(--s2); align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 16px; color: var(--ink); cursor: default; position: relative; transition: padding .6s var(--ease-light); }
.rp-keys li b { font-family: var(--ar-display); font-weight: 600; font-size: 24px; color: var(--gold-dark); width: 20px; }
.rp-keys li::after { content: ""; position: absolute; right: 0; left: 0; bottom: -1px; height: 1px; background: var(--ink); transform: scaleX(0); transform-origin: right; transition: transform .8s var(--ease-light); }
.rp-keys li.is-on { padding-inline-start: 8px; }
.rp-keys li.is-on::after { transform: scaleX(1); }
.rp-verify { margin-top: var(--s5); max-width: 30em; }
.rp-verify label { display: block; font-size: 14px; color: var(--muted); margin-bottom: var(--s1); }
.rp-verify-row { display: flex; gap: var(--s1); }
.rp-verify input { flex: 1; min-height: 52px; padding: 0 var(--s2); border: 1px solid var(--ink); background: var(--paper); color: var(--ink); font: 400 16px var(--lat-body); direction: ltr; text-align: right; font-variant-numeric: tabular-nums; outline: none; }
.rp-verify input:focus { border-color: var(--forest); box-shadow: 0 0 0 3px rgb(var(--focus-rgb) / .25); }
.btn-dark { background: var(--forest); color: var(--mint-soft); border: 0; cursor: pointer; font-family: var(--ar-body); }
.btn-dark:hover { background: var(--forest-hover); }

.rp-desk { position: relative; justify-self: center; width: min(100%, 560px); }
.rp-sheet-under { position: absolute; inset: 0; background: var(--paper); border: 1px solid var(--line); transform: translate(-14px, 14px) rotate(-1.2deg); }
.rp-doc { position: relative; background: var(--paper); border: 1px solid var(--line); padding: 40px 44px 28px; font-size: 14px; line-height: 1.8; color: var(--ink); }
.rp-doc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s3); }
.rp-kicker { margin: 0; font-size: 13px; color: var(--muted); }
.rp-logo { margin: 0; font-family: var(--ar-display); font-weight: 600; font-size: 40px; line-height: 1.2; color: var(--forest); }
.rp-ids { margin: 0; display: grid; gap: 2px; font-size: 12px; }
.rp-ids div, .rp-grid div { display: flex; gap: var(--s1); justify-content: space-between; }
.rp-ids dt, .rp-grid dt { color: var(--muted); }
.rp-ids dd, .rp-grid dd { margin: 0; font-variant-numeric: tabular-nums; }
.ltr { direction: ltr; unicode-bidi: isolate; font-family: var(--lat-body); }
.rp-rule { height: 1px; background: var(--ink); margin: var(--s3) 0; transform-origin: right; }
.rp-part { position: relative; padding: 10px 12px; margin: 0 -12px 6px; }
.rp-part::before { content: ""; position: absolute; inset: 0; border: 1px solid var(--gold-dark); opacity: 0; transition: opacity .5s var(--ease-light); pointer-events: none; }
.rp-part.is-on::before { opacity: 1; }
.rp-part h3 { margin: 0 0 4px; font-size: 12px; font-weight: 500; color: var(--muted); }
.rp-part p { margin: 0; min-height: 1.8em; }
.rp-grid { margin: var(--s1) 0 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--s4); row-gap: 2px; font-size: 13px; }
.rp-amount { font-family: var(--ar-display); font-weight: 600; font-size: 50px; line-height: 1.3; color: var(--forest); font-variant-numeric: tabular-nums; }
.rp-cur { font-family: var(--ar-body); font-size: 15px; color: var(--ink); }
.rp-foot { display: grid; grid-template-columns: 1fr 96px; gap: var(--s3); align-items: end; margin-top: var(--s3); padding-top: var(--s2); border-top: 1px solid var(--line); }
.rp-signs { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s2); margin-bottom: 0; }
.rp-signs div { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); }
.rp-signs i { display: block; height: 28px; border-bottom: 1px solid var(--ink); transform-origin: right; }
.rp-qr { margin: 0; padding: 6px; overflow: hidden; }
.rp-qr img { width: 84px; height: 84px; }
.rp-scan { position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--focus); opacity: 0; }
.rp-seal { position: absolute; left: 150px; bottom: 100px; width: 120px; height: 120px; pointer-events: none; opacity: .9; } /* pressed over the last signature, clear of its label */
.rp-seal svg { width: 100%; height: 100%; fill: none; stroke: var(--gold-dark); stroke-width: 1.8; }
.rp-seal text { fill: var(--gold-dark); stroke: none; font: 400 12px var(--ar-body); }
.rp-seal .seal-c { font: 600 30px var(--ar-display); }
.rp-seal .seal-s { font: 400 10px var(--ar-body); }
.rp-sample { margin: var(--s3) 0 0; font-size: 12px; color: var(--muted); text-align: center; }

/* ---------- team (#22): placeholder cards until the real team is sent ---------- */
.hall-team { min-height: auto; background: var(--deep); padding: var(--s8) var(--gutter) var(--s8) calc(var(--gutter) + 72px); }
.tm-head { max-width: 46em; margin-bottom: var(--s6); }
.tm-head .display { color: var(--mint-soft); margin: 0; }
.tm-note { margin: var(--s3) 0 0; font-size: 14px; color: var(--gold-text); }
.tm-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s4); }
.tm-card { border-top: 1.5px solid rgb(var(--gold-rgb) / .6); padding-top: var(--s3); }
.tm-photo {
  display: grid; place-items: center; width: 96px; height: 96px; margin-bottom: var(--s3);
  border: 1.5px dashed rgb(var(--gold-rgb) / .75); border-radius: 50%;
  font: 600 36px/1 var(--ar-display); color: var(--gold-text);
}
.tm-card h3 { margin: 0 0 var(--s1); font: 500 20px/1.5 var(--ar-display); color: var(--mint-3); }
.tm-role { margin: 0; font-size: 16px; color: var(--mint); }
.tm-field { margin: 4px 0 0; font-size: 14px; color: var(--mint-2); }
/* #29: a real photo from the CMS: solid frame, cropped to the circle */
.tm-photo-img { display: block; object-fit: cover; border-style: solid; background: rgb(var(--gold-rgb) / .12); }

/* ---------- hall 7 · closing: the whole gallery ---------- */
.hall-closing { background: var(--deep); }
.cl-pin { position: relative; height: 100vh; overflow: hidden; perspective: 1500px; perspective-origin: 50% 50%; }
.cl-wall {
  position: absolute; inset: 6vh 4vw; display: grid; gap: 2.2vw;
  grid-template-columns: 1fr 1.15fr 1.3fr 1.15fr 1fr; grid-template-rows: 1fr 1.25fr 1fr;
  grid-template-areas: "f1 f2 f5 f3 f4" "f6 f2 f5 f7 f4" "f6 f8 f5 f9 f9";
  transform-origin: 50% 50%; will-change: transform; transform-style: preserve-3d;
}
.cl-f { margin: 0; position: relative; overflow: hidden; border: 1.5px solid rgb(var(--gold-rgb) / .6); background: var(--deep); }
.cl-f img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.f1 { grid-area: f1; } .f2 { grid-area: f2; } .f3 { grid-area: f3; } .f4 { grid-area: f4; } .f5 { grid-area: f5; }
.f6 { grid-area: f6; } .f7 { grid-area: f7; } .f8 { grid-area: f8; } .f9 { grid-area: f9; }
.cl-veil { position: absolute; inset: 0; background: var(--deep); opacity: 0; pointer-events: none; }
.cl-copy { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; padding: 0 calc(var(--gutter) + 72px) 0 var(--gutter); z-index: 3; pointer-events: none; }
.cl-copy > * { pointer-events: auto; }
.cl-copy .display { max-width: 9em; }
.cl-lead { max-width: 26em; margin: var(--s3) 0 0; color: var(--mint-2); }
.btn-magnet { background: var(--mint-soft); color: var(--deep); min-height: 60px; padding: 0 var(--s5); font-size: 17px; position: relative; overflow: hidden; }
.btn-magnet .btn-label { position: relative; z-index: 1; transition: color .75s cubic-bezier(.65,.01,.05,.99); }
.btn-dot {
  position: absolute; left: var(--mx, 50%); top: var(--my, 50%); width: 340px; height: 340px; margin: -170px 0 0 -170px;
  border-radius: 50%; background: var(--forest); transform: scale(0); transition: transform .75s cubic-bezier(.65,.01,.05,.99);
}
.btn-magnet:hover .btn-dot { transform: scale(1); }
.btn-magnet:hover .btn-label { color: var(--mint-soft); }

.foot { position: relative; padding: var(--s7) var(--gutter) var(--s5) calc(var(--gutter) + 72px); border-top: 1.5px solid rgb(var(--gold-rgb) / .6); }
.foot-band { position: relative; height: 150px; opacity: .4; margin-bottom: var(--s5); }
.foot-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: var(--s6); align-items: start; }
.foot-en { margin: var(--s2) 0 0; font: 400 15px var(--lat-body); color: var(--mint-2); direction: ltr; text-align: right; }
.foot-dl { margin: 0; display: grid; gap: var(--s1); font-size: 14px; }
.foot-dl div { display: flex; gap: var(--s2); }
.foot-dl dt { color: var(--gold-text); min-width: 5em; }
.foot-dl dd { margin: 0; color: var(--mint-2); }.foot-nav { display: flex; flex-direction: column; gap: var(--s1); font-size: 14px; }
.foot-nav a { color: var(--mint-2); transition: color .4s; } .foot-nav a:hover { color: var(--mint-soft); }
.foot-note { margin: var(--s6) 0 0; font-size: 13px; color: var(--mint-3); max-width: 60em; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  body { font-size: 17px; }
  .bar { gap: var(--s2); padding: var(--s2) var(--s3); }
  .bar-nav, .lang, .verify-label { display: none; }
  /* muqtana#91: on phones the booking button is the calendar icon alone */
  .book-label { display: none; }
  /* #22: and the sign-in link is the person icon alone */
  .signin-label { display: none; }
  .signin { min-width: 0; flex: none; }
  .verify { min-width: 0; }
  .verify input { min-width: 0; }
  .hall-team { padding: var(--s7) var(--s3); }
  .tm-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4) var(--s3); }
  .tm-photo { width: 72px; height: 72px; font-size: 28px; }
  .tm-card h3 { font-size: 17px; }
  /* the hidden label's words show as the placeholder (muqtana#75) */
  .verify input { width: 100px; }
  .verify input::placeholder { opacity: 1; font-size: 12px; }
  .logo-word { font-size: 28px; }
  .logo-slot { padding: 0 12px 2px; }
  .logo-mark img, .bar.is-solid .logo-mark img { height: 48px; }
  /* the floor plan becomes a sheet behind a "القاعات" button */
  .plan-toggle {
    display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 0 0 2px;
    background: none; border: 0; color: var(--mint); font: 500 15px/1 var(--ar-body); cursor: pointer;
  }
  .plan-toggle i { position: relative; width: 22px; height: 10px; }
  .plan-toggle i::before, .plan-toggle i::after {
    content: ""; position: absolute; left: 0; right: 0; height: 1px; background: var(--gold);
    transition: transform .6s var(--ease-light), top .6s var(--ease-light);
  }
  .plan-toggle i::before { top: 0; }
  .plan-toggle i::after { top: 9px; }
  .plan-toggle[aria-expanded="true"] i::before { top: 4.5px; transform: rotate(45deg); }
  .plan-toggle[aria-expanded="true"] i::after { top: 4.5px; transform: rotate(-45deg); }
  .plan {
    inset: 0; left: 0; top: 0; transform: none; z-index: 45; background: var(--deep);
    padding: 112px var(--s3) var(--s5); visibility: hidden; clip-path: inset(0 0 100% 0);
    transition: clip-path .8s cubic-bezier(.65,.01,.05,.99), visibility 0s .8s;
  }
  .plan.is-open { visibility: visible; clip-path: inset(0 0 0 0); transition: clip-path .8s cubic-bezier(.65,.01,.05,.99); }
  .plan ol { gap: 0; border-top: 1.5px solid rgb(var(--gold-rgb) / .6); }
  .plan a { flex-direction: row; gap: var(--s2); padding: 12px 0; border-bottom: 1.5px solid rgb(var(--gold-rgb) / .6); }
  .plan a::before { display: none; }
  .plan b { font-size: 22px; width: 28px; color: var(--gold-text); }
  .plan span { opacity: 1; transform: none; font-family: var(--ar-display); font-weight: 500; font-size: 36px; line-height: 1.4; color: var(--mint-soft); }
  .plan a.is-here span { color: var(--gold-text); }
  .verify { margin-inline-start: auto; }
  .entrance-front { grid-template-columns: 1fr; align-items: end; padding-top: 56svh; padding-bottom: var(--s6); gap: var(--s5); }
  .dia-stage { --dia-x: 50%; }
  .dia-stage .plate { display: none; }
  .dia-still { left: calc(50% - min(44.74%, 44.74svh)); width: min(89.48%, 89.48svh); top: 28%; } /* #14: side = 0.8948 * min(W,H), centre 50% / 28% */
  .dia-line { bottom: 12svh; padding: 0 var(--s3); font-size: 28px; }
  .dia-run { height: 150svh; }
  .display { font-size: 52px; }
  .heritage-pin { height: auto; grid-template-columns: 1fr; padding: var(--s7) var(--s3); gap: var(--s6); }
  .vitrine-heritage { height: auto; width: calc(100% - 40px); max-width: 420px; order: -1; }
  .vitrine-heritage { margin-bottom: 110px; }
  .vitrine-heritage .plate { top: calc(100% + 24px); right: -20px; left: -20px; width: auto; }
  .exhibits-pin { height: auto; grid-template-columns: 1fr; padding: var(--s7) var(--s3); }
  .exhibits-head { flex-direction: column; align-items: flex-start; }
  .display-3 { text-align: right; }
  .ex-list { flex-direction: row; overflow-x: auto; gap: var(--s3); }
  .ex-list li { font-size: 20px; white-space: nowrap; }
  .ex-list li::after { display: none; }
  .ex-stage { height: 64vh; cursor: auto; margin-bottom: 48px; }
  .ex-count { top: auto; bottom: -46px; left: 0; }
  .pattern-mangour { display: none; } /* it answers to a torch; touch has none */
  .ex-notes { height: 240px; }
  .jr-view { height: auto; overflow: visible; }
  .jr-track { position: static; flex-direction: column; padding: var(--s7) var(--s3); -webkit-mask-image: none; mask-image: none; }
  .jr-panel, .jr-intro, .jr-figure { width: auto; padding: 0 0 var(--s6); }
  .jr-line, .jr-progress, .jr-step::before { display: none; }
  .jr-step .jr-role { position: static; margin-top: var(--s2); }
  .jr-figure .plate { position: relative; top: auto; right: auto; margin-top: var(--s2); }
  .jr-step > p:not(.jr-role) { min-height: 0; }
  .jr-no { font-size: 72px; color: var(--gold); }
  .hall-purposes { padding: var(--s7) var(--s3) 150px; }
  .pp-body { grid-template-columns: 1fr; }
  .pp-view { display: none; }
  .pp-row { grid-template-columns: 32px 1fr; }
  .pp-row p { grid-column: 2; opacity: 1; transform: none; }
  .rp-room { grid-template-columns: 1fr; padding: var(--s7) var(--s3); }
  .rp-doc { padding: 28px 24px 20px; }
  .rp-seal { left: 8px; bottom: 214px; width: 72px; height: 72px; } /* pass 6: pressed beside the value, clear of the QR and the signature labels */
  .rp-amount { padding-inline-end: 76px; font-size: 40px; } /* the seal's place: the value wraps before it reaches it */
  .rp-cur { white-space: nowrap; }
  .cl-wall { inset: 4vh 3vw; grid-template-columns: 1fr 1.3fr 1fr; grid-template-rows: 1fr 1.4fr 1fr; grid-template-areas: "f1 f5 f3" "f6 f5 f7" "f8 f5 f9"; }
  .f2, .f4 { display: none; }
  .cl-copy { padding: 0 var(--s3); }
  .foot { padding: var(--s6) var(--s3); }
  .foot-grid { grid-template-columns: 1fr; }
  .accred dl div { flex-direction: column; gap: 0; }
  /* pass 6: the frieze sits centred under the copy, not pushed right by the desktop rail */
  .pattern-hijazi { margin-inline: var(--s3); }
  .pattern-qatt-rule { inset: auto var(--s3) var(--s3) var(--s3); }
  /* the plan is a dark sheet here: no label grounds, and no ink on the paper hall */
  .plan span, body.on-paper .plan span { background: none; padding: 0; margin: 0; }
  body.on-paper .plan span { color: var(--mint-soft); }
  body.on-paper .plan b, body.on-paper .plan a.is-here b { color: var(--gold-text); }
  body.on-paper .plan a.is-here span { color: var(--gold-text); }
}

/* #22: with the sign-in icon the phone bar ran past the screen edge (the «القاعات» menu
   was already cut at 390 px). Under 480 px the bar packs tighter and the menu shows its
   icon alone; the word stays for screen readers. */
@media (max-width: 480px) {
  .bar { gap: var(--s1); padding-inline: var(--s2); }
  .logo-mark img, .bar.is-solid .logo-mark img { height: 40px; }
  .plan-toggle span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .plan-toggle { min-width: 30px; justify-content: center; padding: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .sweep { display: none; }
  .dia-run { height: 0; } /* the stone is drawn once, still: no run to scroll through */
}

/* the stage's pieces are already lit; the loupe is the interaction here */
.ex-stage .exhibit-img { filter: none; transform: none; }

/* v42 footer: the client's logo (same vector as the header) and Abdullah's number, call + WhatsApp */
.foot-logo { display: block; height: 88px; width: auto; }
.foot-tel { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s1) var(--s2); }
.foot-tel a { color: var(--mint-2); transition: color .4s; }
.foot-tel a:hover { color: var(--mint-soft); }
.foot-tel .foot-wa { color: var(--gold-text); border-bottom: 1px solid currentColor; }
@media (max-width: 720px) { .foot-logo { height: 64px; } }
