/* =========================================================
   ELIVO STUDIO — home
   Palette: black #000000 · platinum #E7ECEF · velvet #643A71 · lavender #8B5FBF
   ========================================================= */

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html, body { max-width: 100%; overflow-x: clip; }
img, svg { display: block; max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; background: none; border: 0; }
button { cursor: pointer; }
ol, ul { list-style: none; }
a { color: inherit; text-decoration: none; }
fieldset { border: 0; }
legend { padding: 0; }

/* ---------- font del brand ---------- */
@font-face {
  font-family: "Unbounded";
  src: url("../fonts/Unbounded-VariableFont_wght.ttf") format("truetype-variations"),
       url("../fonts/Unbounded-VariableFont_wght.ttf") format("truetype");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- tokens ---------- */
:root {
  --black:     #000000;
  --platinum:  #E7ECEF;
  --velvet:    #643A71;
  --lavender:  #8B5FBF;

  /* superfici */
  --bg:        var(--black);
  --ink:       var(--platinum);
  --ink-soft:  rgba(231, 236, 239, .66);
  --ink-mute:  rgba(231, 236, 239, .58);
  --rule:      rgba(231, 236, 239, .16);
  --accent:    var(--lavender);
  /* lavender schiarito: serve 4.5:1 sul nero per il testo piccolo */
  --accent-ink: #9C74CE;
  --btn-fg:    var(--black);
  --btn-hover: var(--platinum);
  --accent-2:  var(--velvet);
  --field-bg:  rgba(231, 236, 239, .05);

  /* tipografia: Unbounded su tutto, con fallback di sistema */
  --f-display: "Unbounded", "Trebuchet MS", system-ui, sans-serif;
  --f-ui: "Unbounded", "Trebuchet MS", system-ui, sans-serif;
  --f-mono: "Unbounded", ui-monospace, Consolas, monospace;

  /* misura */
  --pad: clamp(1.25rem, 5vw, 5rem);
  --maxw: 82rem;
  --sect-y: clamp(5.5rem, 13vh, 11rem);

  --ease: cubic-bezier(.22, .61, .36, 1);
  --slow: .9s;
}

/* scala progressiva per schermi grandi (2K / 4K) */
html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}
@media (min-width: 1600px) { html { font-size: 106.25%; } }
@media (min-width: 1920px) { html { font-size: 112.5%; } }
@media (min-width: 2560px) { html { font-size: 125%; } }
@media (min-width: 3300px) { html { font-size: 140%; } }

body {
  font-family: var(--f-ui);
  font-weight: 300;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 1s var(--ease), color 1s var(--ease);
}

/* tema chiaro attivo (sezione Metodo) */
body.is-light {
  --bg:       var(--platinum);
  --ink:      var(--black);
  --ink-soft: rgba(0, 0, 0, .72);
  --ink-mute: rgba(0, 0, 0, .62);
  --rule:     rgba(0, 0, 0, .16);
  --accent:   var(--velvet);
  --accent-ink: var(--velvet);
  /* sul velvet il testo va chiaro, e all'hover il fondo diventa nero */
  --btn-fg:    var(--platinum);
  --btn-hover: var(--black);
  --accent-2: var(--lavender);
  --field-bg: rgba(0, 0, 0, .04);
}

::selection { background: var(--accent); color: var(--btn-fg); }
body.is-light ::selection { background: var(--velvet); color: var(--platinum); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip {
  position: fixed; top: .5rem; left: .5rem; z-index: 200;
  padding: .7rem 1.1rem; background: var(--accent); color: var(--btn-fg);
  font-weight: 700; border-radius: 3px; transform: translateY(-160%);
  transition: transform .25s var(--ease);
}
.skip:focus { transform: none; }

/* ---------- sfondo animato ----------
   Tre livelli: alone, nebulosa col marchio (WebGL, solo col puntatore), grana. */
.glow {
  position: fixed; inset: -25%; z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(42% 38% at 32% 34%, rgba(139, 95, 191, .30), rgba(139, 95, 191, 0) 68%),
    radial-gradient(38% 34% at 72% 68%, rgba(100, 58, 113, .24), rgba(100, 58, 113, 0) 70%);
  animation: glowDrift 34s ease-in-out infinite alternate;
  transition: opacity 1s var(--ease);
  will-change: transform;
}
body.is-light .glow { opacity: .55; }

@keyframes glowDrift {
  0%   { transform: translate3d(-3%, -2%, 0) scale(1); }
  50%  { transform: translate3d(4%, 3%, 0) scale(1.08); }
  100% { transform: translate3d(-2%, 4%, 0) scale(1.02); }
}

.grain {
  position: fixed; inset: -50%; z-index: 2;
  pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/></filter><rect width='160' height='160' filter='url(%23n)'/></svg>");
  animation: grain 6s steps(5) infinite;
}
@keyframes grain {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-3%, 2%); }
  40%  { transform: translate(2%, -3%); }
  60%  { transform: translate(-2%, -2%); }
  80%  { transform: translate(3%, 1%); }
  100% { transform: translate(0, 0); }
}

