/* ============================================
   Jonathan Keith Medical & Health
   Custom Styles
   ============================================ */

/* ---- Reset & 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 {
    background: rgba(201, 168, 76, 0.2);
    color: #0a1628;
}

/* ---- Scroll Reveal (progressive enhancement) ---- */
@media (prefers-reduced-motion: no-preference) {
    .reveal-on-scroll {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                    transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

    .reveal-on-scroll.is-visible {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fallback: ensure content is visible even if JS fails */
.reveal-on-scroll {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: no-preference) {
    .reveal-on-scroll {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                    transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Navbar ---- */
#navbar {
    background: rgba(255, 255, 255, 0);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
}

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

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

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

.mobile-link {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

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

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

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

/* ---- Form focus states ---- */
input:focus, textarea:focus {
    outline: none;
    border-color: #c9a84c !important;
    box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.1);
}

/* ---- Subtle hover for service cards ---- */
.group:hover .group-hover\:bg-gold-500\/20 {
    background-color: rgba(201, 168, 76, 0.2);
}

/* ---- Image hover effects ---- */
img {
    display: block;
    max-width: 100%;
}

/* ---- Utility ---- */
.text-shadow {
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

/* ---- Print styles ---- */
@media print {
    #navbar, #mobileMenu {
        display: none !important;
    }
    body {
        color: #000;
        background: #fff;
    }
}
