/* ===================================================================
   Methodly — sito
   1. Font
   2. Token (tema chiaro / scuro)
   3. Base + utility
   4. Chrome di pagina (progress, grana, header, menu)
   5. Scena 3D + hero
   6. Sezioni
   7. Animazioni d'ingresso
   8. Riduzione del movimento + stampa
   =================================================================== */

/* ------------------------------------------------------------- 1. font */

@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/plexsans-600.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/plexsans-700.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/plexmono-400.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/plexmono-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/sourceserif-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/sourceserif-400i.woff2') format('woff2');
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/sourceserif-600.woff2') format('woff2');
}

/* ------------------------------------------------------------ 2. token */

:root {
  --bg: #F6F5F1;
  --bg-raised: #EEEBE2;
  --fg: #0B0D0F;
  --fg-muted: #383C42;
  --line: rgba(11, 13, 15, .14);
  --line-soft: rgba(11, 13, 15, .08);
  --line-strong: rgba(11, 13, 15, .30);
  --accent: #2A4B8D;
  --accent-strong: #18305E;
  --accent-soft: #E4E9F4;
  --accent-glow: rgba(42, 75, 141, .22);
  --on-accent: #F6F5F1;
  --flag: #B23A2E;
  --on-flag: #F6F5F1;
  --grain: .038;
  --panel: color-mix(in srgb, var(--bg) 80%, transparent);

  --font-display: 'IBM Plex Sans', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-body: 'Source Serif 4', 'Iowan Old Style', Georgia, serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --content-w: 1180px;
  --section-pad: clamp(5rem, 3.6rem + 5.2vw, 9.5rem);
  --gutter: clamp(1.25rem, 1rem + 2vw, 3rem);
  --radius: 3px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --header-h: 76px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #08090B;
    --bg-raised: #101315;
    --fg: #EDEBE4;
    --fg-muted: #A8AEB6;
    --line: rgba(237, 235, 228, .13);
    --line-soft: rgba(237, 235, 228, .07);
    --line-strong: rgba(237, 235, 228, .28);
    --accent: #8FADE8;
    --accent-strong: #B9CCF0;
    --accent-soft: rgba(143, 173, 232, .13);
    --accent-glow: rgba(143, 173, 232, .28);
    --on-accent: #08090B;
    --flag: #E28579;
    --on-flag: #08090B;
    --grain: .05;
    --panel: color-mix(in srgb, var(--bg) 78%, transparent);
  }
}

:root[data-theme="dark"] {
  --bg: #08090B;
  --bg-raised: #101315;
  --fg: #EDEBE4;
  --fg-muted: #A8AEB6;
  --line: rgba(237, 235, 228, .13);
  --line-soft: rgba(237, 235, 228, .07);
  --line-strong: rgba(237, 235, 228, .28);
  --accent: #8FADE8;
  --accent-strong: #B9CCF0;
  --accent-soft: rgba(143, 173, 232, .13);
  --accent-glow: rgba(143, 173, 232, .28);
  --on-accent: #08090B;
  --flag: #E28579;
  --on-flag: #08090B;
  --grain: .05;
  --panel: color-mix(in srgb, var(--bg) 78%, transparent);
}

/* -------------------------------------------------- 3. base + utility */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background .3s ease, color .3s ease;
}

img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
strong { font-weight: 600; }

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 700;
  margin: 0;
  text-wrap: balance;
  letter-spacing: -.022em;
  line-height: 1.08;
}

::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.wrap {
  max-width: var(--content-w);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.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-link {
  position: absolute; top: -100px; left: var(--gutter); z-index: 500;
  background: var(--fg); color: var(--bg); padding: .8rem 1.2rem;
  font-family: var(--font-mono); font-size: .8rem; text-decoration: none;
  transition: top .2s ease;
}
.skip-link:focus { top: 1rem; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: .75em;
  margin: 0;
}
.eyebrow::before {
  content: ""; width: 1.6em; height: 1px; background: currentColor;
  display: inline-block; flex: 0 0 auto;
  transform-origin: left; transform: scaleX(0);
  transition: transform .9s var(--ease-out) .1s;
}
.no-js .eyebrow::before, .in .eyebrow::before, .eyebrow.in::before { transform: none; }
.eyebrow.center { justify-content: center; }

/* pulsanti */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  position: relative;
  font-family: var(--font-mono);
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .04em;
  padding: .95em 1.5em;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  isolation: isolate;
  transition: border-color .22s ease, color .22s ease, transform .35s var(--ease-out), box-shadow .3s ease;
}
.btn-lg { padding: 1.15em 1.9em; font-size: .86rem; }

.btn-primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
/* riempimento che sale dal basso all'hover: il colore non "salta", scorre */
.btn-primary::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--accent-strong);
  transform: translateY(101%);
  transition: transform .45s var(--ease-out);
}
.btn-primary:hover::after, .btn-primary:focus-visible::after { transform: none; }
.btn-primary:hover { box-shadow: 0 10px 30px -12px var(--accent-glow); }

.btn-ghost { background: transparent; color: var(--fg); border-color: var(--line-strong); }
.btn-ghost::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--fg); transform: translateY(101%);
  transition: transform .45s var(--ease-out);
}
.btn-ghost:hover { color: var(--bg); border-color: var(--fg); }
.btn-ghost:hover::after { transform: none; }

