/* ==========================================================================
   Token
   ========================================================================== */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../fonts/bricolage-grotesque-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("../fonts/figtree-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
/* Il corsivo "ricamato": lo stesso di "I sarti" nella toppa, per i titoli delle sezioni */
@font-face {
  font-family: "Pacifico";
  src: url("../fonts/pacifico-latin.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  --calce: #F5F6F3;      /* fondo: bianco calce, neutro */
  --ink: #10162B;        /* testo: inchiostro blu notte */
  --graphite: #5B6275;   /* testo secondario */
  --line: #DADDE3;       /* filetti */
  --lemon: #F5D547;      /* l'unico colore: il cerchio */
  --cuoio: #C48654;      /* il marrone del bordo cucito dei loghi */

  --display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --body: "Figtree", "Helvetica Neue", Arial, sans-serif;
  --script: "Pacifico", "Brush Script MT", cursive;

  --gutter: clamp(20px, 5vw, 64px);
  --max: 1240px;
  --nav-h: 76px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}

body {
  margin: 0;
  background: var(--calce);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

[hidden] { display: none !important; }

h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
  border-radius: 4px;
}

.wordmark {
  font-family: var(--display);
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}
/* TERRI in maiuscolo grassetto, "torio" leggero: si legge come una parola sola */
.wordmark__strong { font-weight: 700; letter-spacing: 0.02em; }
.wordmark__soft { font-weight: 400; }

/* La frase del marchio, sotto al logo */
.tagline {
  font-size: 0.8125rem;
  letter-spacing: 0.01em;
  color: var(--graphite);
}

.label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--graphite);
}

/* ==========================================================================
   Intro: il cerchio
   ========================================================================== */
.gate { display: none; }

html.js .gate {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: var(--calce);
  transition: opacity .35s ease;
}

html.gate-done .gate { display: none; }
.gate.is-leaving { opacity: 0; }

html.js:not(.gate-done) body { overflow: hidden; }

.gate__top {
  position: absolute;
  inset: 0 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: var(--nav-h);
  padding-inline: var(--gutter);
  transition: opacity .3s ease;
}

.gate__brand {
  display: grid;
  gap: 1px;
  line-height: 1.25;
}

.gate__skip {
  border: 0;
  background: none;
  padding: 8px 0;
  font-size: 0.875rem;
  color: var(--graphite);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.gate__skip:hover { color: var(--ink); }

.gate__hint {
  position: absolute;
  bottom: clamp(24px, 6vh, 56px);
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0.875rem;
  color: var(--graphite);
  transition: opacity .3s ease;
}

.gate.is-opening .gate__top,
.gate.is-opening .gate__hint,
.gate.is-opening .orb__ring { opacity: 0; }

/* Il componente cerchio, usato nell'intro e nei contatti */
.orb {
  --size: clamp(250px, 64vw, 360px);
  position: relative;
  display: block;
  width: var(--size);
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.orb:focus-visible { outline: none; }

.orb__ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  animation: spin 28s linear infinite;
  transition: opacity .3s ease;
  will-change: transform; /* gira su un livello suo, senza ridisegnare il testo */
}
.orb__ring text {
  fill: var(--ink);
  font-family: var(--body);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.orb__disc {
  position: absolute;
  inset: 22%;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--lemon);
  transition: transform .6s var(--ease-out), box-shadow .3s ease;
}
.orb:hover .orb__disc { transform: scale(1.07); }
.orb:active .orb__disc { transform: scale(.94); transition-duration: .15s; }
.orb:focus-visible .orb__disc { box-shadow: 0 0 0 4px var(--calce), 0 0 0 6px var(--ink); }

/* Un respiro leggero che invita a premere */
.orb__disc::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid var(--lemon);
  animation: breathe 2.8s var(--ease-out) infinite;
  pointer-events: none;
}

.orb__label {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.25rem, 3.4vw, 1.6rem);
  letter-spacing: -0.02em;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes breathe {
  0%   { transform: scale(1); opacity: .9; }
  70%  { transform: scale(1.35); opacity: 0; }
  100% { transform: scale(1.35); opacity: 0; }
}

