/* =========================================================
   AICS Comitato di Cuneo — Landing
   Design system: Vibrant & Block-based
   Type: Barlow Condensed (display) + Barlow (body)
   ========================================================= */

:root {
    /* Brand — estratti dal logo AICS */
    --navy-900: #08172f;
    --navy-800: #0d2650;
    --navy-700: #143c7b;
    --navy-600: #1d56a8;
    --navy-500: #2f74d0;
    --red: #e1251b;
    --green: #1da65a;

    --bg: #f6f8fc;
    --surface: #ffffff;
    --fg: #0b1729;
    --fg-muted: #4a5c73;
    --border: #dbe3ee;

    --on-dark: #ffffff;
    --on-dark-muted: rgba(255, 255, 255, 0.72);

    /* Spacing scale (8pt) */
    --space-1: 0.5rem;
    --space-2: 1rem;
    --space-3: 1.5rem;
    --space-4: 2rem;
    --space-6: 3rem;
    --space-8: 4rem;
    --space-12: 6rem;

    --radius: 18px;
    --radius-lg: 28px;

    --shadow-sm: 0 1px 2px rgba(11, 23, 41, 0.06), 0 4px 12px rgba(11, 23, 41, 0.05);
    --shadow-md: 0 10px 30px rgba(11, 23, 41, 0.1);
    --shadow-lg: 0 30px 70px rgba(11, 23, 41, 0.18);

    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --dur: 240ms;

    --nav-h: 76px;
    --container: 1200px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-h);
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--fg);
    font-family: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 1.0625rem;
    line-height: 1.65;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    font-family: "Barlow Condensed", "Barlow", sans-serif;
    font-weight: 700;
    line-height: 1.02;
    letter-spacing: -0.01em;
    text-transform: uppercase;
    margin: 0;
}

p {
    margin: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

:focus-visible {
    outline: 3px solid var(--navy-500);
    outline-offset: 3px;
    border-radius: 6px;
}

.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--space-3);
}

.skip-link {
    position: absolute;
    left: 50%;
    top: -100px;
    transform: translateX(-50%);
    z-index: 1000;
    background: var(--navy-700);
    color: #fff;
    padding: 0.75rem 1.25rem;
    border-radius: 0 0 12px 12px;
    transition: top var(--dur) var(--ease-out);
}

.skip-link:focus {
    top: 0;
}

/* ---------- Section shell ---------- */

.section {
    padding-block: clamp(4rem, 9vw, 7.5rem);
    position: relative;
}

.section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-family: "Barlow Condensed", sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--navy-600);
    margin-bottom: var(--space-2);
}

.section-eyebrow::before {
    content: "";
    width: 34px;
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--green) 0 33%, #fff 33% 66%, var(--red) 66%);
    box-shadow: 0 0 0 1px var(--border);
}

.section-title {
    font-size: clamp(2.4rem, 6vw, 4.25rem);
}

.section-lead {
    color: var(--fg-muted);
    font-size: 1.125rem;
    max-width: 62ch;
    margin-top: var(--space-2);
}

/* ---------- Buttons ---------- */

.btn {
    --btn-bg: var(--navy-700);
    --btn-fg: #fff;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    min-height: 52px;
    padding: 0 1.6rem;
    border: 0;
    border-radius: 999px;
    background: var(--btn-bg);
    color: var(--btn-fg);
    font-family: "Barlow Condensed", sans-serif;
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    overflow: hidden;
    isolation: isolate;
    transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out),
        background-color var(--dur) var(--ease-out), color var(--dur) var(--ease-out);
}

.btn::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(120deg, var(--navy-600), var(--navy-500));
    opacity: 0;
    transition: opacity var(--dur) var(--ease-out);
}

.btn:hover {
    box-shadow: var(--shadow-md);
}

.btn:hover::before {
    opacity: 1;
}

.btn:active {
    transform: scale(0.97);
}

.btn .btn-icon {
    transition: transform var(--dur) var(--ease-out);
}

.btn:hover .btn-icon {
    transform: translateX(4px);
}

.btn-ghost {
    --btn-bg: transparent;
    --btn-fg: #fff;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.55);
}

.btn-ghost::before {
    background: #fff;
}

.btn-ghost:hover {
    --btn-fg: var(--navy-800);
}

