/* ==========================================================================
   Asr Al Ateeq — The Museum of the Thread
   Shared design system: tokens, type, chrome, components, pages
   ========================================================================== */

:root {
  --ink: #0b0907;
  --velvet: #14100c;
  --umber: #1d1712;
  --line: rgba(201, 164, 92, 0.22);
  --line-soft: rgba(239, 230, 211, 0.08);
  --gold: #c9a45c;
  --gold-hi: #e9cf95;
  --gold-lo: #8a6d38;
  --ivory: #efe6d3;
  --sand: #cdbf9f;
  --muted: #8e8270;
  --oxblood: #5c1c18;
  --serif: "Cormorant Garamond", "Didot", "Bodoni 72", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --arabic: "Amiri", "Geeza Pro", serif;
  --gutter: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(0.7, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--ivory);
  font-family: var(--serif);
  font-size: clamp(18px, 1.15vw + 10px, 21px);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
::selection { background: var(--gold); color: var(--ink); }

/* film grain + vignette over everything */
.grain {
  pointer-events: none; position: fixed; inset: 0; z-index: 90; opacity: 0.06; will-change: transform; transform: translateZ(0);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.vignette { pointer-events: none; position: fixed; inset: 0; z-index: 89; background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,0.55) 100%); }

/* ---------- type ---------- */
.mono, .label {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 400;
}
.label { color: var(--gold); }
.muted { color: var(--muted); }
.ar { font-family: var(--arabic); direction: rtl; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 300; margin: 0; line-height: 1.02; letter-spacing: -0.01em; }
.display { font-size: clamp(52px, 9.2vw, 168px); line-height: 0.92; letter-spacing: -0.025em; }
.h1 { font-size: clamp(44px, 6.4vw, 112px); line-height: 0.96; }
.h2 { font-size: clamp(36px, 4.6vw, 78px); }
.h3 { font-size: clamp(26px, 2.4vw, 38px); line-height: 1.1; }
em, .it { font-style: italic; color: var(--gold-hi); }
p { margin: 0 0 1em; }
.lede { font-size: clamp(21px, 1.6vw + 8px, 30px); line-height: 1.35; color: var(--sand); font-weight: 300; }

/* ---------- layout ---------- */
.wrap { padding-left: var(--gutter); padding-right: var(--gutter); max-width: 1680px; margin: 0 auto; }
.section { position: relative; padding: clamp(96px, 14vw, 220px) 0; }
.rule { height: 1px; background: var(--line); border: 0; margin: 0; }
.grid-12 { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(16px, 2vw, 32px); }

/* ---------- header ---------- */
.site-head {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 18px var(--gutter);
  transition: background 0.5s var(--ease-out), padding 0.5s var(--ease-out), transform 0.6s var(--ease-out);
}
.site-head.scrolled { background: rgba(11, 9, 7, 0.94); padding-top: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line-soft); }
.site-head.hide { transform: translateY(-100%); }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 38px; width: auto; }
.brand .word { display: flex; flex-direction: column; line-height: 1; }
.brand .word b { font-family: var(--serif); font-weight: 500; font-size: 19px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ivory); }
.brand .word span { font-family: var(--arabic); font-size: 15px; color: var(--gold); margin-top: 3px; }
.nav { display: flex; gap: clamp(18px, 2.6vw, 42px); align-items: center; }
.nav a { font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; position: relative; padding: 6px 0; color: var(--sand); transition: color 0.3s; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--gold); transform: scaleX(0); transform-origin: right; transition: transform 0.5s var(--ease-out); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ivory); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.nav .num { color: var(--gold); margin-right: 6px; }
.head-cta { border: 1px solid var(--line); padding: 10px 16px; border-radius: 999px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; transition: background 0.3s, color 0.3s, border-color 0.3s; }
.head-cta:hover { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.menu-btn { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; position: relative; }
.menu-btn span { position: absolute; left: 13px; right: 13px; height: 1px; background: var(--ivory); transition: transform 0.4s var(--ease-out), top 0.4s var(--ease-out); }
.menu-btn span:nth-child(1) { top: 18px; } .menu-btn span:nth-child(2) { top: 25px; }
.menu-open .menu-btn span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.menu-open .menu-btn span:nth-child(2) { top: 21px; transform: rotate(-45deg); }

.menu-panel {
  position: fixed; inset: 0; z-index: 55; background: var(--velvet);
  display: flex; flex-direction: column; justify-content: center; padding: 100px var(--gutter) 40px;
  clip-path: inset(0 0 100% 0); transition: clip-path 0.8s var(--ease);
}
.menu-open .menu-panel { clip-path: inset(0 0 0 0); }
.menu-panel a { font-size: clamp(44px, 12vw, 80px); font-weight: 300; line-height: 1.12; display: flex; align-items: baseline; gap: 14px; border-bottom: 1px solid var(--line-soft); padding: 8px 0; }
.menu-panel a .mono { color: var(--gold); }
.menu-panel .menu-foot { margin-top: 32px; color: var(--muted); }

/* ---------- preloader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 100; background: var(--ink);
  display: grid; place-items: center; transition: clip-path 1.1s var(--ease);
  clip-path: inset(0 0 0 0);
}
.loader.done { clip-path: inset(0 0 100% 0); }
.loader-inner { display: flex; flex-direction: column; align-items: center; gap: 28px; }
.loader-leaf { width: 74px; opacity: 0; transform: translateY(10px); animation: rise 1.2s var(--ease-out) 0.2s forwards; filter: drop-shadow(0 0 24px rgba(201,164,92,0.35)); }
.loader-thread { width: min(280px, 60vw); height: 1px; background: var(--line-soft); position: relative; overflow: hidden; }
.loader-thread i { position: absolute; inset: 0; background: linear-gradient(90deg, var(--gold-lo), var(--gold-hi)); transform-origin: left; transform: scaleX(0); }
.loader-meta { display: flex; justify-content: space-between; width: min(280px, 60vw); color: var(--muted); }
@keyframes rise { to { opacity: 1; transform: none; } }

/* page transition curtain */
.curtain { position: fixed; inset: 0; z-index: 95; background: var(--velvet); pointer-events: none; transform: translateY(100%); }
.curtain::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--gold); }
.curtain.in { transition: transform 0.7s var(--ease); transform: translateY(0); }
.curtain.out { transform: translateY(0); animation: curtainOut 0.9s var(--ease) 0.05s forwards; }
@keyframes curtainOut { to { transform: translateY(-100%); } }