/* Il pulsante "Entra" dell'intro: pieno a metà di liquido giallo che ondeggia (vedi assets/js/main.js).
   Al clic il liquido sale fino in cima, il cerchio si gonfia e scoppia in palline */
.gate .orb__disc--liquido { background: var(--calce); }

.liquido {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.liquido__inclina { transform-box: view-box; transform-origin: 100px 100px; }

.liquido__onda { will-change: transform; }
.liquido__onda--davanti { fill: var(--lemon); animation: liquido-onda 2.4s linear infinite; }
.liquido__onda--dietro  { fill: #F9E58E; animation: liquido-onda 3.8s linear infinite reverse; }
@keyframes liquido-onda {
  from { transform: translateX(0); }
  to   { transform: translateX(-100px); }
}

/* Bollicine che salgono e spariscono sotto la superficie */
.liquido__bolle circle {
  fill: var(--calce);
  opacity: 0;
  transform-box: fill-box;
  animation: liquido-bolla var(--t) var(--d) ease-in infinite;
}
@keyframes liquido-bolla {
  0%   { transform: translate(0, 0); opacity: 0; }
  15%  { opacity: .85; }
  75%  { opacity: .85; }
  100% { transform: translate(var(--x), -80px); opacity: 0; }
}
/* Mentre si riempie: bolle più veloci che arrivano fino in cima */
.orb__disc--liquido.is-pieno .liquido__bolle circle { animation: liquido-bolla-su 1s var(--d) ease-in infinite; }
@keyframes liquido-bolla-su {
  0%   { transform: translate(0, 0); opacity: 0; }
  15%  { opacity: .9; }
  100% { transform: translate(var(--x), -190px); opacity: 0; }
}

.liquido__bordo {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.5px;
  vector-effect: non-scaling-stroke;
}
.orb__disc--liquido .orb__label { position: relative; z-index: 1; }

/* Le palline dello scoppio: una tela sopra tutta la pagina, che non blocca i clic */
.boom {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 60;
  pointer-events: none;
}

/* ==========================================================================
   Menu
   ========================================================================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 32px;
  height: var(--nav-h);
  padding-inline: max(var(--gutter), calc((100% - var(--max)) / 2));
  background: color-mix(in srgb, var(--calce) 88%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.nav__links {
  display: flex;
  gap: 28px;
  margin-left: auto;
  font-size: 0.9375rem;
}
.nav__links a {
  text-decoration: none;
  color: var(--graphite);
  transition: color .2s ease;
}
.nav__links a:hover { color: var(--ink); }

.nav__cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-left: 8px;
  font-weight: 600;
  text-decoration: none;
}

.nav__dot {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--lemon);
  transition: transform .4s var(--ease-out), opacity .4s ease;
}
.nav__cta:hover .nav__dot { transform: rotate(45deg); }

html.js .nav__dot { opacity: 0; }
html.dot-landed .nav__dot { opacity: 1; }

html.js .nav__links,
html.js .nav__cta-text {
  opacity: 0;
  transition: opacity .6s ease .5s;
}
html.unlocked .nav__links,
html.unlocked .nav__cta-text { opacity: 1; }

/* ==========================================================================
   Apertura
   ========================================================================== */
main,
.footer {
  width: min(100% - 2 * var(--gutter), var(--max));
  margin-inline: auto;
}

.hero {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: calc(100svh - var(--nav-h));
  padding-block: clamp(40px, 8vh, 80px) clamp(48px, 9vh, 104px);
  outline: none;
}

/* Titolo e toppa affiancati; quando non c'è spazio la toppa va sopra al titolo */
.hero__head {
  display: flex;
  flex-wrap: wrap-reverse;
  align-items: center;
  justify-content: space-between;
  gap: 20px 40px;
}

.hero__title {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.8rem, 8.4vw, 7.6rem);
  line-height: .96;
  letter-spacing: -0.045em;
}

.hero__title .line {
  display: block;
  overflow: hidden;
  padding-bottom: .09em;
  margin-bottom: -.09em;
}

.word { display: inline-block; }

html.js .hero__title .word {
  transform: translateY(110%);
  transition: transform 1.1s var(--ease-out);
  transition-delay: calc(var(--i) * 70ms + 120ms);
}
html.unlocked .hero__title .word { transform: none; }

/* La parola "imprese." viene evidenziata dopo l'apparizione */
.word--mark {
  background-image: linear-gradient(var(--lemon), var(--lemon));
  background-repeat: no-repeat;
  background-position: 0 88%;
  background-size: 100% .22em;
}
html.js .word--mark {
  background-size: 0% .22em;
  transition: transform 1.1s var(--ease-out), background-size .8s var(--ease-out);
  transition-delay: calc(var(--i) * 70ms + 120ms), 1.2s;
}
html.unlocked .word--mark { background-size: 100% .22em; }

/* La toppa ricamata "I sarti del digitale": tre immagini sovrapposte
   (stoffa con bordo, poi le due righe di ricamo che si scoprono cucendosi) */
.patch {
  flex: none;
  width: clamp(136px, 21vw, 290px);
  margin-left: auto;
}
.patch__art {
  position: relative;
  aspect-ratio: 1;
  transform: rotate(-8deg);
  filter: drop-shadow(0 12px 18px rgb(16 22 43 / .16)) drop-shadow(0 2px 3px rgb(16 22 43 / .14));
  transition: transform .6s var(--ease-out);
}
.patch__layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.patch:hover .patch__art { transform: rotate(-3deg) scale(1.03); }

/* Entrata: la toppa si appoggia, poi "I sarti" si ricama da sinistra a destra
   e "del digitale" compare un gruppo di punti alla volta */
html.js .patch { opacity: 0; }
html.unlocked .patch { animation: patch-in .9s cubic-bezier(.34, 1.4, .64, 1) 1s both; }
html.js .patch__script,
html.js .patch__px { clip-path: inset(0 100% 0 0); }
html.unlocked .patch__script { animation: sew-script .9s cubic-bezier(.45, 0, .2, 1) 1.55s both; }
html.unlocked .patch__px { animation: sew-px 1.2s steps(36, end) 2.35s both; }

@keyframes patch-in {
  from { opacity: 0; transform: scale(.6) rotate(-16deg); }
  to   { opacity: 1; transform: none; }
}
/* Le scritte occupano più o meno dal 14% all'86% della larghezza della toppa */
@keyframes sew-script {
  from { clip-path: inset(0 85.5% 0 0); }
  to   { clip-path: inset(0 13% 0 0); }
}
@keyframes sew-px {
  from { clip-path: inset(0 85.5% 0 0); }
  to   { clip-path: inset(0 13% 0 0); }
}

/* Titoli delle sezioni ricamati: l'immagine è alta quanto le lettere del corsivo,
   il testo vero resta nascosto per Google e per i lettori di schermo */
.label--ricamo img {
  display: block;
  width: auto;
  height: calc(var(--h) * 1em);
  filter: drop-shadow(0 1px 1px rgb(70 40 15 / .28));
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.hero__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px 48px;
  margin-top: clamp(32px, 6vh, 64px);
}
html.js .hero__foot {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .8s ease .9s, transform .8s var(--ease-out) .9s;
}
html.unlocked .hero__foot { opacity: 1; transform: none; }

.hero__lede {
  max-width: 30rem;
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
  color: var(--graphite);
}

/* "valorizzarle": testo giallo del cerchio con un evidenziatore scuro sulla metà bassa,
   che sborda un po' come quello di "misura." e si disegna da sinistra a destra */
.hero__mark {
  padding: 0 .12em .06em;
  margin-inline: -.04em;
  font-weight: 700;
  color: var(--lemon);
  background-image: linear-gradient(var(--ink), var(--ink));
  background-repeat: no-repeat;
  background-position: 0 58%;
  background-size: 100% 62%;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
html.js .hero__mark {
  color: var(--graphite);
  background-size: 0% 62%;
  transition: background-size .8s var(--ease-out) 1.5s, color .35s ease 1.75s;
}
html.unlocked .hero__mark {
  color: var(--lemon);
  background-size: 100% 62%;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}
.btn--solid { background: var(--ink); color: var(--calce); }
.btn--solid:hover { background: var(--lemon); color: var(--ink); }
.btn--ghost { border: 1px solid var(--line); }
.btn--ghost:hover { border-color: var(--ink); }

/* ==========================================================================
   Sezioni
   ========================================================================== */
.block {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
  gap: 32px 48px;
  padding-block: clamp(88px, 12vw, 168px);
  border-top: 1px solid var(--line);
}
/* I titoli delle sezioni: corsivo marrone su una riga intera, il contenuto sotto nella sua colonna.
   Restano fermi: il filo li attraversa come se li cucisse alla pagina */
.block > .label {
  grid-column: 1 / -1;
  align-self: start;
  justify-self: start;
  font-family: var(--script);
  font-size: clamp(2.1rem, 4.4vw, 3.2rem);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: 0;
  text-transform: none;
  color: var(--cuoio);
}
.block > :not(.label) { grid-column: 2; }

/* Cosa faccio */
.service {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  align-items: center;
  gap: 12px 40px;
  padding-block: clamp(22px, 3vw, 34px);
  border-bottom: 1px solid var(--line);
}
.service:first-child { padding-top: 0; }

.service__title {
  position: relative;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.9rem, 3.8vw, 3.1rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  transition: transform .5s var(--ease-out);
}
.service__title::before {
  content: "";
  position: absolute;
  left: -0.55em;
  top: 50%;
  width: .32em;
  height: .32em;
  margin-top: -.16em;
  border-radius: 50%;
  background: var(--lemon);
  transform: scale(0);
  transition: transform .5s var(--ease-out);
}
.service:hover .service__title { transform: translateX(.6em); }
.service:hover .service__title::before { transform: scale(1); }

.service__text { color: var(--graphite); max-width: 26rem; }

/* Come lavoro */
.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 40px 32px;
}
.step__n {
  display: block;
  margin-bottom: 20px;
  font-family: var(--display);
  font-weight: 500;
  font-size: 2.6rem;
  line-height: 1;
  color: var(--graphite);
}
.step__title {
  margin-bottom: 8px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.3rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.step p { color: var(--graphite); font-size: 1rem; }

/* Pallini gialli dietro ai passaggi (vedi assets/js/pallini.js): da bordo a bordo dello schermo,
   sotto il titolo. Un'onda in diagonale li fa comparire grandi su tutta la sezione, poi si rimpiccioliscono:
   piccoli in basso a destra, fino a sparire verso l'alto a sinistra */
#come-lavoriamo { position: relative; }
/* Il titolo resta fuori: come negli altri titoli deve stare sopra al filo (livello 2, vedi "Il filo") */
#come-lavoriamo > :not(.puntini):not(.label) { position: relative; z-index: 1; }
#come-lavoriamo > .puntini {
  position: absolute;
  z-index: 0;
  grid-column: auto; /* altrimenti la griglia lo aggancia alla colonna del contenuto */
  grid-row: auto;
  pointer-events: none;
}
.puntini g { will-change: transform; }
.puntini circle {
  fill: var(--lemon);
  transform-box: fill-box;
  transform-origin: center;
  transform: scale(0);
}
/* Ogni pallino compare in 0,26s e resta grande finché l'onda ha coperto tutta la sezione (0,55s per attraversarla),
   poi in 0,36s si rimpicciolisce fino a --e. Dall'inizio alla fine dell'onda: circa 1,75s */
.puntini.is-in circle { animation: pallino 1.2s var(--d) both; }
@keyframes pallino {
  0%   { transform: scale(0);        animation-timing-function: cubic-bezier(.34, 1.56, .64, 1); }
  22%  { transform: scale(1);        animation-timing-function: linear; }
  70%  { transform: scale(1);        animation-timing-function: cubic-bezier(.5, 0, .2, 1); }
  100% { transform: scale(var(--e)); }
}

/* Lavori */
.works__title {
  max-width: 16ch;
  margin-bottom: clamp(40px, 5vw, 64px);
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.9rem, 3.8vw, 3.1rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
}
.works {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px;
}
.work {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 0 clamp(16px, 2vw, 24px);
  padding-top: 28px;
  border-top: 2px solid var(--ink);
}

/* Il logo ricamato del cliente, con la sua ombra a terra */
.work__logo {
  position: relative;
  isolation: isolate;
  width: clamp(68px, 7vw, 92px);
  margin-top: 2px;
}
.work__logo img {
  display: block;
  width: 100%;
  height: auto;
  transform-origin: 50% 100%;
  filter: drop-shadow(0 2px 2px rgb(16 22 43 / .14));
}
.work__logo::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: 14%;
  right: 14%;
  bottom: -6px;
  height: 9px;
  border-radius: 50%;
  background: rgb(16 22 43 / .18);
  filter: blur(3px);
}

