/* ============================================================
   beedweb.it v2 — design system "Dark tech" (direzione A)
   Statico, nessuna dipendenza. Font self-hosted (variabili woff2).
   ============================================================ */

/* Font self-hosted (latin) */
@font-face {
    font-family: 'Space Grotesk';
    font-style: normal;
    font-weight: 500 700;
    font-display: swap;
    src: url('../fonts/space-grotesk-var.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url('../fonts/inter-var.woff2') format('woff2');
}

:root {
    --bg: #0B0B13;
    --surface: #12121D;
    --surface-2: #16162A;
    --text: #F5F5FA;
    --muted: #A0A0B8;
    --line: rgba(255, 255, 255, .08);
    --line-strong: rgba(255, 255, 255, .18);
    --violet: #6A6AE8;
    --button-bg: #5757C9;
    --button-hover: #4848B4;
    --violet-bright: #9090F8;
    --orange: #FF8100;
    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    --radius: 18px;
    --header-h: 72px;

    /* sezione chiara (servizi): rompe il ritmo del dark */
    --light-bg: #ECECF0;
    --light-ink: #191922;
    --light-muted: #63636E;
    --light-line: rgba(25, 25, 34, .1);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

/* griglia di sfondo che sfuma dall'alto */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(var(--line) 1px, transparent 1px),
        linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(760px 460px at 65% 0%, black, transparent 75%);
    mask-image: radial-gradient(760px 460px at 65% 0%, black, transparent 75%);
    pointer-events: none;
    z-index: -1;
}

.glow {
    position: fixed;
    top: -220px;
    right: -140px;
    width: 640px;
    height: 640px;
    background: radial-gradient(closest-side, rgba(106, 106, 232, .26), transparent 70%);
    pointer-events: none;
    z-index: -1;
}

img,
svg {
    display: block;
}

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

::selection {
    background: rgba(106, 106, 232, .5);
}

.container {
    max-width: 1140px;
    margin-inline: auto;
    padding-inline: 24px;
}

/* ---------- tipografia ---------- */
h1,
h2,
h3 {
    font-family: var(--font-display);
    letter-spacing: -.02em;
    line-height: 1.1;
}

h1 {
    font-weight: 700;
    font-size: clamp(2.1rem, 4.4vw, 3.8rem);
    line-height: 1.05;
    letter-spacing: -.025em;
}

h2 {
    font-weight: 700;
    font-size: clamp(1.8rem, 3.4vw, 2.5rem);
}

h1 em {
    font-style: normal;
    background: linear-gradient(90deg, var(--violet-bright), #C4C4FF);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--violet-bright);
    border: 1px solid rgba(144, 144, 248, .35);
    border-radius: 999px;
    padding: 8px 16px;
}

.eyebrow::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--orange);
}

.eyebrow--orange {
    color: var(--orange);
    border-color: rgba(255, 129, 0, .4);
}

/* claim dell'hero: occhiello esteso, senza chip, su più righe */
.eyebrow--claim {
    border: none;
    padding: 0;
    display: block;
    max-width: 44ch;
    font-size: 12.5px;
    letter-spacing: .14em;
    line-height: 1.8;
    color: var(--violet-bright);
}

.eyebrow--claim::before {
    margin-top: 6px;
}

.para {
    color: var(--muted);
    max-width: 58ch;
}

/* parole rotanti: dissolvenza gestita da main.js */
[data-rotate] {
    color: var(--violet-bright);
    transition: opacity .28s ease;
}

[data-rotate].fade-out {
    opacity: 0;
}

/* ---------- bottoni ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 999px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 15px;
    padding: 14px 28px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform .2s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.btn-primary {
    background: var(--button-bg);
    color: #fff;
}

.btn-primary:hover {
    background: var(--button-hover);
    transform: translateY(-1px);
    box-shadow: 0 10px 28px rgba(106, 106, 232, .38);
}

.btn-ghost {
    border-color: var(--line-strong);
    color: var(--text);
}

.btn-ghost:hover {
    border-color: var(--violet-bright);
    color: var(--violet-bright);
}

.btn-inverted {
    background: #fff;
    color: #0B0B13;
}

.btn-inverted:hover {
    background: var(--orange);
    color: #0B0B13;
    transform: translateY(-1px);
}

.btn-sm {
    padding: 10px 20px;
    font-size: 14px;
}

.btn[disabled] {
    opacity: .6;
    cursor: wait;
}

/* durante l'invio il pulsante respira, come la persona nell'alveare */
.btn-primary.sending {
    animation: btn-breathe 1.1s ease-in-out infinite;
}

