/* Omnithru — sito vetrina
   Layout: colonna centrale 1200px, bande a tutta larghezza alternate (bg / bg-2),
   dispositivi disegnati come i sender veri (barra #bar + superficie).
   Temi: gli stessi sei dell'app (scuro di default). Il tema si sceglie con
   data-theme su <html> (site.js, salvato in localStorage "ot-site-theme");
   ogni blocco [data-theme] vale anche su un singolo elemento, così le
   anteprime del selettore si colorano da sole. */
:root,
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121418;
  --bg-2: #16191e;
  --surface: #1a1d23;
  --surface-2: #22262e;
  --surface-3: #2b303a;
  --border: #2e333d;
  --border-strong: #424957;
  --text: #e7e9ee;
  --text-2: #a3aab7;
  --text-3: #8a93a2;
  --accent: #ffa300;
  --accent-hover: #ffb733;
  --on-accent: #1a1200;
  --link: var(--accent);
  --ok: #3ddc84;
  --warn: #f5b942;
  --err: #ff5d5d;
  --blue: #5aa9ff;
  --bg-image: none;
  --glow: none;
  --title-shadow: none;
}
[data-theme="light"] {
  color-scheme: light;
  --bg: #eef0f3;
  --bg-2: #f7f8fa;
  --surface: #ffffff;
  --surface-2: #f3f4f7;
  --surface-3: #e5e8ed;
  --border: #d8dce3;
  --border-strong: #b9bfca;
  --text: #16181d;
  --text-2: #4a5160;
  --text-3: #5e6573;
  --accent: #d47800;
  --accent-hover: #e88a0c;
  --on-accent: #1a1000;
  --link: #a35800;
  --ok: #1f9d55;
  --warn: #c98a00;
  --err: #d64545;
  --blue: #0e7c86;
  --bg-image: none;
  --glow: none;
  --title-shadow: none;
}
[data-theme="contrast"] {
  color-scheme: dark;
  --bg: #000000;
  --bg-2: #0b0b0b;
  --surface: #111111;
  --surface-2: #1c1c1c;
  --surface-3: #2a2a2a;
  --border: #6b6b6b;
  --border-strong: #a0a0a0;
  --text: #ffffff;
  --text-2: #e6e6e6;
  --text-3: #c4c4c4;
  --accent: #ffd400;
  --accent-hover: #ffe14d;
  --on-accent: #000000;
  --link: var(--accent);
  --ok: #00ff88;
  --warn: #ffd400;
  --err: #ff5555;
  --blue: #00e5ff;
  --bg-image: none;
  --glow: none;
  --title-shadow: none;
}
[data-theme="neon"] {
  color-scheme: dark;
  --bg: #0a0614;
  --bg-2: rgba(19, 11, 36, 0.55);
  --surface: #130b24;
  --surface-2: #1b1033;
  --surface-3: #261742;
  --border: #3b2566;
  --border-strong: #5d3c99;
  --text: #f4ecff;
  --text-2: #bba8e6;
  --text-3: #9c88c8;
  --accent: #ff2bd6;
  --accent-hover: #ff6ae3;
  --on-accent: #16001c;
  --link: #ff6ae3;
  --ok: #39ff8f;
  --warn: #ffe14d;
  --err: #ff3b6e;
  --blue: #00eaff;
  --bg-image:
    radial-gradient(ellipse 70% 50% at 0% 0%, rgba(255, 43, 214, 0.22), transparent 70%),
    radial-gradient(ellipse 60% 50% at 100% 100%, rgba(0, 234, 255, 0.18), transparent 70%),
    linear-gradient(rgba(0, 234, 255, 0.05) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, rgba(0, 234, 255, 0.05) 1px, transparent 1px) 0 0 / 32px 32px;
  --glow: 0 0 6px rgba(255, 43, 214, 0.8), 0 0 18px rgba(255, 43, 214, 0.45);
  --title-shadow: 0 0 10px rgba(255, 43, 214, 0.6), 3px 0 0 rgba(0, 234, 255, 0.5);
}
[data-theme="retro"] {
  color-scheme: dark;
  --bg: #241b14;
  --bg-2: #2a2018;
  --surface: #33271d;
  --surface-2: #3f3125;
  --surface-3: #4c3b2d;
  --border: #5a4634;
  --border-strong: #7c6249;
  --text: #f4e7cf;
  --text-2: #d4bf99;
  --text-3: #b59d79;
  --accent: #ec7a2c;
  --accent-hover: #f39350;
  --on-accent: #2a1405;
  --link: #f39350;
  --ok: #9cc54e;
  --warn: #e9b836;
  --err: #dc4b3a;
  --blue: #9bb44a;
  --bg-image: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.18) 0 1px, transparent 1px 3px);
  --glow: none;
  --title-shadow: 3px 3px 0 #7a2e0b;
}
[data-theme="pastel"] {
  color-scheme: light;
  --bg: #f5f0fa;
  --bg-2: rgba(255, 255, 255, 0.45);
  --surface: #fffdfe;
  --surface-2: #f8f1f7;
  --surface-3: #efe5f2;
  --border: #e7dcec;
  --border-strong: #d2c1dc;
  --text: #3a3247;
  --text-2: #6b6078;
  --text-3: #776b86;
  --accent: #e57aa0;
  --accent-hover: #ee93b3;
  --on-accent: #3d0f22;
  --link: #b23f6b;
  --ok: #3fa57c;
  --warn: #c9932f;
  --err: #d45f5f;
  --blue: #3f9e88;
  --bg-image: linear-gradient(135deg, #f7ecf6 0%, #eef1fb 45%, #eaf6f2 100%);
  --glow: 0 4px 12px rgba(229, 122, 160, 0.35);
  --title-shadow: none;
}
:root {
  --f-display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --f-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;

  --wrap: 1200px;
  --r: 6px;
  --r-lg: 12px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background-color: var(--bg);
  background-image: var(--bg-image);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px);
  z-index: 60; background: var(--bg);
}
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
a { color: var(--link); }
a:hover { color: var(--accent-hover); }
:is(a, button, summary):focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
code, kbd {
  font-family: var(--f-mono); font-size: 0.86em;
  background: var(--surface-2); border: 1px solid var(--border);
  padding: 1px 6px; border-radius: 4px; overflow-wrap: anywhere;
}