/* Logo cliccabile: porta al sito del cliente */
a.work__logo { border-radius: 16px; cursor: pointer; }
a.work__logo:focus-visible { outline: 2px solid var(--ink); outline-offset: 6px; }

/* "Guarda il loro sito": freccia cucita che indica il logo */
.work__visit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: -8px 0 12px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}
.work__visit-arrow {
  flex: none;
  width: 46px;
  height: 26px;
  overflow: visible;
  transition: transform .45s var(--ease-out);
}
.work__visit-text {
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 4px;
  transition: text-decoration-color .2s ease;
}
.work:hover .work__visit-arrow { transform: translateX(-5px); }
.work:hover .work__visit-text { text-decoration-color: var(--ink); }

/* Passandoci sopra il logo fa due saltelli sul posto: uno alto, uno più piccolo */
.work:hover .work__logo img,
.work:focus-within .work__logo img { animation: hop .95s ease-in-out; }
.work:hover .work__logo::after,
.work:focus-within .work__logo::after { animation: hop-shadow .95s ease-in-out; }

/* Su telefono e tablet (niente cursore) saltella una volta quando compare */
@media (hover: none) {
  html.js .work.is-in .work__logo img { animation: hop .95s ease-in-out .7s both; }
  html.js .work.is-in .work__logo::after { animation: hop-shadow .95s ease-in-out .7s both; }
}

