/* ==========================================================================
   Sobha City Abu Dhabi — residence pages · shared design system
   Derived from v2 (../../v2/DESIGN-SYSTEM.md) with semantic tokens so one
   component set serves three art directions:
     html[data-mood="dusk"]   The Terraces  — warm, golden-hour, reassuring
     html[data-mood="estate"] The Orchard   — deepest, slowest, most private
     html[data-mood="fresh"]  River Cove    — light, bright, energetic
   Mobile-first (390–430px, iOS Safari primary).
   ========================================================================== */

/* ---- Fonts (shared, subsetted; metric-matched fallbacks kill swap CLS) --- */
@font-face { font-family: 'Fraunces-fb'; src: local('Georgia');
  size-adjust: 86%; ascent-override: 96%; descent-override: 26%; line-gap-override: 0%; }
@font-face { font-family: 'Hanken-fb'; src: local('Arial');
  size-adjust: 101%; ascent-override: 100%; descent-override: 26%; line-gap-override: 0%; }
@font-face { font-family: 'Fraunces'; src: url('../assets/fonts/fraunces-var.woff2') format('woff2');
  font-weight: 300 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Fraunces'; src: url('../assets/fonts/fraunces-italic-var.woff2') format('woff2');
  font-weight: 300 600; font-style: italic; font-display: swap; }
