/* ========================================
   Broccoli Tree Furniture — Custom Styles
   ======================================== */

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

body {
    overflow-x: hidden;
}

/* Selection Color */
::selection {
    background-color: #0d9488;
    color: #f5f5f4;
}

/* ========================================
   Navigation
   ======================================== */
#navbar {
    background: transparent;
    transition: background-color 0.5s ease, box-shadow 0.5s ease;
}

#navbar.scrolled {
    background-color: rgba(250, 250, 247, 0.97);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.nav-logo-text {
    color: #0f172a;
    transition: color 0.5s ease;
}

.nav-subtitle {
    color: #0d9488;
    transition: color 0.5s ease;
}

#navbar.scrolled .nav-logo-text {
    color: #0f172a;
}

#navbar.scrolled .nav-subtitle {
    color: #0d9488;
}

.nav-link {
    position: relative;
}

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

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

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

#mobile-menu.close {
    opacity: 0;
    pointer-events: none;
}

.menu-line {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

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

#menu-btn.active .menu-line:nth-child(3) {
    width: 24px;
    transform: rotate(-45deg) translate(4px, -4px);
}

/* ========================================
   Hero Animations
   ======================================== */
.hero-anim {
    opacity: 1;
    animation: heroFadeUp 0.8s ease forwards;
}

.hero-anim:nth-child(1) { animation-delay: 0.2s; }
.hero-anim:nth-child(2) { animation-delay: 0.4s; }
.hero-anim:nth-child(3) { animation-delay: 0.6s; }
.hero-anim:nth-child(4) { animation-delay: 0.8s; }

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

/* ========================================
   Scroll Reveal (Below Fold Only)
   ======================================== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }

    .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: always visible if JS disabled or reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* ========================================
   Image Hover Effects
   ======================================== */
.group:hover .group-hover\:scale-105 {
    transform: scale(1.05);
}

/* ========================================
   Button Focus States
   ======================================== */
button:focus-visible,
a:focus-visible {
    outline: 2px solid #0d9488;
    outline-offset: 2px;
}

/* ========================================
   Input Focus Styles
   ======================================== */
input:focus,
textarea:focus,
select:focus {
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

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

/* ========================================
   Subtle Parallax on Hero
   ======================================== */
@media (prefers-reduced-motion: no-preference) {
    #hero {
        will-change: transform;
    }
}

/* ========================================
   Map Grayscale Override
   ======================================== */
iframe[src*="google.com/maps"] {
    filter: grayscale(20%) contrast(1.05) brightness(1.02);
}

/* ========================================
   Scrollbar Styling
   ======================================== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f5f5f4;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    #navbar,
    #menu-btn,
    .reveal {
        display: none !important;
    }

    body {
        color: #000;
        background: #fff;
    }

    a {
        color: #000;
    }
}
