/* ── RESET & BASE ── */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #000000;
  --fg: #f2efe9;
  --muted: rgba(255, 255, 255, 0.75);
  --faint: rgba(255, 255, 255, 0.55);
  --accent: #d6c6a8;           /* muted sand */
  --rule: rgba(255, 255, 255, 0.14);
  --serif: 'Instrument Serif', Georgia, serif;
  --sans: 'Barlow', sans-serif;
  --brand: 'Karla', sans-serif;
  --arabic: 'Amiri', serif;
  --pad: clamp(16px, 4vw, 56px);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(1rem, 0.9rem + 0.4vw, 1.1rem);
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: inherit; }
em { font-style: italic; }
.ar { font-family: var(--arabic); font-size: 0.9em; opacity: 0.5; margin-inline-start: 0.4em; }
.dot { color: var(--accent); }

/* ── LIQUID GLASS (subtle + strong) ── */
.liquid-glass {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.01);
  background-blend-mode: luminosity;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1);
}
.liquid-glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.4px;
  background: linear-gradient(180deg,
    rgba(255,255,255,0.45) 0%, rgba(255,255,255,0.15) 20%,
    rgba(255,255,255,0) 40%, rgba(255,255,255,0) 60%,
    rgba(255,255,255,0.15) 80%, rgba(255,255,255,0.45) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.liquid-glass-strong {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.01);
  background-blend-mode: luminosity;
  backdrop-filter: blur(50px);
  -webkit-backdrop-filter: blur(50px);
  box-shadow: 4px 4px 4px rgba(0,0,0,0.05), inset 0 1px 1px rgba(255,255,255,0.15);
}
.liquid-glass-strong::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.4px;
  background: linear-gradient(180deg,
    rgba(255,255,255,0.5) 0%, rgba(255,255,255,0.2) 20%,
    rgba(255,255,255,0) 40%, rgba(255,255,255,0) 60%,
    rgba(255,255,255,0.2) 80%, rgba(255,255,255,0.5) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* ── ATMOSPHERE ── */
#bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(640px 420px at 72% 16%, rgba(214,198,168,0.08), transparent 65%),
    radial-gradient(900px 600px at 18% 85%, rgba(255,255,255,0.05), transparent 65%),
    #000;
}
/* scroll-scrubbed background video (bottom layer) */
#bg video {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
}
/* scrim over the video so text keeps contrast at any frame */
#bg::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg,
    rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.35) 30%,
    rgba(0,0,0,0.45) 70%, rgba(0,0,0,0.75) 100%);
}
#bg::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background-image:
    linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask: radial-gradient(1100px 700px at 50% 32%, #000 30%, transparent 78%);
  mask: radial-gradient(1100px 700px at 50% 32%, #000 30%, transparent 78%);
}
@media (prefers-reduced-motion: reduce) {
  #bg video { display: none; }
}

/* ── FIXED CHROME — MTGRP difference-blend identity ── */
#chrome a {
  position: fixed;
  top: 18px;
  z-index: 50;
  font-family: var(--brand);
  font-weight: 800;
  text-decoration: none;
  color: white;
  mix-blend-mode: difference;
  letter-spacing: -0.01em;
}
#chrome-mtgrp { left: var(--pad); font-size: 1.05rem; }
#chrome-mtgrp span { font-weight: 400; font-family: var(--serif); font-style: italic; font-size: 0.85rem; opacity: 0.7; }
#chrome-contact { right: var(--pad); font-size: 1.05rem; transition: opacity 0.15s; }
#chrome-contact:hover { opacity: 0.6; }

/* ── GLASS NAV ── */
#glass-nav {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 49;
  display: flex;
  align-items: center;
  gap: 2px;
  border-radius: 999px;
  padding: 6px;
}
#glass-nav a {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 999px;
  transition: background 0.2s;
}
#glass-nav a:hover { background: rgba(255,255,255,0.08); }
#glass-nav .nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  color: #000000;
  font-weight: 600;
  padding: 8px 14px;
}
#glass-nav .nav-cta:hover { background: rgba(255,255,255,0.85); }
@media (max-width: 900px) { #glass-nav { display: none; } }

#progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
  z-index: 60;
}

