/* ==========================================================================
   ControlAuto - Foglio di stile principale
   Palette e tipografia identiche al tema originale:
   #2e4751 (blu petrolio) - #f4c70e (giallo) - #f4f5fa / #ced6ea / #a6abcd
   Titoli: Kumbh Sans - Testo: Mulish
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Variabili e reset
   -------------------------------------------------------------------------- */
:root {
    --brand-primary: #2e4751;
    --brand-primary-dark: #22353d;
    --brand-primary-soft: rgba(46, 71, 81, 0.08);
    --brand-accent: #f4c70e;
    --brand-accent-dark: #8a6d05;
    --brand-light: #f4f5fa;
    --brand-border: #ced6ea;
    --brand-muted: #a6abcd;
    --text: #2e4751;
    --text-soft: #5b6b73;
    --white: #ffffff;

    --font-headings: 'Kumbh Sans', Arial, Helvetica, sans-serif;
    --font-body: 'Mulish', Arial, Helvetica, sans-serif;

    --header-height: 88px;
    /* Quanto la scheda dei quattro valori risale sopra il video dell'hero */
    --values-overlap: clamp(4rem, 8vw, 7rem);
    --radius: 14px;
    --radius-lg: 22px;
    --shadow-sm: 0 2px 10px rgba(46, 71, 81, 0.06);
    --shadow-md: 0 12px 34px rgba(46, 71, 81, 0.10);
    --shadow-lg: 0 24px 60px rgba(46, 71, 81, 0.14);
    --transition: 0.25s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-height) + 16px); }

body {
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--text);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
a { color: var(--brand-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--brand-accent-dark); }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-headings);
    font-weight: 700;
    line-height: 1.2;
    color: var(--brand-primary);
}

h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }

p + p { margin-top: 1rem; }

:focus-visible {
    outline: 3px solid var(--brand-accent);
    outline-offset: 3px;
}

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

.skip-link {
    position: absolute;
    left: -9999px;
}
.skip-link:focus {
    left: 1rem;
    top: 1rem;
    z-index: 2000;
    background: var(--brand-primary);
    color: var(--white);
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius);
}

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

/* --------------------------------------------------------------------------
   2. Bottoni
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--font-headings);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    padding: 0.85rem 1.75rem;
    border: 2px solid transparent;
    border-radius: 999px;
    cursor: pointer;
    transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.btn-primary {
    background: var(--brand-accent);
    color: var(--brand-primary);
    border-color: var(--brand-accent);
}
.btn-primary:hover {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    color: var(--brand-primary);
    border-color: var(--brand-primary);
}
.btn-outline:hover {
    background: var(--brand-primary);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-light {
    background: var(--white);
    color: var(--brand-primary);
    border-color: var(--white);
}
.btn-light:hover { background: var(--brand-accent); border-color: var(--brand-accent); }

.btn-lg { padding: 1rem 2.25rem; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-header { padding: 0.7rem 1.5rem; font-size: 0.85rem; letter-spacing: 0.06em; }

.icon-inline { flex-shrink: 0; }

/* --------------------------------------------------------------------------
   3. Header e navigazione
   -------------------------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--brand-border);
    transition: box-shadow var(--transition);
}
.site-header.is-scrolled { box-shadow: var(--shadow-sm); }

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    height: var(--header-height);
}

.site-logo img { width: 180px; height: auto; }

.main-nav { flex: 1; display: flex; justify-content: center; }

.nav-menu { display: flex; align-items: center; gap: 2.25rem; }

.nav-link {
    font-family: var(--font-headings);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--brand-primary);
    position: relative;
    padding: 0.35rem 0;
}
.nav-link::after {
    content: '';
    position: absolute;
    left: 0; bottom: 0;
    width: 0; height: 2px;
    background: var(--brand-accent);
    transition: width var(--transition);
}
.nav-link:hover::after, .nav-link.is-current::after { width: 100%; }
.nav-link.is-current { color: var(--brand-primary); }

.header-actions { display: flex; align-items: center; gap: 1rem; }

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px; height: 44px;
    background: transparent;
    border: 0;
    cursor: pointer;
}
.menu-toggle span {
    display: block;
    height: 2px;
    width: 26px;
    background: var(--brand-primary);
    border-radius: 2px;
    transition: transform var(--transition), opacity var(--transition);
}
.menu-toggle.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.is-active span:nth-child(2) { opacity: 0; }
.menu-toggle.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
    position: fixed;
    top: var(--header-height);
    left: 0; right: 0; bottom: 0;
    background: var(--white);
    z-index: 999;
    overflow-y: auto;
    padding: 1.5rem;
}
.mobile-menu[hidden] { display: none; }
.mobile-nav-menu { display: flex; flex-direction: column; gap: 0.25rem; }
.mobile-nav-item { border-bottom: 1px solid var(--brand-light); }
.mobile-nav-item:last-child { border-bottom: 0; padding-top: 1.25rem; }
.mobile-nav-link {
    display: block;
    padding: 1rem 0.25rem;
    font-family: var(--font-headings);
    font-weight: 600;
    font-size: 1.15rem;
}
.mobile-nav-link.is-current { color: var(--brand-accent-dark); }

/* --------------------------------------------------------------------------
   4. Hero con video di sfondo
   -------------------------------------------------------------------------- */
.hero-video-section {
    position: relative;
    display: flex;
    align-items: center;
    min-height: min(760px, 92vh);
    /* Il padding-bottom generoso lascia scorrere il video sotto al testo:
       lì sopra si sovrappone la scheda dei quattro valori. */
    padding: clamp(5rem, 12vh, 9rem) 0 clamp(9rem, 20vh, 14rem);
    overflow: hidden;
    background: var(--brand-primary-dark);
    isolation: isolate;
}

.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Leggera desaturazione: il testo resta sempre leggibile sopra le riprese */
    filter: saturate(0.85) contrast(1.02);
}
.hero-scrim {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(100deg, rgba(34, 53, 61, 0.92) 0%, rgba(34, 53, 61, 0.78) 38%, rgba(34, 53, 61, 0.35) 72%, rgba(34, 53, 61, 0.55) 100%),
        linear-gradient(180deg, rgba(34, 53, 61, 0.35) 0%, rgba(34, 53, 61, 0) 30%, rgba(34, 53, 61, 0.6) 100%);
}

.hero-inner { position: relative; }
.hero-text { max-width: 42rem; }

.hero-title { color: var(--white); margin-bottom: 1.75rem; }
.hero-line {
    display: block;
    /* Ogni riga entra da sotto una maschera: apertura sobria, senza rimbalzi */
    clip-path: inset(0 0 -0.2em 0);
}
.hero-line > span { display: block; }
.hero-title-accent { color: var(--white); }
.hero-title-accent::after {
    content: '';
    display: block;
    width: 88px; height: 5px;
    margin-top: 1.5rem;
    background: var(--brand-accent);
    border-radius: 3px;
    transform-origin: left center;
}

.hero-subtitle {
    font-family: var(--font-body);
    font-size: clamp(1.02rem, 1.5vw, 1.18rem);
    font-weight: 400;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.86);
    max-width: 46ch;
    margin-bottom: 2.5rem;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }

.btn-ghost {
    background: transparent;
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.7);
}
.btn-ghost:hover {
    background: var(--white);
    border-color: var(--white);
    color: var(--brand-primary);
    transform: translateY(-2px);
}

.hero-video-toggle {
    position: absolute;
    right: 1.5rem;
    /* Sopra il bordo della scheda dei valori, che copre la parte bassa del video */
    bottom: calc(var(--values-overlap) + 1.5rem);
    z-index: 3;
    width: 42px; height: 42px;
    display: flex; align-items: center; justify-content: center;
    color: var(--white);
    background: rgba(34, 53, 61, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition);
}
.hero-video-toggle:hover { background: rgba(34, 53, 61, 0.85); border-color: var(--brand-accent); }
.hero-video-toggle .icon-play { display: none; }
.hero-video-toggle[aria-pressed="true"] .icon-play { display: block; }
.hero-video-toggle[aria-pressed="true"] .icon-pause { display: none; }

/* Apertura dell'hero: le righe del titolo salgono, poi CTA e sottotitolo */
@media (prefers-reduced-motion: no-preference) {
    .hero-line > span,
    .hero-subtitle,
    .hero-actions { animation: heroRise 0.9s cubic-bezier(0.22, 0.61, 0.36, 1) both; }
    .hero-line:nth-child(1) > span { animation-delay: 0.05s; }
    .hero-line:nth-child(2) > span { animation-delay: 0.18s; }
    .hero-subtitle { animation-delay: 0.34s; }
    .hero-actions { animation-delay: 0.46s; }
    .hero-title-accent::after { animation: heroRule 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) 0.62s both; }
}

