/* =========================================================
   Domea · foglio di stile

   La pagina è statica di base. Le scene legate allo scorrimento
   si attivano con due classi su <html>, messe da boot.js:
     .pin  JavaScript attivo e schermo abbastanza alto: scene
           "Una giornata" ed "Energia" bloccate durante lo scroll
     .fx   come .pin, ma senza "riduci movimento": anche hero,
           manifesto, binario delle soluzioni e privacy
   Senza classi (niente JS, schermo basso, meno movimento) ogni
   sezione è un blocco normale, leggibile e senza tagli.

   Animazioni: ease-out forte per le entrate, uscite più rapide
   delle entrate, solo transform e opacity.
   ========================================================= */

:root {
  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --paper: #ffffff;
  --paper-2: #f5f5f7;
  --night: #000000;
  --light: #f5f5f7;
  --light-2: #a1a1a6;
  --warm: #ffb547;
  --warm-ink: #995200;
  --blue: #0a84ff;
  --line-dark: rgba(255, 255, 255, 0.12);
  --line-light: rgba(0, 0, 0, 0.1);

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --nav-h: 52px;
  --vh: 100vh;
  color-scheme: dark;
}
@supports (height: 100svh) {
  :root { --vh: 100svh; }
}

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

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: var(--nav-h);
}

body {
  margin: 0;
  font: 400 1.0625rem/1.5 var(--font);
  color: var(--light);
  background: var(--night);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-optical-sizing: auto;
  overflow-x: clip;
}

img, svg { display: block; }
button, input, textarea { font: inherit; color: inherit; }
a { color: inherit; -webkit-tap-highlight-color: transparent; }
button { -webkit-tap-highlight-color: transparent; }
h1, h2, h3, p, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }

/* Le icone dello sprite sono a tratto */
svg use { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
a:focus-visible, summary:focus-visible { border-radius: 6px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: fixed; left: 12px; top: 12px; z-index: 100;
  padding: 10px 16px; border-radius: 999px;
  background: var(--light); color: var(--ink); text-decoration: none;
  transform: translateY(-160%);
  transition: transform 200ms var(--ease-out);
}
.skip:focus-visible { transform: none; }

.wrap { width: min(1120px, 100% - 48px); margin-inline: auto; }
.wrap-narrow { width: min(780px, 100% - 48px); }

/* ---------- Tipografia: tracking e interlinea legati alla dimensione ---------- */
.display {
  font-size: clamp(3rem, min(9vw, 15vh), 7.25rem);
  line-height: 1;
  letter-spacing: -0.045em;
  font-weight: 700;
}
.h2 {
  font-size: clamp(2.25rem, min(5.2vw, 9.5vh), 4.5rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 700;
  text-wrap: balance;
}
.body {
  font-size: clamp(1.0625rem, 1.3vw, 1.25rem);
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: var(--light-2);
  text-wrap: pretty;
}
.eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--warm);
  margin-bottom: 18px;
}
.eyebrow-dark { color: var(--warm-ink); }
.lede {
  font-size: clamp(1.125rem, 1.6vw, 1.375rem);
  line-height: 1.45;
  letter-spacing: -0.012em;
  color: var(--light-2);
  max-width: 34em;
  text-wrap: pretty;
}

/* ---------- Pulsanti ---------- */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px;
  border: 0; border-radius: 999px;
  background: var(--light); color: var(--ink);
  font-weight: 600; font-size: 1rem; letter-spacing: -0.01em;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  user-select: none; -webkit-user-select: none;
  transition: transform 160ms var(--ease-out), background-color 200ms ease, box-shadow 200ms ease;
}
.btn:active { transform: scale(0.97); }
.btn-small { min-height: 34px; padding: 0 14px; font-size: 0.875rem; }
/* area di tocco di almeno 44px anche per il pulsante piccolo */
.btn-small::after { content: ""; position: absolute; inset: -6px 0; }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, 0.45); }
.btn-block { width: 100%; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: #ffffff; box-shadow: 0 8px 30px rgba(255, 181, 71, 0.25); }
  .btn-ghost:hover { background: rgba(0, 0, 0, 0.05); box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, 0.7); }
}

.link-arrow {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px;
  color: var(--light); text-decoration: none; font-weight: 500;
}
.link-arrow svg { width: 18px; height: 18px; transition: transform 200ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .link-arrow:hover svg { transform: translateX(3px); }
}

