/* ==========================================================================
   EBTESAM Dubai Real Estate — Design System
   Palette: champagne gold, warm ivory, charcoal, sunset accent.
   ========================================================================== */

:root {
  --color-ivory: #FAF6EF;
  --color-cream: #F3ECDD;
  --color-charcoal: #15130F;
  --color-charcoal-soft: #221F18;
  --color-gold: #C6A15B;
  --color-gold-bright: #E4C580;
  --color-gold-deep: #9C7A3C;
  --color-sunset: #D98E58;
  --color-ink: #2A2620;
  --color-ink-soft: #5B554A;
  --color-line: rgba(42, 38, 32, 0.12);
  --color-line-dark: rgba(250, 246, 239, 0.14);
  --color-success: #4C7A5A;
  --color-error: #B3463C;

  --font-display: "Playfair Display", "Noto Serif", Georgia, serif;
  --font-sans: "Inter", "Noto Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-fa: "Vazirmatn", "Noto Sans Arabic", Tahoma, sans-serif;

  --radius-sm: 6px;
  --radius-md: 14px;
  --radius-lg: 28px;
  --shadow-soft: 0 20px 60px -24px rgba(21, 19, 15, 0.35);
  --shadow-card: 0 12px 32px -16px rgba(21, 19, 15, 0.25);

  --container: 1200px;
  --header-h: 84px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img { max-width: 100%; display: block; }
svg { width: 1em; height: 1em; flex-shrink: 0; vertical-align: -0.125em; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 1rem; }

html {
  scroll-behavior: smooth;
}

body {
  background: var(--color-ivory);
  color: var(--color-ink);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

html[lang="fa"] body { font-family: var(--font-fa); }
html[dir="rtl"] { direction: rtl; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--color-charcoal);
  letter-spacing: -0.01em;
}
html[lang="fa"] h1, html[lang="fa"] h2, html[lang="fa"] h3, html[lang="fa"] h4 {
  font-family: var(--font-fa);
  font-weight: 700;
}

p { margin: 0 0 1em; color: var(--color-ink-soft); }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* Standard clip-based visually-hidden technique, not left:-9999px (what
   this used to be): a huge negative LTR offset like that sits inside the
   browser's RTL overflow region instead of safely outside it, so on an
   RTL page (html[dir="rtl"], i.e. every Persian page) it was dragging
   document.scrollWidth out to ~9999px+ and landing the initial scroll
   position somewhere in that empty expanse — the entire Persian homepage
   rendered as a blank cream page until you manually scrolled back to the
   real content at a different offset. 1px, clipped and non-translated, is
   direction-agnostic: there's no "far enough away" offset to get right in
   both directions, so don't offset it at all. */
.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  top: 0;
  background: var(--color-charcoal);
  color: var(--color-ivory);
  z-index: 200;
  border-radius: var(--radius-sm);
}
.skip-link:focus {
  width: auto;
  height: auto;
  padding: 10px 18px;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
  top: 16px;
  inset-inline-start: 16px;
}

section { padding: 88px 0; }
@media (max-width: 720px) { section { padding: 56px 0; } }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-gold-deep);
  font-weight: 600;
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--color-gold);
}
html[dir="rtl"] .eyebrow::before { order: 2; }

.section-head { max-width: 680px; margin: 0 0 48px; }
.section-head.center { margin-inline: auto; text-align: center; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 30px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--color-gold-bright), var(--color-gold-deep));
  color: var(--color-charcoal);
  box-shadow: 0 10px 30px -10px rgba(198, 161, 91, 0.6);
}
.btn-primary:hover { box-shadow: 0 14px 36px -10px rgba(198, 161, 91, 0.75); transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  color: var(--color-ivory);
  border-color: rgba(250, 246, 239, 0.45);
}
.btn-outline:hover { border-color: var(--color-gold-bright); color: var(--color-gold-bright); }
.btn-outline-dark {
  background: transparent;
  color: var(--color-charcoal);
  border-color: var(--color-line);
}
.btn-outline-dark:hover { border-color: var(--color-gold-deep); color: var(--color-gold-deep); }
.btn-whatsapp {
  background: #25D366;
  color: #0b2b16;
}
.btn-whatsapp:hover { filter: brightness(1.05); transform: translateY(-1px); }
.btn-sm { padding: 10px 20px; font-size: 0.85rem; }
.btn-block { width: 100%; }

/* ---- Badges ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.badge-demo { background: rgba(217, 142, 88, 0.16); color: #9c5a2a; }
.badge-placeholder { background: rgba(91, 85, 74, 0.14); color: var(--color-ink-soft); }
.badge-pending { background: rgba(179, 70, 60, 0.12); color: var(--color-error); }

/* ---- Entrance splash (homepage, once per session) ----
   Total run ~6.5s: logo in (0.1s-1.1s) -> wordmark (0.9s-1.8s) -> subtitle
   (1.1s-2.0s) -> line draws (1.3s-2.4s) -> "Enter with Sound" CTA fades up
   (1.9s-2.7s) -> a quiet hold, logo breathing gently so the pause reads as
   deliberate rather than stalled -> fades out 5.8s-6.5s. Durations/delays
   only, by design: the choreography and every visual (logo, wordmark,
   gold line, background) are exactly what was already here, just stretched
   from the previous ~2s total. See initEntranceSoundCta (main.js) for what
   the CTA actually does — it's a plain forwarding click onto the real
   music toggle, not a second audio implementation. */
.entrance {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(120% 120% at 50% 40%, #2d2010 0%, var(--color-charcoal) 55%, #0c0b08 100%);
  animation: entranceOut 0.7s ease 5.8s forwards;
}
html.entrance-skip .entrance { display: none; }
.entrance-logo {
  width: 72px; height: 72px;
  opacity: 0;
  animation:
    entranceLogoIn 1s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards,
    entranceBreathe 2.2s ease-in-out 1.3s 2;
}
.entrance-logo svg { width: 100%; height: 100%; }
.entrance-wordmark {
  margin-top: 20px;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--color-ivory);
  opacity: 0;
  animation: entranceFadeUp 0.9s ease 0.9s forwards;
}
html[lang="fa"] .entrance-wordmark { font-family: var(--font-fa); }
.entrance-subtitle {
  margin-top: 6px;
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--color-gold-bright);
  opacity: 0;
  animation: entranceFadeUp 0.9s ease 1.1s forwards;
}
.entrance-line {
  margin-top: 28px;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-gold-bright), transparent);
  animation: entranceLine 1.1s cubic-bezier(0.16, 1, 0.3, 1) 1.3s forwards;
}
.entrance-sound-cta {
  margin-top: 36px;
  padding: 11px 24px;
  border: 1px solid rgba(250, 246, 239, 0.3);
  border-radius: 999px;
  background: transparent;
  color: var(--color-gold-bright);
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  opacity: 0;
  transition: border-color 0.25s ease, background 0.25s ease;
  animation: entranceFadeUp 0.8s ease 1.9s forwards;
}
html[lang="fa"] .entrance-sound-cta { font-family: var(--font-fa); }
.entrance-sound-cta:hover, .entrance-sound-cta:focus-visible {
  border-color: var(--color-gold-bright);
  background: rgba(228, 197, 128, 0.08);
}
.entrance-sound-cta.is-done {
  animation: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
@keyframes entranceLogoIn {
  from { opacity: 0; transform: scale(0.82); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes entranceBreathe {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.045); opacity: 0.88; }
}
@keyframes entranceFadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes entranceLine {
  to { width: 120px; }
}
@keyframes entranceOut {
  to { opacity: 0; visibility: hidden; pointer-events: none; }
}

/* ---- Header ---- */
/* position:absolute, not fixed or sticky — it belongs to the top of the
   page, not the viewport. Anchored to the document, it overlays the hero
   photo at the very start (same as before) but then scrolls away with the
   page like ordinary content instead of staying pinned as the visitor
   scrolls — it "belongs to the landing view" rather than following them
   down through the rest of the site. (Sticky was tried first and dropped
   over a cross-browser Safari quirk; fixed was tried next but kept the
   header permanently on screen, which is the opposite of what's wanted
   here.) Since absolute still removes it from flow, #main below carries
   the matching top padding on every page, and .hero cancels that padding
   specifically on the homepage so the video can run full-bleed behind it. */
.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(250, 246, 239, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  box-shadow: none;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
#main { padding-top: var(--header-h); }
.site-header.is-scrolled {
  border-bottom-color: var(--color-line);
  box-shadow: 0 8px 24px -16px rgba(21, 19, 15, 0.25);
}
/* Home and Properties: these pages are dark top-to-bottom now (starfield/
   gold-particle backgrounds throughout), so the header stays fully
   transparent the whole way down instead of switching to the normal solid
   cream bar once scrolled — that switch used to read as an unwanted
   highlighted bar appearing behind the logo/nav on scroll. Every other page
   keeps the plain solid header untouched (see .site-header.is-scrolled
   above), since those pages still transition into light content. */
.site-header-overlay {
  background: transparent;
  backdrop-filter: none;
  border-bottom-color: transparent;
  box-shadow: none;
}
/* .site-header.is-scrolled above (two classes) outranks a one-class
   .site-header-overlay rule for border-bottom-color/box-shadow, so without
   this equally-specific override the solid header's shadow/border would
   still sneak back in the moment .is-scrolled gets added on scroll. */
.site-header-overlay.is-scrolled {
  border-bottom-color: transparent;
  box-shadow: none;
}
.site-header-overlay .brand-name,
.site-header-overlay .main-nav a,
.site-header-overlay .nav-toggle {
  color: var(--color-ivory);
}
.site-header-overlay .main-nav a:hover,
.site-header-overlay .main-nav a.active {
  color: var(--color-gold-bright);
}
.site-header-overlay .lang-switch-btn {
  background: rgba(250, 246, 239, 0.1);
  border-color: rgba(250, 246, 239, 0.4);
  color: var(--color-ivory);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.brand-logo { width: 38px; height: 38px; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-charcoal);
  letter-spacing: 0.04em;
}
html[lang="fa"] .brand-name { font-family: var(--font-fa); }
.brand-sub {
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-gold-deep);
  font-weight: 600;
}

.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--color-ink);
  position: relative;
  padding: 6px 0;
}
.main-nav a:hover { color: var(--color-gold-deep); }
.main-nav a.active { color: var(--color-gold-deep); }
.main-nav a.active::after {
  content: "";
  position: absolute;
  bottom: -4px; left: 0; right: 0;
  height: 2px;
  background: var(--color-gold);
  border-radius: 2px;
}

.header-actions { display: flex; align-items: center; gap: 14px; }

.lang-switch { position: relative; }
.lang-switch-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--color-cream);
  border: 1px solid var(--color-line);
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-ink);
}
.lang-switch-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #fff;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  min-width: 170px;
  padding: 8px;
  z-index: 50;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.98);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}
html[dir="rtl"] .lang-switch-menu { right: auto; left: 0; }
.lang-switch.open .lang-switch-menu { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.lang-switch-menu a {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
}
.lang-switch-menu a:hover { background: var(--color-cream); }
.lang-switch-menu a.active { color: var(--color-gold-deep); font-weight: 700; }

.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  padding: 8px;
}
.nav-toggle svg { width: 26px; height: 26px; }

@media (max-width: 960px) {
  .main-nav { display: none; }
  .nav-toggle { display: inline-flex; }
  .header-cta { display: none; }
}

/* ---- Mobile nav: a full-viewport cinematic panel, not a generic app
   drawer — it slides in from the physical left edge and covers the whole
   screen, rather than a partial sidebar. Animates only `transform`
   (translateX), never `left`/`width`, so the whole glide stays on the
   compositor. The open and closed states deliberately carry DIFFERENT
   transitions (set directly on the base rule vs. the .open rule) rather
   than one shared one: entering uses a slow-settling decelerate curve
   (this site's existing signature easing, already used by the homepage
   entrance splash — see .entrance-logo/-line in this file) for a
   "weighted" glide in; leaving uses a quicker accelerating curve so the
   exit reads as crisp and decisive rather than a slow mirror of the
   entrance. Plain left/translateX (physical, never a logical property or
   anything RTL-aware) on purpose: the brief asks for this panel to always
   open left-to-right, Persian included — a logical property here would
   silently flip direction under dir="rtl", which is exactly what must NOT
   happen. Persian text inside still reads RTL normally (ordinary logical
   text-alignment, untouched below), only the panel's own slide is pinned
   to the physical left. */
.mobile-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  background: var(--color-ivory);
  z-index: 150;
  overflow-y: auto;
  visibility: hidden;
  transform: translateX(-100%);
  transition: transform 0.5s cubic-bezier(0.7, 0, 0.84, 0), visibility 0s linear 0.5s;
  padding: calc(24px + env(safe-area-inset-top, 0px)) 24px calc(24px + env(safe-area-inset-bottom, 0px));
}
.mobile-nav.open {
  visibility: visible;
  transform: translateX(0);
  transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear 0s;
}
/* The thin champagne-gold line tracing the panel's leading (right) edge —
   a plain child of the panel, not independently animated: the parent's
   own transform carries it along for free, so it always traces exactly
   the edge actually moving on screen with no separate timing to keep in
   sync. */
.mobile-nav-edge {
  position: absolute;
  top: 0;
  right: 0;
  width: 2px;
  height: 100%;
  background: linear-gradient(180deg, transparent, var(--color-gold-bright) 15%, var(--color-gold-bright) 85%, transparent);
  box-shadow: 0 0 12px rgba(228, 197, 128, 0.55);
  pointer-events: none;
}

.mobile-nav-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 40px; }
.mobile-nav-brand { display: flex; align-items: center; gap: 10px; }

.mobile-nav-links { display: flex; flex-direction: column; }
.mobile-nav-links a {
  display: block;
  font-family: var(--font-display);
  font-size: 1.6rem;
  padding: 14px 0;
  border-bottom: 1px solid var(--color-line);
  color: var(--color-charcoal);
  position: relative;
}
html[lang="fa"] .mobile-nav-links a { font-family: var(--font-fa); }
.mobile-nav-links a.active { color: var(--color-gold-deep); }
.mobile-nav-links a.active::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  bottom: 10px;
  width: 20px;
  height: 2px;
  background: var(--color-gold-bright);
}

.mobile-nav-actions { margin-top: 32px; display: flex; flex-direction: column; gap: 12px; }
.mobile-nav-langs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.mobile-nav-langs a {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 7px 14px;
  border: 1px solid var(--color-line);
  border-radius: 999px;
  color: var(--color-ink-soft);
}
.mobile-nav-langs a.active {
  border-color: var(--color-gold-bright);
  color: var(--color-gold-deep);
  background: rgba(228, 197, 128, 0.12);
}

/* ---- Staggered content reveal: each piece fades/rises into place on its
   own transition-delay once .open is applied, so branding, then links one
   by one, then the language/contact group arrive in sequence rather than
   all at once. Hidden (not merely un-delayed) while closed, so the same
   sequence replays identically every time the menu opens again. Closing
   intentionally has NO stagger: leaving .open simply reverts every one of
   these to the base rule below (0 delay, same short duration) so they all
   retract together, quickly — a staggered exit reads as sluggish, not
   elegant. ---- */
