/* Custom styles for St. John Chiropractic */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fefdf8;
}
::-webkit-scrollbar-thumb {
    background: #afdbbe;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #7cc39a;
}

/* Header scroll state */
.header-scrolled {
    background: rgba(254, 253, 248, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    box-shadow: 0 1px 20px rgba(27, 67, 50, 0.08) !important;
}

/* Hero badge animation */
.hero-badge {
    animation: fadeInUp 0.8s ease-out both;
}

/* Geometric shapes */
.geo-circle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.08;
}

.geo-circle-1 {
    width: 400px;
    height: 400px;
    background: #D5F5E3;
    top: 10%;
    right: -5%;
    animation: float 8s ease-in-out infinite;
}

.geo-circle-2 {
    width: 200px;
    height: 200px;
    background: #AFDBBE;
    bottom: 20%;
    left: 5%;
    animation: float 6s ease-in-out infinite reverse;
}

.geo-circle-3 {
    width: 120px;
    height: 120px;
    background: #F5E4B8;
    top: 40%;
    left: 15%;
    animation: float 10s ease-in-out infinite;
}

.geo-tri {
    position: absolute;
    opacity: 0.06;
}

.geo-tri-1 {
    width: 0;
    height: 0;
    border-left: 80px solid transparent;
    border-right: 80px solid transparent;
    border-bottom: 140px solid #D5F5E3;
    top: 25%;
    left: 8%;
    animation: rotate 20s linear infinite;
}

.geo-tri-2 {
    width: 0;
    height: 0;
    border-left: 60px solid transparent;
    border-right: 60px solid transparent;
    border-bottom: 60px solid #AFDBBE;
    bottom: 30%;
    right: 10%;
    animation: rotate 15s linear infinite reverse;
}

.geo-sq {
    position: absolute;
    opacity: 0.06;
}

.geo-sq-1 {
    width: 100px;
    height: 100px;
    background: #D5F5E3;
    top: 60%;
    right: 5%;
    border-radius: 20px;
    transform: rotate(45deg);
    animation: float 7s ease-in-out infinite;
}

.geo-sq-2 {
    width: 60px;
    height: 60px;
    background: #F5E4B8;
    top: 15%;
    right: 25%;
    border-radius: 12px;
    transform: rotate(20deg);
    animation: float 9s ease-in-out infinite reverse;
}

/* Animations */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(3deg); }
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    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; }

/* Service card hover */
.service-card {
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.5s ease;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #1B4332;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

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

/* Mobile menu */
.mobile-link {
    transition: all 0.2s ease;
}

/* Form focus states */
input:focus, textarea:focus {
    box-shadow: 0 0 0 3px rgba(45, 125, 85, 0.1);
}

/* Button press effect */
button:active, a:active {
    transform: scale(0.98);
}

/* Selection color */
::selection {
    background: #afdbbe;
    color: #1B4332;
}

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

/* Tablet adjustments */
@media (max-width: 768px) {
    .geo-circle-1 {
        width: 250px;
        height: 250px;
    }
    .geo-circle-2 {
        width: 120px;
        height: 120px;
    }
    .geo-circle-3 {
        display: none;
    }
    .geo-tri-1 {
        border-left: 50px solid transparent;
        border-right: 50px solid transparent;
        border-bottom: 87px solid #D5F5E3;
    }
    .geo-tri-2 {
        display: none;
    }
    .geo-sq-1 {
        width: 60px;
        height: 60px;
    }
}