@keyframes btn-breathe {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(255, 129, 0, 0);
    }

    50% {
        box-shadow: 0 0 22px 4px rgba(255, 129, 0, .35);
    }
}

.link-arrow {
    font-weight: 600;
    font-size: 15px;
    color: var(--violet-bright);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.link-arrow .arrow {
    transition: transform .2s ease;
}

.link-arrow:hover .arrow {
    transform: translateX(4px);
}

/* ---------- header ---------- */
.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 20;
    background: rgba(11, 11, 19, .72);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}

.nav-inner {
    height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -.03em;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.logo b {
    margin-left: -8px;
}

.logo-icon {
    width: 46px;
    height: 46px;
}

.logo-icon--footer {
    width: 38px;
    height: 38px;
}

.logo-wordmark--footer {
    width: 150px;
    height: 53px;
}

.logo b {
    color: var(--violet-bright);
}

.nav-links {
    display: flex;
    gap: 26px;
    font-size: 14px;
    font-weight: 500;
    color: var(--muted);
}

.nav-links a {
    transition: color .2s;
    position: relative;
}

.nav-links a:hover {
    color: var(--text);
}

/* voce della sezione visibile: sottolineatura viola-arancio */
.nav-links a[aria-current="true"] {
    color: var(--text);
}

.nav-links a[aria-current="true"]::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -7px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--violet-bright), var(--orange));
}

/* burger */
.burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: none;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    cursor: pointer;
}

.burger span {
    display: block;
    height: 2px;
    border-radius: 2px;
    background: var(--text);
    transition: transform .25s ease, opacity .2s ease;
}

body.nav-open .burger span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

body.nav-open .burger span:nth-child(2) {
    opacity: 0;
}

body.nav-open .burger span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* menu aperto: blocca lo scroll della pagina */
body.nav-open {
    overflow: hidden;
}

/* ---------- hero ---------- */
.hero {
    padding-top: calc(var(--header-h) + clamp(2rem, 5vw, 4rem));
    padding-bottom: clamp(3rem, 5vw, 4.5rem);
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 56px;
    align-items: center;
    min-height: min(720px, 92svh);
}

.hero h1 {
    margin-top: 18px;
}

.hero .para {
    margin-top: 24px;
    font-size: 1.125rem;
}

.cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 26px;
}

/* illustrazione hero con chips fluttuanti */
.hero-art {
    position: relative;
    display: grid;
    place-items: center;
}

.hero-art::before {
    content: "";
    position: absolute;
    width: min(100%, 440px);
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(106, 106, 232, .38), rgba(255, 129, 0, .08) 62%, transparent 78%);
}

.hero-art img {
    position: relative;
    width: min(100%, 360px);
    height: auto;
    filter: drop-shadow(0 24px 60px rgba(0, 0, 0, .45));
    animation: float 6s ease-in-out infinite;
}

/* diagramma di orchestrazione (hero) */
.hero-svg {
    position: relative;
    width: min(100%, 430px);
    height: auto;
    margin-inline: auto;
    display: block;
}

/* respiro del nucleo: solo opacità (niente transform su SVG, che
   causa rendering a scatti), animazione fluida gestita dal compositor */
.hero-svg .core-halo {
    animation: halo-breathe 4s ease-in-out infinite;
}

@keyframes halo-breathe {

    0%,
    100% {
        opacity: .2;
    }

    50% {
        opacity: .9;
    }
}

/* i pacchetti sul diagramma sono generati da main.js (coreografia
   variabile di ciclo in ciclo + interazione col mouse): qui restano
   solo il parallax del diagramma e lo strato degli impulsi */
.hero-svg {
    transition: transform .25s ease-out;
    will-change: transform;
}

