/* ============================================
   Kelvin Scale Creamery US — Custom Styles
   ============================================ */

/* --- 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;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* --- Selection --- */
::selection {
    background: #E8A838;
    color: #1A1A1A;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #1A1A1A;
}
::-webkit-scrollbar-thumb {
    background: #4A1942;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #E8A838;
}

/* --- Navigation --- */
#nav {
    background: transparent;
    transition: background 0.5s ease, box-shadow 0.5s ease;
}

#nav.scrolled {
    background: rgba(74, 25, 66, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

.nav-text {
    color: #FDF8F4;
}

#nav.scrolled .nav-text {
    color: #FDF8F4;
}

/* --- Reveal Animations (progressive enhancement) --- */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        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);
    }

    .reveal:nth-child(2) { transition-delay: 0.1s; }
    .reveal:nth-child(3) { transition-delay: 0.2s; }
    .reveal:nth-child(4) { transition-delay: 0.3s; }
}

/* --- Hero Image Subtle Float --- */
@media (prefers-reduced-motion: no-preference) {
    #hero .relative.w-full.max-w-lg {
        animation: gentle-float 6s ease-in-out infinite;
    }
}

@keyframes gentle-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* --- Flavor Card Hover --- */
.group:hover .group-hover\:bg-\[\/E8A838\]\/25 {
    background-color: rgba(232, 168, 56, 0.25);
}

/* --- Mobile Menu Transitions --- */
#mobile-menu {
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

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

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

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

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

/* --- Print --- */
@media print {
    #nav, #mobile-menu {
        display: none;
    }
    body {
        background: #fff;
        color: #000;
    }
}