main, .topbar, .foot, .drawer { position: relative; z-index: 3; }

/* ---------- marchio (mask: il file non viene modificato) ---------- */
[data-glyph] {
  display: block;
  background-color: currentColor;
  -webkit-mask: url("../img/logo.svg") no-repeat center / contain;
  mask: url("../img/logo.svg") no-repeat center / contain;
}

/* ---------- topbar ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.5rem);
  padding: clamp(.9rem, 2vw, 1.5rem) var(--pad);
  padding-top: max(clamp(.9rem, 2vw, 1.5rem), env(safe-area-inset-top));
  transition: background-color .5s var(--ease), border-color .5s var(--ease), backdrop-filter .5s;
  border-bottom: 1px solid transparent;
}
.topbar.is-stuck {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom-color: var(--rule);
}

.topbar__mark { display: flex; align-items: center; gap: .7rem; margin-right: auto; min-height: 44px; }
.topbar__mark .mark { width: 2.1rem; height: 2.1rem; flex: none; }
.topbar__word {
  font-family: var(--f-display); font-weight: 700;
  font-size: 1rem; letter-spacing: -.03em; line-height: 1;
  white-space: nowrap;
}
.topbar__word em {
  font-style: normal; font-weight: 300;
  font-size: .95em; letter-spacing: -.01em; margin-left: .35em;
  color: var(--ink-soft);
}

.topbar__nav { display: flex; gap: clamp(1.1rem, 2.2vw, 2.2rem); }
.topbar__nav a {
  font-size: .84rem; font-weight: 400; letter-spacing: -.005em;
  color: var(--ink-soft); position: relative;
  display: inline-flex; align-items: center; min-height: 44px;
  transition: color .3s var(--ease);
}
.topbar__nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: .7rem; height: 1px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform .45s var(--ease);
}
.topbar__nav a:hover { color: var(--ink); }
.topbar__nav a:hover::after { transform: scaleX(1); }

/* ---------- bottoni ---------- */
.btn {
  --btn-bg: var(--accent-ink);
  display: inline-flex; align-items: center; justify-content: center;
  padding: .95rem 1.7rem; border-radius: 100px;
  background: var(--btn-bg); color: var(--btn-fg);
  font-size: .86rem; font-weight: 600; letter-spacing: -.01em; line-height: 1;
  position: relative; overflow: hidden; isolation: isolate;
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--btn-hover);
  transform: translateY(101%);
  transition: transform .55s var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 .8rem 2.2rem -.7rem color-mix(in srgb, var(--accent) 70%, transparent); }
.btn:hover::before { transform: translateY(0); }
.btn--sm { padding: .8rem 1.35rem; min-height: 44px; font-size: .78rem; }
.btn--lg { padding: 1.1rem 1.9rem; font-size: .92rem; }

.link-arrow {
  display: inline-flex; align-items: center; gap: .6rem;
  min-height: 44px;
  font-size: .86rem; font-weight: 500; color: var(--ink-soft);
  transition: color .3s var(--ease), gap .35s var(--ease);
}
.link-arrow::after {
  content: ""; width: 1.5rem; height: 1px; background: currentColor;
  transition: width .35s var(--ease);
}
.link-arrow:hover { color: var(--ink); gap: .9rem; }
.link-arrow:hover::after { width: 2.2rem; }

/* ---------- burger + drawer ---------- */
.burger {
  display: none; width: 2.9rem; height: 2.9rem; flex: none;
  border: 1px solid var(--rule); border-radius: 100px;
  position: relative; transition: border-color .3s var(--ease);
}
.burger span {
  position: absolute; left: 50%; width: 1.05rem; height: 1.5px;
  background: var(--ink); border-radius: 2px;
  transition: transform .45s var(--ease), opacity .3s var(--ease);
}
.burger span:nth-child(1) { transform: translate(-50%, -3.5px); }
.burger span:nth-child(2) { transform: translate(-50%, 3.5px); }
.topbar.nav-open .burger span:nth-child(1) { transform: translate(-50%, 0) rotate(45deg); }
.topbar.nav-open .burger span:nth-child(2) { transform: translate(-50%, 0) rotate(-45deg); }

.drawer {
  position: fixed; inset: 0; z-index: 90;
  background: color-mix(in srgb, var(--bg) 96%, transparent);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  display: flex; flex-direction: column; justify-content: center;
  padding: 6rem var(--pad) 2.5rem;
  padding-bottom: max(2.5rem, env(safe-area-inset-bottom));
  opacity: 0; transition: opacity .45s var(--ease);
}
.drawer[hidden] { display: none; }
.drawer.is-open { opacity: 1; }