.link-arrow {
  font-family: var(--font-mono); font-size: .85rem; text-decoration: none;
  color: var(--fg); padding-bottom: .3em; position: relative;
  transition: color .2s ease;
}
.link-arrow::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: currentColor; transform-origin: right; transform: scaleX(1);
  transition: transform .4s var(--ease-out);
}
.link-arrow:hover { color: var(--accent); }
.link-arrow:hover::after { transform-origin: left; animation: sweep .55s var(--ease-out); }
@keyframes sweep {
  0% { transform: scaleX(1); transform-origin: right; }
  49% { transform: scaleX(0); transform-origin: right; }
  50% { transform: scaleX(0); transform-origin: left; }
  100% { transform: scaleX(1); transform-origin: left; }
}
.link-arrow span { display: inline-block; transition: transform .35s var(--ease-out); }
.link-arrow:hover span { transform: translateX(4px); }

/* Etichetta agganciata al pezzo sorvolato: il nome del capitolo si legge
   dove sta l'oggetto che lo apre, non in un indice altrove. */
.piece-label {
  position: fixed; left: 0; top: 0; z-index: 60;
  pointer-events: none; will-change: transform;
}
.piece-label .pl-box {
  position: absolute;
  display: flex; align-items: center; gap: .6rem;
  padding: .5rem .85rem .5rem .55rem;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  border: 1px solid var(--line-strong);
  font-family: var(--font-mono); font-size: .78rem; white-space: nowrap;
  transform: translate(-50%, -50%) scale(.92);
  opacity: 0;
  transition: opacity .2s ease, transform .3s var(--ease-out);
}
.piece-label.on .pl-box { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.piece-label .pl-num {
  color: var(--on-accent); background: var(--accent);
  padding: .2em .5em; border-radius: 2px; font-weight: 500;
}
.piece-label .pl-title { color: var(--fg); }
@media (prefers-reduced-motion: reduce) { .piece-label { display: none; } }

/* --------------------------------------------- 4. chrome di pagina */

.progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0;
  background: var(--accent); z-index: 200;
  transform-origin: left;
  will-change: width;
}

/* Grana tipografica: toglie il "digitale piatto" alle campiture piene.
   Niente mix-blend-mode — un velo che fonde su tutta la pagina obbliga il
   browser a ricomporre ogni fotogramma sopra il canvas che sta animando. */
.grain {
  position: fixed; inset: 0; z-index: 300; pointer-events: none;
  opacity: var(--grain);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

header.site {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background .3s ease, transform .45s var(--ease-out);
}
header.site.scrolled {
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
  backdrop-filter: blur(14px) saturate(1.15);
  border-bottom-color: var(--line);
}
/* scendendo l'header si toglie di mezzo, risalendo torna */
header.site.hidden { transform: translateY(-101%); }

.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem;
  padding-top: 1.15rem; padding-bottom: 1.15rem;
}
.logo { display: inline-flex; align-items: center; text-decoration: none; flex: 0 0 auto; }
.logo-mark { height: 26px; width: auto; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-mark { filter: invert(1); }
}
:root[data-theme="dark"] .logo-mark { filter: invert(1); }
:root[data-theme="light"] .logo-mark { filter: none; }

nav.links {
  display: flex; gap: 2.2rem;
  font-family: var(--font-mono); font-size: .82rem;
}
nav.links a {
  text-decoration: none; color: var(--fg-muted);
  transition: color .2s ease; position: relative; padding-bottom: .25em;
}
nav.links a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 100%;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform .4s var(--ease-out);
}
nav.links a:hover { color: var(--fg); }
nav.links a:hover::after, nav.links a.active::after { transform: none; }
nav.links a.active { color: var(--fg); }

.nav-cta-group { display: flex; align-items: center; gap: 1.2rem; }

.theme-toggle {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line-strong);
  display: grid; place-items: center;
  transition: border-color .2s ease, transform .3s var(--ease-out);
}
.theme-toggle:hover { border-color: var(--accent); transform: rotate(25deg); }
.theme-dot {
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--fg);
  box-shadow: inset -4px -3px 0 0 var(--bg);
  transition: box-shadow .35s ease, background .3s ease;
}
:root[data-theme="dark"] .theme-dot { box-shadow: inset 0 0 0 0 var(--bg); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-dot { box-shadow: inset 0 0 0 0 var(--bg); }
}

.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: .55rem; margin: -.55rem; }
.nav-toggle span {
  width: 20px; height: 1.5px; background: var(--fg); display: block;
  transition: transform .3s var(--ease-out), opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.25px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.25px) rotate(-45deg); }

.mobile-panel {
  position: fixed; inset: 0; z-index: 99;
  background: var(--bg);
  padding: calc(var(--header-h) + 2.5rem) var(--gutter) 3rem;
  display: flex; flex-direction: column; gap: 1.75rem;
  opacity: 0; pointer-events: none;
  transition: opacity .3s ease;
}
.mobile-panel[hidden] { display: flex; }
.mobile-panel.open { opacity: 1; pointer-events: auto; }
.mobile-panel a {
  font-family: var(--font-display); font-weight: 700; font-size: clamp(1.9rem, 8vw, 2.6rem);
  letter-spacing: -.02em; text-decoration: none; color: var(--fg);
  opacity: 0; transform: translateY(14px);
  transition: opacity .5s var(--ease-out), transform .5s var(--ease-out);
}
.mobile-panel.open a { opacity: 1; transform: none; }
.mobile-panel.open a:nth-child(1) { transition-delay: .05s; }
.mobile-panel.open a:nth-child(2) { transition-delay: .1s; }
.mobile-panel.open a:nth-child(3) { transition-delay: .15s; }
.mobile-panel.open a:nth-child(4) { transition-delay: .2s; }
.mobile-panel.open a:nth-child(5) { transition-delay: .25s; }
.mobile-panel .btn { align-self: flex-start; margin-top: 1rem; font-size: .9rem; }

@media (max-width: 940px) {
  nav.links, .nav-cta-group > .btn { display: none; }
  .nav-toggle { display: flex; }
}

/* ---------------------------------------- 5. scena 3D + hero */

