/* ==========================================================
BASE
========================================================== */
:root {
    --red:   #980000;
    --web-red: #980000;
    --white: #fff;
    --dark:  #121212;
    --soft:  rgba(255, 255, 255, 0.7);
    --line:  rgba(255, 255, 255, 0.15);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    background: var(--dark);
    color: var(--white);
    line-height: 1.6;
}

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

.wrap {
    max-width: 1320px;
    margin: 0 auto;
    padding-inline: clamp(1.25rem, 4vw, 4.5rem);
}

.red {
    color: var(--red);
}

/* ==========================================================
BOTTONI
========================================================== */
.btn {
    display: inline-block;
    padding: .83rem 1.5rem;
    border: 1px solid var(--red);
    border-radius: 7px;
    background: var(--red);
    color: var(--white);
    font: inherit;
    font-size: .92rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: none;
    transition: transform .25s, background .25s, box-shadow .25s, border-color .25s;
}

.btn:hover {
    transform: translateY(-2px);
    background: var(--white);
    border-color: var(--white);
    color: var(--red);
    box-shadow: none;
}

.btn:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 2px solid #980000;
    outline-offset: 3px;
}

/* ==========================================================
NAVBAR
========================================================== */
.nav {
    position: relative;
    z-index: 10;
    background: #121212;
    border-bottom: 1px solid var(--line);
}

.nav .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 82px;
}

.nav-contacts {
    display: flex;
    align-items: center;
    gap: .8rem;
}

.nav .nav-phone {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    background: var(--white);
    border-color: var(--white);
    color: var(--red);
    white-space: nowrap;
    font-size: 1.05rem;
}

.nav .nav-phone:hover {
    background: var(--white);
    border-color: var(--red);
    color: var(--red);
}

.nav .nav-contact-button {
    background: var(--red);
    border-color: var(--red);
    color: var(--white);
}

.nav-phone .icon {
    color: var(--red);
    flex-shrink: 0;
}

.nav-contact-button .icon {
    display: none;
}

@media (max-width: 900px) {
    .nav-contact-label {
        display: none;
    }

    .nav-contacts {
        gap: .5rem;
        flex-shrink: 0;
    }

    .nav .nav-phone, .nav .nav-contact-button {
        width: 44px;
        height: 44px;
        padding: 0;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        box-shadow: none;
    }

    .nav-contact-button .icon {
        display: inline-block;
    }

    .nav .wrap {
        gap: .75rem;
    }

}.nav .logo {
    display: flex;
    align-items: center;
}

.nav .logo .logo-completo {
    display: block;
    height: 38px;
    width: auto;
    max-width: none;
}

/* ==========================================================
HERO
========================================================== */
.hero {
    position: relative;
    padding: 0 0 1.5rem;
    isolation: isolate;
}

.hero .wrap {
    display: grid;
    grid-template-columns: minmax(200px, 240px) minmax(0, 1fr);
    gap: clamp(0.5rem, 1vw, 1.5rem);
    align-items: center;
}

.hero .wrap > div:first-child {
    position: relative;
    z-index: 2;
    padding-top: 0;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 1rem;
    padding: .36rem .92rem;
    border: 1px solid rgba(152,0,0,.32);
    border-radius: 50px;
    color: #980000;
    background: rgba(152,0,0,.07);
    font-size: .72rem;
    letter-spacing: .11em;
    text-transform: uppercase;
    font-weight: 600;
}

.badge::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--red);
}

.hero h1 {
    font-size: clamp(1.8rem, 2.8vw, 2.8rem);
    font-weight: 660;
    line-height: 1.1;
    letter-spacing: -.04em;
    margin-bottom: 0.8rem;
    max-width: 10ch;
}

.hero p {
    font-size: clamp(.96rem, 1.08vw, 1.02rem);
    max-width: 295px;
    line-height: 1.58;
    margin-bottom: 1.45rem;
    color: rgba(239, 241, 247, .76);
}

.hero-art {
    position: relative;
    min-width: 0;
    margin-top: 0;
}

.hero-art > svg {
    display: block;
    width: 75%;
    height: auto;
    margin-inline: auto;
}

