/* ===== CUSTOM STYLES ===== */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FDF8F5;
}
::-webkit-scrollbar-thumb {
    background: #c23254;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #9f2340;
}

/* Selection color */
::selection {
    background: #f9d0d9;
    color: #6c1b32;
}

/* ===== NAVBAR SCROLL EFFECTS ===== */
.navbar-scrolled {
    background: rgba(253, 248, 245, 0.92) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(129, 30, 55, 0.08);
    border-bottom: 1px solid rgba(244, 168, 184, 0.3);
}

.navbar-scrolled .font-serif {
    color: #6c1b32 !important;
}

/* ===== HERO ===== */
#hero {
    min-height: 100vh;
    min-height: 100dvh;
}

/* ===== SERVICE CARDS ===== */
.service-card {
    will-change: transform;
}

.service-card:hover {
    transform: translateY(-4px);
}

/* ===== AREA CARDS ===== */
.area-card {
    will-change: transform;
}

/* ===== TESTIMONIAL CARDS ===== */
.testimonial-card {
    will-change: transform;
}

.testimonial-card:hover {
    transform: translateY(-4px);
}

/* ===== SCROLL REVEAL ANIMATIONS ===== */
/* Default state: fully visible (progressive enhancement) */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

/* When JS is active and animation is enabled, set initial hidden state */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
        transform: translateY(0);
    }

    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== BACK TO TOP ===== */
#backToTop.visible {
    opacity: 1;
    visibility: visible;
}

#backToTop:not(.visible) {
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
}

#backToTop.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ===== MOBILE MENU ===== */
#mobileMenu {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== FORM FOCUS STYLES ===== */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(194, 50, 84, 0.15);
}

/* ===== BUTTON RIPPLE EFFECT ===== */
button, a {
    -webkit-tap-highlight-color: transparent;
}

/* ===== IMAGE LAZY LOAD FALLBACK ===== */
img {
    background-color: #f5f0ed;
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

    .service-card:hover,
    .testimonial-card:hover {
        transform: none;
    }
}

/* ===== RESPONSIVE TWEAKS ===== */
@media (max-width: 640px) {
    #hero h1 {
        font-size: 2.25rem;
    }

    .floating-stat {
        position: relative !important;
        bottom: auto !important;
        left: auto !important;
        margin-top: 1rem;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    #navbar,
    #backToTop,
    #mobileMenu {
        display: none !important;
    }

    body {
        color: #000;
        background: #fff;
    }

    section {
        page-break-inside: avoid;
    }
}
