*, *::before, *::after {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #1e0d10;
}
::-webkit-scrollbar-thumb {
    background: #722F37;
    border-radius: 3px;
}

/* Hero animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation-name: fadeInUp;
    animation-duration: 0.9s;
    animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes bounceSlow {
    0%, 100% { transform: translate(-50%, 0); }
    50% { transform: translate(-50%, 8px); }
}

.animate-bounce-slow {
    animation: bounceSlow 2.5s ease-in-out infinite;
}

/* Scroll reveal — progressive enhancement via JS */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
                    transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    .reveal.revealed:nth-child(2) { transition-delay: 0.1s; }
    .reveal.revealed:nth-child(3) { transition-delay: 0.2s; }
}

/* Reduced motion — disable all scroll animations */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .animate-fade-in-up {
        animation: none;
        opacity: 1;
    }
    .animate-bounce-slow {
        animation: none;
    }
    html {
        scroll-behavior: auto;
    }
}

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

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

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

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

/* Nav scroll state */
.nav-scrolled {
    background: rgba(253, 248, 246, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(114, 47, 55, 0.08);
}

.nav-scrolled .menu-line {
    background: #722F37;
}

/* Form focus states */
input:focus, textarea:focus {
    outline: none;
    border-bottom-color: #e8918c;
}

/* Selection */
::selection {
    background: #722F37;
    color: #fdf8f6;
}