/* La scena e' un livello di pagina, non un fondale di sezione: sta ferma
   sul viewport e tutto il documento le scorre sopra. */
.scene {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
}
.scene-canvas { width: 100%; height: 100%; }
/* Spegne solo i bordi dell'inquadratura: il centro resta alla struttura. */
.scene-veil {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 78% 72% at 50% 48%, transparent 52%, var(--bg) 96%);
}

/* Il contenuto deve stare sopra la scena, che e' fissa a z-index 0.
   Header (100), barra di avanzamento (200) e grana (300) hanno gia' il
   loro piano piu' in alto: rimetterli a 1 li farebbe finire sotto a main. */
main, footer, .ticker { position: relative; z-index: 1; }

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: calc(var(--header-h) + 3rem);
  padding-bottom: 6rem;
  text-align: center;
}

.hero-grid {
  position: absolute; inset: 0; z-index: -1;
  opacity: .5;
  background:
    repeating-linear-gradient(0deg, var(--line-soft) 0 1px, transparent 1px 112px),
    repeating-linear-gradient(90deg, var(--line-soft) 0 1px, transparent 1px 112px);
  -webkit-mask-image: radial-gradient(ellipse 85% 65% at 50% 45%, black 15%, transparent 75%);
  mask-image: radial-gradient(ellipse 85% 65% at 50% 45%, black 15%, transparent 75%);
}

.hero-inner { position: relative; width: 100%; }
/* Una radura nella maglia: il testo si stacca senza spegnere la struttura. */
.hero-inner::before {
  content: ""; position: absolute; z-index: -1;
  left: 50%; top: 44%; transform: translate(-50%, -50%);
  width: min(940px, 92vw); height: min(620px, 72vh);
  background: radial-gradient(ellipse at center,
    color-mix(in srgb, var(--bg) 55%, transparent) 0%,
    color-mix(in srgb, var(--bg) 28%, transparent) 48%,
    transparent 78%);
}
.hero-tag { margin-bottom: 1.8rem; justify-content: center; }

.hero-title {
  font-size: clamp(2.5rem, 1.4rem + 4.9vw, 5.6rem);
  line-height: 1.0;
  letter-spacing: -.035em;
  max-width: 17ch;
  margin: 0 auto;
  text-wrap: initial;
}
.hero-title .line { display: block; overflow: hidden; padding-bottom: .1em; margin-bottom: -.1em; }
.hero-title .line-in { display: block; }
.hero-title em {
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -.02em;
  color: var(--accent);
}

.pill {
  display: inline-flex; align-items: center;
  padding: .42em .85em; border-radius: 999px;
  font-family: var(--font-mono); font-size: .78rem; font-weight: 500;
  letter-spacing: .02em;
}
.pill-flag { background: var(--flag); color: var(--on-flag); }
.pill-blue { background: var(--accent); color: var(--on-accent); }
.hero-pills { margin-top: 1.9rem; display: flex; align-items: center; justify-content: center; gap: .8rem; flex-wrap: wrap; }
.hero-pills .sep { font-family: var(--font-mono); color: var(--fg-muted); font-size: .95rem; }

.hero-sub {
  margin: 1.4rem auto 0; font-size: 1.16rem; line-height: 1.58;
  color: var(--fg-muted); max-width: 52ch;
  text-shadow: 0 0 16px var(--bg), 0 0 34px var(--bg);
}
.hero-sub strong { color: var(--fg); }

.hero-actions { margin-top: 2.6rem; display: flex; align-items: center; justify-content: center; gap: 1.8rem; flex-wrap: wrap; }

/* Sommario dei capitoli: gli stessi quattro pezzi, ma in forma di link —
   raggiungibili da tastiera e dai motori, non solo cliccando sul 3D. */
.hero-index {
  margin: 2rem auto 0;
  display: flex; justify-content: center; flex-wrap: wrap;
  gap: .4rem 1.6rem;
  font-family: var(--font-mono); font-size: .76rem; letter-spacing: .03em;
}
.hero-index a {
  text-decoration: none; color: var(--fg-muted);
  padding-bottom: .25em; position: relative;
  transition: color .2s ease;
}
.hero-index a span { color: var(--accent); margin-right: .35em; }
.hero-index a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform .35s var(--ease-out);
}
.hero-index a:hover, .hero-index a:focus-visible { color: var(--fg); }
.hero-index a:hover::after, .hero-index a:focus-visible::after { transform: none; }

.hero-specs {
  margin: clamp(3rem, 6vh, 5rem) auto 0;
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  max-width: 900px; width: 100%;
}
.hero-specs .spec { padding: 1.5rem 1.4rem 0; border-left: 1px solid var(--line); }
.hero-specs .spec:first-child { border-left: none; }
.hero-specs .label { margin-inline: auto; }
.hero-specs .num {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.7rem, 1.4rem + .9vw, 2.3rem);
  letter-spacing: -.03em; display: block; font-variant-numeric: tabular-nums;
}
.hero-specs .label {
  font-family: var(--font-mono); font-size: .7rem; letter-spacing: .08em;
  color: var(--fg-muted); text-transform: uppercase; display: block;
  margin: .5rem 0 0; max-width: 24ch;
}
@media (max-width: 760px) {
  .hero-specs { grid-template-columns: 1fr; margin-top: 3.5rem; }
  .hero-specs .spec { border-left: none; border-top: 1px solid var(--line); padding: 1.1rem 0 0; }
  .hero-specs .spec:first-child { border-top: none; padding-top: 0; }
}

/* Schermi di portatile: l'hero deve stare in un colpo d'occhio, CTA compresa.
   Senza questo, su 13"-14" la chiamata all'azione finisce sotto la piega. */
