/*!
  Marbella Group — production stylesheet
  Semantic HTML5 + modern CSS. No build step. No frameworks.
  Design language: luxury natural marble + refined architectural glassmorphism.
  Supports Light / Dark themes via [data-theme] on <html>.
*/

/* ============================================================
   1. FONT FACES (self-hosted, subset to weights actually used)
   ============================================================ */
@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope/Manrope-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope/Manrope-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope/Manrope-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope/Manrope-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope/Manrope-ExtraBold.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans Arabic";
  src: url("../fonts/ibm-plex-sans-arabic/IBMPlexSansArabic-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans Arabic";
  src: url("../fonts/ibm-plex-sans-arabic/IBMPlexSansArabic-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans Arabic";
  src: url("../fonts/ibm-plex-sans-arabic/IBMPlexSansArabic-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans Arabic";
  src: url("../fonts/ibm-plex-sans-arabic/IBMPlexSansArabic-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ============================================================
   2. DESIGN TOKENS — Light (default) + Dark theme
   ============================================================ */
:root {
  /* Brand accent — derived from the existing Marbella navy (#343f52) */
  --brand-900: #1c212b;
  --brand-800: #232a37;
  --brand-700: #2c3444;
  --brand-600: #343f52; /* original brand navy */
  --brand-500: #4a5670;

  /* Warm bronze accent, pulled from travertine tones — used sparingly */
  --bronze-500: #a3814f;
  --bronze-600: #8a6c40;

  /* ---- Secondary brand accent: Marbella warm gold ----
     Same hue family as the bronze/travertine tones above (≈36°); used only
     for small, deliberate details (eyebrows, hairlines, active states). */
  --accent-gold: #a3814f;                      /* decorative: lines, dots, borders */
  --accent-gold-text: #81643a;                 /* small text on light surfaces (≥4.9:1 on cream/white) */
  --accent-gold-soft: rgba(163, 129, 79, 0.12);
  --accent-gold-border: rgba(163, 129, 79, 0.42);
  --accent-gold-ring: rgba(163, 129, 79, 0.24);
  --accent-gold-on-dark: #e2bd85;              /* on always-dark photo/inverse surfaces */
  /* Hero-only champagne: same warm hue, lifted for photo readability */
  --accent-gold-hero: #edd9a8;

  /* ---- Semantic tokens (flip between themes) ---- */
  --surface-page: #fbf9f5;
  --surface-alt: #f6f2ea;
  --surface-panel: #ffffff;
  --surface-sunken: #f0eadf;
  --surface-inverse: #1c212b;
  --surface-inverse-alt: #232a37;

  --text-heading: #1c1a17;
  --text-body: #3a3733;
  --text-muted: #565149;
  --text-faint: #75706a;
  --text-on-inverse: rgba(255, 255, 255, 0.94);
  --text-on-inverse-muted: rgba(255, 255, 255, 0.7);

  --line-soft: rgba(28, 26, 23, 0.1);
  --line-strong: rgba(28, 26, 23, 0.18);
  --line-inverse: rgba(255, 255, 255, 0.14);

  --glass-bg: rgba(255, 255, 255, 0.62);
  --glass-border: rgba(255, 255, 255, 0.55);
  --glass-panel-bg: rgba(255, 255, 255, 0.72);

  --shadow-sm: 0 1px 2px rgba(28, 26, 23, 0.06), 0 1px 1px rgba(28, 26, 23, 0.04);
  --shadow-md: 0 12px 32px -8px rgba(28, 26, 23, 0.16);
  --shadow-lg: 0 30px 60px -20px rgba(20, 18, 16, 0.28);

  --btn-primary-bg: var(--text-heading);
  --btn-primary-bg-hover: var(--brand-600);
  --btn-primary-text: #fff;
  --btn-outline-hover-text: #fff;

  --input-bg: rgba(255, 255, 255, 0.75);
  --input-bg-focus: #ffffff;
  --input-border: var(--line-strong);
  --input-focus-ring: rgba(52, 63, 82, 0.16);

  --scrollbar-thumb: rgba(28, 26, 23, 0.22);

  /* Typography */
  --font-display: "Manrope", "Segoe UI", Tahoma, Arial, sans-serif;
  --font-body: "Manrope", "Segoe UI", Tahoma, Arial, sans-serif;
  --heading-weight: 700;
  --heading-letter-spacing: -0.01em;

  --fs-hero: clamp(2.75rem, 4.6vw + 1rem, 6.25rem);
  --fs-display-1: clamp(2.25rem, 2.6vw + 1.1rem, 3.75rem);
  --fs-display-2: clamp(1.75rem, 1.6vw + 1rem, 2.75rem);
  --fs-h3: clamp(1.375rem, 0.6vw + 1.1rem, 1.75rem);
  --fs-lead: clamp(1.0625rem, 0.3vw + 0.95rem, 1.25rem);
  --fs-body: 1rem;
  --fs-small: 0.875rem;
  --fs-eyebrow: 0.8125rem;

  /* Spacing */
  --space-3xs: 0.25rem;
  --space-2xs: 0.5rem;
  --space-xs: 0.75rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.25rem;
  --space-xl: 3.5rem;
  --space-2xl: 5.5rem;
  --space-3xl: 8rem;

  /* Radii & shadow */
  --radius-sm: 6px;
  --radius-md: 14px;
  --radius-lg: 26px;
  --radius-pill: 999px;

  /* Motion */
  --ease-editorial: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 180ms;
  --dur-med: 420ms;
  --dur-slow: 900ms;

  --container-max: 1320px;
  --header-h: 84px;

  color-scheme: light;
}

/* ---- Dark theme: polished Nero Marquina marble + graphite ---- */
[data-theme="dark"] {
  color-scheme: dark;

  --bronze-500: #cda86f;
  --bronze-600: #e2bd85;

  --accent-gold: #cda86f;
  --accent-gold-text: #e2bd85;
  --accent-gold-soft: rgba(205, 168, 111, 0.12);
  --accent-gold-border: rgba(205, 168, 111, 0.4);
  --accent-gold-ring: rgba(205, 168, 111, 0.26);
  --accent-gold-hero: #f0dfb4;

  --surface-page: #131316;
  --surface-alt: #191a1e;
  --surface-panel: #1d1e23;
  --surface-sunken: #101114;
  --surface-inverse: #0b0c0e;
  --surface-inverse-alt: #141518;

  --text-heading: #f4efe6;
  --text-body: #d6d0c6;
  --text-muted: #a89f92;
  --text-faint: #79736a;
  --text-on-inverse: rgba(244, 239, 230, 0.94);
  --text-on-inverse-muted: rgba(244, 239, 230, 0.64);

  --line-soft: rgba(244, 239, 230, 0.08);
  --line-strong: rgba(244, 239, 230, 0.17);
  --line-inverse: rgba(244, 239, 230, 0.12);

  --glass-bg: rgba(28, 29, 33, 0.58);
  --glass-border: rgba(244, 239, 230, 0.1);
  --glass-panel-bg: rgba(28, 29, 33, 0.66);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5), 0 1px 1px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 16px 36px -10px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 34px 68px -20px rgba(0, 0, 0, 0.7);

  --btn-primary-bg: #f2ece1;
  --btn-primary-bg-hover: #ffffff;
  --btn-primary-text: #16171a;
  --btn-outline-hover-text: #16171a;

  --input-bg: rgba(255, 255, 255, 0.045);
  --input-bg-focus: rgba(255, 255, 255, 0.075);
  --input-border: var(--line-strong);
  --input-focus-ring: rgba(205, 168, 111, 0.22);

  --scrollbar-thumb: rgba(244, 239, 230, 0.18);
}

/* Subtle polished-stone veining texture, dark mode only, very low opacity */
[data-theme="dark"] body {
  background-image:
    radial-gradient(ellipse 60% 40% at 15% 8%, rgba(244, 239, 230, 0.035), transparent 60%),
    radial-gradient(ellipse 50% 35% at 85% 92%, rgba(205, 168, 111, 0.03), transparent 60%);
  background-attachment: fixed;
}

/* ---- Arabic typography overrides ---- */
html[lang="ar"] {
  --font-display: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
  --font-body: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
  --heading-weight: 600;
  --heading-letter-spacing: 0;
}
html[lang="ar"] body { line-height: 1.85; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3, html[lang="ar"] h4 {
  line-height: 1.45;
  letter-spacing: 0;
}
html[lang="ar"] .hero__title { letter-spacing: 0; }
html[lang="ar"] .eyebrow { letter-spacing: 0.02em; }
html[lang="ar"] .eyebrow::before { display: none; }
html[lang="ar"] .btn, html[lang="ar"] .text-link, html[lang="ar"] .lang-switch a,
html[lang="ar"] .primary-nav a, html[lang="ar"] .mobile-nav a { letter-spacing: 0; }
html[lang="ar"] .primary-nav a { font-size: 1rem; }
html[lang="ar"] .footer-col h4 { letter-spacing: 0.02em; }
html[lang="ar"] .lead { line-height: 1.9; }

/* ============================================================
   3. RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body, h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, picture, svg { display: block; max-width: 100%; }
img { height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
table { border-collapse: collapse; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--text-body);
  background: var(--surface-page);
  overflow-x: hidden;
  transition: background-color var(--dur-med) var(--ease-editorial), color var(--dur-med) var(--ease-editorial);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--text-heading);
  line-height: 1.12;
  font-weight: var(--heading-weight);
  letter-spacing: var(--heading-letter-spacing);
}

p { color: var(--text-muted); }

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent-gold);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--bronze-500); color: #1c1a17; }

/* ============================================================
   4. LAYOUT PRIMITIVES
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 3rem);
}

.section {
  padding-block: var(--space-3xl);
  position: relative;
}
.section--tight { padding-block: var(--space-2xl); }
.section--alt { background: var(--surface-alt); }
.section--brand {
  background: linear-gradient(150deg, var(--surface-inverse-alt), var(--surface-inverse) 70%);
  color: var(--text-on-inverse);
}
.section--brand h2, .section--brand h3 { color: #fff; }
.section--brand p { color: rgba(255, 255, 255, 0.72); }

.section-head {
  max-width: 46rem;
  margin-bottom: var(--space-xl);
}
.section-head--center { margin-inline: auto; text-align: center; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  font-family: var(--font-display);
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-gold-text);
  margin-bottom: var(--space-sm);
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--accent-gold);
  opacity: 0.85;
}
.section--brand .eyebrow { color: var(--accent-gold-on-dark); }

.lead {
  font-size: var(--fs-lead);
  color: var(--text-muted);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -60px;
  background: var(--text-heading);
  color: var(--surface-page);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  z-index: 200;
  transition: top var(--dur-fast) var(--ease-editorial);
  font-weight: 600;
}
.skip-link:focus { top: 1rem; }

/* ============================================================
   5. BUTTONS & LINKS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9375rem;
  letter-spacing: 0.01em;
  padding: 0.95rem 1.9rem;
  border-radius: var(--radius-pill);
  transition: transform var(--dur-fast) var(--ease-editorial),
              background var(--dur-fast) var(--ease-editorial),
              color var(--dur-fast) var(--ease-editorial),
              box-shadow var(--dur-fast) var(--ease-editorial),
              border-color var(--dur-fast) var(--ease-editorial),
              opacity var(--dur-fast) var(--ease-editorial);
  white-space: nowrap;
  border: 1px solid transparent;
}
.btn svg { width: 1em; height: 1em; flex-shrink: 0; }
.btn__label { display: inline-flex; align-items: center; gap: 0.6rem; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.6; cursor: not-allowed; transform: none; }

.btn--primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover { background: var(--btn-primary-bg-hover); box-shadow: var(--shadow-md); }

.btn--ghost-light {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.btn--ghost-light:hover { background: rgba(255, 255, 255, 0.22); }

.btn--outline {
  background: transparent;
  color: var(--text-heading);
  border-color: var(--line-strong);
}
.btn--outline:hover { background: var(--text-heading); color: var(--btn-outline-hover-text); border-color: var(--text-heading); }

.btn--block { width: 100%; justify-content: center; }

.btn--loading { position: relative; color: transparent !important; pointer-events: none; }
.btn--loading .btn__spinner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn__spinner { display: none; }
.btn__spinner svg {
  width: 1.15em; height: 1.15em;
  color: var(--btn-primary-text);
  animation: spin 0.85s linear infinite;
}
.btn--loading .btn__spinner { display: flex; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .btn__spinner svg { animation-duration: 1.6s; }
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-heading);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 2px;
  transition: color var(--dur-fast) var(--ease-editorial), border-color var(--dur-fast) var(--ease-editorial), gap var(--dur-fast) var(--ease-editorial);
}
.text-link:hover { color: var(--bronze-600); border-color: var(--bronze-600); gap: 0.6rem; }
.text-link svg { width: 1em; height: 1em; }
[dir="rtl"] .icon-arrow { transform: scaleX(-1); }

/* ============================================================
   6. HEADER / NAVIGATION
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  inset-inline: 0;
  z-index: 100;
  padding-block: var(--space-md);
  transition: padding var(--dur-med) var(--ease-editorial);
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  border-radius: var(--radius-lg);
  padding: 0.7rem 0.9rem 0.7rem 1.4rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--dur-med) var(--ease-editorial), border-radius var(--dur-med) var(--ease-editorial),
              background var(--dur-med) var(--ease-editorial), border-color var(--dur-med) var(--ease-editorial);
}
[dir="rtl"] .nav-shell { padding: 0.7rem 1.4rem 0.7rem 0.9rem; }

.site-header.is-scrolled .nav-shell {
  box-shadow: var(--shadow-md);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.brand-mark img { height: 22px; width: auto; }
[data-theme="dark"] .brand-mark img { filter: brightness(0) invert(1); }

.primary-nav { display: none; }
.primary-nav ul {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}
.primary-nav a {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-body);
  position: relative;
  padding-block: 0.4rem;
  transition: color var(--dur-fast) var(--ease-editorial);
}
.primary-nav a::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--bronze-600);
  transition: width var(--dur-fast) var(--ease-editorial);
}
.primary-nav a:hover { color: var(--text-heading); }
.primary-nav a:hover::after { width: 100%; }

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* Language switcher — real links, always visible, no JS required */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: rgba(128, 120, 108, 0.12);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-pill);
  padding: 3px;
}
.lang-switch a {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0.4rem 0.65rem;
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  transition: background var(--dur-fast) var(--ease-editorial), color var(--dur-fast) var(--ease-editorial);
}
.lang-switch a:hover { color: var(--text-heading); }
.lang-switch a[aria-current="page"] {
  background: var(--text-heading);
  color: var(--surface-page);
}

/* ---- Theme toggle ---- */
.theme-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 52px;
  height: 30px;
  border-radius: var(--radius-pill);
  background: rgba(128, 120, 108, 0.16);
  border: 1px solid var(--line-soft);
  flex-shrink: 0;
  transition: background var(--dur-fast) var(--ease-editorial), border-color var(--dur-fast) var(--ease-editorial);
}
.theme-toggle:hover { border-color: var(--line-strong); }
.theme-toggle__thumb {
  position: absolute;
  inset-inline-start: 3px;
  top: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--surface-panel);
  box-shadow: var(--shadow-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--bronze-600);
  transition: inset-inline-start var(--dur-med) var(--ease-editorial), background var(--dur-med) var(--ease-editorial), transform var(--dur-med) var(--ease-editorial);
}
[data-theme="dark"] .theme-toggle__thumb {
  inset-inline-start: 25px;
  transform: rotate(0deg);
}
.theme-toggle__thumb svg { width: 13px; height: 13px; }
.theme-toggle__thumb .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle__thumb .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle__thumb .icon-moon { display: inline-flex; }
@media (prefers-reduced-motion: reduce) {
  .theme-toggle__thumb { transition: inset-inline-start var(--dur-fast) linear; }
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--text-heading);
  transition: background var(--dur-fast) var(--ease-editorial);
}
.menu-toggle:hover { background: rgba(128,120,108,0.14); }
.menu-toggle svg { width: 20px; height: 20px; }
.menu-toggle .icon-close { display: none; }

