/* ===== Base & Reset ===== */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(154, 37, 64, 0.15);
    color: #3a0d16;
}

/* ===== Scroll Reveal (progressive enhancement) ===== */
@media (prefers-reduced-motion: no-preference) {
    .service-card,
    .gallery-item {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .service-card.visible,
    .gallery-item.visible {
        opacity: 1;
        transform: translateY(0);
    }

    .service-card:nth-child(1) { transition-delay: 0.05s; }
    .service-card:nth-child(2) { transition-delay: 0.1s; }
    .service-card:nth-child(3) { transition-delay: 0.15s; }
    .service-card:nth-child(4) { transition-delay: 0.2s; }
    .service-card:nth-child(5) { transition-delay: 0.25s; }
    .service-card:nth-child(6) { transition-delay: 0.3s; }

    .gallery-item:nth-child(1) { transition-delay: 0.05s; }
    .gallery-item:nth-child(2) { transition-delay: 0.1s; }
    .gallery-item:nth-child(3) { transition-delay: 0.15s; }
    .gallery-item:nth-child(4) { transition-delay: 0.2s; }
    .gallery-item:nth-child(5) { transition-delay: 0.25s; }
    .gallery-item:nth-child(6) { transition-delay: 0.3s; }
    .gallery-item:nth-child(7) { transition-delay: 0.35s; }
}

/* ===== Floating Card Animations ===== */
@media (prefers-reduced-motion: no-preference) {
    .floating-card-1 {
        animation: float-1 4s ease-in-out infinite;
    }

    .floating-card-2 {
        animation: float-2 5s ease-in-out infinite;
    }

    .floating-card-3 {
        animation: float-3 4.5s ease-in-out infinite;
    }
}

@keyframes float-1 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(1deg); }
}

@keyframes float-2 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(-1deg); }
}

@keyframes float-3 {
    0%, 100% { transform: translateY(0px) translateX(0px); }
    50% { transform: translateY(-6px) translateX(4px); }
}

/* ===== Navbar ===== */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
    background: rgba(255, 248, 248, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(154, 37, 64, 0.08);
}

/* ===== Mobile Menu ===== */
#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

.mobile-link {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

#mobileMenu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

#mobileMenu.open .mobile-link:nth-child(1) { transition-delay: 0.05s; }
#mobileMenu.open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.2s; }

/* ===== Menu Button Animation ===== */
.menu-line:nth-child(1) {
    transform-origin: center;
}
.menu-line:nth-child(2) {
    transform-origin: center;
}
.menu-line:nth-child(3) {
    transform-origin: center;
}

body.menu-open .menu-line:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}
body.menu-open .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
body.menu-open .menu-line:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
    width: 1.25rem;
}

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fff8f8;
}
::-webkit-scrollbar-thumb {
    background: #f5a4b5;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #d44566;
}

/* ===== Focus Styles ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #d44566;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ===== Select Arrow ===== */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239a2540' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* ===== 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;
    }
}