.hero-svg .pulses-js {
    pointer-events: none;
}

/* nodi interattivi: hover = il nodo su cui l'orchestratore sta agendo */
.hero-svg [data-node] {
    cursor: pointer;
    transition: filter .25s ease, stroke-width .25s ease;
}

.hero-svg [data-node]:hover {
    filter: drop-shadow(0 0 12px rgba(144, 144, 248, .7));
    stroke-width: 2.5;
}

.hero-svg [data-node="persona"]:hover {
    filter: drop-shadow(0 0 14px rgba(255, 129, 0, .75));
}

/* celle cliccabili: focus visibile da tastiera */
.hero-svg [data-node]:focus-visible {
    outline: 2px solid var(--violet-bright);
    outline-offset: 4px;
}

/* le etichette e le icone non devono intercettare il puntatore */
.hero-svg text,
.hero-svg .tool-icon {
    pointer-events: none;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* ---------- sezioni ---------- */
section {
    padding-block: clamp(4rem, 8vw, 6rem);
}

.section-head {
    margin-bottom: 44px;
}

.section-head h2 {
    margin-top: 18px;
}

.section-head .para {
    margin-top: 16px;
}

/* ---------- AI engineering: palcoscenico elevato ----------
   Pannello scuro appena sopra il fondo, con alone viola: dà uno
   stage alla sezione e spezza la corsa di nero uniforme */
.ai-eng {
    background:
        radial-gradient(640px 340px at 18% 0%, rgba(106, 106, 232, .24), transparent 64%),
        #10101E;
    border: 1px solid rgba(144, 144, 248, .16);
    border-radius: 28px;
    margin-inline: clamp(16px, 6vw, 110px);
    margin-block: clamp(1.5rem, 4vw, 3rem);
    box-shadow: 0 18px 60px rgba(0, 0, 0, .35);
    padding-block: clamp(3.5rem, 7vw, 5.5rem);
}

.ai-deck {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(1.15rem, 2vw, 1.35rem);
    color: var(--violet-bright);
    margin-top: 10px;
}

.ai-cols {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 40px;
    max-width: 960px;
}

.ai-cols p {
    color: var(--muted);
    font-size: .99rem;
}

.ai-points {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
    margin-top: 48px;
}

/* ---------- la cella aperta ----------
   Gli strati della cella AI che la persona non vede ma che ci sono
   sempre: la richiesta entra (arancio), attraversa i quattro livelli
   (viola) e torna come risposta validata (arancio). */
.open-cell {
    margin-block: 52px 8px;
}

.oc-caption {
    display: block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--violet-bright);
    margin-bottom: 22px;
}

.oc-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 64px 18px;
    position: relative;
    /* respiro ai bordi: le dissolvenze non toccano il bordo del pannello */
    padding-inline: 56px;
}

/* percorso di collegamento: SVG disegnato da main.js — la riga corre
   sotto la prima fila, si riaggancia con una curva dolce e corre sopra
   la seconda; ogni cella aggancia la sua riga con una stub verticale */
.oc-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: visible;
}

.oc-step {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 16px;
    align-items: center;
}

/* seconda riga specchiata: testo a sinistra, cella a destra */
.oc-step:nth-child(n+4) {
    grid-template-columns: 1fr 56px;
    text-align: right;
}

.oc-step:nth-child(n+4)>.oc-chip {
    grid-column: 2;
    grid-row: 1;
}

.oc-step:nth-child(n+4)>div {
    grid-column: 1;
    grid-row: 1;
}

/* seconda fila in ordine di lettura: strumenti, modelli, risposta */
.oc-step:nth-child(4) {
    grid-column: 1;
    grid-row: 2;
}

.oc-step:nth-child(5) {
    grid-column: 2;
    grid-row: 2;
}

.oc-step:nth-child(6) {
    grid-column: 3;
    grid-row: 2;
}

.oc-chip {
    width: 56px;
    height: 64px;
    display: grid;
    place-items: center;
    /* fondo solido: il percorso passa sotto il chip e non deve vedersi */
    background: #212143;
    color: var(--violet-bright);
    clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}

.oc-chip.oc-orange {
    background: #3E271E;
    color: var(--orange);
}