@media (max-width: 520px) {
    .hero-art > svg {
        width: 100%;
    }

}.orbit-satellite {
    opacity: 0.85;
    transition: opacity 0.4s ease;
}

.orbit-satellite:hover {
    opacity: 1;
}

.data-line {
    fill: none;
    stroke: #980000;
    stroke-width: 1.2;
    stroke-dasharray: 1 8;
    stroke-linecap: round;
    opacity: 0.8;
    animation: dataFlow 8s linear infinite;
}

@keyframes dataFlow {to {
    stroke-dashoffset: -18;
}

}.neural-web {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    pointer-events: none;
    opacity: 0.6;
}

/* ==========================================================
PRIVACY + CONTATTI
========================================================== */
.privacy {
    padding: 2rem 0 5rem;
    border-top: 1px solid var(--line);
    background: var(--dark);
}

.privacy .wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: clamp(3rem,7vw,7rem);
}

.privacy h2 {
    font-size: clamp(1.8rem, 2.8vw, 2.8rem);
    letter-spacing: -.04em;
    line-height: 1.1;
    font-weight: 660;
    margin-bottom: 1.5rem;
}

.heading-line {
    display: block;
    white-space: nowrap;
}

.form .contact-privacy {
    display: flex;
    align-items: center;
    gap: .65rem;
    margin: .65rem 0;
    padding: .6rem;
    border: 1px solid var(--line);
    border-radius: 7px;
}

.form .contact-privacy input {
    appearance: auto;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    margin: 0;
    padding: 0;
    accent-color: var(--red);
}

.contact-privacy a {
    color: inherit;
    text-decoration: underline;
}

@media (min-width: 521px) and (max-width: 900px) {
    .privacy .wrap {
        grid-template-columns: 1fr;
    }

}.lead {
    margin-bottom: 2rem;
    color: var(--soft);
    line-height: 1.8;
    max-width: 540px;
}

.item {
    display: flex;
    gap: 1.25rem;
    margin-bottom: 1.75rem;
}

.item .ic {
    flex: none;
    width: 40px;
    height: 40px;
    padding: 9px;
    border-radius: 10px;
    color: var(--red);
    background: rgba(152,0,0,.07);
    border: 1px solid rgba(152,0,0,.25);
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.item strong {
    font-size: 1.02rem;
    font-weight: 630;
}

.item p {
    color: var(--soft);
    font-size: 0.92rem;
    line-height: 1.7;
    margin-top: .24rem;
}

.form {
    padding: .8rem clamp(1.2rem,2vw,2rem) 1.2rem;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: #1b1b1b;
}

.form h3 {
    margin-top: 0;
    margin-bottom: .8rem;
    font-size: 1.45rem;
    letter-spacing: -.02em;
}

.form label {
    display: block;
    margin-bottom: 4px;
    color: var(--soft);
    font-size: 0.85rem;
}

.form input, .form textarea {
    width: 100%;
    margin-bottom: .65rem;
    padding: .65rem .85rem;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 7px;
    background: rgba(0,0,0,.13);
    color: var(--white);
    font: inherit;
}

.form input:focus, .form textarea:focus {
    outline: none;
    border-color: var(--red);
}

.form .btn {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
}

.form .btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.form textarea {
    min-height: 76px;
    resize: vertical;
}

#contactResult:empty {
    display: none;
}

.form .qcaptcha-card {
    padding: 7px 9px;
    gap: 8px;
}

.form .qcaptcha-label, .form .qcaptcha-brand {
    font-size: .72rem;
}

.form .qcaptcha-icon-wrap, .form .qcaptcha-icon-wrap .icon, .form .qcaptcha-brand .icon {
    width: 18px !important;
    height: 18px !important;
}

.privacy-modal {
    margin: auto;
    padding: 0;
    width: min(760px, calc(100% - 2rem));
    max-height: 85dvh;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--white);
    background: #1b1b1b;
}

.privacy-modal::backdrop {
    background: rgba(0,0,0,.75);
}

body:has(.privacy-modal[open]) {
    overflow: hidden;
}

.privacy-modal-header {
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: #1b1b1b;
    border-bottom: 1px solid var(--line);
}

.privacy-modal-header h2 {
    font-size: 1.2rem;
    margin: 0;
}

