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 image overlay: follows :root --brand (theme / row_data), not fixed blue */
.hero-overlay-brand-gradient {
    background: linear-gradient(
        to right,
        color-mix(in oklch, var(--brand, #3022ce) 92%, transparent) 0%,
        color-mix(in oklch, var(--brand, #3022ce) 85%, transparent) 35%,
        color-mix(in oklch, var(--brand, #3022ce) 65%, transparent) 65%,
        color-mix(in oklch, var(--brand, #3022ce) 30%, transparent) 100%
    );
}

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

.inner-hero-bg {
    background: linear-gradient(135deg, #1a1478 0%, #3022ce 55%, #4a3ae6 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, #3022ce) 0%, var(--brand-accent, var(--brand-light, #4a3ae6)) 55%, var(--brand-dark, var(--brand, #3022ce)) 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 ========== */

.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;
}

/* ========== CALL BUTTON ANIMATIONS ========== */

@keyframes callPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 color-mix(in oklch, var(--brand-accent, #f2a426) 55%, transparent);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 10px color-mix(in oklch, var(--brand-accent, #f2a426) 0%, transparent);
        transform: scale(1.03);
    }
}

@keyframes callShimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

@keyframes callBarSlideUp {
    from { opacity: 0; transform: translateY(100%); }
    to { opacity: 1; transform: translateY(0); }
}

.btn-call {
    position: relative;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.btn-call:hover {
    transform: scale(1.05);
}

.btn-call:focus-visible {
    outline: 2px solid var(--brand-accent, #f2a426);
    outline-offset: 2px;
}

.btn-call--pulse {
    animation: callPulse 2s ease-in-out infinite;
}

.btn-call--icon {
    transition: transform 0.25s ease, background-color 0.25s ease, color 0.25s ease;
}

.btn-call--card {
    background-size: 200% auto;
}

.btn-call--card:hover {
    background-image: linear-gradient(
        90deg,
        var(--brand-dark, var(--brand, #3022ce)) 0%,
        var(--brand-accent, var(--brand-light, var(--brand, #4a3ae6))) 50%,
        var(--brand, #3022ce) 100%
    );
    animation: callShimmer 2.5s linear infinite, callPulse 2s ease-in-out infinite;
}

.btn-call--bar {
    animation: callBarSlideUp 0.45s ease-out both;
}

.floating-cta-wrap {
    position: fixed;
    bottom: 1rem;
    left: 0.75rem;
    right: 0.75rem;
    z-index: 50;
    display: flex;
    justify-content: center;
    pointer-events: none;
    animation: callBarSlideUp 0.45s ease-out both;
}

@media (min-width: 768px) {
    .floating-cta-wrap {
        bottom: 1.5rem;
        left: 0;
        right: 0;
    }
}

/* Mobile sticky call bar: slide icon right → ring → wait 2s → ring → repeat */
@keyframes mobilePhoneTravel {
    0%, 100% {
        right: calc(100% - 4.25rem);
        transform: translateY(-50%) scale(1);
    }
    8%, 55% {
        right: 1rem;
        transform: translateY(-50%) scale(1);
    }
    10%, 12% {
        right: 1rem;
        transform: translateY(-50%) scale(1.12);
    }
    41%, 43% {
        right: 1rem;
        transform: translateY(-50%) scale(1.12);
    }
}

@keyframes mobileCallRingBurst {
    /* 8s loop: ring → 2s pause → ring → reset */
    0%, 7%, 9%, 16%, 40%, 42%, 50%, 58%, 100% {
        opacity: 0;
        transform: scale(0.9);
    }
    8%, 10% {
        opacity: 0.9;
        transform: scale(1);
    }
    15% {
        opacity: 0;
        transform: scale(1.85);
    }
    41%, 43% {
        opacity: 0.9;
        transform: scale(1);
    }
    49% {
        opacity: 0;
        transform: scale(1.85);
    }
}

.floating-cta-pill-link,
.floating-cta-mobile-link {
    position: relative;
    display: block;
    width: 100%;
    max-width: min(22rem, 100%);
    min-height: 3.75rem;
    padding: 0.875rem 1.125rem;
    overflow: visible;
    pointer-events: auto;
    background-color: var(--brand, #3022ce);
    border-radius: 9999px;
    box-shadow: 0 8px 28px rgba(48, 34, 206, 0.45), 0 4px 12px rgba(0, 0, 0, 0.15);
}

@media (min-width: 768px) {
    .floating-cta-pill-link,
    .floating-cta-mobile-link {
        max-width: 26rem;
        min-height: 4rem;
        padding: 1rem 1.25rem;
    }
}

.floating-cta-phone-stage {
    position: absolute;
    top: 50%;
    right: 1rem;
    width: 3.25rem;
    height: 3.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: mobilePhoneTravel 8s ease-in-out infinite;
}

.floating-cta-phone-icon {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-cta-ring {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.75);
    pointer-events: none;
    animation: mobileCallRingBurst 8s ease-out infinite;
}

.floating-cta-ring--delay {
    animation-delay: 0.12s;
}

.floating-cta-icon-pulse {
    animation: callPulse 2s ease-in-out infinite;
}

/* ========== SERVICE PREVIEW CARD (What We Do) ========== */

@keyframes callAttention {
    0%, 100% {
        transform: scale(1) translateY(0);
        box-shadow:
            0 4px 16px color-mix(in oklch, var(--brand, #3022ce) 45%, transparent),
            0 0 0 0 color-mix(in oklch, var(--brand-accent, var(--brand, #3022ce)) 35%, transparent);
    }
    50% {
        transform: scale(1.05) translateY(-1px);
        box-shadow:
            0 8px 24px color-mix(in oklch, var(--brand, #3022ce) 55%, transparent),
            0 0 0 10px color-mix(in oklch, var(--brand-accent, var(--brand, #3022ce)) 0%, transparent);
    }
}

@keyframes callGlow {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.12); }
}

.service-preview-card {
    display: block;
    min-height: 320px;
    height: 100%;
}

.service-preview-card .service-card-media {
    transition: transform 0.7s ease;
}

.service-preview-card:hover .service-card-media {
    transform: scale(1.05);
}

.service-card-body {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
    padding-top: 4rem;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.92) 0%,
        rgba(0, 0, 0, 0.65) 45%,
        transparent 100%
    );
}

.service-card-body h3 {
    margin-bottom: 0.375rem;
}

.service-card-body p {
    margin-bottom: 0;
}

.service-card-actions {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-shrink: 0;
}

.service-card-learn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.625rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 0.625rem;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.service-card-learn:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.55);
    transform: translateY(-1px);
}

.service-card-call {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.625rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(
        135deg,
        var(--brand-dark, var(--brand, #3022ce)) 0%,
        var(--brand-accent, var(--brand-light, var(--brand, #4a3ae6))) 50%,
        var(--brand, #3022ce) 100%
    );
    background-size: 200% auto;
    border-radius: 0.625rem;
    box-shadow: 0 4px 16px color-mix(in oklch, var(--brand, #3022ce) 45%, transparent);
    animation: callAttention 1.75s ease-in-out infinite, callGlow 2.5s ease-in-out infinite;
    transition: transform 0.2s ease;
}

.service-card-call:hover {
    animation: callShimmer 1.2s linear infinite, callAttention 1.75s ease-in-out infinite;
    transform: scale(1.06);
}

.service-card-call svg {
    flex-shrink: 0;
}

@media (prefers-reduced-motion: reduce) {
    .btn-call--pulse,
    .btn-call--card:hover,
    .btn-call--bar,
    .floating-cta-wrap,
    .floating-cta-bar,
    .floating-cta-icon-pulse,
    .floating-cta-phone-stage,
    .floating-cta-ring,
    .service-card-call,
    .service-card-call:hover {
        animation: none !important;
    }
    .floating-cta-phone-stage {
        right: 1rem;
        transform: translateY(-50%);
    }
    .btn-call:hover {
        transform: none;
    }
}

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

@media (max-width: 767px) {
    body { padding-bottom: 5.5rem; }
}

@media (min-width: 768px) {
    body { padding-bottom: 5rem; }
}