.mobile-nav-top,
.mobile-nav-links a,
.mobile-nav-actions {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.mobile-nav.open .mobile-nav-top { opacity: 1; transform: translateY(0); transition-delay: 0.15s; }
.mobile-nav.open .mobile-nav-links a { opacity: 1; transform: translateY(0); }
.mobile-nav.open .mobile-nav-links a:nth-child(1) { transition-delay: 0.22s; }
.mobile-nav.open .mobile-nav-links a:nth-child(2) { transition-delay: 0.28s; }
.mobile-nav.open .mobile-nav-links a:nth-child(3) { transition-delay: 0.34s; }
.mobile-nav.open .mobile-nav-links a:nth-child(4) { transition-delay: 0.4s; }
.mobile-nav.open .mobile-nav-links a:nth-child(5) { transition-delay: 0.46s; }
.mobile-nav.open .mobile-nav-actions { opacity: 1; transform: translateY(0); transition-delay: 0.52s; }

@media (prefers-reduced-motion: reduce) {
  .mobile-nav, .mobile-nav.open {
    transform: none !important;
    transition: opacity 0.15s linear, visibility 0.15s linear !important;
    opacity: 0;
  }
  .mobile-nav.open { opacity: 1; }
  .mobile-nav-top, .mobile-nav-links a, .mobile-nav-actions {
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
}

/* ---- Hero ---- */
.hero {
  position: relative;
  /* Pulls the hero up to start behind the (transparent, see .site-header-
     overlay) header instead of below it — the header still reserves its own
     space in normal flow, this just cancels that out for the hero alone. */
  margin-top: calc(-1 * var(--header-h));
  min-height: 86vh;
  display: flex;
  align-items: center;
  color: var(--color-ivory);
  overflow: hidden;
  background: radial-gradient(120% 120% at 15% 15%, #2d2010 0%, var(--color-charcoal) 55%, #0c0b08 100%);
}
.hero-video-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
  animation: heroAmbientDrift 20s ease-in-out infinite alternate;
}
.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
  transform: scale(calc(1.04 + var(--hero-zoom, 0) * 0.55));
  transform-origin: 50% 42%;
  will-change: transform;
}
@keyframes heroAmbientDrift {
  0% { transform: scale(1.02) translate(0, 0); }
  100% { transform: scale(1.1) translate(-2%, -1.5%); }
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(21,19,15,0.15) 0%, rgba(21,19,15,0.55) 70%, rgba(21,19,15,0.92) 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
  /* padding-block, not the padding shorthand: .hero-content shares the
     element with .container (which sets the 24px horizontal gutter via
     padding: 0 24px), and a 3-value padding shorthand here would set
     left/right back to 0 at equal specificity, silently cancelling that
     gutter — exactly what was putting the headline flush against the
     screen edge on mobile. padding-block only ever touches top/bottom,
     so .container's horizontal padding is never in contention. */
  padding-block: 140px 100px;
}
.hero-content > * {
  opacity: 0;
  transform: translateY(22px);
  animation: heroFadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.hero-content > *:nth-child(1) { animation-delay: 0.05s; }
.hero-content > *:nth-child(2) { animation-delay: 0.16s; }
.hero-content > *:nth-child(3) { animation-delay: 0.27s; }
.hero-content > *:nth-child(4) { animation-delay: 0.38s; }
/* A second .hero-sub paragraph (see build_home() in build.py) made the CTA
   row the 5th child instead of the 4th — without its own delay here it'd
   fall back to the base rule above (no delay at all) and animate in
   alongside the eyebrow instead of last, breaking the staggered cascade. */
.hero-content > *:nth-child(5) { animation-delay: 0.49s; }
@keyframes heroFadeUp {
  to { opacity: 1; transform: translateY(0); }
}
.hero .eyebrow { color: var(--color-gold-bright); }
.hero h1 {
  font-size: clamp(2.4rem, 5.4vw, 4.2rem);
  color: var(--color-ivory);
  margin-bottom: 20px;
}
.hero-sub {
  font-size: 1.15rem;
  color: rgba(250, 246, 239, 0.86);
  max-width: 560px;
  margin-bottom: 36px;
}
/* The hero now renders two .hero-sub paragraphs (see build_home() in
   build.py) — pulls the second one closer to the first (36px gap down to
   16px) so they read as one flowing two-sentence message rather than two
   separately-spaced blocks; the last one's own margin-bottom still gives
   the CTAs their usual 36px of breathing room below. */
.hero-sub + .hero-sub { margin-top: -20px; }
.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-caption {
  position: absolute;
  bottom: 18px;
  inset-inline-start: 24px;
  z-index: 2;
  font-size: 0.72rem;
  color: rgba(250, 246, 239, 0.55);
  max-width: 320px;
}
.scroll-hint {
  position: absolute;
  bottom: 28px;
  inset-inline-end: 24px;
  z-index: 2;
  color: rgba(250, 246, 239, 0.6);
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ---- Current Developments: stacking-card showcase (lpas.com pattern).
   Each project is its own position:sticky, full-height panel in normal
   document flow with an increasing z-index — real scroll throughout, no JS
   and no scroll-jacking. As the visitor scrolls, each new project's panel
   catches at the top of the viewport and visually slides up to cover the
   previous one, which stays stuck underneath until fully hidden. ---- */
.stack-intro { padding: 48px 0 32px; }
.stack-intro .section-head { max-width: 520px; margin-bottom: 0; }
@media (max-width: 720px) { .stack-intro { padding: 36px 0 24px; } }
/* A stronger, more visible variant of the sitewide .reveal fade-up, scoped
   to just this band (not the shared .reveal rule — that would also touch
   every property/agent/channel card using it elsewhere) — bigger rise and
   an added blur-to-sharp focus pull, so the motion actually reads instead
   of a barely-there 28px nudge. */
.stack-intro .section-head.reveal {
  transform: translateY(64px);
  filter: blur(8px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1), filter 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.stack-intro .section-head.reveal.is-visible { transform: translateY(0); filter: blur(0); }
/* ---- Projects filmstrip (Current Developments): the same
   viewport-pinned-stage-panned-horizontally mechanic as
   .process-filmstrip-dock below (Why Dubai buying-process steps) —
   initProjectsFilmstrip() in main.js owns the translateX/progress math
   the same way initProcessFilmstrip() does there, both time-lerped at
   SCROLL_SMOOTHING. See the big comment on initProjectsFilmstrip for why
   this replaced an earlier position:sticky + z-index stacking version
   (a GPU-compositing bug on some hardware, not fixable by tuning that
   approach further).

   This is the client's signature homepage animation, explicitly requested
   on mobile too (not a simplified fallback) — the pin+pan+blur-reveal
   engine below now runs at every width, not just desktop. What DOES
   differ by width is which text blurs in: on desktop the developer
   line/name/tagline stay permanently legible in a bottom-pinned header
   (.projects-panel-content) — short enough, and the stage wide enough,
   that hiding them was never necessary — while only the longer
   .projects-panel-expand block (summary/facts/CTAs) fades/blurs in via
   localProgress. On a phone there's no room for a permanently-legible
   header AND a full-bleed photo at once without the composition feeling
   cramped, so the header trio blurs in right along with the expand block
   there too — see the two REVEAL_WINDOW constants in
   initProjectsFilmstrip() (the header's is wider, so it reads as sharp
   first, with the expand block catching up a beat later, the same "title
   arrives, details follow" sequencing the brief asked for) and the
   (min-width:761px) override right below that forces the header
   permanently visible again above the mobile breakpoint, preserving
   desktop's exact current look regardless of what the shared JS sets. ---- */
.projects-filmstrip-dock {
  position: relative;
  /* svh, not dvh: this height (and .projects-filmstrip-stage's, right
     below) directly defines the scroll RANGE initProjectsFilmstrip()
     divides by every frame — dvh is the dynamic viewport height, which on
     iOS Safari genuinely changes value as the address bar collapses/
     expands DURING the scroll gesture itself. With both the dock's total
     height and the stage's pin height recomputing against that moving
     target on every frame, the progress math and window.innerHeight
     (JS) chased each other instead of agreeing, which is what was behind
     the multi-second "stuck, nudges forward, stuck again" feeling right
     at this section's pin-release boundary. svh is the SMALL viewport
     height — stable the instant it's read, address-bar state assumed
     collapsed-worst-case, exactly the "doesn't move under you mid-scroll"
     guarantee this calculation needs. Desktop is unaffected either way
     (no address bar to animate), so this isn't a tradeoff there. */
  height: calc(var(--count, 5) * 100vh);
  height: calc(var(--count, 5) * 100svh);
  background: var(--color-charcoal);
  padding: 0;
}
.projects-filmstrip-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: var(--color-charcoal);
}
.projects-filmstrip-track {
  display: flex;
  height: 100%;
  will-change: transform;
}
.projects-panel {
  flex-shrink: 0;
  height: 100%;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  color: var(--color-ivory);
  border-inline-start: 1px solid rgba(250, 246, 239, 0.08);
}
.projects-panel:first-child { border-inline-start: none; }
.projects-panel-media { position: absolute; inset: 0; }
.projects-panel-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: projectsAmbientDrift 24s ease-in-out infinite alternate;
}
.projects-panel-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(21,19,15,0.2) 0%, rgba(21,19,15,0.58) 55%, rgba(21,19,15,0.93) 100%);
}
.projects-panel-content { position: relative; z-index: 1; max-width: 640px; padding-bottom: 72px; }
/* Opacity/filter/transform on these three are set per-frame by
   initProjectsFilmstrip() below 761px (see the big comment above) — no
   CSS transition property here on purpose, same reasoning as
   .projects-panel-expand just below: the values already arrive
   continuously time-lerped (SCROLL_SMOOTHING) every animation frame, so a
   CSS transition would fight those per-frame writes instead of smoothing
   them. Above 761px this is overridden back to permanently visible. */
.projects-panel-content .projects-developer { color: var(--color-gold-bright); opacity: 0; filter: blur(14px); transform: translateY(10px); will-change: opacity, filter, transform; }
.projects-panel-content h2 { color: var(--color-ivory); font-size: clamp(1.9rem, 3.6vw, 2.8rem); margin-bottom: 6px; opacity: 0; filter: blur(14px); transform: translateY(10px); will-change: opacity, filter, transform; }
.projects-panel-content .projects-tagline { opacity: 0; filter: blur(14px); transform: translateY(10px); will-change: opacity, filter, transform; }
@media (min-width: 761px) {
  .projects-panel-content .projects-developer,
  .projects-panel-content h2,
  .projects-panel-content .projects-tagline {
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
  }
}
.projects-panel-expand {
  opacity: 0;
  filter: blur(10px);
  will-change: opacity, filter;
}
.projects-filmstrip-progress {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: rgba(250, 246, 239, 0.14);
  z-index: 2;
}
.projects-filmstrip-progress span {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--color-gold-deep), var(--color-gold-bright));
  transform: scaleX(0);
  transform-origin: left;
  will-change: transform;
}
.projects-filmstrip-counter {
  position: absolute;
  top: 28px;
  inset-inline-end: clamp(24px, 5vw, 56px);
  z-index: 2;
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: rgba(250, 246, 239, 0.75);
}
@media (max-width: 760px) {
  /* Shorter per-panel pin distance than desktop's implicit ~100vh/dvh a
     transition — a full screen-height of scroll per property reads as
     "excessive scrolling to progress" on a phone (explicitly flagged as
     unacceptable); SCROLL_SMOOTHING's lerp already keeps the motion
     smooth even over a shorter distance. */
  /* svh here too — see the big comment on the base .projects-filmstrip-dock
     rule above for why (this overrides that rule's height at this
     breakpoint, so it needs the same stable unit, not dvh). */
  .projects-filmstrip-dock { height: calc(var(--count, 5) * 78vh); height: calc(var(--count, 5) * 78svh); }
  .projects-panel-content { padding: 0 24px 40px; max-width: none; }
  .projects-panel-content h2 { font-size: clamp(1.7rem, 7vw, 2.3rem); }

  /* No blur on mobile, by request: initProjectsFilmstrip() (main.js) still
     writes a per-frame filter:blur(...) value here on every tick — same
     JS, unchanged, still driving desktop's blur-to-sharp text reveal —
     but !important below always wins over that plain inline style, so it
     never actually paints on a phone. Opacity (and the translateY settle)
     stay exactly as the JS sets them, so the fade/rise timing is still
     synchronized with the scroll-driven pan; only the blur layer is
     suppressed. !important also means this holds true on first paint,
     mid-scroll, scrolling backward, and resize — there's no frame where
     JS could still be the one "winning" and showing a blurred flash. */
  .projects-panel-content .projects-developer,
  .projects-panel-content h2,
  .projects-panel-content .projects-tagline,
  .projects-panel-expand {
    filter: none !important;
  }
}
/* Reduced motion (any width): initProjectsFilmstrip() returns immediately
   for reduced-motion visitors (see its own top-of-function guard) and
   never sets the per-frame inline styles above, so without this override
   every panel's text — including the header trio, now opacity:0 by
   default below 761px — would stay permanently invisible instead of
   falling back to the plain, fully-visible static presentation this site
   uses elsewhere for reduced motion. */
@media (prefers-reduced-motion: reduce) {
  .projects-panel-content .projects-developer,
  .projects-panel-content h2,
  .projects-panel-content .projects-tagline,
  .projects-panel-expand {
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
  }
}

@keyframes projectsAmbientDrift {
  0% { transform: scale(1) translate(0, 0); }
  100% { transform: scale(1.04) translate(-1.5%, -1%); }
}

/* ---- Guidance showcase: modeled on 360lexingtonave.com's "Prime Midtown
   Location" section. A single viewport-pinned stage (.guidance-stage,
   position:sticky) holds four absolutely-positioned cards; as the visitor
   scrolls through the tall .guidance-dock wrapper, each card in turn slides
   up from below to fill the stage, then shrinks and docks permanently into
   its own quadrant of a 2x2 grid — verified against the live reference via
   DOM inspection (it is a scroll-scrubbed dock/shrink per card, not a stack
   that covers the previous one). initGuidanceDock() in main.js drives the
   top/left/width/height per frame; the CSS below only sets the resting 2x2
   grid (the no-JS / reduced-motion fallback, and the state JS animates
   toward). container-type:size lets the heading/body text scale with cqw
   units as each card shrinks from full-stage to quarter-stage, so copy
   never overflows a docked quadrant. Below 761px a shrinking quarter-screen
   card would be illegible, so the dock collapses to a plain stacked list. */
.guidance-intro { padding: 48px 0 8px; }
.guidance-intro .section-head { max-width: 520px; margin-bottom: 0; }
.guidance-intro .section-head.reveal {
  transform: translateY(64px);
  filter: blur(8px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1), filter 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.guidance-intro .section-head.reveal.is-visible { transform: translateY(0); filter: blur(0); }
@media (max-width: 720px) { .guidance-intro { padding: 36px 0 8px; } }
.guidance-dock {
  position: relative;
  height: calc(var(--count, 4) * 100vh);
}
.guidance-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  background: var(--color-charcoal);
}
.guidance-card {
  position: absolute;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(28px, 4vw, 64px);
  overflow: hidden;
  container-type: size;
}
@media (min-width: 761px) {
  /* Scoped to desktop so these higher-specificity nth-child rules can't
     outrank the plain .guidance-card width/height reset in the mobile
     media query below — a bare @media block carries no specificity of its
     own, so without this split the quadrant rules kept winning on mobile. */
  .guidance-card:nth-child(1) { top: 0; left: 0; width: 50%; height: 50%; }
  .guidance-card:nth-child(2) { top: 0; left: 50%; width: 50%; height: 50%; }
  .guidance-card:nth-child(3) { top: 50%; left: 0; width: 50%; height: 50%; }
  .guidance-card:nth-child(4) { top: 50%; left: 50%; width: 50%; height: 50%; }
  html[dir="rtl"] .guidance-card:nth-child(1) { left: 50%; }
  html[dir="rtl"] .guidance-card:nth-child(2) { left: 0; }
  html[dir="rtl"] .guidance-card:nth-child(3) { left: 50%; }
  html[dir="rtl"] .guidance-card:nth-child(4) { left: 0; }
}
.guidance-card-light { background: var(--color-cream); color: var(--color-charcoal); }
.guidance-card-dark { background: var(--color-charcoal); color: var(--color-ivory); }
.guidance-card-dark p { color: rgba(250, 246, 239, 0.72); }
.guidance-card-pattern {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.guidance-card-light .guidance-card-pattern { --gp-line: rgba(21, 19, 15, 0.07); }
.guidance-card-dark .guidance-card-pattern { --gp-line: rgba(228, 197, 128, 0.14); }
.guidance-card-dark .guidance-card-pattern::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 85% 15%, rgba(228, 197, 128, 0.1), transparent 60%);
}
.guidance-card-photo {
  position: absolute;
  inset: 0;
}
.guidance-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: projectsAmbientDrift 24s ease-in-out infinite alternate;
}
.guidance-card-photo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(21,19,15,0.2) 0%, rgba(21,19,15,0.58) 55%, rgba(21,19,15,0.93) 100%);
}
/* A photo card always reads in the ivory palette for legibility against its
   dark gradient, regardless of whether it's a "light" or "dark" toned card
   — the gradient itself, not the card tone, is what the text sits on. */
.guidance-card-photo-tone,
.guidance-card-photo-tone .guidance-card-content h3,
.guidance-card-photo-tone .guidance-card-content p,
.guidance-card-photo-tone .guidance-block-num {
  color: var(--color-ivory);
}
.guidance-card-photo-tone .guidance-card-content p { color: rgba(250, 246, 239, 0.8); }
.guidance-card-photo-tone .guidance-block-num { color: var(--color-gold-bright); }
.guidance-card-content {
  position: relative;
  z-index: 1;
  max-width: 640px;
}
.guidance-card-content h3 {
  font-size: clamp(1.3rem, 7cqw, 3rem);
  margin-bottom: 0.5em;
}
.guidance-card-dark .guidance-card-content h3 { color: var(--color-ivory); }
.guidance-card-content p {
  font-size: clamp(0.82rem, 2.6cqw, 1.05rem);
  max-width: 46ch;
}
@media (max-width: 760px) {
  /* Same pin/dock/shrink engine as desktop (initGuidanceDock, main.js),
     not a static fallback — only the resting grid each card docks into
     differs: a 1-column, 4-row stack instead of a 2x2 grid, since a
     shrinking 50%-width quadrant doesn't fit a portrait phone. svh, not
     vh/dvh, for the same reason as .projects-filmstrip-dock/-stage above
     — these two heights define the scroll-math range
     initGuidanceDock()'s computeProgress() divides by every frame, and
     dvh's live-changing value (as iOS Safari's address bar animates
     during the scroll gesture) is what produced that section's
     multi-second stall; svh is stable through the same gesture.
     130vh/card, not the original 80vh/card: a strong iPhone swipe's
     momentum covers a roughly fixed amount of physical scroll distance
     regardless of how any section is built, so the one direct, reliable
     way to stop that same swipe from racing through all four cards is
     simply giving the whole sequence more physical distance to cover —
     see initGuidanceDock()'s own comment on the velocity cap for the
     other, complementary half of this fix. Desktop's own 100vh/card
     (below) is untouched — a trackpad/wheel scroll doesn't carry
     anywhere near this kind of momentum, so the problem this solves
     doesn't exist there. */
  .guidance-dock { height: calc(var(--count, 4) * 130vh); height: calc(var(--count, 4) * 130svh); }
  /* dvh, not svh, specifically here: this is the box that actually PAINTS
     the dark background full-bleed, so it has to track the true, live
     viewport (dvh) or it falls short — sized at svh (the SMALLEST the
     viewport can be) — the moment Safari's chrome auto-hides mid-scroll
     and the real viewport grows past that, leaving a gap of exposed
     ivory body background at the bottom of this sticky-pinned stage. The
     wrapper above stays svh-based on purpose: it has no background of
     its own to expose, and its only job is driving scroll distance, which
     should stay a fixed, stable number of pixels regardless of the
     toolbar — see initGuidanceDock()'s measure()/stageHeight in main.js
     for the matching JS half of this: the scroll-progress math is
     deliberately NOT read from this (now live) box on every frame, for
     exactly the stability reason svh was originally chosen for it. */
  .guidance-stage { height: 100vh; height: 100dvh; }
  .guidance-card {
    padding: 36px 28px;
  }
  .guidance-card-content h3 { font-size: clamp(1.6rem, 7cqw, 2.2rem); }
  /* CSS resting state for this breakpoint — what a reduced-motion visitor
     sees (initGuidanceDock returns before ever touching these elements
     for them) and what paints for an instant before JS runs. Mirrors the
     (min-width:761px) quadrant rules above, just stacked in one column;
     RTL needs no mirroring here since a single column has no "other
     side" to swap to. */
  .guidance-card:nth-child(1) { top: 0%; left: 0; width: 100%; height: 25%; }
  .guidance-card:nth-child(2) { top: 25%; left: 0; width: 100%; height: 25%; }
  .guidance-card:nth-child(3) { top: 50%; left: 0; width: 100%; height: 25%; }
  .guidance-card:nth-child(4) { top: 75%; left: 0; width: 100%; height: 25%; }
  /* A quarter-height band (~25% of 100svh) isn't tall enough to hold the
     icon stacked above the number/heading/paragraph the way desktop does
     — num+h3+p alone already run close to the band's full height, so the
     60px icon pushed the stack past the top of its own card, and
     .guidance-card's overflow:hidden sliced its top half off against the
     card above it. Taking the icon out of the content flow and pinning it
     to the card's own corner (not .guidance-card-content's, which is only
     as tall as its remaining text) removes that 60px+margin from the
     stack entirely, so num/h3/p now fit, and the icon becomes a fixed
     corner badge instead of a fourth stacked line. */
  .guidance-card-content { position: static; }
  .guidance-card-content p { padding-inline-end: 52px; }
  .guidance-icon {
    position: absolute;
    inset-inline-end: 28px;
    inset-block-end: 36px;
    margin-bottom: 0;
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }
  .guidance-icon svg { width: 20px; height: 20px; }
}
.guidance-pattern-1 {
  /* Curated Property Selection — an architectural blueprint grid */
  background-image:
    repeating-linear-gradient(0deg, var(--gp-line) 0px, var(--gp-line) 1px, transparent 1px, transparent 68px),
    repeating-linear-gradient(90deg, var(--gp-line) 0px, var(--gp-line) 1px, transparent 1px, transparent 68px);
  animation: guidancePatternDriftXY 44s ease-in-out infinite alternate;
}
.guidance-pattern-2 {
  /* Multilingual, Personal Support — radiating signal rings */
  background-image: repeating-radial-gradient(circle at 78% 42%, var(--gp-line) 0px, var(--gp-line) 1.5px, transparent 1.5px, transparent 46px);
  animation: guidancePatternPulse 10s ease-in-out infinite alternate;
}
.guidance-pattern-3 {
  /* Guidance Through the Process — a forward-moving diagonal path */
  background-image: repeating-linear-gradient(128deg, var(--gp-line) 0px, var(--gp-line) 2px, transparent 2px, transparent 42px);
  animation: guidancePatternDriftDiag 38s linear infinite;
}
.guidance-pattern-4 {
  /* Transparent, Verified Information — a faceted glass lattice */
  background-image:
    repeating-linear-gradient(45deg, var(--gp-line) 0px, var(--gp-line) 1px, transparent 1px, transparent 34px),
    repeating-linear-gradient(-45deg, var(--gp-line) 0px, var(--gp-line) 1px, transparent 1px, transparent 34px);
  animation: guidancePatternDriftXY 50s ease-in-out infinite alternate;
}
@keyframes guidancePatternDriftXY {
  0% { background-position: 0 0, 0 0; }
  100% { background-position: 56px 56px, 56px 56px; }
}
@keyframes guidancePatternDriftDiag {
  0% { background-position: 0 0; }
  100% { background-position: 400px 0; }
}
@keyframes guidancePatternPulse {
  0% { background-position: 0 0; background-size: 100% 100%; }
  100% { background-position: 0 0; background-size: 108% 108%; }
}
@media (prefers-reduced-motion: reduce) {
  .guidance-pattern-1, .guidance-pattern-2, .guidance-pattern-3, .guidance-pattern-4 { animation: none; }
}
.guidance-icon {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--color-gold-bright), var(--color-gold));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: clamp(12px, 3cqh, 20px);
  box-shadow: 0 16px 32px -14px rgba(0,0,0,0.6);
}
.guidance-icon svg { width: 28px; height: 28px; color: var(--color-charcoal); }
.guidance-card .guidance-block-num {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(0.7rem, 2cqw, 0.85rem);
  letter-spacing: 0.1em;
  color: var(--color-gold-deep);
  margin-bottom: clamp(6px, 2cqh, 14px);
}
.guidance-card-dark .guidance-block-num { color: var(--color-gold-bright); }
.projects-developer {
  display: block;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--color-gold-bright);
  margin-bottom: 8px;
}
.projects-tagline { color: rgba(250, 246, 239, 0.85); font-size: 1.05rem; margin-bottom: 14px; }
.projects-summary { color: rgba(250, 246, 239, 0.72); font-size: 0.95rem; max-width: 560px; }
.projects-facts { list-style: none; margin: 18px 0 22px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.projects-facts li {
  font-size: 0.86rem;
  color: rgba(250, 246, 239, 0.82);
  padding-inline-start: 18px;
  position: relative;
}
.projects-facts li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.5em;
  width: 7px;
  height: 1px;
  background: var(--color-gold-bright);
}
.projects-ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 32px; }
@media (max-width: 760px) {
  .projects-facts { margin: 14px 0 18px; }
  .projects-ctas { margin-bottom: 22px; }
}

