/* ==========================================================================
   enricofanucchi.com v2 — "la serata di lancio"
   Palco nero caldo, un faro colorato per app, Mona Sans.
   ========================================================================== */

@font-face {
  font-family: "Mona Sans";
  src: url("../fonts/mona-sans-vf.woff2") format("woff2");
  font-weight: 350 850;
  font-stretch: 100% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Mona Sans Mono";
  src: url("../fonts/mona-sans-mono-vf.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
}

:root {
  color-scheme: dark;

  /* Palco */
  --stage: #0d0b09;
  --stage-2: #13110e;
  --plane: #1a1714;
  --plane-2: #23201c;
  --line: rgb(255 255 255 / 0.09);
  --line-strong: rgb(255 255 255 / 0.16);

  /* Inchiostro avorio */
  --ink: #f4f1ea;
  --ink-2: #bdb8ae;
  --ink-3: #8e8a82;

  /* Marchio EF */
  --brand: #f7941d;
  --brand-ink: #1b1003;

  /* Faro dell'app corrente (sovrascritto per pagina) */
  --accent: var(--brand);
  --accent-ink: #0b0b0d;

  /* Tipo */
  --font: "Mona Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Mona Sans Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --step--1: clamp(0.8125rem, 0.78rem + 0.1vw, 0.875rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  --step-1: clamp(1.15rem, 1.05rem + 0.5vw, 1.45rem);
  --step-2: clamp(1.45rem, 1.2rem + 1.1vw, 2.1rem);
  --step-3: clamp(2rem, 1.4rem + 2.6vw, 3.6rem);
  --step-4: clamp(2.6rem, 1.6rem + 4.4vw, 5rem);
  --step-5: clamp(3rem, 1.6rem + 6vw, 6rem);

  /* Spazio */
  --gutter: clamp(1rem, 0.4rem + 3.6vw, 5rem);
  --section: clamp(5.5rem, 4rem + 8vw, 11rem);
  --maxw: none;
  --radius: 14px;
  --radius-lg: 22px;

  /* Movimento: ease-out esponenziale */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  --nav-h: 3.75rem;
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--nav-h) + 1rem);
  background: var(--stage);
}

body {
  margin: 0;
  background: var(--stage);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-0);
  font-weight: 420;
  font-stretch: 100%;
  line-height: 1.6;
  letter-spacing: 0.002em;
  font-feature-settings: "kern", "calt";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img, svg, video, canvas, picture { display: block; max-width: 100%; }
