/* ============================================
   El Dulce Bakery — Custom Styles
   ============================================ */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    background-color: #060c2e;
    color: #ffffff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background-color: rgba(212, 160, 23, 0.3);
    color: #ffffff;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #060c2e;
}
::-webkit-scrollbar-thumb {
    background: rgba(212, 160, 23, 0.3);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 160, 23, 0.5);
}

/* --- Reveal on scroll (progressive enhancement) --- */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Mobile menu transitions --- */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
    opacity: 0;
}
#mobile-menu.open {
    max-height: 500px;
    opacity: 1;
}

/* --- Navbar scrolled state --- */
#site-header.scrolled {
    background-color: rgba(6, 12, 46, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* --- Image hover tilt effect --- */
.group img {
    will-change: transform;
}

/* --- Focus visible styles --- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #f5c92b;
    outline-offset: 2px;
    border-radius: 4px;
}

/* --- Form input autofill --- */
input:-webkit-autofill,
textarea:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #0a1456 inset !important;
    -webkit-text-fill-color: #ffffff !important;
}

/* --- Button press effect --- */
button, a {
    -webkit-tap-highlight-color: transparent;
}

button:active,
a:active {
    transform: scale(0.97);
}

/* --- Print styles --- */
@media print {
    #site-header, #mobile-menu, .reveal {
        display: none !important;
    }
    body {
        background: white;
        color: black;
    }
}
