/* ========================================
   Flowers Evangeline Maid Bread
   Custom Styles & Animations
   ======================================== */

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

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

body {
    overflow-x: hidden;
}

/* Selection Color */
::selection {
    background-color: #fce7eb;
    color: #6e1a3b;
}

/* ========================================
   Hero Animations
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.animate-fade-in {
    animation-name: fadeIn;
    animation-duration: 0.8s;
    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    animation-fill-mode: forwards;
    opacity: 0;
}

/* ========================================
   Scroll Reveal Animations
   Progressive enhancement: content is
   visible by default, animated via JS
   ======================================== */
.reveal-on-scroll {
    /* Default: visible — works without JS */
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Animated state (added by JS) */
.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Pre-animation state (added by JS only) */
@media (prefers-reduced-motion: no-preference) {
    .reveal-on-scroll.is-hidden {
        opacity: 0;
        transform: translateY(40px);
    }
}

/* Reduced motion: never hide content */
@media (prefers-reduced-motion: reduce) {
    .reveal-on-scroll.is-hidden {
        opacity: 1;
        transform: translateY(0);
    }
    .animate-fade-in {
        animation: none;
        opacity: 1;
    }
}

/* ========================================
   Navbar Scroll State
   ======================================== */
.navbar-scrolled {
    background-color: rgba(254, 252, 246, 0.95) !important;
    backdrop-filter: blur(12px) !important;
    box-shadow: 0 1px 20px rgba(110, 26, 59, 0.06);
}

/* ========================================
   Mobile Menu
   ======================================== */
#mobile-menu {
    animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-link {
    position: relative;
}

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

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

/* ========================================
   Smooth Image Loading
   ======================================== */
img {
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* ========================================
   Focus States for Accessibility
   ======================================== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #a11d3f;
    outline-offset: 2px;
    border-radius: 4px;
}

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

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

::-webkit-scrollbar-thumb {
    background: #f3a8b5;
    border-radius: 4px;
}

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

/* ========================================
   Utility: Subtle hover lift for cards
   ======================================== */
.hover-lift {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-4px);
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    header, footer, #contact, .reveal-on-scroll {
        opacity: 1 !important;
        transform: none !important;
    }
    
    #navbar {
        position: static !important;
    }
}