@keyframes heroRise {
    from { opacity: 0; transform: translateY(1.1em); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes heroRule {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

/* --------------------------------------------------------------------------
   5. Sezioni generiche
   -------------------------------------------------------------------------- */
.section { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.section-light { background: var(--brand-light); }

.section-header { max-width: 760px; margin: 0 auto clamp(2.5rem, 5vw, 3.5rem); text-align: center; }
.section-header-left { margin-left: 0; text-align: left; }

.eyebrow {
    font-family: var(--font-headings);
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--brand-accent-dark);
    margin-bottom: 0.75rem;
}

.section-subtitle { color: var(--text-soft); margin-top: 1rem; }

.section-header-light .eyebrow { color: var(--brand-accent); }
.section-header-light h2 { color: var(--white); }

/* --------------------------------------------------------------------------
   6. Macro-aree (3 schede affiancate)
   -------------------------------------------------------------------------- */
.areas-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.area-card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.area-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--brand-accent);
}

.area-icon {
    width: 68px; height: 68px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 18px;
    background: var(--brand-light);
    color: var(--brand-primary);
    margin-bottom: 1.5rem;
}
.area-card:hover .area-icon { background: var(--brand-accent); }

.area-title { font-size: clamp(1.2rem, 2vw, 1.45rem); margin-bottom: 1rem; }
.area-description { color: var(--text-soft); margin-bottom: 2rem; }
.area-card .btn-area { margin-top: auto; align-self: flex-start; }

/* --------------------------------------------------------------------------
   7. Metodo operativo — schede collegate da una linea che avanza con lo scroll
   -------------------------------------------------------------------------- */
.section-method { background: var(--brand-light); overflow: hidden; }

.method-wrap { position: relative; --progress: 0; padding-top: 26px; }

.method-track {
    position: absolute;
    top: 11px;
    /* Dal centro del primo marker a quello dell'ultimo (4 colonne, gap 2rem) */
    left: 12px;
    right: calc((100% - 6rem) / 4 - 12px);
    height: 4px;
    background: var(--brand-border);
    border-radius: 2px;
    overflow: hidden;
}
.method-track-fill {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--brand-accent), #ffd94a);
    border-radius: 2px;
    transform-origin: left center;
    transform: scaleX(var(--progress));
}

.method-timeline {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    position: relative;
}

.method-step { position: relative; transition: transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1); }

.method-marker {
    position: absolute;
    top: -26px; left: 0;
    width: 24px; height: 24px;
    display: grid;
    place-items: center;
}
.method-marker-dot {
    width: 24px; height: 24px;
    border-radius: 50%;
    background: var(--brand-light);
    border: 3px solid var(--brand-border);
    transition: background 0.35s ease, border-color 0.35s ease, transform 0.45s cubic-bezier(0.34, 1.4, 0.64, 1);
}
.method-step.is-on .method-marker-dot {
    background: var(--brand-accent);
    border-color: var(--brand-accent);
    transform: scale(1.12);
}

/* Onda che parte dal nodo nell'istante in cui la linea lo raggiunge */
.method-marker-ring {
    position: absolute;
    width: 24px; height: 24px;
    border-radius: 50%;
    border: 2px solid var(--brand-accent);
    opacity: 0;
    pointer-events: none;
}
.method-step.is-on .method-marker-ring { animation: methodPing 0.85s cubic-bezier(0.22, 0.61, 0.36, 1) forwards; }

@keyframes methodPing {
    0% { opacity: 0.85; transform: scale(1); }
    100% { opacity: 0; transform: scale(2.6); }
}

.method-card {
    position: relative;
    overflow: hidden;
    height: 100%;
    background: var(--white);
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-lg);
    padding: 1.75rem 1.5rem 1.5rem;
    transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.5s ease, border-color 0.4s ease;
}
.method-step.is-on .method-card {
    border-color: var(--brand-accent);
    box-shadow: var(--shadow-md);
}
.method-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

/* Numero grande in filigrana: dà peso alla sequenza senza aggiungere rumore */
.method-ghost {
    position: absolute;
    top: -0.25em; right: 0.1em;
    font-family: var(--font-headings);
    font-weight: 700;
    font-size: 5.5rem;
    line-height: 1;
    color: var(--brand-light);
    transition: color 0.45s ease;
    pointer-events: none;
}
.method-step.is-on .method-ghost { color: rgba(244, 199, 14, 0.22); }

.method-icon {
    position: relative;
    display: inline-flex;
    width: 46px; height: 46px;
    align-items: center; justify-content: center;
    border-radius: 14px;
    background: var(--brand-light);
    color: var(--brand-muted);
    margin-bottom: 1.1rem;
    transition: background 0.4s ease, color 0.4s ease;
}
.method-step.is-on .method-icon { background: var(--brand-accent); color: var(--brand-primary); }

.method-number {
    position: relative;
    font-family: var(--font-headings);
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.16em;
    color: var(--brand-muted);
    margin-bottom: 0.3rem;
    transition: color 0.4s ease;
}
.method-step.is-on .method-number { color: var(--brand-accent-dark); }

.method-title { position: relative; font-size: 1.18rem; margin-bottom: 0.6rem; }
.method-text { position: relative; color: var(--text-soft); font-size: 0.95rem; }

/* Le schede non ancora raggiunte restano leggibili ma in secondo piano */
.js .method-step { opacity: 0.55; }
.js .method-step.is-on { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
    .js .method-step { opacity: 1; }
    .method-track-fill { transform: scaleX(1); }
    .method-marker-ring { display: none; }
}

/* --------------------------------------------------------------------------
   8. Social proof (3 grandi numeri)
   -------------------------------------------------------------------------- */
.section-stats { background: var(--brand-primary); color: var(--white); }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    text-align: center;
}

.stat-card { padding: 0 1rem; }

.stat-value {
    font-family: var(--font-headings);
    font-weight: 700;
    font-size: clamp(3.25rem, 7vw, 4.75rem);
    line-height: 1;
    color: var(--brand-accent);
    margin-bottom: 1rem;
}
.stat-suffix { font-size: 0.55em; vertical-align: super; }

.stat-text { color: rgba(255, 255, 255, 0.82); font-size: 0.98rem; max-width: 32ch; margin: 0 auto; }

/* --------------------------------------------------------------------------
   9. Partner
   -------------------------------------------------------------------------- */
.section-partners { padding: clamp(2.5rem, 5vw, 4rem) 0; }
.partners-title {
    text-align: center;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-soft);
    margin-bottom: 2.25rem;
}
.partners-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: clamp(1.5rem, 4vw, 3.5rem);
}
.partners-grid img {
    width: 140px;
    height: auto;
    filter: grayscale(1);
    opacity: 0.6;
    transition: filter var(--transition), opacity var(--transition);
}
.partners-grid img:hover { filter: grayscale(0); opacity: 1; }

/* --------------------------------------------------------------------------
   10. CTA finale
   -------------------------------------------------------------------------- */
.section-cta { padding-bottom: clamp(3.5rem, 7vw, 6rem); }
.cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
    background: var(--brand-light);
    border-radius: var(--radius-lg);
    padding: clamp(2rem, 4vw, 3.25rem);
}
.cta-inner h2 { margin-bottom: 0.75rem; }
.cta-inner p { color: var(--text-soft); max-width: 56ch; }
/* Due azioni affiancate: su schermi stretti vanno una sotto l'altra */
.cta-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* Richiamo alla piattaforma che eroga il servizio (ControlGo) */
.platform-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: clamp(1.5rem, 4vw, 3rem);
    background: var(--brand-primary);
    color: rgba(255, 255, 255, 0.82);
    border-radius: var(--radius-lg);
    padding: clamp(2rem, 4vw, 3.25rem);
    box-shadow: var(--shadow-lg);
}
.platform-card h2 { color: var(--white); margin-bottom: 0.75rem; }
.platform-card .eyebrow { color: var(--brand-accent); border-color: rgba(255, 255, 255, 0.25); }
.platform-text { max-width: 62ch; }
.platform-card .check-list { margin-top: 1.5rem; }
.platform-card .check-list li { color: rgba(255, 255, 255, 0.82); }
.platform-card .check-list svg { color: var(--brand-accent); }
.platform-card .btn-primary { margin-top: 1.75rem; }

.platform-mark {
    display: grid;
    place-items: center;
    width: clamp(96px, 12vw, 132px);
    aspect-ratio: 1;
    border-radius: 50%;
    background: rgba(244, 199, 14, 0.12);
    border: 1px solid rgba(244, 199, 14, 0.35);
    color: var(--brand-accent);
}

@media (max-width: 860px) {
    .platform-card { grid-template-columns: 1fr; }
    .platform-mark { order: -1; }
}

/* --------------------------------------------------------------------------
   11. Pagine interne
   -------------------------------------------------------------------------- */
/* Testata comune a tutte le pagine interne: stessa fascia, stesso
   allineamento a sinistra, stessa scaletta briciole → occhiello → titolo →
   sommario. Il fondo riprende il blu petrolio del brand con un alone giallo
   in alto a sinistra, come la scheda mappa e la fascia pilastri. */
