/* ============================================
   Pashia's Sweet Treats — Custom Styles
   ============================================ */

/* --- Base & Typography --- */
html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

::selection {
    background-color: #d9a8b8;
    color: #4b202f;
}

/* --- Navbar --- */
#navbar {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(250, 245, 247, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(107, 45, 67, 0.08);
}

#navbar.scrolled .font-display {
    color: #8b3d56;
}

#navbar.scrolled a:not(.px-6) {
    color: #6e2d43;
}

#navbar.scrolled a:not(.px-6):hover {
    color: #8b3d56;
}

/* --- Floating Cards Animation --- */
@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-12px) rotate(1deg);
    }
}

@keyframes float-delayed {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-8px) rotate(-1deg);
    }
}

.floating-card {
    animation: float 4s ease-in-out infinite;
}

.floating-card.animate-float-delayed {
    animation: float-delayed 5s ease-in-out infinite;
    animation-delay: 1s;
}

.floating-card:nth-child(3) {
    animation: float 4.5s ease-in-out infinite;
    animation-delay: 0.5s;
}

/* --- Menu Cards --- */
.menu-card {
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.5s ease;
}

.menu-card:hover {
    transform: translateY(-6px);
}

/* --- Gallery Items --- */
.gallery-item {
    cursor: pointer;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.5s ease;
}

.gallery-item:hover {
    transform: scale(1.02);
    box-shadow: 0 20px 40px rgba(107, 45, 67, 0.2);
}

/* --- Mobile Menu --- */
#mobileMenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    opacity: 0;
}

#mobileMenu.open {
    max-height: 400px;
    opacity: 1;
}

.mobile-link {
    position: relative;
}

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #d97706;
    transition: width 0.3s ease;
}

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

/* --- Scroll Reveal (progressive enhancement) --- */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    }

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

    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
}

/* --- Button Focus States --- */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid #d9a8b8;
    outline-offset: 2px;
}

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

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

::-webkit-scrollbar-thumb {
    background: #d9a8b8;
    border-radius: 5px;
}

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

/* --- Select Dropdown --- */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238b3d56' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
    appearance: none;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
    .floating-card {
        display: none;
    }

    #hero {
        min-height: auto;
        padding-top: 100px;
        padding-bottom: 60px;
    }

    .gallery-item {
        height: 200px;
    }
}

@media (max-width: 640px) {
    .gallery-item {
        height: 160px;
    }
}

/* --- Print Styles --- */
@media print {
    #navbar,
    .floating-card,
    .animate-bounce {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }
}