/* ── BUTTONS ── */
.btn-solid {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  color: #000000;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  border-radius: 999px;
  padding: 12px 22px;
  transition: background 0.2s, transform 0.2s;
}
.btn-solid:hover { background: rgba(255,255,255,0.85); transform: translateY(-1px); }
.btn-big { font-size: clamp(0.95rem, 0.85rem + 0.6vw, 1.2rem); padding: 15px 30px; }
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--fg);
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.92rem;
  text-decoration: none;
  padding: 12px 6px;
  opacity: 0.9;
  transition: opacity 0.2s;
}
.btn-ghost:hover { opacity: 0.6; }

/* ── SECTION LABEL ── */
.section-label {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--muted);
  border-top: 1px solid var(--rule);
  padding-top: 12px;
  margin-bottom: clamp(28px, 5vh, 56px);
}

/* ── 01 HERO ── */
#hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 96px var(--pad) 24px;
  text-align: center;
}
.hero-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 1200px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 999px;
  padding: 7px 16px 7px 7px;
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--muted);
}
.badge-new {
  background: #ffffff;
  color: #000000;
  font-weight: 600;
  font-size: 0.72rem;
  border-radius: 999px;
  padding: 4px 10px;
}
#hero-wordmark {
  margin-top: 26px;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(4.6rem, 19vw, 13.5rem);
  line-height: 0.82;
  letter-spacing: -0.045em;
  user-select: none;
  will-change: transform;
}
#hero-wordmark .arabic {
  font-family: var(--arabic);
  font-style: normal;
  font-size: 0.4em;
  vertical-align: 0.32em;
  margin-inline-start: 0.14em;
  color: var(--accent);
}
.hero-tag {
  margin-top: 3vh;
  font-size: clamp(0.95rem, 0.9rem + 0.4vw, 1.15rem);
  font-weight: 300;
  color: var(--muted);
  max-width: 42em;
  line-height: 1.5;
}
.hero-ctas {
  margin-top: 3.2vh;
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  justify-content: center;
}
.hero-stats {
  margin-top: 4.5vh;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}
.stat {
  width: 210px;
  border-radius: 1.25rem;
  padding: 18px 20px;
  text-align: left;
  display: flex;
  flex-direction: column;
  color: var(--fg);
}
.stat svg { opacity: 0.8; }
.stat-num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 2.6rem;
  letter-spacing: -1px;
  line-height: 1;
  margin-top: 14px;
}
.stat-label {
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.35;
}
.hero-trust {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding-bottom: 12px;
}
.trust-pill {
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 0.8rem;
  color: var(--muted);
}
.trust-row {
  display: flex;
  gap: clamp(24px, 5vw, 56px);
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.2rem, 1rem + 1.2vw, 1.8rem);
  letter-spacing: -0.02em;
  color: rgba(255,255,255,0.85);
}

/* ── 02 STATEMENT ── */
#statement {
  padding: 26vh var(--pad);
  max-width: 1100px;
  margin: 0 auto;
}
.statement-text {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.7rem, 1rem + 3.2vw, 3.6rem);
  line-height: 1.22;
  letter-spacing: -0.02em;
}
.statement-text .w { display: inline-block; }

