/* Stile del sito pubblico (home e pagine come /automazione) */
/* ================= VARIABILI ================= */
:root {
    --bg: #05070f;
    --bg-2: #0a0e1c;
    --surface: #0f1426;
    --surface-2: #141a31;
    --border: rgba(120, 140, 255, 0.14);
    --text: #e6e9f5;
    --text-muted: #8f97b8;

    /* Palette estratta dal logo Quantaris */
    --cyan: #22c7f5;
    --blue: #2563eb;
    --indigo: #3b2fd9;
    --violet: #8b2be2;

    --grad: linear-gradient(135deg, var(--cyan) 0%, var(--blue) 50%, var(--violet) 100%);
    --grad-soft: linear-gradient(135deg, rgba(34,199,245,.15), rgba(37,99,235,.15), rgba(139,43,226,.15));
    --glow: 0 0 24px rgba(37, 99, 235, 0.45), 0 0 48px rgba(139, 43, 226, 0.25);
    --glow-cyan: 0 0 20px rgba(34, 199, 245, 0.4);

    --radius: 16px;
    --maxw: 1200px;
    --ease: cubic-bezier(.2, .8, .2, 1);
}

/* ================= RESET ================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
h1, h2, h3 { font-family: 'Orbitron', sans-serif; line-height: 1.2; letter-spacing: .02em; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
section { padding: 110px 0; position: relative; }

.grad-text {
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.section-head { text-align: center; max-width: 680px; margin: 0 auto 64px; }
.eyebrow {
    display: inline-block;
    font-family: 'Orbitron', sans-serif;
    font-size: .75rem;
    letter-spacing: .3em;
    color: var(--cyan);
    margin-bottom: 14px;
    text-transform: uppercase;
}
.section-head h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 16px; }
.section-head p { color: var(--text-muted); font-size: 1.05rem; }

/* ================= BOTTONI ================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 999px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: .95rem;
    border: none;
    cursor: pointer;
    transition: transform .3s var(--ease), box-shadow .3s var(--ease), background-position .5s var(--ease);
    white-space: nowrap;
}
.btn-primary {
    background: linear-gradient(135deg, var(--cyan), var(--blue), var(--violet), var(--cyan));
    background-size: 300% 100%;
    color: #fff;
    box-shadow: 0 0 16px rgba(37, 99, 235, .35);
}
.btn-primary:hover {
    background-position: 100% 0;
    transform: translateY(-2px);
    box-shadow: var(--glow);
}
.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-outline:hover {
    border-color: var(--cyan);
    color: var(--cyan);
    box-shadow: var(--glow-cyan);
    transform: translateY(-2px);
}
.btn:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

/* ================= HEADER ================= */
.header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    transition: background .3s, border-color .3s, backdrop-filter .3s;
    border-bottom: 1px solid transparent;
}
.header.scrolled {
    background: rgba(5, 7, 15, .8);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom-color: var(--border);
}
.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 76px;
    gap: 24px;
}
.logo {
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: 1.4rem;
    letter-spacing: .18em;
    display: flex;
    align-items: center;
    gap: 10px;
}
.logo-mark {
    width: 46px; height: 37px;
    flex-shrink: 0;
    filter: drop-shadow(0 0 8px rgba(34, 199, 245, .35));
    transition: filter .3s, transform .4s var(--ease);
}
.logo:hover .logo-mark {
    filter: drop-shadow(0 0 14px rgba(139, 43, 226, .6));
    transform: rotate(-6deg);
}

/* Marchio grande nella hero */
.hero-mark {
    width: clamp(120px, 18vw, 180px);
    height: auto;
    margin: 0 auto 28px;
    display: block;
    filter: drop-shadow(0 0 30px rgba(34, 199, 245, .35)) drop-shadow(0 0 60px rgba(139, 43, 226, .3));
    animation: hover-mark 6s ease-in-out infinite;
}
@keyframes hover-mark {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
.nav-links { display: flex; gap: clamp(18px, 1.8vw, 28px); }
.nav-links a {
    white-space: nowrap;
    color: var(--text-muted);
    font-size: .92rem;
    font-weight: 500;
    position: relative;
    transition: color .3s;
}
.nav-links a::after {
    content: '';
    position: absolute;
    left: 0; bottom: -6px;
    width: 0; height: 2px;
    background: var(--grad);
    transition: width .3s var(--ease);
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }
.nav-links a[aria-current="page"] { color: var(--text); }
.nav-links a[aria-current="page"]::after { width: 100%; }

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border);
    color: var(--text);
    width: 44px; height: 44px;
    border-radius: 12px;
    font-size: 1.1rem;
    cursor: pointer;
}