.btn-light {
    --btn-bg: #fff;
    --btn-fg: var(--navy-800);
}

.btn-light::before {
    background: linear-gradient(120deg, #fff, #dfeaff);
}

/* ---------- Navbar ---------- */

.nav {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    height: var(--nav-h);
    display: flex;
    align-items: center;
    transition: background-color 400ms var(--ease-out), box-shadow 400ms var(--ease-out),
        backdrop-filter 400ms var(--ease-out), height 400ms var(--ease-out);
}

.nav.is-scrolled {
    height: 64px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    box-shadow: 0 1px 0 var(--border), 0 8px 30px rgba(11, 23, 41, 0.06);
}

.nav-inner {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--space-3);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-family: "Barlow Condensed", sans-serif;
    font-weight: 700;
    font-size: 1.35rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #fff;
    transition: color 400ms var(--ease-out);
}

.nav-brand img {
    height: 40px;
    width: auto;
    filter: brightness(0) invert(1);
    transition: filter 400ms var(--ease-out);
}

.nav.is-scrolled .nav-brand {
    color: var(--navy-800);
}

.nav.is-scrolled .nav-brand img {
    filter: none;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 0.85rem;
    font-family: "Barlow Condensed", sans-serif;
    font-size: 1.05rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
    transition: color var(--dur) var(--ease-out);
}

.nav.is-scrolled .nav-link {
    color: var(--fg-muted);
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0.85rem;
    right: 0.85rem;
    bottom: 14px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--dur) var(--ease-out);
}

.nav-link:hover,
.nav-link[aria-current="true"] {
    color: #fff;
}

.nav.is-scrolled .nav-link:hover,
.nav.is-scrolled .nav-link[aria-current="true"] {
    color: var(--navy-700);
}

.nav-link:hover::after,
.nav-link[aria-current="true"]::after {
    transform: scaleX(1);
}

.nav-cta {
    min-height: 44px;
    padding: 0 1.2rem;
    font-size: 1rem;
    background: var(--red);
}

.nav-cta::before {
    background: linear-gradient(120deg, #ff4438, var(--red));
}

.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    cursor: pointer;
    transition: background-color var(--dur) var(--ease-out), color var(--dur) var(--ease-out);
}

.nav.is-scrolled .nav-toggle {
    background: var(--navy-700);
}

.nav-toggle-bars {
    position: relative;
    width: 22px;
    height: 14px;
}

.nav-toggle-bars span {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform var(--dur) var(--ease-out), opacity var(--dur) var(--ease-out);
}

.nav-toggle-bars span:nth-child(1) {
    top: 0;
}

.nav-toggle-bars span:nth-child(2) {
    top: 6px;
}

.nav-toggle-bars span:nth-child(3) {
    top: 12px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

@media (max-width: 991px) {
    .nav-toggle {
        display: inline-flex;
    }

    .nav-menu {
        position: fixed;
        inset: 0 0 0 auto;
        width: min(360px, 86vw);
        padding: calc(var(--nav-h) + var(--space-3)) var(--space-3) var(--space-3);
        background: var(--navy-800);
        display: flex;
        flex-direction: column;
        gap: var(--space-2);
        transform: translateX(100%);
        transition: transform 420ms var(--ease-out);
        box-shadow: var(--shadow-lg);
    }

    .nav-menu.is-open {
        transform: translateX(0);
    }

    .nav-links {
        flex-direction: column;
        align-items: stretch;
        gap: 0.25rem;
    }

    .nav-link {
        color: rgba(255, 255, 255, 0.85) !important;
        font-size: 1.3rem;
        padding: 0.6rem 0.25rem;
    }

    .nav-link::after {
        left: 0.25rem;
        right: auto;
        width: 28px;
        bottom: 8px;
    }

    .nav-cta {
        width: 100%;
        margin-top: var(--space-2);
    }

    .nav-scrim {
        position: fixed;
        inset: 0;
        background: rgba(8, 23, 47, 0.55);
        backdrop-filter: blur(3px);
        opacity: 0;
        visibility: hidden;
        transition: opacity 300ms var(--ease-out), visibility 300ms;
        z-index: 90;
    }

    .nav-scrim.is-open {
        opacity: 1;
        visibility: visible;
    }
}

@media (min-width: 992px) {
    .nav-scrim {
        display: none;
    }
}

/* ---------- Hero ---------- */

.hero {
    position: relative;
    min-height: 100svh;
    display: grid;
    align-items: center;
    overflow: clip;
    color: #fff;
    isolation: isolate;
}

.hero-media {
    position: absolute;
    inset: -10% 0 0 0;
    z-index: -3;
    will-change: transform;
}

.hero-media img {
    width: 100%;
    height: 115%;
    object-fit: cover;
    filter: grayscale(1) contrast(1.05);
}

/* Duotone navy + veli di colore in movimento */
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background: linear-gradient(180deg, rgba(8, 23, 47, 0.92) 0%, rgba(20, 60, 123, 0.78) 45%, rgba(8, 23, 47, 0.95) 100%),
        radial-gradient(1200px 600px at 15% 20%, rgba(29, 86, 168, 0.55), transparent 60%),
        radial-gradient(900px 500px at 85% 75%, rgba(29, 166, 90, 0.28), transparent 60%);
}

