/* ==========================================================================
   MotorTech OS — sito di presentazione
   Nessun build step: CSS scritto a mano, font self-hosted.
   ========================================================================== */

@font-face {
    font-family: "Inter";
    src: url("../fonts/inter-latin-wght.woff2") format("woff2");
    font-weight: 100 900;
    font-display: swap;
}
@font-face {
    font-family: "Space Grotesk";
    src: url("../fonts/space-grotesk-latin-wght.woff2") format("woff2");
    font-weight: 300 700;
    font-display: swap;
}

:root {
    --bg: #0a0d14;
    --bg-alt: #0e131c;
    --surface: #131a25;
    --surface-2: #1a2230;
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.14);
    --text: #e9edf4;
    --muted: #9aa5b5;
    --faint: #6b7686;
    --brand: #2f7bff;
    --brand-2: #6aa3ff;
    --brand-glow: rgba(47, 123, 255, 0.35);
    --accent: #ff6b2c;
    --accent-2: #ffb020;
    --ok: #2fd17c;
    --danger: #ff5a5f;
    --radius: 14px;
    --radius-lg: 22px;
    --shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.6);
    --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
    --container: 1200px;
    --header-h: 68px;
    color-scheme: dark;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img, video { max-width: 100%; display: block; }
a { color: var(--brand-2); text-decoration: none; }
a:hover { color: #fff; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.12; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--brand); color: #fff; padding: 10px 16px; border-radius: 8px; }
.skip-link:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 3px; border-radius: 6px; }

.i { width: 1.15em; height: 1.15em; flex: none; display: inline-block; vertical-align: middle; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.55em;
    font: 600 15px/1 var(--font); padding: 13px 20px; border-radius: 999px;
    border: 1px solid transparent; cursor: pointer; white-space: nowrap;
    transition: transform .15s ease, background .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 10px 30px -10px var(--brand-glow); }