.nav-links a.client-link { color: var(--cyan); display: inline-flex; align-items: center; gap: 6px; }
.nav-links a.client-link:hover { color: var(--text); }

/* ================= HERO ================= */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 140px 0 100px;
    overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(120, 140, 255, .06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(120, 140, 255, .06) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
}
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: .55;
    animation: float 14s ease-in-out infinite;
}
.orb-1 { width: 480px; height: 480px; background: var(--cyan); top: -120px; left: -140px; opacity: .25; }
.orb-2 { width: 520px; height: 520px; background: var(--indigo); bottom: -160px; right: -120px; animation-delay: -5s; opacity: .35; }
.orb-3 { width: 320px; height: 320px; background: var(--blue); top: 40%; left: 50%; animation-delay: -9s; opacity: .2; }
@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(40px, -30px) scale(1.08); }
}

.hero-inner { text-align: center; max-width: 900px; margin: 0 auto; }
.badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 18px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(15, 20, 38, .6);
    font-size: .82rem;
    color: var(--text-muted);
    margin-bottom: 28px;
}
.badge .dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 10px var(--cyan);
    animation: pulse 2s infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

.hero h1 {
    font-size: clamp(2.2rem, 6vw, 4.2rem);
    font-weight: 700;
    margin-bottom: 26px;
}
.slogan {
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: clamp(1rem, 2.6vw, 1.5rem);
    letter-spacing: .5em;
    margin-bottom: 26px;
    padding-left: .5em; /* compensa il letter-spacing per il centraggio */
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 18px rgba(37, 99, 235, .55));
}
.hero p.lead {
    color: var(--text-muted);
    font-size: clamp(1rem, 1.8vw, 1.18rem);
    max-width: 640px;
    margin: 0 auto 40px;
}
.hero-ctas { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 80px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
}
.stat strong {
    display: block;
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.5rem, 3vw, 2.1rem);
}
.stat span { color: var(--text-muted); font-size: .88rem; }

/* ================= SERVIZI ================= */
.services { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%); }
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 28px;
}
.card {
    position: relative;
    padding: 40px 32px;
    border-radius: var(--radius);
    background: var(--surface);
    transition: transform .4s var(--ease), box-shadow .4s var(--ease);
    isolation: isolate;
}
/* Bordo con gradiente */
.card::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 1px;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(34,199,245,.25), rgba(120,140,255,.08) 40%, rgba(139,43,226,.25));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    transition: background .4s var(--ease);
    z-index: -1;
}
/* Alone interno al passaggio */
.card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at 50% 0%, rgba(37,99,235,.18), transparent 65%);
    opacity: 0;
    transition: opacity .4s var(--ease);
    z-index: -1;
}
.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0,0,0,.45), var(--glow);
}
.card:hover::before { background: var(--grad); }
.card:hover::after { opacity: 1; }

.card-icon {
    width: 62px; height: 62px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    font-size: 1.5rem;
    background: var(--grad-soft);
    border: 1px solid var(--border);
    color: var(--cyan);
    margin-bottom: 26px;
    transition: transform .4s var(--ease), background .4s, color .4s, box-shadow .4s;
}
.card:hover .card-icon {
    background: var(--grad);
    color: #fff;
    transform: rotate(-6deg) scale(1.06);
    box-shadow: var(--glow);
}
.card h3 { font-size: 1.15rem; margin-bottom: 14px; }
.card p { color: var(--text-muted); margin-bottom: 22px; }
.card ul li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-size: .9rem;
    padding: 5px 0;
}
.card ul li i { color: var(--cyan); font-size: .8rem; }

