/* ==========================================================================
   Matteo Tech Studio — stile
   Il mondo: il banco del tecnico. Verde della scheda madre, oro dei contatti,
   carta chiara per tutto ciò che è "nero su bianco" (prezzi e prenotazione).
   ========================================================================== */

/* ---------- Caratteri (ospitati sul sito: nessun servizio esterno) ---------- */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../fonts/bricolage-grotesque.woff2") format("woff2");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("../fonts/hanken-grotesk.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/ibm-plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/ibm-plex-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/space-grotesk.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Valori di base ---------- */
:root {
  --accent-rgb: 237 201 103;
  --bg-rgb: 7 19 14;
  --ink-rgb: 14 31 24;
  --glow-rgb: 31 122 82;
  --led-rgb: 75 227 148;
  --text-rgb: 238 245 239;
  --board2-rgb: 18 48 35;
  --board-rgb: 13 34 25;
  --bg: #07130e;
  --bg-2: #0a1a12;
  --board: #0d2219;
  --board-2: #123023;
  --mask: #1f7a52;
  --led: #4be394;
  --gold: #edc967;
  --gold-2: #f7df94;
  --gold-ink: #17170a;
  --hot: #ff6b57;

  --text: #eef5ef;
  --text-2: #b6c6bc;
  --text-3: #8fa196;

  --line: rgb(var(--accent-rgb) / 0.16);
  --line-strong: rgb(var(--accent-rgb) / 0.42);
  --line-soft: rgb(var(--text-rgb) / 0.1);

  --paper: #eff2ea;
  --paper-2: #e3e8dc;
  --ink: #0e1f18;
  --ink-2: #41554a;
  --ink-line: rgb(var(--ink-rgb) / 0.22);
  --stamp: #0b6b45;
  --err: #a3261b;

  --gutter: clamp(1.25rem, 5vw, 3.5rem);
  --max: 78rem;
  --header-h: 3.75rem;
  --r: 16px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);

  --f-display: "Bricolage Grotesque", "Hanken Grotesk", "Segoe UI", system-ui, sans-serif;
  --f-body: "Hanken Grotesk", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
}

@media (min-width: 1000px) {
  :root { --header-h: 4.5rem; }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  background: var(--bg);
  overflow-x: clip;
}

/* i fogli entrano in prospettiva: non devono mai allargare la pagina su telefono */
.listino,
.prenota { overflow-x: clip; }

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  /* trama "millefori": la basetta forata del banco di prova */
  background-image: radial-gradient(circle at 1px 1px, rgb(var(--accent-rgb) / 0.075) 1px, transparent 1.6px);
  background-size: 28px 28px;
  color: var(--text);
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

body.menu-open { overflow: hidden; }

h1, h2, h3, p, ul, ol, figure, fieldset, legend, table { margin: 0; padding: 0; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 2px solid var(--gold-2);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection { background: var(--gold); color: var(--gold-ink); }

/* ---------- Utilità ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.solo-largo { display: none; }
@media (min-width: 560px) {
  .solo-largo { display: inline; }
  .solo-stretto { display: none; }
}

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: var(--gold);
  color: var(--gold-ink);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font: 500 0.72rem/1.4 var(--f-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-2);
}

.led {
  flex: none;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--led);
  box-shadow: 0 0 0 3px rgb(var(--led-rgb) / 0.14), 0 0 12px rgb(var(--led-rgb) / 0.7);
}

.timbro {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.12rem 0.42rem;
  border: 1.5px solid currentColor;
  border-radius: 4px;
  color: var(--stamp);
  font: 500 0.6rem/1.3 var(--f-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  vertical-align: middle;
  transform: rotate(-3deg);
}

/* ---------- Bottoni: come tasti, si premono ---------- */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  min-height: 3.25rem;
  padding: 0.8rem 1.4rem;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font: 700 1rem/1.15 var(--f-body);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: transform 0.18s var(--ease-out), box-shadow 0.18s var(--ease-out),
    background-color 0.18s, border-color 0.18s, color 0.18s;
}
.btn--primary {
  --btn-bg: var(--gold);
  --btn-fg: var(--gold-ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), inset 0 -3px 0 rgba(0, 0, 0, 0.18),
    0 12px 26px -12px rgb(var(--accent-rgb) / 0.6);
}
.btn--primary:active {
  transform: translateY(2px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.18);
}
.btn--ghost {
  border-color: var(--line-strong);
  background: rgb(var(--bg-rgb) / 0.35);
}
.btn--ghost:active { transform: translateY(1px); }
.btn--ink {
  --btn-bg: var(--ink);
  --btn-fg: var(--paper);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.35), 0 10px 22px -12px rgb(var(--ink-rgb) / 0.7);
}
.btn--ink:active { transform: translateY(2px); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.35); }
.btn--sm { min-height: 2.75rem; padding: 0.5rem 1rem; font-size: 0.9375rem; }
.btn[disabled] { opacity: 0.6; cursor: progress; }

