/* ===== Custom Styles for PINE Bakery ===== */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #040a14;
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #fbbf24, #14b8a6);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #fcd34d, #2dd4bf);
}

/* Selection color */
::selection {
    background: rgba(251, 191, 36, 0.3);
    color: #fcd34d;
}

/* ===== Navigation ===== */
.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, #fbbf24, transparent);
    transition: width 0.3s ease;
}
.nav-link:hover::after {
    width: 100%;
}

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(4, 10, 20, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid rgba(251, 191, 36, 0.1) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3) !important;
}

/* ===== Mobile Menu ===== */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
}
.mobile-menu-open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}
.mobile-menu-open .mobile-link:nth-child(1) { transition-delay: 0.05s; }
.mobile-menu-open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
.mobile-menu-open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
.mobile-menu-open .mobile-link:nth-child(4) { transition-delay: 0.2s; }
.mobile-menu-open .mobile-link:nth-child(5) { transition-delay: 0.25s; }

/* Menu button active state */
#menuBtn.active #bar1 {
    transform: rotate(45deg) translate(3px, 3px);
}
#menuBtn.active #bar2 {
    opacity: 0;
}
#menuBtn.active #bar3 {
    transform: rotate(-45deg) translate(3px, -3px);
    width: 1.5rem;
}

/* ===== Reveal Animations ===== */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: no-preference) {
    .reveal-up {
        transform: translateY(40px);
        opacity: 0;
        transition: opacity 0.8s ease, transform 0.8s ease;
    }
    .reveal-left {
        transform: translateX(-40px);
        opacity: 0;
        transition: opacity 0.8s ease, transform 0.8s ease;
    }
    .reveal-right {
        transform: translateX(40px);
        opacity: 0;
        transition: opacity 0.8s ease, transform 0.8s ease;
    }
    
    .reveal-up.revealed,
    .reveal-left.revealed,
    .reveal-right.revealed {
        opacity: 1;
        transform: translate(0);
    }
}

/* ===== Gold shimmer on hover ===== */
@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

/* ===== Button hover glow ===== */
button:hover,
a:hover {
    transition: all 0.3s ease;
}

/* ===== Form focus states ===== */
input:focus,
textarea:focus {
    box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.2);
}

/* ===== Image hover effects ===== */
img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ===== Section dividers ===== */
section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 5%;
    right: 5%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(251, 191, 36, 0.2), transparent);
}

/* ===== Card hover effects ===== */
.border-l-2 {
    transition: border-color 0.3s ease;
}
.border-l-2:hover {
    border-color: rgba(251, 191, 36, 0.8);
}

/* ===== Responsive adjustments ===== */
@media (max-width: 768px) {
    .font-serif {
        line-height: 1.2;
    }
}

/* ===== Subtle grain overlay (optional texture) ===== */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.015;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    z-index: 9999;
}