/* ---------- custom cursor ---------- */
.cursor { position: fixed; left: 0; top: 0; z-index: 99; pointer-events: none; mix-blend-mode: normal; }
.cursor-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold-hi); position: absolute; transform: translate(-50%, -50%); }
.cursor-ring {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(233, 207, 149, 0.55); position: absolute; transform: translate(-50%, -50%);
  display: grid; place-items: center; transition: width 0.45s var(--ease-out), height 0.45s var(--ease-out), background 0.45s, border-color 0.45s;
}
.cursor-ring span { font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em; color: var(--ink); opacity: 0; transition: opacity 0.3s; }
.cursor.view .cursor-ring { width: 92px; height: 92px; background: var(--gold); border-color: var(--gold); }
.cursor.view .cursor-ring span { opacity: 1; }
.cursor.link .cursor-ring { width: 58px; height: 58px; border-color: var(--gold); }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }
@media (hover: hover) and (pointer: fine) { body.has-cursor, body.has-cursor a, body.has-cursor button { cursor: none; } }

/* ---------- reveal animations ---------- */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 1.2s var(--ease-out), transform 1.2s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }
.split .line { display: block; overflow: hidden; padding-bottom: 0.06em; }
.split .line > span { display: inline-block; transform: translateY(105%); transition: transform 1.25s var(--ease-out); }
.split.in .line > span { transform: none; }
.split .line:nth-child(2) > span { transition-delay: 0.09s; } .split .line:nth-child(3) > span { transition-delay: 0.18s; } .split .line:nth-child(4) > span { transition-delay: 0.27s; }
.mask-img { overflow: hidden; position: relative; }
.mask-img img { transform: scale(1.18); transition: transform 1.8s var(--ease-out); }
.mask-img::after { content: ""; position: absolute; inset: 0; background: var(--ink); transform-origin: top; transition: transform 1.3s var(--ease); }
.mask-img.in img { transform: scale(1); }
.mask-img.in::after { transform: scaleY(0); }

/* ---------- arch frames (the house motif) ---------- */
.arch { border-radius: 999px 999px 0 0; overflow: hidden; position: relative; }
.arch-outline { position: absolute; inset: -14px -14px 0; border: 1px solid var(--line); border-bottom: 0; border-radius: 999px 999px 0 0; pointer-events: none; }

/* ---------- placard (museum label) ---------- */
.placard { border-top: 1px solid var(--line); padding-top: 14px; display: grid; gap: 6px; }
.placard .obj { display: flex; justify-content: space-between; gap: 12px; }
.placard h4 { font-size: 24px; font-weight: 400; }
.placard p { font-size: 16px; color: var(--muted); margin: 0; line-height: 1.45; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 14px; padding: 18px 28px; border: 1px solid var(--gold); border-radius: 999px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ivory);
  position: relative; overflow: hidden; isolation: isolate; transform: translateZ(0);
  background-image: linear-gradient(var(--gold), var(--gold)); background-repeat: no-repeat; background-position: 50% 100%; background-size: 100% 0%;
  transition: color 0.45s var(--ease-out), background-size 0.5s var(--ease-out), border-color 0.45s;
}
.btn:hover, .btn:focus-visible { color: var(--ink); background-size: 100% 100%; border-color: var(--gold); }
.btn .arrow { flex: none; width: 26px; height: 1px; background: currentColor; position: relative; transition: transform 0.45s var(--ease-out); }
.btn .arrow::after { content: ""; position: absolute; right: 0; top: -3px; width: 7px; height: 7px; border-top: 1px solid currentColor; border-right: 1px solid currentColor; transform: rotate(45deg); }
.btn:hover .arrow, .btn:focus-visible .arrow { transform: translateX(6px); }
.btn.ghost { border-color: var(--line); }
.textlink { font-family: var(--mono); font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; border-bottom: 1px solid var(--gold); padding-bottom: 4px; color: var(--gold-hi); }