@media (min-width: 900px) and (max-height: 900px) {
  .hero { padding-top: calc(var(--header-h) + 1.2rem); padding-bottom: 3.5rem; }
  .hero-title { font-size: clamp(2.2rem, 0.6rem + 3.4vw, 3.9rem); }
  .hero-tag { margin-bottom: 1.1rem; }
  .hero-pills { margin-top: 1.2rem; }
  .hero-sub { margin-top: 1rem; font-size: 1.05rem; }
  .hero-actions { margin-top: 1.6rem; }
  .hero-index { margin-top: 1.4rem; }
  .hero-specs { margin-top: 1.5rem; }
  .hero-specs .spec { padding-top: 1.1rem; }
  .hero .scroll-cue { display: none; }
}


.scroll-cue {
  position: absolute; left: 50%; bottom: 2rem; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: .7rem;
  text-decoration: none; z-index: 1;
}
.scroll-cue-line { width: 1px; height: 42px; background: var(--line-strong); position: relative; overflow: hidden; }
.scroll-cue-line::after {
  content: ""; position: absolute; inset: 0; background: var(--accent);
  animation: cue 2.4s var(--ease-out) infinite;
}
@keyframes cue {
  0% { transform: translateY(-100%); }
  55%, 100% { transform: translateY(100%); }
}
.scroll-cue-text {
  font-family: var(--font-mono); font-size: .64rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--fg-muted);
}
@media (max-width: 760px) { .scroll-cue { display: none; } }

/* ------------------------------------------ aperture di capitolo
   Quattro soglie, una per pezzo del marchio: il pezzo si ingrandisce,
   viene avanti e apre il capitolo. Dentro il capitolo la pagina torna
   normale e leggibile — il momento animato sta qui, non su ogni riga. */

.chapter-gate { position: relative; height: 170vh; height: 170svh; }
.chapter-open {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  display: grid; place-items: center; text-align: center;
  --enter: 1;
}
.chapter-inner { position: relative; }
.chapter-num {
  font-family: var(--font-mono); font-size: .74rem; font-weight: 500;
  letter-spacing: .22em; text-transform: uppercase; color: var(--accent);
}
.chapter-num span { color: var(--fg-muted); }
.chapter-title {
  font-size: clamp(2.6rem, 1.3rem + 5.2vw, 6rem);
  letter-spacing: -.038em; line-height: 1; margin: .7rem 0 0;
  text-shadow: 0 0 30px var(--bg), 0 0 70px var(--bg);
}
.chapter-sub {
  margin: 1.2rem auto 0; max-width: 34ch;
  color: var(--fg-muted); font-size: 1.12rem;
  text-shadow: 0 0 20px var(--bg), 0 0 45px var(--bg);
}

/* L'apertura respira col progresso dello scroll, non con una transizione
   a tempo: cosi' il testo e il pezzo del marchio si muovono insieme. */
.js .chapter-open .chapter-inner {
  opacity: var(--enter);
  transform: translateY(calc((1 - var(--enter)) * 30px)) scale(calc(.965 + var(--enter) * .035));
  will-change: opacity, transform;
}

@media (max-width: 900px) { .chapter-gate { height: 135vh; height: 135svh; } }
@media (min-width: 900px) and (max-height: 900px) { .chapter-gate { height: 150svh; } }

/* ---------------------------------------------------- ticker / prove */

.ticker {
  position: relative; z-index: 1;
  background: var(--bg);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 1.1rem 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
}
.ticker-track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-set { display: flex; align-items: center; padding-right: 0; }
.ticker-set b {
  font-family: var(--font-mono); font-weight: 500; font-size: .78rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--fg-muted);
  white-space: nowrap;
}
.ticker-set i { color: var(--accent); font-style: normal; font-size: .5rem; padding: 0 2.2rem; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* -------------------------------------------------------- 6. sezioni */

section { padding: var(--section-pad) 0; position: relative; }
/* Le sezioni non coprono piu' la scena: la struttura resta visibile per
   tutta la pagina. Il ritmo fra le sezioni lo fa una velatura, non un
   blocco pieno. Stessa specificita' per tutte, cosi' decide l'ordine. */
main > section { background: transparent; }
main > section.raised { background: color-mix(in srgb, var(--bg-raised) 72%, transparent); }
.ticker { background: color-mix(in srgb, var(--bg) 62%, transparent); }
footer { background: transparent; }

.section-head {
  display: grid; grid-template-columns: 1.15fr .85fr; align-items: end; gap: 2.5rem;
  margin-bottom: 4rem;
}
.section-head h3 { font-size: clamp(1.9rem, 1.4rem + 1.9vw, 3rem); max-width: 20ch; }
.section-head .desc { max-width: 42ch; color: var(--fg-muted); font-size: 1.05rem; }
@media (max-width: 860px) { .section-head { grid-template-columns: 1fr; gap: 1.4rem; margin-bottom: 2.8rem; align-items: start; } }

/* --- problema --- */
.problem-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2.5rem, 5vw, 5rem); }
.problem-copy h3 { font-size: clamp(1.95rem, 1.5rem + 1.9vw, 3.05rem); max-width: 15ch; margin-top: 1.4rem; }
.problem-copy .lead { margin-top: 1.6rem; font-size: 1.16rem; color: var(--fg-muted); max-width: 44ch; }
.obs-list { border-top: 1px solid var(--line); align-self: start; }
.obs-item {
  display: grid; grid-template-columns: 4.5rem 1fr; gap: 1rem;
  padding: 1.4rem 0; border-bottom: 1px solid var(--line);
  transition: padding-left .35s var(--ease-out);
}
.obs-item:hover { padding-left: .6rem; }
.obs-item .tag { font-family: var(--font-mono); font-size: .72rem; color: var(--flag); padding-top: .28rem; }
.obs-item p { font-size: 1rem; }
@media (max-width: 900px) { .problem-grid { grid-template-columns: 1fr; } }