@font-face { font-family: 'Hanken Grotesk'; src: url('../assets/fonts/hanken-var.woff2') format('woff2');
  font-weight: 300 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Amiri'; src: url('../assets/fonts/amiri-700.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'IBM Plex Sans Arabic'; src: url('../assets/fonts/plexarabic-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'IBM Plex Sans Arabic'; src: url('../assets/fonts/plexarabic-600.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap; }

/* ---- Semantic tokens + moods --------------------------------------------- */
:root {
  /* base (dusk defaults; each page sets data-mood) */
  --bg: #16110b;
  --bg-2: #1d1710;
  --fg: #efe7d9;
  --fg-60: rgba(239, 231, 217, 0.68);
  --fg-40: rgba(239, 231, 217, 0.57);
  --line: rgba(239, 231, 217, 0.16);
  --accent: #cfa96b;
  --accent-on-card: #6f5c34;
  /* the invitation card (form) — the contrast moment */
  --card-bg: #f3ede1;
  --card-fg: #14100a;
  --card-fg-60: rgba(20, 16, 10, 0.66);
  --card-line: rgba(20, 16, 10, 0.3);
  /* fixed values for text over imagery (scrims are always dark) */
  --media-fg: #ece5d8;
  --media-fg-dim: rgba(236, 229, 216, 0.66);
  --wa: #1fa855;

  --serif: 'Fraunces', 'Fraunces-fb', Georgia, 'Times New Roman', serif;
  --sans: 'Hanken Grotesk', 'Hanken-fb', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;

  --t-hero: clamp(2.5rem, 9.6vw, 5.8rem);
  --t-1: clamp(2rem, 7.5vw, 4.2rem);
  --t-num: clamp(3rem, 12vw, 6.4rem);
  --t-2: clamp(1.5rem, 5vw, 2.4rem);

  --e-out: cubic-bezier(0.22, 1, 0.36, 1);
  --e-inout: cubic-bezier(0.65, 0, 0.35, 1);
  --d-rev: 0.9s;           /* reveal duration — estate mood slows this */
  --d-clip: 1.1s;

  --gutter: clamp(1.25rem, 5vw, 3rem);
  --sa-t: env(safe-area-inset-top, 0px);
  --sa-b: env(safe-area-inset-bottom, 0px);
  --sa-l: env(safe-area-inset-left, 0px);
  --sa-r: env(safe-area-inset-right, 0px);
}
html[data-mood='estate'] {
  --bg: #07090b;
  --bg-2: #0d1114;
  --fg: #e9e3d6;
  --fg-60: rgba(233, 227, 214, 0.66);
  --fg-40: rgba(233, 227, 214, 0.56);
  --line: rgba(233, 227, 214, 0.14);
  --accent: #b59c66;
  --d-rev: 1.15s;
  --d-clip: 1.4s;
}
/* daylight — warm light (The Terraces): golden-hour daylight, reassuring */
html[data-mood='daylight'] {
  --bg: #f7f1e3;
  --bg-2: #efe6d1;
  --fg: #221809;
  --fg-60: rgba(34, 24, 9, 0.74);
  --fg-40: rgba(34, 24, 9, 0.66);   /* >=4.5:1 on bg-2 for small text */
  --line: rgba(34, 24, 9, 0.16);
  --accent: #7d6026;                 /* warm deep brass, >=4.5:1 on paper */
  /* the invitation card inverts: the one dark moment on a light page */
  --card-bg: #1c1408;
  --card-fg: #f2ead9;
  --card-fg-60: rgba(242, 234, 217, 0.72);
  --card-line: rgba(242, 234, 217, 0.35);
  --accent-on-card: #cfa96b;
}
html[data-mood='fresh'] {
  --bg: #f4efe5;
  --bg-2: #ebe4d4;
  --fg: #171310;
  --fg-60: rgba(23, 19, 16, 0.72);
  --fg-40: rgba(23, 19, 16, 0.66);   /* ≥4.5:1 on bg-2 for small text */
  --line: rgba(23, 19, 16, 0.16);
  --accent: #77602f;                 /* deep brass — ≥4.5:1 on paper for small text */
  /* invitation card inverts: the one dark moment on a light page */
  --card-bg: #14100a;
  --card-fg: #efe7d9;
  --card-fg-60: rgba(239, 231, 217, 0.7);
  --card-line: rgba(239, 231, 217, 0.35);
  --accent-on-card: #cfa96b;
}
[dir='rtl'] {
  --serif: 'Amiri', Georgia, serif;
  --sans: 'IBM Plex Sans Arabic', -apple-system, Tahoma, sans-serif;
}

/* ---- Base ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 4.6rem; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans); font-size: 1rem; line-height: 1.7;
  color: var(--fg); background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: clip;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
::selection { background: var(--accent); color: var(--bg); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 1px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.skip-link {
  position: absolute; inset-inline-start: 1rem; top: -4rem; z-index: 300;
  padding: 0.7rem 1.2rem; background: var(--card-bg); color: var(--card-fg);
  text-decoration: none; font-weight: 600; transition: top 0.2s;
}
.skip-link:focus { top: calc(var(--sa-t) + 0.5rem); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- Type roles --------------------------------------------------------------- */
.d-hero, .d-1, .d-2, .d-num {
  font-family: var(--serif); font-weight: 380; font-optical-sizing: auto;
  line-height: 1.04; letter-spacing: -0.015em; color: var(--fg);
}
[dir='rtl'] .d-hero, [dir='rtl'] .d-1, [dir='rtl'] .d-2, [dir='rtl'] .d-num { font-weight: 700; line-height: 1.4; letter-spacing: 0; }
.d-hero { font-size: var(--t-hero); color: var(--media-fg); }
[dir='rtl'] .d-hero { font-size: clamp(2.2rem, 8.6vw, 5rem); }
.d-1 { font-size: var(--t-1); }
[dir='rtl'] .d-1 { font-size: clamp(1.8rem, 6.6vw, 3.6rem); }
.d-2 { font-size: var(--t-2); line-height: 1.12; }
.d-num { font-size: var(--t-num); font-weight: 340; }
.d-hero em, .d-1 em, .d-2 em { font-style: italic; font-weight: 420; }
[dir='rtl'] .d-hero em, [dir='rtl'] .d-1 em, [dir='rtl'] .d-2 em { font-style: normal; }
.k-label { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); }
[dir='rtl'] .k-label { letter-spacing: 0.04em; }
.body-lg { font-size: clamp(1.05rem, 2vw, 1.2rem); color: var(--fg-60); }
.caption { font-size: 0.8rem; color: var(--fg-40); line-height: 1.5; }
.confirm {
  border: 1px dashed color-mix(in srgb, var(--accent) 60%, transparent);
  border-radius: 3px; padding: 0 0.35em; font-size: 0.85em; color: var(--accent); white-space: nowrap;
}
.paper .confirm { color: var(--accent-on-card); border-color: color-mix(in srgb, var(--accent-on-card) 55%, transparent); }

/* ---- Layout ---------------------------------------------------------------------- */
.shell { width: min(90rem, 100%); margin-inline: auto; padding-inline: calc(var(--gutter) + var(--sa-l)) calc(var(--gutter) + var(--sa-r)); }
.section { padding-block: clamp(4rem, 12vw, 8.5rem); position: relative; }
.hairline-top { border-top: 1px solid var(--line); }
.bleed { margin-inline: calc(-1 * (var(--gutter) + var(--sa-l))) calc(-1 * (var(--gutter) + var(--sa-r))); }
@media (min-width: 56rem) { .bleed { margin-inline: 0; } }
/* below-fold layout containment (killed a ~350ms font-swap relayout on v2) */
.cv { content-visibility: auto; contain-intrinsic-size: auto 1200px; }

