/* ============================================================
   MOVA — Mobile Premium Pass (2026-07-27)
   Public brand: navy + gold + Manrope/Fraunces (style.css tokens).
   Touch floor ≥44px (same principle as PropAtlas UI kit).
   Desktop layout untouched — all rules are max-width scoped.
   ============================================================ */

/* ---------- Quick action bar (phone / tablet portrait) ---------- */
.mova-mbar {
  display: none;
}

@media (max-width: 720px) {
  :root {
    --mova-mbar-h: calc(62px + env(safe-area-inset-bottom, 0px));
    --mova-header-h: 56px;
  }

  body.has-mova-mbar {
    padding-bottom: var(--mova-mbar-h);
  }

  .mova-mbar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 58;
    align-items: stretch;
    gap: 10px;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
    background: rgba(10, 24, 48, 0.94);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    backdrop-filter: blur(18px) saturate(150%);
    border-top: 1px solid rgba(201, 163, 90, 0.4);
    box-shadow: 0 -12px 40px rgba(4, 10, 22, 0.35);
    transform: translateY(110%);
    transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
    pointer-events: none;
  }

  .mova-mbar.is-visible {
    transform: translateY(0);
    pointer-events: auto;
  }

  .mova-mbar.is-hidden-calc {
    transform: translateY(110%);
    pointer-events: none;
  }

  .mova-mbar .btn {
    flex: 1 1 0;
    min-height: var(--touch-min, 44px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-weight: 800;
    font-size: 13.5px;
    letter-spacing: 0.01em;
    padding: 12px 10px;
    text-align: center;
  }

  .mova-mbar--tabs .btn {
    font-size: 12.5px;
    padding: 12px 8px;
  }

  .mova-mbar__home {
    flex: 0 0 48px;
    max-width: 52px;
    min-width: 48px;
    padding: 0;
    gap: 0;
  }

  .mova-mbar__home-icon {
    display: block;
    flex-shrink: 0;
  }

  /* Home = nav tab icon, not a third primary CTA */
  .mova-mbar__home.is-active {
    border-color: rgba(201, 163, 90, 0.65);
    background: rgba(201, 163, 90, 0.18);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(201, 163, 90, 0.25);
    pointer-events: none;
  }

  /* Language menu above sticky header chrome */
  .nav-toolbar {
    position: relative;
    z-index: 62;
  }

  .lang-menu {
    z-index: 70;
  }

  .mova-mbar .btn-outline {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.38);
    background: rgba(255, 255, 255, 0.06);
  }

  .mova-mbar .btn-outline:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
  }

  .mova-mbar .btn-primary {
    box-shadow: 0 8px 22px rgba(201, 163, 90, 0.4);
  }

  /* Side-rail / back-top clear the bar */
  .side-rail,
  .mova-back-top,
  #movaBackTop {
    bottom: calc(var(--mova-mbar-h) + 12px) !important;
  }

  /* Cookie banner sits above sticky CTA bar */
  body.has-mova-mbar .mova-cookie-banner:not([hidden]) {
    bottom: calc(12px + var(--mova-mbar-h));
  }
}

/* ---------- Header / drawer ---------- */
@media (max-width: 900px) {
  .nav-toolbar .nav-login-btn {
    display: none; /* drawer’da Partner Login var */
  }

  .nav-toolbar .lang-btn {
    padding: 7px 11px;
    min-height: 34px;
    font-size: 13px;
  }

  .header-main .nav {
    height: 56px;
    align-items: center;
  }

  .brand {
    max-height: 48px;
    overflow: visible;
  }

  .brand-mark {
    width: 34px;
    height: auto;
    max-height: 38px;
    object-fit: contain;
  }

  .brand-wordmark-img {
    width: 104px;
    height: auto;
    max-height: 16px;
  }

  .brand-lockup__ar {
    font-size: 10px;
    line-height: 1.1;
  }

  .nav-toggle {
    min-width: var(--touch-min, 44px);
    min-height: var(--touch-min, 44px);
    align-items: center;
    justify-content: center;
    padding: 12px 11px;
  }

  .nav-drawer {
    width: min(100vw - 40px, 340px);
    padding: 88px 22px calc(28px + var(--mova-mbar-h, 0px));
  }

  .nav-drawer a {
    font-size: 17px;
    line-height: 1.25;
    padding: 13px 4px;
    min-height: 48px;
    display: flex;
    align-items: center;
  }

  .drawer-cta {
    margin-top: 20px;
    gap: 10px;
  }

  .drawer-cta .btn {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
  }
}