/* ── 03 SYSTEM — pinned pillars ── */
#system { position: relative; }
.system-pin {
  padding: calc(var(--pad) + 48px) var(--pad) var(--pad);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
body.js .system-pin {
  height: 100vh;
  height: 100svh;
}
.system-visual {
  position: absolute;
  top: 50%;
  right: var(--pad);
  transform: translateY(-50%);
  width: min(44vw, 530px);
  color: var(--fg);
  pointer-events: none;
}
.system-visual svg { width: 100%; height: auto; display: block; }
.axo-scatter { display: none; }
body.js .axo-scatter { display: block; }

.pillar {
  position: relative;
  padding: 8vh var(--pad);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
body.js .pillar {
  position: absolute;
  inset: 0 48% 0 0;
  padding: 0 24px 0 var(--pad);
  visibility: hidden;
}
.pillar-index {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(4rem, 10vw, 8rem);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,0.22);
  position: absolute;
  left: var(--pad);
  bottom: 5vh;
  z-index: -1;
}
.pillar h2 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(2.8rem, 6.5vw, 5.6rem);
  letter-spacing: -0.03em;
  line-height: 0.95;
  margin-bottom: 3vh;
}
.pillar p {
  font-size: clamp(0.98rem, 0.9rem + 0.4vw, 1.2rem);
  color: var(--muted);
  max-width: 30em;
}

/* ── 04 TIMELINE ── */
#timeline { padding: 18vh var(--pad); max-width: 1300px; margin: 0 auto; }
.timeline-title {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(2.2rem, 1.2rem + 4.2vw, 4.8rem);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: clamp(40px, 8vh, 90px);
}
.timeline-title em { color: var(--accent); }

.tl-row {
  display: grid;
  grid-template-columns: minmax(110px, 200px) 1fr;
  gap: 16px;
  align-items: center;
  padding: 18px 0;
  border-top: 1px solid var(--rule);
}
.tl-stage { font-family: var(--sans); font-weight: 500; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); }
.tl-bars { display: flex; flex-direction: column; gap: 8px; }
.tl-bar { display: flex; align-items: center; gap: 12px; }
.tl-bar i {
  display: block;
  height: 12px;
  border-radius: 6px;
  transform-origin: 0 50%;
  flex: 0 0 auto;
}
body.js .tl-bar i { transform: scaleX(0); }
.tl-old i { background: rgba(255,255,255,0.18); width: calc(var(--v) * 2.2%); }
.tl-new i { background: var(--accent); width: calc(var(--v) * 2.2%); }
.tl-bar b { font-family: var(--sans); font-weight: 500; font-size: 0.8rem; white-space: nowrap; }
.tl-old b { color: var(--faint); }
body.js .tl-bar b { opacity: 0; }

.tl-total {
  display: flex;
  gap: clamp(30px, 8vw, 120px);
  margin-top: clamp(48px, 9vh, 100px);
  flex-wrap: wrap;
}
.tl-total-label { font-family: var(--serif); font-style: italic; font-size: 1.1rem; display: block; margin-bottom: 6px; color: var(--muted); }
.tl-total-num {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(4rem, 3rem + 8vw, 11rem);
  line-height: 0.9;
  letter-spacing: -0.03em;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(255,255,255,0.8);
}
.tl-total-beit .tl-total-num { color: var(--accent); -webkit-text-stroke: 0; }
.tl-total-num small {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 1rem;
  letter-spacing: 0;
  color: var(--muted);
  -webkit-text-stroke: 0;
  margin-left: 10px;
}