/* Compact header for narrow viewports: the full-size wordmark logo plus
   lang-switch plus theme-toggle plus hamburger do not fit next to each
   other below ~620px. Shrink the logo/controls and move the always-visible,
   no-JS-required language switcher into the off-canvas drawer only (it is
   still present there — see .mobile-panel__row — and the drawer itself is
   pure-CSS checkbox-driven, so no-JS language switching remains possible
   with at most one extra tap). This prevents horizontal page overflow on
   real phones (320–620px) without hiding any functionality. */
@media (max-width: 640px) {
  .nav-shell { gap: var(--space-xs); padding: 0.55rem 0.6rem 0.55rem 0.85rem; }
  [dir="rtl"] .nav-shell { padding: 0.55rem 0.85rem 0.55rem 0.6rem; }
  .brand-mark img { height: 14px; }
  .header-actions { gap: 8px; }
  .site-header .header-actions .lang-switch { display: none; }
  .theme-toggle { width: 40px; height: 24px; }
  .theme-toggle__thumb { width: 18px; height: 18px; top: 3px; }
  [data-theme="dark"] .theme-toggle__thumb { inset-inline-start: 19px; }
  .theme-toggle__thumb svg { width: 11px; height: 11px; }
  .menu-toggle { width: 36px; height: 36px; }
  .menu-toggle svg { width: 18px; height: 18px; }
}