@keyframes hop {
  0%   { transform: translateY(0) scale(1, 1); }
  10%  { transform: translateY(0) scale(1.06, .93); }
  30%  { transform: translateY(-18px) scale(.97, 1.04); }
  47%  { transform: translateY(0) scale(1.06, .94); }
  62%  { transform: translateY(-8px) scale(.99, 1.02); }
  76%  { transform: translateY(0) scale(1.03, .97); }
  88%, 100% { transform: translateY(0) scale(1, 1); }
}
@keyframes hop-shadow {
  0%, 10%, 47%, 76%, 100% { transform: scale(1); opacity: 1; }
  30% { transform: scale(.62); opacity: .45; }
  62% { transform: scale(.82); opacity: .7; }
}
.work__type { margin-bottom: 14px; font-size: 0.875rem; color: var(--graphite); }
.work__title {
  margin-bottom: 12px;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.6rem, 2.7vw, 2.2rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.work__text { color: var(--graphite); max-width: 30rem; }
.work__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  font-size: 0.9375rem;
  font-weight: 600;
  text-underline-offset: 4px;
}
.work__link svg { transition: transform .3s var(--ease-out); }
.work__link:hover svg { transform: translate(2px, -2px); }
/* La riga sopra ai lavori cuciti la disegna il filo */
.work--cucita { border-top-color: transparent; }