/* --- metodo --- */
.metodo-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(2.5rem, 5vw, 4.5rem); align-items: start; }
.process-list { border-top: 1px solid var(--line); }
.process-row {
  display: grid; grid-template-columns: 4.5rem 1fr; gap: .5rem 1.5rem;
  padding: 2.4rem 0; border-bottom: 1px solid var(--line);
  align-items: start; position: relative;
}
.process-row::before {
  content: ""; position: absolute; left: -1.5rem; right: -1.5rem; top: 0; bottom: 0;
  background: var(--bg); opacity: 0; z-index: -1;
  transition: opacity .3s ease;
}
.process-row:hover::before, .process-row.is-active::before { opacity: .55; }
.step-pill {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-weight: 500; font-size: .78rem;
  background: var(--accent-soft); color: var(--accent);
  border-radius: 999px; padding: .4em .85em; width: fit-content;
  grid-row: span 2;
  transition: background .3s ease, color .3s ease, transform .4s var(--ease-out);
}
.process-row:hover .step-pill, .process-row.is-active .step-pill {
  background: var(--accent); color: var(--on-accent); transform: translateY(-2px);
}
.process-row h4 { font-size: 1.4rem; grid-column: 2; }
.process-row p { color: var(--fg-muted); font-size: 1rem; max-width: 52ch; grid-column: 2; margin-top: .6rem; }
@media (max-width: 780px) {
  .process-row { grid-template-columns: 1fr; gap: .8rem; padding: 1.9rem 0; }
  .step-pill { grid-row: auto; }
  .process-row h4, .process-row p { grid-column: 1; }
}
@media (max-width: 900px) { .metodo-grid { grid-template-columns: 1fr; } }

.metodo-visual { position: sticky; top: calc(var(--header-h) + 2rem); display: flex; flex-direction: column; align-items: center; }
.mock-card {
  width: 100%; border: 1px solid var(--line-strong); border-radius: 8px;
  background: var(--panel); padding: 1.6rem 1.7rem 1.8rem;
  box-shadow: 0 24px 60px -40px rgba(11, 13, 15, .45);
}
.mock-card-head { display: flex; align-items: center; gap: .4rem; margin-bottom: 1.4rem; }
.mock-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); display: block; }
.mock-title {
  font-family: var(--font-mono); font-size: .68rem; color: var(--fg-muted);
  margin-left: .7rem; letter-spacing: .1em; text-transform: uppercase;
}
.mock-checklist { display: flex; flex-direction: column; gap: .85rem; }
.mock-checklist li {
  display: flex; align-items: center; gap: .85rem;
  font-family: var(--font-display); font-weight: 600; font-size: .9rem;
  color: var(--fg-muted); opacity: .45;
  transition: opacity .4s ease, color .4s ease;
}
.mock-checklist li.done { color: var(--fg); opacity: 1; }
.mock-checklist .check {
  width: 19px; height: 19px; border-radius: 50%; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  font-size: .6rem; border: 1px solid var(--line-strong); color: transparent;
  transition: background .35s var(--ease-out), border-color .35s ease, color .2s ease;
}
.mock-checklist li.done .check { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.mock-connector { height: 46px; width: 100%; display: flex; align-items: center; justify-content: center; }
.connector-line {
  width: 1px; height: 100%; position: relative;
  background-image: linear-gradient(var(--line-strong) 55%, transparent 0);
  background-size: 1px 9px; background-repeat: repeat-y;
}
.connector-line::after {
  content: ""; position: absolute; left: 50%; bottom: -3px; transform: translateX(-50%);
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
}
.mock-roadmap {
  width: 100%; display: flex; flex-direction: column; gap: 1rem;
  border: 1px solid var(--line); padding: 1.5rem 1.6rem; border-radius: 8px;
  background: var(--panel);
}
.roadmap-row { display: grid; grid-template-columns: 4.2rem 1fr; align-items: center; gap: .9rem; }
.roadmap-label { font-family: var(--font-mono); font-size: .64rem; color: var(--fg-muted); white-space: nowrap; }
.roadmap-track { height: 5px; border-radius: 3px; background: var(--line); overflow: hidden; display: block; }
.roadmap-fill {
  display: block; height: 100%; border-radius: 3px; background: var(--accent);
  transform: scaleX(var(--p, 0)); transform-origin: left;
  transition: transform .7s var(--ease-out);
}
.roadmap-fill.flag { background: var(--flag); }
.roadmap-fill.muted { background: var(--fg-muted); }
@media (max-width: 900px) { .metodo-visual { position: static; max-width: 440px; margin: 3rem auto 0; } }

/* --- servizi --- */
.services-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line);
}
.service-card {
  background: var(--panel); padding: clamp(1.8rem, 3vw, 2.8rem);
  position: relative; overflow: hidden; isolation: isolate;
  transition: background .3s ease;
}
/* alone che segue il puntatore: la griglia reagisce, non è una tabella morta */
.service-card::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0;
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 50%), var(--accent-soft), transparent 70%);
  transition: opacity .35s ease;
}
.service-card:hover::before { opacity: 1; }
.service-card::after {
  content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform .5s var(--ease-out);
}
.service-card:hover::after { transform: none; }
.service-card .idx { font-family: var(--font-mono); font-size: .76rem; color: var(--accent); display: block; margin-bottom: 1.4rem; letter-spacing: .1em; }
.service-card h4 { font-size: 1.3rem; margin-bottom: .9rem; }
.service-card p { color: var(--fg-muted); font-size: 1rem; }
@media (max-width: 720px) { .services-grid { grid-template-columns: 1fr; } }