.page-hero,
.service-hero {
    position: relative;
    isolation: isolate;
    background:
        radial-gradient(120% 150% at 10% -10%, rgba(244, 199, 14, 0.18), rgba(244, 199, 14, 0) 55%),
        linear-gradient(180deg, var(--brand-primary) 0%, var(--brand-primary-dark) 100%);
    color: rgba(255, 255, 255, 0.78);
    padding: clamp(2.75rem, 6vw, 4.5rem) 0;
    border-bottom: 1px solid rgba(244, 199, 14, 0.22);
}
.page-hero h1,
.service-hero h1 { color: var(--white); margin-bottom: 1rem; }
.page-hero .page-intro,
.service-hero .page-intro {
    color: rgba(255, 255, 255, 0.78);
    max-width: 68ch;
    font-size: 1.1rem;
}
.page-hero .eyebrow,
.service-hero .eyebrow { color: var(--brand-accent); border-color: rgba(255, 255, 255, 0.25); }
.page-hero .eyebrow a,
.service-hero .eyebrow a { color: var(--brand-accent); }

/* Il bottone secondario deve leggersi sul fondo scuro */
.page-hero .btn-outline,
.service-hero .btn-outline { color: var(--white); border-color: rgba(255, 255, 255, 0.45); }
.page-hero .btn-outline:hover,
.service-hero .btn-outline:hover { background: var(--white); color: var(--brand-primary); border-color: var(--white); }

.breadcrumbs { margin-bottom: 1.5rem; font-size: 0.875rem; color: var(--text-soft); }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.breadcrumbs li + li::before { content: '/'; margin-right: 0.5rem; color: var(--brand-muted); }
.breadcrumbs a { color: var(--text-soft); }
.breadcrumbs a:hover { color: var(--brand-primary); }

.page-hero .breadcrumbs,
.service-hero .breadcrumbs { color: rgba(255, 255, 255, 0.6); }
.page-hero .breadcrumbs a,
.service-hero .breadcrumbs a { color: rgba(255, 255, 255, 0.6); }
.page-hero .breadcrumbs a:hover,
.service-hero .breadcrumbs a:hover { color: var(--white); }
.page-hero .breadcrumbs li + li::before,
.service-hero .breadcrumbs li + li::before { color: rgba(255, 255, 255, 0.35); }

.prose p { color: var(--text-soft); }
.prose h2 { margin-bottom: 1rem; }
.prose h3 { margin: 2rem 0 0.75rem; }

.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
}
.split-media img { border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }

/* Griglia servizi */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.75rem;
}
.service-card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border: 1px solid var(--brand-border);
    border-radius: var(--radius);
    padding: 1.75rem;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--brand-accent); }
.service-card h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.service-tagline {
    font-family: var(--font-headings);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--brand-accent-dark);
    margin-bottom: 0.9rem;
}
/* Ultimo elemento della card: nessun margine sotto, il titolo fa da link */
.service-card p.service-text { color: var(--text-soft); font-size: 0.98rem; margin-bottom: 0; }

/* Elenco puntato con spunte */
.check-list { display: grid; gap: 0.9rem; margin-top: 1.5rem; }
.check-list li { display: flex; gap: 0.75rem; color: var(--text-soft); }
.check-list svg { flex-shrink: 0; color: var(--brand-accent-dark); margin-top: 4px; }

/* Valori aziendali */
.values-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.75rem; }
.value-card { text-align: center; padding: 2rem 1.25rem; background: var(--white); border: 1px solid var(--brand-border); border-radius: var(--radius); }
.value-card .value-icon { color: var(--brand-accent-dark); margin-bottom: 1rem; display: flex; justify-content: center; }
.value-card h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.value-card p { color: var(--text-soft); font-size: 0.95rem; }

/* Mission / Vision / Strategy */
.pillars-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.75rem; }
.pillar-card {
    background: var(--white);
    border-top: 4px solid var(--brand-accent);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 2rem;
}
.pillar-card h3 { margin-bottom: 1rem; }
.pillar-card p { color: var(--text-soft); }

/* Copertura nazionale */
.coverage-areas { display: grid; gap: 1.5rem; }
.coverage-area { border-left: 4px solid var(--brand-accent); padding-left: 1.25rem; }
.coverage-area h3 {
    font-size: 0.9rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin-bottom: 0.35rem;
}
.coverage-area p { color: var(--text-soft); }

/* Progetti */
.projects-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.75rem; }
.project-card {
    background: var(--white);
    border: 1px solid var(--brand-border);
    border-radius: var(--radius);
    padding: 2rem;
    transition: box-shadow var(--transition), transform var(--transition);
}
.project-card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.project-card h3 { margin-bottom: 0.75rem; }
.project-card p { color: var(--text-soft); }

/* Contatti */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.contact-cards { display: grid; gap: 1.25rem; }
.contact-card {
    display: flex;
    gap: 1rem;
    background: var(--white);
    border: 1px solid var(--brand-border);
    border-radius: var(--radius);
    padding: 1.5rem;
}
.contact-card svg { color: var(--brand-accent-dark); flex-shrink: 0; }
.contact-card h3 { font-size: 1.05rem; margin-bottom: 0.35rem; }
.contact-card p, .contact-card a { color: var(--text-soft); font-size: 0.98rem; }
.contact-card a:hover { color: var(--brand-primary); }

.contact-form { background: var(--brand-light); border-radius: var(--radius-lg); padding: clamp(1.75rem, 3vw, 2.5rem); }
.form-row { display: grid; gap: 1.25rem; margin-bottom: 1.25rem; }
.form-row-2 { grid-template-columns: 1fr 1fr; }
.form-field label {
    display: block;
    font-family: var(--font-headings);
    font-weight: 600;
    font-size: 0.88rem;
    margin-bottom: 0.4rem;
}
.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text);
    background: var(--white);
    border: 1px solid var(--brand-border);
    border-radius: 10px;
    padding: 0.8rem 1rem;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--brand-accent);
    box-shadow: 0 0 0 3px rgba(244, 199, 14, 0.25);
}
.form-field textarea { min-height: 150px; resize: vertical; }
.form-consent { display: flex; gap: 0.65rem; align-items: flex-start; font-size: 0.9rem; color: var(--text-soft); margin-bottom: 1.5rem; }
.form-consent input { margin-top: 5px; }
.form-hp { position: absolute; left: -9999px; }

.form-message { border-radius: 10px; padding: 1rem 1.25rem; margin-bottom: 1.5rem; font-size: 0.95rem; }
.form-message-success { background: rgba(28, 198, 145, 0.12); border: 1px solid rgba(28, 198, 145, 0.5); }
.form-message-error { background: rgba(207, 46, 46, 0.08); border: 1px solid rgba(207, 46, 46, 0.35); }

/* 404 */
.error-page { text-align: center; padding: clamp(4rem, 10vw, 7rem) 0; }
.error-code {
    font-family: var(--font-headings);
    font-size: clamp(5rem, 15vw, 9rem);
    font-weight: 700;
    line-height: 1;
    color: var(--brand-accent);
}
.error-page p { color: var(--text-soft); max-width: 52ch; margin: 1rem auto 2rem; }

/* --------------------------------------------------------------------------
   12. Footer
   -------------------------------------------------------------------------- */
.site-footer {
    background: var(--brand-primary);
    color: rgba(255, 255, 255, 0.82);
    padding: clamp(3rem, 6vw, 4.5rem) 0 2rem;
}
.site-footer a { color: rgba(255, 255, 255, 0.82); }
.site-footer a:hover { color: var(--brand-accent); }

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr 1fr;
    gap: clamp(2rem, 5vw, 3.5rem);
    padding-bottom: 2.5rem;
}

.footer-logo { width: 200px; }
.footer-tagline { margin-top: 1rem; font-size: 0.95rem; color: rgba(255, 255, 255, 0.65); }

.footer-heading {
    font-size: 1.05rem;
    color: var(--white);
    margin-bottom: 1.25rem;
}

.footer-locations, .footer-contacts, .footer-links { display: grid; gap: 0.85rem; font-size: 0.95rem; }
.footer-locations li, .footer-contacts li, .footer-hours { display: flex; gap: 0.65rem; align-items: flex-start; }
.footer-icon { flex-shrink: 0; color: var(--brand-accent); margin-top: 4px; }
.footer-locations strong, .footer-hours strong { color: var(--white); font-weight: 600; }
.footer-contacts { margin-top: 1.5rem; }
.footer-links { margin-top: 1.75rem; }

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.875rem;
}
.footer-legal-links { display: flex; gap: 1.25rem; }

.back-to-top {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    width: 46px; height: 46px;
    display: flex; align-items: center; justify-content: center;
    background: var(--brand-primary);
    color: var(--white);
    border-radius: 50%;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity var(--transition), visibility var(--transition), transform var(--transition), background var(--transition);
    z-index: 900;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--brand-accent); color: var(--brand-primary); }

/* --------------------------------------------------------------------------
   13. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
    /* Con 5 voci di menu lo spazio fra logo e CTA si riduce: stringiamo il passo */
    .nav-menu { gap: 1.35rem; }
    .nav-link { font-size: 0.9rem; }

    .areas-grid { grid-template-columns: 1fr; max-width: 640px; margin: 0 auto; }
    .method-timeline { grid-template-columns: repeat(2, 1fr); row-gap: 2.5rem; }
    .method-timeline::before { display: none; }
    .values-grid { grid-template-columns: repeat(2, 1fr); }
    .pillars-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
    .main-nav { display: none; }
    .menu-toggle { display: flex; }
    .btn-header { display: none; }

    .hero-inner { grid-template-columns: 1fr; text-align: left; }
    .hero-visual { order: -1; max-width: 360px; margin: 0 auto; }
    .hero-subtitle { max-width: none; }

    .split, .contact-grid { grid-template-columns: 1fr; }
    .projects-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr; gap: 3rem; }
}

