/* ========================================
   Capitol Wellness Brookfield
   Custom Styles
======================================== */

/* --- Base & Typography --- */
html {
    scroll-behavior: smooth;
}

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

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f0f4f8;
}
::-webkit-scrollbar-thumb {
    background: #627d98;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #334e68;
}

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

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

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

/* --- Navbar Scrolled State --- */
.navbar-scrolled {
    background: rgba(255, 255, 255, 0.97) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(16, 42, 67, 0.08);
}

.navbar-scrolled .nav-link {
    color: #102a43 !important;
}

.navbar-scrolled .font-serif,
.navbar-scrolled .text-navy-900,
.navbar-scrolled .text-navy-600 {
    color: #102a43 !important;
}

/* --- Hero Orbs --- */
.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 8s ease-in-out infinite;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(232, 165, 16, 0.5), transparent 70%);
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(98, 125, 152, 0.6), transparent 70%);
    bottom: 10%;
    left: -50px;
    animation-delay: -3s;
}

.orb-3 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(240, 180, 41, 0.3), transparent 70%);
    top: 40%;
    left: 20%;
    animation-delay: -5s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* --- Hero Animations --- */
.hero-badge {
    opacity: 0;
    animation: fadeSlideDown 0.8s ease forwards;
    animation-delay: 0.2s;
}

.hero-headline {
    opacity: 0;
    animation: fadeSlideUp 0.9s ease forwards;
    animation-delay: 0.4s;
}

.hero-subtitle {
    opacity: 0;
    animation: fadeSlideUp 0.9s ease forwards;
    animation-delay: 0.6s;
}

.hero-cta {
    opacity: 0;
    animation: fadeSlideUp 0.9s ease forwards;
    animation-delay: 0.8s;
}

.hero-trust {
    opacity: 0;
    animation: fadeSlideUp 0.9s ease forwards;
    animation-delay: 1s;
}

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

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

/* --- Section Tags --- */
.section-tag {
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-weight: 600;
}

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

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #102a43, #e8a510);
    opacity: 0;
    transition: opacity 0.4s ease;
}

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

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

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

/* Staggered delays for grid items */
.service-card:nth-child(1) { transition-delay: 0.05s; }
.service-card:nth-child(2) { transition-delay: 0.1s; }
.service-card:nth-child(3) { transition-delay: 0.15s; }
.service-card:nth-child(4) { transition-delay: 0.2s; }
.service-card:nth-child(5) { transition-delay: 0.25s; }
.service-card:nth-child(6) { transition-delay: 0.3s; }

/* --- Mobile Menu --- */
.mobile-link {
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(16, 42, 67, 0.06);
}

/* --- Input Focus States --- */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(232, 165, 16, 0.15);
}

/* --- Button Ripple Effect --- */
button, a {
    -webkit-tap-highlight-color: transparent;
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .hero-orb {
        filter: blur(60px);
        opacity: 0.3;
    }
    
    .orb-1 {
        width: 250px;
        height: 250px;
    }
    
    .orb-2 {
        width: 180px;
        height: 180px;
    }
    
    .orb-3 {
        width: 120px;
        height: 120px;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .hero-badge,
    .hero-headline,
    .hero-subtitle,
    .hero-cta,
    .hero-trust {
        opacity: 0;
    }
    
    .hero-badge.animate,
    .hero-headline.animate,
    .hero-subtitle.animate,
    .hero-cta.animate,
    .hero-trust.animate {
        opacity: 1;
    }
}

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