/* Custom styles for Gary Lahti, DO website */

/* Smooth scrollbar */
html {
    scrollbar-width: thin;
    scrollbar-color: #6bb88e #f0f4f8;
}

::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: #6bb88e;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #45a06a;
}

/* Hero text animations - only for below-fold content */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        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; }
}

/* Reduced motion preference */
@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;
    }
}

/* Hero section - ensure text is always visible */
#hero h1,
#hero p,
#hero .flex {
    opacity: 1;
    transform: none;
}

/* Custom focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #6bb88e;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Navigation active state */
.nav-link.active {
    color: #2d8351;
}

/* Print styles */
@media print {
    nav, #back-to-top, #contact-form, iframe {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    .bg-midnight-900, .bg-midnight-950 {
        background: #102a43 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* Utility for image loading */
img {
    background-color: #f0f4f8;
}

/* Subtle pattern overlay for sections */
.section-pattern {
    background-image: radial-gradient(circle at 1px 1px, rgba(16, 42, 67, 0.03) 1px, transparent 0);
    background-size: 24px 24px;
}

/* Card hover effects */
.group:hover .group-hover\:scale-105 {
    transform: scale(1.05);
}

/* Custom selection color */
::selection {
    background-color: #c5e6d3;
    color: #102a43;
}

/* Ensure all interactive elements are clickable */
a, button {
    touch-action: manipulation;
}

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

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

/* Form input transitions */
input, textarea {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Map container */
section iframe {
    width: 100%;
    height: 100%;
}