.wrap {
  max-width: var(--wrap); margin: 0 auto;
  padding-left: max(24px, env(safe-area-inset-left, 0px));
  padding-right: max(24px, env(safe-area-inset-right, 0px));
}
@media (max-width: 480px) {
  .wrap {
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
  }
}
.band { border-top: 1px solid var(--border); }
.band.alt { background: var(--bg-2); }
.band > .wrap { padding-block: 96px; display: flex; flex-direction: column; gap: 48px; }
@media (max-width: 720px) { .band > .wrap { padding-block: 64px; gap: 36px; } }

/* ---------- tipografia ---------- */
.eyebrow {
  font-family: var(--f-mono); font-size: 13px; letter-spacing: 0.06em;
  color: var(--link); text-transform: uppercase;
}
.h1, .h2 { text-shadow: var(--title-shadow); }
.h1 {
  font-family: var(--f-display); font-weight: 800;
  font-size: clamp(40px, 6.4vw, 72px); line-height: 1.02; letter-spacing: -0.028em;
}
.h2 {
  font-family: var(--f-display); font-weight: 800;
  font-size: clamp(30px, 4vw, 44px); line-height: 1.08; letter-spacing: -0.02em;
}
.h3 { font-size: 20px; font-weight: 600; line-height: 1.3; }
.lead { font-size: clamp(18px, 1.6vw, 21px); color: var(--text-2); max-width: 60ch; }
.muted { color: var(--text-2); }
.small { font-size: 15px; }
.head { display: flex; flex-direction: column; gap: 14px; max-width: 680px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; gap: 12px 32px; min-height: 72px; flex-wrap: wrap; }
.brand {
  display: flex; align-items: center; gap: 10px; margin-right: auto;
  color: var(--text); text-decoration: none;
}
.brand:hover { color: var(--text); }
/* icona a sinistra; nome e claim impilati alti quanto l'icona (come nella home dell'app) */
.brand { --brand-h: 40px; gap: 12px; }
.brand svg { width: auto; height: var(--brand-h); flex: 0 0 auto; }
/* logo: colori dal tema (nel tema scuro identico all'icona) */
.lg-wire { fill: none; stroke: var(--text); stroke-opacity: .35; stroke-width: 16; stroke-linecap: round; }
.lg-body, .lg-out { fill: var(--text); }
.lg-ring { fill: none; stroke: var(--bg); stroke-width: 22; stroke-linecap: round; }
.lg-pin { fill: var(--bg); }
.lg-in { fill: var(--accent); }
.brand-text { height: var(--brand-h); display: flex; flex-direction: column; justify-content: space-between; }
.brand-name { font-family: var(--f-display); font-weight: 800; font-size: 26px; line-height: 0.78; letter-spacing: 0.08em; }
.brand-claim { font-family: var(--f-mono); font-size: 11px; line-height: 1; letter-spacing: 0.04em; color: var(--text-2); white-space: nowrap; }
/* telefoni stretti: marchio più piccolo, così il tasto del menu resta sulla stessa riga */
@media (max-width: 360px) { .nav { column-gap: 12px; } .brand { --brand-h: 34px; } .brand-name { font-size: 22px; } .brand-claim { font-size: 9.5px; } }
.nav-links { display: flex; gap: 4px 26px; flex-wrap: wrap; font-size: 15px; }
.nav-links a { color: var(--text-2); text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav-links a:hover { color: var(--text); }
.nav-links a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }
.nav-tools { display: flex; align-items: center; gap: 10px; margin-left: 6px; }
.theme-picker { position: relative; }
.theme-btn, .lang a {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 12px;
  border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface);
  color: var(--text-2); font: inherit; font-size: 14px; text-decoration: none; cursor: pointer;
}
.theme-btn:hover, .lang a:hover { color: var(--text); border-color: var(--text-3); }
.theme-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--border-strong); }
.theme-panel {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 70; width: 300px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 14px; box-shadow: 0 20px 50px -20px rgba(0,0,0,.6); display: flex; flex-direction: column; gap: 10px;
}
.theme-panel[hidden] { display: none; }
.theme-title { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.theme-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.th-opt {
  display: flex; flex-direction: column; gap: 6px; padding: 6px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--border); background: transparent; color: var(--text); font: inherit; font-size: 13px; text-align: left;
}
.th-opt:hover { border-color: var(--text-3); }
.th-opt[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.th-sw {
  display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 6px; height: 46px; padding: 7px;
  border-radius: 7px; background: var(--bg); background-image: var(--bg-image); border: 1px solid var(--border);
}
.th-sw i { display: block; height: 100%; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--border); }
.th-sw b { display: block; width: 16px; height: 16px; border-radius: 50%; background: var(--accent); }
.lang { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 999px; overflow: hidden; }
.nav-links .lang a { border: 0; border-radius: 0; height: 34px; padding: 0 11px; font-family: var(--f-mono); font-size: 13px; background: transparent; }
.nav-links .lang a[aria-current="true"] { background: var(--accent); color: var(--on-accent); }
.menu-btn { display: none; }
@media (max-width: 760px) {
  .menu-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border: 1px solid var(--border-strong); border-radius: var(--r);
    background: var(--surface); color: var(--text); cursor: pointer;
  }
  .menu-btn svg { width: 20px; height: 20px; }
  .nav-links { display: none; width: 100%; flex-direction: column; gap: 0; padding-bottom: 12px; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 0; border-bottom: 1px solid var(--border); }
  .nav-links a[aria-current="page"] { color: var(--link); border-bottom-color: var(--border); }
  .nav-tools { margin: 14px 0 0; display: grid; grid-template-columns: auto auto; justify-content: start; gap: 10px; }
  .nav-tools .theme-picker { display: contents; }
  .nav-tools .theme-btn { grid-row: 1; grid-column: 1; }
  .nav-tools .lang { grid-row: 1; grid-column: 2; }
  .theme-panel { position: static; grid-row: 2; grid-column: 1 / -1; width: 100%; box-shadow: none; }
}

