/* ============================================
   Cooper House Project — Custom Styles
   ============================================ */

/* Base */
*, *::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;
}

::selection {
    background: #C0523A;
    color: white;
}

/* Scroll reveal — progressive enhancement */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        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-visible {
        opacity: 1;
        transform: translateY(0);
    }

    /* Stagger children */
    .reveal-delay-100 { transition-delay: 0.1s; }
    .reveal-delay-200 { transition-delay: 0.2s; }
    .reveal-delay-300 { transition-delay: 0.3s; }
}

/* Nav scroll state */
.nav-scrolled .nav-logo {
    color: #1A1A1A;
}

#nav {
    background: transparent;
    border-bottom: 1px solid transparent;
}

#nav.nav-scrolled {
    background: rgba(250, 250, 248, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom-color: rgba(0, 0, 0, 0.06);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

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

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

.mobile-link {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.3s ease, transform 0.3s 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.05s; }
#mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.2s; }

/* Hamburger animation */
#menu-btn.active #bar1 {
    transform: translateY(5px) rotate(45deg);
}

#menu-btn.active #bar2 {
    opacity: 0;
}

#menu-btn.active #bar3 {
    transform: translateY(-5px) rotate(-45deg);
    width: 1.5rem;
}

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

.animate-marquee {
    animation: marquee 30s linear infinite;
}

/* Image hover containers */
.aspect-\[3\/4\],
.aspect-square,
.aspect-\[4\/5\] {
    position: relative;
    overflow: hidden;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #9CA3AF;
}

/* Focus visible */
:focus-visible {
    outline: 2px solid #C0523A;
    outline-offset: 2px;
}

/* Print */
@media print {
    #nav, #mobile-menu, .reveal {
        display: none !important;
    }
    body {
        color: #1A1A1A;
        background: white;
    }
}