.btn-primary:hover { background: #4a8cff; color: #fff; box-shadow: 0 14px 36px -10px var(--brand-glow); }
.btn-ghost { background: rgba(255, 255, 255, 0.04); color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.btn-light { background: #fff; color: #0a0d14; }
.btn-light:hover { background: #eef3ff; color: #0a0d14; }
.btn-sm { padding: 9px 15px; font-size: 14px; }
.btn-lg { padding: 16px 26px; font-size: 16px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .65; cursor: progress; transform: none; }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50; height: var(--header-h);
    background: rgba(10, 13, 20, 0.6); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid transparent; transition: border-color .2s ease, background .2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); background: rgba(10, 13, 20, 0.85); }
.header-inner { height: 100%; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; }
.brand:hover { color: #fff; }
.brand-mark { width: 32px; height: 32px; }
.brand-name { font: 700 19px/1 var(--font-display); letter-spacing: -0.02em; }
.brand-name span { color: var(--brand-2); margin-left: 4px; }
.main-nav { display: flex; gap: 4px; margin-left: 8px; }
.main-nav a { color: var(--muted); font-size: 14.5px; font-weight: 500; padding: 8px 12px; border-radius: 8px; }
.main-nav a:hover { color: #fff; background: rgba(255, 255, 255, 0.05); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.lang-switch { display: inline-flex; padding: 3px; border: 1px solid var(--line-strong); border-radius: 999px; }
.lang-switch a { font: 600 12.5px/1 var(--font); color: var(--muted); padding: 7px 10px; border-radius: 999px; letter-spacing: .04em; }
.lang-switch a:hover { color: #fff; }
.lang-switch a.is-active { background: var(--surface-2); color: #fff; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line-strong); color: #fff; border-radius: 10px; width: 42px; height: 42px; align-items: center; justify-content: center; cursor: pointer; }
.nav-toggle .i { width: 22px; height: 22px; }

/* ---------- Common section ---------- */
.section { padding: 112px 0; position: relative; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 760px; margin: 0 auto 56px; text-align: center; }
.section-head-left { margin: 0 0 36px; text-align: left; }
.eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font: 600 13px/1 var(--font); letter-spacing: .12em; text-transform: uppercase; color: var(--brand-2);
    margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 18px; height: 2px; background: currentColor; border-radius: 2px; }
.eyebrow-ai { color: var(--accent-2); }
.eyebrow-ai::before { display: none; }
.section-title { font-size: clamp(32px, 4.4vw, 50px); font-weight: 700; color: #fff; }
.section-title em, .hero-title em, .cta-band h2 em {
    font-style: normal;
    background: linear-gradient(92deg, var(--brand-2) 0%, #9cc2ff 45%, var(--accent-2) 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.section-lead { margin-top: 18px; font-size: 18px; color: var(--muted); }
.section-head-left .section-lead { max-width: 560px; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 84px 0 72px; overflow: hidden; }
.hero-bg {
    position: absolute; inset: 0; pointer-events: none;
    background:
        radial-gradient(60% 50% at 50% 0%, rgba(47, 123, 255, 0.28), transparent 70%),
        radial-gradient(35% 30% at 85% 35%, rgba(255, 107, 44, 0.14), transparent 70%),
        radial-gradient(35% 30% at 10% 45%, rgba(106, 163, 255, 0.12), transparent 70%);
}
.hero-bg::after {
    content: ""; position: absolute; inset: 0;
    background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(70% 55% at 50% 25%, #000 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(70% 55% at 50% 25%, #000 30%, transparent 75%);
    opacity: .55;
}
.hero-inner { position: relative; text-align: center; }
.hero-title { font-size: clamp(40px, 7vw, 82px); font-weight: 700; color: #fff; max-width: 980px; margin: 0 auto; letter-spacing: -0.035em; }
.hero-title em { display: block; }
.hero-lead { max-width: 720px; margin: 26px auto 0; font-size: clamp(17px, 2vw, 20px); color: var(--muted); }
.hero-ctas { margin-top: 36px; display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.hero-note { margin-top: 16px; font-size: 14px; color: var(--faint); }
.hero-video { margin: 64px auto 0; max-width: 1080px; position: relative; }
.hero-video::before {
    content: ""; position: absolute; inset: -40px -60px; z-index: -1;
    background: radial-gradient(50% 50% at 50% 50%, rgba(47, 123, 255, 0.35), transparent 70%);
    filter: blur(20px);
}
.hero-stats { margin: 56px auto 0; display: grid; grid-template-columns: repeat(4, 1fr); max-width: 1000px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: rgba(19, 26, 37, 0.5); }
.hero-stats li { padding: 22px 18px; text-align: center; }
.hero-stats li + li { border-left: 1px solid var(--line); }
.hero-stats strong { display: block; font: 700 34px/1 var(--font-display); color: #fff; letter-spacing: -0.02em; }
.hero-stats span { display: block; margin-top: 8px; font-size: 13.5px; color: var(--muted); line-height: 1.35; }

/* ---------- Video player ---------- */
.player { margin: 0; border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); border: 1px solid var(--line-strong); box-shadow: var(--shadow), 0 0 0 1px rgba(255,255,255,0.02) inset; }
.player-chrome { display: flex; align-items: center; gap: 7px; padding: 11px 14px; background: #161d29; border-bottom: 1px solid var(--line); }
.player-chrome .dot { width: 11px; height: 11px; border-radius: 50%; background: #3a4352; }
.player-chrome .dot:nth-child(1) { background: #ff5f57; }
.player-chrome .dot:nth-child(2) { background: #febc2e; }
.player-chrome .dot:nth-child(3) { background: #28c840; }
.player-url { margin: 0 auto; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--faint); background: #0f141d; padding: 5px 14px; border-radius: 8px; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transform: translateX(-20px); }
.player-url .i { width: 12px; height: 12px; }
.player-stage { position: relative; aspect-ratio: 16 / 10; background: #0f141d; }
.player-stage video { width: 100%; height: 100%; object-fit: cover; }
.player-caption { position: absolute; left: 0; right: 0; bottom: 26px; display: flex; justify-content: center; padding: 0 70px; pointer-events: none; }
.player-caption span {
    display: inline-block; max-width: 720px; text-align: center;
    background: rgba(8, 11, 17, 0.82); color: #fff; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    font: 600 clamp(14px, 1.8vw, 19px)/1.35 var(--font); padding: 10px 18px; border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.1);
    opacity: 0; transform: translateY(8px); transition: opacity .35s ease, transform .35s ease;
}
.player-caption span.is-visible { opacity: 1; transform: none; }
.player-toggle {
    position: absolute; right: 16px; bottom: 18px; width: 44px; height: 44px; border-radius: 50%;
    display: grid; place-items: center; border: 1px solid rgba(255,255,255,0.18);
    background: rgba(8, 11, 17, 0.7); color: #fff; cursor: pointer; transition: background .2s ease, transform .2s ease;
}
.player-toggle:hover { background: var(--brand); transform: scale(1.05); }
.player-toggle .icon-pause { display: none; }
.player.is-playing .player-toggle .icon-play { display: none; }
.player.is-playing .player-toggle .icon-pause { display: block; }
.player:not(.is-playing):not(.has-played) .player-toggle { right: 50%; bottom: 50%; transform: translate(50%, 50%); width: 76px; height: 76px; background: var(--brand); box-shadow: 0 0 0 10px rgba(47,123,255,.2); }
.player:not(.is-playing):not(.has-played) .player-toggle .i { width: 30px; height: 30px; }
.player-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255,255,255,0.08); }
.player-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--brand), var(--accent-2)); }

/* ---------- Integrations strip ---------- */
.integrations-strip { padding: 36px 0 8px; }
.strip-title { text-align: center; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); margin-bottom: 22px; }
.strip-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.strip-list li { flex: 1 1 180px; max-width: 260px; display: flex; flex-direction: column; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: rgba(19,26,37,.45); }
.strip-list strong { font: 600 15px/1.3 var(--font-display); color: #fff; }
.strip-list span { font-size: 12.5px; color: var(--muted); }

/* ---------- Day (video tabs) ---------- */
.day { display: grid; grid-template-columns: 360px 1fr; gap: 36px; align-items: start; }
.day-tabs { display: flex; flex-direction: column; gap: 10px; }
.day-tab {
    position: relative; display: flex; gap: 16px; text-align: left; width: 100%;
    padding: 20px 20px 22px; border-radius: var(--radius); border: 1px solid var(--line);
    background: transparent; color: var(--text); font: inherit; cursor: pointer; overflow: hidden;
    transition: background .2s ease, border-color .2s ease;
}
.day-tab:hover { background: rgba(255,255,255,0.03); }
.day-tab[aria-selected="true"] { background: var(--surface); border-color: var(--line-strong); }
.day-tab-index { font: 700 14px/1.4 var(--font-display); color: var(--faint); }
.day-tab[aria-selected="true"] .day-tab-index { color: var(--brand-2); }
.day-tab-label { display: block; font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.day-tab-title { display: block; margin-top: 4px; font: 600 19px/1.25 var(--font-display); color: #fff; }
.day-tab-text { display: none; margin-top: 8px; font-size: 14.5px; color: var(--muted); }
.day-tab[aria-selected="true"] .day-tab-text { display: block; }
.day-tab-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; }
.day-tab-progress span { display: block; height: 100%; width: 0; background: var(--brand); }
.day-note { margin-top: 12px; font-size: 13px; color: var(--faint); text-align: right; }

/* ---------- Flow ---------- */
.flow { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; counter-reset: flow; position: relative; }
.flow::before { content: ""; position: absolute; left: 6%; right: 6%; top: 27px; height: 2px; background: linear-gradient(90deg, transparent, var(--brand) 15%, var(--accent) 85%, transparent); opacity: .5; }
.flow-step { position: relative; padding: 0 6px; text-align: center; }
.flow-num { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 18px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line-strong); font: 700 20px/1 var(--font-display); color: #fff; position: relative; box-shadow: 0 0 0 6px var(--bg-alt); }
.flow-step:last-child .flow-num { background: var(--brand); border-color: var(--brand); }
.flow-step h3 { font-size: 18px; color: #fff; }
.flow-step p { margin-top: 8px; font-size: 14.5px; color: var(--muted); }
.flow-shots { position: relative; margin: 64px auto 0; max-width: 1000px; padding-bottom: 40px; }
.shot { margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line-strong); box-shadow: var(--shadow); background: #fff; }
.shot img { width: 100%; height: auto; }
.shot-main { width: 82%; }
.shot-float { position: absolute; right: 0; bottom: 0; width: 38%; box-shadow: 0 30px 80px -20px rgba(0,0,0,.8); }

/* ---------- AI ---------- */
.ai-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.ai-list { display: flex; flex-direction: column; gap: 22px; }
.ai-list li { display: flex; gap: 16px; }
.ai-icon { width: 46px; height: 46px; flex: none; border-radius: 12px; display: grid; place-items: center; color: var(--accent-2); background: rgba(255,176,32,.1); border: 1px solid rgba(255,176,32,.25); }
.ai-icon .i { width: 22px; height: 22px; }
.ai-list h3 { font-size: 19px; color: #fff; }
.ai-list p { margin-top: 6px; color: var(--muted); font-size: 15.5px; }
.ai-engines { margin-top: 28px; padding: 14px 18px; border-radius: 12px; border: 1px dashed rgba(255,176,32,.35); color: #ffd88a; font-size: 14.5px; }
.shot-ai { position: relative; max-height: 620px; }
.shot-ai img { object-fit: cover; object-position: top; }
.scan-line { position: absolute; left: 0; right: 0; top: 0; height: 90px; z-index: 2; pointer-events: none;
    background: linear-gradient(180deg, transparent, rgba(255,176,32,.25) 70%, rgba(255,176,32,.9) 98%, transparent);
    animation: scan 4.5s ease-in-out infinite; mix-blend-mode: multiply; }
@keyframes scan { 0% { transform: translateY(-100px); } 60%, 100% { transform: translateY(640px); } }

/* ---------- Features ---------- */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.feature { padding: 26px 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); transition: border-color .2s ease, transform .2s ease; }
.feature:hover { border-color: rgba(106,163,255,.4); transform: translateY(-3px); }
.feature-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: var(--brand-2); background: rgba(47,123,255,.12); border: 1px solid rgba(47,123,255,.25); margin-bottom: 18px; }
.feature-icon .i { width: 22px; height: 22px; }
.feature h3 { font-size: 17.5px; color: #fff; }
.feature p { margin-top: 8px; font-size: 14.5px; color: var(--muted); }

/* ---------- Roles ---------- */
.roles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.role { padding: 26px; border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(180deg, var(--surface), rgba(19,26,37,.4)); display: flex; flex-direction: column; }
.role-avatar { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line-strong); font: 700 17px/1 var(--font-display); color: #fff; margin-bottom: 16px; }
.role h3 { font-size: 19px; color: #fff; }
.role p { margin-top: 8px; color: var(--muted); font-size: 15px; flex: 1; }
.role-badge { margin-top: 18px; align-self: flex-start; display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; padding: 6px 11px; border-radius: 999px; }
.role-badge.is-yes { color: var(--ok); background: rgba(47,209,124,.1); }
.role-badge.is-no { color: var(--muted); background: rgba(255,255,255,.06); }

/* ---------- Security ---------- */
.security-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: center; }
.security-list { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 26px; }
.security-list li { display: flex; gap: 14px; }
.security-list .i { width: 24px; height: 24px; color: var(--brand-2); margin-top: 2px; }
.security-list h3 { font-size: 17px; color: #fff; }
.security-list p { margin-top: 5px; font-size: 14.5px; color: var(--muted); }

/* ---------- CTA band ---------- */
.cta-band { padding: 72px 0; background: linear-gradient(110deg, #1b4fd8 0%, #2f7bff 45%, #ff6b2c 130%); position: relative; overflow: hidden; }
.cta-band::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px); background-size: 48px 48px; mask-image: linear-gradient(90deg, transparent, #000 70%); -webkit-mask-image: linear-gradient(90deg, transparent, #000 70%); pointer-events: none; }
.cta-inner { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.cta-band h2 { font-size: clamp(28px, 3.6vw, 42px); color: #fff; max-width: 720px; }
.cta-band h2 em { background: none; color: #ffe2b0; -webkit-text-fill-color: currentColor; }
.cta-band p { margin-top: 12px; color: rgba(255,255,255,.85); font-size: 17px; }

/* ---------- FAQ ---------- */
.faq-wrap { max-width: 860px; }
.faq { display: flex; flex-direction: column; gap: 10px; }
.faq-item { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.faq-item summary { list-style: none; cursor: pointer; padding: 20px 56px 20px 22px; font: 600 17.5px/1.35 var(--font-display); color: #fff; position: relative; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 22px; top: 50%; transform: translateY(-50%); font: 400 26px/1 var(--font); color: var(--brand-2); transition: transform .2s ease; }
.faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-item p { padding: 0 22px 22px; color: var(--muted); }

/* ---------- Demo form ---------- */
.demo-section { background: radial-gradient(60% 60% at 0% 0%, rgba(47,123,255,.14), transparent 70%), var(--bg-alt); border-top: 1px solid var(--line); }
.demo-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 64px; align-items: start; }
.demo-intro { position: sticky; top: calc(var(--header-h) + 32px); }
.check-list { margin-top: 30px; display: flex; flex-direction: column; gap: 14px; }
.check-list li { display: flex; align-items: center; gap: 12px; font-size: 16px; }
.check-list .i { color: var(--ok); width: 22px; height: 22px; padding: 3px; border-radius: 50%; background: rgba(47,209,124,.12); }
.demo-card { background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-lg); padding: 34px; box-shadow: var(--shadow); }
.demo-form { display: flex; flex-direction: column; gap: 18px; }
.demo-form fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.demo-form legend, .field label { display: block; font-size: 14px; font-weight: 600; color: #d6dde8; margin-bottom: 8px; padding: 0; }
.opt { font-weight: 400; color: var(--faint); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { grid-template-columns: 1.3fr 1fr 90px; }
.field input, .field select, .field textarea {
    width: 100%; font: 15px/1.4 var(--font); color: var(--text); background: #0d121a;
    border: 1px solid var(--line-strong); border-radius: 10px; padding: 12px 14px;
    transition: border-color .15s ease, box-shadow .15s ease; appearance: none; -webkit-appearance: none;
}
.field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%239aa5b5' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; }
.field textarea { resize: vertical; min-height: 110px; }
.field input::placeholder, .field textarea::placeholder { color: #5d6878; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(47,123,255,.25); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--danger); }
.field-error { margin-top: 6px; font-size: 13px; color: #ff8a8e; }
.field-narrow input { text-transform: uppercase; }
.type-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.type-picker legend { grid-column: 1 / -1; }
.type-option { position: relative; cursor: pointer; }
.type-option input { position: absolute; opacity: 0; }
.type-card { display: block; height: 100%; padding: 16px 18px; border-radius: 12px; border: 1px solid var(--line-strong); background: #0d121a; transition: border-color .15s ease, background .15s ease; }
.type-card strong { display: block; font: 600 16px/1.3 var(--font-display); color: #fff; }
.type-card small { display: block; margin-top: 4px; font-size: 13px; color: var(--muted); }
.type-option input:checked + .type-card { border-color: var(--brand); background: rgba(47,123,255,.1); box-shadow: 0 0 0 1px var(--brand) inset; }
.type-option input:focus-visible + .type-card { outline: 2px solid var(--brand-2); outline-offset: 2px; }
.conditional { display: flex; flex-direction: column; gap: 18px; }
.demo-form[data-type="azienda"] [data-for="privato"],
.demo-form[data-type="privato"] [data-for="azienda"],
.demo-form[data-type="azienda"] [data-for-label="privato"],
.demo-form[data-type="privato"] [data-for-label="azienda"] { display: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; }
.chip span { display: inline-block; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line-strong); font-size: 14px; color: var(--muted); background: #0d121a; transition: all .15s ease; }
.chip input:checked + span { color: #fff; border-color: var(--brand); background: rgba(47,123,255,.15); }
.chip input:focus-visible + span { outline: 2px solid var(--brand-2); outline-offset: 2px; }
.consents { display: flex; flex-direction: column; gap: 12px; padding-top: 4px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--muted); cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--brand); flex: none; }
.check.has-error span { color: #ff8a8e; }
.form-submit { margin-top: 6px; }
.form-note { margin-top: 10px; font-size: 12.5px; color: var(--faint); text-align: center; }
.form-errors { padding: 14px 16px; border-radius: 12px; background: rgba(255,90,95,.08); border: 1px solid rgba(255,90,95,.35); color: #ffb3b5; font-size: 14px; }
.form-errors ul { margin-top: 6px; padding-left: 18px; list-style: disc; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.demo-success { text-align: center; padding: 30px 10px; }
.success-icon { width: 64px; height: 64px; margin: 0 auto 18px; display: grid; place-items: center; border-radius: 50%; background: rgba(47,209,124,.14); color: var(--ok); }
.success-icon .i { width: 32px; height: 32px; }
.demo-success h3 { font-size: 26px; color: #fff; }
.demo-success p { margin: 12px auto 24px; max-width: 420px; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0 28px; background: #080b11; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.footer-brand p { margin-top: 14px; color: var(--muted); font-size: 14.5px; max-width: 280px; }
.footer-title { font: 600 13px/1 var(--font); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin-bottom: 16px; }
.footer-links { display: flex; flex-direction: column; gap: 10px; font-size: 14.5px; color: var(--muted); }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: #fff; }
.footer-bottom { margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 20px; font-size: 13px; color: var(--faint); }
.footer-credit { max-width: 520px; text-align: right; }

/* ---------- Legal page ---------- */
.legal-inner { max-width: 780px; }
.legal .section-title { font-size: clamp(30px, 4vw, 44px); margin-top: 18px; }
.legal h2 { font-size: 21px; color: #fff; margin: 34px 0 10px; }
.legal p { color: var(--muted); }
.legal-updated { margin-top: 10px; font-size: 14px; color: var(--faint); }
.legal-summary { margin-top: 16px; padding: 14px 18px; border-left: 3px solid var(--ok); background: rgba(47,209,124,.07); border-radius: 0 10px 10px 0; color: var(--text) !important; }
.legal-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.legal-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.legal-table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); padding: 12px 14px; background: var(--surface); }
.legal-table td { padding: 12px 14px; border-top: 1px solid var(--line); vertical-align: top; color: var(--muted); }
.legal-table code { color: var(--text); font-size: 13px; white-space: nowrap; }
.back-link { font-size: 14px; }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Admin ---------- */
.admin { background: #0a0d14; }
.admin-wrap { padding: 32px 24px 60px; max-width: 1320px; }
.admin-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.admin-head h1 { font-size: 28px; }
.admin-flash { padding: 10px 14px; border-radius: 10px; background: rgba(47,209,124,.12); color: var(--ok); margin-bottom: 14px; }
.admin-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.admin-filters a { padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--muted); font-size: 13.5px; }
.admin-filters a.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.admin-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); padding: 12px 14px; background: var(--surface); }
.admin-table td { padding: 14px; border-top: 1px solid var(--line); vertical-align: top; }
.admin-table small { color: var(--faint); }
.admin-table select { background: #0d121a; color: var(--text); border: 1px solid var(--line-strong); border-radius: 8px; padding: 6px 8px; }
.admin-msg { max-width: 360px; white-space: pre-line; color: var(--muted); }
.admin-empty { text-align: center; color: var(--faint); padding: 40px !important; }
.nowrap { white-space: nowrap; }
.tag { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); margin: 0 4px 4px 0; }
.admin nav[role="navigation"] { margin-top: 18px; }
.admin-bar { position: sticky; top: 0; z-index: 10; background: rgba(10,13,20,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.admin-bar-inner { max-width: 1320px; margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; gap: 28px; }
.admin-brand { font-family: var(--font-display); font-weight: 700; font-size: 18px; color: var(--text); margin: 0; }
.admin-brand span { color: var(--brand-2); }
.admin-nav { display: flex; gap: 4px; flex: 1; }
.admin-nav a, .admin-user > a { padding: 8px 12px; border-radius: 10px; color: var(--muted); font-size: 14.5px; }
.admin-nav a:hover, .admin-user > a:hover { color: #fff; background: rgba(255,255,255,.05); }
.admin-nav a.is-active, .admin-user > a.is-active { color: #fff; background: var(--surface-2); }
.admin-user { display: flex; align-items: center; gap: 8px; }
.admin-user small { color: var(--faint); margin-left: 4px; }
.admin-user form { margin: 0; }
.admin-center { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.admin-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.admin-card h2 { font-size: 18px; margin: 0 0 14px; }
.admin-card h2:not(:first-child) { margin-top: 26px; }
.admin-login { width: 100%; max-width: 400px; }
.admin-login h1 { font-size: 26px; margin: 6px 0 22px; }
.admin-form { display: flex; flex-direction: column; gap: 16px; }
.admin-narrow { max-width: 560px; }
.admin-settings { max-width: 820px; gap: 20px; }
.admin-settings .admin-card { display: flex; flex-direction: column; gap: 16px; }
.admin-settings .admin-card h2 { margin: 0; }
.admin-form-actions { display: flex; justify-content: flex-end; }
.admin-test-mail { max-width: 820px; margin-top: 20px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.admin-test-mail h2 { margin: 0 0 4px; }
.admin-fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin: 0; display: flex; flex-direction: column; gap: 14px; }
.admin-fieldset legend { padding: 0 6px; font-weight: 600; font-size: 14px; color: #d6dde8; }
.admin-hint { font-size: 13px; color: var(--faint); margin: 0; }
.admin-sub { color: var(--muted); margin: 6px 0 18px; }
.admin-head .admin-sub { margin-bottom: 0; }
.admin-back { margin: 0 0 10px; font-size: 14px; }
.admin-error { padding: 10px 14px; border-radius: 10px; background: rgba(255,90,95,.12); color: #ff8a8e; margin-bottom: 14px; }
.admin-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.admin-toolbar .admin-filters { margin: 0; }
.admin-search { display: flex; gap: 8px; }
.admin-search input { width: 280px; max-width: 100%; font: 14px var(--font); color: var(--text); background: #0d121a; border: 1px solid var(--line-strong); border-radius: 10px; padding: 8px 12px; }
.admin-grid { display: grid; grid-template-columns: 1fr 360px; gap: 20px; align-items: start; }
.admin-dl { display: grid; grid-template-columns: 150px 1fr; gap: 8px 14px; margin: 0; font-size: 14.5px; }
.admin-dl dt { color: var(--faint); }
.admin-dl dd { margin: 0; }
.admin-danger { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.admin-actions { display: flex; gap: 6px; justify-content: flex-end; }
.admin-actions form { margin: 0; }
.admin-table tr.is-muted td { opacity: .55; }
.admin-note-flag { color: var(--accent-2) !important; }
.btn-danger { background: rgba(255,90,95,.12); color: #ff8a8e; border-color: rgba(255,90,95,.35); }
.btn-danger:hover { background: rgba(255,90,95,.22); color: #fff; }
.check-sm { font-size: 13px; margin-top: 8px; }
.status-pill { padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.status-nuova { background: rgba(47,123,255,.16); color: var(--brand-2); }
.status-contattata { background: rgba(255,176,32,.14); color: var(--accent-2); }
.status-demo_fatta { background: rgba(47,209,124,.14); color: var(--ok); }
@media (max-width: 860px) {
    .admin-bar-inner { flex-wrap: wrap; gap: 10px 16px; padding: 10px 16px; }
    .admin-nav { order: 3; flex-basis: 100%; overflow-x: auto; }
    .admin-user { margin-left: auto; }
    .admin-user small { display: none; }
    .admin-wrap { padding: 22px 16px 48px; }
    .admin-grid { grid-template-columns: 1fr; }
    .admin-dl { grid-template-columns: 1fr; gap: 2px; }
    .admin-dl dd { margin-bottom: 8px; }
    .admin-search, .admin-search input { width: 100%; }
    .admin-test-mail { flex-direction: column; align-items: flex-start; }
    .admin .form-row { grid-template-columns: 1fr; }
    .admin-head { flex-wrap: wrap; gap: 10px; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .features { grid-template-columns: repeat(3, 1fr); }
    .day { grid-template-columns: 300px 1fr; }
}

@media (max-width: 960px) {
    :root { --header-h: 62px; }
    .nav-toggle { display: inline-flex; }
    .header-cta { display: none; }
    .main-nav {
        position: fixed; inset: var(--header-h) 0 auto 0; margin: 0; padding: 12px 16px 20px;
        flex-direction: column; gap: 2px; background: rgba(10,13,20,.97); border-bottom: 1px solid var(--line);
        transform: translateY(-8px); opacity: 0; visibility: hidden; transition: all .2s ease;
    }
    .main-nav a { padding: 14px 12px; font-size: 17px; }
    .nav-open .main-nav { transform: none; opacity: 1; visibility: visible; }
    .section { padding: 84px 0; }
    .day { grid-template-columns: 1fr; }
    .day-tabs { flex-direction: row; overflow-x: auto; scrollbar-width: none; margin: 0 -24px; padding: 0 24px; }
    .day-tab { min-width: 230px; }
    .day-tab-text { display: none !important; }
    .flow { grid-template-columns: 1fr; gap: 22px; }
    .flow::before { left: 27px; right: auto; top: 10px; bottom: 10px; width: 2px; height: auto; background: linear-gradient(180deg, var(--brand), var(--accent)); }
    .flow-step { display: grid; grid-template-columns: 56px 1fr; column-gap: 18px; text-align: left; padding: 0; }
    .flow-num { grid-row: span 2; margin: 0; }
    .flow-step p { margin-top: 4px; }
    .ai-grid, .security-grid, .demo-grid { grid-template-columns: 1fr; gap: 44px; }
    .demo-intro { position: static; }
    .roles { grid-template-columns: repeat(2, 1fr); }
    .cta-inner { flex-direction: column; align-items: flex-start; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
    .container { padding: 0 16px; }
    .hero { padding: 56px 0 48px; }
    .hero-video { margin-top: 44px; }
    .hero-stats { grid-template-columns: 1fr 1fr; }
    .hero-stats li:nth-child(3) { border-left: 0; }
    .hero-stats li:nth-child(n+3) { border-top: 1px solid var(--line); }
    .hero-ctas .btn { width: 100%; }
    .player-chrome { padding: 8px 10px; }
    .player-url { font-size: 11px; transform: none; }
    .player-caption { bottom: 14px; padding: 0 56px 0 12px; justify-content: flex-start; }
    .player-caption span { text-align: left; padding: 7px 11px; }
    .player-toggle { width: 38px; height: 38px; right: 10px; bottom: 12px; }
    .day-tabs { margin: 0 -16px; padding: 0 16px; }
    .features, .roles, .security-list { grid-template-columns: 1fr; }
    .shot-main { width: 100%; }
    .shot-float { position: relative; width: 70%; margin: -60px 0 0 auto; }
    .flow-shots { padding-bottom: 0; }
    .form-row, .form-row-3, .type-picker { grid-template-columns: 1fr; }
    .demo-card { padding: 22px 18px; }
    .lang-switch a { padding: 7px 8px; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; }
    .footer-credit { text-align: left; }
}

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