@media (max-width: 640px) {
    body { font-size: 1rem; }
    .method-timeline { grid-template-columns: 1fr; }
    .values-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .form-row-2 { grid-template-columns: 1fr; }
    .cta-inner { flex-direction: column; align-items: flex-start; }
    .hero-actions .btn { width: 100%; }
}

/* --------------------------------------------------------------------------
   14. Preferenze utente
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

@media print {
    .site-header, .mobile-menu, .back-to-top, .section-cta { display: none !important; }
    body { color: #000; }
}

/* --------------------------------------------------------------------------
   15. Blog — archivio News & Insights
   -------------------------------------------------------------------------- */
.archive-search {
    display: flex;
    gap: 0.75rem;
    max-width: 520px;
    margin-top: 2rem;
}
.archive-search input {
    flex: 1;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text);
    background: var(--white);
    border: 1px solid var(--brand-border);
    border-radius: 999px;
    padding: 0.8rem 1.25rem;
}
.archive-search input:focus {
    outline: none;
    border-color: var(--brand-accent);
    box-shadow: 0 0 0 3px rgba(244, 199, 14, 0.25);
}

.category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
}
.category-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-headings);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--brand-primary);
    background: var(--white);
    border: 1px solid var(--brand-border);
    border-radius: 999px;
    padding: 0.55rem 1.15rem;
    transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.category-btn:hover { border-color: var(--brand-accent); color: var(--brand-primary); }
.category-btn.is-active { background: var(--brand-primary); border-color: var(--brand-primary); color: var(--white); }
.category-count {
    font-size: 0.75rem;
    background: var(--brand-light);
    color: var(--brand-primary);
    border-radius: 999px;
    padding: 0.1rem 0.5rem;
}
.category-btn.is-active .category-count { background: rgba(255, 255, 255, 0.2); color: var(--white); }

.archive-result-info { color: var(--text-soft); margin-bottom: 2rem; }

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.article-card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.article-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--brand-accent); }

.article-card-media {
    display: block;
    aspect-ratio: 16 / 9;
    background: var(--brand-light);
    overflow: hidden;
}
.article-card-media img { width: 100%; height: 100%; object-fit: cover; }
.article-card-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--brand-muted);
}

.article-card-content { display: flex; flex-direction: column; flex: 1; padding: 1.75rem; }
.article-card-category {
    font-family: var(--font-headings);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--brand-accent-dark);
    margin-bottom: 0.75rem;
}
.article-card h2, .article-card h3 { font-size: 1.25rem; margin-bottom: 0.75rem; }
.article-card h2 a, .article-card h3 a { color: var(--brand-primary); }
.article-card h2 a:hover, .article-card h3 a:hover { color: var(--brand-accent-dark); }
.article-card p { color: var(--text-soft); font-size: 0.97rem; }

.article-card-footer {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: auto;
    padding-top: 1.5rem;
    font-size: 0.85rem;
    color: var(--brand-muted);
}

.no-articles { text-align: center; padding: 4rem 0; }
.no-articles p { color: var(--text-soft); margin-bottom: 1.5rem; }

.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3.5rem;
}
.pagination a, .pagination span {
    font-family: var(--font-headings);
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid var(--brand-border);
    border-radius: 10px;
    padding: 0.5rem 0.95rem;
}
.pagination a:hover { border-color: var(--brand-accent); }
.pagination .current { background: var(--brand-primary); border-color: var(--brand-primary); color: var(--white); }
.pagination .disabled { color: var(--brand-muted); border-color: var(--brand-light); }

/* --------------------------------------------------------------------------
   16. Blog — pagina articolo
   -------------------------------------------------------------------------- */
/* La testata è su fondo scuro: categoria in giallo pieno e metadati chiari */
.article-hero .eyebrow a { color: var(--brand-accent); }
.article-hero .article-meta { color: rgba(255, 255, 255, 0.6); }
.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-soft);
}
.article-meta time { display: inline-flex; align-items: center; gap: 0.4rem; }

.article-featured { margin-top: -2.5rem; }
.article-featured img {
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.article-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
}

.article-content { max-width: 68ch; }
.article-content section + section { margin-top: 2.5rem; }
.article-content h2 { margin-bottom: 1rem; }
.article-content p + p { margin-top: 1rem; }
.article-content ul, .article-content ol { margin: 1rem 0 0 1.25rem; color: var(--text-soft); }
.article-content ul li { list-style: disc; margin-bottom: 0.5rem; }
.article-content ol li { list-style: decimal; margin-bottom: 0.5rem; }
.article-content strong { color: var(--brand-primary); }

.article-toc {
    background: var(--brand-light);
    border-radius: var(--radius);
    padding: 1.5rem 1.75rem;
    margin-bottom: 2.5rem;
}
.article-toc h2 { font-size: 1rem; margin-bottom: 0.75rem; }
.article-toc ol { margin: 0; counter-reset: toc; }
.article-toc li { list-style: none; margin-bottom: 0.4rem; }
.article-toc a { font-size: 0.95rem; color: var(--text-soft); }
.article-toc a:hover { color: var(--brand-primary); }

.article-faq { margin-top: 3rem; }
.faq-item {
    border-bottom: 1px solid var(--brand-border);
    padding: 1rem 0;
}
.faq-item summary {
    font-family: var(--font-headings);
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; color: var(--brand-accent-dark); font-size: 1.3rem; line-height: 1; }
.faq-item[open] summary::after { content: '−'; }
.faq-item p { margin-top: 0.75rem; color: var(--text-soft); }

.article-nav { margin-top: 3rem; }

.article-sidebar { display: grid; gap: 1.5rem; position: sticky; top: calc(var(--header-height) + 1.5rem); }
.sidebar-box {
    background: var(--white);
    border: 1px solid var(--brand-border);
    border-radius: var(--radius);
    padding: 1.5rem;
}
.sidebar-box h2 { font-size: 1.05rem; margin-bottom: 1rem; }
.sidebar-box .check-list { margin-top: 0; }
.sidebar-cta { background: var(--brand-light); border-color: transparent; }
.sidebar-cta p { color: var(--text-soft); font-size: 0.95rem; margin-bottom: 1.25rem; }

.sidebar-articles { display: grid; gap: 1rem; }
.sidebar-articles a { display: grid; gap: 0.2rem; }
.sidebar-article-title { font-family: var(--font-headings); font-weight: 600; font-size: 0.95rem; color: var(--brand-primary); }
.sidebar-articles a:hover .sidebar-article-title { color: var(--brand-accent-dark); }
.sidebar-article-date { font-size: 0.8rem; color: var(--brand-muted); }

@media (max-width: 1024px) {
    .article-layout { grid-template-columns: 1fr; }
    .article-sidebar { position: static; }
}

/* --------------------------------------------------------------------------
   17. Fascia dei quattro valori (scheda bianca sovrapposta al video dell'hero)
   -------------------------------------------------------------------------- */
/* Niente foto di sfondo: la sezione risale sull'hero, così dietro la scheda
   continua lo stesso video. Il margine negativo è la parte di video che resta
   visibile ai lati e sopra la scheda. */
.values-section {
    position: relative;
    z-index: 2;
    margin-top: calc(-1 * var(--values-overlap));
    padding-bottom: clamp(3rem, 6vw, 5rem);
    background: transparent;
}
.values-section .container { position: relative; padding-top: 0; }

.values-card {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(1.5rem, 3vw, 2.75rem);
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: clamp(2rem, 4vw, 3rem);
}

.value-item { padding-left: 1.5rem; position: relative; }
.value-rule {
    position: absolute;
    left: 0; top: 0.15rem; bottom: 0.15rem;
    width: 3px;
    background: var(--brand-accent);
    border-radius: 3px;
    transform-origin: top center;
}
.js .value-rule { transform: scaleY(0); }
.value-item h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.value-item p { color: var(--text-soft); font-size: 0.97rem; }

/* La riga gialla si disegna dall'alto, poi entra il testo */
@media (prefers-reduced-motion: no-preference) {
    .js .value-item h3, .js .value-item p { opacity: 0; transform: translateY(8px); }
    [data-stagger].is-in .value-rule {
        animation: ruleDraw 0.55s cubic-bezier(0.22, 0.61, 0.36, 1) both;
        animation-delay: calc(var(--i) * 110ms);
    }
    [data-stagger].is-in .value-item h3 {
        animation: fadeUp 0.55s cubic-bezier(0.22, 0.61, 0.36, 1) both;
        animation-delay: calc(var(--i) * 110ms + 160ms);
    }
    [data-stagger].is-in .value-item p {
        animation: fadeUp 0.55s cubic-bezier(0.22, 0.61, 0.36, 1) both;
        animation-delay: calc(var(--i) * 110ms + 230ms);
    }
}
@media (prefers-reduced-motion: reduce) {
    .value-rule { transform: scaleY(1); }
}