/* ---------- Navigazione: materiale traslucido ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--nav-h);
  /* abbastanza opaco da restare leggibile anche sopra le sezioni chiare */
  background: rgba(18, 18, 20, 0.8);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.nav-inner {
  height: 100%;
  width: min(1120px, 100% - 32px); margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  text-decoration: none; font-weight: 700; font-size: 1.1875rem; letter-spacing: -0.03em;
}
.brand-mark { width: 24px; height: 24px; flex: none; }
.brand-mark circle { fill: var(--warm); }
.nav-links { display: flex; gap: 28px; }
.nav-links a {
  display: inline-flex; align-items: center; min-height: 44px;
  font-size: 0.8125rem; letter-spacing: -0.005em; text-decoration: none;
  color: rgba(245, 245, 247, 0.86);
  transition: color 200ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .nav-links a:hover { color: #ffffff; }
}
.nav-actions { display: flex; align-items: center; gap: 4px; }
.menu-btn {
  display: none;
  position: relative; width: 44px; height: 44px;
  border: 0; background: transparent; cursor: pointer; border-radius: 12px;
}
.menu-btn i {
  position: absolute; left: 13px; right: 13px; top: 50%; height: 1.5px; margin-top: -0.75px;
  border-radius: 2px; background: currentColor;
  transition: transform 240ms var(--ease-out);
}
.menu-btn i:first-of-type { transform: translateY(-3.5px); }
.menu-btn i:last-of-type { transform: translateY(3.5px); }
.menu-btn[aria-expanded="true"] i:first-of-type { transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] i:last-of-type { transform: rotate(-45deg); }
.menu {
  position: absolute; left: 0; right: 0; top: 100%;
  max-height: calc(var(--vh) - var(--nav-h)); overflow-y: auto;
  padding: 8px 24px 20px;
  background: rgba(16, 16, 18, 0.96);
  -webkit-backdrop-filter: saturate(180%) blur(30px);
  backdrop-filter: saturate(180%) blur(30px);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transform-origin: top;
  opacity: 0; transform: translateY(-8px);
  visibility: hidden;
  /* uscita più rapida dell'entrata */
  transition: opacity 150ms ease-out, transform 150ms ease-out, visibility 0s linear 150ms;
}
.menu.is-open {
  opacity: 1; transform: none; visibility: visible;
  transition: opacity 240ms var(--ease-out), transform 240ms var(--ease-out), visibility 0s;
}
.menu a {
  display: block; padding: 12px 0;
  font-size: 1.375rem; font-weight: 600; letter-spacing: -0.02em; text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.menu li:last-child a { border-bottom: 0; }
@media (min-width: 821px) {
  .menu { display: none; }
}
@media (max-width: 820px) {
  .nav-inner > nav { display: none; }
  .menu-btn { display: block; }
}
@media (max-width: 380px) {
  .hide-xs { display: none; }
}

/* ---------- Scene: statiche di base, bloccate con .fx / .pin ---------- */
.scene, .sticky { position: relative; }
:is(.fx .hero, .fx .statement, .fx .features, .fx .privacy, .pin .day, .pin .energy) {
  /* l'ancora porta all'inizio della scena, sotto la barra di navigazione */
  scroll-margin-top: calc(-1 * var(--nav-h));
}
:is(.fx .hero, .fx .statement, .fx .features, .fx .privacy, .pin .day, .pin .energy) > .sticky {
  position: sticky; top: 0;
  height: var(--vh);
  overflow: hidden;
}
.fx .hero { height: 280vh; }
.fx .statement { height: 240vh; }
.fx .privacy { height: 260vh; }
.pin .day { height: 600vh; }
.pin .energy { height: 240vh; }

/* ---------- HERO ---------- */
.hero { background: var(--night); }
.hero .sticky {
  overflow: clip;
  padding: calc(var(--nav-h) + clamp(40px, 9vh, 110px)) 0 clamp(72px, 12vh, 140px);
}
.hero-glow {
  position: absolute; left: 50%; top: 62%;
  width: 120vmax; height: 120vmax;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(255, 170, 70, 0.22), rgba(255, 120, 40, 0.06) 45%, transparent 70%);
  pointer-events: none;
}
.hero-copy {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  padding: 0 24px;
}
.hero-copy .display { margin-bottom: 22px; }
.ctas {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 28px;
  margin-top: 30px;
}
.device-stage {
  position: relative;
  width: min(1040px, 88vw);
  margin: clamp(48px, 8vh, 96px) auto 0;
}
.device {
  padding: clamp(6px, 1.1vw, 14px);
  border-radius: clamp(18px, 3vw, 38px);
  background: linear-gradient(160deg, #3a3a3e, #121214 40%, #2a2a2e);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.1) inset,
    0 50px 120px -30px rgba(0, 0, 0, 0.9),
    0 30px 80px -40px rgba(255, 160, 60, 0.35);
}
.device-caption {
  margin-top: clamp(20px, 4vh, 40px);
  padding-inline: 8px;
  text-align: center;
  font-size: clamp(1.25rem, 2.4vw, 2rem);
  font-weight: 600; letter-spacing: -0.025em; line-height: 1.2;
  text-wrap: balance;
}
.device-caption span { color: var(--light-2); }

/* hero bloccato: il testo sfuma e la dashboard sale raddrizzandosi */
.fx .hero .sticky { padding: 0; }
.fx .hero-glow { opacity: 0.35; }
.fx .hero-copy {
  position: absolute; inset: 0;
  padding: calc(var(--nav-h) + clamp(28px, 9vh, 120px)) 24px 0;
  will-change: transform, opacity;
}
.fx .device-stage {
  position: absolute; left: 50%; top: calc(50% + var(--nav-h) / 2);
  /* la larghezza dipende anche dall'altezza: dashboard e didascalia devono stare sotto la barra */
  width: min(1200px, 88vw, (var(--vh) - var(--nav-h) - 190px) * 1.6);
  margin: 0;
  transform: translate(-50%, -50%);
  perspective: 1800px;
  pointer-events: none;
}
.fx .device {
  pointer-events: auto;
  transform-origin: 50% 100%;
  /* stato iniziale, prima che main.js prenda il controllo */
  transform: translate3d(0, 60vh, 0) rotateX(30deg) scale(0.84);
  will-change: transform;
}
.fx .device-caption { opacity: 0; }
@media (max-height: 620px) {
  /* schermi bassi: meno aria sopra e tra gli elementi, così il testo sta tutto sopra la dashboard */
  .fx .hero-copy { padding-top: calc(var(--nav-h) + 20px); }
  .fx .hero-copy .display { margin-bottom: 14px; }
  .fx .ctas { margin-top: 20px; }
}

/* la dashboard di esempio: le misure seguono la larghezza dello schermo del dispositivo */
.screen {
  container-type: inline-size;
  aspect-ratio: 16 / 10;
  border-radius: clamp(12px, 2.2vw, 26px);
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(255, 181, 71, 0.12), transparent 50%),
    radial-gradient(100% 90% at 100% 100%, rgba(10, 132, 255, 0.14), transparent 50%),
    #0e0f12;
  padding: 3.2cqw 3.4cqw;
  display: flex; flex-direction: column; gap: 2.2cqw;
  color: var(--light);
}
.dash-top { display: flex; justify-content: space-between; align-items: flex-start; }
.dash-hello { font-size: 3cqw; font-weight: 700; letter-spacing: -0.035em; line-height: 1.1; }
.dash-sub { font-size: 1.45cqw; color: var(--light-2); margin-top: 0.5cqw; }
.dash-clock { font-size: 2.6cqw; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: var(--light-2); }
.dash-grid {
  flex: 1; min-height: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 1.4cqw;
}
.tile {
  position: relative;
  display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end;
  gap: 0.4cqw;
  min-width: 0;
  padding: 1.6cqw;
  border-radius: 2cqw;
  border: 0;
  text-align: left;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  overflow: hidden;
  transition: background-color 250ms ease, color 250ms ease, transform 160ms var(--ease-out), box-shadow 250ms ease;
}
.tile-label { font-size: 1.45cqw; font-weight: 600; letter-spacing: -0.01em; display: flex; align-items: center; gap: 0.5cqw; }
.tile-label svg { width: 1.6cqw; height: 1.6cqw; }
.tile-meta { font-size: 1.2cqw; color: var(--light-2); line-height: 1.3; }
.tile-big { font-size: 3.6cqw; font-weight: 700; letter-spacing: -0.04em; line-height: 1; }
.tile-big span { font-size: 1.6cqw; color: var(--light-2); font-weight: 600; letter-spacing: 0; }
.tile-icon {
  position: absolute; top: 1.4cqw; left: 1.4cqw;
  width: 3.4cqw; height: 3.4cqw; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.1);
  transition: background-color 250ms ease, color 250ms ease, box-shadow 250ms ease;
}
.tile-icon svg { width: 1.9cqw; height: 1.9cqw; }
.ring { position: absolute; top: 1.2cqw; right: 1.2cqw; width: 6.4cqw; aspect-ratio: 1; }
.ring svg { width: 100%; height: 100%; }
.ring svg:first-child { transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 9; }
.ring-track { stroke: rgba(255, 255, 255, 0.08); }
.ring-fill {
  stroke: #ff8a3d;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 0.36;
  filter: drop-shadow(0 0 4px rgba(255, 138, 61, 0.6));
}
.ring .ring-icon { position: absolute; inset: 28%; width: 44%; height: 44%; color: #ff9f5a; }
.tile-toggle { cursor: pointer; }
.tile-toggle:active { transform: scale(0.96); }
.tile-toggle:focus-visible { outline-offset: -3px; }
.tile-state { font-size: 1.2cqw; color: var(--light-2); transition: color 250ms ease; }
.tile-toggle[aria-pressed="true"] {
  background: rgba(255, 196, 110, 0.95);
  color: #2a1700;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3), 0 0 3cqw rgba(255, 170, 60, 0.35);
}
.tile-toggle[aria-pressed="true"] .tile-state { color: rgba(42, 23, 0, 0.78); }
.tile-toggle[aria-pressed="true"] .tile-icon { background: #fff4df; color: #c46a00; box-shadow: 0 0 1.6cqw rgba(255, 220, 160, 0.9); }
.bars { display: flex; align-items: flex-end; gap: 0.5cqw; height: 4cqw; width: 100%; margin: 0.6cqw 0; }
.bars i {
  flex: 1; height: 100%; border-radius: 0.4cqw;
  background: linear-gradient(#ffd25a, #ff9f0a);
  transform-origin: bottom; transform: scaleY(var(--h));
  opacity: 0.9;
}
.tile-secure .tile-icon { background: rgba(52, 199, 89, 0.18); color: #4cd964; }
.slider { width: 100%; height: 1.6cqw; border-radius: 1cqw; background: rgba(255, 255, 255, 0.1); overflow: hidden; margin: 0.4cqw 0; }
.slider i { display: block; height: 100%; width: 100%; background: rgba(255, 255, 255, 0.85); border-radius: inherit; transform-origin: left; transform: scaleX(0.6); }
.tile-music .tile-icon { background: rgba(255, 55, 95, 0.18); color: #ff6482; }
.eq { position: absolute; right: 1.6cqw; top: 1.8cqw; display: flex; align-items: flex-end; gap: 0.35cqw; height: 2.4cqw; }
.eq i { width: 0.45cqw; height: 100%; border-radius: 0.3cqw; background: #ff6482; transform-origin: bottom; animation: eq 1.1s ease-in-out infinite alternate; }
.eq i:nth-child(2) { animation-delay: -0.4s; }
.eq i:nth-child(3) { animation-delay: -0.8s; }
.eq i:nth-child(4) { animation-delay: -0.2s; }
@keyframes eq { from { transform: scaleY(0.25); } to { transform: scaleY(1); } }

/* ---------- MANIFESTO ---------- */
.statement { background: var(--night); }
.statement .sticky { display: grid; place-items: center; padding: clamp(96px, 16vh, 160px) 0; }
.fx .statement .sticky { padding: var(--nav-h) 0 0; }
.statement-text {
  width: min(1000px, 100% - 48px);
  font-size: clamp(1.75rem, min(4.6vw, 7.5vh), 3.75rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-weight: 700;
  text-wrap: balance;
}
.fx .statement-text .w { opacity: 0.16; }

/* ---------- UNA GIORNATA ---------- */
.day { background: #04060d; }
.day .sticky { overflow: hidden; }
.sky { position: absolute; inset: 0; background: linear-gradient(#0b1030, #3a2c4a); }
.sky i { position: absolute; inset: 0; }
.sky i + i { opacity: 0; will-change: opacity; }
.stars {
  position: absolute; inset: 0 0 35% 0;
  background-image:
    radial-gradient(1.2px 1.2px at 12% 18%, #fff, transparent),
    radial-gradient(1px 1px at 27% 42%, #fff, transparent),
    radial-gradient(1.4px 1.4px at 41% 12%, #fff, transparent),
    radial-gradient(1px 1px at 55% 33%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 68% 8%, #fff, transparent),
    radial-gradient(1px 1px at 79% 26%, #fff, transparent),
    radial-gradient(1.3px 1.3px at 88% 14%, #fff, transparent),
    radial-gradient(1px 1px at 93% 44%, #fff, transparent),
    radial-gradient(1px 1px at 6% 52%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 35% 60%, #fff, transparent),
    radial-gradient(1px 1px at 62% 55%, #fff, transparent);
  opacity: 0.8;
}
.orbit { display: none; position: absolute; left: 62%; bottom: -8%; width: 0; height: 0; }
.pin .orbit { display: block; }
.arm { position: absolute; left: 0; top: 0; width: 0; height: 0; will-change: transform; }
.sun, .moon {
  position: absolute; left: 0; top: 0;
  border-radius: 50%;
  transform: translateY(calc(-1 * min(78vh, 52vw)));
}
.sun {
  width: 90px; height: 90px;
  margin: -45px 0 0 -45px;
  background: radial-gradient(circle, #fff7d6 0 38%, #ffd36b 40%, rgba(255, 196, 80, 0.35) 55%, transparent 70%);
}
.moon {
  width: 46px; height: 46px;
  margin: -23px 0 0 -23px;
  background: radial-gradient(circle at 35% 35%, #fbfbf4, #d9d9cf 60%);
  box-shadow: 0 0 40px rgba(220, 225, 255, 0.35);
}

.day-layout {
  position: relative;
  width: min(1240px, 100% - 48px); margin-inline: auto;
  display: grid; gap: 40px;
  padding-top: calc(var(--nav-h) + 56px);
}
.day-panel {
  position: relative;
  width: min(100%, 720px); margin-inline: auto;
  padding: 28px 28px 24px;
  border-radius: 28px;
  background: rgba(10, 12, 20, 0.5);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  backdrop-filter: blur(24px) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 30px 60px -30px rgba(0, 0, 0, 0.6);
}
.day-title { font-size: clamp(1.5rem, 2.4vw, 2.125rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.clock {
  display: none;
  margin: 14px 0 6px;
  font-size: clamp(3.25rem, min(7vw, 13vh), 6rem);
  font-weight: 700; letter-spacing: -0.05em; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.captions { display: grid; gap: 22px; margin-top: 22px; }
.caption-time {
  display: block; margin-bottom: 2px;
  font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.06em; font-variant-numeric: tabular-nums;
  color: rgba(245, 245, 247, 0.7);
}
.caption h3 { font-size: 1.25rem; letter-spacing: -0.02em; margin-bottom: 6px; color: #ffd28a; }
.caption p { color: rgba(245, 245, 247, 0.9); line-height: 1.5; }
.dots { display: none; gap: 6px; margin-top: 14px; }
.dots i {
  width: 6px; height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.3);
  transform-origin: left;
  transition: width 300ms var(--ease-out), background-color 300ms ease;
}
.dots i.is-active { width: 22px; background: #ffffff; }

.house-wrap { position: relative; }
.house-box { position: relative; width: min(100%, 600px); margin-inline: auto; }
.house { width: 100%; height: auto; overflow: visible; }
.house .tree { fill: #0c1411; }
.house .roof { fill: #16181f; stroke: #2a2e38; stroke-width: 2; stroke-linejoin: round; }
.house .panel { fill: #18263d; }
.house .panel-glow { fill: #ffd36b; opacity: 0; }
.house .panel-lines { stroke: rgba(255, 255, 255, 0.18); stroke-width: 1.5; fill: none; }
.house .shell { fill: #121419; stroke: #2a2e38; stroke-width: 2; }
.house .room { fill: #191b21; }
.house .win { fill: #23305e; }
.house .daylight { fill: #cfe4ff; opacity: 0; }
.house .blind { fill: #2b2f39; transform-box: fill-box; transform-origin: 50% 0; }
.house .frame { fill: none; stroke: #3a3f4b; stroke-width: 3; }
.house .lamp { fill: #3a3f4b; stroke: #3a3f4b; stroke-width: 2; stroke-linejoin: round; }
.house [data-light] { opacity: 0; }
.house .furn { fill: #262932; }
.house .furn-l { fill: #343844; }
.house .slab { fill: #262a33; }
.house .robot { fill: #3a3f4b; }
.house .robot-led { fill: #34c759; }
.house .steam { fill: rgba(255, 255, 255, 0.5); opacity: 0; }
.house .car { fill: #1f232b; }
.house .car circle { fill: #0b0c0f; stroke: #2a2e38; stroke-width: 2; }
.house .charge { fill: none; stroke: #34c759; stroke-width: 3; stroke-linecap: round; opacity: 0; filter: drop-shadow(0 0 6px #34c759); }

.chips { position: absolute; inset: 0; pointer-events: none; }
.chip {
  position: absolute; left: var(--x); top: var(--y);
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px 7px 9px;
  border-radius: 999px;
  font-size: 0.8125rem; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap;
  color: #1d1d1f;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5), inset 0 0 0 0.5px rgba(255, 255, 255, 0.6);
  opacity: 0;
  transform: translate(-50%, -50%) translateY(10px) scale(0.94);
  transition: opacity 160ms ease-out, transform 200ms ease-out;
}
.chip svg { width: 16px; height: 16px; color: var(--warm-ink); }
.chip.is-on {
  opacity: 1;
  transform: translate(-50%, -50%);
  transition: opacity 300ms var(--ease-out), transform 460ms var(--ease-out);
}
.chip.is-on:nth-of-type(3n + 2) { transition-delay: 60ms; }
.chip.is-on:nth-of-type(3n) { transition-delay: 120ms; }

/* giornata bloccata: orologio che scorre, una didascalia alla volta */
.pin .day .sticky { height: 100lvh; } /* il cielo copre anche lo spazio liberato dalla barra del browser */
.pin .day-layout {
  height: var(--vh);
  grid-template-columns: minmax(300px, 0.8fr) 1.2fr; align-items: center;
  padding-top: var(--nav-h);
}
.pin .day-panel { width: auto; margin: 0; }
.pin .clock { display: block; }
.pin .dots { display: flex; }
.pin .captions { gap: 0; margin-top: 0; }
.pin .caption-time { display: none; }
.pin .caption {
  grid-area: 1 / 1; /* sovrapposte: l'altezza è quella della più lunga */
  opacity: 0;
  transform: translateY(12px);
  filter: blur(4px);
  pointer-events: none;
  transition: opacity 200ms ease-out, transform 200ms ease-out, filter 200ms ease-out;
}
.pin .caption.is-active {
  opacity: 1; transform: none; filter: none;
  pointer-events: auto;
  transition: opacity 500ms var(--ease-out) 80ms, transform 500ms var(--ease-out) 80ms, filter 500ms var(--ease-out) 80ms;
}
.pin .house-wrap {
  align-self: stretch; min-height: 0;
  container-type: size;
  display: flex; align-items: flex-end; justify-content: flex-end;
}
/* la casa occupa tutto lo spazio che ha, in larghezza o in altezza, e poggia sul bordo inferiore */
.pin .house-box { width: min(100cqw, (100cqh - 16px) * 640 / 560); margin: 0; }

@media (max-width: 860px) {
  .chip { font-size: 0.6875rem; padding: 5px 9px 5px 7px; gap: 4px; }
  .chip svg { width: 13px; height: 13px; }
  .day-panel { padding: 18px 18px 16px; border-radius: 22px; }
  .pin .day-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 12px;
    padding-bottom: max(16px, env(safe-area-inset-bottom));
  }
  .pin .house-wrap { order: -1; justify-content: center; }
  .pin .clock { font-size: clamp(2.25rem, 7.5vh, 2.75rem); margin: 4px 0 2px; }
  .pin .day-title { font-size: 1.0625rem; }
  .pin .caption h3 { font-size: 1.125rem; margin-bottom: 4px; }
  .pin .caption p { font-size: 0.9375rem; line-height: 1.45; }
  .pin .dots { margin-top: 10px; }
  .pin .orbit { left: 50%; bottom: 30%; }
}

/* ---------- SOLUZIONI ---------- */
.features { background: var(--paper-2); color: var(--ink); }
.features .sticky { padding: 104px 0 96px; }
.track {
  display: flex; align-items: stretch; gap: 20px;
  --pad: max(24px, (100vw - 1120px) / 2);
  padding: 0 var(--pad) 20px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-padding-inline: var(--pad);
  overscroll-behavior-x: contain;
}
.track > * { flex: none; scroll-snap-align: start; }
.track-intro {
  width: min(440px, 80vw);
  display: flex; flex-direction: column; justify-content: center;
  padding-right: 40px;
}
.track-intro .h2 { margin-bottom: 20px; font-size: clamp(2rem, min(3.6vw, 7.5vh), 3.5rem); }
.track-intro .body { color: var(--ink-2); }
.card {
  position: relative;
  width: min(320px, 74vw);
  min-height: min(440px, 62vh);
  padding: 104px 30px 30px;
  border-radius: 28px;
  background: var(--paper);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04), 0 20px 50px -30px rgba(0, 0, 0, 0.25);
  display: flex; flex-direction: column; justify-content: flex-end;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute; right: -30%; top: -25%;
  width: 90%; aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.06), transparent);
  background: radial-gradient(closest-side, color-mix(in srgb, var(--tint) 35%, transparent), transparent);
}
.card-icon {
  position: absolute; top: 30px; left: 30px;
  width: 56px; height: 56px; border-radius: 18px;
  display: grid; place-items: center;
  color: var(--tint);
  background: #f0f0f3;
  background: color-mix(in srgb, var(--tint) 16%, white);
}
.card-icon svg { width: 28px; height: 28px; }
.card-icon svg use { stroke-width: 1.8; }
.card h3 { font-size: 1.75rem; letter-spacing: -0.03em; line-height: 1.1; margin-bottom: 10px; }
.card p { color: var(--ink-2); line-height: 1.45; }
.track-progress {
  display: none;
  width: min(1120px, 100% - 48px); margin: 36px auto 0;
  height: 3px; border-radius: 3px; background: rgba(0, 0, 0, 0.08); overflow: hidden;
}
.track-progress i { display: block; height: 100%; background: var(--ink); transform-origin: left; transform: scaleX(0); }

/* binario bloccato: lo scroll verticale fa scorrere le schede in orizzontale */
.fx .features .sticky { display: flex; flex-direction: column; justify-content: center; padding: var(--nav-h) 0 0; }
.fx .track { width: max-content; overflow: visible; padding-bottom: 0; will-change: transform; }
.fx .track-progress { display: block; }

/* ---------- PRIVACY ---------- */
.privacy { background: var(--night); }
.privacy .sticky { padding: 120px 0 80px; }
.privacy-layout {
  width: min(1120px, 100% - 48px); margin-inline: auto;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: center; gap: 40px;
}
.privacy-copy .h2 { margin-bottom: 24px; }
.privacy-copy .body + .body { margin-top: 14px; }
.grad {
  background: linear-gradient(90deg, #ffb547, #ff6b4a 60%, #ff375f);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hub-stage { display: grid; place-items: center; }
.hub-svg { width: min(100%, 520px); height: auto; aspect-ratio: 1; overflow: visible; }
.hub-box { fill: #1c1c1f; stroke: rgba(255, 255, 255, 0.16); stroke-width: 1.5; }
.hub-glyph use { stroke: #f5f5f7; stroke-width: 1.8; }
.hub-dot { fill: #ffb547; }
.pulse { fill: none; stroke: rgba(255, 181, 71, 0.45); stroke-width: 1.5; transform-origin: 300px 300px; animation: pulse 2.8s var(--ease-out) infinite; }
.pulse-2 { animation-delay: 1.4s; }
@keyframes pulse { from { transform: scale(0.5); opacity: 1; } to { transform: scale(1.35); opacity: 0; } }
.hub-lines path { fill: none; stroke: rgba(255, 181, 71, 0.6); stroke-width: 1.5; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.dev-bg { fill: #161618; stroke: rgba(255, 255, 255, 0.14); stroke-width: 1.5; }
.dev use { stroke: #f5f5f7; stroke-width: 1.6; }
.cloud use { stroke: #8e8e93; stroke-width: 1.4; }
.cloud .x { fill: none; stroke: #ff453a; stroke-width: 3; stroke-linecap: round; }

.fx .privacy .sticky { padding: 0; }
.fx .privacy-layout { height: 100%; padding-top: var(--nav-h); }
.fx .hub-stage { align-self: stretch; min-height: 0; container-type: size; }
.fx .hub-svg { width: min(100cqw, 100cqh - 32px); }

@media (max-width: 860px) {
  .privacy-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .hub-svg { width: min(100%, 400px); }
  .fx .privacy-layout { grid-template-rows: auto minmax(0, 1fr); gap: 4px; padding-bottom: 12px; }
  .fx .privacy-copy { padding-top: 20px; }
  .fx .privacy-copy .body { font-size: 0.9375rem; }
  .fx .privacy-copy .body + .body { display: none; }
  .fx .privacy-copy .h2 { margin-bottom: 12px; font-size: clamp(1.875rem, 9vw, 2.5rem); }
  .fx .privacy-copy .eyebrow { margin-bottom: 10px; }
}

/* ---------- NUMERI ---------- */
.stats { background: var(--night); padding: 40px 0 140px; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; border-top: 1px solid var(--line-dark); padding-top: 48px; }
.stat-num {
  font-size: clamp(3rem, 6vw, 5rem); font-weight: 700; letter-spacing: -0.05em; line-height: 1;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #ffffff, #a1a1a6);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat-label { margin-top: 12px; color: var(--light-2); max-width: 18em; }
@media (max-width: 720px) {
  .stats { padding-bottom: 100px; }
  .stats-grid { grid-template-columns: 1fr; }
}

/* ---------- ENERGIA ---------- */
.energy { background: var(--paper); color: var(--ink); }
.energy .sticky { padding: 120px 0 110px; }
.energy-layout {
  display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); align-items: center; gap: 56px;
}
.energy-copy .h2 { margin-bottom: 20px; font-size: clamp(2.25rem, min(4.2vw, 8.5vh), 3.75rem); }
.energy-copy .body { color: var(--ink-2); }
.meter { margin-top: 32px; }
.meter-num { font-size: clamp(3rem, min(6vw, 11vh), 4.75rem); font-weight: 700; letter-spacing: -0.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.meter-label { margin-top: 6px; color: var(--ink-2); font-size: 0.9375rem; }
.meter-bar { margin-top: 14px; height: 8px; border-radius: 8px; background: #ececf0; overflow: hidden; }
.meter-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #ffc83d, #34c759); transform-origin: left; transform: scaleX(0.32); }
.chart { min-width: 0; }
.chart svg { width: 100%; height: auto; overflow: visible; }
.axis line { stroke: #e5e5ea; stroke-width: 1; }
.axis text { fill: #6e6e73; font-size: 15px; font-family: var(--font); }
.solar-area { fill: url(#solar); }
.solar-line { fill: none; stroke: #ffb800; stroke-width: 2.5; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 18px; font-size: 0.875rem; color: var(--ink-2); }
.legend li { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.fine { margin-top: 10px; font-size: 0.75rem; color: var(--ink-2); }

.pin .energy .sticky { display: grid; align-items: center; padding: 0; }
.pin .energy-layout { padding-top: var(--nav-h); }

@media (max-width: 860px) {
  .energy-layout { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .pin .energy .sticky { display: block; }
  .pin .energy-layout {
    height: 100%;
    grid-template-rows: auto minmax(0, 1fr); align-items: stretch; gap: 14px;
    padding-top: calc(var(--nav-h) + 20px); padding-bottom: 14px;
  }
  .pin .energy-copy .eyebrow { margin-bottom: 8px; }
  .pin .energy-copy .h2 { font-size: clamp(1.5rem, 7.4vw, 2.125rem); margin-bottom: 8px; }
  .pin .energy-copy .body { font-size: 0.9375rem; line-height: 1.4; }
  .pin .meter { margin-top: 10px; display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 0 10px; }
  .pin .meter-num { font-size: 2.25rem; }
  .pin .meter-label { margin: 0; font-size: 0.8125rem; }
  .pin .meter-bar { grid-column: 1 / -1; margin-top: 8px; height: 6px; }
  /* il grafico prende lo spazio rimasto, senza mai uscire dallo schermo */
  .pin .chart { display: grid; grid-template-rows: minmax(0, 1fr) auto; min-height: 0; }
  .pin .chart-box { container-type: size; min-height: 110px; display: grid; place-items: center; }
  .pin .chart-box svg { width: min(100cqw, 100cqh * 800 / 360); }
  .pin .legend { font-size: 0.75rem; gap: 4px 12px; margin-top: 8px; }
  .pin .fine { margin-top: 6px; font-size: 0.6875rem; line-height: 1.35; }
}

@media (max-width: 860px) and (max-height: 700px) {
  /* telefoni piccoli: il paragrafo lascia il posto al grafico, che è il contenuto della scena */
  .pin .energy-copy .body { display: none; }
  .fx .privacy-copy .body { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
}

/* ---------- METODO ---------- */
.method { background: var(--night); padding: 160px 0; }
.method .h2 { max-width: 12em; margin-bottom: 72px; }
.steps { position: relative; display: grid; gap: 56px; }
.step { position: relative; display: grid; grid-template-columns: 120px 1fr; gap: 24px; align-items: start; max-width: 860px; }
.step-n { position: relative; padding: 8px 0 0 28px; font-size: 1rem; font-weight: 600; color: var(--warm); font-variant-numeric: tabular-nums; }
.step-n::before {
  content: ""; position: absolute; left: 0; top: 13px;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--night); box-shadow: inset 0 0 0 2px var(--warm);
}
.step h3 { font-size: clamp(1.5rem, 2.6vw, 2.25rem); letter-spacing: -0.03em; line-height: 1.1; margin-bottom: 10px; }
.step p { color: var(--light-2); font-size: 1.125rem; max-width: 36em; }
.step-line { position: absolute; left: 5px; top: 18px; bottom: 30px; width: 1px; background: var(--line-dark); }
.step-line i { position: absolute; inset: 0; background: linear-gradient(var(--warm), #ff6b4a); transform-origin: top; transform: scaleY(0); }
@media (max-width: 640px) {
  .method { padding: 110px 0; }
  .method .h2 { margin-bottom: 48px; }
  .steps { gap: 40px; }
  .step { grid-template-columns: 1fr; gap: 4px; padding-left: 28px; }
  .step-n { position: static; padding: 0; }
  .step-n::before { top: 7px; }
  .step-line { top: 12px; }
  .step p { font-size: 1.0625rem; }
}

/* ---------- PROPOSTE ---------- */
.plans { background: var(--paper-2); color: var(--ink); padding: 150px 0; }
.plans .h2 { margin-bottom: 56px; }
.plans-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.plan {
  position: relative;
  display: flex; flex-direction: column;
  padding: 34px 30px 30px;
  border-radius: 28px;
  background: var(--paper);
  box-shadow: 0 20px 50px -34px rgba(0, 0, 0, 0.3);
}
.plan h3 { font-size: 1.75rem; letter-spacing: -0.03em; }
.plan-lead { color: var(--ink-2); margin: 6px 0 26px; }
.plan ul { display: grid; gap: 14px; margin-bottom: 32px; flex: 1; align-content: start; }
.plan li { display: grid; grid-template-columns: 20px 1fr; gap: 10px; line-height: 1.4; }
.plan li svg { width: 20px; height: 20px; color: #248a3d; margin-top: 1px; }
.plan li svg use { stroke-width: 2.2; }
.plan .btn { align-self: stretch; white-space: normal; text-align: center; }
.plan-featured { background: #111113; color: var(--light); box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.6); }
.plan-featured .plan-lead { color: var(--light-2); }
.plan-featured li svg { color: #34c759; }
.plan-featured h3 { padding-right: 96px; } /* spazio per l'etichetta */
.badge {
  position: absolute; top: 22px; right: 22px;
  font-size: 0.75rem; font-weight: 600; padding: 5px 10px; border-radius: 999px;
  background: rgba(255, 181, 71, 0.16); color: var(--warm);
}
@media (max-width: 900px) {
  .plans-grid { grid-template-columns: 1fr; }
  .plans { padding: 110px 0; }
  .plans .h2 { margin-bottom: 40px; }
}

/* ---------- FAQ ---------- */
.faq { background: var(--paper); color: var(--ink); padding: 140px 0; }
.faq .h2 { margin-bottom: 40px; }
.faq-list { border-top: 1px solid var(--line-light); }
.faq details { border-bottom: 1px solid var(--line-light); interpolate-size: allow-keywords; }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 24px 0;
  font-size: clamp(1.125rem, 1.8vw, 1.375rem); font-weight: 600; letter-spacing: -0.02em;
  -webkit-tap-highlight-color: transparent;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none;
  width: 12px; height: 12px; margin-right: 4px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: translateY(-3px) rotate(45deg);
  transition: transform 260ms var(--ease-out);
  opacity: 0.6;
}
.faq details[open] summary::after { transform: translateY(3px) rotate(-135deg); }
.faq details::details-content {
  height: 0; overflow: clip;
  transition: height 300ms var(--ease-out), content-visibility 300ms allow-discrete;
}
.faq details[open]::details-content { height: auto; }
.faq-a p { padding: 0 0 26px; color: var(--ink-2); font-size: 1.0625rem; line-height: 1.55; max-width: 40em; }
@media (max-width: 900px) {
  .faq { padding: 100px 0; }
}

/* ---------- CONTATTI ---------- */
.contact { position: relative; background: var(--night); padding: 150px 0; overflow: hidden; }
.contact-glow {
  position: absolute; left: 20%; top: 40%; width: 900px; height: 900px; transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(255, 160, 60, 0.18), transparent);
  pointer-events: none;
}
.contact-layout { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: start; }
.contact-copy .h2 { margin-bottom: 22px; }
.contact-points { display: grid; gap: 12px; margin-top: 32px; }
.contact-points li { display: flex; align-items: center; gap: 10px; color: var(--light); }
.contact-points svg { width: 20px; height: 20px; flex: none; color: var(--warm); }
.contact-points svg use { stroke-width: 2.2; }
.form {
  padding: 32px;
  border-radius: 28px;
  background: #1c1c1e;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 40px 80px -40px rgba(0, 0, 0, 0.8);
  display: grid; gap: 18px;
}
.field { display: grid; gap: 8px; border: 0; margin: 0; padding: 0; min-width: 0; }
.field label, .field legend { font-size: 0.875rem; font-weight: 600; color: var(--light); padding: 0; }
.field legend { margin-bottom: 8px; }
.opt { font-weight: 400; color: #98989d; margin-left: 4px; }
.field input:not([type="radio"]):not([type="checkbox"]), .field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 0;
  background: rgba(255, 255, 255, 0.07);
  /* bordo con contrasto 3:1 sul fondo del modulo */
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
  font-size: 16px; /* evita lo zoom su iOS */
  transition: box-shadow 200ms ease, background-color 200ms ease;
  resize: vertical;
}
.field input::placeholder, .field textarea::placeholder { color: #98989d; opacity: 1; }
.field input:focus-visible, .field textarea:focus-visible {
  outline: none;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 2px #409cff;
}
.field input[aria-invalid="true"] { box-shadow: inset 0 0 0 2px #ff6961; }
.err { font-size: 0.8125rem; color: #ff6961; }
.err:empty { display: none; }
.seg, .pills { display: flex; flex-wrap: wrap; gap: 8px; }
.seg label, .pills label { position: relative; cursor: pointer; }
.seg input, .pills input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.seg span, .pills span {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
  border-radius: 999px;
  font-size: 0.875rem; font-weight: 500;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
  transition: background-color 200ms ease, color 200ms ease, transform 160ms var(--ease-out), box-shadow 200ms ease;
  user-select: none; -webkit-user-select: none;
}
.seg label:active span, .pills label:active span { transform: scale(0.96); }
.seg input:checked + span, .pills input:checked + span { background: var(--light); color: var(--ink); box-shadow: none; }
.seg input:focus-visible + span, .pills input:focus-visible + span { outline: 2px solid #409cff; outline-offset: 2px; }
.form .btn { margin-top: 6px; min-height: 52px; font-size: 1.0625rem; }
.form-note { font-size: 0.8125rem; color: #98989d; text-align: center; text-wrap: balance; }
.form-note a { color: var(--light); text-underline-offset: 2px; }
.form-note.is-ok { color: #4cd964; }
@media (max-width: 900px) {
  .contact-layout { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .contact { padding: 110px 0; }
  .form { padding: 22px; }
}

/* ---------- FOOTER ---------- */
.footer { background: var(--night); border-top: 1px solid var(--line-dark); padding: 48px 0 calc(40px + env(safe-area-inset-bottom)); color: var(--light-2); font-size: 0.875rem; }
.footer .brand { color: var(--light); }
.footer-grid { display: flex; justify-content: space-between; gap: 24px 32px; flex-wrap: wrap; }
.footer-tag { margin-top: 4px; }
.footer-links { display: flex; gap: 4px 22px; flex-wrap: wrap; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; transition: color 200ms ease; }
@media (hover: hover) and (pointer: fine) {
  .footer-links a:hover { color: var(--light); }
}
.footer-legal { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line-dark); font-size: 0.75rem; color: #86868b; }

/* senza JavaScript i disegni generati dallo script resterebbero vuoti */
html:not(.js) .chart-box, html:not(.js) .hub-stage { display: none; }

/* ---------- Comparsa all'ingresso nello schermo (solo con JavaScript) ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  filter: blur(6px);
  transition:
    opacity 800ms var(--ease-out),
    transform 900ms var(--ease-out),
    filter 800ms var(--ease-out);
  transition-delay: calc(var(--d, 0) * 70ms);
}
.js [data-reveal].is-in { opacity: 1; transform: none; filter: none; }

/* ---------- Accessibilità ---------- */
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { transform: none; filter: none; transition: opacity 400ms ease; transition-delay: 0ms; }
  .eq i, .pulse { animation: none; }
  .pulse { opacity: 0; }
  .pin .caption, .pin .caption.is-active { transform: none; filter: none; transition: opacity 250ms ease; }
  .chip, .chip.is-on { transform: translate(-50%, -50%); transition: opacity 250ms ease; transition-delay: 0ms; }
  .menu, .menu.is-open { transform: none; }
  .faq details::details-content { transition: none; }
  .btn, .tile, .seg span, .pills span { transition-property: background-color, color, box-shadow; }
}
@media (prefers-reduced-transparency: reduce) {
  .nav, .menu { background: #111113; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .day-panel { background: rgba(10, 12, 20, 0.94); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .chip { background: #ffffff; }
}
@media (prefers-contrast: more) {
  .body, .lede, .caption p, .stat-label, .card p, .step p, .plan-lead, .faq-a p, .tile-meta, .footer, .footer-legal { color: inherit; }
  .nav { background: #000; border-bottom-color: #fff; }
  .day-panel { background: rgba(0, 0, 0, 0.9); }
  .card, .plan { box-shadow: inset 0 0 0 1px currentColor; }
}
@media (forced-colors: active) {
  /* il testo con sfumatura resterebbe trasparente */
  .grad, .stat-num { background: none; color: CanvasText; }
  .btn, .tile, .card, .plan, .form, .day-panel, .chip { border: 1px solid; }
  .seg input:checked + span, .pills input:checked + span { outline: 2px solid; }
}
@media print {
  .nav, .skip { display: none; }
  .js [data-reveal] { opacity: 1; transform: none; filter: none; }
}
