/* ============================================
   Happy Conez — Custom Styles
   ============================================ */

/* 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 {
    background-color: #FFF8F0;
    color: #450a0a;
    font-family: 'Space Grotesk', sans-serif;
}

/* Selection */
::selection {
    background: #b91c1c;
    color: #FFF8F0;
}

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

#navbar.scrolled {
    background: rgba(255, 248, 240, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(69, 10, 10, 0.08);
}

/* 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; }
#mobile-menu .mobile-link:nth-child(5) { animation-delay: 0.25s; }

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

/* Mobile toggle */
#mobile-toggle.active .nav-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
#mobile-toggle.active .nav-line:nth-child(2) {
    opacity: 0;
}
#mobile-toggle.active .nav-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 1.5rem;
}

/* Marquee */
.marquee-track {
    animation: marquee 30s linear infinite;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Scroll reveal (below fold only) */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(40px);
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero stagger */
.hero-fade {
    opacity: 1;
    transform: translateY(0);
    animation: heroIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-fade:nth-child(1) { animation-delay: 0.1s; }
.hero-fade:nth-child(2) { animation-delay: 0.25s; }
.hero-fade:nth-child(3) { animation-delay: 0.4s; }
.hero-fade:nth-child(4) { animation-delay: 0.55s; }

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

/* Image hover */
img {
    display: block;
    max-width: 100%;
}

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

/* Smooth image loading */
img {
    image-rendering: auto;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FFF8F0;
}
::-webkit-scrollbar-thumb {
    background: #b91c1c;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #7f1515;
}