@media (min-width: 1080px) {
  .primary-nav { display: block; }
  .menu-toggle { display: none; }
}

/* Mobile off-canvas menu — CSS-driven (checkbox) so it works with JS disabled */
.nav-toggle-input { position: absolute; opacity: 0; pointer-events: none; }

.mobile-panel {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(10, 10, 9, 0.46);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur-med) var(--ease-editorial), visibility var(--dur-med) var(--ease-editorial);
}
.mobile-panel__sheet {
  position: absolute;
  top: 0;
  inset-inline-end: 0;
  height: 100%;
  width: min(360px, 88vw);
  background: var(--surface-page);
  border-inline-start: 1px solid var(--line-soft);
  padding: var(--space-lg) var(--space-lg) var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
  transform: translateX(105%);
  transition: transform var(--dur-med) var(--ease-editorial);
  overflow-y: auto;
}
[dir="rtl"] .mobile-panel__sheet { transform: translateX(-105%); }

.nav-toggle-input:checked ~ .mobile-panel {
  opacity: 1;
  visibility: visible;
}
.nav-toggle-input:checked ~ .mobile-panel .mobile-panel__sheet {
  transform: translateX(0);
}
.nav-toggle-input:checked ~ .site-header .icon-burger { display: none; }
.nav-toggle-input:checked ~ .site-header .icon-close { display: inline-flex; }

.mobile-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.mobile-panel__close {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(128,120,108,0.14);
}
.mobile-panel__close svg { width: 18px; height: 18px; }

