/* ============================================
   King's Street Crawfish Co. — Custom Styles
   Charcoal + Coral | Editorial Design
   ============================================ */

/* --- Reset & 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 Color --- */
::selection {
    background: #ff6b4a;
    color: #13151a;
}

/* --- Animations --- */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation-name: fadeIn;
    animation-duration: 0.8s;
    animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
    animation-fill-mode: forwards;
}

/* --- Scroll Reveal (progressive enhancement) --- */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), 
                    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fallback: always visible if JS is disabled or reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* --- Navbar --- */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(8, 10, 13, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 107, 74, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* --- Mobile Menu --- */
.mobile-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s 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.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; }
.mobile-menu-open .mobile-link:nth-child(5) { transition-delay: 0.3s; }

/* --- Menu Toggle --- */
.menu-line {
    display: block;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

#menu-toggle.active .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

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

/* --- Smooth Scroll Offset --- */
section[id] {
    scroll-margin-top: 80px;
}

/* --- Image Optimization --- */
img {
    max-width: 100%;
    height: auto;
}

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

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

::-webkit-scrollbar-track {
    background: #13151a;
}

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

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

/* --- Card Hover Glow --- */
.group:hover .bg-coral-500\/10 {
    background: rgba(255, 107, 74, 0.2);
}

/* --- Responsive Typography --- */
@media (max-width: 640px) {
    .font-serif {
        line-height: 1.1;
    }
}

/* --- Print Styles --- */
@media print {
    nav, #menu-toggle, .reveal {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .font-serif {
        color: black;
    }
}