/* ---- Buttons / links ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  min-height: 3rem; padding: 0.8rem 1.9rem;
  font-family: var(--sans); font-size: 1rem; font-weight: 600; letter-spacing: 0.01em;
  border-radius: 2px; text-decoration: none;
  transition: transform 0.15s var(--e-out), background-color 0.3s var(--e-out), border-color 0.3s var(--e-out), color 0.3s var(--e-out);
}
.btn:active { transform: scale(0.985); }
.btn--accent { background: var(--accent); color: #14100a; }
html[data-mood='fresh'] .btn--accent, html[data-mood='daylight'] .btn--accent { color: #fdfaf3; }
.btn--accent:hover { filter: brightness(1.08); }
.btn--line { border: 1px solid color-mix(in srgb, var(--fg) 35%, transparent); color: var(--fg); }
.btn--line:hover { border-color: var(--fg); }
.btn--wa { background: var(--wa); color: #fff; }
.btn--wa:hover { background: #23b95e; }
.btn--hero { background: var(--accent); color: #14100a; }
.link-quiet {
  display: inline-flex; align-items: center; gap: 0.5rem;
  min-height: 2.75rem; color: var(--fg-60); text-decoration: none;
  font-size: 0.95rem; font-weight: 500;
  border-bottom: 1px solid var(--line); padding-block: 0.4rem;
  transition: color 0.3s var(--e-out), border-color 0.3s var(--e-out);
}
.link-quiet:hover { color: var(--fg); border-color: var(--fg-60); }
.link-quiet .arr { transition: transform 0.3s var(--e-out); }
.link-quiet:hover .arr { transform: translateX(4px); }
[dir='rtl'] .link-quiet:hover .arr { transform: translateX(-4px); }

/* ---- Intro / wordmark --------------------------------------------------------------- */
.intro {
  position: fixed; inset: 0; z-index: 200; background: var(--bg);
  display: grid; place-items: center; opacity: 1;
  transition: opacity 0.6s var(--e-inout);
}
.intro.is-done { opacity: 0; pointer-events: none; }
.intro .intro-mark { text-align: center; opacity: 0; transform: translateY(10px); transition: opacity 0.7s var(--e-out), transform 0.7s var(--e-out); }
.intro.is-on .intro-mark { opacity: 1; transform: none; }
.no-intro .intro { display: none; }
.wordmark { display: inline-flex; flex-direction: column; text-decoration: none; line-height: 1.05; }
/* placeholder lockup — swap for official Sobha SVG */
.wordmark .wm-main { font-family: var(--serif); font-weight: 430; font-size: 1.1rem; letter-spacing: 0.28em; text-transform: uppercase; color: var(--fg); }
.wordmark .wm-sub { font-size: 0.56rem; font-weight: 600; letter-spacing: 0.4em; text-transform: uppercase; color: var(--accent); margin-top: 0.2rem; }
[dir='rtl'] .wordmark .wm-main { letter-spacing: 0.08em; }
[dir='rtl'] .wordmark .wm-sub { letter-spacing: 0.1em; }
.intro .wm-main { font-size: 1.6rem; }

/* ---- Header ----------------------------------------------------------------------------- */
.hd {
  position: fixed; inset-inline: 0; top: 0; z-index: 100;
  padding: calc(var(--sa-t) + 0.6rem) calc(var(--gutter) + var(--sa-r)) 0.6rem calc(var(--gutter) + var(--sa-l));
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  transition: background-color 0.45s var(--e-out);
}
.hd.is-tinted {
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.hd-res {
  font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--fg-60); border-inline-start: 1px solid var(--line);
  padding-inline-start: 1rem; margin-inline-start: 0.2rem;
  display: none;
}
@media (min-width: 40rem) { .hd-res { display: inline; } }
[dir='rtl'] .hd-res { letter-spacing: 0.03em; }
.hd-actions { display: flex; align-items: center; gap: 0.4rem; }
.lang-btn { min-height: 2.75rem; padding: 0.4rem 0.9rem; font-size: 0.9rem; font-weight: 600; color: var(--fg-60); transition: color 0.3s; }
.lang-btn:hover, .lang-btn:active { color: var(--fg); }
.hd .btn--accent { min-height: 2.75rem; padding: 0.45rem 1.3rem; font-size: 0.92rem; display: none; }
@media (min-width: 56rem) { .hd .btn--accent { display: inline-flex; } }
/* over the hero (untinted) header text must read on imagery */
.hd:not(.is-tinted) .lang-btn { color: var(--media-fg-dim); }
.hd:not(.is-tinted) .wordmark .wm-main { color: var(--media-fg); }
.hd:not(.is-tinted) .hd-res { color: var(--media-fg-dim); border-color: rgba(236,229,216,0.25); }