.drawer__nav { display: flex; flex-direction: column; gap: .2rem; }
.drawer__nav a {
  display: flex; align-items: baseline; gap: 1rem;
  font-family: var(--f-display); font-weight: 600;
  font-size: clamp(1.35rem, 6.2vw, 2rem); line-height: 1.5;
  letter-spacing: -.035em;
  padding: .45rem 0; border-bottom: 1px solid var(--rule);
  opacity: 0; transform: translateY(1.2rem);
  transition: opacity .5s var(--ease), transform .5s var(--ease), color .3s;
}
.drawer.is-open .drawer__nav a { opacity: 1; transform: none; }
.drawer__nav a:nth-child(1) { transition-delay: .06s; }
.drawer__nav a:nth-child(2) { transition-delay: .11s; }
.drawer__nav a:nth-child(3) { transition-delay: .16s; }
.drawer__nav a:nth-child(4) { transition-delay: .21s; }
.drawer__nav a:nth-child(5) { transition-delay: .26s; }
.drawer__nav a:nth-child(6) { transition-delay: .31s; }
.drawer__nav a:active { color: var(--accent); }
.drawer__nav i {
  font-style: normal; font-weight: 400;
  font-size: .68rem; color: var(--accent-ink); letter-spacing: .08em;
}
.drawer__foot {
  margin-top: auto; padding-top: 2rem;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1rem;
  font-family: var(--f-mono); font-size: .78rem; font-weight: 400; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-mute);
}

/* ---------- tipografia comune ---------- */
.eyebrow, .sect-tag {
  font-family: var(--f-mono);
  font-size: clamp(.75rem, 1.2vw, .8rem);
  font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-mute);
}
.sect-tag { margin-bottom: 1.4rem; }

h2 {
  font-family: var(--f-display);
  font-size: clamp(1.55rem, 4.4vw, 2.9rem);
  line-height: 1.14; letter-spacing: -.03em; font-weight: 600;
  max-width: 17ch;
}
.sect-head { margin-bottom: clamp(2.8rem, 7vw, 5rem); }

section {
  padding: var(--sect-y) var(--pad);
  max-width: var(--maxw);
  margin-inline: auto;
}

/* ---------- rivelazioni ----------
   Nascoste solo se il JS è attivo: senza JS il contenuto resta leggibile. */
.js .reveal {
  opacity: 0; transform: translateY(1.6rem);
  transition: opacity var(--slow) var(--ease), transform var(--slow) var(--ease);
  transition-delay: var(--d, 0s);
}
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- HERO ---------- */
.hero {
  min-height: 100vh; min-height: 100svh;
  padding-top: 7rem; padding-bottom: 2.5rem;
  display: flex; flex-direction: column; justify-content: center;
  max-width: none;
}
.hero__inner { width: 100%; max-width: var(--maxw); margin-inline: auto; }
.hero .eyebrow { margin-bottom: clamp(1.6rem, 4vw, 2.6rem); }

.hero__title {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(2rem, min(9.2vw, 8.4vh), 5.4rem);
  line-height: 1.08; letter-spacing: -.04em;
  margin-bottom: clamp(1.6rem, 3.4vw, 2.4rem);
}
.hero__title .line { display: block; overflow: hidden; padding-bottom: .06em; }
.js .hero__title .line__i {
  display: block;
  transform: translateY(105%);
  transition: transform 1.15s var(--ease);
  transition-delay: var(--d, 0s);
}
.js .hero.in .line__i { transform: none; }
.hero__title em {
  font-style: normal;
  color: var(--accent);
}

.hero__sub {
  font-size: clamp(.94rem, 1.5vw, 1.08rem);
  font-weight: 300;
  color: var(--ink-soft);
  max-width: 44ch; line-height: 1.75;
  margin-bottom: clamp(2rem, 4.5vw, 3rem);
}
.hero__cta { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(1.2rem, 3vw, 2.2rem); }

.hero__foot {
  width: 100%; max-width: var(--maxw); margin: auto auto 0;
  padding-top: clamp(2.5rem, 6vh, 4.5rem);
  display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem;
  font-family: var(--f-mono); font-size: clamp(.78rem, 1vw, .82rem); font-weight: 400;
  letter-spacing: .13em; text-transform: uppercase; color: var(--ink-mute);
}
.hero__scroll { display: inline-flex; align-items: center; gap: .8rem; }
.hero__scroll i {
  display: block; width: 1px; height: 2.4rem;
  background: linear-gradient(var(--accent), transparent);
  animation: scrollPulse 2.6s var(--ease) infinite;
  transform-origin: top;
}
@keyframes scrollPulse {
  0%, 100% { transform: scaleY(.35); opacity: .5; }
  50%      { transform: scaleY(1); opacity: 1; }
}
.hero__note { text-align: right; max-width: 22ch; line-height: 1.5; }

/* ---------- FRASE A TUTTA PAGINA ---------- */
.statement { padding-block: clamp(6rem, 18vh, 13rem); }
.statement__t {
  font-family: var(--f-display); font-weight: 600;
  font-size: clamp(1.5rem, 5vw, 3.2rem);
  line-height: 1.28; letter-spacing: -.035em;
  max-width: 20ch;
}
.statement__t em { font-style: normal; color: var(--accent-ink); }