/* ---- Instagram showcase: a compact three-photo editorial gallery on the
   site's own gold starfield ground (replacing the earlier single glowing
   mark) — real project photography, a slow considered hover zoom, no
   embedded widget/script. Links straight out to @ebtesamjb_dxb. ---- */
.insta-gallery {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 48px;
}
.insta-gallery-item {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(228, 197, 128, 0.22);
}
.insta-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.insta-gallery-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(190deg, transparent 55%, rgba(10, 9, 6, 0.78) 100%);
  opacity: 0;
  transition: opacity 0.45s ease;
}
.insta-gallery-glyph {
  position: absolute;
  inset-inline-end: 16px;
  bottom: 16px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(250, 246, 239, 0.16);
  backdrop-filter: blur(6px);
  color: var(--color-ivory);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.insta-gallery-glyph svg { width: 16px; height: 16px; }
.insta-gallery-item:hover img,
.insta-gallery-item:focus-visible img { transform: scale(1.08); }
.insta-gallery-item:hover::after,
.insta-gallery-item:focus-visible::after,
.insta-gallery-item:hover .insta-gallery-glyph,
.insta-gallery-item:focus-visible .insta-gallery-glyph { opacity: 1; transform: translateY(0); }
.reels-cta { margin-top: 40px; }
@media (max-width: 760px) {
  .insta-gallery {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 78%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin-top: 36px;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .insta-gallery::-webkit-scrollbar { display: none; }
  .insta-gallery-item { scroll-snap-align: center; }
}
.instagram-showcase .section-head.reveal {
  transform: translateY(40px);
  filter: blur(6px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1), filter 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.instagram-showcase .section-head.reveal.is-visible { transform: translateY(0); filter: blur(0); }

/* ---- Section variants ---- */
.section-dark {
  background: var(--color-charcoal);
  color: var(--color-ivory);
}
.section-dark p { color: rgba(250, 246, 239, 0.72); }
.section-dark h2, .section-dark h3 { color: var(--color-ivory); }
.section-dark .eyebrow { color: var(--color-gold-bright); }

.section-cream { background: var(--color-cream); }

/* ---- Starfield section (Instagram): black-gold ground with soft glows and
   twinkling gold stars, layered as backgrounds so no markup/JS is needed. ---- */
.section-starfield {
  position: relative;
  background:
    radial-gradient(1.5px 1.5px at 8% 22%, rgba(228,197,128,0.9), transparent 60%),
    radial-gradient(1.5px 1.5px at 18% 68%, rgba(228,197,128,0.7), transparent 60%),
    radial-gradient(1px 1px at 27% 15%, rgba(250,246,239,0.8), transparent 60%),
    radial-gradient(1.5px 1.5px at 36% 82%, rgba(228,197,128,0.6), transparent 60%),
    radial-gradient(1px 1px at 44% 38%, rgba(250,246,239,0.7), transparent 60%),
    radial-gradient(1.5px 1.5px at 52% 60%, rgba(228,197,128,0.85), transparent 60%),
    radial-gradient(1px 1px at 61% 12%, rgba(250,246,239,0.6), transparent 60%),
    radial-gradient(1.5px 1.5px at 69% 76%, rgba(228,197,128,0.7), transparent 60%),
    radial-gradient(1px 1px at 77% 30%, rgba(250,246,239,0.8), transparent 60%),
    radial-gradient(1.5px 1.5px at 85% 55%, rgba(228,197,128,0.6), transparent 60%),
    radial-gradient(1px 1px at 93% 20%, rgba(250,246,239,0.7), transparent 60%),
    radial-gradient(1.5px 1.5px at 15% 45%, rgba(228,197,128,0.5), transparent 60%),
    radial-gradient(1px 1px at 58% 90%, rgba(250,246,239,0.6), transparent 60%),
    radial-gradient(900px 500px at 18% 0%, rgba(198,161,91,0.16), transparent 65%),
    radial-gradient(700px 500px at 85% 100%, rgba(198,161,91,0.14), transparent 65%),
    radial-gradient(120% 120% at 50% 20%, #241c10 0%, var(--color-charcoal) 55%, #0a0906 100%);
  color: var(--color-ivory);
  overflow: hidden;
}
.section-starfield::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(1px 1px at 23% 52%, rgba(228,197,128,0.9), transparent 60%),
    radial-gradient(1px 1px at 48% 25%, rgba(250,246,239,0.8), transparent 60%),
    radial-gradient(1px 1px at 73% 68%, rgba(228,197,128,0.8), transparent 60%),
    radial-gradient(1px 1px at 91% 42%, rgba(250,246,239,0.7), transparent 60%),
    radial-gradient(1px 1px at 9% 80%, rgba(228,197,128,0.7), transparent 60%);
  animation: starfieldTwinkle 4.5s ease-in-out infinite alternate;
}
@keyframes starfieldTwinkle {
  0% { opacity: 0.35; }
  100% { opacity: 1; }
}
.section-starfield p { color: rgba(250, 246, 239, 0.72); }
.section-starfield h2, .section-starfield h3 { color: var(--color-ivory); }
.section-starfield .eyebrow { color: var(--color-gold-bright); }
.section-starfield .container { position: relative; z-index: 1; }

/* ---- Property grid / cards ---- */
.property-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 32px;
}
.demo-notice {
  background: rgba(217, 142, 88, 0.12);
  border: 1px solid rgba(217, 142, 88, 0.3);
  color: #8a4e23;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  margin-bottom: 36px;
}

/* ---- Filters orb: a glowing central emblem that opens into a single gold
   capsule panel of filter fields. Closed, the emblem idles centered with a
   slow pulse and two expanding/fading ripple rings. Opening it: the emblem
   (wrapped in .filters-orb-trigger-slot) slides toward the start edge and
   the panel unfurls from the emblem's new edge toward the far side —
   initFiltersOrb() in main.js measures the panel's natural width once and
   sets --orb-shift plus the panel's anchor offset so the emblem+panel pair,
   once open, is still centered on the row exactly as the emblem alone was
   when closed (also mirrors for RTL locales, where the emblem moves to the
   end edge and the panel unfurls toward the start). Below 761px this
   measurement is skipped — the panel stays in normal flow and grows via a
   grid-template-columns 0fr->1fr trick (exact, content-matched expand, no
   guessed max-width), which is fine at that size. From 761px up — where the
   page also runs the gold-particle canvas and WebGL carousel competing for
   the main thread — grid-template-columns is a layout property, and
   fighting that contention reads as janky, so the desktop override further
   down takes the panel out of flow entirely (position: absolute) and
   animates only `transform`/`opacity` on both the slot and the panel, which
   the compositor can run smoothly at the display's full refresh rate
   (120Hz+) independent of main-thread load. ---- */
.filters-orb-wrap {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  row-gap: 20px;
  margin: 8px 0 36px;
}
.filters-orb-trigger-slot {
  flex-shrink: 0;
  /* Closing only (the end state once .is-open is removed) — the panel
     retracts over 0.45s with no delay of its own (see .filters-panel-inner
     below), and this starts sliding back at 0.15s, while the panel still
     has ~0.3s left to go, so the two overlap and read as one continuous
     motion rather than a strict two-step sequence. The desktop block
     further down overrides this for opening, with no delay. */
  transition: transform 0.55s cubic-bezier(.16,1,.3,1) 0.15s;
}
.filters-orb-trigger {
  position: relative;
  z-index: 2;
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid rgba(228, 197, 128, 0.55);
  background: radial-gradient(circle at 50% 35%, rgba(228, 197, 128, 0.22), rgba(21, 19, 15, 0.92) 72%);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 0 22px rgba(228, 197, 128, 0.3), inset 0 0 16px rgba(228, 197, 128, 0.12);
  animation: filtersOrbPulse 3.4s ease-in-out infinite;
  transition: transform 0.4s cubic-bezier(.22,1,.36,1), box-shadow 0.4s ease;
}
.filters-orb-trigger:hover {
  transform: scale(1.06);
  box-shadow: 0 0 32px rgba(228, 197, 128, 0.48), inset 0 0 20px rgba(228, 197, 128, 0.2);
}
.filters-orb-icon { width: 26px; height: 26px; color: var(--color-gold-bright); filter: drop-shadow(0 0 6px rgba(228, 197, 128, 0.65)); }
.filters-orb-ping {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(228, 197, 128, 0.4);
  pointer-events: none;
  animation: filtersOrbRipple 3.4s cubic-bezier(.22,1,.36,1) infinite;
}
.filters-orb-ping-2 { animation-delay: 1.7s; }
@keyframes filtersOrbPulse {
  0%, 100% { box-shadow: 0 0 22px rgba(228, 197, 128, 0.28), inset 0 0 14px rgba(228, 197, 128, 0.1); transform: scale(1); }
  50% { box-shadow: 0 0 34px rgba(228, 197, 128, 0.46), inset 0 0 20px rgba(228, 197, 128, 0.18); transform: scale(1.025); }
}
@keyframes filtersOrbRipple {
  0% { transform: scale(1); opacity: 0.55; }
  100% { transform: scale(1.9); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .filters-orb-trigger { animation: none; }
  .filters-orb-ping { animation: none; opacity: 0; }
}

.filters-bar { display: contents; } /* the <form> is a layout no-op; its .filters-panel child sits directly in .filters-orb-wrap's flex row */
.filters-panel {
  display: grid;
  grid-template-columns: 0fr;
  transition: grid-template-columns 1.1s cubic-bezier(.16,1,.3,1);
  min-width: 0;
}
.filters-panel-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: flex-end;
  min-width: 0;
  overflow: hidden;
  padding: 18px 28px;
  border: 1px solid rgba(228, 197, 128, 0.3);
  /* 53px (not 999px): a single row is 106px tall, so 999px would clamp to
     the same pill radius anyway — but once flex-wrap folds the fields onto
     two or three rows (narrower desktop windows, or mobile), the box gets
     much taller and an uncapped 999px balloons with it, rounding hard
     enough to clip the outer fields' labels/selects. A fixed radius looks
     identical on the single-row case and stays sane once it wraps. */
  border-radius: 53px;
  background: linear-gradient(135deg, rgba(34, 31, 24, 0.8), rgba(21, 19, 15, 0.88));
  box-shadow: 0 0 22px -4px rgba(228, 197, 128, 0.22), inset 0 0 18px rgba(228, 197, 128, 0.05);
  backdrop-filter: blur(6px);
  opacity: 0;
  transform: scaleX(0.9);
  transform-origin: left center;
  transition: opacity 0.8s ease 0.2s, transform 0.9s cubic-bezier(.16,1,.3,1) 0.2s;
}
.filters-orb-wrap.is-open .filters-panel { grid-template-columns: 1fr; }
.filters-orb-wrap.is-open .filters-panel-inner { opacity: 1; transform: scaleX(1); }
.filters-panel .filter-field { flex-shrink: 0; width: 168px; }
.filters-reset-btn { flex-shrink: 0; }
@media (prefers-reduced-motion: reduce) {
  .filters-panel, .filters-panel-inner, .filters-orb-trigger-slot { transition: none; }
}
@media (max-width: 760px) {
  .filters-panel-inner { padding: 16px 20px; border-radius: 24px; max-width: calc(100vw - 48px); }
  .filters-panel .filter-field { width: 140px; }
}

/* ---- Desktop-only: emblem slides via --orb-shift (set in JS), panel taken
   out of flow and anchored off the emblem's original center via left/right
   (also set in JS, since it depends on the panel's measured width) — see
   the comment above. Only `transform`/`opacity` animate here. ---- */
@media (min-width: 761px) {
  .filters-orb-wrap { min-height: 112px; }
  /* Opening: the emblem slides immediately, no delay. Its own 0.65s
     cubic-bezier(.16,1,.3,1) run is what the panel below waits out before
     it's allowed to reveal, so the panel never visibly arrives before the
     emblem has (the user's reported bug — both used to start together, so
     the panel finished sliding into place before the emblem even landed). */
  .filters-orb-wrap.is-open .filters-orb-trigger-slot {
    transform: translateX(var(--orb-shift, 0px));
    transition: transform 0.65s cubic-bezier(.16,1,.3,1);
  }
  .filters-panel {
    position: absolute;
    top: 50%;
    display: block;
    grid-template-columns: none;
    transition: none;
    pointer-events: none;
  }
  .filters-orb-wrap.is-open .filters-panel { pointer-events: auto; }
  .filters-panel-inner {
    /* width: max-content forces the true unwrapped size to be tried first;
       left as the flex container's default (auto) shrink-to-fit sizing,
       Chromium sizes a wrapping flex box too narrow and wraps the fields
       even when max-width would allow a single row. */
    width: max-content;
    max-width: min(1180px, calc(100vw - 260px));
    transform: translateY(-50%) scaleX(0.001);
    /* Closing: starts immediately (no delay); the emblem (delayed 0.15s,
       see .filters-orb-trigger-slot above) starts sliding back while this
       still has about a third of its retraction left, so the two motions
       overlap instead of running strictly back-to-back. */
    transition: opacity 0.4s ease, transform 0.45s cubic-bezier(.16,1,.3,1);
    will-change: transform, opacity;
  }
  .filters-orb-wrap.is-open .filters-panel-inner {
    transform: translateY(-50%) scaleX(1);
    /* Opening: starts while the emblem is still ~0.3s from finishing its
       0.65s slide (above), i.e. at 0.35s — overlapping the tail of the
       slide rather than waiting for it to fully stop, so the two read as
       one continuous motion instead of two separate steps with a pause
       between them. */
    transition: opacity 0.5s cubic-bezier(.16,1,.3,1) 0.35s, transform 0.55s cubic-bezier(.16,1,.3,1) 0.35s;
  }
}

.filter-field label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-ink-soft);
  margin-bottom: 6px;
  font-weight: 600;
}
.filter-field select {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-line);
  background: var(--color-ivory);
  color: var(--color-ink);
}
.filters-reset-row { display: flex; align-items: flex-end; }

.results-count { font-size: 0.9rem; color: var(--color-ink-soft); margin-bottom: 20px; }

/* ---- Properties page intro/filters: blended into the carousel/grid below
   it (all three share one background painted on the .properties-dark-
   landscape wrapper around them — see that rule further down) with the
   header floating transparent on top, exactly like the homepage hero
   (site-header-overlay is applied to this page too — see header() in
   build.py). The margin-top that cancels the global #main padding-top so
   this whole group — not a gap — starts right behind the header now lives
   on that wrapper, not here (see its own comment for why). .section-dark
   (already applied alongside this class) covers the eyebrow/p/h2/h3
   colors; the rest (h1, the demo-notice banner, filter labels/selects,
   results-count) need their own overrides since .section-dark doesn't
   reach them and their light-theme defaults (dark-on-near-white) would be
   unreadable here. ---- */
.properties-hero-dark {
  position: relative;
  overflow: hidden;
  padding-top: calc(var(--header-h) + 56px);
  padding-bottom: 48px;
  /* Cancel .section-dark's own flat charcoal (applied alongside this class
     in build.py) so .properties-dark-landscape's gradient, painted on the
     shared wrapper around this + the carousel + the grid shell, shows
     through instead of being fully covered by an opaque child background. */
  background: none;
}
.properties-hero-dark > .container { position: relative; z-index: 1; }
.properties-hero-dark h1 { color: var(--color-ivory); }
.properties-hero-dark .demo-notice {
  background: rgba(217, 142, 88, 0.14);
  border-color: rgba(217, 142, 88, 0.35);
  color: #e6b483;
}
.properties-hero-dark .filter-field label { color: rgba(250, 246, 239, 0.6); }
.properties-hero-dark .filter-field select {
  background: var(--color-charcoal-soft);
  border-color: rgba(250, 246, 239, 0.18);
  color: var(--color-ivory);
}
.properties-hero-dark .results-count { color: rgba(250, 246, 239, 0.6); }