/* ---------- marquee ---------- */
.marquee { overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 22px 0; white-space: nowrap; }
.marquee-track { display: inline-flex; gap: 48px; animation: marquee 42s linear infinite; will-change: transform; }
.marquee-track span { font-size: clamp(30px, 3.6vw, 58px); font-weight: 300; font-style: italic; color: var(--sand); display: inline-flex; align-items: center; gap: 48px; }
.marquee-track span::after { content: ""; width: 10px; height: 10px; border: 1px solid var(--gold); transform: rotate(45deg); flex: none; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- the gold thread (scroll-drawn) ---------- */
.thread-svg { position: absolute; top: 0; left: 0; width: 100%; pointer-events: none; z-index: 0; overflow: visible; }
[data-thread] > section { position: relative; z-index: 1; }
.thread-svg path { fill: none; stroke: url(#threadGrad); stroke-width: 1.2; stroke-linecap: round; opacity: 0.6; }

/* ==========================================================================
   LANDING
   ========================================================================== */
.hero { position: relative; min-height: 100svh; display: grid; align-items: end; padding: 120px 0 clamp(28px, 4vw, 56px); overflow: hidden; }
.hero-bgword { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -54%); font-family: var(--arabic); font-size: clamp(160px, 30vw, 520px); line-height: 1; color: transparent; -webkit-text-stroke: 1px rgba(201,164,92,0.12); white-space: nowrap; pointer-events: none; user-select: none; }
.hero-grid { position: relative; z-index: 2; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(24px, 4vw, 80px); align-items: end; }
.hero-title .eyebrow { display: flex; gap: 18px; align-items: center; margin-bottom: 28px; }
.hero-title .eyebrow::before { content: ""; width: 48px; height: 1px; background: var(--gold); }
.hero-title p.lede { max-width: 30ch; margin-top: 32px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 36px; }
.hero-arch { position: relative; justify-self: end; width: min(100%, 520px); }
.hero-arch .arch { aspect-ratio: 3 / 4.1; background: var(--umber); }
.hero-arch .slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.6s var(--ease-out); }
.hero-arch .slide.on { opacity: 1; }
.hero-arch .slide img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.12); }
.hero-arch .slide.on img { animation: kenburns 7s linear forwards; }
@keyframes kenburns { from { transform: scale(1.14); } to { transform: scale(1.0); } }
.hero-arch .caption { display: flex; justify-content: space-between; margin-top: 16px; gap: 12px; }
.hero-arch .caption .label { transition: opacity 0.6s; }
.hero-meta { position: absolute; z-index: 2; top: 104px; left: var(--gutter); right: var(--gutter); display: flex; justify-content: space-between; color: var(--muted); }
.scroll-cue { display: flex; align-items: center; gap: 14px; margin-top: 56px; color: var(--muted); }
.scroll-cue i { width: 1px; height: 46px; background: var(--line); position: relative; overflow: hidden; }
.scroll-cue i::after { content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--gold-hi); animation: drip 2.2s var(--ease) infinite; }
@keyframes drip { to { top: 100%; } }

/* intro statement */
.statement { text-align: center; max-width: 1200px; margin: 0 auto; }
.statement .h2 { line-height: 1.12; }
.statement .h2 .word { opacity: 0.16; transition: opacity 0.4s; }
.statement .h2 .word.lit { opacity: 1; }
.statement .signature { margin-top: 48px; display: flex; justify-content: center; gap: 24px; align-items: center; }
.statement .signature img { height: 54px; }

/* collections — four halls */
.halls-head { display: flex; justify-content: space-between; align-items: end; gap: 32px; margin-bottom: clamp(48px, 6vw, 96px); flex-wrap: wrap; }
.halls { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(16px, 2vw, 32px); }
.hall { position: relative; display: block; }
.hall:nth-child(even) { margin-top: clamp(40px, 8vw, 140px); }
.hall .frame { aspect-ratio: 3 / 4.3; position: relative; }
.hall .frame img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease-out); }
.hall:hover .frame img { transform: scale(1.06); }
.hall .roman { position: absolute; top: 18px; left: 18px; z-index: 2; font-size: 15px; letter-spacing: 0.2em; color: var(--gold-hi); font-family: var(--mono); }
.hall .placard { margin-top: 18px; }

