/* ============================================================
   MOVA — Effects (scroll, reveal, interactive, marquee, etc.)
   ============================================================ */

/* Reduced motion: disable heavy animation */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
}

/* ---------- Scroll progress bar ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 100;
  background: transparent; pointer-events: none;
}
.scroll-progress span {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--gold), #e7d3a6);
  box-shadow: 0 0 12px rgba(201,163,90,.6);
}

/* ---------- Header scroll mutations DISABLED (locked utility + navy main) ---------- */
.site-header.site-header--layered { transition: none; }
.site-header.site-header--layered.header-hidden { transform: none; }
.site-header.site-header--layered.header-compact .nav { height: 64px; }
.site-header.site-header--layered.header-compact .header-main .nav { height: 64px; }

/* ---------- Language selector ---------- */
.lang-select { position: relative; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 7px; background: transparent; border: 1px solid var(--line);
  border-radius: 999px; padding: 8px 14px; font-weight: 700; font-size: 14px; color: var(--navy-800); cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.lang-btn:hover { background: var(--bg-soft); }
.lang-icon {
  flex-shrink: 0; width: 17px; height: 17px; color: inherit; opacity: .92;
}
.lang-caret { font-size: 10px; opacity: .7; color: inherit; }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 160px; list-style: none; margin: 0; padding: 6px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(-6px); transition: all .18s ease; z-index: 80;
}
.lang-select.open .lang-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-toolbar { overflow: visible; position: relative; z-index: 55; }
.site-header { overflow: visible; }
.lang-menu li { padding: 10px 12px; border-radius: 8px; font-weight: 600; font-size: 14px; color: var(--text); cursor: pointer; }
.lang-menu li:hover { background: var(--bg-soft); color: var(--navy-800); }

