/* ============================================
   Professional Dental — Custom Styles
   ============================================ */

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

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(13, 148, 136, 0.15);
    color: #134e4a;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #f8fafc;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* --- Navbar --- */
#navbar {
    transition: background-color 0.5s ease, box-shadow 0.5s ease, backdrop-filter 0.5s ease;
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

#navbar.scrolled .nav-logo-text {
    color: #1e293b;
}

#navbar.scrolled .nav-link {
    color: rgba(30, 41, 59, 0.7);
}

#navbar.scrolled .nav-link:hover {
    color: #0d9488;
}

#navbar.scrolled .mobile-nav-link {
    color: #1e293b;
}

/* --- Hero --- */
.hero-eyebrow {
    animation: fadeDown 0.8s ease forwards;
}

/* --- Scroll Indicator --- */
.scroll-indicator {
    animation: float 2.5s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}

/* --- Stat Cards --- */
.stat-card {
    animation: slideInRight 0.8s ease forwards;
    opacity: 0;
}

.stat-card:nth-child(2) {
    animation-delay: 0.2s;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* --- Service Cards --- */
.service-card {
    opacity: 1;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.06);
}

.service-icon-wrap {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: rgba(13, 148, 136, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.service-card:hover .service-icon-wrap {
    background: rgba(13, 148, 136, 0.14);
}

/* --- Reveal Animations (below the fold only) --- */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* Reduced motion */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
    }

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

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: translateY(0);
    }

    html {
        scroll-behavior: auto;
    }

    .scroll-indicator {
        animation: none;
    }

    .stat-card {
        opacity: 1;
        transform: translateX(0);
    }
}

/* --- Mobile Menu --- */
#mobile-menu {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#mobile-menu.open {
    transform: translateX(0);
}

/* --- Contact Form --- */
input:focus,
textarea:focus {
    border-color: #0d9488 !important;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.08);
    outline: none;
}

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

/* --- Button Hover Glow --- */
button[type="submit"]:hover {
    box-shadow: 0 10px 40px rgba(13, 148, 136, 0.25) !important;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .font-serif {
        font-size: clamp(2rem, 8vw, 3rem);
    }
}
