body {
    scroll-behavior: smooth;
}

/* ========== ANIMATIONS ========== */

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes subtlePulse {
    0%, 100% { opacity: 0.15; transform: scale(1); }
    50% { opacity: 0.25; transform: scale(1.05); }
}
@keyframes liveDot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.anim-fade-up { animation: fadeInUp .7s ease-out both; }
.anim-fade-up-d1 { animation: fadeInUp .7s ease-out .15s both; }
.anim-fade-up-d2 { animation: fadeInUp .7s ease-out .3s both; }
.anim-fade-up-d3 { animation: fadeInUp .7s ease-out .45s both; }
.anim-fade-right { animation: fadeInRight .8s ease-out .3s both; }
.anim-pulse-slow { animation: subtlePulse 6s ease-in-out infinite; }
.anim-live-dot { animation: liveDot 2s ease-in-out infinite; }

/* ========== HERO STYLES ========== */

.hero-section {
    min-height: 100vh;
    min-height: 100dvh;
}

/* Hero v1: diagonal scrim (readability on left / photo opens toward bottom-right) */
.hero-gradient-overlay {
    background: linear-gradient(
        118deg,
        color-mix(in srgb, var(--color-primary, var(--brand)) 94%, black) 0%,
        color-mix(in srgb, var(--color-primary, var(--brand)) 72%, black) 24%,
        color-mix(in srgb, var(--color-primary, var(--brand)) 48%, black) 48%,
        color-mix(in srgb, var(--color-primary, var(--brand)) 22%, transparent) 76%,
        transparent 100%
    );
}

