/* ============================================
   Gracie's Goodies Houston — Custom Styles
   ============================================ */

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

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

body {
    overflow-x: hidden;
}

/* Scroll Reveal — progressive enhancement via JS */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .scroll-reveal {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    .animate-float, .animate-float-delayed, .animate-float-slow {
        animation: none !important;
    }
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Navbar */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #FF6B6B;
    border-radius: 1px;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Navbar scroll state */
nav.scrolled {
    background: rgba(255, 254, 249, 0.92) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

nav.scrolled .nav-logo-text {
    color: #1A1A24 !important;
}

nav.scrolled .nav-link {
    color: #4A4A5C !important;
}

/* Mobile menu */
#mobileMenu {
    animation: slideDown 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* Hero */
#hero {
    position: relative;
}

#hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to top, #FFFEF9, transparent);
    pointer-events: none;
    z-index: 10;
}

/* Product cards */
.group:hover .group-hover\:scale-110 {
    will-change: transform;
}

/* Button focus states */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #FF6B6B;
    outline-offset: 2px;
}

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

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

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

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

/* Selection */
::selection {
    background: #FFD4D4;
    color: #1A1A24;
}

/* Smooth image loading */
img {
    opacity: 1;
    transition: opacity 0.3s ease;
}

img[src] {
    opacity: 1;
}

/* Gallery hover overlay */
.group:hover .group-hover\:opacity-100 {
    will-change: opacity;
}

/* Form inputs */
input::placeholder,
textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

/* Print styles */
@media print {
    nav, #gallery, .animate-float, .animate-float-delayed, .animate-float-slow {
        display: none !important;
    }
    body {
        color: #000;
        background: #fff;
    }
}