/* --- differenza --- */
.compare { border: 1px solid var(--line); overflow: hidden; background: var(--panel); }
.compare-head { display: grid; grid-template-columns: 1.05fr 1fr 1fr; }
.compare-head div { padding: 1.3rem 1.7rem; font-family: var(--font-display); font-weight: 700; font-size: 1rem; }
.compare-head .c1 { color: var(--fg-muted); }
.compare-head .c2 { color: var(--accent); background: var(--accent-soft); }
.compare-row { display: grid; grid-template-columns: 1.05fr 1fr 1fr; border-top: 1px solid var(--line); }
.compare-row > div { padding: 1.2rem 1.7rem; font-size: .97rem; }
.compare-row .dim { color: var(--fg-muted); font-family: var(--font-mono); font-size: .8rem; }
.compare-row .no { color: var(--fg-muted); box-shadow: inset 2px 0 0 var(--flag); }
.compare-row .yes { color: var(--fg); background: var(--accent-soft); box-shadow: inset 2px 0 0 var(--accent); }
@media (max-width: 780px) {
  .compare-head div:first-child { display: none; }
  .compare-head { grid-template-columns: 1fr 1fr; }
  .compare-row { grid-template-columns: 1fr 1fr; }
  .compare-row .dim { grid-column: 1 / -1; background: var(--bg-raised); }
  .compare-row > div { padding: 1rem 1.1rem; font-size: .92rem; }
}

/* --- casi --- */
.cases-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.case-card {
  border: 1px solid var(--line); padding: clamp(1.6rem, 3vw, 2.2rem);
  background: var(--panel);
  transform-style: preserve-3d;
  transition: border-color .3s ease, box-shadow .4s ease, transform .4s var(--ease-out);
}
.case-card:hover { border-color: var(--line-strong); box-shadow: 0 30px 60px -45px rgba(11, 13, 15, .6); }
.case-card .sector {
  font-family: var(--font-mono); font-size: .7rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--accent); display: block;
}
.case-card .before, .case-card .after { margin-top: 1.1rem; font-size: .98rem; }
.case-card .before { color: var(--fg-muted); }
.case-card .after { font-weight: 600; }
.case-card .arrow { font-family: var(--font-mono); color: var(--accent); font-size: .9rem; margin: .8rem 0 0; }
@media (max-width: 780px) { .cases-grid { grid-template-columns: 1fr; } }


/* --- icone dei servizi: tratto sottile, geometria del marchio --- */
.svc-icon {
  width: 36px; height: 36px; display: block;
  margin: 0 0 1.3rem; color: var(--accent);
  fill: none; stroke: currentColor;
  stroke-width: 1.05; stroke-linecap: round; stroke-linejoin: round;
  transition: transform .45s var(--ease-out), color .25s ease;
}
.service-card:hover .svc-icon { transform: translateY(-3px) scale(1.04); }
.service-card .idx { margin-bottom: .9rem; }


/* Gli elenchi che stavano dentro la prosa diventano etichette leggibili
   di colpo d'occhio: la scheda si scorre invece di leggerla. */
.svc-tags {
  display: flex; flex-wrap: wrap; gap: .4rem;
  margin-top: 1.1rem;
}
.svc-tags li {
  font-family: var(--font-mono); font-size: .68rem; letter-spacing: .05em;
  color: var(--fg-muted);
  border: 1px solid var(--line); border-radius: 2px;
  padding: .3em .6em; white-space: nowrap;
  transition: border-color .25s ease, color .25s ease;
}
.service-card:hover .svc-tags li { border-color: var(--line-strong); color: var(--fg); }

/* --- metodo: la fase dichiara quando succede e cosa lascia in mano --- */
.process-lead { color: var(--fg-muted); }
.process-meta {
  grid-column: 2; margin-top: 1rem;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem .9rem;
  font-family: var(--font-mono); font-size: .74rem; line-height: 1.5;
}
.pm-when {
  color: var(--accent); border: 1px solid var(--accent-soft);
  background: var(--accent-soft); padding: .25em .6em; border-radius: 2px;
  white-space: nowrap;
}
.pm-out { color: var(--fg-muted); }
.pm-out b { color: var(--fg); font-weight: 500; }
@media (max-width: 780px) { .process-meta { grid-column: 1; } }

/* --- casi: prima e dopo dichiarati, con uno stacco netto in mezzo --- */
.case-tag {
  display: inline-block; margin-right: .6rem;
  font-family: var(--font-mono); font-size: .64rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--flag);
  border-bottom: 1px solid var(--flag); padding-bottom: .1em;
}
.case-tag.is-after { color: var(--accent); border-bottom-color: var(--accent); }
.case-rule {
  display: block; height: 1px; margin: 1.2rem 0 0;
  background: linear-gradient(90deg, var(--flag), var(--accent));
  opacity: .45;
}

/* --- manifesto: qui la struttura si mette a piombo e si legge il marchio --- */
.manifesto {
  text-align: center;
  min-height: 100svh;
  display: flex; align-items: center;
  padding: clamp(6rem, 12vh, 10rem) 0;
}
.manifesto-inner { position: relative; width: 100%; }
.manifesto blockquote { margin: 0; }
.manifesto blockquote p {
  font-family: var(--font-body); font-style: italic; font-weight: 400;
  font-size: clamp(1.6rem, 1.1rem + 2.2vw, 3.1rem);
  line-height: 1.28; max-width: 24ch; margin: 0 auto;
  color: var(--fg); letter-spacing: -.015em;
  /* la frase deve restare leggibile anche sopra la maglia */
  text-shadow: 0 0 26px var(--bg), 0 0 60px var(--bg);
}
.manifesto .rule { width: 44px; height: 2px; background: var(--accent); margin: 0 auto 2.4rem; display: block; }