/* ---------- ELENCHI DELLA HOME ---------- */
.board__head { margin-bottom: clamp(2.2rem, 5vw, 3.5rem); }
.lines { border-top: 1px solid var(--rule); }
.lines li { border-bottom: 1px solid var(--rule); }
.lines a {
  display: grid; grid-template-columns: 3.5rem minmax(0, 1fr) auto;
  align-items: center; gap: clamp(.8rem, 2vw, 1.5rem);
  padding: clamp(1.05rem, 2.4vw, 1.6rem) 0;
  min-height: 44px; position: relative;
}
.lines a::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 14%, transparent), transparent 60%);
  opacity: 0; transition: opacity .45s var(--ease); pointer-events: none;
}
.lines a:hover::before { opacity: 1; }
.lines__n {
  font-size: .75rem; font-weight: 400; letter-spacing: .1em;
  color: var(--accent-ink);
}
.lines__t {
  font-family: var(--f-display); font-weight: 500;
  font-size: clamp(1.05rem, 2.6vw, 1.7rem);
  line-height: 1.3; letter-spacing: -.03em;
  transition: transform .5s var(--ease);
}
.lines a:hover .lines__t { transform: translateX(.5rem); }
.lines a::after {
  content: ""; width: 1.5rem; height: 1px; background: var(--ink-mute);
  transition: width .4s var(--ease), background-color .4s var(--ease);
}
.lines a:hover::after { width: 2.4rem; background: var(--accent-ink); }
.board__more { margin-top: clamp(1.8rem, 4vw, 2.8rem); }

/* ---------- PERCORSO DEL METODO ----------
   Il metodo e una sequenza, non un elenco: cinque tappe su una linea
   che si disegna da sinistra quando la sezione entra in campo. */
.track {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  position: relative;
  padding-top: 2.6rem;
}
.track::before,
.track::after {
  content: ""; position: absolute; top: 2.6rem; left: 0; right: 0; height: 1px;
}
.track::before { background: var(--rule); }
.track::after {
  background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform 1.6s var(--ease) .15s;
}
.track.in::after { transform: scaleX(1); }

.track a {
  display: block; padding: 1.4rem clamp(.5rem, 1.5vw, 1rem) .5rem 0;
  position: relative; min-height: 44px;
}
/* pallino sulla linea */
.track a::before {
  content: ""; position: absolute; top: -4px; left: 0;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--accent);
  transition: background-color .4s var(--ease), transform .4s var(--ease);
}
.track a:hover::before { background: var(--accent); transform: scale(1.35); }

.track__n {
  display: block; font-size: .72rem; font-weight: 400; letter-spacing: .12em;
  color: var(--accent-ink); margin-bottom: .5rem;
}
.track__t {
  display: block;
  font-family: var(--f-display); font-weight: 500;
  font-size: clamp(.92rem, 1.5vw, 1.15rem);
  line-height: 1.35; letter-spacing: -.03em;
  transition: transform .45s var(--ease);
}
.track a:hover .track__t { transform: translateY(-2px); }

/* su schermi stretti il percorso ruota in verticale */
@media (max-width: 720px) {
  .track { grid-template-columns: minmax(0, 1fr); padding-top: 0; padding-left: 1.6rem; }
  .track::before, .track::after {
    top: 0; bottom: 0; left: 0; right: auto; width: 1px; height: auto;
  }
  .track::after { transform: scaleY(0); transform-origin: top; }
  .track.in::after { transform: scaleY(1); }
  .track a { padding: .95rem 0; }
  .track a::before { top: 1.5rem; left: -1.6rem; transform: translateX(-3px); }
  .track a:hover::before { transform: translateX(-3px) scale(1.35); }
  .track__n { display: inline-block; margin-right: .8rem; margin-bottom: 0; }
  .track__t { display: inline; }
}

/* ---------- GARANZIE ---------- */
.proof__claim {
  font-size: clamp(1.5rem, 4.6vw, 3rem);
  max-width: 20ch; margin-bottom: clamp(2.5rem, 6vw, 4rem);
}
.proof__claim em { font-style: normal; color: var(--accent-ink); }
.guarantees {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  border-top: 1px solid var(--rule);
}
.guarantees li {
  padding: clamp(1.4rem, 3vw, 2.2rem) 1.5rem clamp(1.8rem, 3.5vw, 2.6rem) 0;
  border-bottom: 1px solid var(--rule);
}
.guarantees__k {
  display: block;
  font-family: var(--f-display); font-weight: 600;
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  line-height: 1.2; letter-spacing: -.035em;
  color: var(--accent-ink); margin-bottom: .5rem;
}
.guarantees__v { color: var(--ink-soft); font-size: .86rem; font-weight: 300; line-height: 1.65; }