.hero-aura {
    position: absolute;
    z-index: -2;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    pointer-events: none;
    animation: drift 22s ease-in-out infinite alternate;
}

.hero-aura--red {
    width: 40vw;
    height: 40vw;
    right: -6vw;
    top: 8%;
    background: radial-gradient(circle, rgba(225, 37, 27, 0.55), transparent 65%);
    animation-duration: 26s;
}

.hero-aura--green {
    width: 34vw;
    height: 34vw;
    left: -6vw;
    bottom: 4%;
    background: radial-gradient(circle, rgba(29, 166, 90, 0.5), transparent 65%);
    animation-duration: 30s;
    animation-direction: alternate-reverse;
}

@keyframes drift {
    from {
        transform: translate3d(0, 0, 0) scale(1);
    }
    to {
        transform: translate3d(4vw, -3vw, 0) scale(1.15);
    }
}

/* Grana sottile per profondità */
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: 0.07;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.hero-inner {
    padding-block: calc(var(--nav-h) + var(--space-8)) var(--space-12);
    display: grid;
    gap: var(--space-4);
    max-width: 1000px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    align-self: start;
    justify-self: start;
    width: fit-content;
    max-width: 100%;
    padding: 0.5rem 1rem 0.5rem 0.55rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(8px);
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--on-dark);
}

.hero-badge .flag {
    display: inline-flex;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: conic-gradient(var(--green) 0 33%, #fff 33% 66%, var(--red) 66%);
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.35);
}

.hero-title {
    font-size: clamp(3.4rem, 11vw, 9rem);
    line-height: 0.88;
    letter-spacing: -0.02em;
}

.hero-title .line {
    display: block;
    overflow: hidden;
}

.hero-title .line > span {
    display: block;
    transform: translateY(105%);
    animation: rise 1s var(--ease-out) forwards;
}

.hero-title .line:nth-child(1) > span {
    animation-delay: 0.15s;
}

.hero-title .line:nth-child(2) > span {
    animation-delay: 0.3s;
}

@keyframes rise {
    to {
        transform: translateY(0);
    }
}

.hero-title .accent {
    background: linear-gradient(100deg, #fff 0%, #9ec5ff 55%, #fff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-lead {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    color: var(--on-dark-muted);
    max-width: 60ch;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.hero-pillars {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    list-style: none;
    margin: var(--space-2) 0 0;
    padding: 0;
}

.hero-pillars li {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
    font-family: "Barlow Condensed", sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--on-dark-muted);
}

.hero-pillars .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--pill, #fff);
}

.hero-scroll {
    position: absolute;
    left: 50%;
    bottom: 1.75rem;
    transform: translateX(-50%);
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-family: "Barlow Condensed", sans-serif;
    font-size: 0.8rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
    transition: color var(--dur) var(--ease-out);
}

.hero-scroll:hover {
    color: #fff;
}

.hero-scroll .rail {
    width: 2px;
    height: 46px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.22);
    overflow: hidden;
}

.hero-scroll .rail::after {
    content: "";
    display: block;
    width: 100%;
    height: 40%;
    background: #fff;
    animation: railDrop 1.9s var(--ease-out) infinite;
}

