/* ========================================
   Dental America — Custom Styles
   Classic & Elegant Design System
   ======================================== */

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

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

body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
}

::selection {
    background-color: rgba(52, 151, 126, 0.2);
    color: #0f1933;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0f1933;
}

::-webkit-scrollbar-thumb {
    background: #25376e;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #34977e;
}

/* ---------- Scroll Animations ---------- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    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: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ---------- 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;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
    }
    
    .animate-bounce-slow {
        animation: none;
    }
}

/* ---------- Navbar Scroll State ---------- */
#navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(15, 25, 51, 0.08);
}

#navbar.scrolled .font-serif {
    color: #0f1933 !important;
}

#navbar.scrolled .text-midnight-500,
#navbar.scrolled .text-[10px] {
    color: #3d56a8 !important;
}

#navbar.scrolled .mobile-nav-link {
    color: #0f1933 !important;
}

/* ---------- Hero ---------- */
.animate-bounce-slow {
    animation: bounceSlow 2.5s ease-in-out infinite;
}

@keyframes bounceSlow {
    0%, 100% { transform: translate(-50%, 0); }
    50% { transform: translate(-50%, 8px); }
}

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

.service-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #34977e, #87d5bc);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.service-card:hover::after {
    transform: scaleX(1);
}

/* ---------- Form Focus States ---------- */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

/* ---------- Button Hover Glow ---------- */
button:hover {
    box-shadow: 0 8px 30px rgba(52, 151, 126, 0.25);
}

/* ---------- Image Hover ---------- */
.rounded-2xl.overflow-hidden img {
    will-change: transform;
}

/* ---------- Print Styles ---------- */
@media print {
    #navbar, #contact, .animate-bounce-slow {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff !important;
    }
    
    .bg-midnight-950, .bg-midnight-900 {
        background: #fff !important;
        color: #000 !important;
    }
}