/* ---- Hero -------------------------------------------------------------------------------- */
.hero { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; isolation: isolate; }
.hero-media { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.hero-media img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.06); transition: transform 2.2s var(--e-out);
}
.is-entered .hero-media img { transform: scale(1); }
.hero::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgba(10, 9, 6, 0.94) 0%, rgba(10, 9, 6, 0.55) 36%, rgba(10, 9, 6, 0.24) 62%, rgba(10, 9, 6, 0.5) 100%);
}
.hero-inner { padding-bottom: clamp(4.5rem, 12vh, 7rem); }
.hero-kicker {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(0.98rem, 3.2vw, 1.25rem); color: var(--media-fg-dim); margin-bottom: 1rem;
}
[dir='rtl'] .hero-kicker { font-style: normal; }
.hero-h .line { display: block; overflow: hidden; }
.hero-h .line > span { display: block; transform: translateY(110%); transition: transform 1s var(--e-out); }
.is-entered .hero-h .line > span { transform: none; }
.hero-h .line:nth-child(2) > span { transition-delay: 0.09s; }
.hero-h .line:nth-child(3) > span { transition-delay: 0.18s; }
.no-js .hero-h .line > span, .reduced .hero-h .line > span { transform: none; }
.hero-sub { margin-top: 1.3rem; color: var(--media-fg-dim); max-width: 34em; font-size: clamp(0.98rem, 2.6vw, 1.1rem); }
.hero-sub b { color: var(--media-fg); font-weight: 600; }
.hero-cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.6rem; margin-top: 1.9rem; }
.hero-fade { opacity: 0; transform: translateY(14px); transition: opacity 0.8s var(--e-out) 0.5s, transform 0.8s var(--e-out) 0.5s; }
.is-entered .hero-fade { opacity: 1; transform: none; }
.no-js .hero-fade, .reduced .hero-fade { opacity: 1; transform: none; }
.hero-legal { margin-top: 1.3rem; font-size: 0.74rem; color: var(--media-fg-dim); max-width: 44em; }
.hero .link-quiet { color: var(--media-fg-dim); border-color: rgba(236,229,216,0.25); }
.hero .link-quiet:hover { color: var(--media-fg); }
.hero-caption { position: absolute; inset-inline-end: calc(var(--gutter) + var(--sa-r)); bottom: calc(0.9rem + var(--sa-b)); font-size: 0.68rem; color: var(--media-fg-dim); }

/* ---- Key-facts bar --------------------------------------------------------------------------- */
.facts { border-block: 1px solid var(--line); background: var(--bg-2); }
.facts-row {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(9.5rem, 1fr);
  overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.facts-row::-webkit-scrollbar { display: none; }
.facts-row > div { padding: 1.1rem 1.2rem; border-inline-end: 1px solid var(--line); }
.facts-row > div:last-child { border-inline-end: none; }
.facts-row dt { font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-40); }
[dir='rtl'] .facts-row dt { letter-spacing: 0.03em; }
.facts-row dd { font-family: var(--serif); font-size: 1.12rem; color: var(--fg); margin-top: 0.2rem; white-space: nowrap; }
.facts-row dd .small { font-family: var(--sans); font-size: 0.74rem; color: var(--fg-40); }

/* ---- Media & choreography --------------------------------------------------------------------- */
.frame { position: relative; overflow: hidden; }
.frame img { width: 100%; height: 100%; object-fit: cover; }
.frame .grade {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(10, 9, 6, 0.34), rgba(10, 9, 6, 0) 45%), rgba(46, 34, 16, 0.06);
}
html[data-mood='fresh'] .frame .grade, html[data-mood='daylight'] .frame .grade { background: linear-gradient(to top, rgba(10, 9, 6, 0.22), rgba(10, 9, 6, 0) 40%); }
.img-cap { display: flex; justify-content: space-between; gap: 1rem; padding-top: 0.6rem; font-size: 0.72rem; color: var(--fg-40); }
.px-window { position: relative; overflow: hidden; }
.px-window img { height: 114%; width: 100%; object-fit: cover; will-change: transform; }

.rv { opacity: 1; transform: none; }
.js .rv { opacity: 0; transform: translateY(26px); transition: opacity var(--d-rev) var(--e-out), transform var(--d-rev) var(--e-out); }
.js .rv.in { opacity: 1; transform: none; }
.js .rv-clip > .px-window, .js .rv-clip > .frame, .js .rv-clip > svg {
  clip-path: inset(0 0 100% 0); transition: clip-path var(--d-clip) var(--e-inout);
}
.js .rv-clip.in > .px-window, .js .rv-clip.in > .frame, .js .rv-clip.in > svg { clip-path: inset(0 0 0 0); }
.js [data-stagger] > * { opacity: 0; transform: translateY(20px); transition: opacity 0.8s var(--e-out), transform 0.8s var(--e-out); }
.js [data-stagger].in > * { opacity: 1; transform: none; }
.js [data-stagger].in > :nth-child(2) { transition-delay: 0.08s; }
.js [data-stagger].in > :nth-child(3) { transition-delay: 0.16s; }
.js [data-stagger].in > :nth-child(4) { transition-delay: 0.24s; }
.js [data-stagger].in > :nth-child(5) { transition-delay: 0.32s; }
.reduced .rv, .reduced .rv-clip > *, .reduced [data-stagger] > * { opacity: 1 !important; transform: none !important; clip-path: none !important; }

