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

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

body {
    overflow-x: hidden;
}

/* Smooth Scroll for anchor links */
a {
    text-decoration: none;
    color: inherit;
}

/* Hero Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.hero-eyebrow {
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.2s;
}

.hero-title {
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.4s;
}

.hero-subtitle {
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.6s;
}

.hero-ctas {
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.8s;
}

/* Scroll Reveal Animations */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal[data-reveal] {
    opacity: 0;
    transform: translateY(40px);
}

.reveal[data-reveal].revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Roast Card Hover */
.roast-card {
    transition: transform 0.4s ease;
}

.roast-card:hover {
    transform: translateY(-4px);
}

/* Navbar */
#navbar {
    transition: background-color 0.4s ease, padding 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(2, 44, 34, 0.95);
    backdrop-filter: blur(12px);
    padding-top: 0;
    padding-bottom: 0;
}

#navbar.scrolled nav {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

/* Mobile Menu */
#nav-menu.open {
    opacity: 1;
    pointer-events: auto;
}

#mobile-menu-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

/* Menu Lines Animation */
#menu-toggle[aria-expanded="true"] .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

#menu-toggle[aria-expanded="true"] .menu-line:nth-child(2) {
    opacity: 0;
}

#menu-toggle[aria-expanded="true"] .menu-line:nth-child(3) {
    width: 6rem;
    transform: rotate(-45deg) translate(4px, -4px);
    background-color: white;
}

/* Focus Styles */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #34d399;
    outline-offset: 4px;
    border-radius: 4px;
}

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

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

::-webkit-scrollbar-track {
    background: #064e3b;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #10b981;
}

/* Selection */
::selection {
    background-color: rgba(16, 185, 129, 0.3);
    color: #064e3b;
}

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

/* Print Styles */
@media print {
    #navbar,
    #mobile-menu-overlay,
    .reveal[data-reveal] {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