@keyframes railDrop {
    0% {
        transform: translateY(-100%);
    }
    60%,
    100% {
        transform: translateY(250%);
    }
}

/* ---------- Marquee tricolore ---------- */

.marquee {
    position: relative;
    background: var(--navy-800);
    color: #fff;
    padding-block: 1.1rem;
    overflow: hidden;
    border-block: 1px solid rgba(255, 255, 255, 0.08);
}

.marquee-track {
    display: flex;
    width: max-content;
    animation: scroll-x 38s linear infinite;
}

.marquee:hover .marquee-track {
    animation-play-state: paused;
}

.marquee-group {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    padding-right: 2.5rem;
    font-family: "Barlow Condensed", sans-serif;
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    white-space: nowrap;
}

.marquee-group i {
    display: inline-block;
    width: 4px;
    height: 22px;
    border-radius: 4px;
    background: var(--bar, #fff);
}

@keyframes scroll-x {
    to {
        transform: translateX(-50%);
    }
}

/* ---------- About ---------- */

.about {
    background: var(--bg);
}

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

.about-body p + p {
    margin-top: var(--space-2);
}

.about-facts {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-top: var(--space-4);
    list-style: none;
    padding: 0;
}

.about-facts li {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.7rem 1.1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    box-shadow: var(--shadow-sm);
    font-weight: 500;
    font-size: 0.98rem;
}

.about-facts svg {
    color: var(--green);
    flex: none;
}

.about-visual {
    position: relative;
    display: grid;
    place-items: center;
    padding: clamp(2rem, 5vw, 3.5rem);
    border-radius: var(--radius-lg);
    background: linear-gradient(160deg, #fff, #eaf1fb);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.about-visual::before {
    content: "";
    position: absolute;
    width: 120%;
    height: 120%;
    background: conic-gradient(from 0deg, transparent 0 65%, rgba(29, 86, 168, 0.14) 80%, transparent 100%);
    animation: spin 14s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.about-visual img {
    position: relative;
    width: min(340px, 100%);
    height: auto;
    filter: drop-shadow(0 20px 40px rgba(11, 23, 41, 0.14));
    transition: transform 500ms var(--ease-out);
}

.about-visual:hover img {
    transform: translateY(-6px) scale(1.03);
}

/* ---------- Attività (bento) ---------- */

.activities {
    background: var(--navy-900);
    color: #fff;
    overflow: clip;
}

.activities::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(900px 500px at 80% 0%, rgba(29, 86, 168, 0.5), transparent 60%),
        radial-gradient(700px 400px at 5% 100%, rgba(29, 166, 90, 0.22), transparent 60%);
    pointer-events: none;
}

.activities .container {
    position: relative;
}

.activities .section-eyebrow {
    color: #9ec5ff;
}

.activities .section-eyebrow::before {
    box-shadow: none;
}

.activities .section-lead {
    color: var(--on-dark-muted);
}

.bento {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-2);
    margin-top: var(--space-6);
}

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    padding: clamp(1.5rem, 3vw, 2.25rem);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
    overflow: hidden;
    isolation: isolate;
    transition: transform 400ms var(--ease-out), box-shadow 400ms var(--ease-out),
        background-color 400ms var(--ease-out);
}

/* Glow che segue il puntatore (--mx/--my impostati da JS) */
.card::before {
    content: "";
    position: absolute;
    inset: -1px;
    z-index: -1;
    background: radial-gradient(280px circle at var(--mx, 50%) var(--my, 0%), var(--glow, rgba(47, 116, 208, 0.5)), transparent 70%);
    opacity: 0;
    transition: opacity 400ms var(--ease-out);
}

.card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28), var(--shadow-lg);
}

.card:hover::before {
    opacity: 1;
}

.card-index {
    font-family: "Barlow Condensed", sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    color: rgba(255, 255, 255, 0.45);
}

.card-icon {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: var(--icon-bg, rgba(47, 116, 208, 0.22));
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
    transition: transform 400ms var(--ease-out);
}

.card:hover .card-icon {
    transform: rotate(-6deg) scale(1.06);
}

.card h3 {
    font-size: 1.75rem;
}

.card p {
    color: var(--on-dark-muted);
    font-size: 1rem;
}