/* Contatti: il cerchio ritorna */
.contact {
  position: relative;
  display: grid;
  justify-items: center;
  gap: clamp(32px, 5vw, 56px);
  padding-block: clamp(104px, 14vw, 184px);
  border-top: 1px solid var(--line);
  text-align: center;
}
.contact__title {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.4rem, 6.4vw, 5.4rem);
  line-height: 1;
  letter-spacing: -0.04em;
}
.orb--contact { --size: clamp(230px, 50vw, 300px); }
.orb--contact .orb__disc::after { display: none; }
.contact__alt { color: var(--graphite); }
.contact__alt a { color: var(--ink); text-underline-offset: 3px; }
/* Le bolle gialle che coprono la sezione e poi salgono liberandola (vedi assets/js/bolle.js) */
.bolle { position: absolute; z-index: 3; pointer-events: none; }
@media print { .bolle { display: none; } }

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 32px;
  padding-block: 32px 40px;
  border-top: 1px solid var(--line);
  font-size: 0.875rem;
  color: var(--graphite);
}
.footer .wordmark { font-size: 1rem; color: var(--ink); }

/* Il filo: una cucitura tratteggiata che scende con lo scorrimento, con l'ago in punta */
.filo {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}
.filo__svg {
  position: absolute;
  top: 0;
  left: 0;
}
/* L'ago ha un livello tutto suo: si sposta senza ridisegnare niente */
.filo__ago {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  will-change: transform;
}
.filo__ago svg {
  position: absolute;
  top: -3px;
  left: -5px;
  overflow: visible;
}
/* Le etichette stanno sopra al filo e lo coprono: filo e ago ci passano sotto, come nella stoffa */
html.filo-on .block > .label {
  position: relative;
  z-index: 2;
  background: var(--calce);
  box-shadow: 0 0 0 10px var(--calce);
}
.filo__thread {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-dasharray: 6 7;
}
.filo__knot { fill: var(--ink); }
.filo__steel { fill: var(--graphite); }
.filo__eye { fill: var(--calce); }