/* horizontal journey */
.journey { position: relative; }
.journey-pin { position: sticky; top: 0; height: 100svh; overflow: hidden; display: flex; flex-direction: column; justify-content: center; }
.journey-head { padding: 0 var(--gutter); display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 36px; }
.journey-track { display: flex; gap: clamp(20px, 2.4vw, 40px); padding: 0 var(--gutter); will-change: transform; }
.room { flex: none; width: clamp(280px, 30vw, 460px); }
.room .frame { aspect-ratio: 4 / 5; overflow: hidden; position: relative; }
.room .frame img { width: 100%; height: 100%; object-fit: cover; }
.room .step { position: absolute; left: 16px; bottom: 14px; font-size: clamp(64px, 7vw, 120px); line-height: 0.8; color: var(--ivory); font-weight: 300; text-shadow: 0 6px 40px rgba(0,0,0,0.6); }
.room .placard { margin-top: 16px; }
.room.intro { width: clamp(280px, 26vw, 400px); display: flex; flex-direction: column; justify-content: center; }
.journey-intro, .swipe-hint { display: none; }
.swipe-hint { align-items: center; justify-content: center; gap: 12px; margin: 22px var(--gutter) 0; font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); transition: opacity 0.6s var(--ease-out); }
.swipe-hint.gone { opacity: 0; }
.swipe-arrow { width: 28px; height: 1px; background: var(--gold); position: relative; animation: nudge 1.6s var(--ease) infinite; }
.swipe-arrow::after { content: ""; position: absolute; right: 0; top: -3px; width: 7px; height: 7px; border-top: 1px solid var(--gold); border-right: 1px solid var(--gold); transform: rotate(45deg); }
@keyframes nudge { 0%, 100% { transform: translateX(0); opacity: 0.5; } 50% { transform: translateX(10px); opacity: 1; } }
.journey-head > .mono { white-space: nowrap; }
.journey-intro { margin: 18px 0 0; color: var(--sand); font-size: 19px; max-width: 36ch; }
.journey-intro .textlink { margin-left: 6px; white-space: nowrap; }
@media (max-width: 860px) {
  .journey-intro { display: block; }
  .swipe-hint { display: flex; } .hint-desk { display: none; }
  .room.intro { display: none; }
  .journey-head { align-items: start; }
}
.journey-progress { margin: 36px var(--gutter) 0; height: 1px; background: var(--line-soft); position: relative; }
.journey-progress i { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; background: var(--gold); transform: scaleX(0); transform-origin: left; }

/* full-bleed parallax */
.bleed { position: relative; height: 110svh; overflow: hidden; display: grid; place-items: center; }
.bleed img.bg { position: absolute; inset: -10% 0; width: 100%; height: 120%; object-fit: cover; will-change: transform; }
.bleed::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(11,9,7,0.45) 0%, rgba(11,9,7,0.1) 70%), linear-gradient(var(--ink), transparent 18%, transparent 82%, var(--ink)), rgba(11,9,7,0.5); }
.bleed .over { position: relative; z-index: 2; text-align: center; padding: 0 var(--gutter); text-shadow: 0 2px 30px rgba(0,0,0,0.7); }
.bleed .over .ar { font-size: clamp(40px, 6vw, 96px); color: var(--gold-hi); display: block; margin-bottom: 12px; }

/* objects strip */
.objects { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(16px, 2vw, 32px); align-items: start; }
.object { position: relative; }
.object .frame { overflow: hidden; }
.object .frame img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; transition: transform 1.2s var(--ease-out); }
.object:hover .frame img { transform: scale(1.05); }
.object .placard { margin-top: 14px; }
.o1 { grid-column: 1 / span 4; } .o2 { grid-column: 6 / span 3; margin-top: clamp(80px, 12vw, 200px); } .o3 { grid-column: 10 / span 3; margin-top: clamp(30px, 4vw, 70px); }

/* numbers */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.fact { padding: 40px clamp(20px, 2.4vw, 40px) 12px; border-right: 1px solid var(--line-soft); }
.fact:first-child { padding-left: 0; }
.fact:last-child { border-right: 0; }
.fact .n { font-size: clamp(56px, 6vw, 104px); line-height: 0.9; font-weight: 300; color: var(--gold-hi); }
.fact p { margin-top: 14px; color: var(--muted); font-size: 16px; max-width: 22ch; }

/* tagline finale */
.finale { text-align: center; position: relative; overflow: hidden; }
.finale .emblem { width: clamp(120px, 14vw, 200px); margin: 0 auto 48px; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 1px var(--line), 0 0 120px rgba(201,164,92,0.18); }
.finale .display { max-width: 15ch; margin: 0 auto; }
.finale .actions { margin-top: 56px; display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--line); padding: clamp(64px, 8vw, 120px) 0 28px; position: relative; overflow: hidden; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.foot-grid img.logo { width: 150px; margin-bottom: 20px; }
.foot-grid h5 { margin: 0 0 16px; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 18px; }
.foot-grid a:hover { color: var(--gold-hi); }
.foot-big { font-size: clamp(30px, 11.5vw, 200px); line-height: 1; padding-bottom: 0.18em; font-weight: 300; letter-spacing: -0.03em; color: transparent; -webkit-text-stroke: 1px rgba(201,164,92,0.25); margin-top: 72px; white-space: nowrap; text-align: center; }
.foot-base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line-soft); color: var(--muted); }