/* ---------- PAGINE INTERNE ---------- */
.page-head {
  padding-top: clamp(8rem, 20vh, 12rem);
  padding-bottom: clamp(3rem, 8vh, 5rem);
}
.page-title {
  font-family: var(--f-display); font-weight: 600;
  font-size: clamp(1.9rem, min(7.6vw, 8vh), 4.4rem);
  line-height: 1.12; letter-spacing: -.04em;
  margin: clamp(1.2rem, 3vw, 2rem) 0 clamp(1.5rem, 3.5vw, 2.2rem);
}
.page-title em { font-style: normal; color: var(--accent-ink); }
.page-lead {
  font-size: clamp(.95rem, 1.5vw, 1.08rem); font-weight: 300;
  color: var(--ink-soft); line-height: 1.78; max-width: 46ch;
}

.entry {
  max-width: var(--maxw); margin-inline: auto;
  padding: clamp(2.5rem, 6vh, 4.5rem) var(--pad);
  display: grid; grid-template-columns: 5rem minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 2.5rem);
  border-top: 1px solid var(--rule);
}
.entry__n {
  font-size: .75rem; font-weight: 400; letter-spacing: .12em;
  color: var(--accent-ink); padding-top: .5rem;
}
.entry__body h2 {
  font-size: clamp(1.35rem, 3.4vw, 2.1rem);
  margin-bottom: clamp(1rem, 2.5vw, 1.5rem);
}
.entry__body p {
  font-size: clamp(.92rem, 1.45vw, 1.02rem); font-weight: 300;
  color: var(--ink-soft); line-height: 1.82; max-width: 56ch;
  margin-bottom: 1.1rem;
}

.ticks { margin-top: 1.6rem; display: grid; gap: .75rem; }
.ticks li {
  position: relative; padding-left: 1.6rem;
  font-size: .88rem; font-weight: 300; color: var(--ink-soft); line-height: 1.6;
}
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: .7rem; height: 1px; background: var(--accent-ink);
}

.meta-row {
  margin-top: 1.8rem; display: flex; flex-wrap: wrap; gap: 1rem 2.5rem;
  padding-top: 1.4rem; border-top: 1px solid var(--rule);
}
.meta-row span { font-size: .88rem; font-weight: 300; color: var(--ink); }
.meta-row i {
  display: block; font-style: normal;
  font-size: .72rem; font-weight: 500; letter-spacing: .13em;
  text-transform: uppercase; color: var(--ink-mute); margin-bottom: .3rem;
}

.cta-band {
  text-align: center;
  padding-block: clamp(4.5rem, 12vh, 8rem);
  border-top: 1px solid var(--rule);
}
.cta-band h2 { margin: 0 auto 1rem; max-width: 22ch; }
.cta-band p {
  color: var(--ink-soft); font-size: .95rem; font-weight: 300;
  margin-bottom: 2rem;
}

.topbar__nav a[aria-current="page"] { color: var(--ink); }
.topbar__nav a[aria-current="page"]::after { transform: scaleX(1); }

@media (max-width: 640px) {
  .entry { grid-template-columns: minmax(0, 1fr); gap: .5rem; }
  .entry__n { padding-top: 0; }
  .guarantees li { padding-right: 0; }
}

