/* =========================================================
   VIVAGNOO — design system
   Colori: solo dark navy e bianco. Font: solo Jost.
   ========================================================= */
:root {
  /* colori del brand */
  --navy:  #2E2F36;
  --white: #FFFFFF;

  /* colori di contesto (le sezioni .invert li scambiano) */
  --bg:      var(--navy);
  --fg:      var(--white);
  --muted-c: rgba(255, 255, 255, .62);
  --line:    rgba(255, 255, 255, .16);

  /* scala degli spazi: pochi valori, sempre gli stessi */
  --s-1: 12px;
  --s-2: 24px;
  --s-3: 40px;
  --s-block:   clamp(48px, 6vw, 80px);     /* tra intestazione e contenuto */
  --s-section: clamp(104px, 15vh, 168px);  /* tra le sezioni */

  /* griglia */
  --container: 1200px;
  --gutter: clamp(20px, 4vw, 56px);
  --gap: clamp(24px, 4vw, 48px);

  /* scala tipografica */
  --f: "Jost", "Helvetica Neue", Arial, sans-serif;
  --t-hero:      clamp(2.75rem, 6.4vw, 5.75rem);
  --t-h2:        clamp(2rem, 3.4vw, 3rem);
  --t-statement: clamp(1.6rem, 2.8vw, 2.375rem);
  --t-h3:        1.5rem;
  --t-lead:      1.125rem;
  --t-body:      1rem;
  --t-label:     11px;

  /* movimento */
  --ease: cubic-bezier(.2, .7, .2, 1);
  --dur-ui: .3s;
  --dur-reveal: .9s;


  --hdr-h: 72px;
  color-scheme: dark;
}
.invert {
  --bg: var(--white);
  --fg: var(--navy);
  --muted-c: rgba(46, 47, 54, .62);
  --line: rgba(46, 47, 54, .14);
  color-scheme: light;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 400 var(--t-body)/1.7 var(--f);
  -webkit-font-smoothing: antialiased;
}
body.menu-open { overflow: hidden; }
main { overflow-x: clip; }
h1, h2, h3, p, ol, dl { margin: 0; }
a { color: inherit; }
em { font-style: normal; font-weight: 500; }
section[id], article[id] { scroll-margin-top: var(--hdr-h); }
:focus-visible { outline: 1px solid currentColor; outline-offset: 4px; }

/* ---------- testi ---------- */
.label {
  font: 500 var(--t-label)/1.4 var(--f);
  text-transform: uppercase; letter-spacing: .22em;
}
.t-hero, .t-h2, .t-statement, .t-h3 { font-weight: 300; text-wrap: balance; }
.t-hero      { font-size: var(--t-hero); line-height: 1.04; letter-spacing: -.025em; }
.t-h2        { font-size: var(--t-h2); line-height: 1.1; letter-spacing: -.02em; }
.t-statement { font-size: var(--t-statement); line-height: 1.35; letter-spacing: -.01em; }
.t-h3        { font-size: var(--t-h3); line-height: 1.25; font-weight: 400; }
.t-lead      { font-size: var(--t-lead); line-height: 1.65; }
.t-body      { font-size: var(--t-body); line-height: 1.7; max-width: 60ch; text-wrap: pretty; }
.muted       { color: var(--muted-c); }

/* etichetta di sezione con l'occhiello del cartellino */
.kicker { display: flex; align-items: center; gap: var(--s-1); color: var(--muted-c); margin-bottom: var(--s-2); }
.kicker::before {
  content: ""; flex: none; width: 7px; height: 7px;
  border: 1px solid currentColor; border-radius: 50%;
}

/* ---------- layout ---------- */
.wrap { max-width: var(--container); margin: 0 auto; padding-inline: var(--gutter); }
.section { background: var(--bg); color: var(--fg); padding-block: var(--s-section); overflow: clip; }  /* lo zoom resta dentro la sezione */
.section + .section:not(.invert) { border-top: 1px solid var(--line); }
.section-head { margin-bottom: var(--s-block); }
.section-head .t-h2 { max-width: 16ch; }
.section-head .t-body { margin-top: var(--s-2); }

/* dichiarazioni centrate: solo hero e chi siamo */
.statement { max-width: 820px; margin: 0 auto; padding-inline: var(--gutter); text-align: center; }
.statement .kicker { justify-content: center; }
.statement > * + * { margin-top: var(--s-2); }
.statement .t-body, .statement .t-lead { margin-inline: auto; max-width: 52ch; }
.statement .actions { justify-content: center; margin-top: var(--s-3); }

/* ---------- pulsanti ----------
   .btn  principale: rettangolo sottile, il testo rotola e il fondo si riempie dal basso
   .cta  invito secondario: testo + linea con freccia che si allunga */