/* ---------- socials ---------- */
.socials { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.socials a { width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; display: grid; place-items: center; color: var(--gold); transition: background 0.3s, color 0.3s, border-color 0.3s; }
.socials a:hover { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.socials svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; }
.socials svg .fill { fill: currentColor; stroke: none; }
.socials span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.socials.labeled { margin-top: 0; gap: 8px 22px; }
.socials.labeled a { width: auto; height: auto; border: 0; border-radius: 0; display: inline-flex; gap: 8px; align-items: center; color: inherit; }
.socials.labeled a:hover { background: none; color: var(--gold-hi); }
.socials.labeled span { position: static; width: auto; height: auto; overflow: visible; clip: auto; border-bottom: 1px solid var(--line); }
.socials.labeled svg { color: var(--gold); }

/* ---------- the film ---------- */
.film-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; margin-bottom: 40px; }
.film-head p { max-width: 38ch; margin: 0; }
.film-frame { position: relative; aspect-ratio: 16 / 9; background: #000; border: 1px solid var(--line); overflow: hidden; }
.film-frame .film-poster, .film-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }
.film-frame iframe { border: 0; }
.film-play { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; background: radial-gradient(ellipse at center, rgba(11,9,7,0.15), rgba(11,9,7,0.55)); border: 0; color: var(--ivory); cursor: pointer; font: inherit; }
.film-play .ring { width: clamp(72px, 8vw, 104px); aspect-ratio: 1; border: 1px solid var(--gold); border-radius: 50%; display: grid; place-items: center; transition: transform 0.5s var(--ease-out), background 0.4s; }
.film-play .ring::after { content: ""; margin-left: 6px; border-style: solid; border-width: 11px 0 11px 18px; border-color: transparent transparent transparent var(--gold); transition: border-color 0.4s; }
.film-play:hover .ring { transform: scale(1.08); background: var(--gold); }
.film-play:hover .ring::after { border-left-color: var(--ink); }
.film-play .mono { font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; }
.film-credit { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 16px; color: var(--muted); }

/* ==========================================================================
   INNER PAGE HERO
   ========================================================================== */
.page-hero { padding: clamp(150px, 18vw, 240px) 0 clamp(56px, 7vw, 110px); position: relative; }
.page-hero .crumb { display: flex; gap: 14px; align-items: center; margin-bottom: 32px; color: var(--muted); }
.page-hero .crumb .label { color: var(--gold); }
.page-hero-grid { display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: end; }
.page-hero .ar-big { font-family: var(--arabic); font-size: clamp(56px, 8vw, 140px); line-height: 1; color: transparent; -webkit-text-stroke: 1px rgba(201,164,92,0.5); }
.page-hero .lede { max-width: 40ch; margin-top: 32px; }

/* ==========================================================================
   GALLERY
   ========================================================================== */
.filters { position: sticky; top: 70px; z-index: 30; display: flex; gap: 10px; flex-wrap: wrap; padding: 16px 0; background: linear-gradient(var(--ink) 70%, transparent); }
.filter { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; padding: 11px 16px; border: 1px solid var(--line); border-radius: 999px; color: var(--sand); transition: all 0.35s var(--ease-out); display: inline-flex; gap: 8px; align-items: center; }
.filter sup { color: var(--gold); font-size: 9px; }
.filter:hover { border-color: var(--gold); color: var(--ivory); }
.filter.on { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.filter.on sup { color: var(--ink); }
.view-toggle { margin-left: auto; display: flex; gap: 6px; }

.masonry { columns: 4 300px; column-gap: clamp(16px, 1.8vw, 28px); margin-top: 24px; }
.piece { break-inside: avoid; margin: 0 0 clamp(28px, 3vw, 48px); display: block; width: 100%; text-align: left; transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out); }
.piece.hidden { display: none; }
.piece.fade { opacity: 0; transform: translateY(16px); }
.piece .frame { overflow: hidden; position: relative; background: var(--umber); }
.piece .frame img { width: 100%; height: auto; transition: transform 1.2s var(--ease-out); }
.piece:hover .frame img { transform: scale(1.05); }
.piece .frame .tag { position: absolute; top: 12px; left: 12px; background: rgba(11,9,7,0.72); backdrop-filter: blur(6px); padding: 6px 10px; border-radius: 999px; color: var(--gold-hi); }
.piece .placard { margin-top: 14px; }
.piece .placard h4 { font-size: 22px; }

