/* ========================================
   Opelika Pediatrics & Family Clinic PC
   Custom Styles
======================================== */

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

body {
    overflow-x: hidden;
}

/* Selection color */
::selection {
    background: rgba(240, 96, 64, 0.15);
    color: #1a1f28;
}

/* ========================================
   Animations
======================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scrollLine {
    0% {
        top: -16px;
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    80% {
        opacity: 1;
    }
    100% {
        top: 48px;
        opacity: 0;
    }
}

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

.animate-scroll-line {
    animation: scrollLine 2s ease-in-out infinite;
}

/* ========================================
   Scroll Reveal
   Progressive enhancement — content is
   visible by default; JS adds the animation.
======================================== */
@media (prefers-reduced-motion: no-preference) {
    .reveal-on-scroll {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }
    
    .reveal-on-scroll.revealed {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }
}

/* ========================================
   Navbar scroll state
======================================== */
#navbar.scrolled {
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

/* ========================================
   Form focus states
======================================== */
input:focus,
textarea:focus {
    border-color: #f06040 !important;
    box-shadow: 0 0 0 3px rgba(240, 96, 64, 0.1) !important;
    outline: none;
}

/* ========================================
   Smooth image loading
======================================== */
img {
    background-color: #f6f6f7;
}

/* ========================================
   Mobile menu transition
======================================== */
#mobile-menu {
    animation: fadeIn 0.2s ease;
}

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

/* ========================================
   Utility overrides
======================================== */
.font-serif {
    font-family: 'Cormorant Garamond', Georgia, serif;
}

.font-sans {
    font-family: 'Inter', system-ui, sans-serif;
}
