/* Home IT — layout unificato: bande, header sezione, stats leggere, chip servizi */

:root {
    --header-offset: 5.75rem;
}

#main-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
    background: linear-gradient(180deg, #0a1211 0, #ffffff 2.25rem, #ffffff 100%);
}

#servizi,
#servizi-puzzle,
.home-news-section,
.home-section__header {
    scroll-margin-top: var(--header-offset);
}

.home-services-section {
    isolation: isolate;
}

.home-section {
    padding: clamp(3.5rem, 7vw, 5rem) 0;
}

.home-band--light {
    background: #ffffff;
}

.home-band--muted {
    background: var(--bg-section, #f7f9f9);
}

.home-section__header {
    max-width: 720px;
    margin: 0 auto 2rem;
    text-align: center;
}

.home-section__header .section-subtitle,
.home-section__header .stats-section-lead,
.home-section__header .home-why-lead {
    margin-left: auto;
    margin-right: auto;
}

.home-section__eyebrow {
    margin: 0 0 0.5rem;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #0d8f7f;
}

.home-why-lead {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.65;
    color: var(--text-secondary, #5a5a5a);
    max-width: 640px;
}

.home-why-trust {
    margin: 1rem 0 0;
    font-size: 0.95rem;
}

.home-why-trust a {
    color: #0d8f7f;
    font-weight: 600;
    text-decoration: none;
}

.home-why-trust a:hover {
    text-decoration: underline;
}

/* Servizi: chip rapidi */
.home-svc-quick {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem 0.65rem;
    margin: 0 0 0.5rem;
}

.home-svc-quick__label {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-secondary, #5a5a5a);
    margin-right: 0.25rem;
}

.home-svc-quick__chip {
    display: inline-block;
    padding: 0.4rem 0.85rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #003731;
    background: rgba(44, 158, 142, 0.1);
    border: 1px solid rgba(44, 158, 142, 0.35);
    border-radius: 999px;
    text-decoration: none;
    transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.home-svc-quick__chip:hover {
    background: rgba(44, 158, 142, 0.18);
    border-color: rgba(44, 158, 142, 0.55);
    transform: translateY(-1px);
}

.home-services-section.home-section {
    padding-top: clamp(3rem, 6vw, 4.25rem);
    padding-bottom: 0;
}

#main-content .home-services-section.home-band--light {
    background: transparent;
}

.home-services-section .home-svc-tabs {
    margin-top: 1.75rem;
    margin-bottom: 0;
}

.home-services-section.home-section {
    padding-bottom: clamp(2.5rem, 5vw, 3.5rem);
}

/* Stats home — banda scura, numeri in evidenza */
.stats-section.stats-section--home {
    position: relative;
    overflow: hidden;
    padding-top: clamp(3.5rem, 7vw, 5rem);
    padding-bottom: clamp(3.5rem, 7vw, 5rem);
    background: linear-gradient(155deg, #010203 0%, #001f1c 38%, #003731 72%, #0a4a42 100%);
    color: #f4f8f8;
}

.stats-section--home__glow {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 70% 55% at 15% 20%, rgba(93, 242, 214, 0.14), transparent 55%),
        radial-gradient(ellipse 50% 45% at 88% 75%, rgba(42, 163, 143, 0.2), transparent 50%);
}

.stats-section--home .container {
    position: relative;
    z-index: 1;
}

.stats-section--home__header {
    margin: 0 auto 2.25rem;
    max-width: 640px;
    text-align: center;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}

.stats-section--home__eyebrow {
    margin: 0 0 0.5rem;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #5df2d6;
}

.stats-section--home__title {
    margin: 0 0 0.75rem;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: #ffffff;
    text-shadow: 0 0 40px rgba(93, 242, 214, 0.12);
    background: transparent;
}

.stats-section--home__lead {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.65;
    color: rgba(244, 248, 248, 0.82);
}

.stats-section--home .stats-grid {
    margin-top: 0;
    gap: 1.35rem;
    grid-template-columns: repeat(4, 1fr);
}

.stats-section--home .stat-card {
    padding: 2rem 1.35rem 1.85rem;
    background: rgba(255, 255, 255, 0.06);
    color: #f4f8f8;
    border: 1px solid rgba(93, 242, 214, 0.22);
    border-radius: 16px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
}

.stats-section--home .stat-card::before {
    display: block;
    opacity: 1;
    background: linear-gradient(145deg, rgba(93, 242, 214, 0.12) 0%, transparent 55%);
}

.stats-section--home .stat-card--revealed:hover {
    border-color: rgba(93, 242, 214, 0.45);
    box-shadow:
        0 16px 40px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(93, 242, 214, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.stats-section--home .stat-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 1.15rem;
    color: #5df2d6;
    opacity: 1;
    filter: drop-shadow(0 0 12px rgba(93, 242, 214, 0.35));
}

.stats-section--home .stat-number {
    font-size: clamp(2.35rem, 4.5vw, 3.15rem);
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.5rem;
    letter-spacing: -0.03em;
    line-height: 1.05;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 28px rgba(93, 242, 214, 0.35);
    transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.stats-section--home .stat-number.stat-number--pulse {
    animation: home-stat-number-pop 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes home-stat-number-pop {
    0% {
        transform: scale(1);
    }
    45% {
        transform: scale(1.08);
    }
    100% {
        transform: scale(1);
    }
}

.stats-section--home .stat-label {
    color: rgba(244, 248, 248, 0.78);
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.4;
}

/* Perché IG — via di mezzo: generico + tre pilastri */
.home-why--balanced {
    padding: clamp(3.5rem, 7vw, 5rem) 0;
    background:
        radial-gradient(ellipse 70% 45% at 50% 0%, rgba(44, 158, 142, 0.06), transparent 60%),
        #ffffff;
}

.home-why-intro {
    max-width: 680px;
    margin: 0 auto 1.25rem;
    padding: 0;
    text-align: center;
    background: transparent;
    border: none;
    box-shadow: none;
}

.home-why-intro__title {
    margin: 0 0 0.75rem;
    font-size: clamp(1.9rem, 4.5vw, 2.75rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.12;
    color: var(--primary-color, #003731);
    background: transparent;
}

.home-why-intro__accent {
    color: #0d8f7f;
}

.home-why-intro__lead {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--text-secondary, #5a5a5a);
    background: transparent;
}

.home-why--balanced .animate-on-scroll {
    transform: none;
}

.home-why--balanced .animate-on-scroll.animated {
    transform: none;
}

.home-why-spine {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.35rem 0.5rem;
    margin: 0 auto 2.25rem;
    padding: 0;
    max-width: 920px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #5a6a67;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.home-why-spine__dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #0d8f7f;
    opacity: 0.55;
}

.home-why--balanced .home-why-pillars.vision-columns {
    margin: 0 0 1.75rem;
}

.home-why--balanced .home-why-pillar {
    background: #ffffff;
    color: var(--text-primary, #1a1a1a);
    padding: 2rem 1.75rem;
    border-radius: 16px;
    border: 1px solid rgba(0, 55, 49, 0.1);
    box-shadow: 0 8px 28px rgba(0, 31, 28, 0.06);
    text-align: left;
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.home-why--balanced .home-why-pillar::before {
    background: linear-gradient(to bottom, #0d8f7f, #003731);
}

.home-why--balanced .home-why-pillar:hover {
    transform: translateY(-6px);
    border-color: rgba(44, 158, 142, 0.28);
    box-shadow: 0 14px 36px rgba(0, 31, 28, 0.1);
}

.home-why--balanced .benefit-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 1.15rem;
    color: #0d8f7f;
}

.home-why--balanced .home-why-pillar h3 {
    margin: 0 0 0.65rem;
    font-size: 1.12rem;
    color: var(--primary-color, #003731);
}

.home-why--balanced .home-why-pillar p {
    margin: 0;
    font-size: 0.94rem;
    line-height: 1.6;
    color: var(--text-secondary, #5a5a5a);
}

.home-why-trust--center {
    margin: 1.75rem 0 0;
    text-align: center;
}

/* Partnership ed eventi */
.home-news-section--field {
    background: #ffffff;
}

.home-news-intro {
    max-width: 640px;
    margin: 0 auto 2rem;
    padding: 0;
    text-align: center;
    background: transparent;
    border: none;
    box-shadow: none;
}

.home-news-intro__title {
    margin: 0 0 0.65rem;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--text-primary, #1a1a1a);
    background: transparent;
}

.home-news-intro__lead {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--text-secondary, #5a5a5a);
    background: transparent;
}

.home-news-section--field.home-section {
    margin: 0;
    padding-top: clamp(3.5rem, 7vw, 5rem);
    padding-bottom: clamp(3rem, 6vw, 4rem);
}

.home-news-section--field .animate-on-scroll {
    transform: none;
}

.home-news-section--field .animate-on-scroll.animated {
    transform: none;
}

.stats-section--home .stat-card {
    opacity: 0;
    transform: translateY(28px) scale(0.96);
    transition:
        opacity 0.65s ease,
        transform 0.65s cubic-bezier(0.2, 0.8, 0.2, 1),
        box-shadow 0.35s ease,
        border-color 0.35s ease;
}

.stats-section--home .stat-card--revealed {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.stats-section--home .stat-card--revealed:hover {
    transform: translateY(-6px) scale(1.02);
}

.stats-section--home .stat-card:nth-child(1) { transition-delay: 0ms; }
.stats-section--home .stat-card:nth-child(2) { transition-delay: 80ms; }
.stats-section--home .stat-card:nth-child(3) { transition-delay: 160ms; }
.stats-section--home .stat-card:nth-child(4) { transition-delay: 240ms; }

@media (prefers-reduced-motion: reduce) {
    .stats-section--home .stat-card {
        opacity: 1;
        transform: none;
        transition: box-shadow 0.35s ease, border-color 0.35s ease;
        transition-delay: 0ms !important;
    }

    .stats-section--home .stat-icon {
        animation: none;
    }

    .stats-section--home .stat-number.stat-number--pulse {
        animation: none;
    }
}

@media (min-width: 769px) {
    .stats-section--home .stat-icon {
        animation: home-stat-icon-pulse 3.5s ease-in-out infinite;
    }
}

@keyframes home-stat-icon-pulse {
    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.06);
        opacity: 0.88;
    }
}

/* News */

.home-news-all-btn {
    background: #003731;
    color: #fff;
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    display: inline-block;
    font-weight: 600;
}

.home-news-all-btn:hover {
    background: var(--primary-dark, #002a26);
    color: #fff;
}

@media (min-width: 1280px) {
    .home-section__header {
        max-width: 800px;
    }

    .stats-section--home__header {
        max-width: 720px;
    }

    .stats-section--home .stat-number {
        font-size: clamp(2.5rem, 4vw, 3.35rem);
    }

    .home-news-section .home-section__header {
        max-width: 800px;
    }
}

@media (max-width: 768px) {
    .home-why-spine {
        font-size: 0.78rem;
        letter-spacing: 0.02em;
        gap: 0.4rem 0.55rem;
        line-height: 1.35;
    }
}

@media (max-width: 768px) {
    .home-svc-quick {
        flex-direction: column;
        align-items: stretch;
    }

    .home-svc-quick__label {
        text-align: center;
        margin-right: 0;
        margin-bottom: 0.25rem;
    }

    .home-svc-quick__chip {
        text-align: center;
    }

    .stats-section--home .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .stats-section--home .stat-card {
        padding: 1.5rem 1rem;
    }

    .stats-section--home .stat-number {
        font-size: 2.1rem;
    }
}

@media (max-width: 480px) {
    .stats-section--home .stats-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 992px) {
    .stats-section--home .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
