/* ========================================
   Pete's Plants — Custom Styles
   Premium Dark Luxury Theme
   ======================================== */

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #060E14;
}
::-webkit-scrollbar-thumb {
    background: #1A2D3F;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #2A4055;
}

/* --- Selection --- */
::selection {
    background: rgba(212, 160, 23, 0.3);
    color: #F5F0E8;
}

/* --- Base Typography --- */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

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

/* --- Navbar Transition States --- */
#navbar {
    background: transparent;
    transition: background-color 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
    background: rgba(6, 14, 20, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(212, 160, 23, 0.1), 0 4px 30px rgba(0, 0, 0, 0.3);
}

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

.mobile-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s 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.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; }

/* --- Hamburger Animation --- */
#menu-btn[aria-expanded="true"] .menu-line:nth-child(1) {
    top: 13px;
    transform: rotate(45deg);
}
#menu-btn[aria-expanded="true"] .menu-line:nth-child(2) {
    opacity: 0;
}
#menu-btn[aria-expanded="true"] .menu-line:nth-child(3) {
    top: 13px;
    width: 5;
    transform: rotate(-45deg);
    left: 10px;
}

/* --- Gold Glow Button Hover --- */
button[type="submit"]:hover,
a[href="tel:+15703966409"]:hover {
    transform: translateY(-1px);
}

/* --- Card Tilt Effect (subtle) --- */
.group {
    will-change: transform;
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* --- Fade-in Animations (progressive enhancement) --- */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* --- Mobile-specific adjustments --- */
@media (max-width: 639px) {
    html {
        scroll-padding-top: 72px;
    }

    #navbar {
        background: rgba(6, 14, 20, 0.95);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
    }
}

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

/* --- Image lazy-load fallback --- */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.5s ease;
}
img[loading="lazy"].loaded {
    opacity: 1;
}
