/* Custom Styles for Dr. George R. Woods */

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

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

body {
    overflow-x: hidden;
}

/* Selection */
::selection {
    background: rgba(139, 63, 88, 0.15);
    color: #502333;
}

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

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

::-webkit-scrollbar-thumb {
    background: #d4adba;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #ba7e96;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(32px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes floatIn {
    from {
        opacity: 0;
        transform: translateX(24px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

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

.animate-fadeIn {
    animation: fadeIn 0.8s ease-out;
}

.animate-slideUp {
    animation: slideUp 0.8s ease-out;
}

.animate-floatIn {
    animation: floatIn 1s ease-out;
}

/* Floating animation for stat cards */
.animate-slideUp:nth-child(2) {
    animation: slideUp 0.8s ease-out, float 4s ease-in-out infinite 1.4s;
}

.animate-slideUp:nth-child(3) {
    animation: slideUp 0.8s ease-out, float 4.5s ease-in-out infinite 1.6s;
}

.animate-slideUp:nth-child(4) {
    animation: slideUp 0.8s ease-out, float 5s ease-in-out infinite 1.8s;
}

/* Intersection Observer Animations */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

/* Navbar */
#navbar {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(212, 173, 186, 0.2);
}

#navbar.scrolled {
    box-shadow: 0 1px 20px rgba(80, 35, 51, 0.06);
}

/* Mobile Menu */
.mobile-link {
    opacity: 0;
    transform: translateY(12px);
    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 .mobile-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu-open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
.mobile-menu-open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
.mobile-menu-open .mobile-link:nth-child(4) { transition-delay: 0.25s; }
.mobile-menu-open .mobile-link:nth-child(5) { transition-delay: 0.3s; }
.mobile-menu-open .mobile-link:nth-child(6) { transition-delay: 0.35s; }

/* Menu Button Animation */
.menu-line {
    display: block;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

.menu-open .menu-line:nth-child(1) {
    transform: translateY(5px) rotate(45deg);
}

.menu-open .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.menu-open .menu-line:nth-child(3) {
    transform: translateY(-5px) rotate(-45deg);
    width: 1.25rem;
}

/* Service Cards */
.service-card {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s ease;
}

.service-card:hover {
    transform: translateY(-4px);
}

/* Buttons */
button, a {
    -webkit-tap-highlight-color: transparent;
}

/* Focus States */
input:focus, textarea:focus, button:focus, a:focus {
    outline: none;
}

/* Image Optimization */
img {
    max-width: 100%;
    height: auto;
}

/* Responsive Typography */
@media (max-width: 640px) {
    .font-serif {
        line-height: 1.15;
    }
}

/* Print Styles */
@media print {
    #navbar, .animate-floatIn, [id="approach"] {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
