/* Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    overflow-x: hidden;
}

::selection {
    background: #d4adca;
    color: #2d1326;
}

/* Navbar */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(250, 245, 248, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(212, 173, 202, 0.3);
    box-shadow: 0 1px 0 rgba(107, 45, 91, 0.05);
}

/* Mobile Menu */
#mobile-menu.active {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.active .mobile-link {
    animation: fadeUp 0.4s ease forwards;
    opacity: 1;
}

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

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Menu toggle animation */
#menu-toggle.active .menu-line:first-child {
    transform: rotate(45deg) translate(3px, 3px);
}

#menu-toggle.active .menu-line:last-child {
    transform: rotate(-45deg) translate(3px, -3px);
    width: 6;
}

/* Reveal animations — progressive enhancement via JS only */
@media (prefers-reduced-motion: no-preference) {
    .reveal-element {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                    transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

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

    .reveal-element.revealed:nth-child(2) { transition-delay: 0.1s; }
    .reveal-element.revealed:nth-child(3) { transition-delay: 0.2s; }
}

/* Reduced motion — disable all animations */
@media (prefers-reduced-motion: reduce) {
    .reveal-element {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    html {
        scroll-behavior: auto;
    }

    img:hover {
        transform: none;
    }
}

/* Subtle hover lift for cards */
.hover-lift {
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(107, 45, 91, 0.08);
}

/* Smooth image loading */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: #d4adca;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #bd7fb0;
}

/* Focus styles */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #d4adca;
    outline-offset: 4px;
    border-radius: 2px;
}

/* Print styles */
@media print {
    #navbar, #mobile-menu, .reveal-element {
        display: block !important;
        opacity: 1 !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}
