/* ===========================================================================
   MONTE ROYALE / IMORA COMMUNITIES — shared site stylesheet
   Brand: Elegant · Timeless · Premium  (Wine #820E0E + Gold #C9943A)
   Works for both LTR (EN) and RTL (AR) pages.
   =========================================================================== */

@font-face {
  font-family: "Ahmed LT";
  src: url("fonts/ahmed-lt-regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  /* Ahmed LT's glyphs sit small in the em-box; scale them up to match the
     visual size of EB Garamond / Tajawal so headlines and body copy don't
     suddenly shrink when the Arabic face takes over. */
  size-adjust: 118%;
  ascent-override: 95%;
  descent-override: 25%;
  line-gap-override: 0%;
  /* Arabic + extended-Latin range */
  unicode-range: U+0000-00FF, U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF;
}

:root {
  --primary: #820E0E;
  --primary-soft: #E07D7D;
  --secondary: #C9943A;
  --secondary-soft: #E8D0A7;
  --background: #faf9f6;
  --on-surface: #1a1c1a;
}

html { scroll-behavior: smooth; }

body {
  background-color: var(--background);
  color: var(--on-surface);
  overflow-x: hidden;
}

.royal-developer-credit {
  border-top: 1px solid rgba(201, 148, 58, 0.2);
  color: currentColor;
  direction: ltr;
  font-family: 'Hanken Grotesk', sans-serif;
  font-size: 12px;
  grid-column: 1 / -1;
  letter-spacing: 0.08em;
  margin: 1.75rem 0 0;
  opacity: 0.72;
  padding-top: 1rem;
  text-align: center;
  width: 100%;
}
.royal-developer-credit a {
  color: currentColor;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(201, 148, 58, 0.55);
  text-underline-offset: 3px;
}
.royal-developer-credit a:hover,
.royal-developer-credit a:focus-visible {
  color: var(--secondary);
  opacity: 1;
}

::selection { background: #820E0E; color: #fff; }

/* --- Material Symbols ----------------------------------------------------- */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
  vertical-align: middle;
}

/* ===========================================================================
   ARABIC / RTL TYPOGRAPHY
   The Tailwind font utilities resolve to Latin faces (EB Garamond / Hanken).
   On RTL pages we transparently swap them to elegant Arabic faces so the same
   markup renders beautifully in both languages.
   =========================================================================== */
html[dir="rtl"] body,
html[dir="rtl"] .font-body-lg,
html[dir="rtl"] .font-body-md,
html[dir="rtl"] .font-label-caps {
  font-family: "Ahmed LT", "Tajawal", "Hanken Grotesk", sans-serif;
}
html[dir="rtl"] .font-display-lg,
html[dir="rtl"] .font-headline-lg,
html[dir="rtl"] .font-headline-md,
html[dir="rtl"] .font-display-lg-mobile {
  font-family: "Ahmed LT", "El Messiri", "EB Garamond", serif;
}
/* Arabic has no caps; keep label tone refined without ALL-CAPS distortion. */
html[dir="rtl"] .font-label-caps,
html[dir="rtl"] .uppercase {
  text-transform: none;
  letter-spacing: 0.04em;
}
/* Arabic reads better a touch larger / more open — and Ahmed LT's tall
   ascenders need extra leading so headlines don't clip. */
html[dir="rtl"] .font-body-lg { line-height: 2; }
html[dir="rtl"] .font-body-md { line-height: 1.9; }
html[dir="rtl"] .font-display-lg,
html[dir="rtl"] .font-display-lg-mobile { line-height: 1.25; }
html[dir="rtl"] .font-headline-lg { line-height: 1.35; }
html[dir="rtl"] .font-headline-md { line-height: 1.45; }

/* RTL spacing safety: space-x relies on LTR margins, so flip it. */
html[dir="rtl"] [class*="space-x-"] > :not([hidden]) ~ :not([hidden]) {
  --tw-space-x-reverse: 1;
}

/* Logical decorative borders (mirror automatically in RTL). */
.border-start { border-inline-start-width: 1px; border-style: solid; }
.border-start-2 { border-inline-start-width: 2px; border-style: solid; }
.border-start-4 { border-inline-start-width: 4px; border-style: solid; }

/* ===========================================================================
   SHARED COMPONENT CLASSES (used across all pages)
   =========================================================================== */

/* WordPress-managed bilingual header navigation. */
.royal-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}
.royal-menu li { position: relative; }
.royal-menu a {
  color: #4A4138;
  font-family: 'Hanken Grotesk', 'Ahmed LT', 'Tajawal', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.15em;
  line-height: 18px;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.royal-menu a:hover,
.royal-menu a:focus-visible { color: var(--secondary); }
.royal-menu a:focus-visible {
  outline: 2px solid var(--secondary);
  outline-offset: 5px;
}
.royal-menu .current-menu-item > a,
.royal-menu .current-menu-ancestor > a,
.royal-menu .current_page_item > a {
  border-bottom: 1px solid var(--secondary);
  color: var(--secondary);
  padding-bottom: 4px;
}
.royal-menu-desktop {
  align-items: center;
  display: flex;
  gap: 2.25rem;
}
.royal-menu-desktop .sub-menu {
  background: var(--background);
  border: 1px solid rgba(201, 148, 58, 0.24);
  box-shadow: 0 18px 45px rgba(42, 37, 34, 0.12);
  display: grid;
  gap: 0.75rem;
  inset-inline-start: -1rem;
  list-style: none;
  margin: 0;
  min-width: 220px;
  opacity: 0;
  padding: 1rem;
  pointer-events: none;
  position: absolute;
  top: calc(100% + 1rem);
  transform: translateY(8px);
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  visibility: hidden;
  z-index: 60;
}
.royal-menu-desktop li:hover > .sub-menu,
.royal-menu-desktop li:focus-within > .sub-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  visibility: visible;
}
.royal-menu-desktop .sub-menu a {
  display: block;
  letter-spacing: 0.08em;
  padding: 0.45rem 0.25rem;
  white-space: nowrap;
}
.royal-menu-mobile {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}
.royal-menu-mobile a {
  display: block;
  padding-block: 0.25rem;
}
.royal-menu-mobile .sub-menu {
  display: grid;
  gap: 0.75rem;
  list-style: none;
  margin: 0.75rem 0 0;
  padding-inline-start: 1rem;
}
html[dir='rtl'] .royal-menu a {
  font-family: 'Ahmed LT', 'Tajawal', 'Hanken Grotesk', sans-serif;
  letter-spacing: 0.04em;
  text-transform: none;
}

