/* ============================================
   MacNeal Healthcare — Custom Styles
   ============================================ */

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

body {
    overflow-x: hidden;
}

::selection {
    background-color: #2D5A3D;
    color: #F5F3EE;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #F5F3EE;
}
::-webkit-scrollbar-thumb {
    background: #93b89f;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #3d6345;
}

/* ============================================
   Scroll Reveal Animations
   Progressive enhancement — content visible
   by default; JS adds the animation class.
   ============================================ */
.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);
}

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

/* Reduced motion: disable all transitions */
@media (prefers-reduced-motion: reduce) {
    .reveal,
    .reveal.revealed {
        opacity: 1;
        transform: none;
        transition: none;
    }
    html {
        scroll-behavior: auto;
    }
    * {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

/* ============================================
   Navbar
   ============================================ */
#navbar.scrolled {
    background-color: rgba(245, 243, 238, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(45, 90, 61, 0.08);
}

#navbar.scrolled .font-serif,
#navbar.scrolled .text-forest-900 {
    color: #1c3a27;
}

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

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

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

/* Hamburger animation */
.menu-line {
    display: block;
    width: 20px;
    height: 2px;
    background-color: #2D5A3D;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#menuBtn.active .menu-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menuBtn.active .menu-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ============================================
   Hero
   ============================================ */
#top {
    position: relative;
}

/* ============================================
   Cards & Interactive Elements
   ============================================ */
a, button {
    -webkit-tap-highlight-color: transparent;
}

/* ============================================
   Form
   ============================================ */
input:focus,
textarea:focus {
    outline: none;
}

input::placeholder,
textarea::placeholder {
    color: #93b89f;
}

/* ============================================
   Utility
   ============================================ */
.font-serif {
    letter-spacing: -0.01em;
}

/* Subtle parallax on hero image */
.hero-bg {
    will-change: transform;
}

/* ============================================
   Responsive adjustments
   ============================================ */
@media (max-width: 768px) {
    .font-serif {
        letter-spacing: 0;
    }
}