.privacy-modal-header button {
    border: 0;
    background: none;
    color: inherit;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0 .5rem;
}

.privacy-modal-content {
    padding: 1.25rem;
    font-size: .9rem;
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.privacy-modal-content p, .privacy-modal-content ul {
    margin-bottom: 1rem;
}

.privacy-modal-content ul {
    padding-left: 1.25rem;
}

.privacy-modal-content a, .footer-bottom > a {
    color: inherit;
    text-decoration: underline;
}

/* ==========================================================
FOOTER
========================================================== */
.footer {
    color: var(--soft);
    font-size: .85rem;
}

.footer-bottom {
    border-top: 1px solid var(--line);
    padding: 1rem 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.footer-mobile-break {
    display: none;
}

@media (max-width: 767px) {
    .footer-bottom {
        flex-direction: column;
        gap: .5rem;
        text-align: center;
    }

    .footer-separator {
        display: none;
    }

    .footer-mobile-break {
        display: initial;
    }

}

/* ==========================================================
RESPONSIVE
========================================================== */
@media (min-width: 901px) {
    #contatti {
        scroll-margin-top: 32px;
    }

}

@media (max-width: 900px) {
    .hero {
        padding: 0 0 1rem;
    }

    .hero .wrap {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .hero .wrap > div:first-child {
        max-width: 520px;
        margin-inline: auto;
        text-align: center;
        padding-top: 1.5rem;
    }

    .hero h1 {
        max-width: none;
    }

    .hero p {
        max-width: 430px;
        margin-inline: auto;
    }

    .hero-art {
        margin-top: 0;
    }

    .privacy {
        padding: 2rem 0 4rem;
    }

}

@media (max-width: 520px) {
    .nav .wrap {
        height: 70px;
    }

    .nav .logo .logo-completo {
        height: 28px;
    }

    .nav .btn {
        padding: .58rem .75rem;
        font-size: .82rem;
    }

    .hero {
        padding-top: 0;
    }

    .hero .wrap > div:first-child {
        padding-top: 1rem;
    }

    .badge {
        font-size: 0.65rem;
        padding: 0.25rem 0.75rem;
        margin-bottom: 0.75rem;
    }

    .hero h1 {
        font-size: 1.6rem;
    }

    .hero p {
        font-size: 0.88rem;
        max-width: 90%;
    }

    .hero .btn {
        display: none;
    }

    .hero-art {
        margin-top: 0;
    }

    .data-line {
        stroke-width: 1.5;
    }

    .orbit-satellite {
        opacity: 0.95;
    }

    .privacy {
        padding-top: 1.5rem;
    }

    .privacy .wrap {
        grid-template-columns: 1fr;
    }

    .privacy h2 {
        font-size: 1.6rem;
        line-height: 1.1;
        margin-bottom: 0.8rem;
    }

    .lead {
        font-size: 0.85rem;
        line-height: 1.5;
        margin-bottom: 1.5rem;
    }

    .item {
        gap: 0.8rem;
        margin-bottom: 1.2rem;
    }

    .item strong {
        font-size: 0.95rem;
    }

    .item p {
        font-size: 0.82rem;
        line-height: 1.45;
        margin-top: 0.1rem;
    }

    .item .ic {
        width: 32px;
        height: 32px;
        padding: 6px;
        border-radius: 8px;
    }

}

@media (prefers-reduced-motion: reduce) {
    .btn, .orbit-satellite {
        transition: none;
    }

    .btn:hover {
        transform: none;
    }

    .data-line {
        animation: none !important;
    }

}#heroArt {
    color: var(--red);
}

/* Esito del modulo contatti: riquadro leggibile anche sul fondo scuro. */
.contact-alert {
    margin: .8rem 0;
    padding: .85rem 1rem;
    border: 1px solid;
    border-left-width: 4px;
    border-radius: 7px;
    font-size: .9rem;
    line-height: 1.5;
}

.contact-alert-success {
    color: #d1fae5;
    background: #123b2b;
    border-color: #34d399;
}

.contact-alert-error {
    color: #fee2e2;
    background: #491c22;
    border-color: #f87171;
}

.contact-alert-pending {
    color: #e2e8f0;
    background: #29313c;
    border-color: #94a3b8;
}

/* Pagine informative: stessa tipografia e colori del sito. */
.info-page {
    padding: 3rem 0 4rem;
}

.info-content {
    max-width: 850px;
    margin-inline: auto;
}

.info-content h1, .contact-page h1 {
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    line-height: 1.15;
    margin-bottom: 1.5rem;
}

.info-content h2 {
    font-size: 1.45rem;
    margin: 2rem 0 .8rem;
}

.info-content p {
    color: var(--soft);
    margin-bottom: 1rem;
    line-height: 1.8;
}

.info-content .btn {
    margin-top: 1rem;
}

.contact-page {
    padding-top: 2rem;
}

.contact-page .privacy {
    border-top: 0;
}

.nav-pages {
    display: flex;
    gap: 1.2rem;
    font-size: .9rem;
}

.nav-pages a[aria-current], .nav-pages a:hover {
    color: var(--red);
}

.footer-links {
    display: flex;
    gap: 1.2rem;
}

.footer-links a {
    text-decoration: underline;
}

/* Navigazione: collegamenti a destra e contatti sempre a icona. */
.nav .wrap {
    gap: 1.5rem;
}

.nav-pages {
    margin-left: auto;
    align-items: center;
}

.nav-pages a {
    padding-block: .5rem;
}

.nav .nav-phone, .nav .nav-contact-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
}