@keyframes ruleDraw { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* --------------------------------------------------------------------------
   18. Blocco "Rileviamo i danni"
   -------------------------------------------------------------------------- */
.intro-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: start;
}
.intro-title { font-size: clamp(1.6rem, 3vw, 2.35rem); }
.intro-text p { color: var(--text-soft); }
.intro-mark {
    display: block;
    width: 74px;
    height: 3px;
    margin-top: 2rem;
    background: repeating-linear-gradient(90deg, var(--brand-border) 0 3px, transparent 3px 6px);
}

.eyebrow-underline {
    display: inline-block;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--brand-border);
}

/* --------------------------------------------------------------------------
   19. Mission / Vision / Strategy
   -------------------------------------------------------------------------- */
.section-pillars { background: var(--brand-primary); color: rgba(255, 255, 255, 0.85); }
.section-pillars h2, .section-pillars .pillars-tab { color: var(--white); }
.section-pillars .eyebrow { color: var(--brand-accent); border-color: rgba(255, 255, 255, 0.25); }

.pillars-media img { border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.pillars-content h2 { margin-bottom: 2rem; }

.pillars-tablist {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 1.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 0.85rem;
    margin-bottom: 1.5rem;
}
.pillars-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-headings);
    font-weight: 600;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.6);
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    transition: color var(--transition);
}
.pillars-tab:hover { color: var(--white); }
.pillars-tab.is-active { color: var(--white); }
.pillars-tab.is-active .icon { color: var(--brand-accent); }
/* L'icona della linguetta appena scelta fa un piccolo scatto */
.pillars-tab.is-active .icon { animation: tabIconPop 0.45s cubic-bezier(0.22, 0.61, 0.36, 1); }
@keyframes tabIconPop {
    0% { transform: scale(1) rotate(0); }
    45% { transform: scale(1.28) rotate(-8deg); }
    100% { transform: scale(1) rotate(0); }
}

/* Indicatore che scorre fra le linguette: in viaggio si allunga fino a
   coprire partenza e arrivo, poi si richiude sulla linguetta scelta. */
.pillars-indicator {
    position: absolute;
    bottom: -1px;
    left: 0;
    height: 3px;
    width: 0;
    background: var(--brand-accent);
    border-radius: 3px;
    box-shadow: 0 0 12px rgba(244, 199, 14, 0.45);
    transition: transform 0.34s cubic-bezier(0.22, 0.61, 0.36, 1), width 0.34s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Il JS ci scrive dentro una min-height pari al testo più lungo dei tre:
   cambiando linguetta il blocco resta fermo. La transizione serve solo
   quando la misura viene rifatta al ridimensionamento della finestra. */
.pillars-panels {
    position: relative;
    transition: min-height 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.pillars-panel { color: rgba(255, 255, 255, 0.82); }
.pillars-panel[hidden] { display: none; }
/* --dir vale 1 o -1: il testo entra dal lato da cui arriva l'indicatore */
.pillars-panel.is-active { animation: panelIn 0.5s cubic-bezier(0.22, 0.61, 0.36, 1) both; }
@keyframes panelIn {
    from { opacity: 0; transform: translate3d(calc(var(--dir, 1) * 28px), 0, 0); }
    to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .pillars-indicator { transition: none; }
    .pillars-panels { transition: none; }
    .pillars-panel.is-active { animation: none; }
    .pillars-tab.is-active .icon { animation: none; }
}

.pillars-support {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    display: grid;
    gap: 0.65rem;
    font-size: 0.9rem;
    letter-spacing: 0.04em;
}
.pillars-phone {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-headings);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--white);
}
.pillars-phone .icon { color: var(--brand-accent); }
.pillars-phone:hover { color: var(--brand-accent); }

/* --------------------------------------------------------------------------
   20. Comparse in sequenza (schede, numeri, loghi)
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
    .js [data-stagger] .area-card,
    .js [data-stagger] .stat-card {
        opacity: 0;
        transform: translateY(18px);
    }
    [data-stagger].is-in .area-card,
    [data-stagger].is-in .stat-card {
        animation: fadeUp 0.65s cubic-bezier(0.22, 0.61, 0.36, 1) both;
        animation-delay: calc(var(--i) * 110ms);
    }

    /* I loghi si scoprono da sinistra e prendono colore: come una stampa che si sviluppa */
    .js .partners-grid li {
        opacity: 0;
        clip-path: inset(0 100% 0 0);
    }
    [data-stagger].is-in .partners-grid > li,
    .partners-grid[data-stagger].is-in > li {
        animation: logoWipe 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) both;
        animation-delay: calc(var(--i) * 90ms);
    }
}

@keyframes logoWipe {
    from { opacity: 0; clip-path: inset(0 100% 0 0); transform: translateY(6px); }
    to { opacity: 1; clip-path: inset(0 0 0 0); transform: translateY(0); }
}

.partners-grid img { transition: filter 0.5s ease, opacity 0.5s ease, transform var(--transition); }
.partners-grid li:hover img { transform: translateY(-3px); }

/* --------------------------------------------------------------------------
   21. Responsive delle nuove sezioni
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
    .values-card { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
    .hero-video-section { min-height: 0; }
    .hero-text { max-width: none; }
    .intro-grid { grid-template-columns: 1fr; }
    .method-track { display: none; }
    .pillars-media { order: -1; }
}

@media (max-width: 640px) {
    .values-card { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   22. Fascia "Soluzioni progettate" (testo + indice dei servizi)
   -------------------------------------------------------------------------- */
.section-solutions { background: var(--brand-primary); color: rgba(255, 255, 255, 0.82); }
.section-solutions h2 { color: var(--white); }
.section-solutions .eyebrow { color: var(--brand-accent); border-color: rgba(255, 255, 255, 0.25); }
.section-solutions p { color: rgba(255, 255, 255, 0.78); }

.solutions-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: start;
}

.solutions-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2.5rem;
}
.solutions-icons li {
    width: 68px; height: 68px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: var(--white);
    transition: background var(--transition), transform var(--transition);
}
.solutions-icons li:hover { background: var(--brand-accent); color: var(--brand-primary); transform: translateY(-3px); }

.solutions-list { display: grid; gap: 0.35rem; }
.solutions-list a {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.5rem 0.5rem 0.5rem 0;
    font-family: var(--font-headings);
    font-weight: 600;
    font-size: 1.02rem;
    color: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    transition: color var(--transition), transform var(--transition), background var(--transition);
}
.solutions-arrow { display: inline-flex; color: var(--brand-accent); transition: transform var(--transition); }
.solutions-list a:hover { color: var(--brand-accent); transform: translateX(6px); }
.solutions-list a:hover .solutions-arrow { transform: translateX(3px); }

/* Le prime voci sono già in evidenza, come nella grafica originale */
.solutions-list li:nth-child(-n+4) a { color: var(--brand-accent); }

@media (prefers-reduced-motion: no-preference) {
    .js .solutions-list li { opacity: 0; transform: translateX(-10px); }
    [data-stagger].is-in.solutions-list li {
        animation: slideIn 0.5s cubic-bezier(0.22, 0.61, 0.36, 1) both;
        animation-delay: calc(var(--i) * 55ms);
    }
    .js .solutions-icons li { opacity: 0; }
    [data-stagger].is-in.solutions-icons li {
        animation: fadeUp 0.55s cubic-bezier(0.22, 0.61, 0.36, 1) both;
        animation-delay: calc(var(--i) * 90ms);
    }
}
@keyframes slideIn { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: translateX(0); } }

/* --------------------------------------------------------------------------
   23. Copertura nazionale
   -------------------------------------------------------------------------- */
.coverage-media img { width: 100%; max-width: 460px; margin: 0 auto; }

@media (prefers-reduced-motion: no-preference) {
    .js .coverage-area { opacity: 0; transform: translateY(12px); }
    [data-stagger].is-in .coverage-area {
        animation: fadeUp 0.6s cubic-bezier(0.22, 0.61, 0.36, 1) both;
        animation-delay: calc(var(--i) * 120ms);
    }
}

/* --------------------------------------------------------------------------
   24. Pagine servizio e macro-area
   -------------------------------------------------------------------------- */
.container-narrow { max-width: 820px; }
.lead { font-size: 1.15rem; color: var(--text-soft); }

/* Il fondo della testata servizio è quello comune (sezione 11) */
.service-hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2rem;
    align-items: center;
}
.service-hero h1 { margin-bottom: 1rem; }
.service-hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }
.service-hero-mark {
    width: 132px; height: 132px;
    display: grid; place-items: center;
    border-radius: 32px;
    background: var(--white);
    color: var(--brand-primary);
    box-shadow: var(--shadow-md);
}

