/* ========================================
   Kristin's Donuts — Custom Styles
   ======================================== */

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    overflow-x: hidden;
}

/* Selection */
::selection {
    background-color: #064e3b;
    color: #fefdf8;
}

/* ========================================
   Marquee Animation
   ======================================== */
@keyframes marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.animate-marquee {
    animation: marquee 30s linear infinite;
}

/* ========================================
   Scroll Reveal (Progressive Enhancement)
   Only active when JS is available and user prefers motion
   ======================================== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
        transform: none;
        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);
    }
}

/* Default state — visible even without JS */
.reveal {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   Navbar Scroll State
   ======================================== */
#navbar.scrolled {
    background-color: rgba(254, 253, 248, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(6, 78, 59, 0.08);
}

#navbar.scrolled .font-serif {
    color: #064e3b;
}

#navbar.scrolled a:not([class*="bg-emerald"]) {
    color: #064e3b;
}

/* ========================================
   Mobile Menu
   ======================================== */
#mobile-menu {
    animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.mobile-link {
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(6, 78, 59, 0.08);
}

.mobile-link:last-child {
    border-bottom: none;
}

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

/* ========================================
   Image Placeholder Fallback
   ======================================== */
img {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
}

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

/* ========================================
   Print Styles
   ======================================== */
@media print {
    nav, .animate-marquee, #hero {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