/* ---------- SEZIONI DIMOSTRATIVE ---------- */
.demo { padding-block: clamp(5rem, 14vh, 9rem); }
.demo__big {
  font-family: var(--f-display); font-weight: 600;
  font-size: clamp(1.4rem, 4.2vw, 2.8rem);
  line-height: 1.25; letter-spacing: -.035em;
  max-width: 20ch; margin-bottom: 1.6rem;
}
.counter { color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.demo__say {
  font-size: clamp(.95rem, 1.5vw, 1.08rem); font-weight: 300;
  color: var(--ink-soft); line-height: 1.78; max-width: 44ch;
}
.demo--swap h2 { margin-bottom: clamp(2rem, 5vw, 3rem); }
.demo--swap .demo__say { margin-top: clamp(1.8rem, 4vw, 2.5rem); }

/* confronto trascinabile */
.swap { max-width: 22rem; }
.phone {
  border: 1px solid var(--rule); border-radius: 1.6rem;
  padding: .5rem; background: color-mix(in srgb, var(--ink) 6%, transparent);
}
.phone__screen {
  position: relative; border-radius: 1.2rem; overflow: hidden;
  aspect-ratio: 9 / 15; background: #fff;
  touch-action: pan-y; user-select: none; cursor: ew-resize;
}
.mock { position: absolute; inset: 0; display: flex; flex-direction: column; }
.mock__bar {
  flex: none; padding: .5rem .7rem; font-size: .5rem; letter-spacing: .02em;
  background: #d8d8d8; color: #555; font-family: system-ui, sans-serif;
}

/* la versione vecchia */
.mock--old { background: #fff; }
.mock__old-body { padding: .9rem .8rem; font-family: "Times New Roman", Times, serif; color: #222; }
.mock__old-logo { font-size: .52rem; letter-spacing: .04em; color: #1a4f8a; margin-bottom: .8rem; font-weight: 700; }
.mock__old-h { font-size: .85rem; margin-bottom: .6rem; color: #1a4f8a; }
.mock__old-p { font-size: .5rem; line-height: 1.45; margin-bottom: .5rem; text-align: justify; }
.mock__old-link { font-size: .5rem; color: #1a4f8a; text-decoration: underline; margin-top: .4rem; }

/* la versione nostra */
.mock--new { background: #000; clip-path: inset(0 0 0 50%); }
.mock__new-body { padding: 1.1rem .9rem; display: flex; flex-direction: column; height: 100%; }
.mock__new-tag {
  font-size: .44rem; letter-spacing: .16em; text-transform: uppercase;
  color: rgba(231,236,239,.55); margin-bottom: auto;
}
.mock__new-h {
  font-family: var(--f-display); font-weight: 600;
  font-size: .92rem; line-height: 1.22; letter-spacing: -.035em; color: #E7ECEF;
  margin-bottom: .5rem;
}
.mock__new-h em { font-style: normal; color: #9C74CE; }
.mock__new-p { font-size: .5rem; font-weight: 300; color: rgba(231,236,239,.66); margin-bottom: .8rem; }
.mock__new-btn {
  align-self: flex-start; padding: .45rem .9rem; border-radius: 100px;
  background: #9C74CE; color: #000; font-size: .5rem; font-weight: 600;
}

.swap__handle {
  position: absolute; top: 0; bottom: 0; left: 50%; width: 2.6rem;
  transform: translateX(-50%); cursor: ew-resize;
  display: grid; place-items: center;
}
.swap__handle::before {
  content: ""; position: absolute; top: 0; bottom: 0; width: 2px;
  background: var(--accent-ink);
}
.swap__grip {
  position: relative; width: 2rem; height: 2rem; border-radius: 50%;
  background: var(--accent-ink); border: 2px solid var(--bg);
  display: block;
}
.swap__grip::before, .swap__grip::after {
  content: ""; position: absolute; top: 50%; width: 0; height: 0;
  border-block: 4px solid transparent;
}
.swap__grip::before { left: .35rem; border-right: 5px solid #000; transform: translateY(-50%); }
.swap__grip::after  { right: .35rem; border-left: 5px solid #000; transform: translateY(-50%); }
.swap__handle:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.swap__labels {
  display: flex; justify-content: space-between; margin-top: .9rem;
  font-size: .78rem; font-weight: 500; letter-spacing: .13em;
  text-transform: uppercase; color: var(--ink-mute);
}

/* ---------- CHIUSURA ---------- */
.close { padding-block: clamp(5rem, 15vh, 10rem); }
.close__big {
  font-family: var(--f-display); font-weight: 600;
  font-size: clamp(1.5rem, 4.6vw, 3rem);
  line-height: 1.22; letter-spacing: -.035em; margin-bottom: 1.4rem;
}
.close__say {
  font-size: clamp(.95rem, 1.5vw, 1.08rem); font-weight: 300;
  color: var(--ink-soft); line-height: 1.78; max-width: 46ch;
  margin-bottom: 1.6rem;
}
.close__ask {
  font-family: var(--f-display); font-weight: 500;
  font-size: clamp(1.05rem, 2.2vw, 1.4rem);
  letter-spacing: -.03em; line-height: 1.4;
  margin-bottom: 2.2rem; max-width: 24ch;
}

@media (max-width: 640px) {
  .swap { max-width: 100%; }
}

/* ---------- STUDIO ---------- */
.studio { position: relative; }
.studio__glyph {
  position: absolute;
  top: 50%; right: calc(var(--pad) * -.2);
  width: clamp(18rem, 42vw, 34rem); aspect-ratio: 1;
  transform: translateY(-50%);
  color: var(--ink);
  opacity: .05;
  pointer-events: none;
  will-change: transform;
}
.people {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 0;
  border-top: 1px solid var(--rule);
  position: relative;
}
.person {
  padding: clamp(1.6rem, 3vw, 2.4rem) 1.5rem clamp(2rem, 3.5vw, 2.8rem) 0;
  border-bottom: 1px solid var(--rule);
}
.person h3 {
  font-family: var(--f-display); font-weight: 600;
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  letter-spacing: -.03em; line-height: 1.3; margin-bottom: .6rem;
}
.person p {
  color: var(--ink-mute); font-size: .8rem; line-height: 1.6;
  font-weight: 300; letter-spacing: .01em;
}
.studio__note {
  margin-top: clamp(2.2rem, 5vw, 3.5rem);
  color: var(--ink-soft); font-size: clamp(.9rem, 1.4vw, 1rem);
  font-weight: 300; max-width: 42ch; line-height: 1.78; position: relative;
}

/* ---------- CONTATTI ---------- */
.contact {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: clamp(2.5rem, 6vw, 5.5rem);
  align-items: start;
}
.contact__lead { position: sticky; top: 7rem; }
.contact__lead h2 { margin-bottom: 1.4rem; }
.contact__lead p { color: var(--ink-soft); font-size: clamp(.9rem, 1.4vw, 1rem); font-weight: 300; line-height: 1.78; max-width: 36ch; }

.form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem clamp(1rem, 2.5vw, 1.8rem);
}
.field { display: grid; gap: .55rem; min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field label, .chips legend {
  font-family: var(--f-mono); font-size: .78rem; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase; color: var(--ink-mute);
}
.field label i { font-style: normal; text-transform: none; letter-spacing: .03em; }
.field input, .field textarea {
  width: 100%;
  padding: .95rem 1.05rem;
  background: var(--field-bg);
  border: 1px solid var(--rule);
  border-radius: 4px;
  color: var(--ink); font-size: .92rem; font-weight: 300;
  transition: border-color .3s var(--ease), background-color .3s var(--ease);
}
.field textarea { resize: vertical; min-height: 5.5rem; line-height: 1.5; }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-mute); }
.field input:hover, .field textarea:hover { border-color: color-mix(in srgb, var(--ink) 28%, transparent); }
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 7%, transparent);
}
.field.has-err input, .field.has-err textarea { border-color: #E0635A; }
.field__err {
  font-size: .84rem; color: #E0635A; min-height: 0; line-height: 1.35;
}

.chips__row { display: flex; flex-wrap: wrap; gap: .6rem; }
.chip {
  padding: .85rem 1.2rem; min-height: 44px; border-radius: 100px;
  border: 1px solid var(--rule); color: var(--ink-soft);
  font-size: .82rem; font-weight: 400; line-height: 1;
  transition: border-color .3s var(--ease), color .3s var(--ease), background-color .3s var(--ease);
}
.chip:hover { border-color: color-mix(in srgb, var(--ink) 35%, transparent); color: var(--ink); }
.chip[aria-checked="true"] {
  background: var(--btn-bg); border-color: var(--btn-bg); color: var(--btn-fg); font-weight: 600;
}

.consent { grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: .8rem; }
.consent label { text-transform: none; letter-spacing: 0; font-family: var(--f-ui); font-weight: 300; font-size: .8rem; line-height: 1.7; color: var(--ink-soft); cursor: pointer; }
.consent .field__err { grid-column: 1 / -1; }
.check {
  width: 1.5rem; height: 1.5rem; flex: none; margin-top: .1rem;
  border: 1px solid var(--rule); border-radius: 3px;
  display: grid; place-items: center; position: relative;
  transition: border-color .3s var(--ease), background-color .3s var(--ease);
}
/* area di tocco allargata senza toccare la grafica */
.check::after { content: ""; position: absolute; inset: -11px; }
.check svg { width: .92rem; height: .92rem; fill: none; stroke: var(--btn-fg); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.check svg path { stroke-dasharray: 18; stroke-dashoffset: 18; transition: stroke-dashoffset .35s var(--ease); }
.check[aria-checked="true"] { background: var(--btn-bg); border-color: var(--btn-bg); }
.check[aria-checked="true"] svg path { stroke-dashoffset: 0; }
.consent.has-err .check { border-color: #E0635A; }

.form__send { display: flex; flex-wrap: wrap; align-items: center; gap: 1.2rem; margin-top: .6rem; }
.form__msg { font-size: .88rem; color: var(--accent-ink); line-height: 1.6; }
.form__msg.is-err { color: #E0635A; }

/* ---------- FOOTER ---------- */
.foot {
  max-width: var(--maxw); margin-inline: auto;
  padding: clamp(2.5rem, 5vw, 4rem) var(--pad);
  padding-bottom: max(clamp(2.5rem, 5vw, 4rem), env(safe-area-inset-bottom));
  border-top: 1px solid var(--rule);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1.5rem 2rem;
}
.foot__brand { display: flex; align-items: center; gap: .7rem; font-family: var(--f-display); font-weight: 700; font-size: .92rem; letter-spacing: -.03em; }
.foot__brand .mark { width: 1.8rem; height: 1.8rem; flex: none; }
.foot__brand em { font-style: normal; font-weight: 300; font-size: .95em; margin-left: .35em; color: var(--ink-soft); }
.foot__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem 1.5rem; }
.foot__meta, .foot__copy {
  font-family: var(--f-mono); font-size: .78rem; font-weight: 400;
  letter-spacing: .12em; text-transform: uppercase; color: var(--ink-mute);
}
.foot__meta a { display: inline-flex; align-items: center; min-height: 44px; transition: color .3s var(--ease); }
.foot__meta a:hover { color: var(--accent); }

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1080px) {
  .proof, .contact { grid-template-columns: minmax(0, 1fr); }
  .contact__lead { position: static; }
  .manifesto__body { margin-left: 0; }
}

@media (max-width: 900px) {
  .topbar__nav, .topbar__cta { display: none; }
  .burger { display: block; }
  .index__row {
    grid-template-columns: 3rem minmax(0, 1fr);
  }
  .index__d { grid-column: 2; max-width: none; }
  .index__n { padding-top: .35rem; }
}

@media (max-width: 640px) {
  :root { --sect-y: clamp(4.5rem, 11vh, 7rem); }
  .hero { padding-top: 5.75rem; }
  .form { grid-template-columns: minmax(0, 1fr); }
  .hero__foot { flex-direction: column; align-items: flex-start; gap: 1.2rem; }
  .hero__note { text-align: left; max-width: 28ch; }
  .hero__cta { flex-direction: column; align-items: stretch; gap: 1.1rem; }
  .hero__cta .btn { width: 100%; }
  .hero__cta .link-arrow { justify-content: center; }
  .guarantees li { grid-template-columns: minmax(0, 1fr); gap: .5rem; }
  .step, .person { padding-right: 0; }
  .foot { flex-direction: column; align-items: flex-start; }
  .studio__glyph { right: -18%; opacity: .045; }
}

/* rotazione telefono in orizzontale:
   poca altezza e molta larghezza, quindi l'apertura passa su due colonne */
@media (max-height: 560px) and (orientation: landscape) {
  .hero {
    min-height: 100svh;
    padding-top: 4.75rem; padding-bottom: 1.5rem;
  }
  /* con la sola intestazione il titolo prende tutta la larghezza */
  .hero__title { margin-bottom: 0; font-size: clamp(1.8rem, 12.6vh, 3.4rem); }
  .hero__foot { padding-top: 1.4rem; }
  .hero__note { display: none; }
  .hero__scroll i { height: 1.2rem; }
  :root { --sect-y: 4rem; }
  .drawer { padding-top: 4.5rem; justify-content: flex-start; overflow-y: auto; }
  .drawer__nav a { font-size: clamp(1.3rem, 5.2vh, 1.9rem); padding: .15rem 0; }
  .drawer__foot { padding-top: 1.2rem; }
  .studio__glyph { width: 16rem; }
}

/* accessibilità: meno movimento */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero__title .line__i { transform: none; }
  .glow { animation: none; }
  .step::after { transform: scaleX(1); }
  .grain { animation: none; }
}

/* ---------- PAGINA CONTATTI ---------- */
.contact-page {
  max-width: var(--maxw); margin-inline: auto;
  padding: 0 var(--pad) clamp(4rem, 10vh, 7rem);
}
.contact-page .form { max-width: 46rem; }

/* ---------- PAROLA EVIDENZIATA CON SCRITTURA ----------
   Fondo pieno come una selezione di testo, piu cursore che
   scrive e cancella come su un dispositivo. */
.hero__title .typed {
  font-style: normal;
  /* Unbounded copre latino, cirillico e greco. Per gli altri alfabeti
     il ripiego è scelto a mano, non lasciato al caso. */
  font-family: "Unbounded",
    "Hiragino Sans", "Yu Gothic UI", "Microsoft YaHei UI", "Malgun Gothic",
    "Noto Sans CJK JP", "Noto Sans CJK KR", "Noto Sans CJK SC",
    "Geeza Pro", "Noto Sans Arabic", "Arial Hebrew", "Noto Sans Hebrew",
    "Leelawadee UI", "Thonburi", "Noto Sans Thai",
    "Nirmala UI", "Kohinoor Devanagari", "Noto Sans Devanagari",
    "Segoe UI", system-ui, sans-serif;
  background: var(--accent);
  color: var(--black);
  padding: .04em .12em .06em;
  border-radius: .04em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  white-space: nowrap;
}
.typed__caret {
  display: inline-block;
  width: .055em;
  height: .78em;
  margin-left: .05em;
  background: currentColor;
  vertical-align: baseline;
  animation: caretBlink 1.06s steps(1) infinite;
}
/* mentre scrive o cancella il cursore resta fisso, come sui dispositivi veri */
.typed.is-working .typed__caret { animation: none; opacity: 1; }

@keyframes caretBlink {
  0%, 50%      { opacity: 1; }
  50.01%, 100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .typed__caret { display: none; }
}

/* ---------- RITMO A PIENA SCHERMATA ----------
   Ogni blocco occupa almeno un'altezza di schermo con il contenuto
   centrato: quando uno è al centro, quello sopra e quello sotto
   restano fuori campo. */
.statement,
.demo,
.close {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* in orizzontale sul telefono lo schermo è troppo basso per imporre
   una schermata piena a ogni blocco: si torna alla spaziatura normale */
@media (max-height: 560px) and (orientation: landscape) {
  .statement,
  .demo,
  .close {
    min-height: 0;
  }
}

/* livello di rivelazione: sta sopra le scie e si somma alla luce */
#reveal {
  position: fixed; inset: 0; z-index: 1;
  width: 100%; height: 100%;
  pointer-events: none;
  mix-blend-mode: screen;
}
body.is-light #reveal { mix-blend-mode: multiply; opacity: .6; }