/* ── 05 HOUSES — horizontal scroll ── */
#houses { position: relative; }
.houses-pin {
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.houses-label { margin: 0 var(--pad) clamp(20px, 4vh, 44px); }
.houses-track {
  display: flex;
  gap: clamp(20px, 3vw, 48px);
  padding: 0 var(--pad);
  width: max-content;
  will-change: transform;
}
.house {
  width: min(78vw, 620px);
  flex: 0 0 auto;
  border-radius: 1.25rem;
  padding: clamp(20px, 3vw, 40px);
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.house-fig { background: #e9dfca; border-radius: 14px; padding: 8px; }
.house-fig svg { width: 100%; height: auto; display: block; }
.house h3 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(2rem, 1.4rem + 2.5vw, 3.2rem);
  letter-spacing: -0.02em;
  line-height: 1;
}
.house-sub { margin-top: 10px; max-width: 30em; color: var(--muted); font-size: 0.95rem; }
.house-sub em { color: var(--fg); }
.house-specs {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.house-specs li {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.9);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 999px;
  padding: 5px 12px;
  white-space: nowrap;
  background: rgba(255,255,255,0.03);
}
.house-cta { justify-content: center; }
.house-cta h3 { color: var(--accent); }
.house-cta .btn-solid { margin-top: 24px; align-self: flex-start; }

/* ── 06 PROCESS ── */
#process { padding: 18vh var(--pad); max-width: 1100px; margin: 0 auto; }
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.step {
  border-radius: 1.25rem;
  padding: clamp(20px, 2.6vw, 32px);
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 16px;
  align-items: start;
}
.step-num {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.8rem, 1.4rem + 1.5vw, 2.6rem);
  line-height: 1;
  color: var(--accent);
}
.step h3 { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 1.35rem; margin-bottom: 6px; letter-spacing: -0.01em; }
.step p { max-width: 36em; color: var(--muted); font-size: 0.92rem; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }

/* ── 07 PARTNERS ── */
#partners { padding: 14vh 0 18vh; }
#partners .section-label, .partners-intro, .partners-note { margin-left: var(--pad); margin-right: var(--pad); }
.partners-intro {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.3rem, 1rem + 1.5vw, 2.2rem);
  letter-spacing: -0.01em;
  max-width: 26em;
  margin-bottom: 7vh;
}
.marquee { overflow: hidden; border-block: 1px solid var(--rule); padding: 18px 0; }
.marquee-track {
  display: flex;
  gap: 34px;
  width: max-content;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.2rem, 1rem + 1.1vw, 1.9rem);
  letter-spacing: -0.01em;
  color: rgba(255,255,255,0.85);
  white-space: nowrap;
  animation: marquee 28s linear infinite;
}
@keyframes marquee { to { transform: translateX(-50%); } }
.partners-note { margin-top: 5vh; font-size: 0.9rem; color: var(--muted); }

/* ── 08 CTA / FOOTER ── */
#cta {
  padding: 20vh var(--pad) 8vh;
  text-align: center;
  position: relative;
}
#cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(700px 400px at 50% 65%, rgba(214,198,168,0.10), transparent 70%);
  pointer-events: none;
}
.cta-big {
  position: relative;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(2.8rem, 1.6rem + 6.5vw, 7.5rem);
  letter-spacing: -0.03em;
  line-height: 0.98;
}
.cta-big span { display: block; }
.cta-big em { color: var(--accent); }
#cta .btn-big { margin-top: 6vh; position: relative; }
.footer-meta {
  margin-top: 12vh;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--faint);
  position: relative;
}
.footer-cities { font-family: var(--serif); font-style: italic; letter-spacing: 0.04em; }

/* ── REVEAL DEFAULTS (JS animates; keep visible if JS fails) ── */
.reveal, .reveal-load { opacity: 1; }

/* ── MOBILE ── */
@media (max-width: 768px) {
  .pillar-index { display: none; }
  .system-visual {
    top: 88px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: min(80vw, 340px);
  }
  body.js .pillar {
    inset: 0;
    padding: 0 var(--pad) 9vh;
    justify-content: flex-end;
  }
  .pillar p { font-size: 0.95rem; }
  .tl-row { grid-template-columns: 1fr; gap: 8px; }
  .tl-old i, .tl-new i { height: 9px; width: calc(var(--v) * 1.7%); }
  .tl-bar b { font-size: 0.7rem; }
  .house { width: 84vw; }
  .hero-stats .stat { width: min(210px, 44vw); }
  .trust-row { flex-wrap: wrap; justify-content: center; gap: 16px; }
}

/* ── REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee-track { animation: none; }
  .tl-bar i { transform: none; }
  .tl-bar b { opacity: 1; }
}
