/* ============================================
   Dr. Richard Mathis DMD — Custom Styles
   Classic & Elegant Dental Practice
   ============================================ */

/* Base & Reset */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

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

/* Selection Color */
::selection {
    background-color: rgba(13, 67, 37, 0.15);
    color: #0d4325;
}

/* ============================================
   Navbar
   ============================================ */
#navbar.scrolled {
    box-shadow: 0 1px 20px rgba(13, 67, 37, 0.08);
}

/* ============================================
   Hero Section
   ============================================ */
#hero {
    position: relative;
}

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

/* ============================================
   Service Cards
   ============================================ */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #0d4325, #1f8747, #36a85d);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.service-card:hover::before {
    opacity: 1;
}

/* ============================================
   Scroll Reveal Animations
   Progressive enhancement — content is visible
   by default; JS adds animation class.
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                    transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    
    .reveal.revealed {
        opacity: 0;
        transform: translateY(24px);
    }
}

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

input::placeholder,
textarea::placeholder {
    color: #a8a29e;
}

/* ============================================
   Button Focus States
   ============================================ */
button:focus-visible,
a:focus-visible {
    outline: 2px solid #36a85d;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ============================================
   Mobile Menu Transitions
   ============================================ */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

#mobile-menu.open {
    max-height: 400px;
}

/* ============================================
   Decorative Divider
   ============================================ */
.section-divider {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, #0d4325, #36a85d);
    margin: 0 auto;
}

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

/* ============================================
   Utility: Smooth Image Loading
   ============================================ */
img {
    background-color: #e7e5e4;
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    #navbar,
    #mobile-menu-btn,
    .service-card::before {
        display: none !important;
    }
    
    body {
        color: #1c1917;
        background: white;
    }
    
    #hero {
        min-height: auto;
        padding: 2rem 0;
    }
    
    #hero::after {
        display: none;
    }
}
