/* ==========================================
   Lulu's Ice Cream — Custom Styles
   ========================================== */

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

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(200, 164, 90, 0.3);
    color: #1a2744;
}

/* --- Custom scrollbar --- */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #f0f3f9;
}
::-webkit-scrollbar-thumb {
    background: #c8a45a;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a88845;
}

/* --- Hero animations (above-the-fold — always visible by default) --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.animate-fade-in-up {
    animation: fadeInUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.animate-fade-in {
    animation: fadeIn 1s ease forwards;
}

/* --- Scroll reveal (below-the-fold only, progressive enhancement) --- */
@media (prefers-reduced-motion: no-preference) {
    .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);
    }

    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* When JS is disabled, all content is visible by default (no reveal class applied) */
.no-js .reveal {
    opacity: 1;
    transform: none;
}

/* --- Navbar --- */
.nav-text {
    color: #1a2744;
}

.navbar-scrolled .nav-text {
    color: #1a2744;
}

.navbar-transparent .nav-text {
    color: #ffffff;
}

.navbar-scrolled .nav-link {
    color: #1a2744;
}

.navbar-transparent .nav-link {
    color: rgba(255, 255, 255, 0.7);
}

.navbar-transparent .nav-link:hover {
    color: #c8a45a;
}

.navbar-transparent #menuIcon span {
    background: #ffffff;
}

.navbar-scrolled #menuIcon span {
    background: #1a2744;
}

.navbar-scrolled .mobile-link {
    color: #1a2744;
}

.navbar-transparent .mobile-link {
    color: #ffffff;
}

.navbar-transparent .nav-link:hover {
    color: #c8a45a;
}

.navbar-transparent .nav-link::after {
    background: #c8a45a;
}

/* --- Mobile menu --- */
#mobileMenu {
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.98);
}

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

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

/* --- Subtle line decorations --- */
.section-line {
    position: relative;
}

.section-line::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 48px;
    height: 1px;
    background: #c8a45a;
}

/* --- Flavor card hover effect --- */
.group:hover .group-hover\
:scale-110 {
    transform: scale(1.1);
}

/* --- Input autofill styling --- */
input:-webkit-autofill,
textarea:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px rgba(255, 255, 255, 0.05) inset !important;
    -webkit-text-fill-color: #ffffff !important;
}

/* --- Smooth image loading --- */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* --- Print styles --- */
@media print {
    nav, #contactForm, .reveal {
        display: none !important;
    }
    body {
        color: #000;
        background: #fff;
    }
}
