/* ========================================
   JUJU BUGS CRAWFISH DRIVE THRU
   Custom Styles
======================================== */

/* Base */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* Selection */
::selection {
    background-color: rgba(26, 67, 50, 0.15);
    color: #1B4332;
}

/* ========================================
   NAVIGATION
======================================== */
#site-header {
    transition: background-color 0.5s ease, backdrop-filter 0.5s ease, box-shadow 0.5s ease;
}

#site-header.scrolled {
    background-color: rgba(7, 15, 10, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(255,255,255,0.05);
}

.nav-link {
    position: relative;
}

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

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

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

#mobile-menu:not(.open) {
    opacity: 0;
    pointer-events: none;
}

.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

#mobile-menu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

#mobile-menu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }

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

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

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

/* ========================================
   HERO ANIMATIONS
======================================== */
.hero-badge {
    animation: fadeDown 0.8s ease forwards;
    animation-delay: 0.3s;
    opacity: 0;
}

.hero-title {
    animation: fadeUp 1s ease forwards;
    animation-delay: 0.6s;
    opacity: 0;
}

.hero-sub {
    animation: fadeUp 1s ease forwards;
    animation-delay: 0.9s;
    opacity: 0;
}

.hero-cta {
    animation: fadeUp 1s ease forwards;
    animation-delay: 1.1s;
    opacity: 0;
}

.hero-scroll {
    animation: fadeIn 1s ease forwards;
    animation-delay: 1.5s;
    opacity: 0;
}

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

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

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

/* ========================================
   SCROLL REVEAL ANIMATIONS
   Progressive enhancement: content is
   visible by default; JS adds .revealed
======================================== */
.reveal-up,
.reveal-left,
.reveal-right {
    /* Default: visible, no animation needed */
    opacity: 1;
    transform: none;
    transition: opacity 0.7s ease, transform 0.7s ease;
}

/* When JS is enabled and these get .revealed */
.reveal-up.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left.revealed {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right.revealed {
    opacity: 1;
    transform: translateX(0);
}

/* If JS is disabled, content remains visible */
.no-js .reveal-up,
.no-js .reveal-left,
.no-js .reveal-right {
    opacity: 1;
    transform: none;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal-up,
    .reveal-left,
    .reveal-right {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .hero-badge,
    .hero-title,
    .hero-sub,
    .hero-cta,
    .hero-scroll {
        animation: none;
        opacity: 1;
    }
}

/* ========================================
   IMAGE TRANSITIONS
======================================== */
img {
    max-width: 100%;
    height: auto;
}

/* ========================================
   FOCUS STYLES
======================================== */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #D4A373;
    outline-offset: 4px;
    border-radius: 2px;
}

/* ========================================
   SUBTLE LINE DECORATIONS
======================================== */
.border-forest-700\/3 {
    border-color: rgba(27, 67, 50, 0.03);
}

/* ========================================
   RESPONSIVE TWEAKS
======================================== */
@media (max-width: 767px) {
    .font-serif {
        line-height: 1.1;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .lg\:grid-cols-2 {
        gap: 2rem;
    }
}

/* ========================================
   PRINT STYLES
======================================== */
@media print {
    #site-header,
    #mobile-menu,
    .hero-scroll {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    a {
        color: #000;
    }
    
    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
    }
}
