/* ===== CUSTOM STYLES FOR THE CREAMERY ===== */

/* ---------- Smooth Scroll ---------- */
html {
    scroll-behavior: smooth;
}

/* ---------- Selection ---------- */
::selection {
    background: rgba(212, 168, 75, 0.3);
    color: #f5f0f7;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #1a0d20;
}
::-webkit-scrollbar-thumb {
    background: #5B2C6F;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #7d4f8a;
}

/* ---------- Reveal Animations (progressive enhancement) ---------- */
@media (prefers-reduced-motion: no-preference) {
    .reveal-up {
        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-left {
        opacity: 0;
        transform: translateX(-40px);
        transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .reveal-right {
        opacity: 0;
        transform: translateX(40px);
        transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .reveal-up.revealed,
    .reveal-left.revealed,
    .reveal-right.revealed {
        opacity: 1;
        transform: translate(0, 0);
    }
}

/* ---------- Hero Parallax ---------- */
#hero-bg {
    transition: transform 0.1s linear;
    will-change: transform;
}

/* ---------- Navbar Transition States ---------- */
#navbar.scrolled {
    background: rgba(26, 13, 32, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(91, 44, 111, 0.3);
}

/* ---------- Mobile Menu States ---------- */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

/* ---------- Button Focus ---------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid rgba(212, 168, 75, 0.6);
    outline-offset: 2px;
}

/* ---------- Image Loading ---------- */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* ---------- Subtle Grain Overlay (optional atmosphere) ---------- */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' 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-size: 200px 200px;
    z-index: 9999;
}
