/* ============================================
   KINGS COTTON CANDY STAND — Custom Styles
   ============================================ */

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

body {
    overflow-x: hidden;
}

/* Selection */
::selection {
    background-color: #7B2D3B;
    color: #FDF8F5;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #F5EDE6;
}
::-webkit-scrollbar-thumb {
    background: #c73a56;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #7B2D3B;
}

/* Reveal Animations */
.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);
}

.reveal[data-reveal-state="hidden"] {
    opacity: 0;
    transform: translateY(32px);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(32px);
    }
    .reveal[data-reveal-state="visible"] {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navbar */
.nav-scrolled {
    background: rgba(253, 248, 245, 0.92) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(123, 45, 59, 0.08);
}

.nav-transparent {
    background: transparent !important;
    box-shadow: none !important;
}

/* Mobile Menu */
.mobile-menu-open {
    opacity: 1 !important;
    pointer-events: auto !important;
}

.mobile-link {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

.mobile-menu-open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu-open .mobile-link:nth-child(1) { transition-delay: 0.05s; }
.mobile-menu-open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
.mobile-menu-open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
.mobile-menu-open .mobile-link:nth-child(4) { transition-delay: 0.2s; }
.mobile-menu-open .mobile-link:nth-child(5) { transition-delay: 0.25s; }

/* Hamburger */
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.menu-open .menu-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}
.menu-open .menu-line:nth-child(2) {
    opacity: 0;
}
.menu-open .menu-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
    width: 1.5rem;
}

/* Image hover */
img {
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Button focus */
a:focus-visible, button:focus-visible {
    outline: 2px solid #7B2D3B;
    outline-offset: 2px;
    border-radius: 0.5rem;
}

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

/* Print */
@media print {
    nav, .reveal {
        display: block !important;
        opacity: 1 !important;
    }
}