/* ================= AI & LLM ================= */
.llm { background: linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 50%, var(--bg-2) 100%); }
.llm-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    margin-bottom: 28px;
}
.llm-card { padding: 44px 38px; }
.llm-card .tag-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--cyan);
    margin-bottom: 10px;
}
.llm-card h3 { font-size: 1.35rem; }
.llm-card ul { margin-bottom: 24px; }
.llm-card ul li { align-items: flex-start; }
.llm-card ul li i { margin-top: 7px; }
.tech-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tech {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: .78rem;
    font-weight: 500;
    color: var(--text);
    background: rgba(5, 7, 15, .6);
    border: 1px solid var(--border);
    transition: border-color .3s, color .3s;
}
.card:hover .tech { border-color: rgba(34, 199, 245, .35); }

.hybrid {
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 32px 38px;
    border-radius: var(--radius);
    background: var(--grad-soft);
    border: 1px solid var(--border);
    margin-bottom: 28px;
}

/* Griglia dei servizi: quattro card disposte due per due */
.grid-2x2 { grid-template-columns: repeat(2, 1fr); }
.services .card ul { margin-bottom: 0; }
.services .card .tech-label { margin: 22px 0 10px; font-size: .82rem; font-weight: 600; color: var(--text); }

/* Blocco piattaforma Dify */
.platform {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 44px;
    align-items: center;
    padding: 48px;
    border-radius: 24px;
    background:
        radial-gradient(circle at 0% 0%, rgba(34, 199, 245, .14), transparent 45%),
        radial-gradient(circle at 100% 100%, rgba(139, 43, 226, .18), transparent 45%),
        var(--surface);
    margin-bottom: 64px;
    isolation: isolate;
}
.platform::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 1.5px;
    border-radius: inherit;
    background: var(--grad);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    z-index: -1;
}
.platform h3 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin: 8px 0 16px; }
.platform > div > p { color: var(--text-muted); margin-bottom: 26px; }
.platform .features { margin-bottom: 0; }
.platform .note { font-size: .78rem; color: var(--text-muted); opacity: .8; margin: 18px 0 0; }
.hybrid > i {
    flex-shrink: 0;
    width: 64px; height: 64px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    font-size: 1.5rem;
    color: #fff;
    background: var(--grad);
    box-shadow: var(--glow);
}
.hybrid h3 { font-size: 1.1rem; margin-bottom: 6px; }
.hybrid p { color: var(--text-muted); }
.hybrid .btn { margin-left: auto; }

.usecases-title {
    text-align: center;
    font-size: clamp(1.2rem, 2.6vw, 1.5rem);
    margin-bottom: 32px;
}
.usecases {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.usecase {
    padding: 26px 22px;
    border-radius: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
}
.usecase:hover {
    transform: translateY(-5px);
    border-color: rgba(139, 43, 226, .5);
    box-shadow: 0 0 22px rgba(139, 43, 226, .25);
}
.usecase i { font-size: 1.3rem; color: var(--cyan); margin-bottom: 14px; display: block; }
.usecase h4 { font-size: .98rem; margin-bottom: 6px; }
.usecase p { color: var(--text-muted); font-size: .86rem; }

/* ================= CYBERSECURITY ================= */
.security { background: var(--bg-2); overflow: hidden; }
.security-box {
    position: relative;
    border-radius: 28px;
    padding: 72px 56px;
    background:
        radial-gradient(circle at 85% 20%, rgba(139,43,226,.22), transparent 45%),
        radial-gradient(circle at 10% 90%, rgba(34,199,245,.16), transparent 45%),
        var(--surface);
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 56px;
    align-items: center;
    isolation: isolate;
}
.security-box::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 1.5px;
    border-radius: inherit;
    background: var(--grad);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    z-index: -1;
}
.security-box h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); margin-bottom: 20px; }
.security-box > div > p { color: var(--text-muted); margin-bottom: 32px; font-size: 1.05rem; }

