/* ============================================
   Access Health Labs — Custom Styles
   ============================================ */

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

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(94, 234, 212, 0.2);
    color: #0A2540;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #0A2540;
}
::-webkit-scrollbar-thumb {
    background: #2A5A8F;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #5EEAD4;
}

/* --- Reveal Animations --- */
.reveal-item {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Default state for reduced motion — always visible */
@media (prefers-reduced-motion: no-preference) {
    .reveal-item {
        opacity: 0;
        transform: translateY(24px);
    }
    .reveal-item.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(10, 37, 64, 0.06);
}

#navbar.scrolled .font-display,
#navbar.scrolled .font-sans {
    color: #0A2540;
}

#navbar.scrolled .menu-line {
    background: #0A2540;
}

#navbar.scrolled a:not([class*="bg-"]):not([class*="text-white"]) {
    color: #152D48;
}

#navbar.scrolled a:not([class*="bg-"]):not([class*="text-white"]):hover {
    color: #0A2540;
}

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

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

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

/* --- Menu Button Animation --- */
.menu-btn.active .menu-line:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}
.menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.menu-btn.active .menu-line:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
    width: 1.25rem;
}

/* --- Hero --- */
#hero {
    position: relative;
}

#hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to top, white, transparent);
    pointer-events: none;
}

/* --- Service Cards Hover --- */
.group:hover .w-12 {
    transform: scale(1.05);
}

/* --- Form --- */
select option {
    color: #152D48;
    background: #ffffff;
}

/* --- Print --- */
@media print {
    #navbar, #mobile-menu, .reveal-item {
        opacity: 1 !important;
        transform: none !important;
    }
}