/* ---- Editorial grids --------------------------------------------------------------------------- */
.split { display: grid; gap: 2.6rem; }
@media (min-width: 56rem) {
  .split { grid-template-columns: repeat(12, 1fr); gap: clamp(1.5rem, 3vw, 3rem); align-items: start; }
  .split > .col-a { grid-column: 1 / 7; }
  .split > .col-b { grid-column: 8 / 13; }
  .split.wide-b > .col-a { grid-column: 1 / 6; }
  .split.wide-b > .col-b { grid-column: 6 / 13; }
}
.gallery { display: grid; gap: 1.6rem; }
@media (min-width: 56rem) {
  .gallery { grid-template-columns: repeat(12, 1fr); }
  .gallery > figure:nth-child(3n+1) { grid-column: 1 / 8; }
  .gallery > figure:nth-child(3n+2) { grid-column: 8 / 13; margin-top: clamp(2rem, 5vw, 4rem); }
  .gallery > figure:nth-child(3n)   { grid-column: 3 / 11; }
}
.gallery .frame { aspect-ratio: 4 / 3; }
.gallery > figure:nth-child(3n) .frame { aspect-ratio: 21 / 10; }

/* hero-width feature media */
.feature-media .px-window { aspect-ratio: 4 / 5; }
@media (min-width: 56rem) { .feature-media .px-window { aspect-ratio: 21 / 10; } }

/* ---- Fact / plan rows ------------------------------------------------------------------------------ */
.rows { border-top: 1px solid var(--line); }
.rows > div { display: flex; justify-content: space-between; gap: 1.5rem; padding: 1.15rem 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.rows .r-l { font-family: var(--serif); font-size: 1.12rem; color: var(--fg); }
.rows .r-r { font-size: 0.86rem; color: var(--fg-60); text-align: end; max-width: 55%; }

/* ---- Rent tool (Terraces) ---------------------------------------------------------------------------- */
.rent-tool label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--fg-60); margin-bottom: 0.5rem; }
.rent-input-row { display: flex; align-items: center; gap: 0.8rem; border-bottom: 1px solid color-mix(in srgb, var(--fg) 35%, transparent); padding-bottom: 0.55rem; }
.rent-input-row .cur { font-size: 1rem; color: var(--fg-40); }
#rentInput { width: 100%; background: none; border: none; color: var(--fg); font-family: var(--serif); font-size: clamp(1.7rem, 6vw, 2.6rem); font-weight: 380; }
#rentInput:focus { outline: none; }
#rentInput::placeholder { color: var(--fg-40); }
.rent-out { margin-top: 1.7rem; display: grid; gap: 1rem; }
.rent-out > div { display: flex; justify-content: space-between; gap: 1.5rem; align-items: baseline; border-bottom: 1px solid var(--line); padding-bottom: 0.9rem; }
.rent-out .ro-label { font-size: 0.88rem; color: var(--fg-60); max-width: 60%; }
.rent-out .ro-val { font-family: var(--serif); font-size: clamp(1.2rem, 4vw, 1.7rem); color: var(--fg); white-space: nowrap; }

/* ---- Map ------------------------------------------------------------------------------------------------ */
.map-shell { position: relative; }
.map-shell svg { display: block; width: 100%; height: auto; }

