/* ============================================
   Indoor Pool Beauty by RedAwning
   Custom Styles
   ============================================ */

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

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

body {
    overflow-x: hidden;
}

/* Selection */
::selection {
    background-color: rgba(22, 163, 74, 0.2);
    color: #166534;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #15803d;
}

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

#navbar.scrolled {
    background: rgba(250, 249, 245, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(22, 101, 52, 0.08);
}

#navbar.scrolled .font-serif {
    color: #166534 !important;
}

#navbar.scrolled .text-emerald-600 {
    color: #15803d !important;
}

#navbar.scrolled a:not(.bg-emerald-700):not(.bg-emerald-400) {
    color: rgba(22, 101, 52, 0.7) !important;
}

#navbar.scrolled a:not(.bg-emerald-700):not(.bg-emerald-400):hover {
    color: #166534 !important;
}

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

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

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

/* Hamburger */
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

body.menu-open .menu-line:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}

body.menu-open .menu-line:nth-child(2) {
    opacity: 0;
}

body.menu-open .menu-line:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
    width: 5px;
}

/* ============================================
   Scroll Reveal
   ============================================ */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    /* Default state for revealed elements is visible */
    .scroll-reveal {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Hover Effects
   ============================================ */
a {
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .font-serif {
        line-height: 1.15;
    }
}

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