.actions { display: flex; flex-wrap: wrap; gap: var(--s-1); margin-top: var(--s-3); }
.btn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; height: 54px; padding: 0 34px;
  font: 500 var(--t-label)/1 var(--f); text-transform: uppercase; letter-spacing: .22em;
  text-decoration: none; cursor: pointer;
  border: 1px solid var(--fg); border-radius: 0;
  transition: color .5s var(--ease);
}
.btn::after {      /* riempimento che sale dal basso */
  content: ""; position: absolute; inset: 0; z-index: -1;
  transform: scaleY(0); transform-origin: bottom;
  transition: transform .55s var(--ease);
}
.btn:hover::after { transform: scaleY(1); }
.btn-line { color: var(--fg); background: transparent; }
.btn-line::after { background: var(--fg); }
.btn-line:hover { color: var(--bg); }
.btn-solid { color: var(--bg); background: var(--fg); }
.btn-solid::after { background: var(--bg); }
.btn-solid:hover { color: var(--fg); }
/* testo che rotola: la prima riga esce in alto, la copia entra dal basso (struttura creata da effects.js) */
.btn-roll { display: block; overflow: hidden; height: 1.2em; line-height: 1.2; }
.btn-t { display: block; transition: transform .55s var(--ease); }
.btn:hover .btn-t { transform: translateY(-100%); }

.cta {
  display: inline-flex; align-items: center; gap: 18px;
  font: 500 var(--t-label)/1 var(--f); text-transform: uppercase; letter-spacing: .22em;
  color: var(--fg); text-decoration: none; padding: 8px 0;
}
.cta-line { position: relative; display: block; width: 44px; height: 1px; background: currentColor; transition: width .55s var(--ease); }
.cta-line::after {
  content: ""; position: absolute; right: 0; top: 0; width: 7px; height: 7px;
  border-top: 1px solid currentColor; border-right: 1px solid currentColor;
  transform: translate(0, -50%) rotate(45deg); transform-origin: center;
}
.cta:hover .cta-line { width: 80px; }
@media (prefers-reduced-motion: reduce) { .btn-t, .btn::after, .cta-line { transition: none; } }

/* ---------- header ---------- */
.hdr {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--hdr-h);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding-inline: var(--gutter);
  color: var(--white);
  border-bottom: 1px solid transparent;
  transition: background var(--dur-ui) var(--ease), border-color var(--dur-ui) var(--ease);
}
.hdr.solid { background: rgba(46, 47, 54, .94); backdrop-filter: blur(10px); border-bottom-color: rgba(255,255,255,.16); }
.menu-open .hdr { background: transparent; border-bottom-color: transparent; }
.logo { display: block; line-height: 0; color: var(--white); }
.logo-svg { display: block; overflow: visible; height: 22px; width: auto; aspect-ratio: 548.6 / 78.7; fill: #FFFFFF; }
@media (max-width: 560px) { .logo-svg { height: 17px; } }
.hdr-side { text-decoration: none; color: inherit; justify-self: start; }
.hdr-right { justify-self: end; display: flex; align-items: center; gap: var(--s-3); }
.area-link { display: inline-flex; align-items: center; gap: 8px; }
.area-ico { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.3; flex: none; }
@media (max-width: 560px) { .hdr .area-txt { display: none; } .hdr .area-ico { width: 18px; height: 18px; } .hdr-right { gap: var(--s-2); } }
.menu-btn { justify-self: end; background: none; border: 0; cursor: pointer; display: flex; align-items: center; gap: var(--s-1); padding: 8px 0; }
.burger { display: grid; gap: 6px; width: 20px; }
.burger i { display: block; height: 1px; background: currentColor; transition: transform var(--dur-ui) var(--ease); }
.menu-open .burger i:first-child { transform: translateY(3.5px) rotate(45deg); }
.menu-open .burger i:last-child { transform: translateY(-3.5px) rotate(-45deg); }
@media (max-width: 560px) {
  .hdr > a.hdr-side { font-size: 0; }
  .hdr > a.hdr-side::before { content: "+"; font-size: 22px; font-weight: 300; }
  .menu-label { display: none; }
}


/* menu a tutto schermo */
.menu {
  position: fixed; inset: 0; z-index: 40; background: var(--navy); color: var(--white);
  display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center;
  padding: var(--hdr-h) var(--gutter) var(--s-3);
  animation: fadeIn var(--dur-ui) var(--ease);
}
.menu[hidden] { display: none; }
.menu-nav { display: flex; flex-direction: column; gap: var(--s-1); }
.menu-nav a {
  font: 300 var(--t-h2)/1.15 var(--f); letter-spacing: -.02em; text-decoration: none;
  opacity: 0; transform: translateY(16px);
  animation: rise var(--dur-reveal) var(--ease) forwards;
}
.menu-nav a:hover { color: rgba(255,255,255,.55); }
.menu-nav a:nth-child(2) { animation-delay: .08s; } .menu-nav a:nth-child(3) { animation-delay: .16s; }
.menu-nav a:nth-child(4) { animation-delay: .24s; } .menu-nav a:nth-child(5) { animation-delay: .32s; }
.menu-foot { margin-top: var(--s-block); color: rgba(255,255,255,.62); }
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } }

