/* === Base Styles === */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
}

::selection {
    background-color: #6B0F1A;
    color: #F4E4E1;
}

/* === Scroll Reveal Animations === */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal[data-reveal-delay="1"] {
    transition-delay: 0.1s;
}

.reveal[data-reveal-delay="2"] {
    transition-delay: 0.2s;
}

.reveal[data-reveal-delay="3"] {
    transition-delay: 0.3s;
}

.reveal[data-reveal-delay="4"] {
    transition-delay: 0.4s;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* === Navigation === */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #C9A962;
    transition: width 0.3s ease;
}

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

/* === Mobile Menu === */
#mobile-menu {
    backdrop-filter: blur(20px);
}

.mobile-link {
    position: relative;
}

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1px;
    background-color: #C9A962;
    transition: width 0.3s ease;
}

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

/* === Navbar Scroll State === */
.navbar-scrolled {
    background-color: rgba(249, 241, 239, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(107, 15, 26, 0.1);
}

/* === Hero Parallax Subtle === */
#hero {
    will-change: transform;
}

/* === Button Focus States === */
button:focus-visible,
a:focus-visible {
    outline: 2px solid #C9A962;
    outline-offset: 2px;
}

/* === Form Focus States === */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    box-shadow: 0 0 0 1px #6B0F1A;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #4A0A12;
}

/* === Image Loading === */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* === Print Styles === */
@media print {
    #navbar,
    #mobile-menu-btn,
    .reveal {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    .bg-illy-burgundy,
    .bg-illy-burgundy-dark {
        background-color: #6B0F1A !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* === Responsive Adjustments === */
@media (max-width: 768px) {
    html {
        font-size: 15px;
    }
    
    #hero h1 {
        font-size: 2.5rem;
    }
    
    .font-serif.text-4xl {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
    
    #hero h1 {
        font-size: 2rem;
    }
}
