/**
 * Taj Alwuqar — Performance layer (CWV: LCP, CLS, INP)
 * Load after style.css on public pages.
 */

/* Below-fold: skip layout/paint until near viewport */
.iqfal-below-fold,
#testimonials,
#why-us,
#featured-properties,
.properties-catalog-section,
.site-footer {
    content-visibility: auto;
    contain-intrinsic-size: auto 480px;
}

.iqfal-below-fold--active {
    content-visibility: visible;
}

/* GPU-friendly hero title (override inline blur animation) */
.hero-title {
    will-change: transform, opacity;
    animation: iqfalHeroReveal 1.1s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

@keyframes iqfalHeroReveal {
    0% {
        opacity: 0;
        transform: scale(0.92) translate3d(0, 40px, 0);
    }
    100% {
        opacity: 1;
        transform: scale(1) translate3d(0, 0, 0);
    }
}

/* Avoid promoting every card to own layer */
.deal-card.deal-card--visual {
    will-change: auto;
}

.deal-card.deal-card--visual:hover {
    will-change: transform;
}

.deal-img-wrapper {
    aspect-ratio: 3 / 2;
    background: linear-gradient(135deg, #1a2744 0%, #2a3f5f 100%);
}

.deal-img-wrapper .deal-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Reduce paint cost of heavy blur on cards when motion OK */
@media (prefers-reduced-motion: no-preference) {
    .premium-property-card--ref:not(:hover) .deal-img {
        transform: translateZ(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-title {
        animation: none;
        opacity: 1;
        transform: none;
    }

    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Font fallback while Cairo loads — reduces FOIT/FOUT shift */
html[lang="ar"] body {
    font-family: "Cairo", "Segoe UI", Tahoma, system-ui, sans-serif;
}