.card-rule {
    margin-top: auto;
    height: 3px;
    width: 100%;
    border-radius: 3px;
    background: var(--rule, var(--navy-500));
    transform: scaleX(0.14);
    transform-origin: left;
    transition: transform 500ms var(--ease-out);
}

.card:hover .card-rule {
    transform: scaleX(1);
}

/* ---------- Showcase full-bleed ---------- */

.showcase {
    position: relative;
    padding: 0;
    background: var(--navy-900);
}

.showcase-frame {
    position: relative;
    overflow: hidden;
}

.showcase-frame img {
    width: 100%;
    height: auto;
    will-change: transform;
    transform: scale(1.03);
}

/* ---------- CTA ---------- */

.cta {
    position: relative;
    background: linear-gradient(135deg, var(--navy-700), var(--navy-600) 55%, var(--navy-800));
    color: #fff;
    overflow: clip;
    text-align: center;
}

.cta::before,
.cta::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    pointer-events: none;
}

.cta::before {
    width: 30vw;
    height: 30vw;
    left: -5vw;
    top: -10%;
    background: radial-gradient(circle, rgba(29, 166, 90, 0.45), transparent 65%);
    animation: drift 24s ease-in-out infinite alternate;
}

.cta::after {
    width: 34vw;
    height: 34vw;
    right: -8vw;
    bottom: -20%;
    background: radial-gradient(circle, rgba(225, 37, 27, 0.42), transparent 65%);
    animation: drift 28s ease-in-out infinite alternate-reverse;
}

.cta .container {
    position: relative;
}

.cta-inner {
    max-width: 760px;
    margin-inline: auto;
    display: grid;
    justify-items: center;
    gap: var(--space-3);
}

.cta-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
}

.cta-lead {
    color: var(--on-dark-muted);
    font-size: 1.2rem;
}

.cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    justify-content: center;
}

/* ---------- Contatti ---------- */

.contact {
    background: var(--bg);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-2);
    margin-top: var(--space-6);
}

.contact-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: var(--space-3);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out),
        border-color var(--dur) var(--ease-out);
}

.contact-card:hover {
    transform: translateY(-4px);
    border-color: var(--navy-500);
    box-shadow: var(--shadow-md);
}

.contact-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: #e8f0fc;
    color: var(--navy-700);
}

.contact-card h3 {
    font-size: 1.3rem;
    letter-spacing: 0.06em;
}

.contact-card a,
.contact-card address {
    font-style: normal;
    color: var(--fg-muted);
    font-size: 1.05rem;
}

.contact-card a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--navy-700);
    font-weight: 600;
    transition: color var(--dur) var(--ease-out);
}

.contact-card a:hover {
    color: var(--navy-500);
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* ---------- Footer ---------- */

.footer {
    background: var(--navy-900);
    color: var(--on-dark-muted);
    padding-block: var(--space-6) var(--space-4);
}

.footer-top {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    align-items: center;
    justify-content: space-between;
    padding-bottom: var(--space-3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #fff;
    font-family: "Barlow Condensed", sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.footer-brand img {
    height: 42px;
    width: auto;
    filter: brightness(0) invert(1);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-links a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-size: 0.98rem;
    transition: color var(--dur) var(--ease-out);
}

.footer-links a:hover {
    color: #fff;
}

.footer-bottom {
    padding-top: var(--space-3);
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    justify-content: space-between;
    font-size: 0.9rem;
}

/* ---------- Reveal on scroll ---------- */

/* Senza JS il contenuto resta visibile: l'effetto si attiva solo con la classe .js */
.js [data-reveal] {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 800ms var(--ease-out), transform 800ms var(--ease-out);
    transition-delay: calc(var(--i, 0) * 90ms);
}

.js [data-reveal].is-visible {
    opacity: 1;
    transform: none;
}

/* ---------- Responsive ---------- */

@media (max-width: 991px) {
    .about-grid {
        grid-template-columns: 1fr;
    }

    .bento,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .hero-inner {
        padding-block: calc(var(--nav-h) + var(--space-6)) var(--space-8);
    }
}

@media (max-width: 575px) {
    .hero-actions .btn {
        width: 100%;
    }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }

    .hero-title .line > span {
        transform: none;
    }

    [data-reveal] {
        opacity: 1;
        transform: none;
    }

    .marquee-track {
        animation: none;
    }
}