/* --- percorso --- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.step-card { background: var(--panel); padding: clamp(1.8rem, 3vw, 2.6rem) clamp(1.4rem, 2.5vw, 2.2rem); }
.step-n {
  font-family: var(--font-mono); font-size: .78rem; color: var(--accent);
  letter-spacing: .1em; display: block; margin-bottom: 1.6rem;
  padding-bottom: 1.6rem; border-bottom: 1px solid var(--line);
}
.step-card h4 { font-size: 1.2rem; margin-bottom: .8rem; }
.step-card p { color: var(--fg-muted); font-size: .98rem; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

/* --- FAQ --- */
.faq-list { border-top: 1px solid var(--line); max-width: 880px; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-h { margin: 0; font-size: inherit; font-weight: inherit; letter-spacing: normal; }
.faq-q {
  width: 100%; display: grid; grid-template-columns: 3.2rem 1fr 1.5rem;
  align-items: center; padding: 1.6rem 0; text-align: left; gap: 1rem;
}
.faq-q .qtext { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; letter-spacing: -.01em; transition: color .25s ease; }
.faq-q:hover .qtext { color: var(--accent); }
.faq-q .qnum { font-family: var(--font-mono); font-size: .76rem; color: var(--fg-muted); }
.faq-q .icon { position: relative; width: 14px; height: 14px; justify-self: end; }
.faq-q .icon::before, .faq-q .icon::after {
  content: ""; position: absolute; background: var(--accent);
  transition: transform .35s var(--ease-out), opacity .25s ease;
}
.faq-q .icon::before { left: 0; top: 50%; width: 14px; height: 1.5px; margin-top: -.75px; }
.faq-q .icon::after { top: 0; left: 50%; height: 14px; width: 1.5px; margin-left: -.75px; }
.faq-item.open .faq-q .icon::after { transform: rotate(90deg); opacity: 0; }

.faq-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--ease-out); }
.faq-a > p { overflow: hidden; color: var(--fg-muted); max-width: 64ch; font-size: 1rem; min-height: 0; }
.faq-item.open .faq-a { grid-template-rows: 1fr; }
.faq-item.open .faq-a > p { padding-bottom: 1.7rem; }
@supports not (grid-template-rows: 0fr) {
  .faq-a { display: block; max-height: 0; overflow: hidden; transition: max-height .4s ease; }
  .faq-item.open .faq-a { max-height: 320px; }
}
@media (max-width: 640px) {
  .faq-q { grid-template-columns: 1fr 1.5rem; }
  .faq-q .qnum { display: none; }
}

/* --- CTA finale --- */
.cta-final { text-align: center; overflow: hidden; }
.cta-glow {
  position: absolute; left: 50%; top: 50%; width: min(1000px, 130%); aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, var(--accent-glow), transparent 62%);
  opacity: .75; pointer-events: none;
}
.cta-final .wrap { position: relative; z-index: 1; }
.cta-final .eyebrow { margin-bottom: 1.6rem; }
.cta-final h3 { font-size: clamp(2.1rem, 1.5rem + 2.6vw, 3.6rem); max-width: 18ch; margin: 0 auto; }
.cta-final .sub { margin: 1.5rem auto 0; max-width: 46ch; color: var(--fg-muted); font-size: 1.12rem; }
.cta-final .actions { margin-top: 2.6rem; display: flex; justify-content: center; gap: 1.2rem; flex-wrap: wrap; }
.cta-final .note { margin-top: 1.8rem; font-family: var(--font-mono); font-size: .76rem; color: var(--fg-muted); letter-spacing: .04em; }

/* --- footer --- */
/* position:relative non e' decorativo: senza, il footer resta un blocco
   statico e la scena 3D dell'hero (contesto di impilamento posizionato)
   gli finisce sopra. */
footer {
  padding: clamp(4rem, 7vw, 6.5rem) 0 2.4rem;
  position: relative; z-index: 1;
  border-top: 1px solid var(--line);
}
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 3rem; padding-bottom: 3.5rem; border-bottom: 1px solid var(--line); }
.footer-brand p { margin-top: 1.4rem; color: var(--fg-muted); max-width: 34ch; font-size: .97rem; }
.footer-col h3 {
  font-family: var(--font-mono); font-size: .7rem; font-weight: 500; letter-spacing: .16em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 1.3rem; line-height: 1;
}
.footer-col ul { display: flex; flex-direction: column; gap: .8rem; }
.footer-col a { text-decoration: none; font-size: .97rem; color: var(--fg-muted); transition: color .2s ease; }
.footer-col a:hover { color: var(--fg); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 2rem; flex-wrap: wrap; gap: 1rem; }
.footer-bottom p { font-family: var(--font-mono); font-size: .73rem; color: var(--fg-muted); }
.footer-bottom a { color: inherit; text-decoration: none; }
/* Iubenda porta con se' un foglio di stile per i suoi link: qui vogliamo
   il testo del piede, non un pulsante. */
.footer-bottom a.iubenda-embed,
.consenso a.iubenda-embed {
  background: none !important; border: 0 !important; padding: 0 !important;
  font: inherit !important; letter-spacing: inherit !important;
  box-shadow: none !important; border-radius: 0 !important;
  text-transform: none !important; line-height: inherit !important;
}
.footer-bottom a.iubenda-embed { color: inherit !important; }
.consenso a.iubenda-embed { color: var(--accent) !important; text-decoration: underline !important; }
.footer-bottom a:hover { color: var(--accent); }
@media (max-width: 780px) { .footer-top { grid-template-columns: 1fr; gap: 2.5rem; } }