/* ---------- comparsa allo scroll ---------- */
.js .reveal {
  opacity: 0;
  transition: opacity var(--dur-reveal) var(--ease);
  transition-delay: var(--d, 0s);
}
.js .reveal.in { opacity: 1; }

/* zoom morbido legato allo scroll (valori calcolati in site.js) */
.js [data-zoom] { transform-origin: 50% 50%; will-change: transform, opacity; }
.panel-text[data-zoom] { transform-origin: 0 50%; }   /* testi allineati a sinistra: crescono dal bordo */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transition: none; }
  .js [data-zoom] { transform: none !important; opacity: 1 !important; }
  .menu, .menu-nav a { animation: none; opacity: 1; transform: none; }
}

/* ---------- hero ---------- */
.hero {
  overflow: hidden;   /* lo zoom in uscita non deve creare scroll orizzontale */
  min-height: 100svh; display: flex; align-items: center; justify-content: center;
  padding-block: calc(var(--hdr-h) + var(--s-3)) var(--s-block);
}
.hero .statement { max-width: 1120px; }

/* ---------- servizi ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.panel {
  position: relative; isolation: isolate; overflow: clip;
  display: flex; align-items: flex-start;   /* i due pannelli partono alla stessa altezza */
  padding-block: var(--s-section);
  /* il testo si allinea alla stessa griglia delle altre sezioni */
  padding-inline: calc(max(0px, (100vw - var(--container)) / 2) + var(--gutter)) calc(var(--gap) / 2);
}
.panel + .panel {
  border-left: 1px solid var(--line);
  padding-inline: calc(var(--gap) / 2) calc(max(0px, (100vw - var(--container)) / 2) + var(--gutter));
}
.panel-text { max-width: 460px; }
.panel-text .t-h2 { margin-bottom: var(--s-2); }
.list { list-style: none; padding: 0; margin-top: var(--s-3); border-top: 1px solid var(--line); }
.list li {
  display: flex; align-items: baseline; gap: var(--s-2);
  padding-block: var(--s-1); border-bottom: 1px solid var(--line);
  font-size: var(--t-lead); font-weight: 300;
}
.list .label { color: var(--muted-c); }

/* foto: bianco e nero con velatura navy, per restare nella palette */
.panel.has-photo::before, .panel.has-photo::after { content: ""; position: absolute; inset: 0; z-index: -1; }
.panel.has-photo::before { background: var(--photo) center / cover; filter: grayscale(1) contrast(1.05); z-index: -2; }
.panel.has-photo::after { background: linear-gradient(rgba(46,47,54,.55), rgba(46,47,54,.85)); }
.panel.has-photo .muted { color: rgba(255,255,255,.8); }

@media (max-width: 820px) {
  .split { grid-template-columns: 1fr; }
  .panel, .panel + .panel { padding-inline: var(--gutter); }
  .panel + .panel { border-left: 0; border-top: 1px solid var(--line); }
}

/* ---------- filiera ---------- */
.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); }
.steps li { border-top: 1px solid var(--line); padding-top: var(--s-2); }
.steps .label { display: block; color: var(--muted-c); margin-bottom: var(--s-3); }
.steps .t-h3 { margin-bottom: var(--s-1); }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr 1fr; row-gap: var(--s-block); } }
@media (max-width: 480px) { .steps { grid-template-columns: 1fr; } }

/* ---------- contatti ---------- */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.contact .section-head { margin-bottom: var(--s-3); }
.info dt { color: var(--muted-c); margin-top: var(--s-2); }
.info dt:first-child { margin-top: 0; }
.info dd { margin: 6px 0 0; max-width: 40ch; }
.contact-form { padding-top: calc(var(--t-label) * 1.4 + var(--s-2)); }   /* allinea il form al titolo */
.field { display: flex; flex-direction: column; gap: var(--s-1); margin-bottom: var(--s-2); }
.field .label { color: var(--muted-c); }
input, select, textarea {
  font: 400 var(--t-body) var(--f); color: var(--fg); width: 100%;
  background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
  padding: 6px 0 var(--s-1); transition: border-color var(--dur-ui) var(--ease);
}
input:focus, select:focus, textarea:focus { outline: none; border-bottom-color: var(--fg); }
select option { color: var(--navy); background: var(--white); }
::placeholder { color: var(--muted-c); opacity: .7; }
.contact-form .actions { margin-top: var(--s-2); }
@media (max-width: 760px) {
  .contact { grid-template-columns: 1fr; row-gap: var(--s-block); }
  .contact-form { padding-top: 0; }
}

