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

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

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(255, 193, 7, 0.3);
    color: #f5f0f8;
}

/* ── Scroll Reveal (progressive enhancement) ── */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }

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

    .reveal:nth-child(2) { transition-delay: 0.1s; }
    .reveal:nth-child(3) { transition-delay: 0.2s; }
    .reveal:nth-child(4) { transition-delay: 0.3s; }
}

/* Fallback: ensure content is visible without JS */
.no-js .reveal,
.js .reveal {
    opacity: 1;
    transform: none;
}

/* ── Navbar ── */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(22, 10, 22, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(122, 61, 122, 0.2);
    box-shadow: 0 4px 40px rgba(0, 0, 0, 0.3);
}

/* ── Mobile Menu ── */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

#mobileMenu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

#mobileMenu.open .mobile-link:nth-child(1) { transition-delay: 0.05s; }
#mobileMenu.open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.2s; }

/* ── Menu Button Animation ── */
#menuBtn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menuBtn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 1.25rem;
    margin-left: 0;
}

/* ── Button Focus States ── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #ffc107;
    outline-offset: 2px;
}

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

::-webkit-scrollbar-track {
    background: #160a16;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #7a3d7a;
}

/* ── Plant Card Tilt on Hover ── */
.group:hover .aspect-\[4\/3\] img {
    filter: brightness(1.05);
}

/* ── Smooth Image Loading ── */
img {
    background-color: #231123;
}

/* ── Select Dropdown Fix ── */
select option {
    background: #2d1a2d;
    color: #e8dce8;
}

/* ── Map Inversion Override ── */
iframe[title="Bloom Nursery location map"] {
    border-radius: 0 0 20px 20px;
}
