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

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(148, 26, 64, 0.15);
    color: #3a0c1c;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FDF8F5;
}
::-webkit-scrollbar-thumb {
    background: #e8c4d0;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #c9a0b0;
}

/* ===== Navbar ===== */
#navbar {
    background: rgba(253, 248, 245, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(148, 26, 64, 0.06);
}

#navbar.scrolled {
    background: rgba(253, 248, 245, 0.95);
    box-shadow: 0 1px 20px rgba(58, 12, 28, 0.06);
}

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

#mobile-menu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

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

/* ===== 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, #941A40, #D93D6E);
    opacity: 0;
    transition: opacity 0.5s ease;
}

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

/* ===== Button Hover Glow ===== */
a:hover, button:hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Form Inputs ===== */
input:focus, textarea:focus {
    box-shadow: 0 0 0 3px rgba(148, 26, 64, 0.08);
}

/* ===== Scroll Reveal Animations ===== */
.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.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; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

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

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

/* ===== Decorative Tooth Shape ===== */
.tooth-accent {
    position: relative;
}

.tooth-accent::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 100%;
    height: 8px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 8' fill='none'%3E%3Cpath d='M1 5.5C40 1 80 1 100 3.5C120 6 160 4 199 5.5' stroke='%23D93D6E' stroke-width='2.5' stroke-linecap='round' opacity='0.4'/%3E%3C/svg%3E") no-repeat center;
    background-size: 100% 100%;
}

/* ===== Image Hover ===== */
.rounded-3xl.overflow-hidden img {
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.rounded-3xl.overflow-hidden:hover img {
    transform: scale(1.02);
}

/* ===== Timeline ===== */
@media (max-width: 767px) {
    .relative.flex.gap-8 {
        padding-left: 40px;
    }
}

/* ===== Smooth section transitions ===== */
section {
    position: relative;
}

/* ===== Loading state for images ===== */
img {
    background-color: rgba(148, 26, 64, 0.04);
}

/* ===== Focus visible for accessibility ===== */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 2px solid #941A40;
    outline-offset: 2px;
    border-radius: 4px;
}
