/* ============================================================
   RENTHOME HIGH-PERFORMANCE LUXURY ANIMATIONS & INTRO LOADER
   ============================================================ */

/* ----- INTRO LOADER OVERLAY (DURATA PROLUNGATA) ----- */
#renthome-intro-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at center, #111827 0%, #06090e 100%);
    z-index: 999999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.9s cubic-bezier(0.77, 0, 0.175, 1), visibility 0.9s cubic-bezier(0.77, 0, 0.175, 1);
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    will-change: opacity, visibility;
    transform: translate3d(0,0,0);
}

#renthome-intro-loader.fade-out,
html.intro-seen #renthome-intro-loader,
body.intro-seen #renthome-intro-loader {
    opacity: 0;
    visibility: hidden;
    display: none !important;
}

.intro-logo-box {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    transform: scale(1);
    animation: introPulse 5.2s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

/* SVG Line Drawing & Glow Effects */
.intro-rh-svg {
    width: 250px;
    height: auto;
    filter: drop-shadow(0 0 25px rgba(207, 176, 124, 0.4));
}

.svg-stroke-path {
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
    animation: drawStroke 3.2s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

.svg-stroke-path.delay-path {
    animation-delay: 0.4s;
}

.svg-rh-monogram {
    opacity: 0;
    transform: translateY(6px);
    animation: fadeInMonogram 1.5s ease forwards 1.8s;
}

.svg-wordmark {
    opacity: 0;
    animation: fadeInWordmark 1.5s ease forwards 2.2s;
}

.intro-subtitle {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #e2c286;
    opacity: 0;
    margin-top: 10px;
    text-align: center;
    max-width: 90vw;
    animation: fadeInSubtitle 1.5s ease forwards 2.4s;
}

.intro-progress-bar {
    width: 200px;
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 28px;
    opacity: 0;
    animation: fadeInSubtitle 0.8s ease forwards 1s;
}

.intro-progress-line {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #b58f54 0%, #f3e5c8 50%, #b58f54 100%);
    box-shadow: 0 0 12px #CFB07C;
    animation: loadLine 4.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* ----- KEYFRAME ANIMATIONS ----- */
@keyframes drawStroke {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes fadeInMonogram {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInWordmark {
    to {
        opacity: 1;
    }
}

@keyframes fadeInSubtitle {
    to {
        opacity: 1;
    }
}

@keyframes introPulse {
    0% {
        opacity: 0;
        transform: scale(0.92);
    }
    15% {
        opacity: 1;
    }
    85% {
        opacity: 1;
        transform: scale(1.03);
    }
    100% {
        opacity: 1;
        transform: scale(1.05);
    }
}

@keyframes loadLine {
    0% { width: 0%; }
    100% { width: 100%; }
}

/* ============================================================
   VELOCIZZAZIONE E REATTIVITÀ DEL SITO (SNAPPY 60FPS)
   ============================================================ */

/* Fast & Fluid Scroll Reveal */
.reveal-on-scroll {
    opacity: 0;
    transform: translate3d(0, 20px, 0);
    transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1), transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
    backface-visibility: hidden;
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

.reveal-delay-1 { transition-delay: 0.05s; }
.reveal-delay-2 { transition-delay: 0.1s; }
.reveal-delay-3 { transition-delay: 0.15s; }

/* Smooth Scroll reattivo */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* Interazioni veloci sulle card e pulsanti (Reattività immediata) */
.property-card, .sell-card, .adv-card, .btn, .cta-primary, .cta-secondary {
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.22s ease !important;
    will-change: transform, box-shadow;
    transform: translate3d(0,0,0);
}

.property-card:hover, .sell-card:hover, .adv-card:hover {
    transform: translate3d(0, -6px, 0) scale(1.01) !important;
    box-shadow: 0 16px 36px rgba(11, 15, 20, 0.12), 0 0 16px rgba(181, 143, 84, 0.15) !important;
}

/* Pulsanti super veloci */
.cta-primary:active, .cta-secondary:active, button:active {
    transform: scale(0.97) !important;
}