.service-process {
    background: var(--brand-light);
    border-radius: var(--radius-lg);
    padding: clamp(1.75rem, 3vw, 2.5rem);
}
.service-process h2 { font-size: 1.3rem; margin-bottom: 1.5rem; }
.process-list { display: grid; gap: 1.5rem; counter-reset: process; }
.process-list li { display: flex; gap: 1rem; }
.process-number {
    flex-shrink: 0;
    width: 34px; height: 34px;
    display: grid; place-items: center;
    border-radius: 50%;
    background: var(--brand-accent);
    color: var(--brand-primary);
    font-family: var(--font-headings);
    font-weight: 700;
    font-size: 0.9rem;
}
.process-list h3 { font-size: 1.05rem; margin-bottom: 0.25rem; }
.process-list p { color: var(--text-soft); font-size: 0.95rem; }

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.75rem;
}
.benefit-card {
    background: var(--white);
    border: 1px solid var(--brand-border);
    border-radius: var(--radius);
    padding: 1.75rem;
}
.benefit-mark {
    display: inline-flex;
    width: 40px; height: 40px;
    align-items: center; justify-content: center;
    border-radius: 12px;
    background: var(--brand-accent);
    color: var(--brand-primary);
    margin-bottom: 1rem;
}
.benefit-card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.benefit-card p { color: var(--text-soft); font-size: 0.97rem; }

.area-count {
    font-family: var(--font-headings);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--brand-accent-dark);
    margin-bottom: 0.85rem;
}

@media (prefers-reduced-motion: no-preference) {
    .js .benefit-card, .js .process-list li, .js .service-card, .js .plus-card, .js .about-value, .js .about-stat, .js .project-showcase { opacity: 0; transform: translateY(16px); }
    [data-stagger].is-in .benefit-card,
    [data-stagger].is-in .process-list li,
    .process-list[data-stagger].is-in li,
    [data-stagger].is-in .service-card,
    [data-stagger].is-in .plus-card,
    [data-stagger].is-in .about-value,
    [data-stagger].is-in .about-stat,
    [data-stagger].is-in .project-showcase {
        animation: fadeUp 0.6s cubic-bezier(0.22, 0.61, 0.36, 1) both;
        animation-delay: calc(var(--i) * 110ms);
    }
}

/* --------------------------------------------------------------------------
   25. Chi Siamo — Controller Plus, numeri, valori, percorso
   -------------------------------------------------------------------------- */
.plus-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.plus-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
}
.plus-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
/* Niente overflow nascosto: il badge sporge sotto il bordo della foto e
   verrebbe tagliato a metà. L'immagine riempie comunque il riquadro. */
.plus-media { position: relative; aspect-ratio: 3 / 2; }
.plus-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.plus-icon {
    position: absolute;
    left: 1.25rem; bottom: -26px;
    width: 56px; height: 56px;
    display: grid; place-items: center;
    border-radius: 16px;
    background: var(--brand-accent);
    color: var(--brand-primary);
    /* L'anello bianco stacca il badge dalla foto, qualunque sia lo sfondo */
    box-shadow: 0 0 0 4px var(--white), 0 10px 24px rgba(46, 71, 81, 0.22);
    z-index: 2;
    transition: transform 0.4s cubic-bezier(0.34, 1.4, 0.5, 1), box-shadow var(--transition);
}
/* Passando sulla scheda il badge salta fuori e si lascia dietro un'onda */
.plus-card:hover .plus-icon {
    transform: translateY(-12px) scale(1.14) rotate(-8deg);
    box-shadow: 0 0 0 4px var(--white), 0 18px 34px rgba(46, 71, 81, 0.3);
}
.plus-icon::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 2px solid var(--brand-accent);
    opacity: 0;
    pointer-events: none;
}
.plus-card:hover .plus-icon::after { animation: iconRing 0.85s ease-out; }
@keyframes iconRing {
    from { transform: scale(1); opacity: 0.75; }
    to { transform: scale(1.9); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .plus-icon { transition: none; }
    .plus-card:hover .plus-icon { transform: none; }
    .plus-card:hover .plus-icon::after { animation: none; }
}
.plus-body { padding: 2.25rem 1.75rem 1.75rem; }
.plus-label {
    font-family: var(--font-headings);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--brand-muted);
    margin-bottom: 0.4rem;
}
.plus-body h3 { margin-bottom: 0.75rem; }
.plus-body p { color: var(--text-soft); font-size: 0.97rem; }

.about-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.about-stat {
    background: var(--brand-light);
    border-radius: var(--radius);
    padding: 1.75rem 1.25rem;
    text-align: center;
}
.about-stat-value {
    font-family: var(--font-headings);
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 2.75rem);
    line-height: 1;
    color: var(--brand-primary);
}
.about-stat-value span { color: var(--brand-accent-dark); font-size: 0.6em; vertical-align: super; }
.about-stat-label { margin-top: 0.6rem; font-size: 0.88rem; color: var(--text-soft); }

.about-values-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.75rem; }
.about-value {
    background: var(--white);
    border: 1px solid var(--brand-border);
    border-radius: var(--radius);
    padding: 2rem 1.75rem;
}
.about-value-icon {
    display: inline-flex;
    width: 52px; height: 52px;
    align-items: center; justify-content: center;
    border-radius: 16px;
    background: var(--brand-light);
    color: var(--brand-accent-dark);
    margin-bottom: 1.25rem;
}
.about-value h3 { font-size: 1.12rem; margin-bottom: 0.5rem; }
.about-value p { color: var(--text-soft); font-size: 0.97rem; }

/* Percorso storico: timeline verticale, la linea si disegna scorrendo */
.section-history { background: var(--brand-light); overflow: hidden; }
.history-wrap { position: relative; --progress: 0; max-width: 780px; margin: 0 auto; }

.history-track {
    position: absolute;
    top: 10px;
    bottom: 10px;
    left: 11px;
    width: 4px;
    background: var(--brand-border);
    border-radius: 2px;
    overflow: hidden;
}
.history-track-fill {
    display: block;
    width: 100%;
    height: 100%;
    background: var(--brand-accent);
    border-radius: 2px;
    transform-origin: center top;
    transform: scaleY(var(--progress));
}

.history-timeline { display: grid; gap: 2.75rem; }

.history-step {
    position: relative;
    padding-top: 0;
    padding-left: 4rem;
}
.history-step .method-marker { top: 2px; }

.history-year {
    font-family: var(--font-headings);
    font-weight: 700;
    font-size: 1.75rem;
    line-height: 1;
    color: var(--brand-accent-dark);
    margin-bottom: 0.5rem;
}
.history-step h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.history-text { color: var(--text-soft); font-size: 0.98rem; max-width: 60ch; }

.section-selection { padding-bottom: clamp(3.5rem, 7vw, 6rem); }
.selection-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
    background: var(--brand-primary);
    color: rgba(255, 255, 255, 0.85);
    border-radius: var(--radius-lg);
    padding: clamp(2rem, 4vw, 3.25rem);
}
.selection-inner h2 { color: var(--white); margin-bottom: 0.75rem; }
.selection-inner .eyebrow { color: var(--brand-accent); }
.selection-inner p { max-width: 62ch; }

/* --------------------------------------------------------------------------
   26. Progetti
   -------------------------------------------------------------------------- */
/* Titolo con l'evidenziatore giallo, usato fuori dalle testate */
.title-marked span {
    background: linear-gradient(180deg, transparent 62%, var(--brand-accent) 62%, var(--brand-accent) 92%, transparent 92%);
    padding: 0 0.15em;
}

.projects-list { display: grid; gap: 3rem; }
.project-showcase {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: clamp(2rem, 4vw, 3.5rem);
    align-items: center;
}
.project-visual {
    display: block;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: transform var(--transition);
}
.project-visual:hover { transform: translateY(-5px); }
.project-visual img { width: 100%; }
.project-body h2 { margin-bottom: 0.5rem; }
.project-claim {
    font-family: var(--font-headings);
    font-weight: 600;
    color: var(--brand-accent-dark);
    margin-bottom: 1rem;
}
.project-body p { color: var(--text-soft); }
.project-body .btn { margin-top: 2rem; }

/* --------------------------------------------------------------------------
   27. Chi Siamo — il team in sede: mosaico di scatti incorniciati
   -------------------------------------------------------------------------- */
.team-layout {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
}

/* Uno scatto largo in alto e due sotto, con quello di destra sfalsato verso
   il basso: gli originali sono tutti orizzontali, così nessuno viene
   tagliato per forzarlo in un riquadro verticale. */
.team-gallery {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(0.7rem, 1.6vw, 1.15rem);
    align-items: start;
}
.team-shot:nth-of-type(1) { grid-column: 1 / -1; }
.team-shot:nth-of-type(3) { margin-top: clamp(1rem, 3vw, 2.4rem); }

/* Cornice gialla sfalsata dietro al mosaico */
.team-frame-mark {
    position: absolute;
    inset: auto -14px -14px auto;
    width: 42%;
    height: 46%;
    border: 2px solid var(--brand-accent);
    border-radius: var(--radius-lg);
    opacity: 0.7;
    pointer-events: none;
}

