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

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(196, 39, 47, 0.15);
    color: #741e27;
}

/* Nav scroll state */
nav.scrolled {
    background: rgba(66, 11, 15, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}

nav.scrolled #nav-logo {
    color: #fce3e5;
}

nav.scrolled .nav-link {
    color: rgba(252, 227, 229, 0.75);
}

nav.scrolled .nav-link:hover {
    color: #fce3e5;
}

/* Hero animations */
.hero-sub {
    animation: fadeUp 0.9s ease both;
    animation-delay: 0.3s;
}

.hero-title {
    animation: fadeUp 0.9s ease both;
    animation-delay: 0.5s;
}

.hero-desc {
    animation: fadeUp 0.9s ease both;
    animation-delay: 0.7s;
}

.hero-cta {
    animation: fadeUp 0.9s ease both;
    animation-delay: 0.9s;
}

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

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

#mobile-menu.closed {
    opacity: 0;
    pointer-events: none;
}

.mobile-link {
    animation: fadeUp 0.5s ease both;
}

.mobile-link:nth-child(1) { animation-delay: 0.1s; }
.mobile-link:nth-child(2) { animation-delay: 0.2s; }
.mobile-link:nth-child(3) { animation-delay: 0.3s; }
.mobile-link:nth-child(4) { animation-delay: 0.4s; }

/* Menu line animation */
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#menu-toggle.active .menu-line:first-child {
    transform: translateY(4px) rotate(45deg);
}

#menu-toggle.active .menu-line:last-child {
    transform: translateY(-4px) rotate(-45deg);
}

/* Form focus styles */
input:focus,
textarea:focus {
    border-color: #9f1c24 !important;
    box-shadow: 0 0 0 3px rgba(159, 28, 36, 0.08);
}

/* Smooth image loading */
img {
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .reveal {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    .hero-sub,
    .hero-title,
    .hero-desc,
    .hero-cta {
        animation: none;
        opacity: 1;
        transform: none;
    }
    img {
        transition: none;
    }
}