/* Elementor keeps each converted source section full-bleed and design-faithful. */
.royal-elementor-page,
.royal-elementor-page .elementor,
.royal-elementor-page .elementor-section,
.royal-elementor-page .elementor-container,
.royal-elementor-page .elementor-column,
.royal-elementor-page .elementor-widget-wrap,
.royal-elementor-page .elementor-widget-royal-source-section,
.royal-elementor-page .elementor-widget-container {
  max-width: none;
  width: 100%;
}
.royal-elementor-page .elementor-column-gap-default > .elementor-column > .elementor-element-populated,
.royal-elementor-page .elementor-widget-royal-source-section > .elementor-widget-container {
  margin: 0;
  padding: 0;
}
.elementor-editor-active .royal-elementor-page .reveal {
  opacity: 1;
  transform: none;
}
.royal-elementor-empty {
  background: #faf9f6;
  border: 1px solid rgba(201, 148, 58, 0.35);
  color: #4A4138;
  margin: 1rem;
  padding: 1rem;
}

/* Hero darkening gradient for full-bleed image heroes */
.hero-gradient {
  background: linear-gradient(180deg, rgba(26,28,26,0.55) 0%, rgba(26,28,26,0) 42%, rgba(26,28,26,0.8) 100%);
}

/* Subtle Roman-dot texture overlay (gold) */
.roman-fret-pattern {
  background-image: radial-gradient(circle at 2px 2px, rgba(201, 148, 58, 0.06) 1px, transparent 0);
  background-size: 24px 24px;
}

/* Frosted stat / info panel */
.glass-panel {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(201, 148, 58, 0.18);
}

/* Inline "pipe" separated meta list (auto-correct for RTL) */
.divider-pipe::after {
  content: '|';
  margin: 0 12px;
  color: #C9943A;
  font-weight: 300;
}
.divider-pipe:last-child::after { content: ''; }