@media (hover: hover) {
  .btn--primary:hover { --btn-bg: var(--gold-2); transform: translateY(-1px); }
  .btn--ghost:hover { border-color: var(--gold); background: rgb(var(--accent-rgb) / 0.1); }
  .btn--ink:hover { --btn-bg: #17332a; transform: translateY(-1px); }
}

/* ---------- Testata ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 1rem;
  height: var(--header-h);
  padding: 0 var(--gutter);
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s, border-color 0.3s;
}
.site-header.is-solid,
.menu-open .site-header {
  background: rgb(var(--bg-rgb) / 0.86);
  border-bottom-color: var(--line);
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header.is-solid {
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    background: rgb(var(--bg-rgb) / 0.72);
  }
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 2.75rem;
  margin-right: auto;
  text-decoration: none;
  color: var(--text);
}
.brand__mark { flex: none; width: 1.9rem; height: 1.9rem; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.brand__pins { stroke: var(--text-3); stroke-width: 2; }
.brand__body { stroke: var(--text); stroke-width: 2; fill: var(--board); }
.brand__m { stroke: var(--gold); stroke-width: 2.3; }
.brand__name {
  font: 760 1.06rem/1 var(--f-display);
  font-stretch: 88%;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand__name span { color: var(--text-2); font-weight: 500; }
.brand__testo { display: grid; gap: 0.22rem; }
.brand__by {
  font: 500 0.6rem/1 var(--f-mono);
  letter-spacing: 0.08em;
  color: var(--gold);
  white-space: nowrap;
}

.nav { display: none; }
.header__cta { display: none; }

.menu-btn {
  display: inline-grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-right: -0.5rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
}
.menu-btn .icon { width: 1.6rem; height: 1.6rem; }

.menu {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  z-index: 45;
  overflow-y: auto;
  padding: 1.5rem var(--gutter) calc(2rem + env(safe-area-inset-bottom));
  background: var(--bg);
}
.menu__nav { display: grid; gap: 0.25rem; }
.menu__nav a:not(.btn) {
  display: flex;
  align-items: center;
  min-height: 3.5rem;
  border-bottom: 1px solid var(--line-soft);
  font: 700 1.6rem/1.1 var(--f-display);
  font-stretch: 85%;
  text-decoration: none;
}
.menu__nav .btn { margin-top: 1.5rem; }

@media (min-width: 560px) {
  .header__cta { display: inline-flex; }
}
@media (min-width: 1000px) {
  .nav {
    display: flex;
    gap: 0.25rem;
    margin-right: 1rem;
  }
  .nav a {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    padding: 0 0.8rem;
    border-radius: 8px;
    color: var(--text-2);
    font-size: 0.94rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s, background-color 0.2s;
  }
  .header__cta { white-space: nowrap; }
  .nav a:hover { color: var(--text); background: rgb(var(--text-rgb) / 0.06); }
  .menu-btn, .menu { display: none !important; }
}

/* ==========================================================================
   HERO + STORIA 3D
   Versione base: una normale pagina che si legge dall'alto in basso.
   Con ".pinned" (JavaScript + WebGL, senza "riduci animazioni") diventa la
   scena fissa in cui il PC si apre e si ripara mentre scorri.
   ========================================================================== */
.stage {
  position: relative;
  padding: calc(var(--header-h) + 1.5rem) var(--gutter) 3rem;
}
.stage__sticky {
  position: relative;
  display: grid;
  gap: 2rem;
  max-width: var(--max);
  margin-inline: auto;
}
.stage__view {
  position: relative;
  height: min(56vh, 30rem);
}
.stage__poster,
.build__poster {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.stage__view canvas,
.build__view canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.9s var(--ease-out);
  touch-action: pan-y;
  cursor: grab;
}
.stage__view canvas:active,
.build__view canvas:active { cursor: grabbing; }
.scene-on .stage__view canvas,
.scene-on .build__view canvas { opacity: 1; }
.scene-on .stage__poster,
.scene-on .build__poster { opacity: 0; transition: opacity 0.6s; }

.stage__panels { display: grid; gap: 2.75rem; }

.hero__h1 { display: grid; gap: 1.1rem; font-weight: inherit; font-size: inherit; }
.hero__title {
  font: 800 clamp(2.2rem, 9.4vw, 5.4rem) / 0.95 var(--f-display);
  font-stretch: 80%;
  letter-spacing: -0.028em;
  text-wrap: balance;
}
.hero__title em {
  display: block;
  margin-top: 0.08em;
  font-style: normal;
  color: var(--gold);
}
.hero__sub {
  max-width: 31rem;
  margin-top: 1.1rem;
  color: var(--text-2);
  font-size: clamp(1rem, 2.6vw, 1.14rem);
}
.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.5rem;
}
.hero__proof {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.2rem;
  margin-top: 1.4rem;
  font: 500 0.74rem/1.4 var(--f-mono);
  letter-spacing: 0.02em;
  color: var(--text-2);
}
.hero__proof li { display: flex; align-items: center; gap: 0.4rem; }
.hero__proof .icon { color: var(--led); width: 1rem; height: 1rem; stroke-width: 2.4; }

.panel__kicker {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font: 500 0.74rem/1.4 var(--f-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-2);
}
.panel__n {
  padding: 0.12rem 0.45rem;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--gold);
}
.panel__title {
  margin-top: 0.8rem;
  font: 760 clamp(1.85rem, 7vw, 3.5rem) / 0.98 var(--f-display);
  font-stretch: 82%;
  letter-spacing: -0.024em;
  text-wrap: balance;
}
.panel__text {
  max-width: 30rem;
  margin-top: 0.9rem;
  color: var(--text-2);
  font-size: clamp(1rem, 2.6vw, 1.12rem);
}

.hud, .rail, .stage__hint, .stage__tools, .callouts, .callout-lines { display: none; }

/* ----- scena fissa ----- */
.pinned .stage {
  height: 470vh;
  height: 470svh;
  padding: 0;
}
.pinned .stage__sticky {
  position: sticky;
  top: 0;
  display: block;
  max-width: none;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  isolation: isolate;
}
/* alone alle spalle del PC: verde quando sta bene, rosso quando scalda */
.pinned .stage__sticky::before,
.pinned .stage__sticky::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.pinned .stage__sticky::before {
  background: radial-gradient(58% 44% at 50% 30%, rgb(var(--glow-rgb) / 0.34), rgb(var(--glow-rgb) / 0) 72%);
}
.pinned .stage__sticky::after {
  background: radial-gradient(58% 44% at 50% 30%, rgba(214, 62, 44, 0.3), rgba(214, 62, 44, 0) 72%);
  opacity: var(--caldo, 1);
}
.pinned .stage__view {
  position: absolute;
  inset: 0;
  height: auto;
}
.pinned .stage__poster {
  /* stessa posizione e scala del PC 3D, così il passaggio non si nota */
  position: absolute;
  left: 50%;
  top: 9.5vh;
  top: 9.5svh;
  width: auto;
  max-width: none;
  height: 49vh;
  height: 49svh;
  transform: translateX(-50%);
}
.pinned .stage__panels {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  pointer-events: none;
}
.pinned .stage__panels::before {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 66%;
  background: linear-gradient(to top, var(--bg) 0%, rgb(var(--bg-rgb) / 0.94) 42%, rgb(var(--bg-rgb) / 0) 100%);
}
.pinned .panel {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: calc(4.4rem + env(safe-area-inset-bottom));
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.45s var(--ease-out), transform 0.6s var(--ease-out);
  pointer-events: none;
}
.pinned .panel.is-active {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  transition-delay: 0.12s;
}
.pinned .panel--hero { bottom: calc(3.6rem + env(safe-area-inset-bottom)); }

.pinned .hero__h1 { gap: 0.8rem; }
.pinned .hero__title { font-size: clamp(2.1rem, 9vw, 3.2rem); }
.pinned .hero__sub { margin-top: 0.8rem; }
.pinned .hero__cta { flex-wrap: nowrap; margin-top: 1.1rem; }
.pinned .hero__cta .btn { flex: 1 1 auto; padding-inline: 1rem; }
.pinned .hero__cta .btn--primary { flex-grow: 2; }
.pinned .hero__proof { display: none; }

@media (max-height: 640px) and (max-width: 999px) {
  .pinned .hero__sub { display: none; }
  .pinned .hero__title { font-size: clamp(1.9rem, 8vw, 2.6rem); }
}