.mobile-panel__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.mobile-nav ul { display: flex; flex-direction: column; gap: var(--space-md); }
.mobile-nav a {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-heading);
}

.mobile-panel__contact {
  margin-top: auto;
  padding-top: var(--space-lg);
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  font-size: var(--fs-small);
  color: var(--text-muted);
}
.mobile-panel__contact a { color: var(--text-heading); font-weight: 600; }
.mobile-social { display: flex; gap: var(--space-sm); margin-top: var(--space-2xs); }
.mobile-social a {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(128,120,108,0.14);
  color: var(--text-heading);
}
.mobile-social svg { width: 16px; height: 16px; }

@media (min-width: 1080px) {
  .mobile-panel, .nav-toggle-input { display: none; }
}

/* ============================================================
   7. HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: min(92vh, 880px);
  display: flex;
  align-items: center;
  color: #fff;
  overflow: hidden;
  margin-top: calc(-1 * var(--header-h) - var(--space-md));
  padding-top: calc(var(--header-h) + var(--space-md));
}
.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  /* Light: slightly deeper mid-band so gold eyebrow + white title stay readable
     without flattening the hero photograph. */
  background:
    linear-gradient(180deg, rgba(20,22,26,0.58) 0%, rgba(18,19,22,0.42) 28%, rgba(16,15,14,0.62) 72%, rgba(14,13,12,0.84) 100%);
}
[data-theme="dark"] .hero__scrim {
  background:
    linear-gradient(180deg, rgba(8,9,10,0.68) 0%, rgba(8,9,10,0.5) 32%, rgba(6,6,6,0.72) 78%, rgba(4,4,4,0.9) 100%);
}
.hero__content {
  padding-block: var(--space-2xl);
  max-width: 44rem;
}
.hero__kicker {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  font-family: var(--font-display);
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-gold-hero);
  margin-bottom: var(--space-md);
  /* Soft lift only — keeps the label cinematic, not badged */
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.55),
    0 0 18px rgba(0, 0, 0, 0.28);
}
html[lang="ar"] .hero__kicker { letter-spacing: 0.02em; }
.hero__kicker::before {
  content: "";
  width: 26px;
  height: 1px;
  flex-shrink: 0;
  background: currentColor;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}
html[lang="ar"] .hero__kicker::before { display: none; }

.hero__title {
  font-size: var(--fs-hero);
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #fff;
  margin-bottom: var(--space-md);
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}
html[lang="ar"] .hero__title { font-weight: 700; }
.hero__tagline {
  font-size: var(--fs-lead);
  color: rgba(255,255,255,0.88);
  max-width: 32rem;
  margin-bottom: var(--space-xl);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}
.hero__scroll {
  position: absolute;
  bottom: var(--space-lg);
  inset-inline-start: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2xs);
  color: rgba(255,255,255,0.75);
  font-size: var(--fs-small);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: var(--font-display);
}
[dir="rtl"] .hero__scroll { transform: translateX(50%); }
.hero__scroll-line {
  width: 1px;
  height: 34px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.9), transparent);
  animation: scrollPulse 2.2s var(--ease-editorial) infinite;
}
@keyframes scrollPulse {
  0% { transform: scaleY(0.3); opacity: 0.4; }
  50% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(0.3); opacity: 0.4; }
}
@media (prefers-reduced-motion: reduce) {
  .hero__scroll-line { animation: none; }
}

@media (max-width: 640px) {
  .hero { min-height: 100vh; }
  .hero__title { letter-spacing: 0.03em; }
}

/* ============================================================
   8. ABOUT / WHO WE ARE
   ============================================================ */
.about {
  display: grid;
  gap: var(--space-2xl);
  align-items: center;
}
@media (min-width: 960px) {
  .about { grid-template-columns: 0.9fr 1.1fr; }
  .about--media-end { grid-template-columns: 1.1fr 0.9fr; }
  .about--media-end .about__media { order: 2; }
}

.about__media { position: relative; }
.diptych {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}
.diptych figure {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--line-soft);
}
.diptych figure:first-child { transform: translateY(1.5rem); }
.diptych img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 3/4; }
.diptych__frame {
  position: absolute;
  inset: -1.1rem;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  z-index: -1;
  pointer-events: none;
}
@media (max-width: 640px) {
  .diptych figure:first-child { transform: none; }
}

.about__body h2 { font-size: var(--fs-display-1); margin-bottom: var(--space-md); }
.about__body p + p { margin-top: var(--space-sm); }
.about__stat-row {
  display: flex;
  gap: var(--space-lg);
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--line-soft);
  flex-wrap: wrap;
}
.about__stat b {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--text-heading);
}
.about__stat span {
  font-size: var(--fs-small);
  color: var(--text-faint);
}

/* ============================================================
   9. VISION & MISSION CARDS
   ============================================================ */
.vm-grid {
  display: grid;
  gap: var(--space-lg);
}
@media (min-width: 800px) {
  .vm-grid { grid-template-columns: repeat(2, 1fr); }
}
.vm-card {
  background: var(--surface-panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: var(--space-xl) var(--space-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--dur-med) var(--ease-editorial), transform var(--dur-med) var(--ease-editorial), background var(--dur-med) var(--ease-editorial);
}
.vm-card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.vm-card__icon {
  width: 52px; height: 52px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-sunken);
  color: var(--brand-600);
  border: 1px solid var(--accent-gold-border);
  margin-bottom: var(--space-md);
}
[data-theme="dark"] .vm-card__icon { color: var(--accent-gold); }
.vm-card__icon svg { width: 24px; height: 24px; }
.vm-card h3 { font-size: var(--fs-h3); margin-bottom: var(--space-sm); }
.vm-card ul { display: flex; flex-direction: column; gap: var(--space-sm); margin-top: var(--space-sm); }
.vm-card li {
  display: flex;
  gap: var(--space-sm);
  color: var(--text-muted);
  align-items: flex-start;
}
.vm-card li::before {
  content: "";
  flex-shrink: 0;
  margin-top: 0.55em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent-gold);
}

/* ============================================================
   10. IMMERSIVE / CAPABILITIES BANNER
   ============================================================ */