/* ---------- bottoni ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 24px; border-radius: var(--r);
  font: inherit; font-size: 16px; font-weight: 600; text-decoration: none; cursor: pointer;
  border: 1px solid var(--border-strong); background: transparent; color: var(--text);
  transition: background .15s, border-color .15s, transform .15s;
}
.btn:hover { color: var(--text); border-color: var(--text-3); background: var(--surface); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); box-shadow: var(--glow); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }
.btn.big { min-height: 56px; padding: 0 30px; }
.btn svg { width: 18px; height: 18px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- hero ---------- */
.hero > .wrap {
  padding-block: 88px 104px;
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; align-items: center;
}
.hero-copy { display: flex; flex-direction: column; gap: 26px; min-width: 0; }
.hero-copy .platforms { font-size: 14px; color: var(--text-3); }
@media (max-width: 960px) { .hero > .wrap { grid-template-columns: minmax(0, 1fr); padding-block: 56px 72px; } }



/* ---------- dispositivi (mockup) ---------- */
.device {
  background: var(--surface); border: 1px solid var(--border); border-radius: 26px; padding: 14px;
  box-shadow: 0 30px 80px -40px rgba(0,0,0,.8);
  max-width: 100%;
}
.device.phone { border-radius: 30px; max-width: 340px; margin: 0 auto; width: 100%; }
.screen { background: var(--bg); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.bar {
  display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px;
  background: var(--surface); border-bottom: 1px solid var(--border); font-size: 13px;
}
.bar .home { width: 16px; height: 16px; color: var(--text-2); flex: 0 0 auto; }
.bar .ttl { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1 1 auto; }
.bar .gear { width: 16px; height: 16px; color: var(--text-2); flex: 0 0 auto; }
.status-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; flex: 0 0 auto;
  border: 1px solid var(--border); border-radius: 999px; color: var(--text-2); font-size: 11px;
}
.status-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 6px var(--ok); }
.mock { padding: 14px; }
.mock svg { display: block; width: 100%; height: auto; }
.shot-caption { font-size: 13px; color: var(--text-3); margin-top: 10px; text-align: center; }