/* lettura diagnostica */
.pinned.scene-on .hud {
  position: absolute;
  z-index: 3;
  top: calc(var(--header-h) + 0.5rem);
  right: var(--gutter);
  display: block;
  min-width: 9.6rem;
  padding: 0.55rem 0.7rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgb(var(--bg-rgb) / 0.66);
  font: 500 0.66rem/1.55 var(--f-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
}
.hud__title { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.25rem; color: var(--text-2); }
.hud__sim { margin-left: auto; padding-left: 0.6rem; font-size: 0.56rem; color: var(--text-3); }
@media (max-width: 999px) {
  /* su telefono la lettura è compatta e non copre il PC */
  .pinned.scene-on .hud { min-width: 0; padding: 0.4rem 0.6rem 0.45rem; font-size: 0.62rem; line-height: 1.45; }
  .hud__nome { display: none; }
  .hud__sim { margin-left: 0; padding-left: 0; }
  .hud__title { margin-bottom: 0.05rem; }
  .hud__row { gap: 0.6rem; }
}
.hud__row { display: flex; justify-content: space-between; gap: 1rem; }
.hud__row b { font-weight: 500; color: var(--text); font-variant-numeric: tabular-nums; }
.hud .led { transition: background-color 0.4s, box-shadow 0.4s; }
.hud[data-stato="caldo"] .led {
  background: var(--hot);
  box-shadow: 0 0 0 3px rgba(255, 107, 87, 0.16), 0 0 12px rgba(255, 107, 87, 0.8);
}
.hud[data-stato="caldo"] [data-hud="temp"],
.hud[data-stato="caldo"] [data-hud="stato"] { color: var(--hot); }
.hud[data-stato="lavoro"] .led {
  background: var(--gold);
  box-shadow: 0 0 0 3px rgb(var(--accent-rgb) / 0.16), 0 0 12px rgb(var(--accent-rgb) / 0.8);
}
.hud[data-stato="ok"] [data-hud="temp"],
.hud[data-stato="ok"] [data-hud="stato"] { color: var(--led); }

/* etichette sui componenti */
.pinned.scene-on .callout-lines {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}
.callout-lines line { stroke: var(--gold); stroke-width: 1; opacity: 0; transition: opacity 0.35s; }
.callout-lines circle { fill: var(--gold); opacity: 0; transition: opacity 0.35s; }
.callout-lines .is-on { opacity: 0.85; }
.pinned.scene-on .callouts {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  pointer-events: none;
}
.callout {
  position: absolute;
  left: 0;
  top: 0;
  padding: 0.28rem 0.55rem;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: rgb(var(--bg-rgb) / 0.82);
  color: var(--text);
  font: 500 0.68rem/1.3 var(--f-mono);
  letter-spacing: 0.03em;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.35s;
  will-change: transform;
}
.callout.is-on { opacity: 1; }

/* fasi */
.pinned .rail {
  position: absolute;
  z-index: 3;
  left: var(--gutter);
  right: var(--gutter);
  bottom: calc(0.7rem + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
}
.pinned .stage:not([data-step="0"]) .rail { opacity: 1; pointer-events: auto; }
.rail button {
  position: relative;
  display: block;
  width: 100%;
  min-height: 2.75rem;
  padding: 0.75rem 0 0;
  border: 0;
  border-top: 2px solid var(--line-soft);
  background: none;
  color: var(--text-3);
  font: 500 0.68rem/1.3 var(--f-mono);
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.3s;
}
.rail button::before {
  content: "";
  position: absolute;
  left: 0;
  top: -2px;
  width: 100%;
  height: 2px;
  background: var(--gold);
  transform: scaleX(var(--p, 0));
  transform-origin: 0 50%;
}
.rail .is-current button { color: var(--text); }
.rail__t { display: none; margin-left: 0.5em; }
@media (min-width: 480px) { .rail__t { display: inline; } }

.pinned .stage__hint {
  position: absolute;
  z-index: 3;
  left: var(--gutter);
  right: var(--gutter);
  bottom: calc(1rem + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font: 500 0.7rem/1.3 var(--f-mono);
  letter-spacing: 0.04em;
  color: var(--text-3);
  transition: opacity 0.4s;
}
.pinned .stage:not([data-step="0"]) .stage__hint { opacity: 0; }
.stage__hint .icon { width: 1rem; height: 1rem; color: var(--gold); animation: giu 2.2s var(--ease-io) infinite; }
@keyframes giu {
  0%, 100% { transform: translateY(-2px); }
  50% { transform: translateY(3px); }
}

.pinned .stage__tools {
  position: absolute;
  z-index: 4;
  top: calc(var(--header-h) + 0.5rem);
  left: var(--gutter);
  display: flex;
  gap: 0.4rem;
}
.tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.75rem;
  padding: 0 0.8rem;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgb(var(--bg-rgb) / 0.6);
  color: var(--text-2);
  font: 500 0.68rem/1 var(--f-mono);
  letter-spacing: 0.03em;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.tool-btn .icon { width: 1rem; height: 1rem; }
.tool-btn:hover { border-color: var(--line-strong); color: var(--text); }
.pinned .stage__skip { opacity: 0; pointer-events: none; transition: opacity 0.4s; }
.pinned .stage:not([data-step="0"]) .stage__skip,
.pinned .stage__skip:focus-visible { opacity: 1; pointer-events: auto; }
@media (max-width: 559px) {
  #pausa-animazioni { width: 2.75rem; padding: 0; justify-content: center; }
  #pausa-animazioni span {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  }
}

/* schermi larghi: testo a sinistra, PC a destra */
@media (min-width: 1000px) and (min-aspect-ratio: 1/1) {
  .pinned .stage__sticky::before,
  .pinned .stage__sticky::after {
    background: radial-gradient(40% 56% at 70% 50%, rgb(var(--glow-rgb) / 0.36), rgb(var(--glow-rgb) / 0) 72%);
  }
  .pinned .stage__sticky::after {
    background: radial-gradient(40% 56% at 70% 50%, rgba(214, 62, 44, 0.3), rgba(214, 62, 44, 0) 72%);
  }
  .pinned .stage__poster {
    left: 70%;
    top: 50%;
    height: 96vh;
    transform: translate(-50%, -50%);
  }
  .pinned .stage__panels::before { display: none; }
  .pinned .panel,
  .pinned .panel--hero {
    left: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter)));
    right: auto;
    top: 50%;
    bottom: auto;
    width: min(37rem, 43vw);
    transform: translateY(calc(-50% + 22px));
  }
  .pinned .panel.is-active { transform: translateY(-50%); }
  .pinned .hero__h1 { gap: 1.1rem; }
  .pinned .hero__title { font-size: clamp(3rem, 5.3vw, 5.4rem); }
  .pinned .hero__sub { margin-top: 1.25rem; }
  .pinned .hero__cta { margin-top: 1.8rem; }
  .pinned .hero__cta .btn,
  .pinned .hero__cta .btn--primary { flex: 0 0 auto; padding-inline: 1.4rem; }
  .pinned .hero__proof { display: flex; }
  .pinned.scene-on .hud { top: calc(var(--header-h) + 1.25rem); font-size: 0.7rem; min-width: 11rem; }
  .pinned .rail {
    left: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter)));
    right: auto;
    bottom: 2.25rem;
    width: min(37rem, 43vw);
  }
  .pinned .stage__hint {
    left: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter)));
    bottom: 2.5rem;
  }
  .pinned .stage__tools { top: auto; left: auto; right: var(--gutter); bottom: 2.25rem; }
  .callout { font-size: 0.74rem; }
}

/* ==========================================================================
   SEZIONI
   ========================================================================== */