.oc-step h3 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: .95rem;
    letter-spacing: -.01em;
}

.oc-step p {
    font-size: 13.5px;
    color: var(--muted);
    margin-top: 2px;
}

/* chi-siamo */
.about-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
    gap: 56px;
    align-items: center;
}

.about-grid .para {
    margin-top: 20px;
}

.about-grid .link-arrow {
    margin-top: 28px;
}

.founder-credit {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px 18px;
    margin-top: 28px;
}

.founder-credit__label {
    color: var(--muted);
    font-size: .76rem;
    font-weight: 600;
    letter-spacing: .1em;
    line-height: 1.4;
    text-transform: uppercase;
}

.founder-credit__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 58px;
    padding: 8px 14px;
    border: 1px solid rgba(144, 144, 248, .2);
    border-radius: 12px;
    background: #F5F5F7;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .16);
    transition: transform .2s ease, border-color .2s ease, background-color .2s ease;
}

.founder-credit__link:hover {
    transform: translateY(-2px);
    border-color: rgba(144, 144, 248, .55);
    background: #FFFFFF;
}

.founder-credit__link:focus-visible {
    outline: 2px solid var(--orange);
    outline-offset: 3px;
}

.founder-credit__logo {
    display: block;
    width: 138px;
    height: auto;
}

.about-img {
    position: relative;
}

.about-img::before {
    content: "";
    position: absolute;
    inset: 8% 12%;
    border-radius: 24px;
    background: radial-gradient(closest-side, rgba(106, 106, 232, .25), transparent 78%);
}

.about-img img,
.about-svg {
    position: relative;
    width: 100%;
    height: auto;
}

/* valori */
.values {
    list-style: none;
    display: grid;
    gap: 14px;
    margin-top: 24px;
}

.values li {
    display: flex;
    gap: 12px;
    align-items: baseline;
    color: var(--muted);
    font-size: .95rem;
}

.values li::before {
    content: "✦";
    color: var(--orange);
    font-size: .8em;
}

/* counters: pannello viola */
.counters {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(640px 320px at 15% 0%, rgba(106, 106, 232, .3), transparent 62%),
        radial-gradient(520px 280px at 90% 100%, rgba(255, 129, 0, .08), transparent 60%),
        var(--surface-2);
    border-block: 1px solid var(--line);
}

/* reticolo esagonale in filigrana */
.counters-art {
    position: absolute;
    right: 24px;
    bottom: 8px;
    width: min(38vw, 380px);
    opacity: .07;
    pointer-events: none;
    user-select: none;
}

.counters-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    gap: 56px;
    align-items: center;
}

.counters-grid h2 {
    margin-top: 18px;
}

.counters-grid .para {
    margin-top: 16px;
}

/* Fasi del lavoro, con risultati comprensibili per il cliente. */
.working-steps { list-style: none; counter-reset: stages; display: grid; gap: 26px; }
.working-steps li { counter-increment: stages; position: relative; padding-left: 48px; }
.working-steps li::before { content: "0" counter(stages); position: absolute; left: 0; top: -3px; color: var(--violet-bright); font-family: var(--font-display); font-size: 24px; }
.working-steps h3 { font-size: 18px; }
.working-steps p { margin-top: 8px; color: var(--muted); font-size: 15px; }

/* servizi: sezione chiara a "foglio" — pannello arrotondato che
   sale sopra il fondo scuro, visibile ai lati e dietro */
.section--light {
    background: var(--light-bg);
    color: var(--light-ink);
    border-radius: 36px;
    width: calc(100% - clamp(32px, 12vw, 220px));
    max-width: 1440px;
    margin-inline: auto;
    margin-block: clamp(1.5rem, 4vw, 3rem);
    padding-block: clamp(3.5rem, 6vw, 4.75rem);
    box-shadow: 0 24px 80px rgba(0, 0, 0, .45);
}

.section--light .section-head {
    margin-bottom: 32px;
}

.section--light .para {
    color: var(--light-muted);
}

.section--light .card {
    background: #fff;
    border-color: var(--light-line);
    box-shadow: 0 2px 10px rgba(25, 25, 34, .05);
}