/* ---- Filters view-toggle row: the Carousel/Grid switch now lives inside
   the filters orb's hidden-until-opened system too, alongside the filter
   fields — closed, the whole row sits invisible, scaled down and (on
   desktop) translated to the orb trigger's own position, so opening it
   reads as the view toggle launching out of the emblem and settling into
   its normal spot, timed to land alongside the filter panel's own reveal
   (same 0.35s delay as .filters-panel-inner below). initFiltersOrb()
   (main.js) measures the trigger's and this row's centers on open and
   writes the delta as --toggle-closed-transform; on mobile that measuring
   is skipped (gated behind the same desktop-only check that gates the
   panel's own absolute positioning), so the row just scales in from
   --toggle-closed-transform's fallback (a plain scale, no travel) —
   fitting for a layout where everything already stacks vertically in
   flow. Only `transform`/`opacity` ever animate, so like the rest of this
   component it stays compositor-driven. ---- */
.filters-view-toggle-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  opacity: 0;
  pointer-events: none;
  transform: var(--toggle-closed-transform, scale(0.85));
  transition: opacity 0.4s ease, transform 0.45s cubic-bezier(.16,1,.3,1);
  will-change: transform, opacity;
}
.filters-view-toggle-row.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(0, 0) scale(1) rotate(0deg);
  transition: opacity 0.5s cubic-bezier(.16,1,.3,1) 0.35s, transform 0.55s cubic-bezier(.16,1,.3,1) 0.35s;
}
@media (prefers-reduced-motion: reduce) {
  .filters-view-toggle-row { transition: none; }
}

/* ---- Carousel/grid view toggle: lets the visitor swap the 3D carousel for
   a plain grid of the same cards. Both views read the same
   [data-property-card] elements the filter bar already shows/hides (see
   .property-grid below and properties-carousel.js's collectVisibleProperties())
   — this toggle only ever changes which container is visible, never which
   cards. Driven by initPropertiesViewToggle() in main.js, which just flips
   a class on <body>; CSS below does the actual showing/hiding. */
.view-toggle {
  display: inline-flex;
  border: 1px solid rgba(250, 246, 239, 0.18);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.view-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 0.82rem;
  font-family: inherit;
  color: rgba(250, 246, 239, 0.6);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.view-toggle-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.view-toggle-btn + .view-toggle-btn { border-left: 1px solid rgba(250, 246, 239, 0.18); }
.view-toggle-btn.is-active { background: var(--color-gold); color: var(--color-charcoal); }
.view-toggle-btn:not(.is-active):hover { background: rgba(250, 246, 239, 0.08); }
@media (max-width: 520px) { .view-toggle-btn span { display: none; } }

body.properties-view-grid .property-carousel-wrap { display: none; }
body.properties-view-grid .properties-grid-shell { display: block; }
body.properties-view-grid .property-grid { display: grid; }

/* Below 761px the WebGL carousel never initializes (see the matching
   desktop-only gate at the top of properties-carousel.js) — its stage/arc
   math was never built for a narrow phone viewport. Force the plain grid on
   regardless of the carousel/grid toggle's own (desktop-only) state, and
   hide the toggle itself since there's nothing to switch to. */
@media (max-width: 760px) {
  .filters-view-toggle-row { display: none; }
  .property-carousel-wrap { display: none !important; }
  /* !important: both .properties-grid-shell and .property-grid have later,
     unconditional display:none base rules further down the stylesheet
     (they're normally only shown via the body.properties-view-grid class) —
     without !important, source order would let those later rules win over
     this media query at matching widths regardless of specificity. */
  .properties-grid-shell { display: block !important; }
  .property-grid { display: grid !important; }
}

/* ---- Property carousel: a WebGL (Three.js) scene that is the ONLY visible
   display of properties on this page — a curved arc of cards the visitor
   scrolls through, modeled on jesperlandberg.com, with the centred card
   scaling/brightening into focus and the rest dimming and shrinking away
   (see the focus-weighting block in properties-carousel.js's tick()).
   Driven by assets/js/properties-carousel.js, which reads the exact same
   [data-property-card] elements the filter bar already shows/hides, so the
   carousel's card set always matches the active filters with no separate
   data source. .property-grid below is that data source only — permanently
   hidden, never a visible fallback — except if Three.js itself fails to
   load (network/WebGL failure), when properties-carousel.js reveals it so
   visitors still see something. */
.property-carousel-wrap {
  position: relative;
  /* Fallback only, before/unless JS overrides it: a flat 70vh per card,
     same as the old unconditional formula. properties-carousel.js now sets
     this element's height directly (inline style) once it knows the real
     rotation span a scroll through the ring actually needs — a flat
     per-card height doesn't track the ring layout's own angle-narrowing
     for larger card counts, so once there are enough cards to saturate
     that cap, this fallback allocates more scroll distance than the
     rotation can ever use. See buildCards() in properties-carousel.js. */
  height: calc(max(var(--count, 6), 3) * 70vh);
  /* No margin-bottom: a margin isn't painted by this element, so it would
     expose the page's default cream body background in the gap — exactly
     the stray light band between the dark carousel and the dark footer
     this was built to eliminate. The carousel should connect straight into
     the footer with nothing showing through. */
}
.property-carousel-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  /* No background of its own — .properties-dark-landscape's gradient,
     painted on the shared wrapper around the whole page, shows straight
     through while this stays visually pinned during scroll. */
}
/* The WebGL canvas (properties-carousel.js) is rendered with a transparent
   clear colour specifically so the gold-particles-canvas behind it (see
   below) shows through — both are absolutely positioned/inset:0 and sit on
   top of the plain charcoal background declared above. */
.property-carousel-stage canvas { display: block; width: 100%; height: 100%; }
.property-carousel-stage [data-carousel-canvas] { position: relative; z-index: 1; }
.property-carousel-wrap.is-empty { display: none; }

/* .property-grid itself is permanently display:none (pure data source for
   the carousel, see the big comment below) — but the plain <section> that
   wraps it still carries the sitewide `section { padding: 88px 0; }` rule,
   which rendered as a tall, empty cream-coloured band between the dark
   carousel and the dark footer with nothing visible inside it. Collapsing
   the shell itself removes that stray gap entirely. When the grid view IS
   switched on, it's given the same charcoal background as the carousel
   stage, so swapping views doesn't also swap the page from dark to light. */
.properties-grid-shell { display: none; position: relative; overflow: hidden; }
.properties-grid-shell > .container { position: relative; z-index: 1; }

/* Investment-focused closing CTA, static (sitewide .reveal fade only) —
   sits directly on .properties-dark-landscape's shared gradient background
   like every other section on this page, so no background of its own.
   Same centered-CTA pattern already used on the Buying Process and About
   pages (own rules, not a shared class, since each of those three contexts
   needed slightly different colors/spacing for its own background). */
.investment-cta { position: relative; z-index: 1; padding: 96px 0; text-align: center; }
@media (max-width: 720px) { .investment-cta { padding: 64px 0; } }
.investment-cta-inner { max-width: 620px; margin: 0 auto; }
.investment-cta .eyebrow { justify-content: center; color: var(--color-gold-bright); }
.investment-cta h2 { color: var(--color-ivory); font-size: clamp(1.8rem, 1.5rem + 1.2vw, 2.4rem); margin-bottom: 14px; }
.investment-cta p { color: rgba(250, 246, 239, 0.78); font-size: 1.05rem; line-height: 1.7; margin-bottom: 32px; }

/* Full-page backdrop for the Properties page: the same warm black-gold
   ground as the homepage's Instagram section (.section-starfield) — a soft
   off-centre glow plus static twinkling points — behind all three of this
   page's dark sections (filters/hero, the WebGL carousel stage, and the
   grid-view shell). Replaces the gold-particles.js falling-rain canvas this
   page used to run (removed entirely — no [data-gold-particles] elements
   left to drive it).
   This lives on ONE wrapper around all three sections, painted once across
   their combined height with normal (scrolling) attachment, rather than
   each section carrying its own copy of the background — a first attempt
   did the latter, which left a visible seam where two differently-sized
   sections met (each rendered the gradient's percentage-based positions
   against its own box, so the pattern visibly reset at the boundary), and
   a second attempt fixed the seam with background-attachment:fixed but
   that forces the browser to repaint this multi-layer gradient on every
   scroll frame instead of letting it composite normally — exactly what was
   making the whole page laggy/stuttery on scroll. A single non-fixed
   background on the common ancestor gets both right: one continuous image
   with no seam, painted once and scrolled by the compositor like any other
   background. The three sections themselves carry no background of their
   own, so this shows straight through them; .property-carousel-stage stays
   position:sticky as before, visually pinned while the wrapper's
   already-painted background scrolls normally underneath it. */
.properties-dark-landscape {
  position: relative;
  /* Deliberately NOT overflow:hidden, even though an earlier version had
     it here (to contain the ::before twinkle layer below, which turned out
     not to need it — inset:0 already keeps that pseudo-element exactly
     within this box, nothing to clip). overflow:hidden on ANY ancestor of
     a position:sticky element breaks its sticking — the fixed-looking pin
     stops working and it just scrolls past normally — which is exactly
     what silently broke .property-carousel-stage's sticky pin once this
     wrapper gained overflow:hidden: the stage scrolled away after its
     first ~100vh instead of staying pinned for the rest of this wrapper's
     (intentionally tall, for the scroll-driven ring rotation) height,
     leaving the remainder as a large blank gap before the footer.
     Pulls the WHOLE wrapper up behind the transparent floating header
     (site-header-overlay — see header() in build.py), same trick as
     .hero/.properties-hero-dark used on their own before this wrapper
     existed — it has to live here now, not on .properties-hero-dark,
     since that child's own negative margin-top only pulls itself up
     within this wrapper's normal flow, not the wrapper's own position
     relative to the page. .properties-hero-dark keeps only its
     padding-top, which pushes its actual content down below the header
     without affecting how far up the background reaches. */
  margin-top: calc(-1 * var(--header-h));
  background:
    radial-gradient(1.5px 1.5px at 8% 22%, rgba(228,197,128,0.9), transparent 60%),
    radial-gradient(1.5px 1.5px at 18% 68%, rgba(228,197,128,0.7), transparent 60%),
    radial-gradient(1px 1px at 27% 15%, rgba(250,246,239,0.8), transparent 60%),
    radial-gradient(1.5px 1.5px at 36% 82%, rgba(228,197,128,0.6), transparent 60%),
    radial-gradient(1px 1px at 44% 38%, rgba(250,246,239,0.7), transparent 60%),
    radial-gradient(1.5px 1.5px at 52% 60%, rgba(228,197,128,0.85), transparent 60%),
    radial-gradient(1px 1px at 61% 12%, rgba(250,246,239,0.6), transparent 60%),
    radial-gradient(1.5px 1.5px at 69% 76%, rgba(228,197,128,0.7), transparent 60%),
    radial-gradient(1px 1px at 77% 30%, rgba(250,246,239,0.8), transparent 60%),
    radial-gradient(1.5px 1.5px at 85% 55%, rgba(228,197,128,0.6), transparent 60%),
    radial-gradient(1px 1px at 93% 20%, rgba(250,246,239,0.7), transparent 60%),
    radial-gradient(1.5px 1.5px at 15% 45%, rgba(228,197,128,0.5), transparent 60%),
    radial-gradient(1px 1px at 58% 90%, rgba(250,246,239,0.6), transparent 60%),
    radial-gradient(900px 500px at 18% 0%, rgba(198,161,91,0.16), transparent 65%),
    radial-gradient(700px 500px at 85% 100%, rgba(198,161,91,0.14), transparent 65%),
    radial-gradient(120% 120% at 50% 20%, #241c10 0%, var(--color-charcoal) 55%, #0a0906 100%);
}
.properties-dark-landscape::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(1px 1px at 23% 52%, rgba(228,197,128,0.9), transparent 60%),
    radial-gradient(1px 1px at 48% 25%, rgba(250,246,239,0.8), transparent 60%),
    radial-gradient(1px 1px at 73% 68%, rgba(228,197,128,0.8), transparent 60%),
    radial-gradient(1px 1px at 91% 42%, rgba(250,246,239,0.7), transparent 60%),
    radial-gradient(1px 1px at 9% 80%, rgba(228,197,128,0.7), transparent 60%);
  animation: starfieldTwinkle 4.5s ease-in-out infinite alternate;
}

/* ---- Gold particle rain: a slow, glowing falling-stardust canvas behind
   the Properties page's dark sections (see gold-particles.js and the
   [data-gold-particles] attribute in build.py). Always absolutely
   positioned at z-index:0 within a positioned ancestor, so it sits behind
   that section's real content without taking up layout space itself. ---- */
.gold-particles-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  /* Starts invisible; gold-particles.js adds .is-revealed only once the
     field actually has particles drawn on it, so it fades up out of the
     dark instead of popping in a beat after the header/nav (plain HTML)
     has already painted. */
  opacity: 0;
  transition: opacity 2.2s ease-out;
}
.gold-particles-canvas.is-revealed {
  opacity: 1;
}

.property-grid {
  display: none;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  /* align-items (default stretch) is load-bearing here: every card in a
     row is stretched to match the tallest one, which is what makes equal
     card heights, aligned prices and bottom-pinned buttons work across a
     row with no JS and no fixed pixel height — see the comment on
     .property-card below for the rest of that mechanism. */
}
@media (max-width: 960px) { .property-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .property-grid { grid-template-columns: 1fr; } }

/* ---- Property card: editorial-style luxury listing card. Every card in a
   row ends up the same height via CSS Grid's default row-stretch (see
   .property-grid above) + this card being display:flex column with
   height:100% — no card ever sets a fixed pixel height itself, so a
   longer description never clips or overflows, it just makes every card
   in that row proportionally taller together.
   Within a card, .property-summary is the one flexible (flex:1) element:
   it absorbs however much extra height the row-stretch adds, which is
   what keeps .property-footer (bedrooms/price/button) landing at a
   consistent position from the BOTTOM of every card in a row regardless
   of how each one's title happened to wrap — "price aligns horizontally,
   button always at the bottom" falls out of that for free, without
   needing every element above it to be pixel-identical. ---- */
.property-card {
  background: #fff;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.property-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-soft); }
.property-media {
  position: relative;
  /* Slightly taller than the previous 4:3 (1.33) — still landscape enough
     that property exteriors don't crop awkwardly, but the photo now reads
     as the card's dominant element rather than a thumbnail. */
  aspect-ratio: 5 / 4;
  background: linear-gradient(135deg, #3a2f1c, #1c1812);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(250, 246, 239, 0.5);
}
.property-media svg { width: 40px; height: 40px; opacity: 0.6; }
.property-media .badge { position: absolute; top: 14px; inset-inline-start: 14px; }
.property-media.has-photo { background: var(--color-charcoal); overflow: hidden; }
.property-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.property-card:hover .property-media img { transform: scale(1.04); }
.property-body { padding: 24px; display: flex; flex-direction: column; gap: 12px; flex: 1; }

.property-meta { display: flex; flex-direction: column; gap: 4px; }
/* 1. Location — small, muted, refined */
.property-location {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* 2. Type + status */
.property-type-status { font-size: 0.84rem; color: var(--color-ink-soft); display: flex; gap: 6px; }

/* 3. Project name — the most prominent text after the photograph, along
   with price below. Reserves space for up to 2 lines (clamped, ellipsis
   beyond that) so an unusually long name can never push one card's title
   block taller than its row-mates, which would otherwise throw off how
   far down the page the description/footer start. */
.property-title {
  font-size: 1.2rem;
  line-height: 1.3;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.3em * 2);
}

/* 4. Short description — clamped to 3 lines; min-height reserves that same
   3-line block even when the real text is shorter, and flex:1 lets it (not
   the card) absorb the row's stretch-to-tallest height, so .property-footer
   below always sits a consistent distance up from the card's bottom edge. */
.property-summary {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--color-ink-soft);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.55em * 3);
  flex: 1;
}

.property-footer { display: flex; flex-direction: column; gap: 10px; }
/* 5. Bedrooms — using the actual listing data, never invented */
.property-beds {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.86rem;
  color: var(--color-ink);
}
.property-beds svg { width: 16px; height: 16px; color: var(--color-gold-deep); flex-shrink: 0; }
/* 6. Price — the other most prominent element, restrained (not oversized/
   glowing) champagne gold */
.property-price {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--color-gold-deep);
  font-weight: 700;
}
/* 7. View Details — every button the same height/width (block width here,
   consistent padding from the shared .btn-sm). .btn-outline-dark already
   gives it a refined outline style with a champagne-gold hover accent
   (see .btn-outline-dark:hover) — this just makes it full-width and adds
   a touch of breathing room above it. */
.property-cta { width: 100%; margin-top: 2px; }

/* ---- Listing-grid scroll-reveal: each card fades/rises/sharpens in on its
   OWN viewport entry (initPropertyCardReveal() in main.js adds "reveal",
   then "is-visible" once that specific card intersects — never a fixed
   timer and never "reveal everything after the first row"). Reuses the
   same opacity/translateY/blur convention as the property detail page's
   .detail-section.reveal below, just scoped to .property-card so the
   sitewide base .reveal (28px, no blur) stays untouched everywhere else.
   The "reveal" class is only ever added by JS right before observing, so a
   JS failure leaves cards in their normal always-visible state — nothing
   on this page ever depends on JS for content to be visible.
   Once the one-shot transition finishes, main.js removes both classes
   again (see settle() there) so the card falls back to the base
   .property-card rule's own fast 0.25s hover transition — without that
   handoff, hovering a card would stay stuck animating at this reveal's
   slower ~0.82s speed forever after it first appears. */
.property-card.reveal {
  opacity: 0;
  transform: translateY(32px);
  filter: blur(7px);
  transition: opacity 0.82s cubic-bezier(0.16, 1, 0.3, 1), transform 0.82s cubic-bezier(0.16, 1, 0.3, 1), filter 0.82s cubic-bezier(0.16, 1, 0.3, 1);
}
.property-card.reveal.is-visible { opacity: 1; transform: translateY(0); filter: blur(0); }
/* Short per-row cascade (left-to-right) rather than every card in a row
   popping in simultaneously — each card still only starts once ITS OWN
   intersection fires, this just offsets the three that fire together. */