.features { display: grid; gap: 18px; margin-bottom: 36px; }
.feature {
    display: flex;
    gap: 18px;
    padding: 18px;
    border-radius: 14px;
    background: rgba(5, 7, 15, .5);
    border: 1px solid var(--border);
    transition: border-color .3s, transform .3s var(--ease), box-shadow .3s;
}
.feature:hover {
    border-color: rgba(34, 199, 245, .5);
    transform: translateX(6px);
    box-shadow: var(--glow-cyan);
}
.feature i {
    flex-shrink: 0;
    width: 44px; height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: var(--grad);
    color: #fff;
}
.feature h3 { font-family: 'Inter', sans-serif; font-size: 1rem; font-weight: 600; margin-bottom: 4px; letter-spacing: 0; }
.feature p { color: var(--text-muted); font-size: .9rem; }
a.feature { color: inherit; text-decoration: none; }
.feature .feature-cta { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: .85rem; font-weight: 600; color: var(--cyan); }
.feature .feature-cta i { width: auto; height: auto; background: none; border: 0; box-shadow: none; font-size: .75rem; color: inherit; display: inline; }

/* Shield visual */
.shield-visual {
    position: relative;
    aspect-ratio: 1;
    max-width: 420px;
    width: 100%;
    margin: 0 auto;
    display: grid;
    place-items: center;
}
.ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(120, 140, 255, .25);
}
.ring-1 { inset: 0; border-style: dashed; animation: spin 40s linear infinite; }
.ring-2 { inset: 12%; border-color: rgba(34, 199, 245, .35); animation: spin 26s linear infinite reverse; }
.ring-3 { inset: 24%; border-color: rgba(139, 43, 226, .4); }
.ring-1::after, .ring-2::after {
    content: '';
    position: absolute;
    width: 12px; height: 12px;
    border-radius: 50%;
    top: -6px; left: 50%;
    background: var(--cyan);
    box-shadow: 0 0 16px var(--cyan);
}
.ring-2::after { background: var(--violet); box-shadow: 0 0 16px var(--violet); }
@keyframes spin { to { transform: rotate(360deg); } }

.shield-core {
    width: 42%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: var(--grad);
    display: grid;
    place-items: center;
    font-size: clamp(2.6rem, 6vw, 4rem);
    color: #fff;
    box-shadow: 0 0 60px rgba(37, 99, 235, .6), 0 0 120px rgba(139, 43, 226, .35);
    animation: breathe 4s ease-in-out infinite;
}
@keyframes breathe {
    0%, 100% { box-shadow: 0 0 50px rgba(37,99,235,.5), 0 0 100px rgba(139,43,226,.3); }
    50% { box-shadow: 0 0 80px rgba(34,199,245,.6), 0 0 150px rgba(139,43,226,.45); }
}
.status-chip {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(5, 7, 15, .85);
    border: 1px solid var(--border);
    font-size: .78rem;
    font-weight: 500;
    backdrop-filter: blur(6px);
    white-space: nowrap;
}
.status-chip i { color: var(--cyan); }
.chip-1 { top: 8%; left: -4%; }
.chip-2 { bottom: 14%; right: -6%; }
.chip-3 { bottom: 2%; left: 6%; }

/* ================= NIS2 ================= */
.nis2 { background: linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 100%); --ok: #2dd4a4; --warn: #f5b942; --danger: #ff4d7a; }
.nis2-info { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 28px; }
.nis2-info .card { padding: 32px 28px; }
.nis2-info .card p { margin-bottom: 0; }
.nis2-info strong { color: var(--text); }