.section--light .card:hover {
    border-color: rgba(106, 106, 232, .5);
    box-shadow: 0 16px 36px rgba(25, 25, 34, .12);
}

.section--light .card p {
    color: var(--light-muted);
}

.section--light .icon-chip {
    background: rgba(106, 106, 232, .12);
    color: #5A5AD0;
}

/* L’esagono resta nell’icona; il testo ha sempre spazio rettangolare. */
.cards.services-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.services-grid .icon-chip {
    width: 46px;
    height: 52px;
    border-radius: 0;
    clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}

/* servizi */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 18px;
}

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px;
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.card:hover {
    transform: translateY(-4px);
    border-color: rgba(144, 144, 248, .55);
    box-shadow: 0 14px 34px rgba(0, 0, 0, .38);
}

.icon-chip {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: rgba(106, 106, 232, .14);
    color: var(--violet-bright);
}

.card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-top: 18px;
    letter-spacing: -.01em;
}

.card p {
    margin-top: 8px;
    font-size: 14.5px;
    color: var(--muted);
}

/* lampo "a cella": al passaggio il bordo si accende e si assesta
   (solo card scure: ai-points e casi d'uso) */
.ai-points .card:hover,
.use-cases .card:hover {
    animation: card-flash .55s ease;
}

@keyframes card-flash {
    0% {
        border-color: rgba(144, 144, 248, .95);
        box-shadow: 0 0 26px rgba(144, 144, 248, .28);
    }

    100% {
        border-color: rgba(144, 144, 248, .55);
        box-shadow: 0 14px 34px rgba(0, 0, 0, .38);
    }
}

/* ---------- casi d'uso ---------- */
.use-cases {
    padding-block: clamp(3.5rem, 7vw, 5rem);
}

/* ---------- contatti: pannello flottante, gemello del palco AI ---------- */
.contact-panel {
    background:
        radial-gradient(640px 340px at 85% 0%, rgba(106, 106, 232, .2), transparent 64%),
        #10101E;
    border: 1px solid rgba(144, 144, 248, .16);
    border-radius: 28px;
    margin-inline: clamp(16px, 6vw, 110px);
    margin-block: clamp(1.5rem, 4vw, 3rem);
    box-shadow: 0 18px 60px rgba(0, 0, 0, .35);
    padding-block: clamp(3rem, 6vw, 4.5rem);
}

/* ---------- contatti ---------- */
.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
    gap: 56px;
    align-items: start;
}

.contact-grid h2 {
    margin-top: 18px;
}

/* form */
.form {
    margin-top: 32px;
    display: grid;
    gap: 16px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.field {
    display: grid;
    gap: 8px;
}

.field label {
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
}

.field input,
.field textarea {
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--text);
    background: #0C0C16;
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    padding: 14px 16px;
    transition: border-color .2s ease, box-shadow .2s ease;
    width: 100%;
}

.field textarea {
    min-height: 140px;
    resize: vertical;
}

/* honeypot: fuori schermo, invisibile agli utenti */
.hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* consenso privacy contestuale */
.check-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 13.5px;
    color: var(--muted);
}

.check-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    flex: none;
    accent-color: var(--violet);
    cursor: pointer;
}

.check-row label {
    cursor: pointer;
}

.check-row a {
    color: var(--violet-bright);
}

.check-row a:hover {
    text-decoration: underline;
}

.field input::placeholder,
.field textarea::placeholder {
    color: #8C8CA6;
}

.field input:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--violet-bright);
    box-shadow: 0 0 0 3px rgba(106, 106, 232, .22);
}

.form-status {
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 14.5px;
    display: none;
}

.form-status.show {
    display: block;
}

/* widget Turnstile: respiro coerente col form */
#turnstile-widget {
    margin: 6px 0 2px;
}

.form-status.ok {
    background: rgba(74, 222, 128, .1);
    border: 1px solid rgba(74, 222, 128, .35);
    color: #86EFAC;
}

.form-status.err {
    background: rgba(248, 113, 113, .1);
    border: 1px solid rgba(248, 113, 113, .35);
    color: #FCA5A5;
}