.capabilities {
  position: relative;
  color: #fff;
  overflow: hidden;
}
.capabilities__media { position: absolute; inset: 0; z-index: -2; }
.capabilities__media img { width: 100%; height: 100%; object-fit: cover; }
.capabilities__scrim {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(120deg, rgba(28,33,43,0.92) 8%, rgba(28,33,43,0.68) 45%, rgba(28,33,43,0.3) 100%);
}
[dir="rtl"] .capabilities__scrim {
  background: linear-gradient(240deg, rgba(28,33,43,0.92) 8%, rgba(28,33,43,0.68) 45%, rgba(28,33,43,0.3) 100%);
}
[data-theme="dark"] .capabilities__scrim {
  background: linear-gradient(120deg, rgba(6,7,8,0.94) 8%, rgba(6,7,8,0.72) 45%, rgba(6,7,8,0.32) 100%);
}
[data-theme="dark"][dir="rtl"] .capabilities__scrim {
  background: linear-gradient(240deg, rgba(6,7,8,0.94) 8%, rgba(6,7,8,0.72) 45%, rgba(6,7,8,0.32) 100%);
}
.capabilities__panel { max-width: 42rem; }
.capabilities__panel h2 { color: #fff; font-size: var(--fs-display-1); margin-bottom: var(--space-md); }
.capabilities__panel h3 { color: rgba(255,255,255,0.94); font-size: var(--fs-h3); font-weight: 500; margin-bottom: var(--space-md); line-height: 1.4; }
.capabilities__panel p { color: rgba(255,255,255,0.72); }
.capabilities__meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}
.capabilities__meta svg { width: 28px; height: 28px; color: var(--accent-gold-on-dark); }
.capabilities__meta span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-eyebrow);
  text-transform: uppercase;
  color: var(--accent-gold-on-dark);
  letter-spacing: 0.18em;
}

/* ============================================================
   11. PRODUCTS — PREMIUM CENTERED CAROUSEL (Swiper-powered)
   ============================================================ */
.carousel { position: relative; }

/* Swiper container. Overflow must stay hidden at the PAGE level (no
   page-level horizontal scrollbar) — only the carousel viewport itself
   scrolls/swipes. Vertical padding gives the scaled active card room to
   grow without being visually clipped by the container edge. */
.carousel__viewport.swiper {
  overflow: hidden;
  padding-block: var(--space-md) var(--space-lg);
  cursor: grab;
}
.carousel__viewport.swiper:active { cursor: grabbing; }

.carousel__track.swiper-wrapper {
  /* Swiper drives transform/translate on this element; no extra layout
     properties needed here. */
}

.carousel__slide.swiper-slide {
  --slide-w: 250px;
  width: var(--slide-w);
  height: auto;
}
@media (min-width: 480px) { .carousel__slide.swiper-slide { --slide-w: 280px; } }
@media (min-width: 640px) { .carousel__slide.swiper-slide { --slide-w: 310px; } }
@media (min-width: 1000px) { .carousel__slide.swiper-slide { --slide-w: 340px; } }
@media (min-width: 1280px) { .carousel__slide.swiper-slide { --slide-w: 370px; } }

.product-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface-panel);
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-sm);
  transform: scale(0.88);
  opacity: 0.62;
  /* GPU-friendly properties only: transform + opacity (no layout-affecting
     animation), with an elegant, premium-feeling easing curve. */
  transition: box-shadow var(--dur-med) var(--ease-editorial), transform var(--dur-med) var(--ease-editorial), opacity var(--dur-med) var(--ease-editorial);
  will-change: transform, opacity;
}
.swiper-slide-active .product-card {
  transform: scale(1.09);
  opacity: 1;
  box-shadow: var(--shadow-lg);
}
.swiper-slide-prev .product-card,
.swiper-slide-next .product-card {
  transform: scale(0.94);
  opacity: 0.8;
}
@media (prefers-reduced-motion: reduce) {
  .product-card { transition: opacity var(--dur-fast) linear; }
}

.product-card__frame {
  display: block;
  width: 100%;
  aspect-ratio: 4/5;
  overflow: hidden;
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
}
/* Only the centered/active slide's image opens the lightbox — side
   slides just recenter (handled in JS); reflect that affordance visually. */
.swiper-slide-active .product-card__frame { cursor: zoom-in; }
.product-card__frame img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform var(--dur-slow) var(--ease-editorial);
  pointer-events: none;
}
.swiper-slide-active .product-card:hover .product-card__frame img { transform: scale(1.05); }
.product-card__body {
  padding: var(--space-md) var(--space-md) var(--space-lg);
}
.product-card__body h3 {
  font-size: 1.15rem;
  margin-bottom: 0.3rem;
}
.product-card__body p {
  font-size: var(--fs-small);
  letter-spacing: 0.02em;
  color: var(--text-faint);
}
.product-card__index {
  position: absolute;
  top: var(--space-sm);
  inset-inline-start: var(--space-sm);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text-heading);
  font-family: var(--font-display);
  font-size: var(--fs-small);
  font-weight: 700;
  width: 34px; height: 34px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  z-index: 2;
  pointer-events: none;
}

.carousel__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  margin-top: var(--space-lg);
}
.carousel__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--surface-panel);
  border: 1px solid var(--line-soft);
  color: var(--text-heading);
  box-shadow: var(--shadow-sm);
  transition: background var(--dur-fast) var(--ease-editorial), transform var(--dur-fast) var(--ease-editorial), box-shadow var(--dur-fast) var(--ease-editorial), opacity var(--dur-fast) var(--ease-editorial);
}
.carousel__arrow svg { width: 20px; height: 20px; }
[dir="rtl"] .carousel__arrow svg { transform: scaleX(-1); }
.carousel__arrow:hover { background: var(--text-heading); color: var(--surface-page); transform: translateY(-2px); box-shadow: var(--shadow-md); }
/* Looping carousel: arrows are never disabled (no awkward dead-end state). */
.carousel__arrow.swiper-button-disabled { display: none; }

.carousel__dots {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 220px;
}
.carousel__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line-strong);
  border: 0;
  padding: 0;
  transition: background var(--dur-fast) var(--ease-editorial), width var(--dur-med) var(--ease-editorial), transform var(--dur-fast) var(--ease-editorial);
}
.carousel__dot.is-active { width: 26px; border-radius: var(--radius-pill); background: var(--accent-gold); }
.carousel__dot:hover { background: var(--text-muted); }

@media (max-width: 640px) {
  .carousel__controls { gap: var(--space-md); }
  .carousel__arrow { width: 44px; height: 44px; }
}

