/* Custom styles for Tackett Orthodontics */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Header scroll state */
#header {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#header.scrolled {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(10, 37, 64, 0.08);
}

/* Navigation links */
.nav-link {
    position: relative;
}

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

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

/* Hero animations */
.hero-elem {
    opacity: 0;
    transform: translateY(24px);
    animation: heroReveal 0.7s ease forwards;
}

.hero-elem:nth-child(1) { animation-delay: 0.1s; }
.hero-elem:nth-child(2) { animation-delay: 0.25s; }
.hero-elem:nth-child(3) { animation-delay: 0.4s; }
.hero-elem:nth-child(4) { animation-delay: 0.55s; }

.hero-img {
    opacity: 0;
    transform: translateX(30px);
    animation: heroImgReveal 0.9s ease 0.3s forwards;
}

@keyframes heroReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heroImgReveal {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scroll reveal */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.scroll-reveal:nth-child(2) { transition-delay: 0.1s; }
.scroll-reveal:nth-child(3) { transition-delay: 0.2s; }
.scroll-reveal:nth-child(4) { transition-delay: 0.3s; }
.scroll-reveal:nth-child(5) { transition-delay: 0.4s; }
.scroll-reveal:nth-child(6) { transition-delay: 0.5s; }

/* Mobile menu */
#mobile-menu {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-link {
    display: block;
}

/* Button hover effects */
a[href="#contact"] {
    position: relative;
}

/* Subtle gradient text for headings */
.gradient-text {
    background: linear-gradient(135deg, #0A2540 0%, #1A5276 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #88DFB0, #3DB876);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #52CC8C, #2DA362);
}

/* Selection color */
::selection {
    background: rgba(82, 204, 140, 0.2);
    color: #0A2540;
}

/* Focus styles */
:focus-visible {
    outline: 2px solid #52CC8C;
    outline-offset: 2px;
}

/* Mobile menu active state */
#mobile-menu.open {
    display: block;
}

#mobile-menu.hidden {
    display: none;
}

/* Reduce motion for accessibility */
@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;
    }

    .scroll-reveal {
        opacity: 1;
        transform: none;
    }
}