.team-shot {
    position: relative;
    overflow: hidden;
    margin: 0;
    border-radius: var(--radius-lg);
    background: var(--brand-primary);
    box-shadow: var(--shadow-md);
    /* La cornice chiara stacca gli scatti dal fondo della sezione */
    outline: 1px solid rgba(255, 255, 255, 0.7);
    outline-offset: -1px;
    transition: transform var(--transition), box-shadow var(--transition);
}
.team-shot img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 3 / 2;
    transition: transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}
/* I due scatti in basso sono più stretti: un taglio 4:3 li tiene leggibili */
.team-shot:nth-of-type(2) img,
.team-shot:nth-of-type(3) img { aspect-ratio: 4 / 3; }

.team-shot figcaption {
    position: absolute;
    left: 0.85rem;
    bottom: 0.85rem;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    background: rgba(34, 53, 61, 0.82);
    color: var(--white);
    font-family: var(--font-headings);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    backdrop-filter: blur(6px);
    transform: translateY(6px);
    opacity: 0;
    transition: transform var(--transition), opacity var(--transition);
}
.team-shot:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.team-shot:hover img { transform: scale(1.06); }
.team-shot:hover figcaption { transform: translateY(0); opacity: 1; }

/* Sul touch non esiste il passaggio del mouse: le targhette restano visibili */
@media (hover: none) {
    .team-shot figcaption { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: no-preference) {
    .js [data-stagger].team-gallery .team-shot { opacity: 0; transform: translateY(22px); }
    [data-stagger].is-in .team-shot {
        animation: fadeUp 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) both;
        animation-delay: calc(var(--i) * 140ms);
    }
}

/* --------------------------------------------------------------------------
   28. Responsive delle pagine interne
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
    .solutions-grid { grid-template-columns: 1fr; }
    .plus-grid, .about-values-grid { grid-template-columns: 1fr; max-width: 560px; margin: 0 auto; }
    .team-layout { grid-template-columns: 1fr; }
    .team-gallery { order: -1; }
}

/* Sotto i 700px il mosaico diventa una fila sola: tre riquadri stretti
   affiancati non si leggerebbero più. */
@media (max-width: 700px) {
    .team-gallery { grid-template-columns: 1fr; }
    .team-shot { grid-column: 1 / -1; grid-row: auto; }
    .team-shot:nth-of-type(3) { margin-top: 0; }
    .team-shot:nth-of-type(2) img,
    .team-shot:nth-of-type(3) img { aspect-ratio: 3 / 2; }
    .team-frame-mark { display: none; }
}

@media (max-width: 900px) {
    .service-hero-inner { grid-template-columns: 1fr; }
    .service-hero-mark { display: none; }
    .project-showcase { grid-template-columns: 1fr; }
    .about-stats { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 640px) {
    .about-stats { grid-template-columns: 1fr; }
    .selection-inner { flex-direction: column; align-items: flex-start; }
}

/* --------------------------------------------------------------------------
   29. Copertura nazionale — mappa interattiva
   -------------------------------------------------------------------------- */
.coverage-grid {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
}

.map-card {
    position: relative;
    background: var(--brand-primary);
    border-radius: var(--radius-lg);
    padding: clamp(1.5rem, 3vw, 2.25rem);
    box-shadow: var(--shadow-lg);
    color: rgba(255, 255, 255, 0.82);
}

.map-stage {
    position: relative;
    /* Cornice: alone caldo al centro, bordo sottile e luce sul filo superiore */
    background:
        radial-gradient(115% 85% at 50% 38%, rgba(244, 199, 14, 0.10), rgba(244, 199, 14, 0) 62%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0) 45%);
    border: 1px solid rgba(244, 199, 14, 0.20);
    border-radius: calc(var(--radius) + 4px);
    padding: clamp(0.85rem, 2vw, 1.35rem);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.07),
        0 18px 40px rgba(0, 0, 0, 0.20);
}

/* Angoli a squadra: richiamo tecnico senza il rumore della griglia */
.map-stage::before,
.map-stage::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    border: 2px solid rgba(244, 199, 14, 0.45);
    pointer-events: none;
}
.map-stage::before {
    top: 10px; left: 10px;
    border-right: 0; border-bottom: 0;
    border-top-left-radius: 6px;
}
.map-stage::after {
    bottom: 10px; right: 10px;
    border-left: 0; border-top: 0;
    border-bottom-right-radius: 6px;
}

.italy-map {
    display: block;
    width: 100%;
    max-width: 380px;
    height: auto;
    margin: 0 auto;
    overflow: visible;
}
.italy-shape path {
    fill: url(#italyFill);
    stroke: rgba(46, 71, 81, 0.55);
    stroke-width: 6;
    filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.28));
}

.map-pin-core {
    fill: var(--white);
    stroke: var(--brand-primary);
    stroke-width: 5;
    transition: fill 0.25s ease, r 0.25s ease;
}
.map-pin-pulse {
    fill: var(--white);
    opacity: 0;
    transform-origin: center;
}
.map-pin.is-active .map-pin-core { fill: var(--brand-primary); stroke: var(--white); }

@media (prefers-reduced-motion: no-preference) {
    .map-pin-pulse { animation: pinPulse 2.6s ease-out infinite; animation-delay: calc(var(--i) * 0.55s); }
}
@keyframes pinPulse {
    0% { r: 15; opacity: 0.5; }
    70%, 100% { r: 38; opacity: 0; }
}

/* Etichette cliccabili sopra la mappa */
.map-hotspot {
    position: absolute;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    background: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;
    z-index: 2;
}
.map-hotspot-label {
    position: absolute;
    left: 18px;
    white-space: nowrap;
    font-family: var(--font-headings);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--white);
    background: rgba(34, 53, 61, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    padding: 0.2rem 0.6rem;
    transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}
.map-hotspot::before {
    content: '';
    width: 34px; height: 34px;
    border-radius: 50%;
}
.map-hotspot:hover .map-hotspot-label,
.map-hotspot.is-active .map-hotspot-label {
    background: var(--brand-accent);
    border-color: var(--brand-accent);
    color: var(--brand-primary);
}
/* Napoli: l'etichetta va a sinistra per non uscire dalla mappa e per non
   accavallarsi a quella di Potenza, che le sta subito a destra */
.map-hotspot[data-hotspot="2"] .map-hotspot-label { left: auto; right: 18px; }

/* Riquadro con la foto dell'edificio: posizione e punta le mette il JS,
   che lo tiene incollato al pin anche mentre la telecamera si muove */
.map-popup {
    position: absolute;
    z-index: 6;
    width: 178px;
    padding: 8px;
    border-radius: 14px;
    background: rgba(18, 31, 37, 0.96);
    border: 1px solid rgba(244, 199, 14, 0.35);
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px) scale(0.97);
    transform-origin: 50% 100%;
    transition: opacity 0.22s ease, transform 0.28s cubic-bezier(0.22, 0.61, 0.36, 1), visibility 0.22s;
    pointer-events: none;
}
.map-popup.is-open { opacity: 1; visibility: visible; transform: none; }
.map-popup.is-below { transform-origin: 50% 0; }

/* Punta rivolta al pin: sotto se il riquadro sta sopra, e viceversa */
.map-popup::after {
    content: '';
    position: absolute;
    left: var(--tip, 50%);
    margin-left: -7px;
    border: 7px solid transparent;
}
.map-popup:not(.is-below)::after { top: 100%; border-top-color: rgba(244, 199, 14, 0.55); }
.map-popup.is-below::after { bottom: 100%; border-bottom-color: rgba(244, 199, 14, 0.55); }

.map-popup-media {
    border-radius: 9px;
    overflow: hidden;
    margin-bottom: 0.6rem;
    background: rgba(255, 255, 255, 0.06);
}
.map-popup-media img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}
.map-popup-body { padding: 0 0.25rem 0.2rem; }
.map-popup-city {
    font-family: var(--font-headings);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--white);
    margin: 0 0 0.2rem;
}
.map-popup-street { font-size: 0.78rem; color: rgba(255, 255, 255, 0.82); margin: 0; }
.map-popup-zip { font-size: 0.72rem; color: rgba(255, 255, 255, 0.55); margin: 0.15rem 0 0; }

@media (prefers-reduced-motion: reduce) {
    .map-popup { transition: opacity 0.15s ease, visibility 0.15s; transform: none; }
}

/* Schede delle sedi */
.map-sedi {
    display: grid;
    /* Con quattro sedi diventano due righe da due invece di 3 + 1 spaiata */
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
    margin-top: 1.5rem;
}
.map-sede {
    width: 100%;
    height: 100%;
    text-align: left;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 3px solid var(--brand-accent);
    border-radius: 10px;
    padding: 0.85rem 0.95rem;
    cursor: pointer;
    color: inherit;
    font: inherit;
    transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}
.map-sede:hover, .map-sede.is-active { background: rgba(244, 199, 14, 0.12); transform: translateY(-2px); }
.map-sede-label {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-family: var(--font-headings);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--brand-accent);
    margin-bottom: 0.3rem;
}
.map-sede-city { display: block; font-family: var(--font-headings); font-weight: 600; color: var(--white); font-size: 0.95rem; }
.map-sede-address { display: block; font-size: 0.8rem; color: rgba(255, 255, 255, 0.6); margin-top: 0.15rem; }