.gallery-index .masonry { columns: 1; }
.gallery-index .piece { display: grid; grid-template-columns: 90px 1fr 1fr auto; gap: 24px; align-items: center; border-top: 1px solid var(--line-soft); padding: 14px 0; margin: 0; }
.gallery-index .piece .frame { width: 90px; height: 110px; }
.gallery-index .piece .frame img { height: 100%; object-fit: cover; }
.gallery-index .piece .frame .tag { display: none; }
.gallery-index .piece .placard { display: contents; }
.gallery-index .piece .placard .obj { order: 3; flex-direction: column; }
.gallery-index .piece .placard p { display: none; }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 80; background: rgba(8,6,5,0.97); display: grid; grid-template-columns: 1fr 380px; opacity: 0; pointer-events: none; transition: opacity 0.5s var(--ease-out); }
.lightbox.open { opacity: 1; pointer-events: auto; }
.lb-stage { position: relative; display: grid; place-items: center; padding: 90px 40px 40px; overflow: hidden; }
.lb-stage img { max-height: calc(100svh - 150px); width: auto; max-width: 100%; object-fit: contain; transform: scale(0.96); opacity: 0; transition: transform 0.9s var(--ease-out), opacity 0.6s; }
.lightbox.open .lb-stage img.ready { transform: none; opacity: 1; }
.lb-side { border-left: 1px solid var(--line); padding: 100px 36px 36px; display: flex; flex-direction: column; gap: 22px; overflow-y: auto; }
.lb-side h3 { font-size: 40px; font-weight: 300; }
.lb-side dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; margin: 0; font-size: 17px; }
.lb-side dt { color: var(--gold); font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; padding-top: 4px; }
.lb-side dd { margin: 0; color: var(--sand); }
.lb-nav { display: flex; gap: 10px; margin-top: auto; align-items: center; }
.lb-btn { width: 52px; height: 52px; border: 1px solid var(--line); border-radius: 50%; display: grid; place-items: center; transition: background 0.3s, border-color 0.3s; }
.lb-btn:hover { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.lb-close { position: absolute; top: 22px; right: 22px; z-index: 3; }
.lb-count { margin-left: 10px; color: var(--muted); }

/* ==========================================================================
   VISION
   ========================================================================== */
.manifesto { display: grid; grid-template-columns: 4fr 8fr; gap: clamp(24px, 4vw, 80px); }
.manifesto .sticky { position: sticky; top: 120px; align-self: start; }
.manifesto .body p { font-size: clamp(24px, 2vw + 6px, 38px); line-height: 1.3; font-weight: 300; color: var(--sand); margin-bottom: 1.1em; }
.manifesto .body p b { color: var(--ivory); font-weight: 400; }
.chapters { border-top: 1px solid var(--line); }
.chapter { display: grid; grid-template-columns: 120px 1fr 1.1fr 300px; gap: clamp(16px, 3vw, 48px); padding: clamp(32px, 4vw, 56px) 0; border-bottom: 1px solid var(--line); align-items: start; position: relative; }
.chapter .roman { font-size: clamp(48px, 5vw, 84px); line-height: 0.85; color: var(--gold); font-weight: 300; font-style: italic; }
.chapter h3 { font-size: clamp(32px, 3.4vw, 58px); }
.chapter .ar { color: var(--gold); font-size: 26px; display: block; margin-top: 10px; }
.chapter p { color: var(--sand); font-size: 19px; margin: 0; }
.chapter .thumb { aspect-ratio: 4/3; overflow: hidden; }
.chapter .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-out); filter: brightness(0.85); }
.chapter:hover .thumb img { transform: scale(1.07); filter: none; }
.chapter::before { content: ""; position: absolute; left: 0; top: -1px; height: 1px; width: 0; background: var(--gold-hi); transition: width 1.2s var(--ease-out); }
.chapter:hover::before { width: 100%; }
.split-feature { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 96px); align-items: center; }
.split-feature .pics { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.split-feature .pics .p2 { margin-top: 80px; }
.split-feature .pics img { width: 100%; aspect-ratio: 3/4; object-fit: cover; }
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); margin-top: 56px; }
.pillar { padding: 36px 32px 36px 0; border-right: 1px solid var(--line-soft); }
.pillar:last-child { border-right: 0; }
.pillar + .pillar { padding-left: 32px; }
.pillar h4 { font-size: 30px; margin: 14px 0 12px; font-weight: 400; }
.pillar p { color: var(--muted); font-size: 18px; margin: 0; }
.partners { background: var(--velvet); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.partner-list { list-style: none; margin: 40px 0 0; padding: 0; counter-reset: p; }
.partner-list li { counter-increment: p; display: grid; grid-template-columns: 70px 1fr; gap: 16px; padding: 22px 0; border-top: 1px solid var(--line-soft); font-size: 22px; }
.partner-list li::before { content: "0" counter(p); font-family: var(--mono); font-size: 12px; letter-spacing: 0.2em; color: var(--gold); padding-top: 8px; }
.partner-list li span { display: block; color: var(--muted); font-size: 17px; margin-top: 4px; }

/* ==========================================================================
   VISIT
   ========================================================================== */
.visit-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(32px, 5vw, 96px); align-items: start; }
.info-card { border: 1px solid var(--line); padding: clamp(24px, 3vw, 44px); background: linear-gradient(180deg, rgba(201,164,92,0.05), transparent 60%); position: relative; }
.info-card::before, .info-card::after { content: ""; position: absolute; width: 14px; height: 14px; border-color: var(--gold); border-style: solid; }
.info-card::before { top: -1px; left: -1px; border-width: 1px 0 0 1px; }
.info-card::after { bottom: -1px; right: -1px; border-width: 0 1px 1px 0; }
.info-row { display: grid; grid-template-columns: 130px 1fr; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line-soft); font-size: 20px; }
.info-row:last-child { border-bottom: 0; }
.info-row .label { padding-top: 6px; }
.info-row a { border-bottom: 1px solid var(--line); }
.info-row a:hover { color: var(--gold-hi); border-color: var(--gold); }
.status { display: inline-flex; align-items: center; gap: 10px; }
.status i { width: 8px; height: 8px; border-radius: 50%; background: #7fb27a; box-shadow: 0 0 0 0 rgba(127,178,122,0.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(127,178,122,0); } 100% { box-shadow: 0 0 0 0 rgba(127,178,122,0); } }
.map { position: relative; aspect-ratio: 16/10; border: 1px solid var(--line); overflow: hidden; margin-top: 28px; }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; filter: grayscale(1) invert(0.92) sepia(0.35) contrast(0.9) brightness(0.85); }
.map .pin { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -100%); pointer-events: none; }
.timeline-visit { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.timeline-visit li { display: grid; grid-template-columns: 90px 1fr auto; gap: 20px; padding: 26px 0; border-top: 1px solid var(--line-soft); align-items: baseline; }
.timeline-visit li .t { font-family: var(--mono); font-size: 12px; color: var(--gold); letter-spacing: 0.15em; }
.timeline-visit li h4 { font-size: 30px; font-weight: 400; }
.timeline-visit li p { color: var(--muted); font-size: 17px; margin: 6px 0 0; }
.form { display: grid; gap: 0; }
.field { position: relative; border-bottom: 1px solid var(--line); padding: 26px 0 10px; }
.field label { position: absolute; left: 0; top: 30px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); transition: all 0.35s var(--ease-out); pointer-events: none; }
.field input, .field textarea, .field select { width: 100%; background: transparent; border: 0; color: var(--ivory); font-family: var(--serif); font-size: 24px; padding: 6px 0; outline: none; resize: vertical; }
.field select { appearance: none; -webkit-appearance: none; cursor: pointer; }
.field select option { background: var(--velvet); color: var(--ivory); }
.field input:focus ~ label, .field input:not(:placeholder-shown) ~ label,
.field textarea:focus ~ label, .field textarea:not(:placeholder-shown) ~ label, .field.has-select label { top: 6px; color: var(--gold); font-size: 10px; }
.field::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--gold-hi); transform: scaleX(0); transform-origin: left; transition: transform 0.6s var(--ease-out); }
.field:focus-within::after { transform: scaleX(1); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.chips { display: flex; gap: 10px; flex-wrap: wrap; padding: 18px 0 8px; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-block; font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; padding: 10px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--sand); cursor: pointer; transition: all 0.3s; }
.chip input:checked + span { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.chip input:focus-visible + span { outline: 1px solid var(--gold-hi); outline-offset: 3px; }
.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 36px; flex-wrap: wrap; }
.form-ok { display: none; border: 1px solid var(--gold); padding: 28px; margin-top: 24px; }
.form-ok.show { display: block; }
.faq details { border-top: 1px solid var(--line-soft); padding: 24px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line-soft); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 24px; font-size: clamp(22px, 1.8vw, 30px); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary i { flex: none; width: 22px; height: 22px; position: relative; margin-top: 8px; }
.faq summary i::before, .faq summary i::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--gold); transition: transform 0.4s var(--ease-out); }
.faq summary i::after { transform: rotate(90deg); }
.faq details[open] summary i::after { transform: rotate(0); }
.faq details p { color: var(--sand); margin: 14px 0 0; max-width: 60ch; font-size: 19px; }
.wa-float { position: fixed; left: 20px; bottom: 20px; z-index: 50; display: flex; align-items: center; gap: 10px; background: var(--gold); color: var(--ink); padding: 14px 18px; border-radius: 999px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; box-shadow: 0 12px 40px rgba(0,0,0,0.5); transition: transform 0.4s var(--ease-out); }
.wa-float:hover { transform: translateY(-3px); }

