/* ===== Custom Styles for Melissa Ritter Family Dentistry ===== */

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

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

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

/* ===== Geometric Background Shapes ===== */
.geo-shape {
    position: fixed;
    pointer-events: none;
    z-index: 0;
    opacity: 0.4;
}

.shape-circle-1 {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(147, 51, 234, 0.08) 0%, transparent 70%);
    top: 15%;
    right: -50px;
    animation: float-shape 20s ease-in-out infinite;
}

.shape-circle-2 {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.1) 0%, transparent 70%);
    bottom: 20%;
    left: -30px;
    animation: float-shape 15s ease-in-out infinite reverse;
}

.shape-square-1 {
    width: 100px;
    height: 100px;
    background: rgba(147, 51, 234, 0.05);
    border: 2px solid rgba(147, 51, 234, 0.1);
    top: 40%;
    left: 5%;
    transform: rotate(45deg);
    animation: float-shape 18s ease-in-out infinite;
}

.shape-triangle-1 {
    width: 0;
    height: 0;
    border-left: 50px solid transparent;
    border-right: 50px solid transparent;
    border-bottom: 86px solid rgba(251, 191, 36, 0.06);
    top: 60%;
    right: 8%;
    animation: float-shape 22s ease-in-out infinite reverse;
}

.shape-circle-3 {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.08) 0%, transparent 70%);
    top: 80%;
    right: 15%;
    animation: float-shape 16s ease-in-out infinite;
}

.shape-ring-1 {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid rgba(147, 51, 234, 0.1);
    top: 30%;
    left: 15%;
    animation: float-shape 14s ease-in-out infinite reverse;
}

@keyframes float-shape {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-20px) rotate(5deg); }
    50% { transform: translateY(10px) rotate(-3deg); }
    75% { transform: translateY(-15px) rotate(2deg); }
}

/* ===== Floating Cards ===== */
.floating-card {
    animation: float-card 6s ease-in-out infinite;
}

.card-stat-1 {
    animation-delay: 0s;
}

.card-stat-2 {
    animation-delay: 3s;
}

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

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

#navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(147, 51, 234, 0.08);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #9333ea, #fbbf24);
    transition: width 0.3s ease, left 0.3s ease;
    border-radius: 1px;
}

.nav-link:hover::after {
    width: 60%;
    left: 20%;
}

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

.service-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 24px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.1), rgba(251, 191, 36, 0.1));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

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

/* ===== Testimonial Cards ===== */
.testimonial-card {
    position: relative;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 80px;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.2), rgba(251, 191, 36, 0.2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    pointer-events: none;
}

/* ===== Scroll Animations ===== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.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; }

/* ===== Mobile Menu ===== */
.mobile-nav-link {
    display: block;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .floating-card {
        display: none;
    }
    
    .shape-circle-1,
    .shape-circle-2,
    .shape-circle-3,
    .shape-square-1,
    .shape-triangle-1,
    .shape-ring-1 {
        display: none;
    }
}

@media (max-width: 640px) {
    html {
        scroll-padding-top: 70px;
    }
}

/* ===== Focus Styles ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #9333ea;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ===== Selection ===== */
::selection {
    background-color: rgba(147, 51, 234, 0.2);
    color: #3b0764;
}

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

::-webkit-scrollbar-track {
    background: #faf5ff;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #9333ea, #fbbf24);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #7e22ce, #d97706);
}