.map-contacts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.75rem;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.9rem;
}
.map-contacts a { display: inline-flex; align-items: center; gap: 0.45rem; color: rgba(255, 255, 255, 0.85); }
.map-contacts a:hover { color: var(--brand-accent); }
.map-contacts .icon { color: var(--brand-accent); }

/* --------------------------------------------------------------------------
   30. Footer — social
   -------------------------------------------------------------------------- */
.footer-social { display: flex; gap: 0.6rem; margin-top: 1.5rem; }
.footer-social a {
    display: inline-flex;
    width: 40px; height: 40px;
    align-items: center; justify-content: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.85);
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}
.footer-social a:hover { background: var(--brand-accent); color: var(--brand-primary); transform: translateY(-2px); }

@media (max-width: 1024px) {
    .coverage-grid { grid-template-columns: 1fr; }
    .map-card { max-width: 680px; margin: 0 auto; }
}

@media (max-width: 640px) {
    .map-sedi { grid-template-columns: 1fr; }
    .map-hotspot-label { font-size: 0.65rem; }
}

/* --------------------------------------------------------------------------
   31. Il Percorso — la strada con l'auto che si ferma a ogni tappa
   -------------------------------------------------------------------------- */
.section-percorso { background: var(--brand-light); overflow: hidden; padding-bottom: clamp(2rem, 4vw, 3rem); }
/* La tela ha già spazio proprio sopra la strada: il titolo può stare più vicino */
.section-percorso .section-header { margin-bottom: 0.5rem; }

.percorso-rule {
    display: block;
    width: 56px; height: 3px;
    margin: 1.5rem auto 0;
    border-radius: 3px;
    background: var(--brand-accent);
}

.percorso-stage { position: relative; }

/* La carreggiata è disegnata su una tela fissa da 1240px e scalata a schermo */
.percorso-canvas {
    /* Tela a misura fissa: le schede hanno sempre spazio sopra e sotto la strada */
    --canvas-w: 1240px;
    --canvas-h: 840px;
    --road-top: 290px;
    --card-w: 270px;
    position: relative;
    width: var(--canvas-w);
    height: var(--canvas-h);
    margin: 0 auto;
    transform-origin: top center;
}

.percorso-road {
    position: absolute;
    left: 0; top: var(--road-top);
    width: 1240px; height: 320px;
    overflow: visible;
}

.road-shadow { fill: none; stroke: var(--brand-primary); stroke-width: 46; stroke-linecap: round; opacity: 0.12; }
.road-base { fill: none; stroke: #46565e; stroke-width: 42; stroke-linecap: round; }
.road-dash {
    fill: none;
    stroke: rgba(255, 255, 255, 0.85);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 16 20;
    /* La mezzeria scorre all'indietro mentre l'auto avanza */
    stroke-dashoffset: calc(var(--p, 0) * -260px);
}
.road-trail {
    fill: none;
    stroke: url(#percorsoTrail);
    stroke-width: 5;
    stroke-linecap: round;
    filter: drop-shadow(0 0 6px rgba(244, 199, 14, 0.45));
}

/* Fermate */
.road-stop-ring { fill: none; stroke: var(--brand-accent); stroke-width: 2; opacity: 0; transform-origin: center; }
.road-stop-dot { fill: var(--brand-accent); opacity: 0.4; transition: opacity 0.4s ease, r 0.5s cubic-bezier(0.16, 0.84, 0.24, 1); }
.road-stop-core { fill: var(--white); opacity: 0.4; transition: opacity 0.4s ease; }

.road-stop.is-on .road-stop-dot { opacity: 1; r: 11; }
.road-stop.is-on .road-stop-core { opacity: 1; }
.road-stop.is-on .road-stop-ring { animation: percorsoRing 1s cubic-bezier(0.16, 0.84, 0.24, 1) forwards; }

@keyframes percorsoRing {
    0% { opacity: 0.9; transform: scale(0.55); }
    100% { opacity: 0; transform: scale(2.1); }
}

/* Auto */
.road-car { opacity: 0; transition: opacity 0.4s linear; }
.percorso-stage.is-running .road-car,
.percorso-stage.is-done .road-car { opacity: 1; }
.car-beam { fill: url(#percorsoBeam); opacity: 0.8; transition: opacity 0.38s linear; }
.car-shadow { fill: var(--brand-primary); opacity: 0.28; }
.car-wheel { fill: #22303a; }
.car-body { fill: var(--brand-accent); }
.car-gloss { fill: #ffffff; opacity: 0.24; }
.car-cabin { fill: #22303a; opacity: 0.92; }
.car-light { fill: #fffbe6; }
.car-brake { fill: #ff5a4d; opacity: 0.25; transition: opacity 0.24s linear; }
.percorso-stage.is-holding .car-brake { opacity: 1; }
.percorso-stage.is-holding .car-beam { opacity: 0.15; }

/* Schede delle tappe, ancorate al punto della strada */
.percorso-card-wrap {
    position: absolute;
    /* Il clamp tiene le schede dentro la tela anche alle estremità della strada */
    left: clamp(14px, calc(var(--x) - var(--card-w) / 2), calc(var(--canvas-w) - var(--card-w) - 14px));
    width: var(--card-w);
}
.percorso-card-wrap.is-below { top: calc(var(--road-top) + var(--y) + 56px); }
.percorso-card-wrap.is-above { bottom: calc(var(--canvas-h) - var(--road-top) - var(--y) + 56px); }

.percorso-connector {
    position: absolute;
    /* Il connettore resta agganciato al punto della strada, non al centro scheda */
    left: clamp(12px, calc(var(--x) - clamp(14px, calc(var(--x) - var(--card-w) / 2), calc(var(--canvas-w) - var(--card-w) - 14px))), calc(var(--card-w) - 12px));
    width: 2px;
    height: 0;
    transition: height 0.52s cubic-bezier(0.16, 0.84, 0.24, 1) 60ms;
}
.is-below .percorso-connector { top: -50px; background: linear-gradient(0deg, rgba(244, 199, 14, 0.9), rgba(244, 199, 14, 0)); }
.is-above .percorso-connector { bottom: -50px; background: linear-gradient(180deg, rgba(244, 199, 14, 0.9), rgba(244, 199, 14, 0)); }
.percorso-card-wrap.is-on .percorso-connector { height: 44px; }

.percorso-card {
    background: var(--white);
    border-radius: 12px;
    border-left: 4px solid var(--brand-accent);
    padding: 1rem 1.1rem 1.15rem;
    box-shadow: 0 14px 34px rgba(46, 71, 81, 0.14);
}
.percorso-year {
    font-family: var(--font-headings);
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1;
    color: var(--brand-accent-dark);
}
.percorso-card h3 { margin-top: 0.55rem; font-size: 1rem; }
.percorso-text { margin-top: 0.5rem; font-size: 0.82rem; line-height: 1.58; color: var(--text-soft); }

/* Con JavaScript attivo le schede entrano quando l'auto le raggiunge */
.js .percorso-canvas .percorso-card {
    opacity: 0;
    transform: translate3d(0, 24px, 0) scale(0.96);
    transition: opacity 0.52s cubic-bezier(0.16, 0.84, 0.24, 1) 40ms, transform 0.7s cubic-bezier(0.16, 0.84, 0.24, 1) 40ms;
}
.js .percorso-card-wrap.is-above .percorso-card { transform: translate3d(0, -24px, 0) scale(0.96); }
.js .percorso-card-wrap.is-on .percorso-card { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }

/* Versione compatta */
.percorso-mobile { display: none; position: relative; padding-left: 3.25rem; }
.percorso-mobile li { position: relative; padding-bottom: 1.5rem; }
.percorso-mobile-dot {
    position: absolute;
    left: -2.6rem; top: 1rem;
    width: 12px; height: 12px;
    border-radius: 50%;
    background: var(--brand-border);
    transition: background 0.4s ease, box-shadow 0.4s ease, transform 0.4s ease;
}
.percorso-mobile li.is-on .percorso-mobile-dot {
    background: var(--brand-accent);
    box-shadow: 0 0 0 5px rgba(244, 199, 14, 0.2);
    transform: scale(1.2);
}
.percorso-mobile-track {
    position: absolute;
    left: 0.6rem; top: 1rem; bottom: 1rem;
    width: 3px;
    border-radius: 3px;
    background: var(--brand-border);
}
.percorso-mobile-track span {
    display: block;
    width: 100%;
    height: calc(var(--p, 0) * 100%);
    border-radius: 3px;
    background: linear-gradient(180deg, var(--brand-accent), #ffd94a);
}

@media (max-width: 900px) {
    .percorso-stage { display: none; }
    .percorso-mobile { display: block; }
}

/* Senza JavaScript la strada si mostra già percorsa */
html:not(.js) .road-stop-dot,
html:not(.js) .road-stop-core { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
    .js .percorso-canvas .percorso-card { opacity: 1; transform: none; }
    .road-stop-dot, .road-stop-core { opacity: 1; }
    .road-stop-ring { display: none; }
    .road-car { opacity: 1; }
    .percorso-card-wrap .percorso-connector { height: 44px; }
}