.property-grid.reveal-group .property-card:nth-child(3n+2) { transition-delay: 0.08s; }
.property-grid.reveal-group .property-card:nth-child(3n+3) { transition-delay: 0.16s; }
@media (prefers-reduced-motion: reduce) {
  .property-card.reveal { transition: none; opacity: 1; transform: none; filter: none; }
}

/* ===========================================================================
   Property detail page — editorial luxury showcase. Every section below
   (.detail-section, plus the gallery) fades/rises/sharpens in independently
   as the visitor scrolls to it (see the blur-to-sharp .reveal override at
   the bottom of this block), matching the sitewide .reveal mechanism
   already used elsewhere (IntersectionObserver-driven, one-shot, respects
   prefers-reduced-motion) — no new JS needed for the scroll animation
   itself, just these section classes opting into the shared system.
   =========================================================================== */
/* calc(header-h + 32px), not a flat 32px: this section is the first thing
   in #main on every property detail page, and those pages render inside
   .properties-dark-landscape (page_key "properties" — see page_shell() in
   build.py), whose own -header-h margin-top pulls the whole wrapper up so
   its gradient reaches behind the transparent header. That cancels out
   #main's usual padding-top: var(--header-h) compensation (the wrapper's
   negative margin and #main's padding net to zero), so without adding the
   header's height back in here, this section's content started right at
   the very top of the viewport — behind the header — clipping "Back to
   Properties" under the logo instead of below it. .properties-hero-dark
   already does exactly this (calc(var(--header-h) + 56px)) for the same
   reason, on the listing page that shares this same wrapper. */
.detail-gallery-section { padding-top: calc(var(--header-h) + 32px); padding-bottom: 0; }
.detail-back-link { margin-bottom: 20px; }

/* ---- 1. Stacked gallery — a hero tile plus up to three secondary tiles in
   a deliberately asymmetrical composition (varied sizes, not a uniform
   grid), one fixed layout per photo count so it's never a half-empty grid.
   A single photo just fills the hero slot; 4+ photos always show exactly
   four tiles, with a "+N / View All Photos" overlay on the last one if
   there are more. Every tile is a real <button> (keyboard- and
   screen-reader-operable) that opens the lightbox at its own index. ---- */
.detail-gallery {
  position: relative;
  display: grid;
  gap: 14px;
  height: 560px;
  margin-bottom: 8px;
}
.detail-gallery-n1 { grid-template-columns: 1fr; height: auto; aspect-ratio: 16/9; }
.detail-gallery-n2 { grid-template-columns: 1.6fr 1fr; }
.detail-gallery-n3 { grid-template-columns: 1.6fr 1fr; grid-template-rows: 1.15fr 1fr; }
.detail-gallery-n4plus { grid-template-columns: 1.6fr 1fr 1fr; grid-template-rows: 1fr 1fr; }

.detail-gallery-n2 .gallery-tile-0,
.detail-gallery-n3 .gallery-tile-0,
.detail-gallery-n4plus .gallery-tile-0 { grid-column: 1; grid-row: 1 / -1; }
.detail-gallery-n2 .gallery-tile-1 { grid-column: 2; grid-row: 1; }
.detail-gallery-n3 .gallery-tile-1 { grid-column: 2; grid-row: 1; }
.detail-gallery-n3 .gallery-tile-2 { grid-column: 2; grid-row: 2; }
.detail-gallery-n4plus .gallery-tile-1 { grid-column: 2 / 4; grid-row: 1; }
.detail-gallery-n4plus .gallery-tile-2 { grid-column: 2; grid-row: 2; }
.detail-gallery-n4plus .gallery-tile-3 { grid-column: 3; grid-row: 2; }

.gallery-tile {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: none;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  background: var(--color-charcoal);
}
.gallery-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.gallery-tile:hover img,
.gallery-tile:focus-visible img { transform: scale(1.03); }
.gallery-tile:focus-visible { outline: 2px solid var(--color-gold); outline-offset: 2px; }
/* A count badge, not a second "View All Photos" action (see the comment in
   build_property_detail() on more_overlay) — the "+N" text sits in a soft
   bottom-corner gradient scrim, not the old flat 60%-opacity cover, so the
   photo underneath stays visible rather than being hidden behind it. */
.gallery-tile-more {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 16px;
  background: linear-gradient(200deg, transparent 55%, rgba(21, 19, 15, 0.6) 100%);
  color: var(--color-ivory);
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  pointer-events: none;
}

/* One clear, always-present gallery CTA (per-tile "+N" above is purely a
   count indicator, not a second action) — a discreet pill in the gallery's
   own bottom-right corner, visible and keyboard-reachable regardless of
   photo count. */
.gallery-view-all {
  position: absolute;
  bottom: 18px;
  inset-inline-end: 18px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  border: none;
  background: rgba(21, 19, 15, 0.72);
  backdrop-filter: blur(6px);
  color: var(--color-ivory);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.gallery-view-all svg { width: 16px; height: 16px; }
.gallery-view-all:hover { background: rgba(21, 19, 15, 0.9); }
.gallery-view-all:focus-visible { outline: 2px solid var(--color-gold); outline-offset: 2px; }

.detail-gallery-empty {
  display: block;
  height: auto;
  aspect-ratio: 16/8;
  background: linear-gradient(135deg, #3a2f1c, #1c1812);
  border-radius: var(--radius-lg);
}
.detail-gallery-placeholder {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: rgba(250, 246, 239, 0.55);
  text-align: center;
  padding: 24px;
}
.detail-gallery-placeholder svg { width: 56px; height: 56px; opacity: 0.5; }
.detail-gallery-placeholder span { font-size: 0.82rem; max-width: 360px; }

@media (max-width: 760px) {
  .detail-gallery:not(.detail-gallery-n1) {
    height: auto;
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 82%;
    grid-template-rows: none;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .detail-gallery:not(.detail-gallery-n1)::-webkit-scrollbar { display: none; }
  .detail-gallery:not(.detail-gallery-n1) .gallery-tile {
    grid-column: auto !important;
    grid-row: auto !important;
    aspect-ratio: 4/3;
    height: auto;
    scroll-snap-align: center;
  }
  .detail-gallery-n1 { aspect-ratio: 4/3; }
  .gallery-view-all { bottom: 12px; inset-inline-end: 12px; padding: 8px 14px; font-size: 0.76rem; }
}

/* ---- Fullscreen lightbox: opened by any gallery tile or "View All
   Photos", browses the FULL photo set (not just the four composed tiles)
   via data-images on .detail-gallery. Previous/Next, Escape-to-close and
   arrow-key navigation are handled by initPropertyGallery() in main.js. ---- */
.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(10, 9, 6, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
}
.gallery-lightbox[hidden] { display: none; }
.lightbox-stage { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; padding: 72px 88px; }
.lightbox-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: var(--radius-sm); }
.lightbox-close,
.lightbox-nav {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(250, 246, 239, 0.1);
  border: 1px solid rgba(250, 246, 239, 0.25);
  border-radius: 50%;
  color: var(--color-ivory);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.lightbox-close:hover,
.lightbox-nav:hover { background: rgba(250, 246, 239, 0.18); border-color: var(--color-gold-bright); }
.lightbox-close { top: 24px; inset-inline-end: 24px; width: 44px; height: 44px; }
.lightbox-close svg { width: 18px; height: 18px; }
.lightbox-nav { top: 50%; transform: translateY(-50%); width: 52px; height: 52px; }
.lightbox-nav svg { width: 20px; height: 20px; }
.lightbox-prev { inset-inline-start: 20px; }
.lightbox-prev svg { transform: rotate(180deg); }
.lightbox-next { inset-inline-end: 20px; }
.lightbox-counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-size: 0.88rem;
  letter-spacing: 0.06em;
  color: rgba(250, 246, 239, 0.75);
}
@media (max-width: 640px) {
  .lightbox-stage { padding: 56px 16px; }
  .lightbox-nav { width: 44px; height: 44px; }
  .lightbox-prev { inset-inline-start: 8px; }
  .lightbox-next { inset-inline-end: 8px; }
}

/* ---- 2. Title and overview ---- */
.detail-overview { padding: 44px 0 0; }
.detail-overview .badge { margin-bottom: 14px; }
.detail-location {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-gold-deep);
  margin-bottom: 10px;
}
.detail-location svg { width: 15px; height: 15px; }
.detail-overview h1 { font-size: clamp(1.9rem, 1.5rem + 1.8vw, 2.6rem); margin-bottom: 8px; }
.detail-type-status { font-size: 0.92rem; color: var(--color-ink-soft); margin-bottom: 14px; }
.detail-lede { font-size: 1.04rem; max-width: 720px; margin-bottom: 18px; }
.detail-price { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: var(--color-gold-deep); }

/* ---- 3. Key information strip ---- */
/* Grid, not flex-wrap — with 5-6 items of varying content length (and no
   fixed item count, since fields are hidden when missing), flex-wrap plus
   per-item border/margin left a trailing divider "dangling" into empty
   space whenever the row broke unevenly (e.g. 5 items fitting a row and a
   lone 6th wrapping below). A fixed column count always wraps in full
   rows, and the nth-child rules below remove the divider only from the
   item actually at the end of a row / in the first row, which stays
   correct regardless of how many fields a given property has. */
.detail-info-strip { padding: 30px 0; }
.info-strip-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--color-line);
  border-bottom: 1px solid var(--color-line);
}
.info-strip-grid > .info-strip-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px 16px;
  border-inline-end: 1px solid var(--color-line);
}
.info-strip-grid > .info-strip-item:nth-child(2n),
.info-strip-grid > .info-strip-item:last-child {
  border-inline-end: none;
}
.info-strip-grid > .info-strip-item:nth-child(n+3) {
  border-top: 1px solid var(--color-line);
}
.info-strip-item svg { width: 20px; height: 20px; color: var(--color-gold-deep); flex-shrink: 0; }
/* Bumped from 0.7rem — readable at a glance without squinting, per the
   "avoid very small text" requirement, still clearly secondary to the
   value beneath it. */
.info-strip-label { display: block; font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--color-ink-soft); }
.info-strip-value { display: block; font-size: 0.94rem; font-weight: 600; color: var(--color-charcoal); line-height: 1.3; word-break: break-word; }
@media (min-width: 641px) {
  .info-strip-grid { grid-template-columns: repeat(3, 1fr); }
  .info-strip-grid > .info-strip-item { padding: 17px 24px; }
  .info-strip-grid > .info-strip-item:nth-child(2n) { border-inline-end: 1px solid var(--color-line); }
  .info-strip-grid > .info-strip-item:nth-child(3n),
  .info-strip-grid > .info-strip-item:last-child { border-inline-end: none; }
  .info-strip-grid > .info-strip-item:nth-child(n+3) { border-top: none; }
  .info-strip-grid > .info-strip-item:nth-child(n+4) { border-top: 1px solid var(--color-line); }
}

/* ---- 4. Description, pricing & payment plan ---- */
/* Narrowed from 1.7fr/56px and the form column widened to match — the
   inquiry form's own fields need the room for a comfortable 2-up row
   (name/phone, budget/timeline etc.), and a narrower gap between columns
   reads as one connected section rather than two separate floating
   panels, addressing the unbalanced-looking gap below the (shorter)
   description+pricing column versus the (taller) form column. */
.detail-content { padding: 20px 0 72px; }
.detail-content-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 44px; align-items: start; }
@media (max-width: 960px) { .detail-content-grid { grid-template-columns: minmax(0, 1fr); } }
.detail-content-main h2 { font-size: 1.3rem; margin-bottom: 12px; }
.detail-content-main > p { max-width: 680px; line-height: 1.75; }

.detail-pricing-block {
  margin-top: 28px;
  padding: 28px;
  background: var(--color-cream);
  border-radius: var(--radius-md);
}
.detail-pricing-block .eyebrow { margin-bottom: 10px; }
.detail-pricing-value { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; color: var(--color-gold-deep); margin-bottom: 10px; }
.detail-payment-note { font-size: 0.88rem; color: var(--color-ink-soft); max-width: 560px; }
.detail-pricing-block .btn { margin-top: 6px; white-space: normal; text-align: center; line-height: 1.3; }
.detail-pricing-block .btn:focus-visible { outline: 2px solid var(--color-gold-deep); outline-offset: 2px; }

/* ---- 6. Inquiry panel — sticky on desktop. Warm ivory rather than the
   site's other lead-capture cards' pure white (.lead-card elsewhere is
   left exactly as it was — this is a scoped look for this one panel, not
   a shared-component change), with its own scoped field refinements below
   so the shared .form-field rules (used by the Home/Contact forms too)
   stay untouched. ---- */
.detail-inquiry-panel {
  background: var(--color-ivory);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  padding: 30px;
  position: sticky;
  top: calc(var(--header-h) + 24px);
  box-shadow: var(--shadow-card);
}
.detail-inquiry-panel h2 { font-size: 1.25rem; margin-bottom: 8px; }
.detail-inquiry-panel > p { font-size: 0.89rem; margin-bottom: 20px; }
.detail-inquiry-panel .form-grid { gap: 16px 18px; }
.detail-inquiry-panel .form-field { gap: 8px; }
.detail-inquiry-panel .form-field label { font-size: 0.84rem; letter-spacing: 0.01em; }
.detail-inquiry-panel .form-field input,
.detail-inquiry-panel .form-field select,
.detail-inquiry-panel .form-field textarea {
  background: #fff;
  min-height: 48px;
  padding: 14px 16px;
  font-size: 0.96rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
/* A premium glow ring rather than the sitewide default's plain 2px
   outline — scoped here for the same reason as everything else in this
   block, not a shared-component change. */
.detail-inquiry-panel .form-field input:focus,
.detail-inquiry-panel .form-field select:focus,
.detail-inquiry-panel .form-field textarea:focus {
  outline: none;
  border-color: var(--color-gold);
  box-shadow: 0 0 0 3px rgba(198, 161, 91, 0.22);
}
/* The consent checkbox is also an <input> inside a .form-field (the
   wrapper that gives the consent row full grid width), so the blanket
   rules above — meant for text/select/textarea fields — were also
   stretching it to width:100%/min-height:48px, collapsing the consent
   label next to it to 0 width and pushing "Privacy Policy" out past the
   card. Restore the checkbox's own small, native size. */
.detail-inquiry-panel .form-field input[type="checkbox"] {
  width: auto;
  min-height: auto;
  background: initial;
}
.detail-inquiry-panel .consent-row { margin: 20px 0 16px; }
.detail-inquiry-panel button[type="submit"] { margin-top: 4px; padding: 15px 20px; font-size: 0.98rem; }
/* Restrained WhatsApp green — the stock #25D366 brand green reads as
   visually louder than the rest of the champagne-gold/charcoal palette
   next to it. Reuses the sitewide --color-success token (already a muted
   green elsewhere in the design system) instead of inventing a new color,
   scoped to just this CTA so the shared .btn-whatsapp class other pages
   use (Home, Contact, agent cards) is untouched. The separate floating
   WhatsApp button (.whatsapp-float, further down this file) got the same
   "too loud a green" treatment independently, for the same reason. */
.detail-whatsapp-cta {
  margin-top: 14px;
  background: var(--color-success);
  color: var(--color-ivory);
  white-space: normal;
  text-align: center;
  line-height: 1.3;
}
.detail-whatsapp-cta:hover { filter: brightness(1.08); }
.detail-whatsapp-cta:focus-visible { outline: 2px solid var(--color-success); outline-offset: 2px; }
@media (max-width: 960px) {
  .detail-inquiry-panel { position: static; margin-top: 8px; }
}
@media (max-width: 640px) {
  .detail-inquiry-panel { padding: 26px; }
}
/* A little breathing room above the panel when the "Request Current Prices
   & Payment Plans" CTA scrolls here — without this the heading lands
   exactly flush with the viewport's top edge. */
#property-inquiry { scroll-margin-top: 24px; }

/* ---- 7. Related properties ---- */
.detail-related { padding: 24px 0 96px; }
.detail-related .section-head h2 { margin-bottom: 8px; }
/* max-width keeps three cards from stretching oversized on very wide
   desktop viewports, while staying full-width below that — "proportional
   to the surrounding page," not a full-bleed 1920px-wide row of three. */
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; max-width: 1080px; margin-inline: auto; }
@media (max-width: 960px) { .related-grid { grid-template-columns: repeat(2, 1fr); max-width: none; } }
@media (max-width: 640px) { .related-grid { grid-template-columns: 1fr; max-width: 460px; } }

.disclosure-box {
  background: rgba(91, 85, 74, 0.08);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-sm);
  padding: 18px;
  font-size: 0.86rem;
  margin-top: 28px;
}

/* The whole detail page renders inside .properties-dark-landscape (the
   same dark page-background wrapper the Properties listing uses) — every
   element above that sits directly on that background, rather than inside
   one of the page's own light cards (.detail-pricing-block,
   .detail-inquiry-panel, the white .property-card tiles in .related-grid,
   all left alone below), was still using the sitewide light-page defaults
   (near-black ink text, near-black hairline borders), which read as
   barely-legible dark-on-dark. Re-asserts ivory/light tones for just those
   elements, same fix as every other "light content directly on a dark
   section" spot elsewhere in this file. */
.detail-overview h1,
.detail-content-main h2,
.detail-related .section-head h2 { color: var(--color-ivory); }
.detail-type-status,
.detail-lede,
.detail-content-main > p { color: rgba(250, 246, 239, 0.75); }
.info-strip-grid { border-top-color: var(--color-line-dark); border-bottom-color: var(--color-line-dark); }
.info-strip-item { border-inline-end-color: var(--color-line-dark); border-top-color: var(--color-line-dark); }
.info-strip-label { color: rgba(250, 246, 239, 0.55); }
.info-strip-value { color: var(--color-ivory); }
.detail-gallery-section .badge-demo,
.detail-overview .badge-demo { background: rgba(228, 197, 128, 0.18); color: var(--color-gold-bright); }
.detail-content-main .disclosure-box { color: rgba(250, 246, 239, 0.75); border-color: var(--color-line-dark); }

/* ---- 9. Scroll reveal — blur-to-sharp, per spec (opacity 0 -> 1, ~30px
   rise, soft blur-to-sharp, ~800ms, independent per section, no replay).
   Same scoped-override convention as .stack-intro/.final-cta elsewhere:
   the shared sitewide .reveal (28px, no blur) stays untouched for every
   other page, this only strengthens it within the detail page's own
   sections + the gallery block itself. */