/* always-on "Visit now" */
.visit-now { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 60; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; background: var(--gold); color: var(--ink); padding: 16px 26px; border-radius: 999px; font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; white-space: nowrap; box-shadow: 0 14px 44px rgba(0,0,0,0.55), 0 0 0 1px rgba(233,207,149,0.5) inset; transition: transform 0.45s var(--ease-out), opacity 0.35s, background 0.3s; }
.visit-now:hover { background: var(--gold-hi); transform: translateX(-50%) translateY(-3px); }
.visit-now .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 0 rgba(11,9,7,0.5); animation: visit-pulse 2.2s infinite; }
.visit-now .free { padding-left: 12px; border-left: 1px solid rgba(11,9,7,0.3); font-size: 10px; opacity: 0.75; }
.visit-now.away { opacity: 0; pointer-events: none; transform: translateX(-50%) translateY(16px); }
.menu-open .visit-now { opacity: 0; pointer-events: none; }
@keyframes visit-pulse { 0% { box-shadow: 0 0 0 0 rgba(11,9,7,0.45); } 70% { box-shadow: 0 0 0 9px rgba(11,9,7,0); } 100% { box-shadow: 0 0 0 0 rgba(11,9,7,0); } }
.lite .visit-now .dot { animation: none; }
.head-cta { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.head-cta:hover { background: var(--gold-hi); border-color: var(--gold-hi); }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1100px) {
  .halls { grid-template-columns: repeat(2, 1fr); }
  .hall:nth-child(even) { margin-top: 60px; }
  .chapter { grid-template-columns: 80px 1fr 1fr; }
  .chapter .thumb { display: none; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .lightbox { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .lb-side { border-left: 0; border-top: 1px solid var(--line); padding: 22px var(--gutter); max-height: 38svh; }
  .lb-stage { padding: 70px 16px 16px; }
  .lb-stage img { max-height: calc(62svh - 90px); }
}
@media (max-width: 860px) {
  .nav, .head-cta { display: none; }
  .menu-btn { display: block; }
  .hero { align-items: start; padding-top: 110px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-arch { justify-self: center; width: min(100%, 420px); order: -1; }
  .hero-meta { display: none; }
  .halls { gap: 16px; }
  .hall:nth-child(even) { margin-top: 40px; }
  .hall .placard p { display: none; }
  .objects { grid-template-columns: 1fr 1fr; }
  .o1 { grid-column: 1 / -1; } .o2, .o3 { grid-column: auto; margin-top: 0; }
  .facts { grid-template-columns: 1fr 1fr; }
  .fact:nth-child(2) { border-right: 0; }
  .fact:nth-child(3) { padding-left: 0; }
  .page-hero-grid { grid-template-columns: 1fr; }
  .manifesto { grid-template-columns: 1fr; }
  .manifesto .sticky { position: static; }
  .chapter { grid-template-columns: 56px 1fr; }
  .chapter p { grid-column: 2; }
  .split-feature, .visit-grid { grid-template-columns: 1fr; }
  .pillars { grid-template-columns: 1fr; }
  .pillar, .pillar + .pillar { border-right: 0; padding: 28px 0; border-bottom: 1px solid var(--line-soft); }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .info-row { grid-template-columns: 1fr; gap: 4px; }
  .timeline-visit li { grid-template-columns: 64px 1fr; }
  .timeline-visit li .label:last-child { display: none; }
  .gallery-index .piece { grid-template-columns: 70px 1fr auto; }
  .gallery-index .piece .frame { width: 70px; height: 86px; }
  .gallery-index .piece .placard .obj { display: none; }
  .filters { top: 64px; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .filter { flex: none; }
  .view-toggle { display: none; }
  .wa-float .txt { display: none; }
}
@media (max-width: 560px) {
  .brand .word b { font-size: 15px; }
  .brand img { height: 32px; }
  .halls { grid-template-columns: 1fr 1fr; }
  .hall .placard h4 { font-size: 19px; }
  .facts { grid-template-columns: 1fr; }
  .fact { border-right: 0; border-bottom: 1px solid var(--line-soft); padding: 32px 0 24px; }
  .foot-grid { grid-template-columns: 1fr; }
  .masonry { columns: 2 140px; column-gap: 12px; }
  .piece .placard p { display: none; }
  .piece .placard h4 { font-size: 18px; }
  .piece .placard .obj .muted, .hall .placard .obj .muted { display: none; }
  .piece .frame .tag { font-size: 9px; padding: 4px 8px; top: 8px; left: 8px; }
  .split-feature .pics .p2 { margin-top: 40px; }
}

/* journey falls back to a swipe row on small or reduced-motion screens */
@media (max-width: 860px), (prefers-reduced-motion: reduce) {
  .journey { height: auto !important; }
  .journey-pin { position: relative; height: auto; padding: 96px 0; }
  .journey-track { overflow-x: auto; scroll-snap-type: x mandatory; transform: none !important; padding-bottom: 12px; scrollbar-width: none; }
  .journey-track::-webkit-scrollbar { display: none; }
  .room { scroll-snap-align: start; width: 84vw; }
  .journey-progress { display: none; }
  .journey-track { scroll-padding-left: var(--gutter); }
}

/* lite mode: switched on automatically when a device can't keep up */
.lite .grain { display: none; }
.lite .hero-arch .slide.on img { animation: none; transform: none; }
.lite .marquee-track { animation-duration: 60s; }

/* screenshot mode (?still): fixed heights instead of viewport heights */
.still .hero { min-height: 900px; }
.still .bleed { height: 760px !important; }
.still .journey-pin { height: auto; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .reveal, .split .line > span, .mask-img img { opacity: 1; transform: none; }
  .mask-img::after { display: none; }
  .grain { display: none; }
}
@media (max-width: 600px) {
  .visit-now { padding: 15px 22px; font-size: 11px; }
  body:has(.wa-float) .visit-now .free { display: none; }
}