/* ---------- Hero: one message, one CTA stack ---------- */
@media (max-width: 900px) {
  .hero,
  .hero-slider .hero-slide {
    height: auto !important;
    min-height: calc(100svh - var(--mova-header-h, 92px));
    max-height: none;
  }

  .hero-slider__views,
  .hero-slider__track {
    min-height: calc(100svh - var(--mova-header-h, 92px));
  }

  .hero-overlay,
  .hero-overlay--dark,
  .hero-slide:has(.hero-grid--copy-right) .hero-overlay,
  .hero-slide:has(.hero-grid--copy-right) .hero-overlay--dark {
    background:
      linear-gradient(180deg, rgba(4, 10, 22, 0.5) 0%, rgba(4, 10, 22, 0.28) 38%, rgba(4, 10, 22, 0.78) 100%) !important;
  }

  .hero-grid,
  .hero-grid--copy-right,
  .hero-grid:not(.hero-grid--copy-right) {
    grid-template-columns: 1fr !important;
    grid-template-areas: "copy" !important;
    gap: 0;
    padding: 36px 0 88px;
    align-content: end;
  }

  .hero-visual {
    display: none !important;
  }

  .hero-copy {
    text-align: left !important;
    max-width: 36rem;
  }

  .hero-grid--copy-right .hero-copy,
  .hero-grid--copy-right .hero-cta,
  .hero-grid--copy-right .hero-badges {
    text-align: left !important;
    justify-content: flex-start !important;
  }

  .hero-grid--copy-right .hero-slide-tag,
  .hero-grid--copy-right .eyebrow,
  .hero-grid--copy-right .lead {
    margin-inline: 0 !important;
  }

  .hero-copy h1 {
    font-size: clamp(28px, 7.6vw, 34px);
    line-height: 1.12;
    margin-bottom: 12px;
  }

  .hero .lead {
    font-size: 15px;
    line-height: 1.45;
    margin-bottom: 18px;
    max-width: 32rem;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
  }

  .hero-cta {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    width: 100%;
    max-width: 420px;
    margin-bottom: 18px;
  }

  .hero-cta .btn {
    width: 100%;
    min-height: calc(var(--touch-min, 44px) + 6px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-pill, 999px); /* MOVA CTA language */
    font-weight: 800;
  }

  .hero-badges {
    gap: 14px 22px;
  }

  .hero-badges strong {
    font-size: 18px;
  }

  .hero-badges span {
    font-size: 12px;
  }

  .hero-scroll {
    display: none;
  }

  .hero-slider__chrome {
    top: 8px;
    right: 10px;
    left: 10px;
    width: auto;
  }

  .hero-slider__tags {
    overflow-x: auto;
    flex-wrap: nowrap;
    max-width: min(58vw, 220px);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .hero-slider__tags::-webkit-scrollbar {
    display: none;
  }

  .hero-slider__tag {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .hero-slider__arrow {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 560px) {
  .hero-promo-amount {
    font-size: 28px;
  }

  .container {
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* ---------- Sections / cards / trust ---------- */
@media (max-width: 720px) {
  .section {
    padding: 48px 0;
  }

  #calculator.section {
    padding-top: 28px;
    padding-bottom: 36px;
  }

  .section-head h2,
  .page-section h2 {
    font-size: clamp(24px, 6.5vw, 30px);
  }

  .marquee-logo-frame {
    min-height: 72px;
    min-width: 90px;
    padding: 8px 10px;
  }

  .marquee-logo {
    height: 52px;
    max-width: 140px;
  }

  .why-glass,
  .card,
  .step,
  .quote {
    border-radius: 16px;
  }

  /* Prefer horizontal peek for service / area strips when present */
  .cards--services {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

/* ---------- Eligibility wizard (homepage) ---------- */
@media (max-width: 960px) {
  .hf-holo-aside {
    display: none;
  }

  .hf-holo-shell {
    gap: 0;
  }

  .hf-wizard--holo {
    --hf-content-h: auto;
    --hf-body-h: auto;
    --hf-fit-chrome: 0px;
    border-radius: 18px;
    overflow: hidden;
  }

  .hf-wizard--holo .hf-wizard__body {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
  }

  .hf-wizard--holo .hf-panel.is-active {
    height: auto !important;
    min-height: 0 !important;
  }

  .hf-wizard--holo .hf-panel.is-active .hf-panel__content,
  .hf-wizard--holo .hf-panel__content--scroll,
  .hf-wizard--holo .hf-panel.is-active .hf-panel__content--step1,
  .hf-wizard--holo .hf-panel__content--step1 {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }

  .holo-progress {
    gap: 4px;
    padding: 10px 14px 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .holo-progress__label {
    font-size: 9px;
    line-height: 1.15;
  }

  /* purpose4 also has holo-cards--2 — desktop 960px rule must not force 1-col */
  .holo-cards--purpose4 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px;
  }

  .holo-cards--purpose4 .holo-card {
    min-height: 118px;
    max-height: 168px;
    border-radius: 14px;
    background: #fff;
  }

  /* Lenis + snap: reveal IO can lag — keep calculator readable */
  #calculator [data-reveal],
  #calculator .hf-holo-shell[data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }

  .holo-cards--purpose4 .holo-card--photo .holo-card__media,
  .holo-card--photo .holo-card__media {
    max-height: 96px;
  }

  .holo-card--photo .holo-card__body > strong {
    font-size: 14px;
  }

  .hf-wizard--holo .hf-actions {
    position: sticky;
    bottom: 0;
    z-index: 4;
    margin-top: 12px;
    padding: 12px 4px 4px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #fff 28%);
  }

  body.has-mova-mbar .hf-wizard--holo .hf-actions {
    bottom: 0;
  }

  .hf-wizard--holo .hf-btn-next,
  .hf-wizard--holo .hf-btn-back,
  .hf-wizard--holo #hfRestart {
    min-height: 48px;
    min-width: 0;
    flex: 1 1 auto;
    border-radius: 12px;
    justify-content: center;
  }

  .hf-wizard--holo .hf-btn-next {
    margin-left: 0;
  }
}

@media (max-width: 560px) {
  .holo-progress__label {
    display: none;
  }

  .holo-progress {
    min-height: 28px;
    padding: 12px 12px 8px;
  }

  .holo-cards--purpose4 .holo-card {
    min-height: 118px;
  }

  .hf-wizard--holo .hf-wizard__head,
  .hf-wizard--holo .hf-wizard__body {
    padding-left: 14px;
    padding-right: 14px;
  }
}

/* ---------- Mortgage / eligibility calculator pages ---------- */
@media (max-width: 640px) {
  .elig-aside {
    position: sticky;
    top: calc(var(--mova-header-h, 92px) + 8px);
    z-index: 3;
    border-radius: 0 0 16px 16px;
  }

  .elig-layout .mova-choice-card,
  .mova-choice-card {
    min-height: 108px;
  }

  .elig-form-body input,
  .elig-form-body select,
  .elig-widget input,
  .elig-widget select {
    min-height: 48px;
  }
}

/* ---------- Forms / CTA / footer (global phone polish) ---------- */
@media (max-width: 720px) {
  input.wiz-input,
  select.wiz-input,
  textarea.wiz-input,
  .wiz-input,
  .lf-field input,
  .lf-field select,
  .lf-field textarea,
  .footer-news-form input,
  .page-spoke input,
  .page-spoke select,
  .page-spoke textarea {
    font-size: 16px !important;
    min-height: 48px;
  }

  .btn-lg {
    min-height: calc(var(--touch-min, 44px) + 6px);
    padding: 0 22px;
    border-radius: var(--radius-pill, 999px);
  }

  .cta-band,
  .spoke-cta-inner {
    border-radius: 18px;
  }

  .spoke-cta-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    text-align: left;
  }

  .spoke-cta-inner .btn {
    width: 100%;
    min-height: 50px;
  }

  .footer-news-row {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .footer-news-form {
    flex-direction: column;
    width: 100%;
  }

  .footer-news-form input,
  .footer-news-form .btn {
    width: 100%;
    min-height: 48px;
  }

  .footer-grid {
    gap: 28px 20px;
  }

  .site-footer {
    padding-bottom: calc(28px + var(--mova-mbar-h, 0px));
  }
}

/* ---------- FAQ accordion readability ---------- */
@media (max-width: 720px) {
  .faq-item,
  .faq details,
  .home-faq details {
    border-radius: 14px;
  }

  .faq-item summary,
  .faq details summary,
  .home-faq details summary {
    min-height: 52px;
    padding: 14px 16px;
    font-size: 15px;
  }
}

/* ---------- RTL tweaks ---------- */
@media (max-width: 900px) {
  [dir="rtl"] .hero-copy,
  [dir="rtl"] .hero-grid--copy-right .hero-copy {
    text-align: right !important;
  }

  [dir="rtl"] .hero-cta,
  [dir="rtl"] .hero-badges {
    justify-content: flex-end !important;
  }

  html[dir="rtl"] .nav-drawer {
    right: auto;
    left: 0;
    border-left: none;
    border-right: 1px solid rgba(255, 255, 255, 0.14);
    transform: translateX(-105%);
  }

  html[dir="rtl"] .nav-drawer.open {
    transform: translateX(0);
  }
}

/* Reduce decorative motion load on small screens */
@media (max-width: 720px) and (prefers-reduced-motion: no-preference) {
  .hf-holo-art__orbit {
    animation-duration: 28s;
  }
}

/* ============================================================
   Homepage mobile IA (2026-07-27)
   Flow: mast → 2-up services → About (full-bleed cards) → FAQ → Contact
   Desktop layout unchanged.
   ============================================================ */
@media (max-width: 720px) {
  body.home-hero-dark {
    --mova-about-vh: calc(100dvh - var(--mova-header-h, 92px) - 12px);
  }

  /* Hide desktop-only drawer anchors (sections removed from mobile flow) */
  .nav-drawer__desk-only {
    display: none !important;
  }

  /* Phone: slim utility menu only — products live in cards + bottom bar */
  .nav-drawer__tablet {
    display: none !important;
  }

  /* No hero slider — compact mast + services */
  body.home-hero-dark .hero-slider__views,
  body.home-hero-dark .hero-slider__chrome {
    display: none !important;
  }

  body.home-hero-dark .hero.hero-slider {
    min-height: 0;
    height: auto;
    display: block;
    padding: 0;
    background: var(--navy-900, #0a1830);
  }

  .hero-mobile-mast {
    display: block;
    padding: 20px 0 18px;
    color: #fff;
  }

  .hero-mobile-mast .eyebrow {
    color: rgba(201, 163, 90, 0.95);
  }

  .hero-mobile-mast h1 {
    margin: 8px 0 10px;
    font-size: clamp(26px, 7.2vw, 34px);
    line-height: 1.15;
    color: #fff;
  }

  .hero-mobile-mast h1 .accent {
    color: var(--gold, #c9a35a);
  }

  .hero-mobile-mast .lead {
    margin: 0 0 16px;
    font-size: 14.5px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.82);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .hero-mobile-mast__cta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .hero-mobile-mast__cta .btn {
    min-height: 46px;
    padding: 11px 10px;
    font-size: 12.5px;
    border-radius: 12px;
    justify-content: center;
    text-align: center;
  }

  .hero-mobile-mast__cta .btn-outline {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.06);
  }

  /* 4 services — 2 cards per swipe page */
  body.home-hero-dark .hero-entry {
    padding: 14px 0 10px;
    border-top: none;
  }

  body.home-hero-dark .hero-entry .container {
    padding-left: 14px;
    padding-right: 14px;
  }

  .hero-entry__cards {
    display: flex !important;
    grid-template-columns: none !important;
    gap: 0;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin: 0 -2px;
    padding-bottom: 4px;
  }

  .hero-entry__cards::-webkit-scrollbar {
    display: none;
  }

  .hero-entry__page {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    flex: 0 0 100%;
    width: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    padding: 0 2px;
    box-sizing: border-box;
  }

  .hero-entry .about-card--lite {
    min-width: 0;
    border-radius: 14px;
    overflow: hidden;
  }

  .hero-entry .about-card--lite .about-card__media {
    aspect-ratio: 16 / 10;
  }

  .hero-entry .about-card--lite .about-card__body {
    padding: 10px 10px 12px;
    gap: 4px;
  }

  .hero-entry .about-card--lite .about-card__body h3 {
    font-size: 13.5px;
  }

  .hero-entry .about-card--lite .about-card__body p {
    font-size: 11.5px;
    -webkit-line-clamp: 2;
  }

  .hero-entry .about-card__more {
    font-size: 12px;
  }

  .hero-entry__dots {
    display: flex;
    justify-content: center;
    gap: 7px;
    padding: 10px 0 2px;
  }

  .hero-entry__dots span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.18);
    transition: background 0.2s, transform 0.2s;
  }

  .hero-entry__dots span.is-active {
    background: var(--navy-900, #0a1830);
    transform: scale(1.15);
  }

  /* Drop mid-page noise from mobile home flow */
  body.home-hero-dark #why,
  body.home-hero-dark #process,
  body.home-hero-dark #calculator,
  body.home-hero-dark #services,
  body.home-hero-dark #reviews,
  body.home-hero-dark #areas,
  body.home-hero-dark #properties,
  body.home-hero-dark #preapproval {
    display: none !important;
  }

  /* Lenis/IO reveal can lag on slim home — keep About/FAQ/Contact readable */
  body.home-hero-dark #about [data-reveal],
  body.home-hero-dark #faq [data-reveal],
  body.home-hero-dark #contact [data-reveal],
  body.home-hero-dark .hero-entry [data-reveal],
  body.home-hero-dark .hero-mobile-mast [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }

  /* About — each card fills the viewport */
  body.home-hero-dark #about.section {
    padding: 12px 0 8px;
  }

  body.home-hero-dark #about .section-head {
    padding: 0 4px 12px;
  }

  body.home-hero-dark #about .section-head h2 {
    font-size: clamp(20px, 5.5vw, 26px);
  }

  body.home-hero-dark #about .about-cards {
    display: flex;
    flex-direction: column;
    gap: 14px;
    grid-template-columns: none;
  }

  body.home-hero-dark #about .about-card {
    min-height: var(--mova-about-vh);
    display: flex;
    flex-direction: column;
    border-radius: 18px;
    overflow: hidden;
    scroll-snap-align: start;
    margin: 0;
  }

  body.home-hero-dark #about .about-card__media {
    flex: 0 0 36%;
    aspect-ratio: auto;
    min-height: 160px;
    max-height: 38%;
  }

  body.home-hero-dark #about .about-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  body.home-hero-dark #about .about-card__body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    padding: 22px 18px 24px;
  }

  body.home-hero-dark #about .about-card__body h3 {
    font-size: clamp(22px, 5.8vw, 28px);
    margin: 0;
  }

  body.home-hero-dark #about .about-card__list {
    font-size: 15px;
  }

  body.home-hero-dark #about .about-audience {
    display: none;
  }

  body.home-hero-dark #faq.section {
    padding-top: 28px;
    padding-bottom: 20px;
  }

  body.home-hero-dark #contact.section {
    padding-top: 12px;
    padding-bottom: 28px;
  }

  .home-contact-card {
    padding: 24px 18px 26px;
    border-radius: 18px;
  }

  .home-contact-card__actions {
    flex-direction: column;
  }

  .home-contact-card__actions .btn {
    width: 100%;
    flex: none;
  }

  /* Soften full-page snap on home — natural scroll for About cards */
  html.snap-on body.home-hero-dark {
    scroll-snap-type: none;
  }
}