.detail-gallery.reveal,
.detail-section.reveal {
  transform: translateY(30px);
  filter: blur(6px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), filter 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.detail-gallery.reveal.is-visible,
.detail-section.reveal.is-visible { transform: translateY(0); filter: blur(0); }

/* ---- Forms ---- */
/* minmax(0, 1fr), not a bare 1fr — a <select>'s rendered width defaults to
   its widest <option> text (e.g. "Golden Visa Information", "Immediately /
   within 30 days") and an <input> defaults to its UA size attribute; with
   no min-width floor on the track, a grid column grows to fit that
   intrinsic content instead of the card, pushing fields past its edge. The
   width: 100% below is the other half of the fix — it makes the field fill
   whatever width the (now properly capped) track actually resolves to. */
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }
.form-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.form-field[hidden] { display: none; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-size: 0.82rem; font-weight: 600; color: var(--color-ink); }
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--color-ink);
  font-size: 0.95rem;
}
/* The consent checkbox lives in its own .form-field (full-width wrapper
   for the consent row), so it's also an <input> matched above — without
   this, width: 100% stretches it across the whole row, collapsing its
   label to zero width. Same fix on every form that uses .form-grid
   (Home/Contact/property), not just this page. */
.form-field input[type="checkbox"],
.form-field input[type="radio"] {
  width: auto;
  padding: 0;
  border: none;
  background: initial;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: 2px solid var(--color-gold);
  outline-offset: 1px;
}
.form-field textarea { resize: vertical; min-height: 96px; }
.field-error { color: var(--color-error); font-size: 0.78rem; display: none; }
.form-field.invalid input,
.form-field.invalid select,
.form-field.invalid textarea { border-color: var(--color-error); }
.form-field.invalid .field-error { display: block; }

.consent-row { display: flex; align-items: flex-start; gap: 10px; margin: 18px 0; }
.consent-row input { margin-top: 3px; flex-shrink: 0; }
.consent-row label { font-size: 0.85rem; color: var(--color-ink-soft); min-width: 0; }
.consent-row a { color: var(--color-gold-deep); text-decoration: underline; }

.form-demo-notice {
  background: rgba(91, 85, 74, 0.08);
  border: 1px dashed var(--color-line);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 0.82rem;
  color: var(--color-ink-soft);
  margin-bottom: 20px;
}

/* Honeypot: invisible to real visitors and screen readers, but present in
   the DOM/tab order removed, so simple bots that fill every field trip it. */
.hp-field {
  position: absolute;
  /* left is the fallback for browsers without logical insets; inset-inline-start
     (true fallback-aware override below) keeps this off the side that doesn't
     inflate scrollWidth in RTL, where plain left: -9999px was bleeding into
     document.body.scrollWidth and producing a large phantom horizontal
     scroll region on every fa page. */
  left: -9999px;
  inset-inline-start: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-error-banner {
  background: rgba(179, 70, 60, 0.08);
  border: 1px solid rgba(179, 70, 60, 0.3);
  color: var(--color-error);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  margin-top: 16px;
}
.form-error-banner a { text-decoration: underline; font-weight: 600; }

button[disabled] { opacity: 0.7; cursor: not-allowed; }

.lead-card {
  background: #fff;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  padding: 44px;
  box-shadow: var(--shadow-card);
}
@media (max-width: 640px) { .lead-card { padding: 26px; } }

.form-success {
  display: none;
  text-align: center;
  padding: 30px 10px;
}
.form-success.visible { display: block; }
.form-success .icon-circle {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: rgba(76, 122, 90, 0.14);
  color: var(--color-success);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 18px;
}
.form-success .icon-circle svg { width: 26px; height: 26px; }

/* ---- About page: opening editorial section ---- */
/* Static only — no .reveal here, matching the brief's "do not add scroll
   effects" for this section; the page already uses the sitewide .reveal
   fade further down (agent-grid, why-choose-grid) and the stronger
   .ebtesam-intro treatment on the founder section below, both pre-existing
   patterns reused as-is, not new animation code. */
.about-intro h1 {
  font-size: clamp(2.1rem, 1.7rem + 2vw, 3.2rem);
  max-width: 680px;
  margin-bottom: 20px;
}
.about-lede { font-size: 1.1rem; color: var(--color-ink); line-height: 1.6; }
.about-intro .section-head p:not(.about-lede) { max-width: 600px; }

/* Small role line under her name in the founder section (reuses the
   already-localized agentEbtesamRole string — see build_about() — rather
   than the English-only site-config role field). */
.advisor-role { color: var(--color-gold-bright); font-weight: 600; font-size: 0.95rem; margin-top: -8px; margin-bottom: 18px; }

/* ---- About page: "Why Clients Choose EBTESAM" — editorial 3-column
   layout with a minimal gold index number per item rather than icon
   cards, per the brief's explicit "avoid oversized icon cards" direction.
   Uses the sitewide .reveal-group stagger, same as .agent-grid below.
   The section heading had no font-size rule anywhere (just the bare
   h1,h2,h3,h4 default, no size of its own) — the literal cause of the
   "very small headings" complaint — so .why-choose-section .section-head
   h2 below is a genuine fix, not a stylistic preference. ---- */
/* Padding/margin trimmed slightly (120->104, 64->48 before the grid) —
   the section itself wasn't too tall, but the gap between the heading
   and the three principles read as dead space once the heading grew. */
.why-choose-section { padding: 104px 0; }
@media (max-width: 720px) { .why-choose-section { padding: 72px 0; } }
.why-choose-section .section-head h2 {
  font-size: clamp(2.1rem, 1.75rem + 1.6vw, 2.9rem);
  margin-top: 12px;
}
.why-choose-section .section-head { margin-bottom: 48px; }
.why-choose-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 56px;
  margin-top: 16px;
}
@media (max-width: 860px) { .why-choose-grid { grid-template-columns: 1fr; gap: 44px; max-width: 520px; margin-inline: auto; } }
.why-choose-item { padding-top: 26px; border-top: 1px solid var(--color-line); }
.why-choose-index {
  display: block;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--color-gold-deep);
  margin-bottom: 20px;
}
.why-choose-item h3 { font-size: 1.5rem; margin-bottom: 14px; }
.why-choose-item p { font-size: 1.02rem; line-height: 1.65; margin-bottom: 0; }

/* ---- About page: architectural moment ----
   One full-width image (john-richmond-district/lobby.jpg, EBTESAM's own
   listing photography, not developer promotional material) between the
   philosophy and international sections — the brief's explicit fix for
   "too much unused ivory background, not enough architectural imagery."
   background-position favors the ornate glass screen/revolving-door side
   of the photo over the lobby's own "JR" wall signage further right, so
   that building-specific branding isn't the focal point of an EBTESAM
   page. Static image, no new motion — just a gradient + one caption
   line, per "avoid distracting visual effects." */
.about-architectural {
  position: relative;
  /* Was 56vh/560px cap — read as a thin band squeezed between two tall
     padded ivory sections, closer to a strip than "a striking full-width
     luxury architectural image." Scaled up to near-hero dominance instead,
     on request. */
  height: 85vh;
  min-height: 520px;
  max-height: 820px;
  background-size: cover;
  background-position: 30% 45%;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
/* Refinement pass: the old caption (small italic serif, one line, a flat
   wash gradient) was reported as "almost invisible." The gradient here is
   now deliberately concentrated in the bottom ~45% where the text block
   actually sits (0.82 at the very bottom, tapering out fast) instead of a
   long, shallow diagonal wash — strong contrast right behind the words,
   most of the photograph still left clear above it, no heavy overlay
   across the whole image. */
.about-architectural-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(21, 19, 15, 0.82) 0%, rgba(21, 19, 15, 0.5) 20%, rgba(21, 19, 15, 0.1) 45%, transparent 68%);
}
.about-architectural-text {
  position: relative;
  z-index: 1;
  margin: 0 0 64px 64px;
  max-width: 580px;
}
.about-architectural-text .eyebrow { color: var(--color-gold-bright); margin-bottom: 16px; }
.about-architectural-text h2 {
  color: var(--color-ivory);
  font-size: clamp(2.1rem, 1.6rem + 2.2vw, 3.4rem);
  line-height: 1.1;
  margin: 0 0 14px;
}
.about-architectural-text p {
  color: rgba(250, 246, 239, 0.88);
  font-size: clamp(1rem, 0.92rem + 0.4vw, 1.2rem);
  margin: 0;
  max-width: 420px;
}
@media (max-width: 640px) {
  .about-architectural { height: 72vh; min-height: 460px; max-height: 660px; }
  .about-architectural-text { margin: 0 0 36px 24px; max-width: calc(100% - 48px); }
}

/* ---- About page: international note ----
   Replaces the old agent-grid pending cards. No cards, no avatars — just
   a short, honestly-worded paragraph distinguishing site language
   availability (all four languages, real) from advisor language
   capability (Ebtesam herself speaks English/Persian; Russian/Ukrainian
   inquiries are welcomed and coordinated, not staffed by a dedicated
   same-language consultant, since that isn't confirmed yet).
   Refinement pass: was a single centered column in a lot of cream
   background ("lacks visual presence") — now a proper two-column
   editorial layout (eyebrow+heading left, copy+language list right),
   same asymmetric-but-balanced logic as the portrait-split hero above. */
.about-international { padding: 112px 0; }
@media (max-width: 720px) { .about-international { padding: 72px 0; } }
.about-international-grid {
  display: grid;
  grid-template-columns: 0.85fr 1fr;
  gap: 64px;
  align-items: start;
}
@media (max-width: 860px) { .about-international-grid { grid-template-columns: 1fr; gap: 28px; } }
.about-international-head .eyebrow { margin-bottom: 16px; }
.about-international h2 { font-size: clamp(2rem, 1.65rem + 1.8vw, 2.7rem); margin: 0; line-height: 1.12; }
.about-international-copy { max-width: 480px; }
.about-international p { font-size: 1.08rem; line-height: 1.75; color: var(--color-ink-soft); margin-bottom: 0; }
.about-international-languages {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--color-line);
}
/* font-sans, not font-display: this row always shows all four language
   names together (English/Persian/Russian/Ukrainian) regardless of which
   locale the page is in, so it needs reliable glyph coverage across
   Latin/Arabic/Cyrillic scripts at once — Playfair Display doesn't carry
   Arabic at all. */
.about-international-languages span {
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--color-gold-deep);
}

/* ---- About page: closing consultation CTA ----
   Refinement pass: bigger, more deliberate heading width (560px, so the
   line breaks are chosen, not accidental), plus a soft off-center radial
   gold glow behind the heading — pure CSS, no new photo — for the "private
   invitation, not a generic marketing banner" feel the brief asked for. */
.about-closing-cta {
  position: relative;
  padding: 144px 0;
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(640px 420px at 50% 15%, rgba(198, 161, 91, 0.16), transparent 70%),
    var(--color-charcoal);
}
@media (max-width: 720px) { .about-closing-cta { padding: 88px 0; } }
.about-closing-cta-inner { position: relative; max-width: 640px; margin: 0 auto; }
.about-closing-cta h2 {
  color: var(--color-ivory);
  font-size: clamp(2.4rem, 1.9rem + 2.1vw, 3.4rem);
  line-height: 1.12;
  max-width: 560px;
  margin: 0 auto 22px;
}
.about-closing-cta p { color: rgba(250, 246, 239, 0.78); font-size: 1.1rem; line-height: 1.7; margin-bottom: 40px; }

/* ---- Agent / people cards ---- */
.agent-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 28px; }
.agent-card {
  background: #fff;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  padding: 28px;
  text-align: center;
}
.avatar-placeholder {
  width: 108px; height: 108px;
  border-radius: 50%;
  margin: 0 auto 18px;
  background: linear-gradient(135deg, var(--color-cream), #e7dcc0);
  display: flex; align-items: center; justify-content: center;
  color: var(--color-gold-deep);
  border: 2px dashed var(--color-gold);
}
.avatar-placeholder svg { width: 40px; height: 40px; }
.avatar-photo {
  width: 108px; height: 108px;
  border-radius: 50%;
  margin: 0 auto 18px;
  object-fit: cover;
  object-position: top;
  border: 2px solid var(--color-gold);
}
.agent-card h3 { font-size: 1.05rem; margin-bottom: 2px; }
.agent-role { font-size: 0.82rem; color: var(--color-gold-deep); font-weight: 600; margin-bottom: 10px; }
.agent-bio { font-size: 0.86rem; }

/* ---- Portrait block (Meet Ebtesam) ---- */
.ebtesam-intro { padding: 112px 0; }
@media (max-width: 720px) { .ebtesam-intro { padding: 64px 0; } }
/* Photo column now reads as the larger, dominant half (was 0.8fr — smaller
   than the text column) per the client's ask to make the real award-event
   portrait the visual anchor of the section rather than a secondary element. */
/* Photo column is narrower than the old 1.15fr — that ratio was tuned for
   a 3:4 frame; now the frame matches the real photo's own tall ~9:16
   portrait shape (see .portrait-frame.has-photo below), so the same
   visual weight needs less width, not more. */
.portrait-split { display: grid; grid-template-columns: 0.9fr 1fr; gap: 72px; align-items: center; }
@media (max-width: 860px) { .portrait-split { grid-template-columns: 1fr; gap: 36px; } }
.portrait-col { max-width: 440px; margin-inline: auto; }
@media (min-width: 861px) { .portrait-col { max-width: none; margin-inline: 0; } }
.portrait-frame {
  aspect-ratio: 3/4;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, var(--color-cream), #e7dcc0);
  border: 2px dashed var(--color-gold);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--color-gold-deep);
  text-align: center;
  padding: 24px;
}
.portrait-frame svg { width: 56px; height: 56px; }
.portrait-frame span { font-size: 0.8rem; max-width: 220px; }
.portrait-frame.has-photo {
  /* Matches the real photo's own ~941x1672 (~9:16) portrait shape, instead
     of the placeholder state's 3:4 — at 3:4 showing the whole photo
     uncropped (object-fit:contain) left visible charcoal gutters down both
     sides, since the frame was noticeably squatter than the tall photo it
     held. Sized to the photo's own proportions, it fills edge to edge with
     no letterboxing at all. */
  aspect-ratio: 9/16;
  border: 1px solid rgba(228, 197, 128, 0.35);
  background: var(--color-charcoal);
  padding: 0;
  overflow: hidden;
  box-shadow: 0 28px 70px -24px rgba(0, 0, 0, 0.6);
}
/* contain, not cover: belt-and-suspenders now that .portrait-frame.has-photo
   is sized to the photo's own ~9:16 proportions (cover would crop the rare
   pixel of rounding difference between that and the photo's exact ratio;
   contain guarantees the whole photo — including her shoes — always shows,
   whole and uncropped, at the cost of nothing since the two ratios are
   already a near-exact match). */
.portrait-frame.has-photo img { width: 100%; height: 100%; object-fit: contain; }
.portrait-caption {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 18px 0 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.86rem;
  color: var(--color-gold-bright);
  text-align: center;
}
html[lang="fa"] .portrait-caption { font-family: var(--font-fa); font-style: normal; }
.portrait-caption svg { width: 16px; height: 16px; flex-shrink: 0; }
/* Refinement pass: widened 520->580 and every size below bumped up a
   step — "typography too small relative to the screen" was a sitewide
   About-page complaint, not isolated to one section. */
.portrait-copy { max-width: 580px; }
.portrait-copy p { font-size: 1.08rem; line-height: 1.7; }
/* Large editorial "Meet Ebtesam." heading — h1,h2,h3,h4's sitewide rule
   has no font-size of its own (every page sets its own scale), so this is
   the one new size declaration the merged hero section needs. */
.portrait-copy h1 {
  color: var(--color-ivory);
  font-size: clamp(2.7rem, 2rem + 3vw, 4.2rem);
  line-height: 1.05;
  margin-bottom: 12px;
}
.about-hero-subheading {
  font-family: var(--font-display);
  color: var(--color-gold-bright);
  font-size: clamp(1.2rem, 1.1rem + 0.6vw, 1.5rem);
  font-weight: 600;
  margin: 0 0 24px;
}
.about-hero-description {
  color: rgba(250, 246, 239, 0.85);
  font-size: 1.18rem;
  line-height: 1.65;
  margin-bottom: 24px;
}
.about-hero-languages { font-size: 0.92rem; color: rgba(250, 246, 239, 0.58); margin-top: 20px; margin-bottom: 0; }
/* Stronger fade/rise + blur-to-sharp focus pull than the sitewide .reveal
   (same scoped-override convention as .stack-intro / .guidance-intro above),
   with the text column trailing the photo by a beat so the two don't land
   in the same instant. */
.ebtesam-intro .reveal {
  transform: translateY(40px);
  filter: blur(6px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1), filter 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.ebtesam-intro .reveal.is-visible { transform: translateY(0); filter: blur(0); }
.ebtesam-intro .portrait-copy.reveal { transition-delay: 0.12s; }

/* ---- Final conversion section (homepage close): deep charcoal ground,
   restrained gold accents, generous spacing, and an elegant ivory form
   panel — the site's single most important conversion moment, so it gets
   more breathing room than any other section. ---- */
.final-cta { padding: 128px 0 136px; }
@media (max-width: 720px) { .final-cta { padding: 64px 0 72px; } }
.final-cta-inner { max-width: 640px; margin: 0 auto; text-align: center; }
.final-cta-intro .eyebrow { justify-content: center; }
.final-cta-intro h2 { font-size: clamp(1.9rem, 1.6rem + 1.3vw, 2.6rem); }
.final-cta-intro p { max-width: 520px; margin-inline: auto; font-size: 1.04rem; }
.final-cta-panel {
  margin-top: 48px;
  background: var(--color-ivory);
  border-radius: var(--radius-lg);
  padding: 48px;
  text-align: start;
  box-shadow: 0 36px 90px -30px rgba(0, 0, 0, 0.55);
}
@media (max-width: 640px) { .final-cta-panel { padding: 28px 22px; } }
/* .section-dark (the section wrapping this ivory panel) forces ivory text
   on every h2/h3/p — including the form's own success heading/body once it
   appears — which reads as near-invisible ivory-on-ivory inside this light
   card. Re-assert normal ink colors at equal specificity so they win by
   later source order. */
.final-cta-panel h3 { color: var(--color-charcoal); }
.final-cta-panel p { color: var(--color-ink-soft); }
.final-cta-whatsapp {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--color-line);
  text-align: center;
}
.final-cta-whatsapp p { font-size: 0.9rem; color: var(--color-ink-soft); margin-bottom: 12px; }
.final-cta-privacy {
  margin: 18px 0 0;
  font-size: 0.78rem;
  color: var(--color-ink-soft);
  text-align: center;
}
.final-cta-privacy a { color: var(--color-gold-deep); text-decoration: underline; }
/* The form's own success panel already carries a WhatsApp fallback CTA once
   a submission succeeds — hide this persistent one directly beneath it so
   the two don't duplicate each other in that state. */