/* Clip Launcher */
.clip-pads { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 7px; }
.clip-pads .pad { aspect-ratio: 1.35 / 1; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--border); }
.clip-pads .pad.on { box-shadow: 0 0 10px -2px currentColor; }
.clip-pads .pad.blink { animation: blink 1s steps(2, jump-none) infinite; }
@keyframes blink { 50% { opacity: .25; } }

/* keyboard */
.kbd-wrap { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; }
.wheelpad { border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); position: relative; aspect-ratio: 1/1.6; }
.wheelpad::after { content: ""; position: absolute; left: 50%; top: 42%; width: 22px; height: 22px; margin: -11px; border-radius: 50%; background: var(--accent); }
.keys { position: relative; display: grid; grid-template-columns: repeat(15, minmax(0, 1fr)); gap: 3px; height: 120px; }
.keys .w { background: #e9ebf0; border-radius: 0 0 4px 4px; }
.keys .w.down { background: linear-gradient(#ffe2a6, #ffc75a); }
.keys .b { position: absolute; top: 0; height: 62%; width: calc(100% / 15 * .62); background: #15171b; border: 1px solid var(--border-strong); border-top: 0; border-radius: 0 0 3px 3px; transform: translateX(-50%); }
.keys .b.down { background: linear-gradient(#a86f0a, #6e4700); }
.kbd-ctrl { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.chip { font-size: 11px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--border-strong); color: var(--text-2); }
.chip.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }

/* touch surface / builder */
.ts { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.ts .fader { grid-row: span 3; height: 150px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); position: relative; overflow: hidden; }
.ts .fader::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: var(--v); background: color-mix(in srgb, var(--accent) 80%, transparent); }
.ts .btnm { height: 40px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); }
.ts .btnm.on, .ts .tog.on { background: var(--accent); border-color: var(--accent); }
.ts .tog { height: 40px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border); }

.builder { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); grid-template-rows: repeat(5, 30px); gap: 6px; position: relative; padding: 6px; border-radius: 8px;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: calc((100% - 12px) / 8) calc((100% - 12px) / 5); background-position: 6px 6px; }
.builder > div { border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border-strong); position: relative; }
.builder .sel { outline: 2px solid var(--accent); outline-offset: 1px; }
.builder .sel::after { content: ""; position: absolute; right: -5px; bottom: -5px; width: 10px; height: 10px; border-radius: 2px; background: var(--accent); }
.builder .fv { background: linear-gradient(to top, color-mix(in srgb, var(--accent) 75%, transparent) 60%, var(--surface-2) 60%); }
.builder .xy { background: radial-gradient(circle at 65% 35%, var(--accent) 0 7px, transparent 8px), var(--surface-2); }
.builder .pill { border-radius: 999px; }
.builder .tg.on { background: var(--accent); border-color: var(--accent); }
.palette { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }

