/* Base styles and custom properties */
:root {
    --color-charcoal-900: #1A1A1A;
    --color-charcoal-800: #2C2C2C;
    --color-charcoal-700: #3D3D3D;
    --color-coral-400: #E07A5F;
    --color-coral-500: #D4654A;
    --color-cream-50: #FAF8F5;
    --color-cream-100: #F5F0EB;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    overflow-x: hidden;
}

/* Scroll reveal animations - progressive enhancement */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        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);
    }
    
    .reveal:nth-child(2) { transition-delay: 0.1s; }
    .reveal:nth-child(3) { transition-delay: 0.2s; }
    .reveal:nth-child(4) { transition-delay: 0.3s; }
    .reveal:nth-child(5) { transition-delay: 0.4s; }
    .reveal:nth-child(6) { transition-delay: 0.5s; }
}

/* Hero element animations */
@media (prefers-reduced-motion: no-preference) {
    .hero-elem {
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    }
    
    .hero-elem.hero-visible {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navbar transitions */
#navbar.scrolled {
    background: rgba(250, 248, 245, 0.97);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

#navbar.scrolled #nav-logo-text {
    color: #2C2C2C;
}

#navbar.scrolled #nav-sub-text {
    color: #E07A5F;
}

#navbar.scrolled .menu-line {
    background: #2C2C2C;
}

/* Mobile menu */
#mobile-menu.open {
    transform: translateX(0);
}

/* Mobile nav links */
.mobile-nav-link {
    position: relative;
}

.mobile-nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #E07A5F;
    transition: width 0.3s ease;
}

.mobile-nav-link:hover::after {
    width: 100%;
}

/* Hamburger animation */
.menu-line {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#mobile-menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

#mobile-menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}

#mobile-menu-btn.active .menu-line:nth-child(3) {
    width: 24px;
    transform: rotate(-45deg) translate(5px, -5px);
}

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

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

::-webkit-scrollbar-thumb {
    background: #E07A5F;
    border-radius: 4px;
}

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

/* Selection color */
::selection {
    background: #E07A5F;
    color: white;
}

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

/* Smooth image loading */
img {
    loading: lazy;
    decoding: async;
}

/* Print styles */
@media print {
    #navbar, #mobile-menu-btn, .reveal {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
