/* Homepage compact flow — scoped to body.home-compact.home-premium on index only */

body.home-compact.home-premium .home-flow-compact {
    padding-top: 1.25rem !important;
    padding-bottom: 1.25rem !important;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

body.home-compact.home-premium .home-flow-compact > :not(.home-animated-bg) {
    position: relative;
    z-index: 2;
}

/* ── Animated section backgrounds (contact-page style) ── */
@keyframes homePhotoDrift {
    0% {
        background-position: 50% 50%;
        transform: scale(1.08);
    }
    50% {
        background-position: 58% 42%;
        transform: scale(1.14);
    }
    100% {
        background-position: 50% 50%;
        transform: scale(1.08);
    }
}

body.home-compact.home-premium .home-animated-bg {
    position: absolute;
    inset: -42px;
    z-index: 0;
    background: var(--home-bg-image, url('../img/photos/office.jpg')) center/cover no-repeat;
    opacity: 0.34;
    transform: scale(1.08);
    animation: homePhotoDrift 18s ease-in-out infinite;
    pointer-events: none;
}

body.home-compact.home-premium .home-animated-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.9), rgba(255, 255, 255, 0.78));
    pointer-events: none;
}

body.home-compact.home-premium .hero-stats-band.home-flow-compact {
    --home-bg-image: url('../img/photos/team.jpg');
    /* Dark base under animated photo — prevents white-on-white stat cards */
    background: linear-gradient(135deg, rgba(8, 51, 68, 0.94), rgba(3, 105, 161, 0.9)) !important;
}

body.home-compact.home-premium .hero-stats-band.home-flow-compact .home-animated-bg {
    opacity: 0.42;
}

body.home-compact.home-premium .hero-stats-band.home-flow-compact .home-animated-bg::after {
    background:
        radial-gradient(circle at 12% 10%, rgba(14, 165, 233, 0.34), transparent 28%),
        linear-gradient(135deg, rgba(8, 51, 68, 0.9), rgba(3, 105, 161, 0.86));
}

body.home-compact.home-premium .home-core-services.home-flow-compact {
    --home-bg-image: url('../img/photos/software.jpg');
}

body.home-compact.home-premium .selected-work.home-flow-compact {
    --home-bg-image: url('../img/photos/ecommerce.jpg');
}

body.home-compact.home-premium .clients-section.home-flow-compact {
    --home-bg-image: url('../img/photos/team.jpg');
}

body.home-compact.home-premium .industries-showcase.home-flow-compact {
    --home-bg-image: url('../img/photos/office.jpg');
}

body.home-compact.home-premium .home-trust-merged.home-flow-compact {
    --home-bg-image: url('../img/photos/office.jpg');
}

body.home-compact.home-premium .home-faq.home-flow-compact {
    --home-bg-image: url('../img/photos/support.jpg');
}

body.home-compact.home-premium .home-final-cta.home-flow-compact {
    --home-bg-image: url('../img/photos/team.jpg');
    background: transparent !important;
}

body.home-compact.home-premium .home-final-cta.home-flow-compact .home-animated-bg {
    opacity: 0.3;
}

body.home-compact.home-premium .home-final-cta.home-flow-compact .home-animated-bg::after {
    background: linear-gradient(135deg, rgba(6, 24, 38, 0.84), rgba(3, 105, 161, 0.72));
}

body.home-compact.home-premium .home-flow-compact .section-title {
    margin-bottom: 0.5rem !important;
}

body.home-compact.home-premium .home-flow-compact .home-section-lead,
body.home-compact.home-premium .home-flow-compact .section-subtitle,
body.home-compact.home-premium .home-flow-compact .industries-showcase-lead {
    font-size: 0.9rem !important;
    line-height: 1.55 !important;
    margin-bottom: 0.85rem !important;
}

/* ── Stats band ── */
body.home-compact.home-premium .hero-stats-band.home-flow-compact {
    padding: 1rem 0 !important;
}

body.home-compact.home-premium .hero-stats-band.home-flow-compact .hero-note {
    display: none;
}

body.home-compact.home-premium .hero-stats-band.home-flow-compact .hero-stats {
    gap: 0.5rem !important;
    max-width: 920px;
    margin: 0 auto;
    padding: 0 1rem;
}