img { height: auto; }
picture img { width: 100%; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
a:hover { text-decoration-color: var(--accent); }

button, input, textarea, select { font: inherit; color: inherit; }

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

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

/* Scrollbar a tema */
html { scrollbar-color: #3a3a40 var(--stage); scrollbar-width: thin; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--stage); }
::-webkit-scrollbar-thumb { background: #33333a; border-radius: 10px; border: 2px solid var(--stage); }
::-webkit-scrollbar-thumb:hover { background: #4a4a52; }

.sr-only {
  position: absolute !important; 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: 1rem; top: -4rem; z-index: 200;
  padding: 0.6rem 1rem; border-radius: 10px;
  background: var(--brand); color: var(--brand-ink); font-weight: 650; text-decoration: none;
  transition: top 0.2s var(--ease-out);
}
.skip:focus { top: 1rem; }

.wrap { width: calc(100% - 2 * var(--gutter)); margin-inline: auto; }
.wrap--narrow { width: min(100% - 2 * var(--gutter), 64rem); margin-inline: auto; }

.icon { width: 1.15em; height: 1.15em; flex: none; }
.icon--lg { width: 1.6rem; height: 1.6rem; }

/* ---------- Tipografia ---------- */

.display,
.h1, .h2, .h3 {
  margin: 0;
  font-weight: 780;
  font-stretch: 125%;
  line-height: 0.95;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.display { font-size: var(--step-5); font-weight: 820; line-height: 0.9; }
.h1 { font-size: var(--step-4); }
.h2 { font-size: var(--step-3); font-weight: 760; line-height: 1; }
.h3 { font-size: var(--step-2); font-weight: 700; font-stretch: 112%; line-height: 1.08; letter-spacing: -0.02em; }

.lead {
  margin: 0;
  font-size: var(--step-1);
  line-height: 1.45;
  color: var(--ink-2);
  font-weight: 430;
  max-width: 38ch;
  text-wrap: pretty;
}
.prose { max-width: 66ch; color: var(--ink-2); }
.prose p { margin: 0 0 1.1em; }
.prose strong { color: var(--ink); font-weight: 650; }
.muted { color: var(--ink-3); }
.mono { font-family: var(--mono); font-size: 0.86em; letter-spacing: 0; font-variant-numeric: tabular-nums; }

/* ---------- Pulsanti ---------- */

.btn {
  --btn-bg: var(--accent);
  --btn-ink: var(--accent-ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55em;
  min-height: 3rem;
  padding: 0.7rem 1.35rem;
  border: 0;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-ink);
  font-weight: 650;
  font-stretch: 108%;
  font-size: 1rem;
  line-height: 1.1;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.12s ease-out, background-color 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out), filter 0.25s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { filter: brightness(1.08); box-shadow: 0 10px 30px -12px color-mix(in srgb, var(--btn-bg) 70%, transparent); }
.btn:active { transform: scale(0.97); transition-duration: 0.08s; }
.btn .icon { width: 1.1rem; height: 1.1rem; }
.btn--lg { min-height: 3.5rem; padding: 0.85rem 1.7rem; font-size: 1.0625rem; }
.btn--ghost {
  --btn-bg: transparent;
  --btn-ink: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
.btn--ghost:hover { --btn-bg: rgb(255 255 255 / 0.06); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.28); filter: none; }
.btn--brand { --btn-bg: var(--brand); --btn-ink: var(--brand-ink); }
.btn--light { --btn-bg: var(--ink); --btn-ink: #0b0b0c; }
.btn small { font-weight: 450; opacity: 0.72; font-size: 0.8em; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 0.4em;
  color: var(--ink); font-weight: 600; text-decoration: none;
}
.link-arrow .icon { transition: transform 0.35s var(--ease-out); }
.link-arrow:hover .icon { transform: translateX(4px); }
.link-arrow:hover { color: var(--accent); }

/* ---------- Navigazione ---------- */

.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center;
  background: rgb(13 11 9 / 0.62);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  transition: background-color 0.3s;
}
.nav::after {
  content: ""; position: absolute; inset: auto 0 -14px 0; height: 14px; pointer-events: none;
  background: linear-gradient(rgb(11 11 12 / 0.35), transparent);
  opacity: 0; transition: opacity 0.3s;
}
.nav.is-scrolled::after { opacity: 1; }
.nav__inner { display: flex; align-items: center; gap: 1.5rem; width: calc(100% - 2 * var(--gutter)); margin-inline: auto; }
.nav__brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; font-weight: 700; font-stretch: 112%; letter-spacing: -0.01em; }
.nav__brand img { width: auto; height: 26px; }
.nav__links { display: none; margin: 0 0 0 auto; padding: 0; list-style: none; gap: 0.25rem; }
.nav__links a {
  display: block; padding: 0.45rem 0.8rem; border-radius: 999px;
  color: var(--ink-2); text-decoration: none; font-size: 0.9375rem; font-weight: 500;
  transition: color 0.2s, background-color 0.2s;
}
.nav__links a:hover, .nav__links a[aria-current="page"] { color: var(--ink); background: rgb(255 255 255 / 0.06); }
.nav__tools { display: flex; align-items: center; gap: 0.5rem; margin-left: auto; }
.nav__lang {
  display: inline-grid; place-items: center; min-width: 2.5rem; height: 2.25rem; padding: 0 0.6rem;
  border-radius: 999px; color: var(--ink-2); text-decoration: none; font-size: 0.8125rem; font-weight: 650; letter-spacing: 0.04em;
  box-shadow: inset 0 0 0 1px var(--line);
}
.nav__lang:hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.nav__cta { min-height: 2.25rem; padding: 0.4rem 0.95rem; font-size: 0.875rem; }
.nav__cta .icon { width: 0.95rem; height: 0.95rem; }
.nav__toggle {
  display: inline-grid; place-items: center; width: 2.5rem; height: 2.5rem; border: 0; border-radius: 999px;
  background: transparent; color: var(--ink); cursor: pointer;
}
.nav__toggle:hover { background: rgb(255 255 255 / 0.06); }

@media (min-width: 62rem) {
  .nav__links { display: flex; }
  .nav__tools { margin-left: 0.5rem; }
  .nav__toggle { display: none; }
}
@media (max-width: 26rem) {
  .nav__cta span { display: none; }
}

/* Foglio menu mobile */
.sheet {
  position: fixed; inset: 0; z-index: 150;
  display: grid; grid-template-rows: auto 1fr auto;
  padding: 0 var(--gutter) max(1.5rem, env(safe-area-inset-bottom));
  background: rgb(13 11 9 / 0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  opacity: 0; visibility: hidden;
  transition: opacity 0.35s var(--ease-out), visibility 0s linear 0.35s;
}
.sheet.is-open { opacity: 1; visibility: visible; transition-delay: 0s; }
.sheet__head { display: flex; align-items: center; justify-content: space-between; height: var(--nav-h); }
.sheet__list { list-style: none; margin: 1.5rem 0 0; padding: 0; }
.sheet__list a {
  display: flex; align-items: center; justify-content: space-between; padding: 0.7rem 0;
  font-size: clamp(1.9rem, 8vw, 2.6rem); font-weight: 760; font-stretch: 122%; letter-spacing: -0.03em; text-decoration: none;
  border-bottom: 1px solid var(--line);
  transform: translateY(14px); opacity: 0;
  transition: transform 0.6s var(--ease-out), opacity 0.6s var(--ease-out);
}
.sheet.is-open .sheet__list a { transform: none; opacity: 1; }
.sheet.is-open .sheet__list li:nth-child(2) a { transition-delay: 0.04s; }
.sheet.is-open .sheet__list li:nth-child(3) a { transition-delay: 0.08s; }
.sheet.is-open .sheet__list li:nth-child(4) a { transition-delay: 0.12s; }
.sheet.is-open .sheet__list li:nth-child(5) a { transition-delay: 0.16s; }
.sheet__apps { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.5rem; }
.sheet__apps a { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.4rem 0.8rem 0.4rem 0.4rem; border-radius: 999px; background: var(--plane); text-decoration: none; font-weight: 600; font-size: 0.9375rem; }
.sheet__apps img { width: 28px; height: 28px; border-radius: 8px; }
.sheet__foot { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* ---------- Icone app ---------- */

.appicon {
  display: block;
  width: var(--size, 56px); height: var(--size, 56px);
  border-radius: 24%;
  overflow: hidden;
  flex: none;
  background: #0d0d10;
  box-shadow: 0 6px 18px -6px rgb(0 0 0 / 0.7), inset 0 0 0 1px rgb(255 255 255 / 0.07);
}
.appicon img { width: 100%; height: 100%; object-fit: cover; }
.appicon--svg { display: block; padding: calc(var(--size, 56px) * 0.16); background: #101014; }
.appicon--svg img { object-fit: contain; }

/* ---------- Finestre e telefoni (oggetti fisici) ---------- */

.shot {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: #0d0d10;
  box-shadow:
    0 2px 0 rgb(255 255 255 / 0.04) inset,
    0 40px 90px -30px rgb(0 0 0 / 0.85),
    0 18px 40px -20px color-mix(in srgb, var(--accent) 22%, transparent);
}
.shot img { width: 100%; }
.phone {
  position: relative;
  width: min(100%, 320px);
  aspect-ratio: 9 / 19;
  padding: 9px;
  border-radius: 46px;
  background: linear-gradient(160deg, #2b2b31, #141417 40%, #1c1c20);
  box-shadow:
    inset 0 0 0 1px rgb(255 255 255 / 0.1),
    0 40px 80px -30px rgb(0 0 0 / 0.9),
    0 20px 50px -24px color-mix(in srgb, var(--accent) 30%, transparent);
}
.phone picture, .phone img { width: 100%; height: 100%; border-radius: 38px; object-fit: cover; object-position: top; background: #000; }

/* ---------- Sezioni ---------- */

.section { padding-block: var(--section); position: relative; }
.section--tight { padding-block: calc(var(--section) * 0.6); }
.section__head { display: grid; gap: 1.25rem; margin-bottom: clamp(2.5rem, 5vw, 4.5rem); }

/* ==========================================================================
   HOME
   ========================================================================== */

.hero {
  position: relative;
  min-height: 100svh;
  padding-top: calc(var(--nav-h) + clamp(2rem, 6vh, 5rem));
  padding-bottom: clamp(2rem, 6vh, 4rem);
  display: grid;
  overflow: clip;
  isolation: isolate;
}
/* Faro dall'alto: la luce del palco, non una decorazione */
.hero::before {
  content: "";
  position: absolute; z-index: -1;
  inset: -20% -10% auto -10%; height: 120%;
  background:
    radial-gradient(60% 55% at 72% 0%, rgb(247 148 29 / 0.16), transparent 70%),
    radial-gradient(40% 40% at 20% 10%, rgb(255 255 255 / 0.05), transparent 70%);
  pointer-events: none;
}
.hero__grid {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4rem);
  align-content: start;
}
.hero__copy { display: grid; gap: 1.5rem; max-width: 46rem; }
.hero__title { font-size: clamp(3.1rem, 1.4rem + 7.4vw, 6rem); }
.hero__title > span { display: block; }
.hero__title .is-dim { color: var(--ink-3); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.5rem; }

/* La scaletta: le app in fila */
.lineup {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15.5rem), 1fr)); gap: 0.5rem;
}
.lineup a {
  --size: 44px;
  display: flex; align-items: center; gap: 0.8rem;
  padding: 0.55rem 0.9rem 0.55rem 0.55rem;
  border-radius: 18px;
  text-decoration: none;
  background: rgb(255 255 255 / 0.035);
  transition: background-color 0.3s var(--ease-out), transform 0.12s ease-out;
}
.lineup a:hover { background: color-mix(in srgb, var(--accent) 14%, rgb(255 255 255 / 0.03)); }
.lineup a:active { transform: scale(0.98); }
.lineup strong { display: block; font-weight: 680; font-stretch: 110%; font-size: 1rem; line-height: 1.2; }
.lineup span { display: block; color: var(--ink-3); font-size: 0.8125rem; line-height: 1.35; }

/* Pila di finestre in prospettiva */
.stack {
  position: relative;
  perspective: 1800px;
  min-height: clamp(18rem, 52vw, 40rem);
  margin-top: clamp(0rem, 2vw, 1rem);
}
.stack__item {
  position: absolute;
  width: min(78%, 46rem);
  transform-style: preserve-3d;
  will-change: transform;
}
.stack__item--1 { right: 0; top: 0; z-index: 1; transform: translate3d(0, 0, -160px) rotateY(-16deg) rotateX(6deg); }
.stack__item--2 { left: 2%; top: 18%; z-index: 2; transform: translate3d(0, 0, -60px) rotateY(10deg) rotateX(4deg); }
.stack__item--3 { left: 14%; top: 36%; z-index: 3; transform: translate3d(0, 0, 40px) rotateY(-6deg) rotateX(8deg); }

@media (min-width: 62rem) {
  .hero__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: center; }
  .stack { min-height: 38rem; }
  .stack__item { width: 88%; }
}

/* Cambio di scena */
.scene { position: relative; }
.scene__track { position: relative; }
.scene__act {
  position: relative;
  min-height: 100svh;
  display: grid; align-items: center;
  padding-block: calc(var(--nav-h) + 2rem) 3rem;
  isolation: isolate;
  overflow: clip;
}
.scene__act::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(70% 60% at 50% -5%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 72%),
    linear-gradient(180deg, color-mix(in srgb, var(--accent) 7%, var(--stage)), var(--stage) 75%);
}
.scene__inner { display: grid; gap: clamp(2rem, 4vw, 3.5rem); align-items: center; }
.scene__name { display: flex; align-items: center; gap: clamp(0.75rem, 2vw, 1.4rem); --size: clamp(56px, 7vw, 92px); }
.scene__name .display { font-size: clamp(2.8rem, 1rem + 5.4vw, 5.25rem); font-stretch: 118%; }
.scene__copy { display: grid; gap: 1.25rem; }
.scene__copy .lead { max-width: 34ch; }
.scene__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.scene__meta { color: var(--ink-3); font-size: var(--step--1); }
.scene__media { perspective: 1600px; }
.scene__media .shot { transform-origin: 50% 100%; }

@media (min-width: 62rem) {
  .scene__inner { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); }
}

/* Modalità pinned (JS): gli atti si sovrappongono in una scena fissa */
.scene.is-pinned .scene__track { height: calc(var(--acts) * 100svh + 60svh); }
.scene.is-pinned .scene__stage { position: sticky; top: 0; height: 100svh; overflow: clip; }
.scene.is-pinned .scene__act { position: absolute; inset: 0; min-height: 0; }
.scene__dots {
  position: absolute; z-index: 5; right: var(--gutter); top: 50%; transform: translateY(-50%);
  display: none; flex-direction: column; gap: 0.6rem; list-style: none; margin: 0; padding: 0;
}
.scene.is-pinned .scene__dots { display: flex; }
.scene__dots li { width: 6px; height: 6px; border-radius: 6px; background: rgb(255 255 255 / 0.25); transition: height 0.4s var(--ease-out), background-color 0.4s; }
.scene__dots li.is-active { height: 22px; background: var(--ink); }

/* Mobile e web */
.pocket { position: relative; }
.pocket__grid {
  display: grid; gap: clamp(3rem, 6vw, 4rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}
.pocket__item { display: grid; gap: 1.5rem; justify-items: center; text-align: center; text-decoration: none; }
.pocket__item .phone { transition: transform 0.6s var(--ease-out); }
.pocket__item:hover .phone { transform: translateY(-8px); }
.pocket__item h3 { margin: 0; font-size: var(--step-2); font-weight: 740; font-stretch: 118%; letter-spacing: -0.025em; line-height: 1.05; }
.pocket__item p { margin: 0.4rem auto 0; color: var(--ink-2); max-width: 28ch; }
.pocket__links { display: flex; gap: 0.5rem; justify-content: center; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.3rem 0.7rem; border-radius: 999px;
  background: rgb(255 255 255 / 0.06); color: var(--ink-2); font-size: 0.8125rem; font-weight: 550; text-decoration: none;
}
a.chip:hover { color: var(--ink); background: rgb(255 255 255 / 0.1); }

/* Chi sono (breve) */
.about-short { display: grid; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.about-short__photo { border-radius: var(--radius-lg); overflow: hidden; max-width: 30rem; box-shadow: 0 40px 90px -40px rgb(0 0 0 / 0.9); }
.about-short__photo img { aspect-ratio: 4 / 5; object-fit: cover; }
.about-short__copy { display: grid; gap: 1.5rem; }
@media (min-width: 56rem) { .about-short { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); } }

/* Banda sostegno: l'arancione EF prende tutto il campo */
.support-band {
  --accent: var(--brand);
  --accent-ink: var(--brand-ink);
  position: relative;
  padding-block: clamp(4.5rem, 10vw, 8rem);
  background: var(--brand);
  color: var(--brand-ink);
  overflow: clip;
}
.support-band__inner { display: grid; gap: 2rem; }
.support-band .h2 { max-width: 14ch; }
.support-band p { margin: 0; max-width: 54ch; font-size: var(--step-1); line-height: 1.45; color: color-mix(in srgb, var(--brand-ink) 82%, var(--brand)); }
.support-band .btn { --btn-bg: var(--brand-ink); --btn-ink: #fff3e3; }
.support-band .btn--ghost { --btn-bg: transparent; --btn-ink: var(--brand-ink); box-shadow: inset 0 0 0 1.5px rgb(27 16 3 / 0.55); }
.support-band .btn--ghost:hover { --btn-bg: rgb(27 16 3 / 0.08); }
.support-band ::selection { background: var(--brand-ink); color: var(--brand); }
.support-band :focus-visible { outline-color: var(--brand-ink); }
.support-band__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
@media (min-width: 62rem) {
  .support-band__inner { grid-template-columns: 1.1fr 1fr; align-items: end; }
}

/* Riga progetti */
.archive-teaser { display: grid; gap: 1.5rem; }
.archive-teaser__list { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* ==========================================================================
   PAGINA APP
   ========================================================================== */

.app-hero {
  position: relative;
  padding-top: calc(var(--nav-h) + clamp(2.5rem, 8vh, 6rem));
  padding-bottom: clamp(2rem, 6vh, 4rem);
  text-align: center;
  isolation: isolate;
  overflow: clip;
}
.app-hero::before {
  content: ""; position: absolute; z-index: -1; inset: -10% -20% auto; height: 140%;
  background: radial-gradient(50% 50% at 50% 0%, color-mix(in srgb, var(--accent) 34%, transparent), transparent 72%);
  pointer-events: none;
}
.app-hero__inner { display: grid; justify-items: center; gap: 1.25rem; }
.app-hero .appicon { --size: clamp(72px, 9vw, 104px); }
.app-hero__name { font-size: clamp(3.2rem, 1.4rem + 8vw, 6rem); }
.app-hero__tagline { margin: 0; font-size: var(--step-2); font-weight: 650; font-stretch: 112%; letter-spacing: -0.02em; line-height: 1.15; text-wrap: balance; max-width: 26ch; }
.app-hero__sub { margin: 0 auto; max-width: 46ch; color: var(--ink-2); font-size: var(--step-1); line-height: 1.45; text-wrap: pretty; }
.app-hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; margin-top: 0.75rem; }
.app-hero__meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem 1rem; color: var(--ink-3); font-size: var(--step--1); }
.app-hero__meta span { display: inline-flex; align-items: center; gap: 0.35rem; }

.reveal-shot { padding-inline: var(--gutter); perspective: 1400px; margin-top: clamp(1rem, 3vw, 2rem); }
.reveal-shot .shot { width: min(100%, 120rem); margin-inline: auto; transform-origin: 50% 0%; }
.reveal-shot--phone { display: flex; justify-content: center; }
.reveal-shot--phone .phone { width: min(78vw, 340px); }

/* Testo che si accende come un karaoke */
.statement { padding-block: var(--section); }
.statement p {
  margin: 0 auto;
  max-width: 30ch;
  font-size: clamp(1.8rem, 1rem + 3.2vw, 3.6rem);
  font-weight: 700;
  font-stretch: 115%;
  line-height: 1.12;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.statement .w { color: var(--ink); transition: color 0.25s linear; }
.statement.is-live .w { color: rgb(244 241 234 / 0.42); }
.statement.is-live .w.is-on { color: var(--ink); }
.statement--karaoke.is-live .w.is-now {
  color: transparent;
  background: linear-gradient(90deg, var(--k-hl, #37e2d5) var(--k, 0%), rgb(244 241 234 / 0.42) var(--k, 0%));
  -webkit-background-clip: text;
  background-clip: text;
}
.statement--karaoke.is-live .w.is-on:not(.is-now) { color: var(--k-hl, #37e2d5); }

/* Capitoli: testo che scorre, media fisso */
.chapters { position: relative; padding-block: calc(var(--section) * 0.5) var(--section); }
.chapters__grid { display: grid; gap: 0; }
.chapter { display: grid; gap: 1.5rem; padding-block: clamp(2.5rem, 7vw, 4rem); }
.chapter__title { font-size: var(--step-3); }
.chapter__text { margin: 0; color: var(--ink-2); font-size: var(--step-1); line-height: 1.5; max-width: 34ch; text-wrap: pretty; }
.chapter__points { list-style: none; margin: 0.25rem 0 0; padding: 0; display: grid; gap: 0.6rem; max-width: 40ch; }
.chapter__points li { position: relative; padding-left: 1.35rem; color: var(--ink-2); line-height: 1.45; }
.chapter__points li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 7px; height: 7px; border-radius: 2px; background: var(--accent); }
.chapter__media { margin-top: 0.5rem; }
.chapter__media .phone { margin-inline: auto; width: min(72vw, 300px); }
.chapters__sticky { display: none; }

@media (min-width: 62rem) {
  .chapters__grid { grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr); gap: clamp(2rem, 5vw, 5rem); }
  .chapter { min-height: 78svh; align-content: center; padding-block: 4rem; }
  .chapter__media { display: none; }
  .chapters__sticky {
    display: block;
    position: sticky; top: calc(var(--nav-h) + 6svh);
    height: calc(88svh - var(--nav-h));
    align-self: start;
    grid-column: 2; grid-row: 1;
  }
  .chapters__steps { grid-column: 1; grid-row: 1; }
  .chapters__frame { position: relative; height: 100%; display: grid; place-items: center; }
  .chapters__frame > figure {
    position: absolute; inset: 0; margin: 0;
    display: grid; place-items: center;
    opacity: 0; transform: scale(0.96) translateY(18px); filter: blur(6px);
    transition: opacity 0.7s var(--ease-out), transform 0.9s var(--ease-out), filter 0.7s var(--ease-out);
  }
  .chapters__frame > figure.is-active { opacity: 1; transform: none; filter: none; }
  .chapters__frame .shot { width: 100%; max-height: 100%; }
  .chapters__frame .phone { height: min(100%, 680px); width: auto; }
  .chapters__frame .chapter__empty { width: 100%; }
}

/* Riquadro senza immagine: il nome dell'app come oggetto tipografico */
.chapter__empty {
  display: grid; place-items: center; aspect-ratio: 16 / 10; border-radius: var(--radius-lg);
  background: radial-gradient(80% 80% at 50% 0%, color-mix(in srgb, var(--accent) 22%, var(--plane)), var(--stage-2));
  color: color-mix(in srgb, var(--accent) 70%, var(--ink));
  font-size: clamp(2rem, 5vw, 4.5rem); font-weight: 820; font-stretch: 125%; letter-spacing: -0.03em;
}

/* TreeX: la città che cresce */
.city { position: relative; padding-block: calc(var(--section) * 0.4) var(--section); }
.city__stage { position: relative; height: 220svh; }
.city__sticky { position: sticky; top: var(--nav-h); height: calc(100svh - var(--nav-h)); display: grid; grid-template-rows: auto 1fr auto; gap: 1rem; padding-block: 2rem 1.5rem; }
.city__copy { text-align: center; display: grid; gap: 0.75rem; justify-items: center; }
.city__copy .h2 { max-width: 18ch; }
.city__canvas { width: 100%; height: 100%; min-height: 0; }
.city__caption { text-align: center; color: var(--ink-3); font-size: var(--step--1); }
.city__phase { transition: opacity 0.4s; }

/* Specifiche */
.specs { display: grid; gap: 0; margin: 0; }
.specs > div { display: grid; gap: 0.25rem; padding-block: 1.25rem; border-top: 1px solid var(--line); }
.specs dt { color: var(--ink-3); font-size: var(--step--1); font-weight: 550; letter-spacing: 0.01em; }
.specs dd { margin: 0; font-size: var(--step-1); font-weight: 560; line-height: 1.35; }
@media (min-width: 48rem) {
  .specs { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(2rem, 5vw, 5rem); }
  .specs > div { grid-template-columns: 11rem 1fr; gap: 1.5rem; align-items: baseline; }
}

/* Download */
.download {
  position: relative; isolation: isolate; overflow: clip;
  padding-block: var(--section);
  background: linear-gradient(180deg, var(--stage), color-mix(in srgb, var(--accent) 9%, var(--stage)) 55%, var(--stage));
}
.download__head { display: grid; gap: 1.25rem; justify-items: center; text-align: center; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.download__head .appicon { --size: 72px; }
.download__primary { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; }
.os-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.os {
  display: grid; gap: 1rem; align-content: start;
  padding: 1.5rem; border-radius: var(--radius-lg);
  background: rgb(255 255 255 / 0.035);
  box-shadow: inset 0 0 0 1px var(--line);
}
.os.is-current { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 70%, transparent); background: color-mix(in srgb, var(--accent) 6%, rgb(255 255 255 / 0.03)); }
.os__head { display: flex; align-items: center; gap: 0.6rem; font-weight: 700; font-stretch: 112%; font-size: 1.15rem; }
.os__head .icon { width: 1.4rem; height: 1.4rem; }
.os__files { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.25rem; }
.os__files a {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.55rem 0.7rem; margin-inline: -0.7rem; border-radius: 10px; text-decoration: none;
}
.os__files a:hover { background: rgb(255 255 255 / 0.06); }
.os__files .mono { color: var(--ink-2); overflow-wrap: anywhere; }
.os__files .size { color: var(--ink-3); white-space: nowrap; font-size: 0.8125rem; }
.os__how { margin: 0; color: var(--ink-2); font-size: 0.9375rem; line-height: 1.5; }
.download__notes { margin-top: 2rem; display: grid; gap: 1.5rem; }
.download__notes > div { max-width: 66ch; }
.download__notes h3 { margin: 0 0 0.35rem; font-size: 1rem; font-weight: 700; font-stretch: 110%; }
.download__notes p { margin: 0; color: var(--ink-2); }
@media (min-width: 56rem) { .download__notes { grid-template-columns: 1fr 1fr; } }

/* FAQ */
.faq { display: grid; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding-block: 1.35rem; cursor: pointer; list-style: none;
  font-size: var(--step-1); font-weight: 620; font-stretch: 106%; line-height: 1.3;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { width: 1.35rem; height: 1.35rem; color: var(--ink-3); transition: transform 0.45s var(--ease-out), color 0.2s; }
.faq details[open] summary .icon { transform: rotate(45deg); color: var(--accent); }
.faq summary:hover .icon { color: var(--ink); }
.faq .faq__a { padding-bottom: 1.5rem; color: var(--ink-2); max-width: 66ch; }
.faq .faq__a p { margin: 0; }

/* Prossima app */
.next-app {
  display: grid; gap: 1rem; padding-block: clamp(4rem, 10vw, 7rem);
  text-decoration: none; border-top: 1px solid var(--line);
  transition: background-color 0.5s var(--ease-out);
}
.next-app:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.next-app__label { color: var(--ink-3); font-size: var(--step--1); }
.next-app__name { display: flex; align-items: center; gap: 1.2rem; --size: clamp(52px, 7vw, 80px); }
.next-app__name .display { font-size: clamp(2.6rem, 1rem + 6.5vw, 5.5rem); transition: color 0.3s; }
.next-app:hover .display { color: var(--accent); }
.next-app__name .icon { width: clamp(2rem, 4vw, 3.5rem); height: clamp(2rem, 4vw, 3.5rem); margin-left: auto; transition: transform 0.5s var(--ease-out); }
.next-app:hover .next-app__name .icon { transform: translateX(10px); }

/* ==========================================================================
   PAGINE INTERNE
   ========================================================================== */

.page-head {
  position: relative;
  padding-top: calc(var(--nav-h) + clamp(3rem, 10vh, 7rem));
  padding-bottom: clamp(2.5rem, 6vw, 4.5rem);
  isolation: isolate;
  overflow: clip;
}
.page-head::before {
  content: ""; position: absolute; z-index: -1; inset: 0 -10% auto; height: 120%;
  background: radial-gradient(45% 60% at 20% 0%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 72%);
  pointer-events: none;
}
.page-head__inner { display: grid; gap: 1.5rem; }

/* Sostienimi */
.give { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
.give__option {
  display: grid; gap: 1.25rem; align-content: start;
  padding: clamp(1.5rem, 3vw, 2.25rem); border-radius: var(--radius-lg);
  background: rgb(255 255 255 / 0.035); box-shadow: inset 0 0 0 1px var(--line);
}
.give__option .icon--lg { width: 2.25rem; height: 2.25rem; }
.give__option h2 { margin: 0; font-size: var(--step-2); font-weight: 740; font-stretch: 118%; letter-spacing: -0.025em; line-height: 1.05; }
.give__option p { margin: 0; color: var(--ink-2); }
.give__option--sponsors { color: var(--ink); }
.give__option--sponsors .icon--lg { color: #ea4aaa; }
.give__option--paypal .icon--lg { color: #4b9bff; }
.give__soon { color: var(--ink-3); font-size: 0.9375rem; }
.uses { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; counter-reset: none; }
.uses li { display: grid; gap: 0.35rem; padding-block: 1.5rem; border-top: 1px solid var(--line); }
.uses strong { font-size: var(--step-1); font-weight: 680; font-stretch: 108%; }
.uses span { color: var(--ink-2); max-width: 60ch; }
.per-app { display: grid; gap: 0.75rem; }
.per-app a {
  --size: 52px;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1rem;
  padding: 1rem; border-radius: var(--radius-lg); text-decoration: none;
  background: rgb(255 255 255 / 0.03);
  transition: background-color 0.3s var(--ease-out);
}
.per-app a:hover { background: color-mix(in srgb, var(--accent) 12%, rgb(255 255 255 / 0.03)); }
.per-app strong { display: block; font-weight: 700; font-stretch: 110%; font-size: 1.05rem; }
.per-app span { display: block; color: var(--ink-2); font-size: 0.9375rem; line-height: 1.45; }
.per-app .icon { color: var(--ink-3); }

/* Chi sono */
.about { display: grid; gap: clamp(2.5rem, 6vw, 5rem); }
.about__photo { border-radius: var(--radius-lg); overflow: hidden; align-self: start; box-shadow: 0 40px 90px -40px rgb(0 0 0 / 0.9); }
.about__photo img { aspect-ratio: 4 / 5; object-fit: cover; }
.about__body { display: grid; gap: 2.5rem; }
.about__body .prose { font-size: var(--step-1); line-height: 1.55; }
.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; margin: 0; padding: 0; }
.tags li { padding: 0.4rem 0.85rem; border-radius: 999px; background: rgb(255 255 255 / 0.05); color: var(--ink-2); font-size: 0.9375rem; }
.socials { display: flex; flex-wrap: wrap; gap: 0.5rem; }
@media (min-width: 56rem) { .about { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); } .about__photo { position: sticky; top: calc(var(--nav-h) + 2rem); } }

/* Progetti */
.projects { display: grid; gap: clamp(3rem, 7vw, 6rem); }
.project { display: grid; gap: 1.5rem; align-items: center; }
.project__shot { border-radius: var(--radius); overflow: hidden; box-shadow: 0 30px 70px -35px rgb(0 0 0 / 0.9); background: var(--plane); }
.project__shot img { aspect-ratio: 16 / 10; object-fit: cover; }
.project__body { display: grid; gap: 1rem; }
.project__body h2 { margin: 0; font-size: var(--step-3); font-weight: 760; font-stretch: 120%; letter-spacing: -0.03em; line-height: 1; }
.project__body p { margin: 0; color: var(--ink-2); max-width: 46ch; }
.project__facts { display: flex; flex-wrap: wrap; gap: 0.4rem 1.5rem; margin: 0; color: var(--ink-3); font-size: var(--step--1); }
.project__facts dt { display: inline; }
.project__facts dd { display: inline; margin: 0 0 0 0.35rem; color: var(--ink-2); }
@media (min-width: 56rem) {
  .project { grid-template-columns: 1.15fr 0.85fr; }
  .project:nth-child(even) .project__shot { order: 2; }
}

/* Contatti */
.contact { display: grid; gap: clamp(2.5rem, 6vw, 5rem); }
.form { display: grid; gap: 1rem; }
.form__row { display: grid; gap: 1rem; }
@media (min-width: 40rem) { .form__row { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 0.4rem; }
.field label { font-size: 0.875rem; font-weight: 600; color: var(--ink-2); }
.field input, .field textarea {
  width: 100%; padding: 0.85rem 1rem; border-radius: 12px; border: 0;
  background: rgb(255 255 255 / 0.05); color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: box-shadow 0.2s, background-color 0.2s;
  caret-color: var(--accent);
}
.field textarea { min-height: 10rem; resize: vertical; line-height: 1.5; }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-3); }
.field input:hover, .field textarea:hover { box-shadow: inset 0 0 0 1px var(--line-strong); }
.field input:focus, .field textarea:focus { outline: none; background: rgb(255 255 255 / 0.07); box-shadow: inset 0 0 0 1.5px var(--accent); }
.field.has-error input, .field.has-error textarea { box-shadow: inset 0 0 0 1.5px #ff6b5e; }
.field__err { color: #ff8f85; font-size: 0.8125rem; min-height: 0; }
.form__status { min-height: 1.5rem; font-weight: 550; }
.form__status.is-ok { color: #7be486; }
.form__status.is-error { color: #ff8f85; }
.form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.form__foot small { color: var(--ink-3); }
.btn[aria-busy="true"] { opacity: 0.7; pointer-events: none; }
.contact__aside { display: grid; gap: 1.5rem; align-content: start; }
.contact__aside a { color: var(--ink); }
@media (min-width: 56rem) { .contact { grid-template-columns: 1.2fr 0.8fr; } }

/* ==========================================================================
   FOOTER
   ========================================================================== */

.footer { padding-block: clamp(3.5rem, 8vw, 6rem) 2.5rem; border-top: 1px solid var(--line); background: var(--stage); }
.footer__grid { display: grid; gap: 2.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); }
.footer__brand { display: grid; gap: 1rem; align-content: start; grid-column: 1 / -1; }
.footer__brand img { width: auto; height: 40px; }
.footer__brand p { margin: 0; color: var(--ink-3); max-width: 34ch; font-size: 0.9375rem; }
.footer h2 { margin: 0 0 0.8rem; font-size: 0.8125rem; font-weight: 650; color: var(--ink-3); letter-spacing: 0.02em; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.footer a { color: var(--ink-2); text-decoration: none; font-size: 0.9375rem; }
.footer a:hover { color: var(--ink); }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 0.8125rem; }
@media (min-width: 62rem) { .footer__grid { grid-template-columns: 1.6fr repeat(3, 1fr); } .footer__brand { grid-column: auto; } }

/* 404 */
.nf { min-height: 70svh; display: grid; align-content: center; gap: 1.5rem; padding-top: calc(var(--nav-h) + 3rem); }

/* ==========================================================================
   Movimento
   ========================================================================== */

/* Ingressi: il contenuto è visibile di base, JS aggiunge solo l'animazione */
.js [data-rise] { opacity: 0; transform: translateY(28px); }
.js [data-rise].is-in { opacity: 1; transform: none; transition: opacity 1s var(--ease-out), transform 1.2s var(--ease-out); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
  .js [data-rise] { opacity: 1; transform: none; }
  .stack__item { transform: none !important; position: relative; width: 100%; left: auto; right: auto; top: auto; margin-top: -40%; }
  .stack__item:first-child { margin-top: 0; }
  .chapters__frame > figure { transition: opacity 0.2s linear; transform: none; filter: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .nav { background: var(--stage); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .sheet { background: var(--stage); backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  :root { --ink-2: #dcd8cf; --ink-3: #b3aea4; --line: rgb(255 255 255 / 0.25); }
}

/* ---------- Rifiniture mobile ---------- */
.nav__brand span { white-space: nowrap; }
@media (max-width: 40rem) {
  .nav__brand { font-size: 0.9375rem; gap: 0.5rem; }
  .nav__brand img { width: auto; height: 22px; }
  .nav__tools { gap: 0.35rem; }
  .nav__lang { min-width: 2.25rem; padding: 0 0.5rem; }
  .lineup { grid-template-columns: 1fr 1fr; gap: 0.4rem; }
  .lineup a { --size: 36px; padding: 0.45rem; gap: 0.6rem; border-radius: 14px; }
  .lineup strong { font-size: 0.9rem; }
  .lineup a > span > span { display: none; }
  .stack { min-height: 15rem; }
  .scene__name { flex-wrap: wrap; --size: 52px; }
  .scene__name .display { font-size: clamp(2.3rem, 10.5vw, 3.4rem); font-stretch: 112%; }
  .app-hero__name { font-size: clamp(2.6rem, 13vw, 4rem); }
  .next-app__name .display { font-size: clamp(2rem, 10vw, 3rem); }
}
@media (max-width: 22rem) {
  .nav__brand span { display: none; }
}

/* ==========================================================================
   Livello "wow": faro, nastro, transizioni tra pagine, titoli che salgono
   ========================================================================== */

/* Il faro segue il puntatore (variabili aggiornate da JS con una molla) */
.hero { --mx: 72%; --my: 0%; --light: 1; }
.hero::before {
  background:
    radial-gradient(55% 55% at var(--mx) var(--my), rgb(247 148 29 / calc(0.17 * var(--light))), transparent 70%),
    radial-gradient(40% 40% at 20% 10%, rgb(255 255 255 / calc(0.05 * var(--light))), transparent 70%);
}
.app-hero { --light: 1; }
.app-hero::before { opacity: var(--light); }

/* Parole che salgono da una maschera */
.split-w { display: inline-block; overflow: clip; vertical-align: top; padding: 0 0.1em 0.08em 0.02em; margin: 0 -0.1em -0.08em -0.02em; }
.split-w > span { display: inline-block; will-change: transform; }

/* Nastro dei nomi */
.ribbon {
  position: relative;
  padding-block: clamp(1.5rem, 4vw, 3rem);
  overflow: clip;
  border-block: 1px solid var(--line);
  user-select: none;
}
.ribbon__track { display: flex; width: max-content; will-change: transform; }
.ribbon__group { display: flex; align-items: center; flex: none; }
.ribbon__item {
  display: inline-flex; align-items: center; gap: clamp(1rem, 2.5vw, 2rem);
  padding-inline: clamp(1rem, 2.5vw, 2rem);
  font-size: clamp(2.6rem, 1rem + 6vw, 6rem);
  font-weight: 820; font-stretch: 125%; letter-spacing: -0.03em; line-height: 1;
  color: #6f665b;
  text-decoration: none;
  transition: color 0.4s var(--ease-out);
}
.ribbon__item .appicon { --size: clamp(40px, 5vw, 72px); }
@media (hover: hover) and (pointer: fine) {
  .ribbon__item:hover { color: var(--accent); }
}
.ribbon__item:focus-visible { color: var(--accent); }

/* Transizioni tra pagine (Chrome, Edge, Safari 18+) */
@view-transition { navigation: auto; }
::view-transition-old(root),
::view-transition-new(root) { animation-duration: 0.45s; animation-timing-function: cubic-bezier(0.23, 1, 0.32, 1); }
::view-transition-group(*) { animation-duration: 0.6s; animation-timing-function: cubic-bezier(0.23, 1, 0.32, 1); }

/* Pulsanti magnetici: solo con puntatore fine */
.btn { translate: var(--tx, 0) var(--ty, 0); }
.btn .icon { transition: transform 0.35s var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover [href*="download"] .icon, a.btn[data-download]:hover .icon { transform: translateY(2px); }
  .link-arrow:hover .icon, .btn:hover > .icon:last-child:not(:first-child) { transform: translateX(4px); }
}

@media (prefers-reduced-motion: reduce) {
  .ribbon__track { transform: none !important; flex-wrap: wrap; width: auto; }
  .ribbon__group + .ribbon__group { display: none; }
  @view-transition { navigation: none; }
}

/* Ritocchi dopo la prima revisione */
.hero__title { font-size: clamp(3rem, 1.2rem + 6.4vw, 5.4rem); text-wrap: initial; }
.scene__name .display { font-size: clamp(2.6rem, 0.8rem + 4.6vw, 4.4rem); white-space: nowrap; }
@media (min-width: 62rem) {
  .hero__grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
  .scene__inner { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }
}
@media (max-width: 40rem) {
  .statement p { font-size: clamp(1.45rem, 6.4vw, 1.9rem); }
}

/* ==========================================================================
   Revisione finale: hero keynote, download nel primo viewport, momento a tutto schermo
   ========================================================================== */

/* Navigazione: link a destra */
.nav__inner > nav { margin-left: auto; }
.nav__links { margin: 0; }

/* Hero: titolo enorme a tutta larghezza, su due righe */
.hero { padding-top: calc(var(--nav-h) + clamp(2rem, 7vh, 5rem)); align-content: start; }
.hero__title {
  font-size: clamp(3rem, 0.6rem + 8.2vw, 6rem);
  line-height: 0.88;
  letter-spacing: -0.035em;
  margin-bottom: clamp(1.5rem, 4vh, 3rem);
}
@media (min-width: 80rem) {
  .hero__title > span:first-child { white-space: nowrap; }
}
.hero__grid { gap: clamp(2rem, 4vw, 3rem); }
.hero__copy { gap: 1.5rem; max-width: 40rem; position: relative; z-index: 2; }

/* Pulsanti di download per le app desktop */
.hero__downloads { display: grid; gap: 0.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12.5rem), 1fr)); }
.dlpill {
  --size: 38px;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0.7rem;
  padding: 0.5rem 0.85rem 0.5rem 0.5rem; border-radius: 16px; text-decoration: none;
  background: color-mix(in srgb, var(--accent) 16%, rgb(255 255 255 / 0.03));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 34%, transparent);
  transition: background-color 0.3s var(--ease-out), transform 0.12s ease-out, box-shadow 0.3s;
}
.dlpill:hover { background: color-mix(in srgb, var(--accent) 26%, rgb(255 255 255 / 0.03)); box-shadow: inset 0 0 0 1px var(--accent); }
.dlpill:active { transform: scale(0.98); }
.dlpill strong { display: block; font-weight: 700; font-stretch: 110%; font-size: 0.98rem; line-height: 1.15; }
.dlpill small { display: block; color: var(--ink-2); font-size: 0.78rem; line-height: 1.3; }
.dlpill > .icon { color: var(--accent); width: 1.1rem; height: 1.1rem; transition: transform 0.35s var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .dlpill:hover > .icon { transform: translateY(2px); } }

/* Scaletta più discreta: il download è l'azione principale */
.lineup a { background: rgb(255 255 255 / 0.025); }

/* Pila: più grande, ogni finestra mostra una faccia leggibile */
@media (min-width: 62rem) {
  .hero__grid { grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr); align-items: start; }
  .stack { min-height: 40rem; margin-right: calc(-1 * var(--gutter)); }
  .stack__item { width: 82%; }
  .stack__item--1 { right: 0; left: auto; top: -2%; }
  .stack__item--2 { left: 0; top: 20%; }
  .stack__item--3 { right: 4%; left: auto; top: 44%; }
}
@media (max-width: 61.99rem) {
  .stack { min-height: clamp(17rem, 70vw, 30rem); }
  .stack__item { width: 76%; }
  .stack__item--1 { right: 0; top: 0; }
  .stack__item--2 { left: 0; top: 22%; }
  .stack__item--3 { left: 18%; top: 44%; }
}

/* Scena: meno vuoto prima del primo atto */
.scene.is-pinned .scene__track { height: calc(var(--acts) * 100svh + 15svh); }
.scene > .section__head { margin-bottom: clamp(1rem, 3vw, 2rem); }

/* Momento keynote a tutto schermo */
.bigshot { position: relative; isolation: isolate; }
.bigshot__stage { position: relative; display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); padding-block: clamp(4rem, 9vw, 7rem) clamp(3rem, 6vw, 5rem); }
.bigshot__stage::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(60% 50% at 50% 30%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 72%);
}
.bigshot__copy { display: grid; gap: 1rem; text-align: center; justify-items: center; }
.bigshot__copy .h1 { max-width: 16ch; }
.bigshot__copy .lead { text-align: center; max-width: 44ch; }
.bigshot__frame { width: 100%; padding-inline: clamp(0.5rem, 2vw, 2rem); perspective: 1600px; }
.bigshot__frame .shot { width: min(100%, 110rem); margin-inline: auto; transform-origin: 50% 0; }
.bigshot__cta { text-align: center; }
.js .bigshot.is-staged .bigshot__stage { min-height: 100svh; position: sticky; top: 0; align-content: center; overflow: clip; }
.js .bigshot.is-staged { height: 190svh; }

/* Sezione mobile e web: meno vuoto sotto */
.pocket { padding-bottom: calc(var(--section) * 0.7); }

/* Mobile: il cambio di scena diventa una sequenza animata per atto */
@media (max-width: 61.99rem) {
  .scene__act { min-height: auto; padding-block: 4.5rem 3.5rem; }
  .scene__act .shot { transform-origin: 50% 0; }
}

/* Secondo giro di revisione */
.lineup { grid-template-columns: repeat(auto-fill, minmax(min(100%, 12.5rem), 1fr)); }
.lineup a { --size: 38px; }
@media (min-width: 62rem) {
  .stack__item--1 { left: 0; right: auto; top: 0; }
  .stack__item--2 { right: 0; left: auto; top: 6%; }
  .stack__item--3 { left: 6%; right: auto; top: 54%; }
  .stack { min-height: 42rem; }
}
@media (max-width: 61.99rem) {
  .hero__grid > .stack { order: -1; margin-bottom: 0.5rem; }
  .hero__title { margin-bottom: 1rem; }
}
.js .bigshot.is-staged { height: 165svh; }
.bigshot__stage { padding-bottom: clamp(2rem, 4vw, 3rem); }
@media (max-width: 40rem) {
  .bigshot__frame { padding-inline: 0; }
}
.about-short { padding-bottom: 0; }
.section:has(.about-short) { padding-bottom: calc(var(--section) * 0.6); }

/* VideoSTAX: la codifica avanza con lo scroll */
.encode { padding-block: calc(var(--section) * 0.4) var(--section); }
.encode__stage { position: relative; }
.encode.is-staged .encode__stage { height: 170svh; }
.encode__sticky { position: sticky; top: calc(var(--nav-h) + 3svh); display: grid; gap: clamp(1.25rem, 3vw, 2rem); justify-items: center; text-align: center; }
.encode__sticky .h2 { max-width: 18ch; }
.encode__window { position: relative; width: min(100%, 64rem); }
.encode__bar {
  position: absolute; left: 4%; right: 4%; bottom: 7%;
  height: 12px; border-radius: 12px; background: rgb(0 0 0 / 0.55);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.12), 0 10px 30px -10px rgb(0 0 0 / 0.8);
  overflow: hidden;
}
.encode__fill { position: absolute; inset: 0; transform-origin: 0 50%; transform: scaleX(var(--p, 1)); background: linear-gradient(90deg, #f9d423, #ff4e50); }
.encode__pct { font-family: var(--mono); font-size: clamp(2.4rem, 6vw, 4.5rem); font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1; }
.encode__note { color: var(--ink-3); font-size: var(--step--1); }
.encode__window { width: min(100%, 64rem, calc((100svh - 20rem) * 1.55)); }
.bigshot + .pocket { padding-top: calc(var(--section) * 0.45); }
.js .bigshot.is-staged { height: 150svh; }
@media (max-width: 61.99rem) {
  .stack__item--3 { left: 22%; top: 54%; }
  .stack { min-height: clamp(18rem, 76vw, 32rem); }
}

/* ==========================================================================
   Mouse: il faro segue il cursore, le schede si accendono dove passi
   ========================================================================== */

.cursor-light {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(520px circle at var(--cx, 50%) var(--cy, -20%), color-mix(in srgb, var(--accent) 13%, transparent), transparent 62%);
  opacity: 0; transition: opacity 0.6s var(--ease-out);
}
.cursor-light.is-on { opacity: 1; }
main, .footer { position: relative; z-index: 1; }

/* Luce interna che segue il puntatore */
[data-glow] { position: relative; isolation: isolate; }
[data-glow]::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1;
  background: radial-gradient(260px circle at var(--gx, 50%) var(--gy, 50%), color-mix(in srgb, var(--accent) 20%, transparent), transparent 70%);
  opacity: 0; transition: opacity 0.35s var(--ease-out);
}
[data-glow]:hover::after { opacity: 1; }

/* Inclinazione 3D con molla (valori da JS) */
[data-tilt] { transform: perspective(1100px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transform-style: preserve-3d; }

/* ==========================================================================
   Contatti
   ========================================================================== */

.contact-hero { position: relative; padding-top: calc(var(--nav-h) + clamp(2rem, 7vh, 5rem)); padding-bottom: clamp(2rem, 5vw, 4rem); overflow: clip; isolation: isolate; }
.contact-hero::before {
  content: ""; position: absolute; z-index: -1; inset: -10% -10% auto; height: 130%;
  background: radial-gradient(45% 55% at 75% 30%, rgb(247 148 29 / 0.14), transparent 70%);
}
.contact-hero__grid { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.contact-hero__copy { display: grid; gap: 1.5rem; }
.contact-hero__copy .lead { max-width: 40ch; }
.contact-hero__clock { display: inline-flex; align-items: center; gap: 0.6rem; margin: 0; color: var(--ink-2); font-size: 0.9375rem; }
.contact-hero__clock .mono { color: var(--ink); font-size: 0.9375rem; }
@media (min-width: 62rem) { .contact-hero__grid { grid-template-columns: 1fr 1fr; } }

/* Costellazione delle app */
.orbit { position: relative; width: min(100%, 30rem); aspect-ratio: 1; margin-inline: auto; --r: 41%; container-type: inline-size; }
.orbit__ring { position: absolute; inset: 0; border-radius: 50%; box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.07); }
.orbit__ring--2 { inset: 18%; box-shadow: inset 0 0 0 1px rgb(247 148 29 / 0.16); }
.orbit__center {
  position: absolute; left: 50%; top: 50%; width: 38%; aspect-ratio: 1; translate: -50% -50%;
  border-radius: 50%; overflow: hidden;
  box-shadow: 0 0 0 6px rgb(255 255 255 / 0.04), 0 30px 70px -20px rgb(0 0 0 / 0.9), 0 0 80px -10px rgb(247 148 29 / 0.35);
}
.orbit__center img { width: 100%; height: 100%; object-fit: cover; }
.orbit__icon {
  --a: calc(360deg / var(--n) * var(--i) - 90deg);
  position: absolute;
  left: calc(50% + cos(var(--a)) * var(--r));
  top: calc(50% + sin(var(--a)) * var(--r));
  --size: clamp(46px, 13cqi, 64px);
  translate: -50% -50%;
  transform: translate3d(var(--px, 0), var(--py, 0), 0);
  animation: orbit-float 6s ease-in-out infinite;
  animation-delay: calc(var(--i) * -0.9s);
}
.orbit__icon .appicon { box-shadow: 0 14px 30px -10px rgb(0 0 0 / 0.9), 0 0 0 1px rgb(255 255 255 / 0.08), 0 0 40px -12px var(--accent); }
@keyframes orbit-float { 50% { margin-top: -8px; } }

/* Pannello del modulo */
.panel {
  padding: clamp(1.25rem, 3vw, 2.25rem); border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgb(255 255 255 / 0.045), rgb(255 255 255 / 0.02));
  box-shadow: inset 0 0 0 1px var(--line), 0 40px 80px -50px rgb(0 0 0 / 0.9);
}
.topics { border: 0; margin: 0 0 0.5rem; padding: 0; }
.topics legend { padding: 0; margin-bottom: 0.75rem; font-weight: 650; font-stretch: 108%; font-size: var(--step-1); }
.topics__list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.topic {
  border: 0; cursor: pointer; padding: 0.55rem 0.95rem; border-radius: 999px; font-size: 0.9375rem; font-weight: 550;
  background: rgb(255 255 255 / 0.05); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line);
  transition: background-color 0.25s, color 0.25s, box-shadow 0.25s, transform 0.12s ease-out;
}
.topic:hover { color: var(--ink); background: rgb(255 255 255 / 0.08); }
.topic:active { transform: scale(0.97); }
.topic[aria-pressed="true"] { background: var(--brand); color: var(--brand-ink); box-shadow: none; }

/* Canali */
.channels { display: grid; gap: 0.75rem; align-content: start; }
.channel {
  display: grid; grid-template-columns: auto 1fr auto; gap: 1rem; align-items: start;
  padding: 1.25rem; border-radius: var(--radius-lg); text-decoration: none; color: var(--ink);
  background: rgb(255 255 255 / 0.035); box-shadow: inset 0 0 0 1px var(--line);
  transition: box-shadow 0.3s var(--ease-out), background-color 0.3s;
}
.channel--link:hover { box-shadow: inset 0 0 0 1px rgb(247 148 29 / 0.45); }
.channel > .icon { color: var(--ink-3); margin-top: 0.2rem; transition: transform 0.35s var(--ease-out), color 0.2s; }
.channel--link:hover > .icon { transform: translate(3px, -3px); color: var(--brand); }
.channel__icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: rgb(247 148 29 / 0.12); color: var(--brand); }
.channel__icon--heart { background: rgb(234 74 170 / 0.12); color: #ea4aaa; }
.channel__body { display: grid; gap: 0.3rem; min-width: 0; }
.channel__body h2 { margin: 0; font-size: 1.05rem; font-weight: 700; font-stretch: 110%; }
.channel__body p { margin: 0; color: var(--ink-2); font-size: 0.9375rem; overflow-wrap: anywhere; }
.channel__body a { color: var(--ink); }
.channel__apps { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.5rem; }
.channel__apps .chip { --size: 20px; padding: 0.25rem 0.65rem 0.25rem 0.3rem; }
.channel__apps .chip .appicon { border-radius: 6px; }
.channel__apps .chip .appicon--svg { padding: 3px; }
.channel__action {
  border: 0; cursor: pointer; padding: 0.45rem 0.8rem; border-radius: 999px; font-size: 0.8125rem; font-weight: 650;
  background: rgb(255 255 255 / 0.07); color: var(--ink); transition: background-color 0.2s, transform 0.12s ease-out;
}
.channel__action:hover { background: rgb(255 255 255 / 0.12); }
.channel__action:active { transform: scale(0.96); }
.channel__action.is-done { background: rgb(123 228 134 / 0.18); color: #9ff0a8; }

@media (prefers-reduced-motion: reduce) {
  .orbit__icon { animation: none; }
  .cursor-light { display: none; }
}
@media (hover: none) { .cursor-light { display: none; } }

/* ==========================================================================
   Idee della community
   ========================================================================== */
.ideas { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (min-width: 62rem) { .ideas { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); } .ideas__form { position: sticky; top: calc(var(--nav-h) + 1.5rem); } }
.ideas__form .h3 { margin-bottom: 0.25rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.topic--radio { display: inline-flex; position: relative; }
.topic--radio input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.topic--radio:has(input:checked) { background: var(--brand); color: var(--brand-ink); box-shadow: none; }
.topic--radio:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.ideas__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.ideas__sort { display: flex; gap: 0.25rem; padding: 0.25rem; border-radius: 999px; background: rgb(255 255 255 / 0.05); }
.ideas__sort a { padding: 0.4rem 0.9rem; border-radius: 999px; text-decoration: none; color: var(--ink-2); font-size: 0.875rem; font-weight: 600; }
.ideas__sort a[aria-current="true"] { background: var(--ink); color: #0b0b0c; }
.ideas__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.idea {
  display: grid; grid-template-columns: auto 1fr; gap: 1.1rem; align-items: start;
  padding: 1.25rem; border-radius: var(--radius-lg);
  background: rgb(255 255 255 / 0.035); box-shadow: inset 0 0 0 1px var(--line);
}
.idea__vote {
  display: grid; justify-items: center; gap: 0.1rem; min-width: 3.5rem; padding: 0.6rem 0.4rem;
  border: 0; border-radius: 14px; cursor: pointer; color: var(--ink-2);
  background: rgb(255 255 255 / 0.05); box-shadow: inset 0 0 0 1px var(--line);
  transition: background-color 0.25s, color 0.25s, transform 0.12s ease-out, box-shadow 0.25s;
}
.idea__vote:hover { color: var(--ink); box-shadow: inset 0 0 0 1px rgb(247 148 29 / 0.5); }
.idea__vote:active { transform: scale(0.94); }
.idea__vote.is-voted { background: var(--brand); color: var(--brand-ink); box-shadow: none; }
.idea__vote .icon { width: 1.2rem; height: 1.2rem; transition: transform 0.4s var(--ease-out); }
.idea__vote.is-bump .icon { transform: translateY(-4px); }
.idea__count { font-family: var(--mono); font-weight: 650; font-size: 1rem; font-variant-numeric: tabular-nums; }
.idea__body { display: grid; gap: 0.45rem; min-width: 0; }
.idea__body h3 { margin: 0; font-size: 1.15rem; font-weight: 700; font-stretch: 110%; line-height: 1.25; }
.idea__body p { margin: 0; color: var(--ink-2); overflow-wrap: anywhere; }
.idea__meta { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.idea__by { font-size: 0.875rem; color: var(--ink-3) !important; }
.idea__reply { margin-top: 0.4rem; padding: 0.8rem 1rem; border-radius: 12px; background: rgb(247 148 29 / 0.08); }
.idea__reply strong { font-size: 0.8125rem; color: var(--brand); }
.idea__reply p { margin-top: 0.25rem; color: var(--ink); }
.status { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.25rem 0.65rem; border-radius: 999px; font-size: 0.78rem; font-weight: 650; background: rgb(255 255 255 / 0.07); color: var(--ink-2); }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status--planned { color: #8ab4ff; background: rgb(138 180 255 / 0.12); }
.status--in_progress { color: #f7b34d; background: rgb(247 179 77 / 0.12); }
.status--done { color: #7be486; background: rgb(123 228 134 / 0.12); }
.ideas__empty { padding: 2rem; border-radius: var(--radius-lg); background: rgb(255 255 255 / 0.03); color: var(--ink-2); text-align: center; }
.ideas__fund { margin-top: 1.5rem; padding: 1.5rem; border-radius: var(--radius-lg); background: rgb(247 148 29 / 0.08); box-shadow: inset 0 0 0 1px rgb(247 148 29 / 0.25); display: grid; gap: 1rem; }
.ideas__fund p { margin: 0; color: var(--ink); }

/* Teaser idee nella home */
.ideas-teaser { display: grid; gap: 1.5rem; align-items: center; padding: clamp(1.5rem, 4vw, 3rem); border-radius: var(--radius-lg); background: linear-gradient(135deg, rgb(255 255 255 / 0.05), rgb(255 255 255 / 0.015)); box-shadow: inset 0 0 0 1px var(--line); }
.ideas-teaser p { margin: 0; color: var(--ink-2); max-width: 52ch; font-size: var(--step-1); }
@media (min-width: 56rem) { .ideas-teaser { grid-template-columns: 1fr auto; } }

/* ==========================================================================
   Video promozionali
   ========================================================================== */
.promo { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: #000; }
.film { position: relative; padding-block: calc(var(--section) * 0.5) var(--section); isolation: isolate; }
.film::before {
  content: ""; position: absolute; z-index: -1; inset: 10% 0 0;
  background: radial-gradient(50% 45% at 50% 55%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 75%);
  pointer-events: none;
}
.film__head { text-align: center; margin-bottom: clamp(1.5rem, 4vw, 3rem); }
.film__head .h2 { margin-inline: auto; max-width: 20ch; }
.film__frame { padding-inline: clamp(0.5rem, 2vw, 2rem); perspective: 1600px; }
.film__screen {
  position: relative; width: min(100%, 140rem); margin-inline: auto; border-radius: clamp(14px, 1.6vw, 26px); overflow: hidden;
  transform-origin: 50% 20%;
  box-shadow: 0 50px 120px -40px rgb(0 0 0 / 0.95), 0 30px 80px -40px color-mix(in srgb, var(--accent) 45%, transparent), inset 0 0 0 1px rgb(255 255 255 / 0.06);
}
.film__toggle {
  position: absolute; left: clamp(0.75rem, 2vw, 1.5rem); bottom: clamp(0.75rem, 2vw, 1.5rem);
  display: grid; place-items: center; width: 3.25rem; height: 3.25rem; border: 0; border-radius: 50%; cursor: pointer;
  color: #fff; background: rgb(20 18 16 / 0.55); backdrop-filter: blur(12px) saturate(160%); -webkit-backdrop-filter: blur(12px) saturate(160%);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.18);
  transition: transform 0.15s ease-out, background-color 0.25s;
}
.film__toggle:hover { background: rgb(20 18 16 / 0.75); }
.film__toggle:active { transform: scale(0.94); }
.film__toggle .icon { width: 1.4rem; height: 1.4rem; }
.film__toggle .icon--pause, .film__screen.is-playing .film__toggle .icon--play { display: none; }
.film__screen.is-playing .film__toggle .icon--pause { display: block; }
.film__progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgb(255 255 255 / 0.12); }
.film__progress span { position: absolute; inset: 0; transform-origin: 0 50%; transform: scaleX(var(--p, 0)); background: var(--accent); }
.scene__media .promo { border-radius: inherit; }
@media (prefers-reduced-motion: reduce) { .film__screen { transform: none !important; } }
/* Schermi larghi: il titolo cresce con lo schermo */
.hero__title { font-size: clamp(3rem, 0.4rem + 6.4vw, 8rem); }
.app-hero__name { font-size: clamp(3.2rem, 1rem + 7.5vw, 8.5rem); }
@media (min-width: 100rem) { .hero__copy { max-width: 48rem; } }

/* Il faro si accende all'apertura: animazione di opacità (sul compositor) */
@keyframes stage-light-on { from { opacity: 0; } to { opacity: 1; } }
.js .hero::before, .js .app-hero::before { animation: stage-light-on 1.8s cubic-bezier(0.25, 0.1, 0.25, 1) both; }

/* ==========================================================================
   Video come sfondo animato, fuso con la pagina
   ========================================================================== */
.ambient {
  position: relative;
  min-height: 100svh;
  display: grid; align-items: end;
  overflow: clip;
  isolation: isolate;
  margin-block: clamp(2rem, 6vw, 5rem);
}
.ambient__media {
  position: absolute; inset: 0; z-index: -2;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 22%, #000 72%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 22%, #000 72%, transparent 100%);
}
.ambient__media .promo { width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; background: transparent; }
/* Velatura: bordi che sfumano nel palco e leggibilità del testo in basso a sinistra */
.ambient::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 45%, transparent 55%, var(--stage) 100%),
    linear-gradient(to top, rgb(13 11 9 / 0.92) 0%, rgb(13 11 9 / 0.55) 28%, transparent 55%),
    linear-gradient(to right, rgb(13 11 9 / 0.6) 0%, transparent 45%);
}
.ambient__content { display: grid; gap: 1rem; padding-bottom: clamp(4rem, 12vh, 9rem); position: relative; }
.ambient__title { font-size: clamp(2.6rem, 1rem + 5.4vw, 7rem); max-width: 14ch; text-shadow: 0 4px 40px rgb(0 0 0 / 0.5); }
.ambient__content .lead { color: var(--ink); max-width: 36ch; text-shadow: 0 2px 20px rgb(0 0 0 / 0.6); }
.ambient__toggle { left: auto; right: var(--gutter); bottom: clamp(4rem, 12vh, 9rem); position: absolute; width: 2.75rem; height: 2.75rem; }
.ambient .film__toggle .icon { width: 1.15rem; height: 1.15rem; }
.ambient.is-playing .film__toggle .icon--play { display: none; }
.ambient.is-playing .film__toggle .icon--pause { display: block; }

/* Mobile: video intero 16:9, testo sotto, stesse sfumature */
@media (max-width: 61.99rem) {
  .ambient { min-height: 0; display: block; }
  .ambient__media { position: relative; inset: auto; aspect-ratio: 16 / 9; width: 100%;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 14%, #000 80%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, #000 14%, #000 80%, transparent 100%); }
  .ambient::before { background: radial-gradient(130% 70% at 50% 25%, transparent 55%, var(--stage) 100%); }
  .ambient__content { padding-top: 0.5rem; padding-bottom: 1rem; margin-top: -2.5rem; }
  .ambient__toggle { top: 0.75rem; bottom: auto; right: var(--gutter); }
}

/* Video di sfondo v2: il testo sta sopra, il video resta intero e pulito (ha già le sue scritte) */
.ambient { min-height: 0; display: block; overflow: clip; margin-block: clamp(3rem, 8vw, 7rem) 0; }
.ambient::before { content: none; }
.ambient__content { position: relative; z-index: 1; text-align: center; justify-items: center; padding: 0 0 clamp(0.5rem, 2vw, 1.5rem); }
.ambient__title { font-size: var(--step-4); max-width: 18ch; text-shadow: none; }
.ambient__content .lead { color: var(--ink-2); text-align: center; text-shadow: none; }
.ambient__stage { position: relative; isolation: isolate; }
.ambient__stage::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(130% 120% at 50% 50%, transparent 62%, var(--stage) 100%);
}
.ambient__media {
  position: relative; inset: auto; z-index: auto; width: 100%; aspect-ratio: 16 / 9;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 12%, #000 88%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 12%, #000 88%, transparent 100%);
}
.ambient__media .promo { width: 100%; height: 100%; object-fit: contain; }
.ambient__toggle { position: absolute; z-index: 2; top: auto; bottom: 14%; right: var(--gutter); left: auto; }
@media (max-width: 61.99rem) {
  .ambient__content { margin-top: 0; padding-bottom: 0.5rem; }
  .ambient__toggle { bottom: 14%; top: auto; }
}
.ambient__stage::after { content: none; }
.ambient__toggle { bottom: 2%; width: 2.5rem; height: 2.5rem; opacity: 0.75; transition: opacity 0.25s, transform 0.15s ease-out, background-color 0.25s; }
.ambient__toggle:hover, .ambient__toggle:focus-visible { opacity: 1; }
@media (max-width: 61.99rem) { .ambient__toggle { bottom: 2%; } }

/* ==========================================================================
   Home: mazzo 3D che scorre da solo (dal basso verso l'alto)
   ========================================================================== */
.deck {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 13;
  perspective: 1700px;
  perspective-origin: 50% 20%;
  transform-style: preserve-3d;
  isolation: isolate;
}
.deck__card {
  position: absolute; left: 7%; bottom: 0; width: 86%;
  display: block; text-decoration: none; color: inherit;
  transform-origin: 50% 100%;
  backface-visibility: hidden;
  will-change: transform, opacity;
}
.deck__card .shot { display: block; aspect-ratio: 16 / 10; }
.deck__card .shot picture, .deck__card .shot img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.deck__label {
  position: absolute; left: 1rem; bottom: 1rem;
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.35rem 0.85rem 0.35rem 0.35rem; border-radius: 999px;
  background: rgb(13 11 9 / 0.62); backdrop-filter: blur(12px) saturate(160%); -webkit-backdrop-filter: blur(12px) saturate(160%);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.12);
  font-weight: 650; font-stretch: 110%; font-size: 0.9375rem; color: var(--ink);
  --size: 26px;
}
.deck__label .appicon { border-radius: 8px; }
.deck__label .appicon--svg { padding: 4px; }
/* Senza JS o con "riduci movimento": mazzo statico, prima finestra davanti */
.deck__card:nth-child(1) { z-index: 4; }
.deck__card:nth-child(2) { z-index: 3; }
.deck__card:nth-child(3) { z-index: 2; }
.deck__card:nth-child(n+2) { opacity: 0; }
.js .deck__card:nth-child(n+2) { opacity: 1; }
@media (min-width: 62rem) {
  .hero__grid { align-items: center; }
  .deck { max-height: calc(100svh - var(--nav-h) - 3rem); margin-inline: auto; }
}
@media (max-width: 61.99rem) {
  .hero__grid > .deck { order: -1; margin-bottom: 0.5rem; }
}
@media (min-width: 62rem) {
  .hero__grid { align-items: start; }
  .deck { width: min(100%, calc((100svh - var(--nav-h) - 21rem) * 1.23)); max-height: none; margin: -1rem 0 0 auto; }
}

/* Mazzo: ombra delle finestre non attive (opacità guidata da JS) */
.deck__shade {
  position: absolute; inset: 0; border-radius: var(--radius); pointer-events: none;
  background: #0d0b09; opacity: var(--shade, 0);
}
.deck__card .shot { position: relative; }
@media (prefers-reduced-motion: reduce) {
  .deck__card:nth-child(2) .deck__shade { opacity: 0.45; }
  .deck__card:nth-child(3) .deck__shade { opacity: 0.7; }
}

/* ==========================================================================
   Pagina di ringraziamento (donazioni)
   ========================================================================== */
.thanks { position: relative; min-height: 92svh; display: grid; align-items: center; padding-top: calc(var(--nav-h) + 3rem); padding-bottom: 3rem; overflow: clip; isolation: isolate; }
.thanks::before {
  content: ""; position: absolute; inset: -10% -10% auto; height: 120%; z-index: -2;
  background: radial-gradient(45% 50% at 50% 30%, rgb(247 148 29 / 0.22), transparent 70%);
  animation: stage-light-on 1.8s ease-out both;
}
.thanks__inner { display: grid; justify-items: center; text-align: center; gap: 1.25rem; }
.thanks__heart { position: relative; margin-block: 3.5rem 4.25rem !important; width: clamp(8rem, 18vw, 11rem); aspect-ratio: 1; display: grid; place-items: center; margin-bottom: 0.5rem; }
.thanks__heart-svg { width: 46%; color: var(--brand); filter: drop-shadow(0 18px 40px rgb(247 148 29 / 0.45)); animation: heart-beat 1.6s cubic-bezier(0.23, 1, 0.32, 1) infinite; }
@keyframes heart-beat { 0%, 100% { transform: scale(1); } 14% { transform: scale(1.14); } 28% { transform: scale(1); } 42% { transform: scale(1.08); } 70% { transform: scale(1); } }
.thanks__orbit { position: absolute; inset: -30%; animation: orbit-spin 28s linear infinite; }
.thanks__app {
  --a: calc(360deg / var(--n) * var(--i));
  position: absolute;
  left: calc(50% + cos(var(--a) - 90deg) * 50%);
  top: calc(50% + sin(var(--a) - 90deg) * 50%);
  translate: -50% -50%;
  --size: clamp(30px, 4.5vw, 42px);
}
.thanks__app .appicon { animation: orbit-counter 28s linear infinite; box-shadow: 0 10px 24px -8px rgb(0 0 0 / 0.9), 0 0 30px -10px var(--accent); }
@keyframes orbit-spin { to { rotate: 360deg; } }
@keyframes orbit-counter { to { rotate: -360deg; } }
.thanks__title { font-size: clamp(3rem, 1rem + 7vw, 7.5rem); }
.thanks__lead { text-align: center; max-width: 46ch; margin-inline: auto; }
.thanks__badge {
  display: inline-flex; align-items: center; gap: 0.45rem; margin: 0; padding: 0.4rem 0.9rem; border-radius: 999px;
  background: rgb(123 228 134 / 0.14); color: #9ff0a8; font-weight: 650; font-size: 0.875rem;
}
.thanks__sign { display: inline-flex; align-items: center; gap: 0.75rem; margin: 0.5rem 0 0; color: var(--ink-2); font-weight: 600; font-stretch: 108%; }
.thanks__avatar { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 2px rgb(247 148 29 / 0.6); }
.thanks__avatar img { width: 100%; height: 100%; object-fit: cover; }
.thanks__share { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.thanks__share button.chip { border: 0; cursor: pointer; font: inherit; font-size: 0.8125rem; }
/* Scintille che salgono */
.thanks__sparks { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.thanks__sparks span {
  position: absolute; left: var(--x); bottom: -10px; width: var(--s); height: var(--s); border-radius: 50%;
  background: radial-gradient(circle, #ffc27a, rgb(247 148 29 / 0));
  animation: spark-rise var(--d) linear infinite; animation-delay: var(--delay); opacity: 0;
}
@keyframes spark-rise { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: 0.9; } 100% { transform: translateY(-95svh) translateX(20px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .thanks__sparks, .thanks__orbit { animation: none; }
  .thanks__sparks span, .thanks__heart-svg, .thanks__app .appicon { animation: none; }
}
/* QR PayPal nella pagina Sostienimi */
.qr { display: flex; align-items: center; gap: 1rem; margin: 0.25rem 0 0; }
.qr img { width: 132px; height: 132px; padding: 8px; border-radius: 14px; background: #fff; box-shadow: 0 16px 40px -18px rgb(0 0 0 / 0.9); }
.qr figcaption { color: var(--ink-2); font-size: 0.9375rem; max-width: 18ch; }
@media (max-width: 40rem) { .qr { display: none; } }
/* Mazzo: tutte le finestre con lo stesso formato, così la pila resta sempre visibile */
.deck__card .shot { display: block !important; aspect-ratio: 16 / 10 !important; height: auto !important; overflow: hidden; }
.deck__card .shot picture, .deck__card .shot img { display: block; width: 100%; height: 100% !important; object-fit: cover; object-position: top center; }

/* ==========================================================================
   Slider delle schermate (coverflow 3D)
   ========================================================================== */
.gallery { padding-block: calc(var(--section) * 0.6); overflow: clip; }
.gallery__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: clamp(1.5rem, 4vw, 3rem); }
.gallery__nav { display: flex; gap: 0.5rem; }
.gallery__btn {
  display: grid; place-items: center; width: 3rem; height: 3rem; border: 0; border-radius: 50%; cursor: pointer;
  background: rgb(255 255 255 / 0.07); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line);
  transition: background-color 0.2s, transform 0.12s ease-out;
}
.gallery__btn:hover { background: color-mix(in srgb, var(--accent) 22%, rgb(255 255 255 / 0.05)); }
.gallery__btn:active { transform: scale(0.94); }
.gallery__btn[data-gallery-prev] .icon { transform: rotate(180deg); }
.gallery__track {
  --item: clamp(190px, 22vw, 290px);
  display: flex; gap: clamp(0.5rem, 2vw, 1.5rem);
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scrollbar-width: none;
  padding: 2rem calc(50% - var(--item) / 2) 3rem;
  perspective: 1400px;
  cursor: grab;
}
.gallery__track::-webkit-scrollbar { display: none; }
.gallery__track.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.gallery__track:focus-visible { outline-offset: -4px; }
.gallery__item {
  flex: 0 0 var(--item); margin: 0; scroll-snap-align: center;
  transform-style: preserve-3d; will-change: transform;
}
.gallery__item .phone { width: 100%; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .gallery__item { transform: none !important; opacity: 1 !important; } }

/* Telefoni: la proporzione la dà lo schermo (immagine o video), così il contenuto entra intero */
.phone { aspect-ratio: auto !important; height: auto; }
.phone > picture, .phone > img, .phone > .phone__video {
  display: block; width: 100%; height: auto !important;
  aspect-ratio: var(--phone-ar, 9 / 19);
  border-radius: 38px; overflow: hidden; background: #000;
}
.phone > picture img { width: 100%; height: 100% !important; object-fit: cover; object-position: top; border-radius: 0; }
.phone__video { object-fit: cover; }
.chapters__frame .phone { height: auto !important; width: min(100%, calc((88svh - var(--nav-h) - 2rem) * 0.5)); }
.gallery__track { align-items: center; }
/* Telefoni: angoli meno arrotondati */
.phone { border-radius: clamp(20px, 2.2vw, 28px); padding: clamp(6px, 0.6vw, 8px); }
.phone > picture, .phone > img, .phone > .phone__video { border-radius: clamp(14px, 1.7vw, 21px); }

/* ---------- Progetti: schermate dei siti che scorrono da sole ---------- */
.shots { position: relative; display: grid; border: 1px solid rgb(255 255 255 / 0.08); --shot-dur: 5s; }
.shots__bar { display: flex; align-items: center; gap: 6px; padding: 0.6rem 0.85rem; background: rgb(255 255 255 / 0.04); border-bottom: 1px solid rgb(255 255 255 / 0.06); }
.shots__bar i { width: 9px; height: 9px; border-radius: 50%; background: rgb(255 255 255 / 0.16); }
.shots__bar span { margin-inline: auto; padding: 0.2rem 0.9rem; border-radius: 99px; background: rgb(255 255 255 / 0.06); color: var(--ink-2); font-family: var(--mono, ui-monospace, monospace); font-size: 0.72rem; letter-spacing: 0.02em; transform: translateX(-14px); }
.shots__stage { display: grid; overflow: hidden; aspect-ratio: 16 / 10; }
.shots__slide { grid-area: 1 / 1; opacity: 0; transition: opacity 0.9s cubic-bezier(.4, 0, .2, 1); }
.shots__slide img { width: 100%; height: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top center; transform: scale(1.04); transform-origin: 50% 0; }
.shots__slide.is-on { opacity: 1; }
.shots__slide.is-on img { animation: shots-drift calc(var(--shot-dur) + 1s) linear both; }
@keyframes shots-drift { from { transform: scale(1.04); } to { transform: scale(1.0) translateY(0); } }
.shots__ui { position: absolute; inset: auto 0 0 0; display: flex; align-items: center; justify-content: center; gap: 0.75rem; padding: 2.2rem 1rem 0.8rem; background: linear-gradient(to top, rgb(0 0 0 / 0.55), transparent); pointer-events: none; }
.shots__ui button { pointer-events: auto; }
.shots__dots { display: flex; gap: 0.35rem; }
.shots__dots button { width: 26px; height: 24px; padding: 0; display: grid; place-items: center; background: none; border: 0; cursor: pointer; }
.shots__dots span { display: block; width: 100%; height: 3px; border-radius: 3px; background: rgb(255 255 255 / 0.3); overflow: hidden; }
.shots__dots span::after { content: ""; display: block; height: 100%; width: 0; background: #fff; }
.shots__dots [aria-current] span::after { width: 100%; }
.shots.is-playing .shots__dots [aria-current] span::after { animation: shots-fill var(--shot-dur) linear both; }
@keyframes shots-fill { from { width: 0; } to { width: 100%; } }
.shots__toggle { width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgb(255 255 255 / 0.14); display: grid; place-items: center; cursor: pointer; }
.shots__toggle span { width: 8px; height: 10px; border-inline: 3px solid #fff; }
.shots__toggle[aria-pressed="true"] span { width: 0; height: 0; border-inline: 0; border-block: 6px solid transparent; border-left: 9px solid #fff; margin-left: 3px; }
.shots__dots button:focus-visible, .shots__toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) {
  .shots__slide { transition: none; }
  .shots__slide.is-on img { animation: none; transform: none; }
}
.field__opt { font-weight: 450; color: var(--ink-3); }

/* spectraNET: il terminale digita i comandi snet con lo scroll */
.term { padding-block: calc(var(--section) * 0.4) var(--section); --term-bg: #0b1220; }
.term__stage { position: relative; }
.term__sticky { display: grid; gap: clamp(1.25rem, 3vw, 2rem); justify-items: center; }
.term__copy { display: grid; gap: 0.9rem; text-align: center; justify-items: center; }
.term__copy .h2 { max-width: 16ch; }
.term__copy .lead { max-width: 52ch; }
.term__window {
  width: min(100%, 68rem); border-radius: 14px; overflow: hidden; background: var(--term-bg);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.08), 0 40px 90px -40px rgb(0 0 0 / 0.95), 0 0 120px -40px color-mix(in srgb, var(--accent) 45%, transparent);
}
.term__bar { display: flex; align-items: center; gap: 7px; padding: 0.7rem 0.95rem; background: #111a2b; border-bottom: 1px solid rgb(255 255 255 / 0.06); }
.term__bar i { width: 11px; height: 11px; border-radius: 50%; background: rgb(255 255 255 / 0.14); }
.term__bar i:nth-child(1) { background: #ff5f57; } .term__bar i:nth-child(2) { background: #febc2e; } .term__bar i:nth-child(3) { background: #28c840; }
.term__bar span { margin-inline: auto; transform: translateX(-20px); font-family: var(--mono); font-size: 0.78rem; color: #8b97ad; }
.term__steps { list-style: none; margin: 0; padding: 0; display: grid; }
.term__step { display: grid; gap: 0.9rem; padding: clamp(1rem, 2.4vw, 1.6rem); }
.term__step + .term__step { border-top: 1px solid rgb(255 255 255 / 0.06); }
.term__line { margin: 0; font-family: var(--mono); font-size: clamp(0.95rem, 0.8rem + 0.6vw, 1.25rem); color: #e6edf7; white-space: nowrap; overflow: hidden; }
.term__line code { font: inherit; }
.term__prompt { color: var(--accent); font-weight: 700; }
.term__caret { display: inline-block; width: 0.6em; height: 1.15em; margin-left: 0.15em; vertical-align: -0.2em; background: var(--accent); opacity: 0; }
.term__out { overflow-x: auto; border-radius: 8px; overscroll-behavior-x: contain; scrollbar-color: rgb(255 255 255 / 0.2) transparent; }
.term__out img { display: block; width: 100%; height: auto; min-width: 38rem; }
.term__cap { margin: 0; color: #9aa6bb; font-size: var(--step--1); }
.term__dots { display: none; }

/* Messa in scena (desktop, movimento consentito): un comando alla volta */
.term.is-staged .term__stage { height: 330svh; }
.term.is-staged .term__sticky { position: sticky; top: calc(var(--nav-h) + 2svh); }
.term.is-staged .term__step { grid-area: 1 / 1; border-top: 0; opacity: 0; visibility: hidden; transform: translateY(14px); filter: blur(6px); transition: opacity 0.5s var(--ease-out), transform 0.7s var(--ease-out), filter 0.6s var(--ease-out), visibility 0s 0.5s; }
.term.is-staged .term__step.is-on { opacity: 1; visibility: visible; transform: none; filter: none; transition-delay: 0s; }
.term.is-staged .term__out { height: min(46svh, 30rem); overflow: hidden; display: grid; align-items: start; }
.term.is-staged .term__out img { min-width: 0; width: 100%; height: 100%; object-fit: contain; object-position: 0 0; opacity: 0; transform: translateY(10px); transition: opacity 0.45s var(--ease-out), transform 0.6s var(--ease-out); }
.term.is-staged .term__step.is-typed .term__out img { opacity: 1; transform: none; }
.term.is-staged .term__step:not(.is-typed) .term__caret { opacity: 1; }
.term.is-staged .term__step.is-typed .term__caret { animation: term-blink 1.05s steps(1) infinite; }
@keyframes term-blink { 50% { opacity: 1; } }
.term.is-staged .term__dots { display: flex; gap: 0.4rem; }
.term__dots span { width: 26px; height: 3px; border-radius: 3px; background: rgb(255 255 255 / 0.18); transition: background 0.3s; }
.term__dots span.is-on { background: var(--accent); }
@media (max-width: 47.99rem) {
  .term__out img { min-width: 34rem; }
}

/* Privacy e cookie: blocchi di lettura con il titolo a sinistra su schermi larghi */
.legal { display: grid; gap: clamp(2rem, 4vw, 3rem); }
.legal__block { display: grid; gap: 0.9rem; padding-top: clamp(1.5rem, 3vw, 2rem); border-top: 1px solid var(--line); }
.legal__block .prose { max-width: 70ch; }
.legal__block .prose a { color: var(--ink); text-decoration-color: var(--accent); text-underline-offset: 3px; }
@media (min-width: 56rem) { .legal__block { grid-template-columns: 18rem 1fr; gap: 2.5rem; } }
.footer__bottom span a { color: inherit; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.form__foot small a { color: var(--ink); text-decoration-color: var(--accent); text-underline-offset: 3px; }