/* Animated gold underline on hover */
.gold-underline-hover { position: relative; text-decoration: none; }
.gold-underline-hover::after {
  content: '';
  position: absolute;
  width: 0; height: 1px;
  bottom: -2px; left: 50%;
  background-color: #C9943A;
  transition: all 0.3s ease-in-out;
  transform: translateX(-50%);
}
.gold-underline-hover:hover::after { width: 100%; }

.text-underline-expand { position: relative; }
.text-underline-expand::after {
  content: ''; position: absolute;
  bottom: -2px; left: 50%; width: 0; height: 1px;
  background-color: #C9943A;
  transition: width 0.3s ease, left 0.3s ease;
}
.text-underline-expand:hover::after { width: 100%; left: 0; }

/* Scroll-reveal */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s ease-out, transform .8s ease-out; }
.reveal.active { opacity: 1; transform: translateY(0); }

/* Decorative thin rule with centered ornament */
.rule-ornament { display:flex; align-items:center; justify-content:center; gap:.5rem; }
.rule-ornament span.line { width:4rem; height:1px; background:#C9943A; }

/* Card lift */
.lift { transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1); }
.lift:hover { transform: translateY(-8px); }

/* Image zoom-on-hover (pair with .group on parent + overflow-hidden) */
.zoom { transition: transform 0.7s cubic-bezier(0.16,1,0.3,1); }
.group:hover .zoom { transform: scale(1.05); }

/* ===========================================================================
   ROYAL BACKGROUND ORNAMENTS (faint light-grey watermarks)
   Light-grey line-art motifs (columns, capitals, arches, crowns, laurels) that
   sit quietly in the empty white areas of text sections — placed automatically
   by site.js, or by hand: <span class="royal-watermark rw-column"></span> inside
   a position:relative parent. Add data-no-ornament to a <section> to opt out.
   =========================================================================== */
.royal-watermark {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  user-select: none;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 0.5;            /* faint watermark — tune 0.3–0.6 to taste */
  filter: grayscale(1);
}
.rw-column  { background-image: url("ornaments/column.svg"); }
.rw-capital { background-image: url("ornaments/capital.svg"); }
.rw-arch    { background-image: url("ornaments/arch.svg"); }
.rw-crown   { background-image: url("ornaments/crown.svg"); }
.rw-laurel  { background-image: url("ornaments/laurel.svg"); }

/* On dark bands (bg-primary / bg-inverse-surface) keep them even softer & lighter */
.bg-primary .royal-watermark,
.bg-inverse-surface .royal-watermark { opacity: 0.12; filter: grayscale(1) brightness(1.8); }

@media (max-width: 768px) { .royal-watermark { opacity: 0.32; } }
@media print { .royal-watermark { display: none; } }

/* ===========================================================================
   LANDING PAGES (campaign / lead-capture)
   =========================================================================== */
/* Stronger cinematic veil for centred hero text legibility */
.lp-veil {
  background:
    linear-gradient(180deg, rgba(26,28,26,0.55) 0%, rgba(26,28,26,0.25) 38%, rgba(26,28,26,0.78) 100%),
    radial-gradient(120% 80% at 50% 0%, rgba(130,14,14,0.30) 0%, transparent 60%);
}
/* Thin gold editorial frame */
.lp-frame { box-shadow: 0 0 0 1px rgba(201,148,58,0.40), 0 0 0 10px rgba(255,255,255,0.04); }
/* Offer ribbon dividers (auto-mirrors in RTL) */
.lp-offer > * + * { border-inline-start: 1px solid rgba(201,148,58,0.40); }
/* Floating-label input pattern used on landing forms */
.lp-input {
  width: 100%; background: transparent; border: 0; border-bottom: 1px solid rgba(201,148,58,0.35);
  padding: 12px 2px; transition: border-color .3s ease; outline: none;
}
.lp-input:focus { border-bottom-color: #C9943A; border-bottom-width: 2px; }
/* Sticky mobile CTA bar (toggled by site.js via translate-y-full) */
.lp-sticky { transition: transform .4s cubic-bezier(0.16,1,0.3,1); }