/* scheda azienda */
.company-card {
    border: 1px solid rgba(144, 144, 248, .18);
    border-radius: 20px;
    background: #0C0C16;
    padding: 34px;
}

.company-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
}

.company-card h3::after {
    content: "";
    display: block;
    width: 34px;
    height: 2px;
    margin-top: 12px;
    border-radius: 2px;
    background: var(--orange);
}

.company-card .para {
    margin-top: 10px;
    font-size: .95rem;
}

.company-list {
    list-style: none;
    margin-top: 22px;
    display: grid;
    gap: 14px;
}

.company-list li {
    display: flex;
    gap: 12px;
    font-size: 13.5px;
    color: var(--muted);
    line-height: 1.55;
}

.company-list svg {
    flex: none;
    margin-top: 2px;
    color: var(--violet-bright);
}

.company-list a:hover {
    color: var(--text);
}

/* ---------- footer ---------- */
footer {
    border-top: 1px solid var(--line);
    padding-block: 2.4rem;
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    font-size: 13.5px;
    color: var(--muted);
}

.footer-links a:hover {
    color: var(--text);
}

.social {
    display: flex;
    align-items: center;
    gap: 16px;
}

.social a {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    color: var(--muted);
    transition: color .2s, border-color .2s, transform .2s;
}

.social a:hover {
    color: var(--violet-bright);
    border-color: var(--violet-bright);
    transform: translateY(-2px);
}

.copyright {
    font-size: 13px;
    color: var(--muted);
}

/* ---------- back to top ---------- */
.to-top {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 15;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid var(--line-strong);
    background: rgba(18, 18, 29, .85);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    color: var(--text);
    display: grid;
    place-items: center;
    cursor: pointer;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity .25s ease, transform .25s ease, border-color .2s;
}

.to-top.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.to-top:hover {
    border-color: var(--violet-bright);
    color: var(--violet-bright);
}

/* ---------- reveal on scroll ----------
   Lo stato nascosto viene applicato solo se JavaScript è attivo
   (main.js aggiunge la classe .js su <html>): senza JS tutto resta visibile. */
.js .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .2, 1);
    transition-delay: var(--d, 0s);
}

.js .reveal.in {
    opacity: 1;
    transform: none;
}

/* ---------- approccio: orchestrazione ---------- */
.vision {
    padding-block: clamp(4rem, 8vw, 6.5rem);
    border-top: 1px solid var(--line);
}

.vision-inner {
    max-width: 960px;
}

.vision h2 {
    font-size: clamp(1.9rem, 3.8vw, 2.9rem);
    margin-top: 18px;
    max-width: 22ch;
}

.vision-cols {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
    margin-top: 30px;
}

.vision-cols p {
    color: var(--muted);
    font-size: 1.02rem;
}

/* ---------- accessibilità ---------- */
summary:focus-visible,
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--violet-bright);
    outline-offset: 3px;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 8px;
    z-index: 100;
    background: var(--violet);
    color: #fff;
    padding: 10px 18px;
    border-radius: 999px;
}

.skip-link:focus {
    left: 8px;
}

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