/* ---- FAQ ------------------------------------------------------------------------------------------------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1.5rem;
  padding: 1.25rem 0.1rem; min-height: 44px;
  font-family: var(--serif); font-size: 1.15rem; font-weight: 420; color: var(--fg);
}
[dir='rtl'] .faq summary { font-weight: 700; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-family: var(--sans); font-size: 1.3rem; color: var(--accent); transition: transform 0.25s var(--e-out); flex: none; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .faq-body { padding: 0 0.1rem 1.4rem; color: var(--fg-60); max-width: 60em; font-size: 0.94rem; }

/* ---- Registration ("invitation") --------------------------------------------------------------------------- */
.register-wrap { display: grid; gap: 3rem; }
@media (min-width: 60rem) { .register-wrap { grid-template-columns: 5fr 6fr; gap: clamp(3rem, 7vw, 7rem); align-items: center; } }
.paper {
  background: var(--card-bg); color: var(--card-fg); border-radius: 3px;
  padding: clamp(1.7rem, 6vw, 3rem);
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.55);
}
.paper h3 { font-family: var(--serif); font-weight: 420; font-size: clamp(1.65rem, 5.6vw, 2.2rem); line-height: 1.08; color: var(--card-fg); }
[dir='rtl'] .paper h3 { font-weight: 700; line-height: 1.4; }
.paper .paper-sub { margin-top: 0.6rem; font-size: 0.9rem; color: var(--card-fg-60); }
.f-field { margin-top: 1.35rem; }
.f-field label { display: block; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--card-fg-60); margin-bottom: 0.4rem; }
[dir='rtl'] .f-field label { letter-spacing: 0.01em; }
.f-field input, .f-field select {
  width: 100%; font-family: var(--sans); font-size: 1.05rem; /* ≥16px — no iOS zoom */
  color: var(--card-fg); background: transparent;
  border: none; border-bottom: 1px solid var(--card-line); border-radius: 0;
  padding: 0.55rem 0.1rem; transition: border-color 0.25s var(--e-out);
  -webkit-appearance: none; appearance: none;
}
.f-field input:focus, .f-field select:focus { outline: none; border-bottom-color: var(--accent-on-card); }
.f-field input[aria-invalid='true'] { border-bottom-color: #b04437; }
.f-err { display: none; font-size: 0.78rem; color: #b04437; margin-top: 0.35rem; }
html[data-mood='fresh'] .f-err, html[data-mood='daylight'] .f-err { color: #e88276; }
.f-field.bad .f-err { display: block; }
.phone-pair { display: grid; grid-template-columns: 7.2rem 1fr; gap: 0.9rem; }
.f-check { display: flex; gap: 0.75rem; align-items: flex-start; margin-top: 1.3rem; }
.f-check input { flex: none; width: 1.2rem; height: 1.2rem; margin-top: 0.15rem; accent-color: var(--accent-on-card); }
.f-check label { font-size: 0.8rem; color: var(--card-fg-60); line-height: 1.55; }
.f-check a { color: var(--accent-on-card); }
.paper .btn--accent, html[data-mood='fresh'] .paper .btn--accent, html[data-mood='daylight'] .paper .btn--accent {
  width: 100%; margin-top: 1.6rem; min-height: 3.2rem;
  background: var(--accent-on-card); color: var(--card-bg);
}
.paper .form-status { min-height: 1.3em; margin-top: 0.8rem; font-size: 0.85rem; color: #b04437; }
html[data-mood='fresh'] .paper .form-status, html[data-mood='daylight'] .paper .form-status { color: #e88276; }
.hp-field { position: absolute; inset-inline-start: -9999px; top: -9999px; height: 0; overflow: hidden; }
.reg-points { margin-top: 1.8rem; display: grid; border-top: 1px solid var(--line); }
.reg-points > div { padding-block: 1.15rem; border-bottom: 1px solid var(--line); }
.reg-points b { display: block; color: var(--fg); font-weight: 600; margin-bottom: 0.15rem; }
.reg-points span { font-size: 0.88rem; color: var(--fg-60); }
.success { text-align: center; padding-block: 1.5rem; }
.success .s-rule { width: 3.5rem; height: 1px; background: var(--accent-on-card); margin: 1.3rem auto; }
.success p { color: var(--card-fg-60); max-width: 26em; margin-inline: auto; font-size: 0.95rem; }
.success .btn--wa { margin-top: 1.6rem; width: 100%; min-height: 3.2rem; }

/* ---- Footer -------------------------------------------------------------------------------------------------- */
.ft { border-top: 1px solid var(--line); padding: 3.2rem 0 calc(7rem + var(--sa-b)); font-size: 0.8rem; color: var(--fg-40); }
@media (min-width: 56rem) { .ft { padding-bottom: calc(3.2rem + var(--sa-b)); } }
.ft-grid { display: grid; gap: 2.2rem; }
@media (min-width: 56rem) { .ft-grid { grid-template-columns: 1fr 1.4fr; gap: 5rem; } }
.ft p { line-height: 1.7; }
.ft p + p { margin-top: 0.8rem; }
.ft a { color: var(--fg-60); text-decoration: none; }
.ft a:hover { color: var(--fg); }
.ft-links { display: flex; flex-wrap: wrap; gap: 1.4rem; margin-top: 1.6rem; }
.ft-ar { font-family: 'IBM Plex Sans Arabic', sans-serif; direction: rtl; text-align: start; }
.ft-en { direction: ltr; text-align: start; }

/* ---- Mobile action dock ----------------------------------------------------------------------------------------- */
.dock {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 90;
  display: flex; gap: 0.7rem;
  padding: 0.75rem calc(var(--gutter) + var(--sa-r)) calc(0.75rem + var(--sa-b)) calc(var(--gutter) + var(--sa-l));
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  transform: translateY(105%); transition: transform 0.4s var(--e-out);
}
.dock.on { transform: none; }
.dock .btn--accent { flex: 1; }
.dock .dock-wa {
  flex: none; width: 3rem; min-height: 3rem; display: grid; place-items: center;
  border: 1px solid color-mix(in srgb, var(--fg) 30%, transparent); border-radius: 2px; color: var(--fg);
  transition: transform 0.15s var(--e-out);
}
.dock .dock-wa:active { transform: scale(0.96); }
@media (min-width: 56rem) { .dock { display: none; } }

/* ==========================================================================
   BUILD B ADDITIONS — Google Ads-optimised hero grammar + call path
   (see ../../CRITIQUE-GOOGLE-ADS.md)
   ========================================================================== */

/* Answer-panel hero: a solid, accent-ruled panel carrying the literal search
   answer (product + place + price + CTA + trust line). Opaque by design —
   legible at any image brightness, screenshot-stable for ad review. */
.hero--panel { justify-content: flex-end; }
.hero--panel::after {
  /* lighter scrim — the panel carries legibility, image stays vivid */
  background: linear-gradient(to top, rgba(10, 9, 6, 0.45) 0%, rgba(10, 9, 6, 0.05) 45%, rgba(10, 9, 6, 0.35) 100%);
}
/* Mobile: a flush bottom sheet — image above, the full answer + CTA inside
   the first viewport. Desktop: a floating card over the composition. */
.hero-panel {
  background: var(--bg);
  border-top: 2px solid var(--accent);
  margin-inline: calc(-1 * (var(--gutter) + var(--sa-l))) calc(-1 * (var(--gutter) + var(--sa-r)));
  padding: clamp(1.3rem, 4.5vw, 2.4rem) calc(var(--gutter) + var(--sa-l)) calc(1rem + var(--sa-b)) calc(var(--gutter) + var(--sa-r));
}
@media (min-width: 56rem) {
  .hero-panel {
    width: min(38rem, 100%);
    margin-inline: 0;
    padding: clamp(1.4rem, 4.5vw, 2.4rem) clamp(1.25rem, 4.5vw, 2.4rem) clamp(1.2rem, 4vw, 2.2rem);
    margin-top: 30vh;
    margin-bottom: clamp(2rem, 6vh, 4rem);
  }
}
.hero-panel .hero-kicker { color: var(--accent); font-size: 0.95rem; margin-bottom: 0.7rem; }
.hero-panel .d-answer {
  font-family: var(--serif); font-weight: 400; font-optical-sizing: auto;
  font-size: clamp(1.7rem, 6.4vw, 2.9rem); line-height: 1.1; letter-spacing: -0.01em;
  color: var(--fg);
}
[dir='rtl'] .hero-panel .d-answer { font-weight: 700; line-height: 1.45; letter-spacing: 0; }
.hero-panel .d-answer b { font-weight: 560; color: var(--accent); white-space: nowrap; }
[dir='rtl'] .hero-panel .d-answer b { font-weight: 700; }
.hero-panel .hero-sub { color: var(--fg-60); margin-top: 0.9rem; }
.hero-panel .hero-sub b { color: var(--fg); }
.hero-panel .hero-trust {
  margin-top: 1.1rem; padding-top: 0.9rem; border-top: 1px solid var(--line);
  font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-40);
}
[dir='rtl'] .hero-panel .hero-trust { letter-spacing: 0.02em; }
.hero-panel .hero-cta-row { margin-top: 1.3rem; }
.hero-panel .link-quiet { color: var(--fg-60); border-color: var(--line); }
.hero-panel .link-quiet:hover { color: var(--fg); }
/* panel entrance: one weighted rise (no per-line masks in this grammar) */
.js .hero-panel { opacity: 0; transform: translateY(34px); transition: opacity 0.9s var(--e-out) 0.15s, transform 0.9s var(--e-out) 0.15s; }
.js.is-entered .hero-panel { opacity: 1; transform: none; }
.reduced .hero-panel { opacity: 1 !important; transform: none !important; }

/* Dock: Register (primary) + Call + WhatsApp */
.dock .dock-act {
  flex: none; width: 3rem; min-height: 3rem; display: grid; place-items: center;
  border: 1px solid color-mix(in srgb, var(--fg) 30%, transparent); border-radius: 2px; color: var(--fg);
  transition: transform 0.15s var(--e-out);
}
.dock .dock-act:active { transform: scale(0.96); }

/* panel grammar refinements */
.hero--panel .hero-inner { padding-bottom: 0; }
.hero--panel .hero-caption {
  bottom: auto;
  top: calc(var(--sa-t) + 4.6rem);
  text-shadow: 0 1px 8px rgba(10, 9, 6, 0.7);
}


/* ==========================================================================
   Snap gallery — thumb-scrolled photo strip. Native momentum + scroll-snap;
   full-bleed on phones, contained on desktop. Images lazy + fixed AR (CLS 0).
   ========================================================================== */
.snap {
  display: grid; grid-auto-flow: column;
  grid-auto-columns: min(82vw, 26rem);
  gap: 0.9rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-inline: calc(var(--gutter) + var(--sa-l)) calc(var(--gutter) + var(--sa-r));
  scroll-padding-inline-start: calc(var(--gutter) + var(--sa-l));
  margin-inline: calc(-1 * (var(--gutter) + var(--sa-l))) calc(-1 * (var(--gutter) + var(--sa-r)));
}
.snap::-webkit-scrollbar { display: none; }
.snap > figure { scroll-snap-align: start; margin: 0; }
.snap .frame { aspect-ratio: 4 / 3; }
@media (min-width: 56rem) {
  .snap { grid-auto-columns: 24rem; margin-inline: 0; padding-inline: 0; scroll-padding-inline-start: 0; }
}
.snap-hint { margin-top: 0.8rem; font-size: 0.72rem; color: var(--fg-40); letter-spacing: 0.08em; text-transform: uppercase; }
[dir='rtl'] .snap-hint { letter-spacing: 0.02em; }
@media (min-width: 56rem) { .snap-hint { display: none; } }

/* ==========================================================================
   WhatsApp intent widget — bottom sheet on phones (thumb zone, safe-area),
   corner popover on desktop. The visitor picks a pre-written intent, so the
   first WhatsApp message arrives pre-qualified — and the tap is trackable.
   ========================================================================== */
.wa-backdrop {
  position: fixed; inset: 0; z-index: 190;
  background: rgba(8, 8, 6, 0.5);
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s var(--e-out);
}
.wa-backdrop.on { opacity: 1; pointer-events: auto; }
.wa-sheet {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 200;
  background: var(--bg); color: var(--fg);
  border-radius: 16px 16px 0 0;
  border-top: 1px solid var(--line);
  padding: 0.6rem calc(var(--gutter) + var(--sa-r)) calc(1.1rem + var(--sa-b)) calc(var(--gutter) + var(--sa-l));
  transform: translateY(103%);
  transition: transform 0.38s var(--e-out);
  box-shadow: 0 -20px 60px -20px rgba(0, 0, 0, 0.4);
}
.wa-sheet.on { transform: none; }
.reduced .wa-sheet { transition: none; }
@media (min-width: 56rem) {
  .wa-sheet {
    inset-inline-start: auto; inset-inline-end: 1.5rem; bottom: 6.2rem;
    width: 22.5rem; border-radius: 12px; border: 1px solid var(--line);
    padding: 0.6rem 1.4rem 1.4rem;
  }
  [dir='rtl'] .wa-sheet { inset-inline-end: 1.5rem; }
}
.wa-handle { width: 2.4rem; height: 4px; border-radius: 999px; background: var(--line); margin: 0.35rem auto 0.9rem; }
@media (min-width: 56rem) { .wa-handle { display: none; } }
.wa-head { display: flex; align-items: center; gap: 0.7rem; }
.wa-head .wa-ic {
  flex: none; width: 2.4rem; height: 2.4rem; border-radius: 50%;
  background: var(--wa); color: #fff; display: grid; place-items: center;
}
.wa-head b { font-size: 1.05rem; color: var(--fg); }
.wa-head span { display: block; font-size: 0.78rem; color: var(--fg-40); }
.wa-intent {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 3.25rem; margin-top: 0.65rem; padding: 0.85rem 1rem;
  border: 1px solid var(--line); border-radius: 10px;
  color: var(--fg); font-weight: 600; font-size: 0.98rem; text-decoration: none;
  transition: transform 0.15s var(--e-out), border-color 0.25s var(--e-out), background-color 0.25s var(--e-out);
}
.wa-intent:first-of-type { margin-top: 1.1rem; }
.wa-intent:active { transform: scale(0.985); background: color-mix(in srgb, var(--fg) 5%, transparent); }
.wa-intent:hover { border-color: color-mix(in srgb, var(--fg) 40%, transparent); }
.wa-intent .arr { color: var(--wa); flex: none; }
.wa-note { margin-top: 0.9rem; font-size: 0.74rem; color: var(--fg-40); }
.wa-close {
  position: absolute; top: 0.6rem; inset-inline-end: 0.7rem;
  width: 2.4rem; height: 2.4rem; display: grid; place-items: center;
  color: var(--fg-40); font-size: 1.15rem; border-radius: 50%;
}
.wa-close:active { background: color-mix(in srgb, var(--fg) 8%, transparent); }
/* desktop floating bubble (dock is mobile-only) */
.wa-bubble {
  position: fixed; bottom: 1.6rem; inset-inline-end: 1.6rem; z-index: 90;
  width: 3.6rem; height: 3.6rem; border-radius: 50%;
  background: var(--wa); color: #fff;
  display: none; place-items: center;
  box-shadow: 0 12px 30px -8px rgba(0, 0, 0, 0.45);
  transition: transform 0.2s var(--e-out);
}
.wa-bubble:hover { transform: scale(1.06); }
.wa-bubble:active { transform: scale(0.97); }
@media (min-width: 56rem) { .wa-bubble { display: grid; } }