/* receiver */
.rx { display: flex; flex-direction: column; gap: 10px; font-size: 12px; }
.rx h5 { margin: 0; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.rx .row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); }
.rx .who { display: flex; align-items: center; gap: 7px; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.rx .dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; background: var(--ok); }
.rx .dot.warn { background: var(--warn); }
.rx .dot.off { background: var(--err); }
.rx .sel { padding: 3px 8px; border: 1px solid var(--border-strong); border-radius: 4px; background: var(--bg); color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rx .tag { font-size: 10px; padding: 2px 7px; border-radius: 999px; border: 1px solid var(--border-strong); color: var(--text-2); }

/* desktop sender */
.ports { display: flex; flex-direction: column; gap: 8px; font-size: 12px; }
.ports .p { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface); }
.ports .p .act { margin-left: auto; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: blink .6s infinite; }
.ports .p .act.idle { background: var(--surface-3); animation: none; }
.ports .log { font-family: var(--f-mono); font-size: 11px; color: var(--text-3); padding: 8px 12px; border: 1px dashed var(--border); border-radius: 6px; line-height: 1.7; }

/* carosello dei controller (home) */
.carousel { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.slides { display: grid; touch-action: pan-y; }
.slide {
  grid-area: 1 / 1; margin: 0; display: flex; align-items: center; justify-content: center; min-width: 0;
  opacity: 0; visibility: hidden; transform: translateX(16px);
  transition: opacity .45s ease, transform .45s ease, visibility 0s linear .45s;
}
.slide.active { opacity: 1; visibility: visible; transform: none; transition: opacity .45s ease, transform .45s ease; }
.slide > .device { width: 100%; }
.slide > .device.phone { max-width: 270px; }
.slide [data-mock=wheel] { max-width: 300px !important; }
.car-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; }
.car-cap { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 240px; }
.car-name { font-weight: 600; color: var(--text); text-decoration: none; }
.car-name::after { content: " →"; color: var(--accent); }
.car-name:hover { color: var(--accent); }
.car-desc { font-size: 14px; color: var(--text-3); }
.car-ctrl { display: flex; align-items: center; gap: 6px; }
.car-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); display: grid; place-items: center; cursor: pointer;
}
.car-btn:hover { border-color: var(--accent); color: var(--accent); }
.car-btn svg { width: 18px; height: 18px; }
.car-dots { display: flex; }
.car-dot { width: 20px; height: 32px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.car-dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--border-strong); transition: background .2s, width .2s; }
.car-dot[aria-current="true"]::before { background: var(--accent); width: 16px; border-radius: 4px; }
.car-dot:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; }

/* schema del percorso dei messaggi */
.diagram { margin: 0; padding: 28px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); display: flex; flex-direction: column; gap: 18px; }
.diagram svg { display: block; width: 100%; height: auto; }
.diagram svg.v { display: none; max-width: 400px; margin: 0 auto; }
@media (max-width: 720px) { .diagram { padding: 18px 12px; } .diagram svg.h { display: none; } .diagram svg.v { display: block; } }
.d-box { fill: var(--surface-2); stroke: var(--border-strong); stroke-width: 1; }
.d-key { fill: color-mix(in srgb, var(--accent) 12%, var(--surface-2)); stroke: var(--accent); stroke-width: 1.5; }
.d-comp { fill: var(--bg); stroke: var(--border-strong); stroke-width: 1; stroke-dasharray: 6 6; }
.d-pill { fill: var(--bg); stroke: var(--border-strong); }
.d-wire { fill: none; stroke: var(--border-strong); stroke-width: 2; }
.d-ic { fill: none; stroke: var(--text-2); stroke-width: 2; stroke-linecap: round; }
.d-t { fill: var(--text); font: 600 15px var(--f-body); }
.d-t2 { fill: var(--text); font: 600 13px var(--f-body); }
.d-s { fill: var(--text-3); font: 400 11.5px var(--f-mono); }
.d-lbl { fill: var(--text-2); font: 500 12px var(--f-mono); letter-spacing: .1em; }
.d-dot { fill: var(--accent); }
.d-back { fill: var(--blue); }
.d-legend { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 14px; color: var(--text-2); }
.d-legend span { display: inline-flex; align-items: center; gap: 8px; }
.lg-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); flex: 0 0 auto; }
.lg-dot.back { background: var(--blue); }
@media (prefers-reduced-motion: reduce) { .d-dot, .d-back { display: none; } }

