/* ============================================
   Milton and Co Ice Cream — Custom Styles
   ============================================ */

/* Base & Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Selection Color */
::selection {
    background-color: #d1441c;
    color: #fff;
}

/* ============================================
   Scroll Reveal Animations
   (Progressive enhancement — content visible without JS)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .flavor-card,
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .flavor-card.revealed,
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }

    .flavor-card:nth-child(1) { transition-delay: 0.05s; }
    .flavor-card:nth-child(2) { transition-delay: 0.1s; }
    .flavor-card:nth-child(3) { transition-delay: 0.15s; }
    .flavor-card:nth-child(4) { transition-delay: 0.2s; }
    .flavor-card:nth-child(5) { transition-delay: 0.25s; }
    .flavor-card:nth-child(6) { transition-delay: 0.3s; }
}

/* ============================================
   Navbar Transition States
   ============================================ */
.nav-scrolled #nav-logo-text,
.nav-scrolled #nav-logo-sub {
    color: #fff;
}

.nav-scrolled .nav-link {
    color: rgba(255, 255, 255, 0.85);
}

.nav-scrolled .nav-link:hover {
    color: #fff;
}

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

#mobile-menu.menu-closed {
    opacity: 0;
    pointer-events: none;
}

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

/* ============================================
   Form Input Focus States
   ============================================ */
input:focus,
textarea:focus {
    outline: none;
}

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

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

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

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

/* ============================================
   Reduced Motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .flavor-card img,
    .flavor-card:hover img {
        transform: none;
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    nav,
    #contact-form,
    .absolute:not([class*="bg-"]) {
        display: none !important;
    }

    body {
        background: #fff !important;
        color: #000 !important;
    }

    a {
        color: #000 !important;
    }
}
