/* ============================================
   Jeica's Bakery — Custom Styles
   ============================================ */

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

body {
    overflow-x: hidden;
}

/* Selection Color */
::selection {
    background-color: #c43d52;
    color: #fff;
}

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

#navbar.scrolled {
    background-color: rgba(254, 253, 251, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(132, 38, 48, 0.08);
}

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

#mobile-menu.open #bar1 {
    transform: translateY(6px) rotate(45deg);
}

#mobile-menu.open #bar2 {
    opacity: 0;
}

#mobile-menu.open #bar3 {
    transform: translateY(-6px) rotate(-45deg);
    width: 1.5rem;
}

.mobile-link {
    opacity: 0;
    transform: translateY(12px);
    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.08s; }
#mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.14s; }
#mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.20s; }
#mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.26s; }
#mobile-menu.open .mobile-link:nth-child(5) { transition-delay: 0.32s; }

/* ============================================
   Hero Animations
   ============================================ */
.hero-content {
    opacity: 0;
    transform: translateY(30px);
    animation: heroFadeIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
}

.hero-images {
    opacity: 0;
    transform: translateY(20px);
    animation: heroFadeIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.4s forwards;
}

@keyframes heroFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Scroll Reveal Animations
   (Progressive enhancement — content is visible without JS)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(32px);
        transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    }

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

    /* Stagger children */
    .reveal-stagger > * {
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1),
                    transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .reveal-stagger.revealed > *:nth-child(1) { transition-delay: 0.05s; }
    .reveal-stagger.revealed > *:nth-child(2) { transition-delay: 0.12s; }
    .reveal-stagger.revealed > *:nth-child(3) { transition-delay: 0.19s; }
    .reveal-stagger.revealed > *:nth-child(4) { transition-delay: 0.26s; }
    .reveal-stagger.revealed > *:nth-child(5) { transition-delay: 0.33s; }

    .reveal-stagger.revealed > * {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Image Hover Effects
   ============================================ */
img {
    max-width: 100%;
    height: auto;
}

/* ============================================
   Form Focus Styles
   ============================================ */
input:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(244, 163, 184, 0.3);
}

/* ============================================
   Button Ripple / Press Effect
   ============================================ */
button, a {
    -webkit-tap-highlight-color: transparent;
}

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

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

::-webkit-scrollbar-thumb {
    background: #f4a3b8;
    border-radius: 999px;
}

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

/* ============================================
   Print Styles
   ============================================ */
@media print {
    #navbar, #mobile-menu, #contact-form, .reveal {
        display: none !important;
    }
    body {
        background: white;
        color: #1a1a1a;
    }
}