.section {
  position: relative;
  max-width: var(--max);
  margin-inline: auto;
  padding: clamp(4.5rem, 11vw, 9rem) var(--gutter);
}
.section__head { max-width: 47rem; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.section h2 {
  margin-top: 0.9rem;
  font: 760 clamp(2.1rem, 7.4vw, 4.4rem) / 0.97 var(--f-display);
  font-stretch: 82%;
  letter-spacing: -0.026em;
  text-wrap: balance;
}
.section h2 em { font-style: normal; color: var(--gold); }
.section__lead {
  max-width: 38rem;
  margin-top: 1.1rem;
  color: var(--text-2);
  font-size: clamp(1.02rem, 2.6vw, 1.16rem);
  text-wrap: pretty;
}

/* ---------- Problemi comuni ---------- */
.problemi__grid { display: grid; gap: 0.75rem; }
.problemi__grid li { display: grid; perspective: 900px; }

.pcard {
  --rx: 0deg;
  --ry: 0deg;
  --mx: 50%;
  --my: 0%;
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 1rem;
  align-content: start;
  padding: 1.15rem 1.15rem 1.1rem;
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  background: linear-gradient(180deg, var(--board-2), var(--board));
  text-decoration: none;
  overflow: hidden;
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform 0.35s var(--ease-out), border-color 0.25s, box-shadow 0.35s var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.pcard::before {
  /* riflesso che segue il puntatore */
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(22rem 14rem at var(--mx) var(--my), rgb(var(--accent-rgb) / 0.16), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.pcard::after {
  /* piazzola di saldatura: si accende quando la tocchi */
  content: "";
  position: absolute;
  right: 0.9rem;
  top: 0.9rem;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  transition: background-color 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.pcard__icon {
  grid-row: 1 / span 3;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0.5rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgb(var(--bg-rgb) / 0.5);
  color: var(--gold);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pcard h3 {
  padding-right: 1.25rem;
  font: 720 1.32rem/1.1 var(--f-display);
  font-stretch: 86%;
  letter-spacing: -0.015em;
}
.pcard p { margin-top: 0.3rem; color: var(--text-2); font-size: 0.97rem; line-height: 1.45; }
.pcard__go {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.7rem;
  color: var(--gold);
  font: 500 0.72rem/1.3 var(--f-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.pcard__go .icon { width: 1rem; height: 1rem; transition: transform 0.25s var(--ease-out); }
.pcard:active { transform: scale(0.985); }
.pcard:focus-visible { border-radius: var(--r); }

@media (hover: hover) {
  .pcard:hover { border-color: var(--line-strong); box-shadow: 0 24px 40px -28px rgba(0, 0, 0, 0.9); }
  .pcard:hover::before { opacity: 1; }
  .pcard:hover::after { background: var(--led); border-color: var(--led); box-shadow: 0 0 12px rgb(var(--led-rgb) / 0.8); }
  .pcard:hover .pcard__go .icon { transform: translateX(4px); }
}
@media (min-width: 640px) {
  .problemi__grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
}
@media (min-width: 1000px) {
  .problemi__grid { grid-template-columns: repeat(4, 1fr); }
  .pcard { grid-template-columns: 1fr; padding: 1.5rem; min-height: 15rem; }
  .pcard__icon { grid-row: auto; width: 3rem; height: 3rem; margin-bottom: 1.6rem; }
  .pcard h3 { font-size: 1.6rem; }
  .pcard__go { align-self: end; margin-top: 1.4rem; }
}

/* ---------- Carta: "nero su bianco" ---------- */
.paper {
  position: relative;
  margin-block: 10px;
  padding: clamp(1.3rem, 4.5vw, 3rem);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 40px 70px -36px rgba(0, 0, 0, 0.85);
  transform-origin: 50% 0;
}
.paper::before,
.paper::after {
  /* bordi a zig-zag, come uno scontrino */
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 10px;
  background-size: 14px 10px;
  background-repeat: repeat-x;
}
.paper::before {
  top: -10px;
  background-image: linear-gradient(-45deg, var(--paper) 7px, transparent 0), linear-gradient(45deg, var(--paper) 7px, transparent 0);
  background-position: left bottom;
}
.paper::after {
  bottom: -10px;
  background-image: linear-gradient(-135deg, var(--paper) 7px, transparent 0), linear-gradient(135deg, var(--paper) 7px, transparent 0);
  background-position: left top;
}
.paper :focus-visible { outline-color: var(--ink); }
.paper ::selection { background: var(--ink); color: var(--paper); }
.paper__head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.9rem;
  border-bottom: 1.5px dashed var(--ink-line);
  color: var(--ink-2);
  font: 500 0.7rem/1.4 var(--f-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.paper__foot {
  margin-top: 1.4rem;
  padding-top: 1rem;
  border-top: 1.5px dashed var(--ink-line);
  color: var(--ink-2);
  font: 400 0.78rem/1.55 var(--f-mono);
}

.voce {
  position: relative;
  display: grid;
  gap: 0.4rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--ink-line);
  scroll-margin-top: calc(var(--header-h) + 1.5rem);
}
.voce:last-child { border-bottom: 0; padding-bottom: 0.4rem; }
.voce__top { display: flex; align-items: baseline; gap: 0.7rem; }
.voce h3 {
  font: 740 clamp(1.22rem, 3.8vw, 1.6rem) / 1.1 var(--f-display);
  font-stretch: 86%;
  letter-spacing: -0.016em;
}
.voce__dots {
  flex: 1 1 1.5rem;
  min-width: 1.5rem;
  border-bottom: 2px dotted var(--ink-line);
  transform: translateY(-0.28em);
}
.voce__prezzo {
  flex: none;
  font: 500 0.95rem/1.2 var(--f-mono);
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.voce__prezzo small { font-size: 0.72rem; color: var(--ink-2); font-weight: 400; }
.voce__prezzo.is-vuoto { color: var(--ink-2); font-size: 0.8rem; }
.voce__desc { max-width: 50ch; color: var(--ink-2); font-size: 0.98rem; line-height: 1.5; }
.voce__nota { color: var(--stamp); font: 500 0.78rem/1.5 var(--f-mono); }
.voce__sub { display: grid; gap: 0.5rem; margin-top: 0.5rem; }
.voce__sub li { display: flex; align-items: baseline; gap: 0.6rem; font-size: 0.96rem; }
.voce__sub li > span:first-child { max-width: 62%; }
.voce__cta {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  margin-top: 0.15rem;
  color: var(--ink);
  font: 500 0.74rem/1.2 var(--f-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.3em;
}
.voce__cta:hover { text-decoration-color: var(--stamp); color: var(--stamp); }
.voce--evidenza {
  margin-inline: calc(clamp(1.3rem, 4.5vw, 3rem) * -1);
  padding-inline: clamp(1.3rem, 4.5vw, 3rem);
  background: var(--paper-2);
}
.voce:target { animation: evidenzia 2.4s var(--ease-out); }
@keyframes evidenzia {
  0%, 35% { box-shadow: inset 4px 0 0 var(--stamp), inset 0 0 0 100vmax rgb(var(--accent-rgb) / 0.34); }
  100% { box-shadow: inset 0 0 0 var(--stamp), inset 0 0 0 100vmax rgb(var(--accent-rgb) / 0); }
}
@media (min-width: 860px) {
  .voce { grid-template-columns: 1fr auto; column-gap: 2rem; align-items: start; }
  .voce__top, .voce__sub { grid-column: 1 / -1; }
  .voce__desc, .voce__nota { grid-column: 1; }
  .voce__cta { grid-column: 2; grid-row: 2; justify-self: end; margin-top: -0.4rem; }
  .voce__sub + .voce__cta, .voce__nota + .voce__cta { grid-row: auto; }
}

/* ---------- Rinnovo PC ---------- */
.rinnovo { display: grid; gap: 2.5rem; }
.rinnovo__dentro { display: grid; gap: 0.65rem; margin-top: 1.6rem; }
.rinnovo__dentro li { display: flex; gap: 0.7rem; align-items: flex-start; }
.rinnovo__dentro .icon { margin-top: 0.2em; color: var(--led); stroke-width: 2.4; }
.rinnovo__azioni { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 1.9rem; }
.rinnovo__prezzo { display: grid; font: 500 0.7rem/1.4 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }
.rinnovo__prezzo b { color: var(--gold); font-size: 1.05rem; font-weight: 500; letter-spacing: 0.01em; text-transform: none; }

.confronto {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: linear-gradient(180deg, rgb(var(--board2-rgb) / 0.75), rgb(var(--board-rgb) / 0.75));
  overflow: hidden;
}
.confronto table { display: block; width: 100%; border-collapse: collapse; }
.confronto thead { display: none; }
.confronto tbody { display: block; }
.confronto tr { display: grid; grid-template-columns: 1fr 1fr; gap: 0.3rem 1rem; padding: 1.1rem 1.15rem; border-bottom: 1px solid var(--line-soft); }
.confronto tr:last-child { border-bottom: 0; }
.confronto th[scope="row"] {
  grid-column: 1 / -1;
  font: 500 0.7rem/1.4 var(--f-mono);
  letter-spacing: 0.1em;
  text-align: left;
  text-transform: uppercase;
  color: var(--text-3);
}
.confronto td { display: block; color: var(--text-3); font-size: 0.97rem; line-height: 1.4; }
.confronto td::before {
  content: attr(data-col);
  display: block;
  margin-bottom: 0.15rem;
  font: 500 0.62rem/1.4 var(--f-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}
.confronto td.confronto__si { color: var(--text); font-weight: 600; }
.confronto td.confronto__si::before { color: var(--gold); }

@media (min-width: 760px) {
  .confronto table { display: table; }
  .confronto thead { display: table-header-group; }
  .confronto tbody { display: table-row-group; }
  .confronto tr { display: table-row; padding: 0; }
  .confronto th, .confronto td { display: table-cell; padding: 1.05rem 1.25rem; border-bottom: 1px solid var(--line-soft); vertical-align: top; text-align: left; }
  .confronto tr:last-child th, .confronto tr:last-child td { border-bottom: 0; }
  .confronto td::before { display: none; }
  .confronto thead th {
    font: 500 0.72rem/1.4 var(--f-mono);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-3);
  }
  .confronto thead th.confronto__si { color: var(--gold); }
  .confronto .confronto__si { background: rgb(var(--accent-rgb) / 0.06); }
  .confronto th[scope="row"] { width: 26%; }
}
@media (min-width: 1000px) {
  .rinnovo { grid-template-columns: 1fr 1.05fr; gap: 4rem; align-items: center; }
}

/* ---------- Come funziona: una pista che collega quattro punti ---------- */
.passi__lista { position: relative; display: grid; gap: 2.2rem; padding-left: 2.4rem; }
.passi__lista::before,
.passi__lista::after {
  content: "";
  position: absolute;
  left: 0.56rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 2px;
  background: var(--line-soft);
}
.passi__lista::after {
  background: linear-gradient(var(--gold), var(--led));
  transform: scaleY(var(--traccia, 0));
  transform-origin: 50% 0;
}
.passo { position: relative; }
.passo__nodo {
  position: absolute;
  left: -2.4rem;
  top: 0.15rem;
  z-index: 1;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
  background: var(--bg);
  transition: border-color 0.4s, box-shadow 0.4s, background-color 0.4s;
}
.passo.is-on .passo__nodo {
  border-color: var(--gold);
  background: var(--gold);
  box-shadow: 0 0 0 4px rgb(var(--accent-rgb) / 0.14), 0 0 16px rgb(var(--accent-rgb) / 0.55);
}
.passo__n { color: var(--gold); font: 500 0.74rem/1.4 var(--f-mono); letter-spacing: 0.1em; }
.passo h3 { margin-top: 0.3rem; font: 740 1.5rem/1.1 var(--f-display); font-stretch: 86%; letter-spacing: -0.018em; }
.passo p:last-child { max-width: 26rem; margin-top: 0.45rem; color: var(--text-2); }

@media (min-width: 900px) {
  .passi__lista { grid-template-columns: repeat(4, 1fr); gap: 2rem; padding: 2.6rem 0 0; }
  .passi__lista::before,
  .passi__lista::after { left: 0; right: 0; top: 0.56rem; bottom: auto; width: auto; height: 2px; }
  .passi__lista::after {
    background: linear-gradient(90deg, var(--gold), var(--led));
    transform: scaleX(var(--traccia, 0));
    transform-origin: 0 50%;
  }
  .passo__nodo { left: 0; top: -2.6rem; }
}

/* ---------- Perché scegliermi: sei frasi grandi ---------- */
.motivi { border-top: 1px solid var(--line-soft); }
.motivo {
  display: grid;
  gap: 0.5rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line-soft);
}
.motivo h3 {
  font: 760 clamp(1.9rem, 7.6vw, 4.2rem) / 0.98 var(--f-display);
  font-stretch: 78%;
  letter-spacing: -0.028em;
  transition: color 0.45s var(--ease-out);
}
.motivo p { max-width: 30rem; color: var(--text-2); transition: color 0.45s var(--ease-out); }
.motivo.is-dim h3 { color: rgb(var(--text-rgb) / 0.36); }
.motivo.is-dim p { color: var(--text-3); }
.motivo:not(.is-dim) h3 { color: var(--text); }
.js .motivo:not(.is-dim) h3::after {
  content: "";
  display: inline-block;
  width: 0.24em;
  height: 0.24em;
  margin-left: 0.22em;
  border-radius: 50%;
  background: var(--led);
  box-shadow: 0 0 16px rgb(var(--led-rgb) / 0.8);
  vertical-align: 0.12em;
}
@media (min-width: 900px) {
  .motivo { grid-template-columns: 1.5fr 1fr; align-items: end; gap: 3rem; padding: 1.9rem 0; }
  .motivo p { padding-bottom: 0.5rem; }
}

/* ---------- Galleria e recensioni (visibili solo con contenuti veri) ---------- */
.galleria__lista { display: grid; gap: 1.5rem; }
.lavoro { border: 1px solid var(--line-soft); border-radius: var(--r); background: var(--board); overflow: hidden; }
.lavoro__foto { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; background: var(--bg); }
.lavoro__foto figure { position: relative; }
.lavoro__foto img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.lavoro__foto figcaption {
  position: absolute;
  left: 0.6rem;
  top: 0.6rem;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  background: rgb(var(--bg-rgb) / 0.82);
  font: 500 0.66rem/1.5 var(--f-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.lavoro__testo { padding: 1rem 1.15rem 1.2rem; }
.lavoro__testo h3 { font: 720 1.25rem/1.15 var(--f-display); font-stretch: 86%; }
.lavoro__testo p { margin-top: 0.3rem; color: var(--text-2); font-size: 0.97rem; }

.recensioni__lista { display: grid; gap: 1rem; }
.recensione { padding: 1.4rem; border: 1px solid var(--line-soft); border-radius: var(--r); background: var(--board); }
.recensione blockquote { margin: 0; font-size: 1.08rem; line-height: 1.5; }
.recensione footer { margin-top: 1rem; color: var(--text-3); font: 500 0.72rem/1.4 var(--f-mono); letter-spacing: 0.06em; text-transform: uppercase; }
.recensioni__invito { margin-top: 1.5rem; color: var(--text-2); }
@media (min-width: 760px) {
  .galleria__lista, .recensioni__lista { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- PC su misura ---------- */
.build { display: grid; gap: 2rem; }
.build__view {
  position: relative;
  height: 20rem;
  background: radial-gradient(60% 55% at 50% 52%, rgb(var(--glow-rgb) / 0.4), rgb(var(--glow-rgb) / 0) 72%);
}
.pinned .build__vista {
  position: sticky;
  top: var(--header-h);
  z-index: 2;
  margin-inline: calc(var(--gutter) * -1);
  background: linear-gradient(to bottom, var(--bg) 82%, rgb(var(--bg-rgb) / 0));
}
.pinned .build__view { height: 40vh; height: 40svh; min-height: 15rem; }
.pinned .build__poster { height: 100%; }

.fasce { display: grid; gap: 0.9rem; }
.fascia {
  padding: 1.15rem 1.2rem 1.25rem;
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--gold);
  border-radius: 4px var(--r) var(--r) 4px;
  background: linear-gradient(180deg, var(--board-2), var(--board));
}
.fascia__tag { color: var(--gold); font: 500 0.7rem/1.4 var(--f-mono); letter-spacing: 0.1em; text-transform: uppercase; }
.fascia h3 { margin-top: 0.4rem; font: 740 1.45rem/1.1 var(--f-display); font-stretch: 86%; letter-spacing: -0.018em; }
.fascia p:last-child { margin-top: 0.35rem; color: var(--text-2); font-size: 0.99rem; }
.fascia__spec { margin-top: 0.7rem; color: var(--text-2); font: 400 0.78rem/1.6 var(--f-mono); }

.build__incluso { display: grid; gap: 0.5rem 1.5rem; margin-top: 1.6rem; }
.build__incluso li { display: flex; align-items: center; gap: 0.6rem; font-size: 0.98rem; }
.build__incluso .icon { color: var(--led); stroke-width: 2.4; }
.build__azioni { display: grid; gap: 0.7rem; justify-items: start; margin-top: 1.9rem; }
.build__azioni p { color: var(--text-3); font-size: 0.95rem; }

@media (min-width: 560px) {
  .build__incluso { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1000px) {
  .build { grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }
  .pinned .build__vista { top: calc(var(--header-h) + 1rem); margin: 0; background: none; }
  .build__view,
  .pinned .build__view { height: min(80vh, 46rem); }
}

/* ---------- Domande ---------- */
.faq__lista { max-width: 52rem; border-top: 1px solid var(--line-soft); }
.faq__voce { border-bottom: 1px solid var(--line-soft); }
.faq__voce summary {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 4rem;
  padding: 1rem 3rem 1rem 0;
  font: 700 clamp(1.12rem, 3.4vw, 1.4rem) / 1.2 var(--f-display);
  font-stretch: 88%;
  letter-spacing: -0.012em;
  list-style: none;
  cursor: pointer;
  transition: color 0.2s;
}
.faq__voce summary::-webkit-details-marker { display: none; }
.faq__voce summary::before,
.faq__voce summary::after {
  content: "";
  position: absolute;
  right: 0.45rem;
  top: 50%;
  width: 1rem;
  height: 2px;
  border-radius: 2px;
  background: var(--gold);
  transition: transform 0.35s var(--ease-out);
}
.faq__voce summary::after { transform: rotate(90deg); }
.faq__voce[open] summary::after { transform: rotate(0deg); }
.faq__voce[open] summary { color: var(--gold-2); }
.faq__risposta { overflow: hidden; }
.faq__risposta p { max-width: 42rem; padding: 0 0 1.4rem; color: var(--text-2); }
@media (hover: hover) {
  .faq__voce summary:hover { color: var(--gold-2); }
}

/* ---------- Prenota ---------- */
.prenota { display: grid; gap: 2.2rem; }
.contatti { display: grid; gap: 1.1rem; }
.contatti li { display: flex; gap: 0.9rem; align-items: flex-start; }
.contatti > li > .icon { width: 1.4rem; height: 1.4rem; margin-top: 0.2rem; color: var(--gold); }
.contatti__k { color: var(--text-3); font: 500 0.68rem/1.4 var(--f-mono); letter-spacing: 0.1em; text-transform: uppercase; }
.contatti a,
.copia {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  margin-block: -0.5rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 0.3em;
  cursor: pointer;
  overflow-wrap: anywhere;
}
.copia .icon { width: 1rem; height: 1rem; color: var(--text-3); }
.copia__ok { margin-left: 0.5rem; color: var(--led); font: 500 0.72rem/1.4 var(--f-mono); }

.scheda { padding-bottom: clamp(1.5rem, 4.5vw, 2.6rem); }
.form { display: grid; gap: 1.25rem; margin-top: 1.4rem; }
.form__hp { position: absolute; left: -200vw; width: 1px; height: 1px; overflow: hidden; }
.campo { display: grid; gap: 0.4rem; }
.campo label,
.campo legend { font-weight: 650; font-size: 0.98rem; }
.opz { margin-left: 0.35rem; color: var(--ink-2); font: 400 0.7rem/1 var(--f-mono); letter-spacing: 0.05em; text-transform: uppercase; }
.campo input[type="text"],
.campo select,
.campo textarea {
  width: 100%;
  min-height: 3.1rem;
  padding: 0.75rem 0.9rem;
  border: 1.5px solid rgb(var(--ink-rgb) / 0.42);
  border-radius: 10px;
  background: #fbfcf8;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.4;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.campo textarea { min-height: 5.5rem; resize: vertical; }
.campo select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 2.6rem;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 1.25rem) 55%, calc(100% - 0.9rem) 55%;
  background-size: 0.36rem 0.36rem;
  background-repeat: no-repeat;
}
.campo input[type="text"]:focus-visible,
.campo select:focus-visible,
.campo textarea:focus-visible {
  outline: 0;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgb(var(--ink-rgb) / 0.22);
}
.campo [aria-invalid="true"] { border-color: var(--err); }
.campo__aiuto { color: var(--ink-2); font-size: 0.86rem; }
.campo__errore { color: var(--err); font-size: 0.9rem; font-weight: 600; }

.campo--scelta { gap: 0.55rem; }
.scelta { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.scelta label { position: relative; display: block; font-weight: 600; cursor: pointer; }
.scelta input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.scelta span {
  display: grid;
  place-items: center;
  min-height: 3.1rem;
  padding: 0.5rem 0.6rem;
  border: 1.5px solid rgb(var(--ink-rgb) / 0.42);
  border-radius: 10px;
  background: #fbfcf8;
  font-size: 0.96rem;
  line-height: 1.2;
  text-align: center;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.scelta input:checked + span { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.scelta input:focus-visible + span { box-shadow: 0 0 0 3px rgb(var(--ink-rgb) / 0.3); }

.check { display: grid; grid-template-columns: auto 1fr; gap: 0.75rem; align-items: start; font-weight: 500 !important; font-size: 0.94rem !important; line-height: 1.45; cursor: pointer; }
.check input {
  -webkit-appearance: none;
  appearance: none;
  display: grid;
  place-items: center;
  width: 1.6rem;
  height: 1.6rem;
  margin: 0;
  border: 1.5px solid rgb(var(--ink-rgb) / 0.55);
  border-radius: 6px;
  background: #fbfcf8;
  cursor: pointer;
}
.check input::after {
  content: "";
  width: 0.5rem;
  height: 0.85rem;
  margin-top: -0.2rem;
  border: solid var(--paper);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg) scale(0);
  transition: transform 0.18s var(--ease-out);
}
.check input:checked { background: var(--ink); border-color: var(--ink); }
.check input:checked::after { transform: rotate(45deg) scale(1); }
.check input:focus-visible { outline: 0; box-shadow: 0 0 0 3px rgb(var(--ink-rgb) / 0.3); }
.check a { font-weight: 700; text-underline-offset: 0.2em; }

.form__errori {
  padding: 0.9rem 1rem;
  border: 1.5px solid var(--err);
  border-radius: 10px;
  color: var(--err);
  font-size: 0.94rem;
}
.form__errori p { font-weight: 700; }
.form__errori ul { display: grid; gap: 0.2rem; margin-top: 0.3rem; }
.form__errori a { color: inherit; }
.form__invia { width: 100%; }
.form__invia .icon { transition: transform 0.25s var(--ease-out); }
.form__invia:hover .icon { transform: translateX(4px); }
.form__piccolo { color: var(--ink-2); font: 400 0.74rem/1.5 var(--f-mono); text-align: center; }

.scheda__fatto { display: grid; justify-items: center; gap: 1.6rem; padding: 3rem 0 2rem; text-align: center; }
.scheda__fatto:focus { outline: 0; }
.timbro--grande {
  margin: 0;
  padding: 0.5rem 1.1rem;
  border: 4px double currentColor;
  border-radius: 8px;
  font: 800 clamp(1.5rem, 6vw, 2.2rem) / 1.1 var(--f-display);
  font-stretch: 80%;
  letter-spacing: 0.04em;
  transform: rotate(-6deg);
  animation: timbra 0.5s var(--ease-out) both;
}
@keyframes timbra {
  0% { opacity: 0; transform: rotate(-14deg) scale(1.9); }
  60% { opacity: 1; transform: rotate(-5deg) scale(0.96); }
  100% { opacity: 1; transform: rotate(-6deg) scale(1); }
}
.scheda__grazie { max-width: 26rem; font-size: 1.06rem; }

@media (min-width: 1000px) {
  .prenota { grid-template-columns: 1fr 1.05fr; column-gap: 4.5rem; align-items: start; }
  .prenota__intro { grid-column: 1; }
  .contatti { grid-column: 1; }
  .scheda { grid-column: 2; grid-row: 1 / span 3; }
}

/* ---------- Piè di pagina ---------- */
.footer {
  max-width: var(--max);
  margin-inline: auto;
  padding: 3rem var(--gutter) calc(6.5rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  color: var(--text-2);
}
.footer__top { display: grid; gap: 0.8rem; }
.footer__claim { max-width: 30rem; font-size: 0.98rem; }
.footer__nav { display: flex; flex-wrap: wrap; gap: 0 1.5rem; margin-top: 1.6rem; }
.footer__nav a,
.footer__legale a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--text);
  text-decoration: none;
}
.footer__nav a:hover,
.footer__legale a:hover { color: var(--gold-2); text-decoration: underline; text-underline-offset: 0.3em; }
.footer__legale {
  display: grid;
  gap: 0.2rem;
  margin-top: 1.4rem;
  padding-top: 1.3rem;
  border-top: 1px solid var(--line-soft);
  color: var(--text-3);
  font-size: 0.9rem;
}
.footer__nota { font: 400 0.74rem/1.5 var(--f-mono); }
@media (min-width: 760px) {
  .footer { padding-bottom: 3rem; }
  .footer__legale { grid-template-columns: 1fr auto; align-items: center; column-gap: 2rem; }
  .footer__nota { grid-column: 1 / -1; }
}

/* ---------- Barra fissa su telefono ---------- */
.dock {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 40;
  display: flex;
  gap: 0.6rem;
  padding: 0.6rem var(--gutter) calc(0.6rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgb(var(--bg-rgb) / 0.94);
  transform: translateY(110%);
  transition: transform 0.4s var(--ease-out);
}
.dock.is-on { transform: none; }
.dock .btn--primary { flex: 1; }
@media (min-width: 760px) {
  .dock { display: none !important; }
}

/* ---------- Pagine legali ---------- */
.legale { max-width: 46rem; margin-inline: auto; padding: calc(var(--header-h) + 3rem) var(--gutter) 5rem; }
.legale h1 {
  margin-top: 0.9rem;
  font: 760 clamp(2.2rem, 8vw, 3.6rem) / 0.98 var(--f-display);
  font-stretch: 82%;
  letter-spacing: -0.026em;
}
.legale h2 { margin: 2.6rem 0 0.7rem; font: 720 1.5rem/1.15 var(--f-display); font-stretch: 86%; letter-spacing: -0.015em; }
.legale p, .legale li { color: var(--text-2); }
.legale p + p { margin-top: 0.9rem; }
.legale ul { display: grid; gap: 0.45rem; margin-top: 0.7rem; padding-left: 1.2rem; list-style: disc; }
.legale a { color: var(--gold-2); text-underline-offset: 0.25em; }
.legale strong { color: var(--text); }
.legale__data { margin-top: 1rem; color: var(--text-3); font: 500 0.74rem/1.5 var(--f-mono); letter-spacing: 0.06em; text-transform: uppercase; }
.legale__da-fare {
  margin-top: 1.5rem;
  padding: 1rem 1.15rem;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  color: var(--gold-2) !important;
  font: 400 0.84rem/1.6 var(--f-mono);
}
.legale mark { padding: 0.05em 0.3em; border-radius: 4px; background: rgb(var(--accent-rgb) / 0.2); color: var(--gold-2); }
.legale .btn { margin-top: 2.5rem; }

/* ==========================================================================
   Entrate in scena (solo con JavaScript; chi preferisce meno movimento
   vede tutto subito, senza spostamenti)
   ========================================================================== */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease-out), transform 0.8s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

.js [data-paper] {
  opacity: 0;
  transform: perspective(1400px) rotateX(12deg) translateY(46px);
  transition: opacity 0.6s var(--ease-out), transform 1s var(--ease-out);
}
.js [data-paper].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
  .js [data-reveal], .js [data-paper] { opacity: 1; transform: none; }
  .pcard { transform: none !important; }
}
.motion-paused .stage__hint .icon { animation: none; }

/* ==========================================================================
   STILE "PRO" (prova) — testi più sobri e da professionista.
   Si attiva/disattiva in assets/js/boot.js (STILE = 'pro' oppure 'classico').
   Per confrontare al volo: aggiungi ?stile=classico all'indirizzo del sito.
   ========================================================================== */
:is([data-stile="pro"], [data-stile="futuro"]) {
  /* un solo carattere, largo e pulito, per titoli ed etichette */
  --f-display: var(--f-body);
  --f-mono: var(--f-body);
}

/* titoli: peso deciso ma non "urlato", proporzioni normali, niente schiacciato */
:is([data-stile="pro"], [data-stile="futuro"]) :is(.hero__title, .panel__title, .section h2, .motivo h3, .legale h1) {
  font-weight: 650;
  font-stretch: 100%;
  letter-spacing: -0.03em;
  line-height: 1.06;
}
:is([data-stile="pro"], [data-stile="futuro"]) :is(.pcard h3, .voce h3, .passo h3, .fascia h3, .lavoro__testo h3, .legale h2, .menu__nav a, .faq__voce summary, .timbro--grande) {
  font-weight: 650;
  font-stretch: 100%;
  letter-spacing: -0.015em;
}

:is([data-stile="pro"], [data-stile="futuro"]) .hero__title { font-size: clamp(2rem, 8vw, 4.4rem); }
:is([data-stile="pro"], [data-stile="futuro"]).pinned .hero__title { font-size: clamp(1.95rem, 7.6vw, 2.8rem); }
:is([data-stile="pro"], [data-stile="futuro"]) .panel__title { font-size: clamp(1.7rem, 6.2vw, 3rem); }
:is([data-stile="pro"], [data-stile="futuro"]) .section h2 { font-size: clamp(1.9rem, 6.2vw, 3.5rem); }
:is([data-stile="pro"], [data-stile="futuro"]) .motivo h3 { font-size: clamp(1.55rem, 5.6vw, 3rem); }
:is([data-stile="pro"], [data-stile="futuro"]) .legale h1 { font-size: clamp(2rem, 7vw, 3.1rem); }
@media (min-width: 1000px) and (min-aspect-ratio: 1/1) {
  :is([data-stile="pro"], [data-stile="futuro"]).pinned .hero__title { font-size: clamp(2.8rem, 4.4vw, 4.4rem); }
}

/* etichette piccole: maiuscolo spaziato, niente effetto "macchina da scrivere" */
:is([data-stile="pro"], [data-stile="futuro"]) :is(.eyebrow, .panel__kicker, .hero__proof, .pcard__go, .paper__head, .voce__cta,
  .rinnovo__prezzo, .confronto th, .confronto td::before, .passo__n, .fascia__tag, .contatti__k,
  .legale__data, .rail button, .stage__hint, .tool-btn, .callout) {
  font-weight: 600;
  letter-spacing: 0.08em;
}
:is([data-stile="pro"], [data-stile="futuro"]) :is(.hero__proof, .stage__hint, .tool-btn, .callout) { letter-spacing: 0.01em; }
:is([data-stile="pro"], [data-stile="futuro"]) :is(.paper__foot, .form__piccolo, .footer__nota, .voce__nota, .fascia__spec) {
  font-size: 0.86rem;
  letter-spacing: 0;
}
:is([data-stile="pro"], [data-stile="futuro"]) .legale__da-fare { font-size: 0.92rem; }

/* le parti "tecniche" restano in carattere da strumento: lettura diagnostica e cifre del listino */
:is([data-stile="pro"], [data-stile="futuro"]) :is(.hud, .voce__prezzo) { font-family: "IBM Plex Mono", ui-monospace, Consolas, monospace; }

/* marchio: nome pulito su una riga, firma discreta sotto */
:is([data-stile="pro"], [data-stile="futuro"]) .brand__name {
  font-weight: 650;
  font-size: 1.04rem;
  letter-spacing: -0.012em;
}
:is([data-stile="pro"], [data-stile="futuro"]) .brand__name span { color: var(--text); font-weight: 400; }
:is([data-stile="pro"], [data-stile="futuro"]) .brand__by {
  font-weight: 500;
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-3);
}

/* ==========================================================================
   STILE "FUTURO" — carattere tecnologico ma leggibile (Space Grotesk) su tutto.
   Usa le stesse misure dello stile "pro", cambia solo il carattere e il marchio.
   ========================================================================== */
[data-stile="futuro"] {
  --f-body: "Space Grotesk", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --f-display: var(--f-body);
  --f-mono: var(--f-body);
}
[data-stile="futuro"] body { letter-spacing: -0.005em; }
[data-stile="futuro"] :is(.hero__title, .panel__title, .section h2, .motivo h3, .legale h1) {
  font-weight: 600;
  letter-spacing: -0.035em;
}
[data-stile="futuro"] :is(.pcard h3, .voce h3, .passo h3, .fascia h3, .lavoro__testo h3, .legale h2, .menu__nav a, .faq__voce summary, .timbro--grande) {
  font-weight: 600;
  letter-spacing: -0.02em;
}
[data-stile="futuro"] .btn { font-weight: 600; letter-spacing: 0; }
/* marchio: tutto maiuscolo e spaziato, come la targhetta di uno strumento */
[data-stile="futuro"] .brand__name {
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
[data-stile="futuro"] .brand__name span { font-weight: 400; color: var(--text-2); }
[data-stile="futuro"] .brand__by { letter-spacing: 0.22em; color: var(--gold); opacity: 0.85; }

/* ==========================================================================
   TEMA "NOTTE" — blu notte, azzurro elettrico e riflessi viola.
   Si sceglie in assets/js/boot.js (TEMA = 'notte' oppure 'verde').
   Per confrontare al volo: aggiungi ?tema=verde all'indirizzo del sito.
   ========================================================================== */
[data-tema="notte"] {
  --bg: #050810;
  --bg-2: #080d19;
  --board: #0b1424;
  --board-2: #111d33;
  --mask: #3b5bff;
  --led: #3fe0ff;
  --gold: #57d6ff;
  --gold-2: #a8eeff;
  --gold-ink: #021018;
  --hot: #ff6b6b;

  --text: #edf3fb;
  --text-2: #aebbd0;
  --text-3: #8492aa;

  --paper: #eef2f8;
  --paper-2: #e1e8f3;
  --ink: #0b1426;
  --ink-2: #45526a;
  --stamp: #1f5fd6;

  --accent-rgb: 87 214 255;
  --bg-rgb: 5 8 16;
  --ink-rgb: 11 20 38;
  --glow-rgb: 110 92 255;
  --led-rgb: 63 224 255;
  --text-rgb: 237 243 251;
  --board2-rgb: 17 29 51;
  --board-rgb: 11 20 36;
}

/* bottone principale: luce azzurra che sfuma nel blu */
[data-tema="notte"] .btn--primary {
  --btn-bg: linear-gradient(135deg, #7ff0ff 0%, #57d6ff 45%, #4a8dff 100%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.45), inset 0 -3px 0 rgb(0 0 0 / 0.18),
    0 12px 30px -12px rgb(87 214 255 / 0.7), 0 0 0 1px rgb(127 240 255 / 0.25);
}
@media (hover: hover) {
  [data-tema="notte"] .btn--primary:hover {
    --btn-bg: linear-gradient(135deg, #a8f6ff 0%, #7ff0ff 45%, #6aa3ff 100%);
  }
}

/* parole in evidenza nei titoli: sfumatura azzurro → viola */
[data-tema="notte"] :is(.hero__title em, .section h2 em) {
  background: linear-gradient(90deg, #7ff0ff 0%, #57d6ff 40%, #8f7bff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* alone dietro al PC: blu e viola invece del verde */
[data-tema="notte"].pinned .stage__sticky::before {
  background: radial-gradient(58% 44% at 50% 30%, rgb(70 110 255 / 0.32), rgb(70 110 255 / 0) 72%);
}
@media (min-width: 1000px) and (min-aspect-ratio: 1/1) {
  [data-tema="notte"].pinned .stage__sticky::before {
    background:
      radial-gradient(34% 46% at 72% 46%, rgb(87 214 255 / 0.22), rgb(87 214 255 / 0) 70%),
      radial-gradient(44% 58% at 64% 58%, rgb(110 92 255 / 0.26), rgb(110 92 255 / 0) 72%);
  }
}

/* schede: bordo che si accende in azzurro, riflesso freddo */
[data-tema="notte"] .pcard,
[data-tema="notte"] .fascia {
  background: linear-gradient(180deg, rgb(17 29 51 / 0.92), rgb(11 20 36 / 0.92));
}
[data-tema="notte"] .fascia { border-left-color: #57d6ff; }
@media (hover: hover) {
  [data-tema="notte"] .pcard:hover { box-shadow: 0 24px 40px -28px rgb(0 0 0 / 0.9), 0 0 0 1px rgb(87 214 255 / 0.25), 0 0 30px -12px rgb(87 214 255 / 0.5); }
}

/* sfondo: una linea di luce sottile in cima alle sezioni */
[data-tema="notte"] .section::before {
  content: "";
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, rgb(87 214 255 / 0), rgb(87 214 255 / 0.35), rgb(143 123 255 / 0.35), rgb(143 123 255 / 0));
}
[data-tema="notte"] .problemi::before { display: none; }