/* ============================================================
   11b. PRODUCT IMAGE LIGHTBOX
   ============================================================ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(1.25rem, env(safe-area-inset-top)) max(1.25rem, env(safe-area-inset-right)) max(1.25rem, env(safe-area-inset-bottom)) max(1.25rem, env(safe-area-inset-left));
}
.lightbox[hidden] { display: none; }
.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 9, 0.87);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity var(--dur-med) var(--ease-editorial);
}
.lightbox.is-open .lightbox__backdrop { opacity: 1; }
.lightbox__dialog {
  position: relative;
  z-index: 1;
  max-width: min(94dvw, 1200px);
  max-height: 94dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  transform: scale(0.94) translateY(8px);
  opacity: 0;
  transition: transform var(--dur-med) var(--ease-editorial), opacity var(--dur-med) var(--ease-editorial);
}
.lightbox.is-open .lightbox__dialog { transform: scale(1) translateY(0); opacity: 1; }
.lightbox__figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: var(--space-sm); min-width: 0; max-width: 100%; max-height: 100%; }
.lightbox__img {
  display: block;
  max-width: min(90dvw, 1200px);
  max-height: min(78dvh, 900px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  background: #0b0c0e;
}
.lightbox__caption {
  color: rgba(255, 255, 255, 0.88);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: 0.02em;
  text-align: center;
  max-width: 90dvw;
}
.lightbox__close {
  position: absolute;
  top: -16px;
  inset-inline-end: -16px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--surface-panel);
  color: var(--text-heading);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--line-soft);
  z-index: 2;
  transition: transform var(--dur-fast) var(--ease-editorial), background var(--dur-fast) var(--ease-editorial);
}
.lightbox__close:hover { transform: scale(1.06); }
@media (max-width: 640px) {
  .lightbox { padding-inline: max(0.75rem, env(safe-area-inset-right)) max(0.75rem, env(safe-area-inset-left)); }
  .lightbox__close { top: max(0.5rem, env(safe-area-inset-top)); inset-inline-end: max(0.5rem, env(safe-area-inset-right)); background: rgba(20,20,22,0.7); color: #fff; border-color: rgba(255,255,255,0.2); }
}
@media (prefers-reduced-motion: reduce) {
  .lightbox__backdrop, .lightbox__dialog, .lightbox__close { transition: none; }
}

/* ============================================================
   12. CONTACT / REQUEST PRICING
   ============================================================ */
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr); /* never let form controls widen the page */
  gap: var(--space-2xl);
}
.contact-layout > *, .form-row > * { min-width: 0; }
@media (min-width: 980px) {
  .contact-layout { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); align-items: start; }
}