.timeline {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface);
    margin-bottom: 64px;
    overflow: hidden;
}
.timeline div { padding: 24px 26px; border-right: 1px solid var(--border); }
.timeline div:last-child { border-right: none; }
.timeline b { display: block; font-family: 'Orbitron', sans-serif; font-size: 1.5rem; margin-bottom: 4px; }
.timeline span { color: var(--text-muted); font-size: .9rem; }
.timeline .t-head { grid-column: 1 / -1; border-right: none; border-bottom: 1px solid var(--border); padding: 16px 26px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.timeline .t-head i { color: var(--cyan); }

/* Misuratore */
.meter {
    position: relative;
    border-radius: 24px;
    padding: 48px;
    background: var(--surface);
    isolation: isolate;
}
.meter::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 1.5px;
    border-radius: inherit;
    background: var(--grad);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    z-index: -1;
}
.meter-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 32px; }
.meter-head h3 { font-size: clamp(1.3rem, 3vw, 1.8rem); margin-top: 6px; }
.meter-head p { color: var(--text-muted); max-width: 560px; }
.meter-steps { display: flex; gap: 8px; }
.meter-steps span {
    padding: 8px 14px;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 600;
    border: 1px solid var(--border);
    color: var(--text-muted);
}
.meter-steps span.active { color: #fff; background: var(--grad); border-color: transparent; }

.step-panel[hidden] { display: none; }
.scope-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 16px; margin-bottom: 24px; }
.nis2 select {
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    font-family: inherit;
    font-size: 1rem;
}
.nis2 select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, .2); }
.nis2 select option, .nis2 select optgroup { background: var(--surface); }

.scope-result {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 20px 22px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--bg-2);
    margin-bottom: 24px;
}
.scope-result i { font-size: 1.4rem; margin-top: 2px; }
.scope-result h4 { font-size: 1.05rem; margin-bottom: 4px; }
.scope-result p { color: var(--text-muted); font-size: .92rem; }
.scope-result.in i { color: var(--warn); }
.scope-result.in { border-color: rgba(245, 185, 66, .45); }
.scope-result.out i { color: var(--ok); }
.scope-result.check i { color: var(--cyan); }

.questions { display: grid; gap: 28px; }
.q-area h4 {
    font-family: 'Orbitron', sans-serif;
    font-size: .8rem;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: var(--cyan);
    margin-bottom: 12px;
}
.q {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 14px 18px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--bg-2);
    margin-bottom: 8px;
}
.q p { font-size: .94rem; }
.q-options { display: flex; gap: 6px; border: none; padding: 0; margin: 0; min-width: 0; }
.q-options label { cursor: pointer; }
.q-options input { position: absolute; opacity: 0; pointer-events: none; }
.q-options span {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    font-size: .82rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: all .2s;
    white-space: nowrap;
}
.q-options label:hover span { border-color: var(--cyan); color: var(--text); }
.q-options input:focus-visible + span { outline: 2px solid var(--cyan); outline-offset: 2px; }
.q-options input[value="2"]:checked + span { background: rgba(45, 212, 164, .15); border-color: var(--ok); color: var(--ok); }
.q-options input[value="1"]:checked + span { background: rgba(245, 185, 66, .15); border-color: var(--warn); color: var(--warn); }
.q-options input[value="0"]:checked + span { background: rgba(255, 77, 122, .15); border-color: var(--danger); color: var(--danger); }

.meter-actions { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 28px; }
.progress-note { color: var(--text-muted); font-size: .88rem; }

.results { display: grid; grid-template-columns: 300px 1fr; gap: 40px; align-items: start; }
.gauge { position: relative; width: 100%; max-width: 280px; margin: 0 auto; text-align: center; }
.gauge svg { width: 100%; height: auto; transform: rotate(-90deg); }
.gauge .track { stroke: var(--surface-2); }
.gauge .bar { transition: stroke-dashoffset 1.2s var(--ease), stroke .4s; }
.gauge-value { position: absolute; inset: 0 0 auto 0; aspect-ratio: 1; display: grid; place-content: center; }
.gauge-value strong { font-family: 'Orbitron', sans-serif; font-size: 3rem; line-height: 1; }
.gauge-value span { font-size: .85rem; color: var(--text-muted); margin-top: 6px; }
.level { display: inline-block; margin-top: 16px; padding: 6px 16px; border-radius: 999px; font-weight: 700; font-size: .85rem; border: 1px solid; }