/* Comparsa allo scorrimento */
html.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s ease, transform .9s var(--ease-out);
  transition-delay: var(--d, 0ms);
}
html.js .reveal.is-in { opacity: 1; transform: none; }

/* ==========================================================================
   Schermi piccoli
   ========================================================================== */
@media (max-width: 960px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  :root { --nav-h: 64px; }
  .nav__links { display: none; }
  .nav__cta { margin-left: auto; }
  .nav__dot { width: 40px; height: 40px; }

  .block { grid-template-columns: 1fr; gap: 28px; }
  .block > *,
  .block > :not(.label) { grid-column: 1 / -1; }
  /* Spazio per l'ansa del filo sotto ogni etichetta */
  html.filo-on .block { row-gap: 60px; }

  .service { grid-template-columns: 1fr; }
  .service:hover .service__title { transform: none; }
  .service__title::before { display: none; }

  .works { grid-template-columns: 1fr; }
  .hero__actions { width: 100%; }
}

@media (max-width: 480px) {
  .steps { grid-template-columns: 1fr; }
  .btn { flex: 1 1 auto; justify-content: center; }
}

/* ==========================================================================
   Movimento ridotto: tutto appare subito, niente rotazioni
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .orb__ring,
  .orb__disc::after { animation: none; }
  .orb__disc::after { display: none; }
  .liquido__onda,
  .liquido__bolle circle { animation: none; }
  html.js .hero__title .word,
  html.js .hero__foot,
  html.js .reveal { transform: none; transition: opacity .3s ease; transition-delay: 0s; }
  html.js .word--mark,
  html.js .hero__mark { transition: none; }
  html.js .patch { opacity: 1; }
  html.unlocked .patch,
  html.unlocked .patch__script,
  html.unlocked .patch__px { animation: none; }
  html.js .patch__script,
  html.js .patch__px { clip-path: none; }
  .patch__art { transition: none; }
  .work .work__logo img,
  .work .work__logo::after { animation: none !important; }
  .work__visit-arrow { transition: none; }
  .puntini circle,
  .puntini.is-in circle { animation: none; transform: scale(var(--e)); }
  .service__title,
  .service__title::before { transition: none; }
}