.final-cta-panel .form-success.visible ~ .final-cta-whatsapp,
.final-cta-panel .form-success.visible ~ .final-cta-privacy { display: none; }
.final-cta-intro.reveal,
.final-cta-panel.reveal {
  transform: translateY(40px);
  filter: blur(6px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1), filter 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.final-cta-intro.reveal.is-visible,
.final-cta-panel.reveal.is-visible { transform: translateY(0); filter: blur(0); }
.final-cta-panel.reveal { transition-delay: 0.12s; }

/* ---- Process filmstrip (Why Dubai / Buying Process steps): a
   viewport-pinned stage the visitor scrolls THROUGH horizontally — each
   step is a full-stage, full-bleed photo (matching lpas.com's actual
   proportions: the image fills the panel, not a 60/40 split with its
   caption) — and scrolling down the tall .process-filmstrip-dock wrapper
   pans the strip from right to left, step by step, the same mechanic as
   lpas.com's service gallery (confirmed by driving it live).
   Each panel's caption (.process-panel-tab) sits on top of the photo as an
   overlay, not below it in flow — confirmed against the reference: on
   arrival it's tall enough to cover ~48% of the photo, then as the visitor
   keeps scrolling (see localProgress in initProcessFilmstrip, main.js) a
   clip-path mask shrinks down over it from the top, uncovering the photo
   beneath while its own box stays bottom-anchored (fixed height, never
   moved) the whole time; the caption's own text cross-fades from a blur in
   behind it, staggered to start only once the tab is partway retracted,
   per the two-step "tab down, then text sharpens" motion asked for. A
   clip-path mask rather than animating the tab's actual height, or sliding
   the box itself with translateY (which would have dragged its bottom
   edge away from the panel's bottom edge along with it) — keeps the whole
   effect on clip-path/opacity/filter only, so it's compositor-driven like
   the rest of this file's scroll effects.
   Structurally the outer pin is the same proven one as .guidance-dock
   above (tall wrapper + position:sticky stage) — initProcessFilmstrip()
   owns the horizontal translateX/progress-bar math the same way
   initGuidanceDock() owns that section's card positions, both time-lerped
   at SCROLL_SMOOTHING for the same reason (a fast scroll shouldn't make
   anything teleport to its target). Panel width is set in px by JS
   (matching the stage's measured width) rather than via percentage
   flex-basis, since percentages there resolve against the track's own
   (JS-driven) width and would need the same number worked out twice.
   Below 760px this collapses to a plain stacked list, caption always at
   its resting state (no overlay, no blur) — a pinned horizontal pan with
   a scroll-scrubbed overlay doesn't translate to a comfortable touch/no-JS
   reading experience at that size — same call already made for the
   guidance dock on the About page. ---- */
.process-filmstrip-dock {
  position: relative;
  /* Needs to explicitly outrank .process-fixed-video-wrap's z-index:0
     further down — that video is position:fixed, so it's already painting
     for the whole time this section is pinned/scrolled through too, and
     without this it's a toss-up (same effective stacking level, DOM order
     decides) whether this opaque section or that fixed video ends up on
     top. */
  z-index: 2;
  height: calc(var(--count, 5) * 100vh);
  background: var(--color-charcoal);
  /* Overrides the sitewide `section { padding: 88px 0 }` (56px below
     720px) rule, same reasoning as .properties-grid-shell above: on
     desktop this was invisible since the sticky stage pins to the
     viewport's top regardless of the parent's padding once stuck, but on
     mobile the stage is a plain static block (see the collapsed layout
     below) that fully respects it, opening an empty cream gap — the
     header's logo stranded above a dark panel that only started partway
     down — between the header and the first photo. */
  padding: 0;
  /* Pulls the dock up to start behind the header (transparent here — see
     .site-header-overlay, applied to this page the same way as home/
     properties) instead of below it, same trick as .hero and
     .properties-hero-dark: the header still reserves its own space in
     normal flow (#main's padding-top), this just cancels that out so the
     first photo panel sits directly behind it rather than a gap opening
     up first. */
  margin-top: calc(-1 * var(--header-h));
}
.process-filmstrip-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  background: var(--color-charcoal);
}
.process-filmstrip-track {
  display: flex;
  height: 100%;
  will-change: transform;
}
.process-panel {
  flex-shrink: 0;
  height: 100%;
  position: relative;
  overflow: hidden;
  border-inline-start: 1px solid rgba(250, 246, 239, 0.08);
}
.process-panel:first-child { border-inline-start: none; }
.process-panel-media {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #3a2f1c, #1c1812);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(250, 246, 239, 0.45);
}
.process-panel-media svg { width: 52px; height: 52px; opacity: 0.6; }
.process-panel-media.has-photo { color: transparent; }
/* contain, not cover: several of these photos are square (1024x1024)
   against a panel that's closer to 16:9 — cover would scale until the
   image's width filled the panel, cropping roughly a third off the top and
   bottom to do it, which read as the photo being zoomed in tight on its
   centre band. contain shows the whole photo at full quality instead,
   letterboxed on whichever axis doesn't match; the gradient already
   declared on .process-panel-media above (and still visible through an
   img's own unpainted letterbox area) means those bars read as part of
   the design rather than empty space. */
.process-panel-media img { width: 100%; height: 100%; object-fit: contain; display: block; }
.process-panel-tab {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  /* Height/clip-path are both set inline by JS (measure()/tick()) — it
     needs the exact resting + overlap pixel amounts anyway to drive the
     clip math, so CSS doesn't duplicate those numbers; this is just a safe
     fallback before JS runs. The box itself always stays bottom-anchored
     at its full (resting + overlap) height; clip-path masks its visible
     top extent down to just the resting strip as the panel is revealed,
     rather than moving the box (which would drag its bottom edge along
     with it off the panel). */
  height: 30vh;
  display: flex;
  align-items: flex-end;
  background: var(--color-charcoal);
  border-top: 1px solid rgba(228, 197, 128, 0.25);
  will-change: clip-path;
}
.process-panel-text {
  padding: 28px clamp(24px, 5vw, 64px) clamp(28px, 4vh, 40px);
  max-width: 760px;
  opacity: 0;
  filter: blur(10px);
  will-change: opacity, filter;
}
.process-panel-text h3 {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.2vw, 1.8rem);
  color: var(--color-gold-bright);
  letter-spacing: 0.01em;
  margin-bottom: 10px;
}
.process-panel-text p { font-size: clamp(0.95rem, 1.2vw, 1rem); line-height: 1.6; color: rgba(250, 246, 239, 0.82); margin-bottom: 0; }
.process-filmstrip-progress {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: rgba(250, 246, 239, 0.14);
  z-index: 2;
}
.process-filmstrip-progress span {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--color-gold-deep), var(--color-gold-bright));
  transform: scaleX(0);
  transform-origin: left;
  will-change: transform;
}
.process-filmstrip-counter {
  position: absolute;
  top: 28px;
  inset-inline-end: clamp(24px, 5vw, 56px);
  z-index: 2;
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: rgba(250, 246, 239, 0.75);
}
/* Reduced motion gets the same static, fully-readable stacked layout as
   mobile below, rather than a tamed-down version of the pin — there's no
   non-jarring way to keep scrubbing the viewport through a horizontal pan
   once the motion itself is the thing being opted out of (same call
   already made for the guidance dock on the About page). */
@media (max-width: 760px), (prefers-reduced-motion: reduce) {
  .process-filmstrip-dock { height: auto; background: none; }
  .process-filmstrip-stage { position: static; height: auto; overflow: visible; background: none; }
  .process-filmstrip-track { display: block; }
  .process-panel {
    width: 100% !important;
    height: auto;
    margin-bottom: 2px;
    border-inline-start: none;
    border-radius: var(--radius-md);
    overflow: hidden;
  }
  .process-panel-media { position: relative; aspect-ratio: 4 / 3; }
  .process-panel-tab {
    position: static;
    height: auto !important;
    clip-path: none !important;
    border-top: none;
  }
  .process-panel-text {
    max-width: none;
    padding: 20px 20px 28px;
    opacity: 1 !important;
    filter: none !important;
  }
  .process-filmstrip-progress, .process-filmstrip-counter { display: none; }
}

/* Buying Process page: looping Dubai Marina skyline footage (a separate
   licensed clip from the homepage hero's, so the two pages don't repeat the
   same background) behind BOTH the info-card cascade below the filmstrip
   AND the footer after it — genuinely one shared backdrop, not a flat cream
   section followed by a separately-coloured footer.
   A single position:fixed video+overlay (.process-fixed-video-wrap, placed
   once in build_why_dubai()'s body, right after the filmstrip) is what
   makes this actually one photo rather than an approximation of one: fixed
   positioning pins it to the viewport, so it's the exact same element
   showing through wherever the page above/around it is transparent,
   through any number of sections, with no risk of the crop/scale mismatch
   a second independent <video> instance produced (each one's object-fit:
   cover crops the same footage differently against its own box's aspect
   ratio, so the skyline visibly jumped in scale at the section boundary —
   an earlier version of this tried exactly that for the footer). The
   overlay is a flat, consistent dark wash now too, not a fade-to-cream
   gradient like the first version here had — that fade existed only
   because the page used to return to a plain cream background afterward;
   now that the video continues through a dark footer instead, cream would
   be the wrong direction to fade toward.
   .process-filmstrip-dock above gets a higher z-index to paint over this
   while pinned/scrolled through (it's opaque on its own, but still needs
   to outrank this fixed layer in the stacking order); .process-info-grid's
   existing z-index:1 and the footer's (see site-footer-video rules below)
   do the same for their own sections. */
.process-fixed-video-wrap { position: fixed; inset: 0; z-index: 0; }
.process-fixed-video { width: 100%; height: 100%; object-fit: cover; }
.process-fixed-video-overlay { position: absolute; inset: 0; background: rgba(21, 19, 15, 0.78); }
@media (prefers-reduced-motion: reduce) {
  .process-fixed-video { display: none; }
  .process-fixed-video-wrap { background: var(--color-charcoal); }
}
.process-info-section { position: relative; }

/* Buying Process page: the ownership/payment/costs/visa cards below the
   filmstrip. A tight vertical cascade — cards alternate to the left and
   right edges (never stacked directly under one another) and overlap
   slightly card-to-card (negative margin-top) rather than sitting apart
   with open gaps, so the column reads as one continuous zigzag rather than
   a spread-out list. Each is dealt in as it scrolls into view, alternating
   slide-and-fade from the left or right, with a different light tone per
   card drawn from the site's gold/cream palette so the stack doesn't read
   as one flat block.
   The values below are only the pre-JS/initial paint (reveal = 0); from
   there initDealCards() in main.js drives transform/opacity directly every
   frame, lerped to the card's own scroll position — no CSS transition here,
   since one fighting a per-frame JS write every tick would look stuttery
   rather than smooth. Later cards sit later in the DOM, so they naturally
   paint over the tail end of the card before them at the overlap — no
   z-index needed. */
.process-info-grid {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  padding: 12px 0 40px;
  overflow-x: hidden;
}
/* Static styling only below (width/margin-top/transform untouched — those
   drive initDealCards()'s reveal distance and the cascade's overlap, see
   the comment above). A restrained champagne-gold-tinted border instead of
   the flat ink one, a small gold rule + tighter heading-to-body spacing
   for hierarchy, and a touch more breathing room in the padding — all of
   which initDealCards() is indifferent to, since it re-reads each card's
   live position every frame rather than caching dimensions at load. */