/* ------------------------------------- chiusura di capitolo
   Alla fine di ogni capitolo si apre una porta verso il contatto: un
   pulsante al centro e basta, senza frasi di accompagnamento. I due
   filetti crescono verso l'esterno quando il blocco entra in campo — e'
   lo stesso gesto del trattino degli occhielli — e dicono che qui il
   capitolo si chiude. */

.cap-cta-blocco { padding: clamp(2.6rem, 4.5vw, 4rem) var(--gutter); }

.cap-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1.1rem, 3vw, 2.2rem);
}

.cc-filo {
  flex: 1 1 auto;
  max-width: 20rem;
  height: 1px;
  background: var(--line);
  transform: scaleX(0);
  transition: transform 1.2s var(--ease-out) .18s;
}
.cap-cta .cc-filo:first-child { transform-origin: right center; }
.cap-cta .cc-filo:last-child { transform-origin: left center; }
.no-js .cc-filo,
.cap-cta.in .cc-filo { transform: scaleX(1); }

/* Il pulsante non si allarga con lo spazio: restano i filetti a farlo. */
.cc-btn { flex: 0 0 auto; }

/* Un alone che si allarga e svanisce, ogni tanto: segnala che il
   pulsante e' vivo senza chiedere niente. E' un box-shadow e non uno
   pseudo-elemento perche' .btn ha overflow: hidden — serve a contenere
   il riempimento che sale all'hover, e ritaglierebbe qualunque figlio. */
.cap-cta.in .cc-btn { animation: ccRespiro 4.2s var(--ease-out) 1.2s infinite; }
.cc-btn:hover, .cc-btn:focus-visible { animation: none; }

@keyframes ccRespiro {
  0%   { box-shadow: 0 0 0 0 var(--accent-glow); }
  62%  { box-shadow: 0 0 0 13px rgba(0, 0, 0, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 0, 0, 0); }
}

@media (max-width: 560px) {
  .cc-filo { max-width: none; }
  .cap-cta { gap: .9rem; }
}

@media (prefers-reduced-motion: reduce) {
  .cc-filo { transition: none; transform: scaleX(1); }
  .cap-cta.in .cc-btn { animation: none; }
}

/* ------------------------------------------ 7. animazioni d'ingresso */

/* Senza JS il contenuto e' visibile: le animazioni sono un di piu', mai una condizione. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .85s var(--ease-out), transform .85s var(--ease-out);
}
.js [data-reveal].in { opacity: 1; transform: none; }

.js [data-stagger] > * {
  opacity: 0; transform: translateY(18px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
}
.js [data-stagger].in > * { opacity: 1; transform: none; }
.js [data-stagger].in > *:nth-child(1) { transition-delay: .04s; }
.js [data-stagger].in > *:nth-child(2) { transition-delay: .12s; }
.js [data-stagger].in > *:nth-child(3) { transition-delay: .2s; }
.js [data-stagger].in > *:nth-child(4) { transition-delay: .28s; }
.js [data-stagger].in > *:nth-child(5) { transition-delay: .36s; }
.js [data-stagger].in > *:nth-child(6) { transition-delay: .44s; }

/* titolo hero: righe che salgono da dietro una maschera */
.js .hero-title .line-in { transform: translateY(105%); }
.js .hero-title.in .line-in { transform: none; transition: transform 1.05s var(--ease-out); }
.js .hero-title.in .line:nth-child(1) .line-in { transition-delay: .06s; }
.js .hero-title.in .line:nth-child(2) .line-in { transition-delay: .16s; }
.js .hero-title.in .line:nth-child(3) .line-in { transition-delay: .26s; }

.js .hero-tag, .js .hero-pills, .js .hero-sub, .js .hero-actions, .js .hero-specs, .js .scroll-cue {
  opacity: 0; transform: translateY(16px);
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
}
.js .hero.in .hero-tag { opacity: 1; transform: none; transition-delay: .02s; }
.js .hero.in .hero-pills { opacity: 1; transform: none; transition-delay: .42s; }
.js .hero.in .hero-sub { opacity: 1; transform: none; transition-delay: .5s; }
.js .hero.in .hero-actions { opacity: 1; transform: none; transition-delay: .58s; }
.js .hero.in .hero-specs { opacity: 1; transform: none; transition-delay: .68s; }
.js .hero.in .scroll-cue { opacity: 1; transform: none; transition-delay: 1s; }

.js .scene-canvas { opacity: 0; transition: opacity 1.6s ease; }
.js .scene-canvas.on { opacity: 1; }

/* ------------------------- 8. riduzione del movimento + stampa */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .js [data-reveal], .js [data-stagger] > *,
  .js .hero-tag, .js .hero-pills, .js .hero-sub, .js .hero-actions,
  .js .hero-specs, .js .scroll-cue, .js .scene-canvas {
    opacity: 1 !important; transform: none !important;
  }
  .js .hero-title .line-in { transform: none !important; }
  /* Le soglie perdono lo scroll lungo: diventano normali stacchi di capitolo,
     senza chiedere 170vh di scorrimento per un effetto che non parte. */
  .chapter-gate { height: auto; }
  .chapter-open { position: static; height: auto; padding: clamp(4rem, 9vw, 7rem) 0; --enter: 1 !important; }
  .ticker-track { animation: none; }
  .scroll-cue-line::after { display: none; }
  .eyebrow::before { transform: none !important; }
}

@media print {
  .scene, .grain, .progress, header.site, .mobile-panel,
  .ticker, .scroll-cue, .cta-glow, .hero-grid { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  section { padding: 1.5rem 0; break-inside: avoid; }
  .hero { min-height: 0; padding-top: 0; }
  .faq-a { display: block !important; max-height: none !important; }
  .faq-a > p { padding-bottom: 1rem !important; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; }
}
