/* ============================================
   Xtreme Tans — Custom Styles
   ============================================ */

/* Base & Typography */
html {
    scroll-behavior: smooth;
}

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

/* Selection */
::selection {
    background: #065f46;
    color: #fefdf8;
}

/* ============================================
   Hero Animations
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

/* ============================================
   Scroll Reveal (Progressive Enhancement)
   Only active when JS is available and
   prefers-reduced-motion is not set to reduce
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s ease-out, transform 0.7s ease-out;
    }

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

/* When JS is disabled, all content stays visible */
.no-js .scroll-reveal {
    opacity: 1;
    transform: translateY(0);
}

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

#navbar.scrolled {
    background: rgba(254, 253, 248, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(6, 78, 59, 0.08);
}

.nav-link {
    color: #065f46;
}

.nav-link:hover {
    color: #059669;
}

/* ============================================
   Mobile Menu
   ============================================ */
.mobile-nav-link {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

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

/* Hamburger animation */
#menu-icon.active #bar1 {
    transform: rotate(45deg) translate(4px, 4px);
}

#menu-icon.active #bar2 {
    opacity: 0;
}

#menu-icon.active #bar3 {
    transform: rotate(-45deg) translate(4px, -4px);
}

/* ============================================
   Buttons & Links
   ============================================ */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #059669;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ============================================
   Cards & Elevation
   ============================================ */
.rounded-2xl {
    border: 1px solid rgba(6, 95, 70, 0.06);
}

/* ============================================
   Form Styles
   ============================================ */
input::placeholder,
textarea::placeholder {
    color: #a7f3d0;
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23065f46' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #047857;
}

/* ============================================
   Utility
   ============================================ */
.glass {
    background: rgba(254, 253, 248, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 767px) {
    .rounded-2xl {
        border-radius: 1rem;
    }
}