/* ---------- footer ---------- */
.ftr { border-top: 1px solid var(--line); padding-block: var(--s-block) var(--s-3); text-align: center; }
.ftr-logo { display: block; margin: 0 auto var(--s-3); width: min(560px, 70vw); height: auto; aspect-ratio: 548.6 / 78.7; fill: #FFFFFF; }
.ftr-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-1) var(--s-3); margin-bottom: var(--s-block); }
.ftr-nav a { text-decoration: none; color: var(--muted-c); transition: color var(--dur-ui) var(--ease); }
.ftr-nav a:hover { color: var(--fg); }
.ftr-small { color: var(--muted-c); }

/* =========================================================
   EFFETTI (js/effects.js)
   ========================================================= */

/* scroll fluido (Lenis) */
html.lenis, html.lenis body { height: auto; }
html.lenis { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

/* grana da carta su tutto il sito */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 90; pointer-events: none;
  opacity: .035; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='260' height='260'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* link con sottolineatura animata */
.ulink {
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size .5s var(--ease), color var(--dur-ui) var(--ease);
  padding-bottom: 2px;
}
.ulink:hover { background-size: 100% 1px; }

/* ---------- apertura ---------- */
.intro-ov { display: none; }
.js .intro-ov {
  position: fixed; inset: 0; z-index: 200; background: var(--navy);
  display: grid; place-items: center;
  /* rete di sicurezza: se lo script non parte, l'apertura sparisce da sola */
  animation: introSafety .6s 5s forwards;
}
.js.intro-skip .intro-ov { display: none; }
.intro-mark { width: min(220px, 46vw); height: auto; overflow: visible; transform-origin: 0 0; }
/* contorni separati: servono solo per il disegno (lunghezza del tratto impostata da effects.js) */
.intro-mark .mark-line { fill: none; stroke: #fff; stroke-width: 1.4; }
/* riempimento: il marchio intero, con i fori delle "O" vuoti come nel logo */
.intro-mark .mark-fill { fill: #fff; fill-rule: evenodd; fill-opacity: 0; stroke: none; }
.intro-ov.fill .mark-fill { fill-opacity: 1; transition: fill-opacity .6s var(--ease); }
.intro-ov.fill .mark-line { stroke-opacity: 0; transition: stroke-opacity .6s var(--ease); }
.intro-ov.leave { background: transparent; transition: background .9s var(--ease); }
.intro-ov.leave .intro-mark { transition: transform .9s var(--ease); }
@keyframes introSafety { to { opacity: 0; visibility: hidden; } }
/* durante l'apertura la hero aspetta */
.intro-running .hero .reveal { opacity: 0 !important; }
.intro-running .hero .line-inner { transform: translateY(110%) !important; }
.intro-running .lg-mark { opacity: 0; }

/* ---------- titoli riga per riga ---------- */
.js .is-split.reveal { opacity: 1; }
.is-split .line { display: block; overflow: hidden; padding-bottom: .1em; margin-bottom: -.1em; }
.is-split .line-inner {
  display: block; transform: translateY(110%);
  transition: transform 1.1s var(--ease);
  transition-delay: calc(var(--d, 0s) + var(--i, 0) * 90ms);
}
.is-split.in .line-inner { transform: none; }
@media (prefers-reduced-motion: reduce) { .is-split .line-inner { transform: none; transition: none; } }

/* ---------- cursore ---------- */
.cursor { display: none; }
@media (hover: hover) and (pointer: fine) {
  .has-cursor, .has-cursor a, .has-cursor button, .has-cursor .finish { cursor: none; }
  .has-cursor .cursor {
    display: block; position: fixed; top: 0; left: 0; z-index: 150; pointer-events: none;
    width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%;
    background: #fff; mix-blend-mode: difference;
    transition: width .35s var(--ease), height .35s var(--ease), margin .35s var(--ease), opacity .3s;
  }
  .has-cursor .cursor.is-hover { width: 52px; height: 52px; margin: -26px 0 0 -26px; }
  .has-cursor .cursor.is-hidden { opacity: 0; }
  .has-cursor .cursor.is-small { width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px; }
}

/* ---------- filiera orizzontale ---------- */
.step-num { display: block; font: 200 clamp(3.5rem, 7vw, 6.5rem)/1 var(--f); letter-spacing: -.04em; margin-bottom: var(--s-2); }
.hfil-progress { display: none; }
.hfil.is-pinned { padding-block: 0; }
.hfil.is-pinned .hfil-sticky {
  position: sticky; top: 0; height: 100vh; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center;
  padding-top: var(--hdr-h);
}
.hfil.is-pinned .section-head { margin-bottom: var(--s-3); }
.hfil.is-pinned .hfil-sticky > .wrap { width: 100%; }   /* nella colonna flex la larghezza non si restringe */
.hfil.is-pinned .hfil-track {
  display: flex; gap: var(--gap); width: max-content;
  padding-inline: calc(max(0px, (100vw - var(--container)) / 2) + var(--gutter));
  will-change: transform;
}
.hfil.is-pinned .hfil-track > li { flex: none; width: min(420px, 30vw); }
.hfil.is-pinned .hfil-progress { display: block; height: 1px; background: var(--line); margin-top: var(--s-block); }
.hfil-progress span { display: block; height: 100%; background: var(--fg); transform: scaleX(0); transform-origin: left; }
.hfil:not(.is-pinned) .hfil-track { margin-inline: auto; max-width: var(--container); padding-inline: var(--gutter); }

/* ---------- indice delle finiture ---------- */
.finishes { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.finish {
  display: grid; grid-template-columns: 64px 1fr auto; align-items: baseline; gap: var(--s-2);
  padding-block: var(--s-2); border-bottom: 1px solid var(--line);
}
.finish .label { color: var(--muted-c); }
.finish-name {
  font: 300 clamp(1.6rem, 3.2vw, 2.75rem)/1.1 var(--f); letter-spacing: -.02em;
  transition: transform .6s var(--ease);
}
.finish-note { color: var(--muted-c); text-align: right; }
.finishes:hover .finish { opacity: .35; transition: opacity .4s var(--ease); }
.finishes:hover .finish:hover { opacity: 1; }
.finish:hover .finish-name { transform: translateX(16px); }
@media (max-width: 760px) {
  .finish { grid-template-columns: 40px 1fr; }
  .finish-note { grid-column: 2; text-align: left; }
}

/* anteprima che segue il cursore: un cartellino illustrato per ogni lavorazione */
.finish-preview {
  position: fixed; top: 0; left: 0; z-index: 60; pointer-events: none;
  width: 240px; height: 360px; margin: -180px 0 0 -120px;
  opacity: 0; perspective: 900px;
  transition: opacity .4s var(--ease);
}
.finish-preview.on { opacity: 1; }
.fp-card {
  position: relative; width: 100%; height: 100%;
  transform: scale(.88); transition: transform .5s var(--ease);
  filter: drop-shadow(0 24px 30px rgba(0, 0, 0, .35));
}
.finish-preview.on .fp-card { transform: none; }
.fp-card.flip { transform: rotateY(90deg) scale(.96); transition: transform .2s ease-in; }
.fp-art { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; display: none; }
.fp-art.on { display: block; }
/* lamina: la banda di luce attraversa il marchio di continuo, appena il cartellino compare */
.foil-shine { animation: foilShine 2.4s cubic-bezier(.45, 0, .55, 1) infinite; }
/* goffratura: 0.4s cartellino vuoto -> il marchio compare piatto -> sale in rilievo */
.emb { opacity: 0; animation-duration: 2.6s; animation-fill-mode: both; animation-timing-function: cubic-bezier(.3, 0, .2, 1); }
.emb-top    { animation-name: embTop; }
.emb-shadow { animation-name: embShadow; }
.emb-light  { animation-name: embLight; }
@keyframes embTop {
  0%, 15% { opacity: 0; fill: #E4E4E7; }
  35%     { opacity: 1; fill: #E4E4E7; }      /* segno piatto, appena impresso */
  100%    { opacity: 1; fill: #F2F2F4; }
}
@keyframes embShadow {
  0%, 40% { opacity: 0; transform: translate(0, 0); }
  100%    { opacity: 1; transform: translate(3px, 3px); }
}
@keyframes embLight {
  0%, 40% { opacity: 0; transform: translate(0, 0); }
  100%    { opacity: 1; transform: translate(-1.6px, -1.6px); }
}

/* cordini: quattro tipi che si alternano (ognuno visibile 2s, con dissolvenza) */
.cord { opacity: 0; animation: cordCycle 8s infinite both; }
.cord.c2 { animation-delay: 2s; }
.cord.c3 { animation-delay: 4s; }
.cord.c4 { animation-delay: 6s; }
@keyframes cordCycle {
  0%   { opacity: 0; }
  4%   { opacity: 1; }
  25%  { opacity: 1; }
  29%  { opacity: 0; }
  100% { opacity: 0; }
}
.cord-label { font: 500 9.5px var(--f); letter-spacing: .22em; text-transform: uppercase; fill: rgba(46, 47, 54, .6); stroke: none; }
@keyframes foilShine {
  from { transform: translateX(10px) skewX(-20deg); }
  to   { transform: translateX(250px) skewX(-20deg); }
}
/* foto vera, se presente: prende il posto dell'illustrazione, nella sagoma del cartellino */
.fp-card img {
  position: absolute; left: 0; right: 0; bottom: 0; top: 18%; width: 100%; height: 82%;
  object-fit: cover; filter: grayscale(1) contrast(1.05); display: none;
  clip-path: polygon(18% 0, 82% 0, 100% 12%, 100% 100%, 0 100%, 0 12%);
}
.fp-card.has-img img { display: block; }
.fp-card.has-img .fp-art { display: none; }

/* =========================================================
   CAMPIONARIO (campionario.html)
   ========================================================= */
.page-hero { min-height: 88svh; }
.sample-steps { margin-bottom: var(--s-block); }

/* finestra di richiesta */
.sample-dialog {
  width: min(560px, calc(100vw - 32px)); max-height: calc(100svh - 32px);
  padding: clamp(32px, 5vw, 56px); margin: auto;
  border: 1px solid var(--line); border-radius: 0;
  background: var(--navy); color: var(--white);
}
.sample-dialog::backdrop { background: rgba(20, 21, 26, .72); backdrop-filter: blur(6px); }
.sample-dialog[open] { animation: dialogIn .6s var(--ease); }
@keyframes dialogIn { from { opacity: 0; transform: translateY(16px); } }
@media (prefers-reduced-motion: reduce) { .sample-dialog[open] { animation: none; } }
.dialog-close {
  position: absolute; top: 14px; right: 18px;
  background: none; border: 0; padding: 6px; color: inherit; cursor: pointer;
  font: 300 30px/1 var(--f); opacity: .7; transition: opacity var(--dur-ui) var(--ease);
}
.dialog-close:hover { opacity: 1; }
.sample-dialog .t-h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); margin-bottom: var(--s-1); }
.sample-dialog .t-body { margin-bottom: var(--s-3); }
.consent { display: flex; gap: var(--s-1); align-items: flex-start; font-size: 13px; line-height: 1.5; color: var(--muted-c); cursor: pointer; }
.consent input { flex: none; width: 16px; height: 16px; margin: 2px 0 0; padding: 0; border: 0; accent-color: #fff; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-msg { min-height: 1.5em; margin-top: var(--s-2); font-size: 13px; color: var(--muted-c); }
.form-msg.is-error { color: var(--white); }
.sample-dialog .actions { margin-top: var(--s-2); }
.sample-dialog .btn:disabled { opacity: .5; cursor: wait; }

/* la finestra sta sopra a tutto, anche al cursore personalizzato: lì torna il cursore normale */
.has-cursor .sample-dialog, .has-cursor .sample-dialog * { cursor: auto; }
.has-cursor .sample-dialog a, .has-cursor .sample-dialog button, .has-cursor .sample-dialog .consent { cursor: pointer; }
.dialog-open .cursor { opacity: 0; }

/* =========================================================
   SEZIONI IMMERSIVE (js/effects.js, punti 7-10)
   ========================================================= */
:root { interpolate-size: allow-keywords; }   /* le risposte delle domande si aprono con un'animazione */
.menu-nav a:nth-child(6) { animation-delay: .4s; }  .menu-nav a:nth-child(7) { animation-delay: .48s; }
.menu-nav a:nth-child(8) { animation-delay: .56s; } .menu-nav a:nth-child(9) { animation-delay: .64s; }

/* ---------- fascia scorrevole ---------- */
.marquee {
  position: relative; overflow: hidden; padding-block: var(--s-block);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  display: grid; gap: .1em;
}
.mq-row {
  position: relative; z-index: 1;
  display: flex; align-items: center; width: max-content; white-space: nowrap;
  font: 200 clamp(3rem, 9vw, 8.5rem)/1.05 var(--f); letter-spacing: -.04em;
  will-change: transform;
}
.mq-row i { flex: none; width: .13em; height: .13em; margin-inline: .45em; border: 1px solid rgba(255,255,255,.7); border-radius: 50%; }
.mq-outline { color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,.7); }
/* tracciato della fustella che si disegna dietro le scritte (js/effects.js, punto 7) */
.mq-die { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.mq-die path { fill: none; stroke: #fff; stroke-width: 1; }
.mq-die .die-cut  { stroke-opacity: .55; }
.mq-die .die-safe { stroke-opacity: .2; }
.mq-die .die-dim  { stroke-opacity: .35; }

/* ---------- principi: schede che si impilano ---------- */
.stack { list-style: none; padding: 0; }
.stack-card {
  position: sticky; top: calc(var(--hdr-h) + 24px);
  display: grid; grid-template-columns: minmax(140px, 1fr) 2fr; gap: var(--gap); align-items: start;
  min-height: 44vh; padding-block: var(--s-3) var(--s-block);
  background: var(--bg); border-top: 1px solid var(--fg);
}
.stack-card:nth-child(2) { top: calc(var(--hdr-h) + 40px); }
.stack-card:nth-child(3) { top: calc(var(--hdr-h) + 56px); }
.stack-card:nth-child(4) { top: calc(var(--hdr-h) + 72px); }
.stack-card + .stack-card { margin-top: 18vh; }
.stack-card > * { transition: opacity .5s var(--ease); }
.stack-num { font: 200 clamp(4rem, 10vw, 9rem)/.85 var(--f); letter-spacing: -.05em; }
.stack-title { font: 300 clamp(2rem, 4vw, 3.5rem)/1.05 var(--f); letter-spacing: -.02em; margin-bottom: var(--s-2); }
@media (max-width: 760px) {
  .stack-card { grid-template-columns: 1fr; gap: var(--s-2); min-height: 0; }
  .stack-card + .stack-card { margin-top: 10vh; }
}

/* ---------- cosa realizziamo: pannelli orizzontali ---------- */
.hprod-head { display: flex; justify-content: space-between; align-items: center; }
.hprod-head .kicker { margin: 0; }
.hprod-count { color: var(--muted-c); }
.hprod-track { list-style: none; padding: 0; margin: 0; }
.hprod-panel {
  display: grid; grid-template-columns: 1.25fr 1fr; gap: var(--gap); align-items: end;
  max-width: var(--container); margin-inline: auto; padding: var(--s-block) var(--gutter) 0;
}
.hprod-word { font: 200 clamp(3.4rem, 10.5vw, 10.5rem)/.9 var(--f); letter-spacing: -.05em; }
.hprod-text .list { margin-top: var(--s-2); }
.hprod-word, .hprod-text { transition: transform 1.1s var(--ease), opacity 1.1s var(--ease); }
.js .hprod.is-pinned .hprod-panel:not(.is-active) .hprod-word { transform: translateY(14%); opacity: .12; }
.js .hprod.is-pinned .hprod-panel:not(.is-active) .hprod-text { transform: translateY(28px); opacity: 0; }
.hfil.hprod.is-pinned .hfil-track { gap: 0; padding-inline: 0; }
.hfil.hprod.is-pinned .hfil-track > li {
  width: 100vw; max-width: none; margin: 0;
  padding-inline: calc(max(0px, (100vw - var(--container)) / 2) + var(--gutter));
}
.hprod:not(.is-pinned) .hprod-count { display: none; }
@media (max-width: 860px) {
  .hprod-panel { grid-template-columns: 1fr; padding-top: var(--s-block); }
}

/* ---------- manifesto: la frase si accende parola per parola ---------- */
.manifesto { position: relative; height: 230vh; border-top: 1px solid var(--line); }
.manifesto-sticky { position: sticky; top: 0; height: 100vh; display: flex; align-items: center; padding-top: var(--hdr-h); }
.manifesto-sticky > .wrap { width: 100%; }
.manifesto-text { max-width: 1040px; font: 300 clamp(1.9rem, 4.1vw, 3.8rem)/1.18 var(--f); letter-spacing: -.02em; }
.mw { opacity: .14; transition: opacity .45s var(--ease); }
.mw.on { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .manifesto { height: auto; } .manifesto-sticky { position: static; height: auto; padding-block: var(--s-section); }
  .mw { opacity: 1; }
}

/* ---------- domande frequenti ---------- */
.faq-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: var(--gap); align-items: start; }
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: var(--s-2);
  padding-block: var(--s-2); font: 300 clamp(1.15rem, 1.8vw, 1.5rem)/1.3 var(--f);
  transition: opacity var(--dur-ui) var(--ease);
}
.faq summary::-webkit-details-marker { display: none; }
.faq:hover summary { opacity: .5; }
.faq summary:hover, .faq details[open] summary { opacity: 1; }
.faq summary i { position: relative; flex: none; width: 16px; height: 16px; }
.faq summary i::before, .faq summary i::after {
  content: ""; position: absolute; left: 0; top: 50%; width: 100%; height: 1px; background: currentColor;
  transition: transform .5s var(--ease);
}
.faq summary i::after { transform: rotate(90deg); }
.faq details[open] summary i::after { transform: rotate(0deg); }
.faq details > p { padding-bottom: var(--s-2); }
.faq details::details-content { block-size: 0; overflow: clip; transition: block-size .6s var(--ease), content-visibility .6s allow-discrete; }
.faq details[open]::details-content { block-size: auto; }
@media (max-width: 860px) { .faq-grid { grid-template-columns: 1fr; } }

/* ---------- innovazione: regolo di precisione disegnato con lo scroll ---------- */
.tech-head .t-h2 { max-width: none; }
.tech-head .t-body { max-width: 56ch; }
.ruler { height: 44px; margin-bottom: var(--s-block); }
.ruler svg { display: block; width: 100%; height: 100%; overflow: visible; }
.ruler line { stroke: #fff; stroke-width: 1; }
.ruler .r-base { stroke-opacity: .55; }
.ruler .r-tick { stroke-opacity: 0; transition: stroke-opacity .35s var(--ease); }
.ruler .r-tick.on { stroke-opacity: .45; }
.ruler .r-tick.major.on { stroke-opacity: .8; }
.tech-points { grid-template-columns: repeat(4, 1fr); }
.tech-points .t-h3 { margin-bottom: var(--s-1); }
@media (max-width: 860px) { .tech-points { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .tech-points { grid-template-columns: 1fr; } }

/* ---------- titoli di sezione (js/effects.js, punto 11) ----------
   più grandi, allineati una volta a destra (.al-r) e una a sinistra (.al-l),
   compaiono da sinistra a destra lettera per lettera con un'intermittenza
   da luce che si accende (bianco su scuro, navy su bianco) */
.t-display {
  font: 300 clamp(2.6rem, min(6.4vw, 10.5vh), 6.2rem)/1 var(--f);
  letter-spacing: -.035em; text-wrap: balance;
}
.t-display em { font-style: normal; font-weight: 500; }
.section-head .t-display { max-width: 14ch; }
.section-head .t-display:has(br) { max-width: none; }   /* gli a capo sono già decisi nel testo */
/* nelle sezioni a due colonne il titolo ha metà spazio: scala un po' più piccola */
.faq-grid .t-display, .contact .t-display { font-size: clamp(2.3rem, 4.4vw, 4.4rem); }

/* ---------- alternanza destra / sinistra ---------- */
.al-r .section-head { text-align: right; }
.al-r .section-head .t-display, .al-r .section-head .t-body { margin-left: auto; }
.al-r .section-head .kicker { justify-content: flex-end; }
/* domande: titolo a destra, elenco a sinistra */
.al-r .faq-grid { grid-template-columns: 1.4fr 1fr; }
.al-r .faq-grid > .section-head { order: 2; }
/* contatti: titolo e recapiti a destra, modulo a sinistra */
.al-r .contact > div:first-child { order: 2; text-align: right; }
.al-r .contact .info dd { margin-left: auto; }
/* campionario: da centrato ad allineato a sinistra */
.al-l.sample-band .statement { max-width: var(--container); text-align: left; }
.al-l.sample-band .kicker, .al-l.sample-band .actions { justify-content: flex-start; }
.al-l.sample-band .t-body { margin-inline: 0; }
.al-l.sample-band .t-display { max-width: 16ch; }
@media (max-width: 860px) {
  .al-r .faq-grid { grid-template-columns: 1fr; }
  .al-r .faq-grid > .section-head, .al-r .contact > div:first-child { order: 0; }
}

/* ---------- intermittenza lettera per lettera ---------- */
.t-display .wd { display: inline-block; white-space: nowrap; }
.js .t-display .ch { opacity: 0; }
.t-display.flick-on .ch { animation: flick var(--fd, .8s) linear var(--cd, 0s) forwards; }
@keyframes flick {
  0%   { opacity: 0; }
  8%   { opacity: .9; }
  14%  { opacity: .08; }
  24%  { opacity: .75; }
  30%  { opacity: .15; }
  46%  { opacity: 1; }
  54%  { opacity: .35; }
  66%  { opacity: 1; }
  100% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .js .t-display .ch { opacity: 1; }
  .t-display.flick-on .ch { animation: none; }
}

/* =========================================================
   PRIVACY (privacy.html)
   ========================================================= */
.legal-hero { min-height: 70svh; }
.legal { max-width: 760px; }
.legal h2 { font: 400 var(--t-h3)/1.25 var(--f); margin: var(--s-block) 0 var(--s-2); }
.legal h2:first-child { margin-top: 0; }
.legal p, .legal li { color: var(--muted-c); line-height: 1.75; text-wrap: pretty; }
.legal p + p { margin-top: var(--s-2); }
.legal strong { color: var(--fg); font-weight: 500; }
.legal ul { padding-left: 1.1em; margin: var(--s-2) 0; }
.legal li + li { margin-top: var(--s-1); }
.legal a { color: var(--fg); }
.legal-date { margin-top: var(--s-block); color: var(--muted-c); }
.ftr-small a { color: inherit; }
.consent a { color: inherit; }
