/* =============================================
   The Bakery Next Door — Custom Styles
   Bold editorial aesthetic · Terracotta + Sand
   ============================================= */

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

body {
    overflow-x: hidden;
}

::selection {
    background-color: #d96035;
    color: #faf6f0;
}

/* --- Hero Badge Animation --- */
.hero-badge {
    animation: fadeInDown 0.8s ease-out both;
}

/* --- Nav Link Underline --- */
.nav-link {
    position: relative;
}

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

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

/* --- Navbar Scrolled State --- */
.navbar-scrolled {
    background-color: rgba(250, 246, 240, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

.navbar-scrolled .nav-link {
    color: #574d44 !important;
}

.navbar-scrolled .font-serif,
.navbar-scrolled span:first-child {
    color: #473f38 !important;
}

/* --- Reveal Animations --- */
.reveal-up,
.reveal-left,
.reveal-right {
    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);
}

.reveal-up {
    transform: translateY(0);
}

.reveal-left {
    transform: translateX(0);
}

.reveal-right {
    transform: translateX(0);
}

/* Reduced motion — keep everything visible */
@media (prefers-reduced-motion: reduce) {
    .reveal-up,
    .reveal-left,
    .reveal-right {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* --- Mobile Link Styles --- */
.mobile-link {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.mobile-menu-open .mobile-link {
    animation: fadeInUp 0.4s ease forwards;
    opacity: 0;
}

.mobile-menu-open .mobile-link:nth-child(1) { animation-delay: 0.05s; }
.mobile-menu-open .mobile-link:nth-child(2) { animation-delay: 0.1s; }
.mobile-menu-open .mobile-link:nth-child(3) { animation-delay: 0.15s; }
.mobile-menu-open .mobile-link:nth-child(4) { animation-delay: 0.2s; }
.mobile-menu-open .mobile-link:nth-child(5) { animation-delay: 0.25s; }

/* --- Keyframes --- */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* --- Form Styles --- */
input:focus,
textarea:focus {
    outline: none;
    border-color: #d96035;
    box-shadow: 0 0 0 3px rgba(217, 96, 53, 0.15);
}

/* --- Subtle Hover Lift for Cards --- */
.reveal-up:hover {
    transform: translateY(-2px);
    transition: transform 0.3s ease;
}

/* --- Print Styles --- */
@media print {
    nav, .reveal-up, .reveal-left, .reveal-right {
        opacity: 1 !important;
        transform: none !important;
    }
}