.info-card {
  width: min(480px, 78%);
  border: 1px solid rgba(156, 122, 60, 0.22);
  border-radius: var(--radius-md);
  padding: 34px 38px;
  box-shadow: 0 20px 44px -26px rgba(42, 38, 32, 0.3);
}
.info-card:not(:first-child) { margin-top: -60px; }
.info-card h3 {
  position: relative;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  padding-top: 18px;
  margin-bottom: 12px;
}
.info-card h3::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 30px;
  height: 3px;
  background: var(--color-gold-deep);
  border-radius: 2px;
}
html[dir="rtl"] .info-card h3::before { left: auto; right: 0; }
.info-card p { font-size: 0.96rem; line-height: 1.7; }
.info-card:nth-child(1) { background: #FAF6EF; }
.info-card:nth-child(2) { background: #F6ECD8; }
.info-card:nth-child(3) { background: #F3E5D1; }
.info-card:nth-child(4) { background: #EEE9E0; }
.info-card:nth-child(5) { background: #F8E9C4; }

.deal-card {
  align-self: flex-start;
  opacity: 0;
  transform: translateX(-160px);
}
.deal-card.deal-right {
  align-self: flex-end;
  transform: translateX(160px);
}

@media (max-width: 640px) {
  .info-card { width: min(300px, 84%); padding: 28px 26px; }
  .info-card:not(:first-child) { margin-top: -36px; }
  .deal-card { transform: translateX(-64px); }
  .deal-card.deal-right { transform: translateX(64px); }
}
/* Golden Visa card's eligibility disclaimer (the only place this class is
   used — see build_why_dubai() in build.py). Styled as a calm, warm note
   rather than an error/warning treatment (dropped the red background/
   border/text an earlier version had) — the disclaimer itself still says
   exactly the same thing (no guaranteed eligibility, verify with official
   sources), it just no longer reads as an alarm going off next to it. Same
   warm-amber "note" treatment already used for .demo-notice elsewhere on
   the site, for a consistent, deliberate tone instead of inventing a new
   one just for this card. */
.disclaimer-strip {
  background: rgba(217, 142, 88, 0.12);
  border: 1px solid rgba(217, 142, 88, 0.3);
  color: #8a4e23;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-top: 14px;
}

/* Buying Process page: static consultation CTA before the footer. No
   pinned/scroll-linked mechanics of its own — just the sitewide .reveal
   fade already used everywhere else on the site, so it can't interfere
   with the filmstrip or deal-card animations above it. Transparent
   background and position:relative/z-index:1, the same pattern
   .process-info-grid and .site-footer-video already use, continuing the
   fixed video bleeding through rather than breaking it with an opaque
   block right before the (also transparent) footer. */
.process-consultation-cta { position: relative; z-index: 1; padding: 96px 0; text-align: center; }
.process-consultation-cta-inner { max-width: 620px; margin: 0 auto; }
.process-consultation-cta h2 {
  color: var(--color-ivory);
  font-size: clamp(1.8rem, 1.5rem + 1.2vw, 2.4rem);
  margin-bottom: 14px;
}
.process-consultation-cta p {
  color: rgba(250, 246, 239, 0.78);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 32px;
}
@media (max-width: 640px) { .process-consultation-cta { padding: 64px 0; } }

/* ---- Contact page: two-act composition (second correction pass) ----
   See the long comment above build_contact() in build.py for the reasoning:
   the Belgrade Arbor reference turned out to have no large headline at all
   when actually inspected, but this brief explicitly still wants one as a
   real focal point, and explicitly offered "cinematic intro + separate
   consultation section" as the way to reconcile that without repeating the
   previous pass's cramped single-viewport split. */

/* ---- Third correction pass: ONE continuous cinematic composition ----
   The previous pass still split the page into a full-viewport video "Act
   I" followed by a separate solid-charcoal "Act II" panel below it. This
   brief explicitly rejected that split: the same video must be visible
   behind BOTH the headline and the form at once, with the form as a
   translucent overlay card, not a second opaque section.
   .contact-cinematic has no fixed/capped height — it's exactly as tall as
   its content needs (at least one viewport via min-height), and the video
   wrapper is position:absolute;inset:0 against that same box, so it
   automatically stretches to cover however tall the section ends up being
   if the form card is taller than one screen, instead of being capped and
   leaving a gap underneath. */
.contact-cinematic {
  position: relative;
  margin-top: calc(-1 * var(--header-h));
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  /* CSS-level fallback (not just the <video poster>): shows if video can't
     play at all, and is literally what's visible the instant the section
     paints before the video's first frame is ready. */
  background-image: url('/assets/images/site/contact-hero-fireworks-poster.jpg');
  background-size: cover;
  background-position: center 30%;
}
.contact-cinematic-video-wrap { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.contact-cinematic-video { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
@media (prefers-reduced-motion: reduce) {
  .contact-cinematic-video { display: none !important; }
}
.contact-cinematic-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  /* An even wash across the whole frame, not corner-anchored — both the
     headline (left) and the form card (right) sit over the same video
     now, so legibility can't lean on a single corner gradient. The form
     card adds its own translucent charcoal on top of this for extra
     contrast where the text density is highest. */
  background: linear-gradient(180deg, rgba(21, 19, 15, 0.38) 0%, rgba(21, 19, 15, 0.22) 30%, rgba(21, 19, 15, 0.5) 100%);
}
.contact-cinematic-grid {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 56px;
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100dvh - var(--header-h));
  padding: 56px 0;
}
.contact-cinematic-headline {
  flex: 1 1 380px;
  max-width: 540px;
  color: var(--color-ivory);
}
.contact-cinematic-heading {
  /* h1,h2,h3,h4 sets color:var(--color-charcoal) directly on the element
     itself (not just inherited from an ancestor), which always wins over
     an ancestor's inherited value regardless of specificity — so color
     has to be set here explicitly too. */
  color: var(--color-ivory);
  font-size: clamp(2.2rem, 1.7rem + 2.6vw, 3.8rem);
  line-height: 1.08;
  margin: 0 0 18px;
}
.contact-cinematic-sub {
  color: rgba(250, 246, 239, 0.82);
  font-size: clamp(1rem, 0.94rem + 0.2vw, 1.12rem);
  max-width: 440px;
  margin: 0;
}
/* The translucent overlay card — the single most important requirement
   of this pass. Dark charcoal (not a flat opaque rectangle) plus a
   backdrop blur, so the video's light and motion keep reading through
   behind the text instead of being hidden by it. Started at 78% opacity,
   tuned down to 63% on request (15 points more transparent) — still
   checked for legibility against bright fireworks bursts afterward. No
   border/heavy shadow — just a soft, wide shadow for separation from the
   video. */
.contact-cinematic-form-card {
  /* Deliberately no max-height/overflow here — the brief explicitly rules
     out an inner scrollbar. If the card's content is taller than the
     viewport, the whole page scrolls instead (natural body scroll), and
     .contact-cinematic's own min-height:100vh plus the video's
     position:absolute;inset:0 against it means the video keeps covering
     the full, possibly-taller-than-100vh section either way. */
  flex: 0 1 500px;
  width: 100%;
  max-width: 500px;
  background: rgba(21, 19, 15, 0.63);
  backdrop-filter: blur(22px) saturate(1.1);
  -webkit-backdrop-filter: blur(22px) saturate(1.1);
  border-radius: 20px;
  padding: 36px 36px 32px;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.55);
}
@media (max-width: 960px) {
  .contact-cinematic-grid {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    min-height: auto;
    padding: 112px 24px 56px;
    gap: 36px;
  }
  .contact-cinematic-headline { max-width: none; }
  .contact-cinematic-heading { font-size: clamp(2rem, 1.6rem + 3.6vw, 2.8rem); }
  .contact-cinematic-form-card { max-width: none; padding: 30px 24px 26px; }

  /* The video wrap is still position:absolute;inset:0 against the WHOLE
     section above (headline + form card stacked, easily 1500-2500px tall
     on a phone) — that's deliberate (see the big comment up top: a single
     continuous video behind everything, not a split hero/form section).
     But object-fit:cover inside a box that tall forces its crop scale off
     the HEIGHT, which on a narrow phone crops the 1920x1080 source down to
     a ~10-25%-wide sliver — all you'd ever see is one rocket trail, never
     the actual burst. Capping the video's own box height (not the wrap's)
     keeps the "one continuous section" intent while fixing the crop math:
     the rest of the section (behind the form card) shows the same solid
     charcoal the overlay/form already sit on, with a gradient fade so the
     video doesn't end on a hard edge. */
  .contact-cinematic { background-size: auto min(68vh, 620px); background-repeat: no-repeat; background-position: center 35%; background-color: var(--color-charcoal); }
  .contact-cinematic-video-wrap { inset: 0 0 auto 0; height: min(68vh, 620px); }
  .contact-cinematic-video-wrap::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 160px;
    background: linear-gradient(180deg, transparent, var(--color-charcoal));
    pointer-events: none;
  }
  .contact-cinematic-video { object-position: center 35%; }
}

/* ---- Consultation copy + form, adapted for the translucent card ----
   (unchanged text/field styling logic from the previous pass — still
   ivory/gold on dark, still underline-style inputs — just now the dark
   surface is the card's own translucent background instead of a solid
   full-width section, so these rules stay scoped to .consultation,
   a class now carried by .contact-cinematic-form-card itself.) */
.consultation-header { text-align: center; margin: 0 auto 24px; }
.consultation-eyebrow {
  display: block;
  color: var(--color-gold-bright);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.consultation-title {
  color: var(--color-ivory);
  font-size: clamp(1.5rem, 1.3rem + 0.9vw, 1.9rem);
  margin: 0 0 10px;
}
.consultation-subtitle {
  color: rgba(250, 246, 239, 0.75);
  font-size: 0.92rem;
  line-height: 1.55;
  margin: 0;
}

/* Dark-panel contrast fixes for the reused .form-field/.consent-row/
   .form-success/.form-error-banner components, plus the underline-field
   treatment (transparent, no box, bottom border only) that's this page's
   one borrowed technique from the reference — adapted to EBTESAM's own
   gold/ivory palette, not Belgrade Arbor's sage/olive. Scoped entirely to
   .consultation so Home's and the property pages' boxed white inputs are
   untouched. */
.consultation .form-field label {
  color: rgba(250, 246, 239, 0.55);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.consultation .form-field input,
.consultation .form-field select,
.consultation .form-field textarea {
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(250, 246, 239, 0.28);
  border-radius: 0;
  padding: 13px 2px;
  color: var(--color-ivory);
}
.consultation .form-field input::placeholder,
.consultation .form-field textarea::placeholder { color: rgba(250, 246, 239, 0.32); }
.consultation .form-field input:focus,
.consultation .form-field select:focus,
.consultation .form-field textarea:focus {
  outline: none;
  border-bottom-color: var(--color-gold-bright);
}
.consultation .form-field select option { color: var(--color-ink); }
.consultation .form-grid { gap: 20px 20px; margin-bottom: 4px; }
.consultation .consent-row label { color: rgba(250, 246, 239, 0.75); }
.consultation .consent-row a { color: var(--color-gold-bright); }
.consultation .form-demo-notice { color: rgba(250, 246, 239, 0.65); border-color: rgba(250, 246, 239, 0.25); }
.consultation .form-error-banner { background: rgba(217, 120, 100, 0.12); border-color: rgba(217, 120, 100, 0.35); color: #e8a398; }
.consultation .form-success h3 { color: var(--color-ivory); }
.consultation .form-success p { color: rgba(250, 246, 239, 0.78); }
/* Submit button: the shared .btn-primary gold pill already reads well on
   dark backgrounds untouched — only .btn-block's forced full width is
   overridden, so it sits as a confident, modestly-sized, centered pill
   rather than stretching edge-to-edge of a 740px-wide panel. */
.consultation button[type="submit"].btn-block {
  width: auto;
  min-width: 260px;
  display: flex;
  margin: 14px auto 0;
}
/* The interest <select> stays in the DOM (still submitted) but is visually
   redundant once the pill selector below sets it directly — hiding only
   its own .form-field row here keeps the panel to the fields a visitor
   actually needs to look at. :has() is broad-support in 2026; if an older
   browser doesn't support it, the row simply stays visible alongside the
   pills, which is still fully functional, just slightly less tidy. */
.consultation .form-field:has([data-interest-field]) { display: none; }

/* ---- Contact page: inquiry-type pill selector ----
   A friendlier front end for the existing "interest" <select> (see
   initInquiryTypeTabs() in main.js) — restrained borders and an elegant
   active state per the brief, not a generic tab-bar component. No new
   animation: the active-state swap is an instant background/color
   change, no transition/transform. */
.inquiry-type-tabs { display: flex; gap: 8px; margin: 0 auto 26px; }
.inquiry-type-tab {
  flex: 1;
  padding: 14px 18px;
  border-radius: 999px;
  border: 1px solid rgba(250, 246, 239, 0.25);
  background: transparent;
  color: rgba(250, 246, 239, 0.7);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
}
.inquiry-type-tab.is-active {
  border-color: var(--color-ivory);
  background: var(--color-ivory);
  color: var(--color-charcoal);
}
/* 480px, not 420px: at 420-480 (iPhone Plus/Pro Max widths), "Investment
   Consultation" wraps to two lines while "Property Inquiry" fits on one —
   flex stretch keeps both pills the same height so nothing visually
   breaks, but a single wrapped line inside an otherwise one-line pill
   reads as careless for a luxury form. Stacking a little earlier gives
   both labels their own full-width, single-line row everywhere a phone
   would otherwise be borderline. */
@media (max-width: 480px) { .inquiry-type-tabs { flex-direction: column; } }

/* Compact single-row direct-contact links (WhatsApp/Instagram/email) below
   the form — the reference's own "for direct inquiries, call X" restraint,
   extended to EBTESAM's three verified channels instead of one phone
   number, rather than the three bordered cards an earlier pass used. */
.consultation-channels {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 22px;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid rgba(250, 246, 239, 0.14);
}
.consultation-channel {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: rgba(250, 246, 239, 0.75);
}
.consultation-channel svg { width: 16px; height: 16px; color: var(--color-gold-bright); flex-shrink: 0; }
.consultation-channel:hover { color: var(--color-ivory); }

/* ---- Contact page: dark editorial transition (fourth correction pass) ----
   Replaces the old .contact-secondary section, which had no background of
   its own and so fell back to the sitewide ivory default — a bright,
   abrupt interruption between the cinematic video/form above it and the
   dark footer below. This section is the exact same charcoal as the
   consultation card, so there's no bright/dark jump at all; the overlap
   trick below (negative margin-top + its own top-edge fade) adds a
   genuine video-to-charcoal dissolve on top of that color match, without
   touching .contact-cinematic/.contact-cinematic-overlay/the video
   itself in any way, per the brief's explicit "do not redesign the
   Contact hero" — .contact-cinematic-grid's own bottom padding is 56px
   on every breakpoint (plain video, no card content there), and this
   overlaps only 40px of it, safely short of ever reaching the card. */
.contact-experience {
  position: relative;
  margin-top: -40px;
  padding-top: 96px;
  padding-bottom: 88px;
  background: linear-gradient(180deg, transparent 0%, var(--color-charcoal) 40px, var(--color-charcoal) 100%);
}
.contact-experience-inner { max-width: 980px; }
.contact-experience-header { text-align: center; max-width: 620px; margin: 0 auto 56px; }
.contact-experience-eyebrow {
  display: block;
  color: var(--color-gold-bright);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.contact-experience-heading {
  color: var(--color-ivory);
  font-size: clamp(1.6rem, 1.35rem + 1.3vw, 2.2rem);
  margin: 0;
}
.contact-experience-items { display: flex; align-items: flex-start; }
.contact-experience-item { flex: 1; min-width: 0; padding: 0 44px; }
.contact-experience-item:first-child { padding-inline-start: 0; }
.contact-experience-item:last-child { padding-inline-end: 0; }
.contact-experience-divider { width: 1px; align-self: stretch; background: rgba(250, 246, 239, 0.14); flex-shrink: 0; }
.contact-experience-meta { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.contact-experience-number { font-family: var(--font-display); color: var(--color-gold-bright); font-size: 0.95rem; font-weight: 600; }
.contact-experience-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: rgba(250, 246, 239, 0.5);
}
.contact-experience-item-title {
  color: var(--color-ivory);
  font-size: clamp(1.15rem, 1.02rem + 0.5vw, 1.35rem);
  margin: 0 0 10px;
}
.contact-experience-item-body {
  color: rgba(250, 246, 239, 0.72);
  font-size: 0.92rem;
  line-height: 1.6;
  margin: 0;
  max-width: 380px;
}
@media (max-width: 720px) {
  .contact-experience { padding-top: 64px; padding-bottom: 64px; }
  .contact-experience-items { flex-direction: column; gap: 36px; }
  .contact-experience-divider { display: none; }
  .contact-experience-item { padding-inline: 0 !important; }
  .contact-experience-item-body { max-width: none; }
}

/* ---- Legal pages ---- */
.legal-notice {
  background: rgba(179, 70, 60, 0.08);
  border: 1px solid rgba(179, 70, 60, 0.3);
  color: #7a2f27;
  padding: 18px 22px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 40px;
}
.legal-section { margin-bottom: 32px; max-width: 760px; }
.legal-section h2 { font-size: 1.2rem; }

/* ---- Footer ---- */
.site-footer {
  background: var(--color-charcoal);
  color: rgba(250, 246, 239, 0.75);
  padding: 72px 0 32px;
}
/* On the Properties page (body.page-properties, set in page_shell() in
   build.py): no background of its own at all. page_shell() wraps <main>
   AND the footer together inside .properties-dark-landscape for this page
   specifically (not just the page content, like every other page) —
   two earlier attempts gave the footer its own copy of that wrapper's
   starfield gradient (or a flat approximation of it), and both read as a
   visibly different background right at the boundary, because the footer
   was a separate sibling box rendering its own copy/approximation rather
   than genuinely being part of the same one. Now that the footer is
   structurally inside the wrapper, this rule simply gets out of the way so
   that wrapper's background — painted once, continuously, across main AND
   the footer — shows straight through, the same way it already does for
   the hero/carousel/grid sections inside <main>. */
body.page-properties .site-footer { background: none; }

/* Buying Process page only: no background of its own — the single
   position:fixed .process-fixed-video-wrap (see styles further up) shows
   straight through this transparent footer, the exact same element visible
   through the info-cards section above it. (An earlier version gave the
   footer its own second, independent <video> playing the same file; the
   two instances cropped that footage differently against each box's own
   aspect ratio, so the skyline visibly jumped in scale right at the
   boundary — seam bug version three, same family as the ones already fixed
   for the Properties page, different mechanism. One shared fixed element
   is the only way this is genuinely one photo rather than two that happen
   to match.) position:relative + z-index:1 just needs to outrank the fixed
   video's z-index:0 in the shared stacking context — see that rule's own
   comment for why this matters. */
.site-footer-video { position: relative; z-index: 1; background: none; }
.site-footer-video > .container { position: relative; z-index: 1; }

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
@media (max-width: 860px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 {
  color: var(--color-ivory);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 18px;
  font-family: var(--font-sans);
  font-weight: 700;
}
.footer-grid ul li { margin-bottom: 10px; }
.footer-grid a:hover { color: var(--color-gold-bright); }
.footer-brand-text { font-size: 0.88rem; max-width: 280px; margin-top: 14px; }
.footer-bottom {
  border-top: 1px solid var(--color-line-dark);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
}
.footer-notice {
  font-size: 0.82rem;
  color: rgba(250, 246, 239, 0.5);
  max-width: 640px;
  margin-top: 10px;
}

/* ---- Floating WhatsApp button — restrained vs. the previous bright-green
   glow (that colored shadow read as louder than the rest of this dark/
   gold/ivory palette); keeps the recognizable WhatsApp green itself,
   softens the shadow to a neutral dark one like the site's other floating
   controls, and trims the footprint slightly. Shared across every page
   (rendered once in footer()), so this refinement is sitewide by nature,
   not Properties-only.
   env(safe-area-inset-*) keeps it clear of the home-indicator/notch strip
   on iPhones with no inset — `right`/`left` are written per-direction via
   :dir() rather than the logical inset-inline-end, since the physical
   safe-area env() values need to pair with the matching physical side. ---- */
.whatsapp-float {
  position: fixed;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  z-index: 120;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 22px -8px rgba(21, 19, 15, 0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.25s ease;
}
:dir(ltr) .whatsapp-float { right: calc(20px + env(safe-area-inset-right, 0px)); }
:dir(rtl) .whatsapp-float { left: calc(20px + env(safe-area-inset-left, 0px)); }
.whatsapp-float:hover { transform: scale(1.05); box-shadow: 0 10px 26px -8px rgba(21, 19, 15, 0.55); }
/* Property detail pages only: the inquiry panel has its own, better-
   labelled WhatsApp CTA (.detail-whatsapp-cta) directly in the page flow —
   once that button scrolls into view the fixed floating one would sit
   right on top of it (both bottom-right/bottom-left), so
   initWhatsappFloatCollision() in main.js fades this one out for as long
   as the panel's own CTA is visible, rather than the two colliding. */
.whatsapp-float.is-near-panel-cta { opacity: 0; pointer-events: none; transform: scale(0.85); }
.whatsapp-float svg { width: 25px; height: 25px; }

/* ---- Floating background-music toggle ---- */
.music-toggle {
  position: fixed;
  /* env(safe-area-inset-bottom): same reasoning as .whatsapp-float above —
     keeps this clear of the home-indicator strip on notched iPhones instead
     of sitting flush against it. Horizontal inset is set per-direction
     below via :dir(), not here, for the same reason .whatsapp-float does —
     the physical safe-area env() value has to pair with the matching
     physical side, which a logical property can't express. */
  bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  z-index: 120;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--color-charcoal);
  border: 1px solid rgba(250, 246, 239, 0.18);
  color: var(--color-ivory);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 28px -10px rgba(21, 19, 15, 0.55);
  transition: transform 0.2s ease, background 0.2s ease;
}
:dir(ltr) .music-toggle { left: calc(22px + env(safe-area-inset-left, 0px)); }
:dir(rtl) .music-toggle { right: calc(22px + env(safe-area-inset-right, 0px)); }
.music-toggle:hover { transform: scale(1.06); }
.music-toggle.is-playing { background: linear-gradient(135deg, var(--color-gold-bright), var(--color-gold-deep)); color: var(--color-charcoal); }
.music-toggle svg { width: 22px; height: 22px; }
.music-toggle .icon-on { display: none; }
.music-toggle.is-playing .icon-off { display: none; }
.music-toggle.is-playing .icon-on { display: flex; }
/* Rendered (not display:none — the YouTube IFrame API needs a real,
   laid-out element to attach to) but visually invisible; only its audio
   matters, so there is nothing for a visitor to look at or tab to besides
   the toggle button above. */
#ebtesam-music-player {
  position: fixed;
  width: 1px;
  height: 1px;
  bottom: 0;
  inset-inline-start: 0;
  opacity: 0;
  pointer-events: none;
}

/* ---- 404 ---- */
.notfound-wrap {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 100px 24px;
}

/* ---- Utility ---- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

/* ---- Scroll-reveal (cards/sections fade + rise into view once, as the
   visitor scrolls past them — toggled by IntersectionObserver in main.js) ---- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-group .reveal:nth-child(1) { transition-delay: 0s; }
.reveal-group .reveal:nth-child(2) { transition-delay: 0.08s; }
.reveal-group .reveal:nth-child(3) { transition-delay: 0.16s; }
.reveal-group .reveal:nth-child(4) { transition-delay: 0.24s; }
.reveal-group .reveal:nth-child(5) { transition-delay: 0.32s; }
.reveal-group .reveal:nth-child(6) { transition-delay: 0.4s; }

/* Respect visitors who've asked for less motion: disable every animation
   above (hero entrance, ambient skyline drift, scroll-reveal) instantly. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .hero-content > *, .reveal, .deal-card { opacity: 1 !important; transform: none !important; }
  .entrance { display: none !important; }
  .hero-video { display: none !important; }
}

/* ---- Cookie consent banner (Meta Pixel) ----
   cookie_banner() in build.py writes it once per document, outside
   #page-view; initCookieConsent() in main.js shows/hides it. Above the
   WhatsApp float (120) and header (200), below the entrance splash (300),
   so on a first visit it appears once the splash has gone. Phone: a bottom
   sheet with side gutters. Desktop: a compact card in the start corner
   (left in LTR, right in Persian). Decline and Accept are the same size. */
.cookie-banner {
  position: fixed;
  z-index: 250;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  background: var(--color-ivory);
  color: var(--color-ink);
  border-radius: 18px;
  border-top: 2px solid var(--color-gold);
  box-shadow: 0 24px 60px -18px rgba(21, 19, 15, 0.45), 0 2px 8px rgba(21, 19, 15, 0.08);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner.is-visible { opacity: 1; transform: translateY(0); }
.cookie-banner-inner { padding: 18px 18px 16px; }
.cookie-banner-title {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-charcoal);
}
.cookie-banner-body {
  margin: 0 0 14px;
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--color-ink-soft);
}
.cookie-banner-body a {
  color: var(--color-gold-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}
.cookie-banner-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.cookie-banner-actions .btn { width: 100%; padding: 12px 16px; }
html[dir="rtl"] .cookie-banner-title,
html[dir="rtl"] .cookie-banner-body,
html[dir="rtl"] .cookie-banner-actions .btn { font-family: var(--font-fa); }
@media (min-width: 720px) {
  .cookie-banner { right: auto; left: 24px; bottom: 24px; max-width: 420px; }
  html[dir="rtl"] .cookie-banner { left: auto; right: 24px; }
  .cookie-banner-inner { padding: 22px 22px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .cookie-banner { transition: none; transform: none; }
}
/* Footer "Cookie settings": a button styled like its sibling legal links. */
.footer-cookie-settings {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  opacity: inherit;
}
.footer-cookie-settings:hover,
.footer-cookie-settings:focus-visible { text-decoration: underline; }
