/* ============================================
   Grovemont — Custom Styles
   ============================================ */

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

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

body {
    overflow-x: hidden;
}

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

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

/* --- Menu Tabs --- */
.menu-tab {
    background: transparent;
    border: none;
    cursor: pointer;
}

.menu-tab.active {
    background: #0d9488;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(13, 148, 136, 0.3);
}

.menu-tab:not(.active):hover {
    background: #f0fdfa;
}

/* --- Scroll Reveal --- */
.reveal {
    opacity: 1;
    transform: translateY(0);
    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);
}

/* --- Hero Animations --- */
[data-anim="hero-elem"] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-anim="hero-elem"].animated {
    opacity: 1;
    transform: translateY(0);
}

[data-anim="hero-image"] {
    opacity: 0;
    transform: translateX(32px);
    transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-anim="hero-image"].animated {
    opacity: 1;
    transform: translateX(0);
}

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

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

/* --- Menu Panel --- */
.menu-panel {
    animation: fadeUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

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

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .reveal,
    [data-anim="hero-elem"],
    [data-anim="hero-image"] {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .menu-panel {
        animation: none;
    }
    
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* --- Mobile Responsive --- */
@media (max-width: 767px) {
    .menu-line {
        transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }
    
    .menu-btn.active .menu-line:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .menu-btn.active .menu-line:nth-child(2) {
        opacity: 0;
    }
    
    .menu-btn.active .menu-line:nth-child(3) {
        width: 20px;
        transform: rotate(-45deg) translate(4px, -4px);
    }
}

/* --- Selection --- */
::selection {
    background: #99f6e4;
    color: #134e4a;
}