.areas { display: grid; gap: 14px; margin-bottom: 28px; }
.area-row { display: grid; grid-template-columns: 190px 1fr 48px; gap: 14px; align-items: center; font-size: .9rem; }
.area-bar { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.area-bar i { display: block; height: 100%; border-radius: inherit; width: 0; transition: width 1s var(--ease); }
.area-row b { text-align: right; font-variant-numeric: tabular-nums; }

.gaps h4 { font-size: 1rem; margin-bottom: 12px; }
.gaps ol { display: grid; gap: 10px; padding-left: 0; list-style: none; counter-reset: gap; }
.gaps li {
    counter-increment: gap;
    display: grid;
    grid-template-columns: 30px 1fr;
    gap: 10px;
    font-size: .92rem;
    color: var(--text-muted);
}
.gaps li::before {
    content: counter(gap);
    width: 26px; height: 26px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    font-size: .78rem;
    font-weight: 700;
    color: #fff;
    background: var(--grad);
}
.gaps li b { color: var(--text); }
.disclaimer { font-size: .78rem; color: var(--text-muted); margin-top: 24px; opacity: .8; }

.path { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 64px; }
.path-step { padding: 26px 22px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); position: relative; }
.path-step .num { font-family: 'Orbitron', sans-serif; font-size: 2rem; font-weight: 900; line-height: 1; margin-bottom: 12px; display: block; }
.path-step h4 { font-size: 1rem; margin-bottom: 6px; }
.path-step p { color: var(--text-muted); font-size: .88rem; }

/* ================= CONTATTI ================= */
.contact-wrap {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 56px;
    align-items: start;
}
.contact-info h2 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); margin-bottom: 18px; }
.contact-info > p { color: var(--text-muted); margin-bottom: 36px; }
.info-item {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}
.info-item i {
    width: 48px; height: 48px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: var(--grad-soft);
    border: 1px solid var(--border);
    color: var(--cyan);
}
.info-item small { display: block; color: var(--text-muted); font-size: .8rem; }

