/* ========================================
   JP Bakery — Custom Styles
   Premium Dark Luxury Theme
   Burgundy + Blush + Gold Accents
======================================== */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0E0A0A;
}
::-webkit-scrollbar-thumb {
    background: #6B1D2A;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #8C2A3A;
}

/* ---- Selection ---- */
::selection {
    background: #6B1D2A;
    color: #F5E6E3;
}

/* ---- Scroll Indicator Animation ---- */
@keyframes scrollIndicator {
    0% {
        top: 0;
        opacity: 1;
    }
    100% {
        top: 100%;
        opacity: 0;
    }
}

.animate-scroll-indicator {
    animation: scrollIndicator 1.5s ease-in-out infinite;
}

/* ---- Scroll Reveal Animations ---- */
/* Content is visible by default; JS adds animated state progressively */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 1;
    transform: none;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

/* When JS adds the 'revealed' class, animate */
.reveal-up.revealed {
    opacity: 1;
    transform: translateY(0);
}

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

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

/* Initial state for animated elements — only applied via JS for progressive enhancement */
@media (prefers-reduced-motion: no-preference) {
    .reveal-up {
        opacity: 0;
        transform: translateY(40px);
    }
    .reveal-left {
        opacity: 0;
        transform: translateX(-40px);
    }
    .reveal-right {
        opacity: 0;
        transform: translateX(40px);
    }
}

/* ---- Navbar Scroll State ---- */
.navbar-scrolled {
    background: rgba(14, 10, 10, 0.95) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(201, 168, 76, 0.1);
}

.navbar-scrolled .nav-link {
    color: #F0E0DD;
}

.navbar-scrolled .nav-link:hover {
    color: #C9A84C;
}

/* ---- Mobile Menu States ---- */
.mobile-menu-open {
    opacity: 1 !important;
    pointer-events: all !important;
}

/* Hamburger animation */
#bar1.open {
    transform: translateY(5px) rotate(45deg);
}
#bar2.open {
    opacity: 0;
}
#bar3.open {
    transform: translateY(-5px) rotate(-45deg);
    width: 1.5rem;
}

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

/* ---- Focus Styles ---- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #C9A84C;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ---- Button Ripple Effect (subtle) ---- */
button, a {
    position: relative;
    overflow: visible;
}

/* ---- Custom Select Arrow ---- */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23C9A84C' 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 1rem center;
    padding-right: 2.5rem;
}

/* ---- Gold Accent Divider ---- */
.gold-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, #C9A84C, transparent);
}

/* ---- Card Hover Glow ---- */
.glow-hover:hover {
    box-shadow: 0 0 40px rgba(107, 29, 42, 0.3);
}

/* ---- Responsive Adjustments ---- */
@media (max-width: 768px) {
    html {
        scroll-padding-top: 70px;
    }
    
    #hero h1 {
        font-size: 2.5rem;
    }
    
    #hero h1 span {
        font-size: 1.75rem;
    }
    
    .floating-card {
        position: relative;
        bottom: auto;
        left: auto;
        margin-top: 1rem;
    }
}

/* ---- Print Styles ---- */
@media print {
    nav, #contact, footer {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
}