/* video segnaposto */
.video {
  position: relative; aspect-ratio: 16 / 9; max-width: 100%; border-radius: var(--r-lg);
  border: 1px solid var(--border); overflow: hidden;
  background:
    repeating-linear-gradient(135deg, transparent 0 14px, rgba(255,255,255,.018) 14px 28px),
    var(--surface);
  display: grid; place-items: center; text-align: center;
}
.video .inner { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 16px; }
.video .play { width: 64px; height: 64px; border-radius: 50%; border: 2px solid var(--accent); display: grid; place-items: center; }
.video .play svg { width: 22px; height: 22px; margin-left: 4px; }
.video .vt { font-weight: 600; }
.video .vs { font-size: 13px; color: var(--text-3); }
.video-btn { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: transparent; cursor: pointer; }
.video-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.video-ready:hover .play { background: var(--accent); }
.video-ready:hover .play svg { fill: var(--on-accent) !important; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- card e griglie ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; counter-reset: s; }
.steps > li { display: flex; flex-direction: column; gap: 12px; padding: 28px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); }
.steps > li::before { counter-increment: s; content: counter(s, decimal-leading-zero); font-family: var(--f-mono); font-size: 14px; color: var(--accent); }
.steps p { color: var(--text-2); font-size: 16px; }

.comp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.comp {
  display: flex; gap: 16px; padding: 22px; min-height: 100%;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  color: var(--text); text-decoration: none; transition: border-color .15s, transform .15s;
}
.comp:hover { color: var(--text); border-color: var(--accent); transform: translateY(-2px); }
.comp .ic { width: 42px; height: 42px; flex: 0 0 auto; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.comp .tx { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.comp .nm { font-weight: 600; font-size: 18px; }
.comp .ds { color: var(--text-2); font-size: 15px; line-height: 1.5; }
.comp.main { grid-column: 1 / -1; border-color: var(--border-strong); padding: 28px; align-items: center; }
.comp.main .nm { font-family: var(--f-display); font-weight: 800; font-size: 26px; }
.comp.main .ds { font-size: 16px; max-width: 70ch; }
.comp.dashed { border-style: dashed; border-color: var(--accent); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.tag { font-size: 12px; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--border-strong); color: var(--text-2); white-space: nowrap; }
.tag.acc { border-color: var(--accent); color: var(--text); }
.tag.fill { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: minmax(0, 1fr); gap: 36px; } }

.modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.mode { display: flex; flex-direction: column; gap: 14px; padding: 30px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); }
.mode.current { border-color: var(--accent); }
.mode h3 { font-family: var(--f-display); font-size: 26px; font-weight: 800; }
.mode p { color: var(--text-2); font-size: 16px; }
.mode .go { margin-top: auto; font-weight: 600; text-decoration: none; }

.cta-band { background: var(--accent); color: var(--on-accent); }
.cta-band > .wrap { padding-block: 64px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.cta-band .h2 { color: var(--on-accent); }
.cta-band p { color: color-mix(in srgb, var(--on-accent) 75%, var(--accent)); font-size: 18px; }
.cta-band .btn { background: var(--bg); border-color: var(--bg); color: var(--text); }
.cta-band .btn:hover { background: color-mix(in srgb, var(--bg) 75%, #000); border-color: color-mix(in srgb, var(--bg) 75%, #000); color: var(--text); }

/* ---------- pagina componenti ---------- */
.page-head > .wrap { padding-block: 72px 56px; display: flex; flex-direction: column; gap: 18px; }
.jump {
  position: sticky; top: calc(env(safe-area-inset-top, 0px) + 72px); z-index: 40;
  background: color-mix(in srgb, var(--bg-2) 94%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.jump .wrap { display: flex; gap: 8px; overflow-x: auto; padding-block: 12px; scrollbar-width: thin; }
.jump a {
  flex: 0 0 auto; font-size: 14px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border-strong);
  color: var(--text-2); text-decoration: none; white-space: nowrap;
}
.jump a:hover, .jump a.active { color: var(--on-accent); background: var(--accent); border-color: var(--accent); }
@media (max-width: 760px) { .jump { top: calc(env(safe-area-inset-top, 0px) + 72px); } }

.component > .wrap { padding-block: 88px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 56px; align-items: start; }
.component.flip > .wrap > .media { order: -1; }
@media (max-width: 960px) {
  .component > .wrap { grid-template-columns: minmax(0, 1fr); gap: 36px; padding-block: 64px; }
  .component.flip > .wrap > .media { order: 0; }
}
.component .info { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.component .media { display: flex; flex-direction: column; gap: 20px; min-width: 0; position: sticky; top: 150px; }
@media (max-width: 960px) { .component .media { position: static; } }
.comp-title { display: flex; align-items: center; gap: 16px; }
.comp-title .ic { width: 52px; height: 52px; flex: 0 0 auto; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; padding: 8px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface); }
.howto { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0; counter-reset: h; }
.howto li { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 14px; padding: 14px 0; border-top: 1px solid var(--border); }
.howto li:last-child { border-bottom: 1px solid var(--border); }
.howto li::before { counter-increment: h; content: counter(h); font-family: var(--f-mono); font-size: 13px; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--accent); color: var(--accent); display: grid; place-items: center; margin-top: 1px; }
.howto li > div { color: var(--text-2); font-size: 16px; min-width: 0; }
.howto li strong { color: var(--text); font-weight: 600; }
.subhead { font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.spec { width: 100%; border-collapse: collapse; font-size: 15px; }
.spec-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-lg); }
.spec th, .spec td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.spec tr:last-child td { border-bottom: 0; }
.spec th { font-weight: 600; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); background: var(--surface); }
.spec td:first-child { color: var(--text); white-space: nowrap; }
.spec td { color: var(--text-2); }
.spec td.mono { font-family: var(--f-mono); font-size: 13px; color: var(--text); font-variant-numeric: tabular-nums; }
.note {
  display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; padding: 16px 18px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); font-size: 15px; color: var(--text-2);
}
.note svg { width: 20px; height: 20px; stroke: var(--accent); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; margin-top: 2px; }
.note strong { color: var(--text); }
.leds { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 14px; color: var(--text-2); }
.leds span { display: inline-flex; align-items: center; gap: 7px; }
.leds i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

