/* ===== BASE & RESET ===== */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== NAVBAR SCROLL STATE ===== */
#navbar {
    background: transparent;
    transition: background 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}

#navbar.scrolled {
    background: rgba(250, 240, 245, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 2px 20px rgba(123, 45, 91, 0.08);
}

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

#mobile-menu.open {
    display: block;
}

#mobile-menu.hidden {
    display: none;
}

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

/* Mobile menu button animation */
.menu-line {
    transition: all 0.3s ease;
}

#menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

#menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menu-btn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 1.5rem;
}

.mobile-link {
    transition: color 0.2s ease;
}

/* ===== FLOAT ANIMATION ===== */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* ===== SCROLL REVEAL ===== */
/* Default: all elements visible (no JS required) */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Progressive enhancement: hide and animate on scroll when JS is available */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
    }

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

    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
}

/* ===== SERVICE CARD HOVER ===== */
.group:hover .group-hover\:bg-white\/20 {
    background-color: rgba(255, 255, 255, 0.2);
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #faf0f5;
}

::-webkit-scrollbar-thumb {
    background: #d88aad;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #7B2D5B;
}

/* ===== SELECTION ===== */
::selection {
    background: #e7b5cc;
    color: #3d162f;
}

/* ===== IMAGE PLACEHOLDER FALLBACK ===== */
img {
    max-width: 100%;
    height: auto;
}

/* ===== FORM FOCUS ===== */
input:focus,
textarea:focus,
select:focus {
    outline: none;
}

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

    .animate-float {
        animation: none;
    }
}