/* v01: readable content, controls and progressive enhancement */
.logo-wordmark { width: 158px; height: auto; }
.logo { flex-shrink: 0; }
.hero-art { overflow: clip; }
.hero-svg { max-width: 100%; }
.hero > *, .contact-grid > *, .form-row > *, .field, .card, .oc-step > div { min-width: 0; }
h1, h2, h3, .company-list span { overflow-wrap: anywhere; }
.engineering-details { margin-top: 28px; border-top: 1px solid var(--line-strong); }
.engineering-details summary { padding: 22px 4px; color: var(--violet-bright); cursor: pointer; font-weight: 600; }
.engineering-details .open-cell { margin-top: 12px; }
.engineering-details .reveal { opacity: 1; transform: none; }
.case-label { color: var(--violet-bright); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.cards.project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.case-card { display: flex; flex-direction: column; padding: clamp(22px, 3vw, 36px); }
.case-card h3 { font-size: clamp(1.25rem, 2.1vw, 1.6rem); line-height: 1.25; margin-top: 14px; margin-bottom: 8px; }
.case-card p { font-size: 15.5px; line-height: 1.7; margin-top: 16px; }
.case-card > p:last-of-type { margin-bottom: 24px; }
.case-detail { margin-top: auto; border-top: 1px solid var(--line-strong); padding-top: 20px; font-size: 15.5px; line-height: 1.7; }
.case-detail dt { font-weight: 600; color: var(--text); }
.case-detail dd { color: var(--muted); margin-top: 4px; }
.use-cases > .link-arrow { margin-top: 28px; }
.contact-intro { margin-top: 16px; }
.contact-alternative { font-size: 14px; color: var(--muted); }
.contact-alternative a { color: var(--violet-bright); text-decoration: underline; text-underline-offset: 3px; }
.field-hint { color: var(--muted); font-size: 13px; }
.field-error { color: #FCA5A5; font-size: 13px; }
.field-error:empty, #antispam-status:empty { display: none; }
.field [aria-invalid="true"] { border-color: #FCA5A5; }
#turnstile-widget { min-width: 0; max-width: 100%; min-height: 65px; }
#turnstile-widget:empty { min-height: 0; }
.btn:disabled { cursor: wait; opacity: .65; }
html:not(.js) .site-nav { position: static; }
html:not(.js) .nav-inner { height: auto; min-height: var(--header-h); padding-block: 16px; flex-wrap: wrap; }
html:not(.js) .nav-links { flex-wrap: wrap; }
html:not(.js) .nav-panel { display: block; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {

    /* sette voci + pulsante: sotto questa larghezza il pulsante e di troppo,
       il contatto resta raggiungibile dal menu */
    .nav-cta {
        display: none;
    }
}

@media (max-width: 980px) {

    .hero,
    .about-grid,
    .counters-grid,
    .contact-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 40px;
    }

    .hero {
        min-height: 0;
    }

    .hero-art svg {
        max-width: 320px;
    }

    .counters-art {
        display: none;
    }

    .about-img img {
        max-width: 460px;
    }

    .cards.services-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* cella aperta: due colonne — niente specchio, la lettura è uniforme */
    .oc-steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding-inline: 20px;
    }

    .oc-step:nth-child(n) {
        grid-column: auto;
        grid-row: auto;
        grid-template-columns: 56px 1fr;
        text-align: left;
    }

    .oc-step:nth-child(n)>.oc-chip,
    .oc-step:nth-child(n)>div {
        grid-column: auto;
        grid-row: auto;
    }
}

@media (max-width: 760px) {

    .cards.services-grid,
    .cards.project-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .oc-steps {
        grid-template-columns: minmax(0, 420px);
        justify-content: center;
    }
}

@media (max-width: 880px) {
    .js .burger {
        display: flex;
    }

    .js .nav-panel {
        position: fixed;
        top: var(--header-h);
        max-height: calc(100dvh - var(--header-h));
        overflow-y: auto;
        overscroll-behavior: contain;
        left: 0;
        right: 0;
        background: rgba(11, 11, 19, .96);
        -webkit-backdrop-filter: blur(14px);
        backdrop-filter: blur(14px);
        border-bottom: 1px solid var(--line);
        padding: 12px 24px 24px;
        display: none;
    }

    body.nav-open .nav-panel {
        display: block;
    }

    .nav-panel .nav-links {
        flex-direction: column;
        gap: 4px;
        font-size: 16px;
    }

    .nav-panel .nav-links a {
        display: block;
        padding: 12px 4px;
        border-bottom: 1px solid var(--line);
    }

    .nav-cta {
        display: none;
    }
}

@media (max-width: 640px) {
    .form-row {
        grid-template-columns: minmax(0, 1fr);
    }

    /* Il widget viene renderizzato in modalità compact sotto 300px. */
    .contact-panel {
        margin-inline: 10px;
    }

    .contact-panel .container {
        padding-inline: 14px;
    }

    input,
    textarea {
        max-width: 100%;
    }

    .cards {
        grid-template-columns: minmax(0, 1fr);
    }

    .vision-cols,
    .ai-cols {
        grid-template-columns: minmax(0, 1fr);
    }

    .founder-credit {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }

    .reveal,
    .js .reveal {
        opacity: 1;
        transform: none;
    }
}