.contact-card {
  background: var(--glass-panel-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border-radius: var(--radius-lg);
  padding: var(--space-xl) clamp(1.25rem, 3vw, var(--space-xl));
  box-shadow: var(--shadow-md);
}
.contact-card h2 { font-size: var(--fs-display-2); margin-bottom: var(--space-2xs); }
.contact-card > p:not(.eyebrow) { margin-bottom: var(--space-lg); }

.form-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-md); }
@media (min-width: 560px) {
  .form-row--split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
.field { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: var(--space-md); }
.field label {
  font-size: var(--fs-small);
  font-weight: 700;
  color: var(--text-heading);
}
.field .optional-tag { font-weight: 500; color: var(--text-faint); }
/* Scope to direct field controls + the tel input only. Never style
   intl-tel-input internals (.iti__search-input, etc.) via these rules. */
.field > input,
.field > textarea,
.field > select,
.field .iti__tel-input {
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  font-size: 1rem;
  color: var(--text-heading);
  transition: border-color var(--dur-fast) var(--ease-editorial), background var(--dur-fast) var(--ease-editorial);
}
.field > select { appearance: none; background-image: none; }
.field > input:hover,
.field > textarea:hover,
.field > select:hover,
.field .iti__tel-input:hover { border-color: var(--text-faint); }
.field > input:focus,
.field > textarea:focus,
.field > select:focus,
.field .iti__tel-input:focus {
  outline: none;
  border-color: var(--accent-gold);
  background: var(--input-bg-focus);
  box-shadow: 0 0 0 3px var(--accent-gold-ring);
}
.field > textarea { min-height: 140px; resize: vertical; }
.request-form.was-validated .field > input:invalid,
.request-form.was-validated .field > textarea:invalid,
.request-form.was-validated .field .iti__tel-input:invalid {
  border-color: #c0463c;
}
.honeypot { position: absolute; inset-inline-start: -9999px; opacity: 0; }

/* Per-field inline validation error (elegant, localized, no alert()) */
.field-error {
  font-size: var(--fs-small);
  color: #c0463c;
  margin: 0;
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
}
[data-theme="dark"] .field-error { color: #e8897e; }
.field-error[hidden] { display: none; }
.field > input[aria-invalid="true"],
.field > select[aria-invalid="true"],
.field > textarea[aria-invalid="true"],
.field .iti__tel-input[aria-invalid="true"] {
  border-color: #c0463c;
}
[data-theme="dark"] .field > input[aria-invalid="true"],
[data-theme="dark"] .field > select[aria-invalid="true"],
[data-theme="dark"] .field > textarea[aria-invalid="true"],
[data-theme="dark"] .field .iti__tel-input[aria-invalid="true"] {
  border-color: #e8897e;
}

/* ---- International phone input (intl-tel-input) — themed to match
   Marbella's input system rather than the library's generic default look.
   Contact-form field rules are scoped above so they cannot override
   dropdown internals (search icon padding, etc.). ---- */
.field .iti { display: block; width: 100%; max-width: 100%; }
.field .iti .iti__tel-input { box-sizing: border-box; width: 100%; max-width: 100%; }
.iti {
  --iti-border-color: var(--input-border);
  --iti-country-selector-bg: var(--surface-panel);
  --iti-hover-color: rgba(128, 120, 108, 0.14);
  --iti-icon-color: var(--text-muted);
  --iti-spacer-horizontal: 14px;
  --iti-globe-icon-size: 16px;
  --iti-clear-icon-size: 15px;
}
[data-theme="dark"] .iti { --iti-hover-color: rgba(244, 239, 230, 0.09); }
.iti__selected-country-primary { color: var(--text-heading); border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
[dir="rtl"] .iti__selected-country-primary { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.iti__selected-dial-code { font-weight: 600; }
.iti__country-list {
  background: var(--surface-panel);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  color: var(--text-body);
  margin-top: 6px;
  max-width: min(100vw - 24px, 100%);
  overflow-x: hidden;
}
.iti__country {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding-block: 0.55rem;
  padding-inline: 0.85rem;
}
.iti__country.iti__highlight,
.iti__country:hover { background: var(--surface-sunken); }
.iti__country.iti__active { background: var(--accent-gold-soft); }
.iti__country-name { color: var(--text-body); flex: 1 1 auto; min-width: 0; }
.iti__dial-code { color: var(--text-faint); flex-shrink: 0; }

/* Search field: restore icon/text spacing that global form padding had crushed,
   using logical properties so RTL Arabic mirrors correctly. */
.iti__search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line-soft);
  background: var(--surface-sunken);
  padding-block: 0.35rem;
  padding-inline: 0.5rem;
}
.iti__search-icon {
  position: absolute;
  inset-inline-start: calc(0.5rem + var(--iti-spacer-horizontal));
  inset-inline-end: auto;
  left: auto;  /* override vendor physical left */
  right: auto; /* override vendor physical right / RTL flip */
  display: flex;
  align-items: center;
  pointer-events: none;
  z-index: 1;
}
.iti__search-icon-svg {
  width: var(--iti-globe-icon-size);
  height: var(--iti-globe-icon-size);
  stroke: var(--iti-icon-color);
}
.iti__search-input {
  box-sizing: border-box;
  width: 100%;
  height: 2.6rem;
  margin: 0;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  color: var(--text-heading);
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  line-height: 1.3;
  /* icon (16) + two spacers + wrapper inset → ~44–48px text start */
  padding-block: 0.65rem;
  padding-inline-start: calc(var(--iti-spacer-horizontal) + var(--iti-globe-icon-size) + var(--iti-spacer-horizontal));
  padding-inline-end: calc(var(--iti-spacer-horizontal) + var(--iti-clear-icon-size) + var(--iti-spacer-horizontal));
  /* Kill vendor RTL physical padding + any inherited field padding */
  padding-left: unset;
  padding-right: unset;
}
.iti__search-input:hover { border-color: var(--text-faint); }
.iti__search-input:focus {
  outline: none;
  border-color: var(--accent-gold);
  background: var(--input-bg-focus);
  box-shadow: 0 0 0 3px var(--accent-gold-ring);
}
.iti__search-clear {
  inset-inline-end: calc(0.5rem + var(--iti-spacer-horizontal) / 2);
  inset-inline-start: auto;
  left: auto;
  right: auto;
}
.iti__no-results { color: var(--text-faint); padding-inline: 1rem; }
.iti--fullscreen-popup .iti__country-selector {
  background: var(--surface-page);
  max-width: 100vw;
}
.iti--fullscreen-popup .iti__search-input-wrapper {
  padding-inline: 0.75rem;
}
.iti--fullscreen-popup .iti__search-icon {
  inset-inline-start: calc(0.75rem + var(--iti-spacer-horizontal));
}
.iti--fullscreen-popup .iti__search-clear {
  inset-inline-end: calc(0.75rem + var(--iti-spacer-horizontal) / 2);
}
.field-phone-hint {
  font-size: var(--fs-small);
  color: var(--text-faint);
  margin: 0;
}

.form-status {
  border-radius: var(--radius-sm);
  padding: var(--space-sm) var(--space-md);
  font-size: var(--fs-small);
  margin-bottom: var(--space-md);
  display: none;
  align-items: flex-start;
  gap: 0.6rem;
}
.form-status.is-visible { display: flex; }
.form-status svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 0.1em; }
.form-status--error { background: rgba(192, 70, 60, 0.1); color: #c0463c; border: 1px solid rgba(192, 70, 60, 0.28); }
[data-theme="dark"] .form-status--error { color: #e8897e; background: rgba(192, 70, 60, 0.14); border-color: rgba(192,70,60,0.32); }
.form-status--success { background: rgba(69, 128, 86, 0.12); color: #3c7a4e; border: 1px solid rgba(69, 128, 86, 0.28); }
[data-theme="dark"] .form-status--success { color: #7fd39a; background: rgba(69,128,86,0.14); border-color: rgba(69,128,86,0.32); }
.form-status--pending { background: rgba(128, 120, 108, 0.12); color: var(--text-muted); border: 1px solid var(--line-soft); }

/* Pure-CSS no-JS fallback reveal via :target anchors */
#contact-success, #contact-error { scroll-margin-top: calc(var(--header-h) + 24px); }

/* Belt-and-suspenders against the sticky header covering a field that
   the browser scrolls into view via Element.focus() (e.g. the first
   invalid field after a failed submit, or a keyboard user tabbing near
   the top of the form) — scroll-padding-top on <html> covers most
   cases, but scroll-margin-top directly on the field is honored more
   consistently across browsers for focus-triggered scrollIntoView. */
.field, .form-row { scroll-margin-top: calc(var(--header-h) + 16px); }
#contact-success:target, #contact-error:target { display: flex; }

.contact-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}
.info-block {
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
}
.info-block__icon {
  flex-shrink: 0;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--surface-panel);
  border: 1px solid var(--line-soft);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--brand-600);
}
[data-theme="dark"] .info-block__icon { color: var(--bronze-500); }
.info-block__icon svg { width: 20px; height: 20px; }
.info-block h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  color: var(--text-heading);
}
.info-block a, .info-block address {
  color: var(--text-muted);
  font-style: normal;
  display: block;
}
.info-block a:hover { color: var(--bronze-600); }

.social-row {
  display: flex;
  gap: var(--space-sm);
  padding-top: var(--space-md);
  border-top: 1px solid var(--line-soft);
}
.social-row a {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line-soft);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-body);
  transition: background var(--dur-fast) var(--ease-editorial), color var(--dur-fast) var(--ease-editorial), transform var(--dur-fast) var(--ease-editorial);
}
.social-row a:hover { background: var(--text-heading); color: var(--surface-page); transform: translateY(-2px); }
.social-row svg { width: 18px; height: 18px; }

/* ============================================================
   13. FOOTER
   ============================================================ */