body.home-compact.home-premium .hero-stats-band.home-flow-compact .stat-item.glass-card {
    position: relative;
    min-height: 0 !important;
    padding: 1rem 0.85rem 0.95rem 3.25rem !important;
    text-align: left !important;
    background: rgba(255, 255, 255, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    border-radius: 16px !important;
    box-shadow: 0 16px 36px rgba(2, 8, 23, 0.18) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

body.home-compact.home-premium .hero-stats-band.home-flow-compact .stat-item::before {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.16);
    color: #e0f2fe;
    font-size: 1rem;
}

body.home-compact.home-premium .hero-stats-band.home-flow-compact .stat-item:nth-child(1)::before { content: '✓'; }
body.home-compact.home-premium .hero-stats-band.home-flow-compact .stat-item:nth-child(2)::before { content: '🌍'; }
body.home-compact.home-premium .hero-stats-band.home-flow-compact .stat-item:nth-child(3)::before { content: '★'; }
body.home-compact.home-premium .hero-stats-band.home-flow-compact .stat-item:nth-child(4)::before { content: '↗'; }

body.home-compact.home-premium .hero-stats-band.home-flow-compact .stat-number {
    font-size: 1.45rem !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    background: none !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
    margin-bottom: 0.25rem !important;
}

body.home-compact.home-premium .hero-stats-band.home-flow-compact .stat-label {
    font-size: 0.82rem !important;
    line-height: 1.25 !important;
    color: rgba(255, 255, 255, 0.88) !important;
    -webkit-text-fill-color: rgba(255, 255, 255, 0.88) !important;
}

/* ── Core services ── */
body.home-compact.home-premium .home-core-services.home-flow-compact .service-features,
body.home-compact.home-premium .home-core-services.home-flow-compact .service-card > div[style*="background:"] {
    display: none !important;
}

body.home-compact.home-premium .home-core-services.home-flow-compact .service-card p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

body.home-compact.home-premium .home-flow-services-cta {
    text-align: center;
    margin-top: 1rem;
}

/* ── Industries (match core services compact) ── */
body.home-compact.home-premium .industries-showcase.home-flow-compact .industry-card-modern > ul {
    display: none !important;
}

body.home-compact.home-premium .industries-showcase.home-flow-compact .industry-card-modern > p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.65rem !important;
}

body.home-compact.home-premium .industries-showcase.home-flow-compact .industry-card-modern .service-link {
    display: inline-block;
    margin-top: 0.15rem;
}

/* ── Selected work ── */
body.home-compact.home-premium .selected-work.home-flow-compact .home-section-lead {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Clients ── */
body.home-compact.home-premium .clients-section.home-flow-compact .section-subtitle {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Merged trust ── */
body.home-compact.home-premium .home-trust-merged .features-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

body.home-compact.home-premium .home-trust-merged .feature-item {
    padding: 0.85rem !important;
}

body.home-compact.home-premium .home-trust-merged .feature-item p {
    font-size: 0.82rem !important;
    line-height: 1.45 !important;
    margin: 0 !important;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

body.home-compact.home-premium .home-trust-proof {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.5rem;
    margin: 1rem 0 0.75rem;
}

body.home-compact.home-premium .home-trust-proof-item {
    text-align: center;
    padding: 0.65rem 0.4rem;
    background: rgba(14, 165, 233, 0.08);
    border: 1px solid rgba(14, 165, 233, 0.15);
    border-radius: 10px;
}

body.home-compact.home-premium .home-trust-proof-item strong {
    display: block;
    font-size: 1.1rem;
    color: #0c4a6e;
}

body.home-compact.home-premium .home-trust-proof-item span {
    font-size: 0.68rem;
    color: #64748b;
}

body.home-compact.home-premium .home-trust-links {
    text-align: center;
    font-size: 0.85rem;
    margin: 0;
}

body.home-compact.home-premium .home-trust-links a {
    color: #0284c7;
    text-decoration: none;
    font-weight: 600;
}

/* ── FAQ compact ── */
body.home-compact.home-premium .home-faq.home-flow-compact .home-section-lead {
    display: none;
}

body.home-compact.home-premium .home-faq.home-flow-compact .faq-item p {
    font-size: 0.88rem !important;
    line-height: 1.55 !important;
}

body.home-compact.home-premium .home-faq.home-flow-compact .faq-item:nth-child(n+6) {
    display: none;
}

body.home-compact.home-premium .home-faq.home-flow-compact .faq-grid + div {
    margin-top: 1rem !important;
}

body.home-compact.home-premium .home-faq.home-flow-compact .faq-grid + div p {
    display: none;
}

/* ── Final CTA ── */
body.home-compact.home-premium .home-final-cta.home-flow-compact {
    padding: 1.5rem 0 1.75rem !important;
}

body.home-compact.home-premium .home-final-cta__box {
    text-align: center;
    max-width: 720px;
    margin: 0 auto;
    padding: 1.5rem 1.25rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

body.home-compact.home-premium .home-final-cta__title {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    color: #fff;
    margin: 0 0 0.5rem;
}

body.home-compact.home-premium .home-final-cta__lead {
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.92rem;
    line-height: 1.55;
    margin: 0 0 1rem;
}

body.home-compact.home-premium .home-final-cta__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: center;
}

body.home-compact.home-premium .home-final-cta__actions .btn-secondary {
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.35);
    background: transparent;
}

@media (max-width: 767px) {
    body.home-compact.home-premium .home-trust-merged .features-grid {
        grid-template-columns: 1fr;
    }

    body.home-compact.home-premium .home-trust-proof {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.home-compact.home-premium .home-final-cta__actions .btn {
        width: 100%;
    }
}

@media (min-width: 768px) {
    body.home-compact.home-premium .home-faq.home-flow-compact .faq-item:nth-child(n+6) {
        display: block;
    }
}

@media (prefers-reduced-motion: no-preference) {
    body.home-compact.home-premium .home-flow-compact .animate-on-scroll {
        animation: hfFadeUp 0.55s ease both;
    }

    @keyframes hfFadeUp {
        from { opacity: 0.6; transform: translateY(12px); }
        to { opacity: 1; transform: translateY(0); }
    }
}

@media (prefers-reduced-motion: reduce) {
    body.home-compact.home-premium .home-flow-compact .animate-on-scroll {
        animation: none !important;
    }

    body.home-compact.home-premium .home-animated-bg {
        animation: none !important;
        transform: scale(1.08);
    }
}
