/* ===== Custom Styles for US Health Advisors ===== */

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

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

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

.animate-fade-in {
    animation-name: fadeIn;
    animation-duration: 0.8s;
    animation-timing-function: ease-out;
    animation-iteration-count: 1;
}

/* ===== Hero Animations ===== */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* ===== Section Animations ===== */
.section-eyebrow {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.section-headline {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.service-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.process-step {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.faq-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

/* Scroll Reveal Active States */
.revealed .section-eyebrow,
.revealed .section-headline,
.revealed .service-card,
.revealed .process-step,
.revealed .faq-item {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered delays */
.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; }

.process-step:nth-child(1) { transition-delay: 0.05s; }
.process-step:nth-child(2) { transition-delay: 0.15s; }
.process-step:nth-child(3) { transition-delay: 0.25s; }

.faq-item:nth-child(1) { transition-delay: 0.05s; }
.faq-item:nth-child(2) { transition-delay: 0.1s; }
.faq-item:nth-child(3) { transition-delay: 0.15s; }
.faq-item:nth-child(4) { transition-delay: 0.2s; }
.faq-item:nth-child(5) { transition-delay: 0.25s; }

/* ===== Navbar ===== */
.nav-text {
    transition: color 0.3s ease;
}

.nav-subtext {
    transition: color 0.3s ease;
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #c8a45e;
    transition: width 0.3s ease;
}

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

/* Dark navbar state */
nav.scrolled .nav-text { color: #0d1b2a; }
nav.scrolled .nav-subtext { color: #b08d3a; }
nav.scrolled .nav-link { color: #1e3d6e; }
nav.scrolled .nav-link::after { background: #c8a45e; }

/* ===== FAQ ===== */
.faq-icon {
    transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
}

.faq-item.active .faq-content {
    max-height: 300px;
}

/* ===== Mobile Menu ===== */
.menu-line {
    transition: all 0.3s ease;
}

#menuBtn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menuBtn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== Responsive ===== */
@media (max-width: 767px) {
    .font-serif {
        line-height: 1.15;
    }
    
    #hero h1 {
        font-size: 2.5rem;
    }
    
    @media (min-width: 480px) {
        #hero h1 {
            font-size: 3rem;
        }
    }
}

/* ===== 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;
    }
    
    .section-eyebrow,
    .section-headline,
    .service-card,
    .process-step,
    .faq-item {
        opacity: 1;
        transform: none;
    }
}

/* ===== Focus States ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
textarea:focus-visible,
button:focus-visible {
    outline: 2px solid #c8a45e;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ===== Selection ===== */
::selection {
    background-color: #c8a45e;
    color: #0d1b2a;
}