/* ---------- download ---------- */
.dl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.dl {
  display: flex; flex-direction: column; gap: 14px; padding: 28px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
}
.dl.rec { border-color: var(--accent); }
.dl.soon { border-style: dashed; background: transparent; }
.dl.soon .os, .dl.soon ul { opacity: .75; }
.dl .os { display: flex; align-items: center; gap: 12px; }
.dl .os svg { width: 32px; height: 32px; stroke: var(--text); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dl .os h3 { font-family: var(--f-display); font-size: 24px; font-weight: 800; }
.dl .meta { font-family: var(--f-mono); font-size: 13px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.dl ul { margin: 0; padding-left: 18px; color: var(--text-2); font-size: 15px; display: flex; flex-direction: column; gap: 4px; }
.dl .btn { margin-top: auto; }
.dl .btn-row { margin-top: auto; display: flex; flex-wrap: wrap; gap: 10px; }
.dl .btn-row .btn { margin-top: 0; flex: 1 1 0; min-width: max-content; padding: 0 14px; white-space: nowrap; }
.dl-note { font-size: 14px; line-height: 1.45; color: var(--text-2); padding: 10px 12px; border-left: 3px solid var(--accent); background: color-mix(in srgb, var(--accent) 7%, transparent); border-radius: 0 6px 6px 0; }
.btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.req { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0; border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.req > div { padding: 22px 24px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; background: var(--surface); }
.req h4 { font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.req p { font-size: 15px; color: var(--text-2); }
.req strong { color: var(--text); }
.file-list { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.file-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--border); background: var(--surface); }
.file-row:last-child { border-bottom: 0; }
.file-row .fn { font-weight: 600; }
.file-row .fd { font-size: 14px; color: var(--text-2); }
.file-row .btn { min-height: 44px; padding: 0 18px; font-size: 15px; }
@media (max-width: 560px) { .file-row { grid-template-columns: minmax(0, 1fr); } .file-row .btn { justify-self: start; } }

.changelog { display: flex; flex-direction: column; gap: 0; }
.changelog > div { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 24px; padding: 22px 0; border-top: 1px solid var(--border); }
.changelog .v { font-family: var(--f-mono); font-size: 14px; color: var(--accent); }
.changelog .d { font-size: 13px; color: var(--text-3); font-family: var(--f-mono); }
.changelog ul { margin: 0; padding-left: 18px; color: var(--text-2); font-size: 15px; display: flex; flex-direction: column; gap: 4px; }
@media (max-width: 560px) { .changelog > div { grid-template-columns: minmax(0, 1fr); gap: 8px; } }

/* ---------- guida ---------- */
.guide-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 56px; align-items: start; }
.toc { position: sticky; top: 110px; display: flex; flex-direction: column; gap: 2px; font-size: 15px; }
.toc a { color: var(--text-2); text-decoration: none; padding: 7px 12px; border-left: 2px solid var(--border); }
.toc a:hover { color: var(--text); border-left-color: var(--text-3); }
.toc a.active { color: var(--text); border-left-color: var(--accent); }
@media (max-width: 900px) { .guide-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; } .toc { position: static; flex-direction: row; flex-wrap: wrap; gap: 8px; } .toc a { border: 1px solid var(--border-strong); border-radius: 999px; padding: 5px 12px; } }
.guide { display: flex; flex-direction: column; gap: 72px; min-width: 0; }
.guide section { display: flex; flex-direction: column; gap: 18px; }
.guide section > p, .guide section li { color: var(--text-2); max-width: 70ch; }
.guide ol, .guide ul { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.guide strong { color: var(--text); }
pre.code {
  margin: 0; padding: 16px 18px; border-radius: var(--r-lg); background: color-mix(in srgb, var(--bg) 80%, #000); border: 1px solid var(--border);
  font-family: var(--f-mono); font-size: 14px; line-height: 1.7; color: var(--text); overflow-x: auto; max-width: 100%;
}
pre.code .c { color: var(--text-3); }
.wiring { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px; align-items: center; padding: 22px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); }
.wiring .side { display: flex; flex-direction: column; gap: 8px; }
.wiring .side .lbl { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.wiring .side .nm { font-weight: 600; }
.wiring .port { font-family: var(--f-mono); font-size: 13px; padding: 4px 10px; border-radius: 6px; border: 1px solid var(--border-strong); color: var(--text); align-self: flex-start; }
.wiring .port.a { border-color: var(--accent); }
.wiring .port.b { border-color: var(--blue); }
.wiring .x { font-family: var(--f-mono); font-size: 12px; color: var(--text-3); text-align: center; line-height: 1.5; }
.wiring .x b { display: block; font-size: 22px; color: var(--text-2); font-weight: 400; }
.wiring .side.r { text-align: right; }
.wiring .side.r .port { align-self: flex-end; }
@media (max-width: 520px) { .wiring { grid-template-columns: minmax(0, 1fr); } .wiring .side.r { text-align: left; } .wiring .side.r .port { align-self: flex-start; } .wiring .x b { transform: rotate(90deg); } }

details.faq { border-top: 1px solid var(--border); }
details.faq:last-of-type { border-bottom: 1px solid var(--border); }
details.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; padding: 18px 0; font-weight: 600; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; font-family: var(--f-mono); color: var(--accent); font-size: 20px; line-height: 1; }
details.faq[open] summary::after { content: "–"; }
details.faq > div { padding: 0 0 20px; color: var(--text-2); max-width: 70ch; display: flex; flex-direction: column; gap: 10px; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--border); }
.site-footer > .wrap { padding-block: 48px; display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 32px; }
.site-footer .brand { margin: 0; width: fit-content; } /* il link finisce dove finisce il marchio */
.site-footer p { color: var(--text-3); font-size: 14px; margin-top: 12px; max-width: 36ch; }
.site-footer h4 { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); font-weight: 600; margin-bottom: 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.site-footer ul a { color: var(--text-2); text-decoration: none; }
.site-footer ul a:hover { color: var(--text); }
.legal { border-top: 1px solid var(--border); }
.legal > .wrap { padding-block: 20px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; font-size: 13px; color: var(--text-3); }
@media (max-width: 760px) { .site-footer > .wrap { grid-template-columns: repeat(2, minmax(0, 1fr)); } .site-footer > .wrap > div:first-child { grid-column: 1 / -1; } }

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

/* ---------- pagina licenza ---------- */
.license { display: flex; flex-direction: column; gap: 36px; max-width: 760px; }
.lic-intro { font-size: 18px; color: var(--text); }
.lic-sec { display: flex; flex-direction: column; gap: 12px; padding-top: 28px; border-top: 1px solid var(--border); }
.lic-sec p, .lic-list li { color: var(--text-2); }
.lic-h { display: flex; align-items: baseline; gap: 14px; font-family: var(--f-display); font-size: 24px; font-weight: 800; letter-spacing: -0.01em; }
.lic-h span { font-family: var(--f-mono); font-size: 14px; font-weight: 500; color: var(--link); min-width: 1.5em; }
.lic-list { margin: 0; padding-left: 24px; display: flex; flex-direction: column; gap: 6px; }