/* Hero v1: blend hero into page (subtle primary tint, matches v2 bottom fade) */
.hero-v1-bottom-fade {
    background: linear-gradient(
        to top,
        color-mix(in srgb, var(--color-primary, var(--brand)) 6%, #f9fafb) 0%,
        color-mix(in srgb, var(--color-primary, var(--brand)) 2%, transparent) 45%,
        transparent 100%
    );
}

/* Hero v2: deeper base wash + slight top highlight */
.hero-v2-gradient-backdrop {
    background: linear-gradient(
        168deg,
        color-mix(in srgb, var(--color-primary, var(--brand)) 18%, #020617) 0%,
        color-mix(in srgb, var(--color-primary, var(--brand)) 38%, #0f172a) 36%,
        color-mix(in srgb, var(--color-primary, var(--brand)) 28%, #1e293b) 70%,
        color-mix(in srgb, var(--brand-dark) 35%, #0c1222) 100%
    );
    opacity: 0.9;
}

/* Hero v2: warm corner glow from primary (replaces flat linear wash) */
.hero-v2-gradient-accent {
    opacity: 0.4;
    background: radial-gradient(
        115% 90% at 100% 100%,
        color-mix(in srgb, var(--color-primary, var(--brand)) 55%, transparent) 0%,
        color-mix(in srgb, var(--color-primary, var(--brand)) 12%, transparent) 52%,
        transparent 72%
    );
}

/* V2 theme: section washes, image scrims, dark bands — all keyed off --color-primary */
.v2-section-soft-bg {
    background: linear-gradient(
        180deg,
        color-mix(in srgb, var(--color-primary, var(--brand)) 5%, #f9fafb) 0%,
        #ffffff 45%,
        #ffffff 100%
    );
}

.hero-v2-bottom-fade {
    background: linear-gradient(
        to top,
        color-mix(in srgb, var(--color-primary, var(--brand)) 8%, #f9fafb) 0%,
        transparent 100%
    );
}

.v2-image-bottom-scrim {
    background: linear-gradient(
        to top,
        color-mix(in srgb, var(--color-primary, var(--brand)) 58%, black) 0%,
        color-mix(in srgb, var(--color-primary, var(--brand)) 28%, transparent) 48%,
        transparent 62%
    );
}

.testimonials-v2-fade-left {
    background: linear-gradient(
        to right,
        color-mix(in srgb, var(--color-primary, var(--brand)) 32%, #111827),
        transparent
    );
}

.testimonials-v2-fade-right {
    background: linear-gradient(
        to left,
        color-mix(in srgb, var(--color-primary, var(--brand)) 32%, #111827),
        transparent
    );
}

.testimonials-v2-section-bg {
    background: linear-gradient(
        180deg,
        color-mix(in srgb, var(--color-primary, var(--brand)) 22%, #111827) 0%,
        color-mix(in srgb, var(--color-primary, var(--brand)) 10%, #030712) 100%
    );
}

.footer-v2-gradient-bg {
    background: linear-gradient(
        to bottom,
        color-mix(in srgb, var(--color-primary, var(--brand)) 20%, #1f2937) 0%,
        color-mix(in srgb, var(--color-primary, var(--brand)) 8%, #0f172a) 100%
    );
}

.cta-section-v2-bg {
    background: linear-gradient(
        145deg,
        color-mix(in srgb, var(--color-primary, var(--brand)) 28%, #111827) 0%,
        color-mix(in srgb, var(--color-primary, var(--brand)) 10%, #0c1222) 55%,
        #030712 100%
    );
}

@media (max-width: 1023px) {
    .hero-section {
        min-height: auto;
    }
}

/* Navbar V2: spacer height set by JS from #site-header-v2; min fallback before paint */
.header-v2-spacer {
    min-height: 9.5rem;
    height: 9.5rem;
}
@media (min-width: 1024px) {
    .header-v2-spacer {
        min-height: 10.5rem;
        height: 10.5rem;
    }
}

/* Hero V2: accent span inside JSON headline */
.hero-v2-headline .text-accent {
    color: var(--brand-accent);
}

.hero-v2 {
    min-height: 100vh;
    min-height: 100dvh;
    scroll-margin-top: var(--header-v2-height, 9.5rem);
}
@media (min-width: 1024px) {
    .hero-v2 {
        min-height: 85vh;
        scroll-margin-top: var(--header-v2-height, 10.5rem);
    }
}

.inner-hero-bg {
    background: linear-gradient(
        135deg,
        color-mix(in srgb, var(--color-primary, var(--brand)) 55%, black) 0%,
        var(--color-primary, var(--brand)) 55%,
        color-mix(in srgb, var(--color-primary, var(--brand)) 75%, white) 100%
    );
}

.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.text-gradient-accent {
    background: linear-gradient(135deg, var(--brand-accent, #f2a426) 30%, #fbbf24 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Decorative blobs */
.hero-blob-1 {
    position: absolute;
    width: 420px; height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(242,164,38,0.18) 0%, transparent 70%);
    top: -160px; right: -80px;
    pointer-events: none;
}
.hero-blob-2 {
    position: absolute;
    width: 300px; height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
    bottom: -100px; left: -60px;
    pointer-events: none;
}

.wave-sep {
    position: absolute; bottom: -1px; left: 0; width: 100%;
    overflow: hidden; line-height: 0;
}
.wave-sep svg {
    display: block; width: calc(100% + 1.3px); height: 54px;
}

.dot-pattern {
    background-image: radial-gradient(rgba(255,255,255,0.07) 1px, transparent 1px);
    background-size: 24px 24px;
}

/* ========== STEP CARDS (How It Works) ========== */

.step-card-3d {
    perspective: 800px;
}
.step-card-3d .card-inner {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    transform-style: preserve-3d;
}
.step-card-3d:hover .card-inner {
    transform: translateY(-8px) rotateX(3deg) rotateY(-2deg);
}
.step-card-3d:hover .card-shadow {
    transform: scale(0.95) translateY(8px);
    opacity: 0.12;
}
.step-card-3d .card-shadow {
    transition: all 0.4s ease;
}
.step-connector {
    position: relative;
}
.step-connector::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -1.5rem;
    width: 3rem;
    height: 2px;
    background: linear-gradient(90deg, var(--brand, #3022ce), transparent);
    transform: translateY(-50%);
}
@media (max-width: 767px) {
    .step-connector::after { display: none; }
}

/* ========== FAQ ACCORDION ========== */

details summary::-webkit-details-marker {
    display: none;
}

details[open] summary {
    color: var(--brand, #3022ce);
}

/* ========== UTILITIES ========== */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.capitalize-words { text-transform: capitalize; }

.service-card h3,
.service-name,
h3.service-title { text-transform: capitalize; }

section h3 a,
section h3 span { text-transform: capitalize; }

.grid a h3 { text-transform: capitalize; }

footer ul li a { text-transform: capitalize; }

.break-words {
    word-break: break-word;
    overflow-wrap: break-word;
}

.truncate-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.neighborhood-pill {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: #f3f4f6;
    border-radius: 9999px;
    font-size: 0.875rem;
    color: #374151;
    margin: 0.25rem;
}

/* ========== TESTIMONIALS V2 SCROLLER ========== */

/* Hide scrollbar; track still scrolls (touch, wheel, arrows, prev/next) */
.testimonials-v2-track {
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.testimonials-v2-track::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

/* ========== MOBILE BOTTOM PADDING ========== */

@media (max-width: 768px) {
    body { padding-bottom: 64px; }
}
