/* ============================================
   Sugar Creek Snowy & Sweet Shop — Custom Styles
   ============================================ */

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

body {
    background-color: #0d0b14;
    color: #f5f0eb;
}

/* Selection */
::selection {
    background: rgba(245, 158, 11, 0.3);
    color: #f5f0eb;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0d0b14;
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #9d174d, #f59e0b);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #be185d, #fbbf24);
}

/* Gold shimmer line animation */
@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

/* Navbar scroll state */
nav.scrolled {
    background: rgba(13, 11, 20, 0.92) !important;
    backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid rgba(245, 158, 11, 0.1);
    box-shadow: 0 4px 40px rgba(0, 0, 0, 0.4);
}

nav.scrolled .faux-logo-ring {
    border-color: rgba(245, 158, 11, 0.3);
}

/* Hero decorative elements */
.hero-glow-1 {
    animation: float-slow 8s ease-in-out infinite;
}
.hero-glow-2 {
    animation: float-slow 10s ease-in-out infinite reverse;
}

@keyframes float-slow {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-20px) scale(1.05); }
}

/* Gold accent pulse */
@keyframes gold-pulse {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* Scroll reveal base — content is VISIBLE by default */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Scroll reveal — applied via JS only (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
    .reveal.hidden-reveal {
        opacity: 0;
        transform: translateY(32px);
    }
    .reveal.delay-1 { transition-delay: 0.1s; }
    .reveal.delay-2 { transition-delay: 0.2s; }
    .reveal.delay-3 { transition-delay: 0.3s; }
    .reveal.delay-4 { transition-delay: 0.4s; }
}

/* Image hover effects */
img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Card hover lift */
.group:hover .group-hover\:scale-105 {
    transform: scale(1.05);
}

/* Link underline animation */
a {
    text-decoration: none;
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #f59e0b;
    outline-offset: 4px;
    border-radius: 4px;
}

/* Mobile menu transition */
#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 hover */
.mobile-link {
    display: block;
    padding: 4px 0;
}

/* Subtle grain texture overlay (optional, very subtle) */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.015;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}