.nav-contact-button .icon {
    display: inline-block;
}

.nav-toggle {
    display: none;
}

/* Card di uguale misura, con bordo superiore rosso. */
.info-content {
    max-width: none;
}

.info-intro {
    max-width: 880px;
    margin-bottom: 2.5rem;
    padding-left: 1.5rem;
    border-left: 3px solid var(--red);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
    align-items: stretch;
    grid-auto-rows: 1fr;
}

.info-card {
    padding: clamp(1.4rem, 3vw, 2.2rem);
    background: #191919;
    border: 1px solid var(--line);
    border-top: 3px solid var(--red);
    border-radius: 18px;
    transition: transform .2s ease, border-color .2s ease;
}

.info-card {
    height: 100%;
}

.info-card:hover {
    transform: translateY(-4px);
    border-color: #983b3b;
    border-top-color: var(--red);
}

.info-card h2 {
    margin: 1rem 0;
    font-size: 1.35rem;
}

.info-card p:last-child {
    margin-bottom: 0;
}

.info-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 1px solid #683030;
    border-radius: 14px;
    background: #fff;
}

.info-card-icon img {
    filter: invert(13%) sepia(95%) saturate(4900%) hue-rotate(354deg) brightness(70%) contrast(118%);
}

.info-cta {
    margin-top: 2.5rem;
    padding: 2rem;
    border: 1px solid #683030;
    border-left: 4px solid var(--red);
    border-radius: 14px;
    background: #1b1717;
}

.info-cta p {
    max-width: 780px;
}

@media (max-width: 900px) {
    .nav .wrap {
        position: relative;
        gap: .75rem;
    }

    .nav-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        width: 42px;
        height: 42px;
        padding: 10px;
        margin-left: auto;
        background: transparent;
        border: 1px solid var(--line);
        border-radius: 50%;
        color: white;
        cursor: pointer;
    }

    .nav-toggle span {
        display: block;
        width: 20px;
        height: 2px;
        background: currentColor;
    }

    .nav-pages {
        display: none;
        position: absolute;
        top: 100%;
        left: 1.25rem;
        right: 1.25rem;
        margin: 0;
        padding: .75rem;
        background: #191919;
        border: 1px solid var(--line);
        border-radius: 12px;
        box-shadow: 0 12px 25px #0008;
    }

    .nav-pages.is-open {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .nav-pages a {
        padding: .8rem 1rem;
    }

    .nav-contacts {
        gap: .5rem;
    }

    .nav .logo .logo-completo {
        max-width: 34vw;
        height: auto;
    }

}

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

    .info-card:nth-child(even) {
        margin-top: 0;
    }

    .info-intro {
        padding-left: 1rem;
    }

}