.form {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 44px;
    display: grid;
    gap: 22px;
}
.field { display: grid; gap: 8px; }
.field label { font-size: .88rem; font-weight: 500; }
.field input, .field textarea {
    width: 100%;
    padding: 15px 18px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    font-family: inherit;
    font-size: 1rem; /* evita lo zoom automatico su iOS */
    transition: border-color .3s, box-shadow .3s;
}
.field textarea { resize: vertical; min-height: 150px; }
.field input::placeholder, .field textarea::placeholder { color: #565e80; }
.field input:focus, .field textarea:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .2), var(--glow-cyan);
}
.field.invalid input, .field.invalid textarea { border-color: #ff4d7a; }
.field .error { color: #ff4d7a; font-size: .8rem; min-height: 1em; }
.form .btn { width: 100%; padding: 17px; font-size: 1rem; }
.form .btn[disabled] { opacity: .7; cursor: wait; }
.form-note { color: var(--text-muted); font-size: .8rem; text-align: center; }
.form-note i { color: var(--cyan); }

.form-success {
    display: none;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    border-radius: 12px;
    background: rgba(34, 199, 245, .08);
    border: 1px solid rgba(34, 199, 245, .4);
    color: var(--cyan);
    font-size: .92rem;
}
.form-success.show { display: flex; animation: fadeUp .5s var(--ease); }
.form-success.error { background: rgba(255, 77, 122, .08); border-color: rgba(255, 77, 122, .4); color: #ff4d7a; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ================= FOOTER ================= */
.footer {
    border-top: 1px solid var(--border);
    padding: 48px 0 36px;
    background: var(--bg);
}
.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}
.footer-slogan {
    font-family: 'Orbitron', sans-serif;
    font-size: .75rem;
    letter-spacing: .35em;
    color: var(--text-muted);
    margin-top: 8px;
}
.socials { display: flex; gap: 12px; }
.socials a {
    width: 42px; height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    color: var(--text-muted);
    transition: all .3s var(--ease);
}
.socials a:hover {
    color: #fff;
    background: var(--grad);
    border-color: transparent;
    box-shadow: var(--glow);
    transform: translateY(-3px);
}
.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding-top: 28px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: .85rem;
}
.footer-bottom .domain { color: var(--cyan); }
.legal { display: flex; gap: 24px; flex-wrap: wrap; }
.legal a { transition: color .3s; }
.legal a:hover { color: var(--cyan); }

/* ================= ANIMAZIONI SCROLL ================= */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.visible { opacity: 1; transform: none; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Schermi molto stretti (sotto i 380px) */
@media (max-width: 380px) {
    .hero h1 { font-size: 1.7rem; }
    .slogan { letter-spacing: .18em; padding-left: .18em; font-size: .9rem; }
    .logo { font-size: 1.1rem; letter-spacing: .12em; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; }
}

/* ================= RESPONSIVE ================= */
@media (max-width: 980px) {
    .nis2-info { grid-template-columns: 1fr; }
    .results { grid-template-columns: 1fr; }
    .path { grid-template-columns: repeat(2, 1fr); }
    .scope-grid { grid-template-columns: 1fr 1fr; }
    .scope-grid .field:first-child { grid-column: 1 / -1; }
    .meter { padding: 36px 28px; }
    .llm-grid { grid-template-columns: 1fr; }
    .platform { grid-template-columns: 1fr; padding: 40px 32px; gap: 32px; }
    .usecases { grid-template-columns: repeat(2, 1fr); }
    .hybrid { flex-wrap: wrap; }
    .hybrid .btn { margin-left: 0; }
    .security-box { grid-template-columns: 1fr; padding: 56px 36px; }
    .shield-visual { max-width: 340px; order: -1; }
    .contact-wrap { grid-template-columns: 1fr; }
}

@media (max-width: 1280px) {
    .nav-toggle { display: grid; place-items: center; }
    .nav-links {
        position: fixed;
        top: 76px; left: 0; right: 0;
        flex-direction: column;
        gap: 0;
        padding: 12px 24px 28px;
        background: rgba(5, 7, 15, .97);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        border-bottom: 1px solid var(--border);
        transform: translateY(-12px);
        opacity: 0;
        visibility: hidden;
        transition: all .3s var(--ease);
    }
    .nav-links.open { transform: none; opacity: 1; visibility: visible; }
    .nav-links a { display: block; padding: 16px 0; font-size: 1.05rem; border-bottom: 1px solid var(--border); }
    .nav-links a::after { display: none; }
    .header .nav-cta { display: none; }
    .header:has(.nav-links.open) { background: rgba(5, 7, 15, .97); }
    .nav-links .mobile-cta { display: flex; margin-top: 20px; border: none; }
}
.nav-links .mobile-cta { display: none; }

@media (max-width: 600px) {
    .timeline { grid-template-columns: 1fr; }
    .timeline div { border-right: none; border-bottom: 1px solid var(--border); }
    .timeline div:last-child { border-bottom: none; }
    .meter { padding: 28px 16px; border-radius: 20px; }
    .scope-grid { grid-template-columns: 1fr; }
    .q { grid-template-columns: 1fr; gap: 10px; padding: 14px; }
    .q-options span { padding: 8px 12px; }
    .gauge { max-width: 220px; }
    .gauge-value strong { font-size: 2.4rem; }
    .area-row { grid-template-columns: 1fr 44px; }
    .area-row .area-bar { grid-column: 1 / -1; grid-row: 2; }
    .path { grid-template-columns: 1fr; }
    .meter-actions .btn { width: 100%; }
    .llm-card { padding: 32px 22px; }
    .grid-2x2 { grid-template-columns: 1fr; }
    .platform { padding: 32px 20px; border-radius: 20px; }
    .platform .btn { width: 100%; }
    .hybrid { flex-direction: column; text-align: center; padding: 28px 20px; }
    .hybrid .btn { width: 100%; }
    .usecases { grid-template-columns: 1fr; }
    section { padding: 80px 0; }
    .container { padding: 0 16px; }
    .hero { padding: 120px 0 70px; }
    .slogan { letter-spacing: .3em; padding-left: .3em; }
    .hero-ctas .btn { width: 100%; }
    .stats { grid-template-columns: 1fr; gap: 20px; margin-top: 56px; text-align: center; }
    .card { padding: 32px 24px; }
    .security-box { padding: 40px 20px; border-radius: 22px; }
    .status-chip { font-size: .7rem; padding: 6px 10px; }
    .chip-1 { left: 0; }
    .chip-2 { right: 0; }
    .form { padding: 28px 20px; }
    .footer-bottom { flex-direction: column; text-align: center; align-items: center; }
    .footer-top { flex-direction: column; text-align: center; }
    .legal { justify-content: center; }
}