/* ---------- Marquee (partner banks) ---------- */
.marquee { overflow: hidden; flex: 1; }
.marquee-track { display: inline-flex; align-items: center; gap: 28px; white-space: nowrap; will-change: transform; animation: marquee 28s linear infinite; }
.marquee-track span:not(.marquee-logo-frame) { color: var(--navy-900); font-weight: 700; font-size: 16px; letter-spacing: .02em; }
.marquee-logo-frame {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 10px 14px;
  min-height: 112px;
  min-width: 120px;
  background: #fff;
  border: 1px solid #0a1830;
  border-radius: 8px;
  box-shadow: none;
}
.marquee-logo {
  height: 96px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  flex-shrink: 0;
  /* Original logos — desaturate only (keep shape/contrast) */
  filter: saturate(0);
  opacity: 1;
}
.hero-slider--dark .marquee-logo,
.hero-slider--light .marquee-logo,
.trust-bar--locked .marquee-logo,
.trust-bar--why .marquee-logo {
  filter: saturate(0) !important;
  opacity: 1 !important;
}
/* Bank logos keep scrolling on hover — no pause */
.marquee:hover .marquee-track { animation-play-state: running; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Scroll reveal base ---------- */
[data-reveal] { opacity: 0; transform: translateY(28px); }
[data-reveal].is-visible { opacity: 1; transform: none; }
[data-reveal] { transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
/* Critical product surfaces — never gate behind reveal IO */
#calculator[data-reveal],
#calculator [data-reveal],
.hf-kit-shell[data-reveal],
.hf-holo-shell[data-reveal],
#hfWizardRoot[data-reveal],
.elig-widget[data-reveal],
.kit-tool[data-reveal] {
  opacity: 1 !important;
  transform: none !important;
}

/* ---------- Newsletter (footer row) ---------- */
.news-note { color: #157347; font-weight: 700; min-height: 0; }

/* ---------- Small button ---------- */
.btn-sm { padding: 9px 16px; font-size: 13px; }

/* ---------- Interactive properties ---------- */
#properties { position: relative; overflow: hidden; }
.prop-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.prop-card {
  position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: transform .3s cubic-bezier(.2,.7,.2,1), box-shadow .3s; transform-style: preserve-3d;
}
.prop-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.prop-media { position: relative; height: 190px; background: var(--img, linear-gradient(160deg,#1d3d70,#0a1830)); }
.prop-media::after {
  content: ""; position: absolute; inset: 0;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.06) 0 2px, transparent 2px 26px),
    linear-gradient(180deg, transparent 40%, rgba(10,24,48,.55));
}
.prop-badge { position: absolute; top: 14px; left: 14px; z-index: 2; background: rgba(255,255,255,.9); color: var(--navy-900); font-weight: 800; font-size: 12px; padding: 5px 10px; border-radius: 999px; }
.prop-valued { position: absolute; top: 12px; right: 14px; z-index: 2; background: #157347; color: #fff; font-weight: 800; font-size: 12px; padding: 5px 11px; border-radius: 999px; box-shadow: 0 4px 12px rgba(21,115,71,.35); }
.prop-body { padding: 18px 20px 22px; }
.prop-body h3 { color: var(--navy-900); font-size: 18px; margin-bottom: 6px; }
.prop-loc { color: var(--muted); font-size: 14px; }
.prop-prices { margin-top: 14px; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.prop-ask { text-decoration: line-through; text-decoration-color: rgba(180,60,60,.65); color: var(--muted); font-size: 15px; font-weight: 600; }
.prop-val { font-family: var(--display); font-size: 24px; font-weight: 700; color: #a9812f; letter-spacing: .2px; }
.prop-val-label { flex-basis: 100%; font-size: 11px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; color: #a9812f; }
.prop-yield { margin-top: 12px; display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); }
.prop-yield strong { color: #157347; font-weight: 800; }
.yield-dot { width: 8px; height: 8px; border-radius: 50%; background: #157347; box-shadow: 0 0 0 4px rgba(21,115,71,.14); flex: 0 0 auto; }
.prop-hover {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; display: flex; gap: 10px; justify-content: center;
  padding: 16px; background: linear-gradient(0deg, rgba(10,24,48,.92), rgba(10,24,48,.0));
  transform: translateY(100%); opacity: 0; transition: transform .3s cubic-bezier(.2,.7,.2,1), opacity .3s;
}
.prop-card:hover .prop-hover { transform: translateY(0); opacity: 1; }

/* Floating info bubbles */
.prop-floats { position: absolute; inset: 0; pointer-events: none; }
.float-bubble {
  position: absolute; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow);
  border-radius: 12px; padding: 10px 14px; font-size: 13px; color: var(--text); font-weight: 600;
}
.float-bubble strong { color: var(--navy-800); }
.fb-1 { top: 30%; left: 2%; animation: floaty 6s ease-in-out infinite; }
.fb-2 { top: 62%; right: 3%; animation: floaty 7s ease-in-out infinite .8s; }
.fb-3 { top: 10%; right: 8%; animation: floaty 5.5s ease-in-out infinite .4s; }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

/* ---------- Featured areas — horizontal pinned ---------- */
.areas-pin { background: var(--navy-900); color: #fff; overflow: hidden; }
.areas-inner { padding: 80px 0; }
.areas-intro { max-width: var(--maxw); margin: 0 auto 34px; padding: 0 24px; }
.areas-intro h2 { font-family: var(--display); font-weight: 600; font-size: clamp(28px,3.6vw,42px); color: #fff; }
.areas-intro .eyebrow { color: var(--gold-soft); background: rgba(201,163,90,.16); }
.areas-intro .section-sub { color: rgba(255,255,255,.7); }
.areas-marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 32px, #000 calc(100% - 32px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 32px, #000 calc(100% - 32px), transparent 100%);
}
.areas-track { display: flex; gap: 22px; padding: 4px 24px 18px; overflow-x: auto; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: rgba(201,163,90,.55) transparent; }
.areas-track.areas-track--marquee {
  width: max-content; overflow: visible; scroll-snap-type: none; padding: 4px 0 18px;
  animation: areas-marquee-scroll 52s linear infinite;
  will-change: transform;
}
.areas-marquee:hover .areas-track--marquee { animation-play-state: paused; }
.areas-track__group { display: flex; gap: 22px; flex-shrink: 0; padding: 0 11px; }
@keyframes areas-marquee-scroll {
  from { transform: translateX(-50%); }
  to { transform: translateX(0); }
}
@media (prefers-reduced-motion: reduce) {
  .areas-marquee { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
  .areas-track.areas-track--marquee { animation: none; width: auto; overflow-x: auto; padding: 4px 24px 18px; }
}
.areas-track::-webkit-scrollbar { height: 8px; }
.areas-track::-webkit-scrollbar-thumb { background: rgba(201,163,90,.5); border-radius: 999px; }
.areas-track::-webkit-scrollbar-track { background: transparent; }
.area-card { scroll-snap-align: start; }
.area-card {
  flex: 0 0 auto; width: 340px; height: 420px; border-radius: 22px; background: var(--navy-900); position: relative; overflow: hidden;
  border: 1px solid rgba(255,255,255,.12); display: flex; flex-direction: column; justify-content: flex-end; padding: 0;
}
.area-card__photo {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center;
  z-index: 0; pointer-events: none; display: block;
}
.area-card::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(10,24,48,.12) 0%, transparent 42%, transparent 100%);
}
.area-num {
  position: absolute; top: 18px; left: 20px; font-family: var(--display); font-size: 34px;
  color: rgba(255,255,255,.92); z-index: 2; text-shadow: 0 2px 12px rgba(0,0,0,.45);
}
.area-card__caption {
  position: relative; z-index: 2; width: 100%; padding: 16px 20px 18px;
  background: var(--mova-widget-head-bg, linear-gradient(135deg, var(--navy-800) 0%, var(--navy-600) 100%));
  border-top: none;
}
.area-card__caption h3 { font-size: 22px; margin: 0 0 4px; line-height: 1.2; color: #fff; }
.area-card__caption p { margin: 0; color: rgba(255,255,255,.88); font-size: 14px; }

/* ---------- Legacy newsletter block (removed — footer row) ---------- */

/* ---------- Footer link underline animation ---------- */
.footer-col a { position: relative; width: fit-content; }
.footer-col a::after { content: ""; position: absolute; left: 0; bottom: 2px; height: 1px; width: 0; background: var(--gold); transition: width .25s ease; }
.footer-col a:hover::after { width: 100%; }

/* ---------- Full-page snap (desktop, fine pointer) ---------- */
@media (min-width: 1024px) and (pointer: fine) {
  /* Sections snap when you land near them (proximity), but tall / short
     tail sections (valuation-backed properties, pre-approval, FAQ) stay
     freely scrollable — mandatory snap trapped scroll before the footer. */
  html.snap-on {
    scroll-snap-type: y proximity;
    scroll-padding-top: var(--mova-header-h, 100px);
  }
  html.snap-on.snap-boot { scroll-snap-type: none; }
  html.snap-on .hero {
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }
  html.snap-on [data-snap-section] {
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }
  /* Tall tools (calculator): snap to start, then free scroll inside */
  html.snap-on [data-snap-free] {
    scroll-snap-stop: normal;
    min-height: calc(100svh - var(--mova-header-h, 100px));
    max-height: none;
    overflow: visible;
  }
  html.snap-on .section--snap-fit,
  html.snap-on #why.section--snap-fit {
    box-sizing: border-box;
    min-height: calc(100svh - var(--mova-header-h, 100px));
    max-height: calc(100svh - var(--mova-header-h, 100px));
    overflow: hidden;
    padding-top: 24px;
    padding-bottom: 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
  }
  html.snap-on .section--snap-fit > .container,
  html.snap-on #why.section--snap-fit > .why-section__inner {
    width: 100%;
    max-height: 100%;
    overflow: hidden;
  }
  html.snap-on .section-head--compact { margin-bottom: 12px; }
  html.snap-on .section-head--compact h2 { font-size: clamp(26px, 2.6vw, 36px); margin-bottom: 8px; }
  /* Calculator step1 intro is FROZEN — do not inherit page section-head sizes */
  html.snap-on .hf-panel__intro h2 {
    font-size: var(--hf-intro-title-size, 17px) !important;
    margin-bottom: 0 !important;
    line-height: var(--hf-intro-title-lh, 1.25);
  }
  html.snap-on .section-head--compact .section-sub { font-size: 15px; margin-bottom: 0; }
  html.snap-on .hf-panel__intro .section-sub {
    font-size: var(--hf-intro-sub-size, 12px) !important;
    margin: 0 !important;
    line-height: var(--hf-intro-sub-lh, 1.3);
  }
  html.snap-on #about .section-head--compact { margin-bottom: 12px; }
  html.snap-on #about .about-card__media { aspect-ratio: 16 / 8; }
  html.snap-on #about .about-card__body { padding: 14px 16px 14px; gap: 6px; }
  html.snap-on #about .about-card__body h3 { font-size: 18px; }
  html.snap-on #about .about-card__list { font-size: 13px; margin-bottom: 4px; }
  html.snap-on #about .about-audience { margin-top: 14px; font-size: 14px; }
  html.snap-on #why .why-glass--hero { padding: 18px 20px; }
  html.snap-on #why .why-glass--featured,
  html.snap-on #why .why-glass--compact { padding: 14px 16px; }
  html.snap-on #why .section-head { margin-bottom: 12px; }
  html.snap-on #why .trust-bar--why { margin-bottom: 10px; padding-bottom: 10px; }
  html.snap-on #why .trust-bar--why .trust-label { font-size: 11px; }
  html.snap-on #why .trust-bar--why .marquee-logo-frame { height: 36px; padding: 4px 10px; }
  html.snap-on #why .trust-bar--why .marquee-logo { height: 22px; }
  html.snap-on #process .section-head--compact { margin-bottom: 12px; }
  html.snap-on #faq .section-head--compact,
  html.snap-on #properties .section-head--compact { margin-bottom: 12px; }
  html.snap-on #services .svc-board { gap: 6px; }
  html.snap-on #services .svc-row__label { margin-bottom: 4px; font-size: 11px; }
  html.snap-on #services .svc-row__grid { gap: 10px; }
  html.snap-on #services .about-card--lite .about-card__media { aspect-ratio: 16 / 5.5; }
  html.snap-on #services .about-card--lite .about-card__body { padding: 10px 12px 10px; gap: 4px; }
  html.snap-on #services .about-card--lite .about-card__body h3 { font-size: 14px; }
  html.snap-on #services .about-card--lite .about-card__body p { font-size: 11.5px; -webkit-line-clamp: 2; }
  html.snap-on #services .about-card--lite .about-card__more { font-size: 12.5px; padding: 0; }
  html.snap-on #services .section-head--compact { margin-bottom: 10px; }
  html.snap-on #services .section-head--compact .section-sub { display: none; }
  html.snap-on #services.section--snap-fit { padding-top: 24px; padding-bottom: 20px; justify-content: flex-start; }
  html.snap-on #services .svc-tabs { margin-bottom: 14px; gap: 8px; }
  html.snap-on #services .svc-tab { padding: 10px 14px; font-size: 12px; }
  html.snap-on #services .svc-panel .about-card__media { aspect-ratio: 16 / 8; }
  html.snap-on #services .svc-panel .about-card__body { padding: 12px 14px 12px; gap: 6px; }
  html.snap-on #services .svc-panel .about-card__body h3 { font-size: 16px; }
  html.snap-on #services .svc-panel .about-card__list { font-size: 12.5px; margin-bottom: 2px; }
  html.snap-on #services .svc-panel .about-card__list li { margin-bottom: 3px; }
  html.snap-on #services .svc-panel .btn { padding: 10px 12px; font-size: 13px; }
  html.snap-on #reviews .reviews-rows { gap: 12px; }
  html.snap-on #reviews .reviews-card { width: min(280px, 72vw); padding: 20px 18px 18px; gap: 8px; border-radius: 20px; }
  html.snap-on #reviews .reviews-card__avatar { width: 56px; height: 56px; font-size: 17px; }
  html.snap-on #reviews .reviews-card__name { font-size: 15px; }
  html.snap-on #reviews .reviews-card__star { width: 14px; height: 14px; }
  html.snap-on #reviews .reviews-card blockquote { font-size: 13px; line-height: 1.45; max-width: none; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
  html.snap-on #reviews .section-head--compact { margin-bottom: 10px; }
  html.snap-on #process .about-card__media--step { aspect-ratio: 16 / 6; }
  html.snap-on #process .about-card__step-num { font-size: 36px; }
  html.snap-on #process .about-card__body { padding: 14px 14px 12px; gap: 6px; }
  html.snap-on #process .about-card__body h3 { font-size: 15px; }
  html.snap-on #process .about-card__body p { font-size: 12.5px; -webkit-line-clamp: 3; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
  /* Snap-fit pages: no delayed reveal (opacity 0 + overflow:hidden = blank screen) */
  html.snap-on .section--snap-fit [data-reveal],
  html.snap-on .section--snap-fit [data-reveal-stagger] > * {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  html.snap-on .areas-pin[data-snap-section] {
    display: block;
    min-height: calc(100svh - var(--mova-header-h, 100px));
    max-height: calc(100svh - var(--mova-header-h, 100px));
    overflow: hidden;
    scroll-snap-stop: always;
  }
  html.snap-on .site-footer[data-snap-section] {
    justify-content: flex-start;
    padding-top: 40px;
    min-height: auto;
    max-height: none;
    overflow: visible;
    scroll-snap-stop: normal;
  }
  html.snap-on main > section[data-snap-section] > .container { width: 100%; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .prop-grid { grid-template-columns: 1fr; }
  .float-bubble { display: none; }
  .area-card { width: 280px; height: 360px; }
}
@media (max-width: 560px) {
  .lang-btn { padding: 7px 10px; font-size: 13px; }
}

/* RTL (Arabic) */
html[dir="rtl"] .nav-drawer { right: auto; left: 0; transform: translateX(-105%); }
html[dir="rtl"] .nav-drawer.open { transform: translateX(0); }
html[dir="rtl"] .prop-badge { left: auto; right: 14px; }
html[dir="rtl"] .prop-valued { right: auto; left: 14px; }
html[dir="rtl"] .area-num { left: auto; right: 26px; }
html[dir="rtl"] .faq-item summary { flex-direction: row-reverse; }
html[dir="rtl"] .hero-copy, html[dir="rtl"] .about-block { text-align: right; }
html[dir="rtl"] .section-head,
html[dir="rtl"] .areas-intro { text-align: center; }
html[dir="rtl"] .nav-actions { flex-direction: row-reverse; }