.site-footer {
  background: var(--surface-inverse);
  color: rgba(255,255,255,0.7);
  padding-top: var(--space-2xl);
}
.footer-grid {
  display: grid;
  gap: var(--space-xl);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
@media (min-width: 860px) {
  .footer-grid { grid-template-columns: 1.1fr 0.8fr 0.8fr 0.9fr; }
}
.footer-brand img { height: 20px; margin-bottom: var(--space-md); filter: brightness(0) invert(1); }
.footer-brand p { color: rgba(255,255,255,0.6); max-width: 26rem; }
.footer-col h4 {
  font-family: var(--font-display);
  color: var(--accent-gold-on-dark);
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--space-md);
}
.footer-col address, .footer-col p, .footer-col a { color: rgba(255,255,255,0.68); }
.footer-col a { display: block; margin-bottom: 0.5rem; transition: color var(--dur-fast) var(--ease-editorial); }
.footer-col a:hover { color: #fff; }
.footer-col address { font-style: normal; line-height: 1.6; }
.footer-social { display: flex; gap: var(--space-sm); margin-top: var(--space-sm); }
.footer-social a {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.18);
  display: inline-flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.85);
}
.footer-social a:hover { background: rgba(255,255,255,0.1); color: #fff; }
.footer-social svg { width: 16px; height: 16px; }

.footer-bottom {
  /* Bottom padding keeps the copyright line clear of the fixed WhatsApp
     button when the page is scrolled to its very end. */
  padding-block: var(--space-md) calc(var(--space-md) + 62px + env(safe-area-inset-bottom));
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: center;
  justify-content: space-between;
  font-size: var(--fs-small);
  color: rgba(255,255,255,0.55);
}
.footer-bottom a { color: rgba(255,255,255,0.85); font-weight: 600; }
.footer-bottom a:hover { color: #fff; text-decoration: underline; }
.footer-bottom-lines { display: flex; flex-direction: column; gap: 0.3rem; }

/* ============================================================
   14. WHATSAPP FLOATING CTA — official brand mark, premium FAB
   ============================================================ */
.whatsapp-fab {
  position: fixed;
  bottom: max(22px, env(safe-area-inset-bottom));
  inset-inline-end: max(22px, env(safe-area-inset-right));
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 0;
  height: 52px;
  padding-inline: 0;
  width: 52px;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.875rem;
  overflow: hidden;
  white-space: nowrap;
  transition: width var(--dur-med) var(--ease-editorial), transform var(--dur-fast) var(--ease-editorial), box-shadow var(--dur-fast) var(--ease-editorial), background var(--dur-fast) var(--ease-editorial), border-color var(--dur-fast) var(--ease-editorial);

  /* DARK (default surface rules): dark glass circle, hairline border,
     restrained shadow, official WhatsApp-green glyph. */
  background: rgba(24, 25, 29, 0.78);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid rgba(244, 239, 230, 0.14);
  color: #25d366;
  box-shadow: 0 12px 28px -10px rgba(0, 0, 0, 0.6), 0 2px 8px rgba(0, 0, 0, 0.32);
}
[dir="rtl"] .whatsapp-fab { inset-inline-end: max(22px, env(safe-area-inset-left)); }
.whatsapp-fab:hover { background: rgba(32, 34, 39, 0.9); border-color: rgba(37, 211, 102, 0.45); }

/* LIGHT ONLY: same size/position/motion, but a solid official WhatsApp
   green surface with a white glyph for strong contrast on ivory. */
html:not([data-theme="dark"]) .whatsapp-fab {
  background: #25d366;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
  box-shadow: 0 10px 26px -8px rgba(13, 60, 30, 0.42), 0 2px 8px rgba(13, 60, 30, 0.2);
}
html:not([data-theme="dark"]) .whatsapp-fab:hover { background: #1fbd5a; border-color: rgba(255, 255, 255, 0.4); }
.whatsapp-fab__icon {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit; /* green in dark, white in light */
}
.whatsapp-fab__icon svg { width: 24px; height: 24px; }
.whatsapp-fab__label {
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  color: var(--text-heading);
  transition: max-width var(--dur-med) var(--ease-editorial), opacity var(--dur-fast) var(--ease-editorial), padding var(--dur-med) var(--ease-editorial);
  padding-inline-end: 0;
}
[data-theme="dark"] .whatsapp-fab__label { color: #f4efe6; }
html:not([data-theme="dark"]) .whatsapp-fab__label { color: #fff; }
@media (hover: hover) and (pointer: fine) {
  .whatsapp-fab:hover { width: 172px; transform: translateY(-3px); box-shadow: 0 18px 38px -10px rgba(0, 0, 0, 0.66), 0 4px 14px rgba(0, 0, 0, 0.4); }
  html:not([data-theme="dark"]) .whatsapp-fab:hover { box-shadow: 0 18px 38px -10px rgba(13, 60, 30, 0.5), 0 4px 12px rgba(13, 60, 30, 0.26); }
  .whatsapp-fab:hover .whatsapp-fab__label { max-width: 120px; opacity: 1; padding-inline-end: 1.1rem; }
}
.whatsapp-fab:focus-visible { width: 172px; outline-offset: 4px; }
.whatsapp-fab:focus-visible .whatsapp-fab__label { max-width: 120px; opacity: 1; padding-inline-end: 1.1rem; }

@media (max-width: 640px) {
  .whatsapp-fab { bottom: max(16px, env(safe-area-inset-bottom)); inset-inline-end: max(16px, env(safe-area-inset-right)); width: 48px; height: 48px; }
  [dir="rtl"] .whatsapp-fab { inset-inline-end: max(16px, env(safe-area-inset-left)); }
  .whatsapp-fab__icon { width: 48px; height: 48px; }
  .whatsapp-fab__icon svg { width: 22px; height: 22px; }
  .whatsapp-fab:hover, .whatsapp-fab:focus-visible { width: 48px; }
  .whatsapp-fab:hover .whatsapp-fab__label, .whatsapp-fab:focus-visible .whatsapp-fab__label { max-width: 0; opacity: 0; padding-inline-end: 0; }
}

/* ============================================================
   15. SCROLL REVEAL (progressive enhancement via JS)
   ============================================================ */
[data-reveal] {
  opacity: 1;
  transform: none;
}
.js-enabled [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity var(--dur-slow) var(--ease-editorial), transform var(--dur-slow) var(--ease-editorial);
}
.js-enabled [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .js-enabled [data-reveal] { opacity: 1; transform: none; }
}

/* ============================================================
   16. UTILITIES
   ============================================================ */
.stack { display: flex; flex-direction: column; }
.text-center { text-align: center; }
.mt-0 { margin-top: 0 !important; }
[dir] .ltr-embed { unicode-bidi: isolate; direction: ltr; display: inline-block; }

@media (max-width: 1079px) {
  .site-header { padding-block: var(--space-sm); }
  .nav-shell { border-radius: var(--radius-md); }
}