@media (prefers-reduced-motion: reduce) {
    .info-card {
        transition: none;
    }

    .info-card:hover {
        transform: none;
    }

}/* ==========================================================
HOME - TRE PILASTRI
========================================================== */
.pillars {
    padding: clamp(2.5rem, 5vw, 4.5rem) 0 clamp(3rem, 6vw, 5.5rem);
    border-top: 1px solid var(--line);
}

.pillars-intro {
    max-width: 720px;
    margin: 0 auto clamp(2rem, 4vw, 3rem);
    text-align: center;
}

.pillars-intro h2 {
    font-size: clamp(1.5rem, 2.4vw, 2.2rem);
    font-weight: 660;
    line-height: 1.15;
    letter-spacing: -.03em;
    margin-bottom: .8rem;
}

.pillars-intro p {
    color: var(--soft);
    line-height: 1.7;
}

.pillars-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
    align-items: stretch;
}

.pillar-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: clamp(1.4rem, 2.4vw, 2rem);
    background: #191919;
    border: 1px solid var(--line);
    border-top: 3px solid var(--red);
    border-radius: 18px;
    color: inherit;
    text-decoration: none;
    transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.pillar-card:hover, .pillar-card:focus-visible {
    transform: translateY(-4px);
    border-color: #983b3b;
    border-top-color: var(--red);
    background: #1d1818;
}

.pillar-card:focus-visible {
    outline: 2px solid var(--red);
    outline-offset: 3px;
}

.pillar-card .info-card-icon {
    align-self: flex-start;
}

.pillar-card h3 {
    margin: 1.1rem 0 .7rem;
    font-size: 1.3rem;
    font-weight: 650;
    letter-spacing: -.02em;
}

.pillar-card p {
    flex: 1;
    margin-bottom: 1.4rem;
    color: var(--soft);
    line-height: 1.7;
    font-size: .95rem;
}

.pillar-link {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    color: var(--red);
    font-weight: 600;
    font-size: .92rem;
}

.pillar-arrow {
    color: var(--red);
    transition: transform .2s ease;
}

.pillar-card:hover .pillar-arrow, .pillar-card:focus-visible .pillar-arrow {
    transform: translateX(5px);
}

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

    .pillar-card p {
        flex: 0 1 auto;
    }

}

@media (prefers-reduced-motion: reduce) {
    .pillar-card, .pillar-arrow {
        transition: none;
    }

    .pillar-card:hover, .pillar-card:focus-visible {
        transform: none;
    }

}

/* Link bianchi a riposo, rossi al passaggio e quando attivi. */
a:not(.btn):not(.logo):not(.pillar-card),
.pillar-link {
    color: var(--white);
}

a:not(.btn):not(.logo):not(.pillar-card):hover,
a:not(.btn):not(.logo):not(.pillar-card):focus-visible,
a:not(.btn):not(.logo):not(.pillar-card)[aria-current="page"],
.pillar-card:hover .pillar-link,
.pillar-card:focus-visible .pillar-link {
    color: var(--red);
}

/* Il bordo occupa spazio anche a riposo per evitare spostamenti del menu. */
.nav-pages a {
    border-bottom: 2px solid transparent;
    text-decoration: none;
    transition: color .2s ease, border-color .2s ease;
}

.nav-pages a:hover,
.nav-pages a:focus-visible,
.nav-pages a[aria-current="page"] {
    border-bottom-color: var(--red);
}

@media (prefers-reduced-motion: reduce) {
    .nav-pages a {
        transition: none;
    }
}

/* Footer compatto: presentazione e menu testuale in linea. */
.footer-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    padding-block: 1.4rem;
    border-top: 1px solid var(--line);
}

.footer-about {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: .5rem 1rem;
}

.footer-about p {
    margin: 0;
}

.footer-menu {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem 1.2rem;
}

.footer-menu a {
    padding-block: .2rem;
    border-bottom: 2px solid transparent;
    text-decoration: none;
    white-space: nowrap;
}

.footer-menu a:hover,
.footer-menu a:focus-visible,
.footer-menu a[aria-current="page"] {
    border-bottom-color: var(--red);
}

/* Contatti nel footer, in linea con il menu testuale. */
.footer-menu .footer-contact {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    min-height: 32px;
}

.footer-contact .icon {
    width: 20px;
    height: 20px;
}
