/* AU3D Studio — design system ispirato a jitter.video
   Palette: bianco, grigi chiari, nero. */

:root {
  --white: #ffffff;
  --surface: #f2f1f3;     /* card grigio chiaro */
  --surface-2: #e5e4e7;   /* badge, bottoni secondari */
  --line: #d7d7db;
  --ink: #19171c;         /* testo principale */
  --muted: #6e6e73;       /* testo secondario */
  --faint: #c9c8cd;       /* parole non ancora rivelate */
  --black: #0b0b0c;

  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Inter Tight", "Inter", system-ui, sans-serif;

  --r-xl: 40px;
  --r-lg: 28px;
  --r-md: 16px;
  --r-sm: 10px;

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 32px);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --shadow: 0 30px 60px -30px rgba(25, 23, 28, .25);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font: 400 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 8px; }

.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--black); color: var(--white); padding: 8px 14px; border-radius: 99px; }
.skip:focus { left: 8px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Typography ---------- */
.display {
  font: 800 clamp(44px, 8.4vw, 108px)/.94 var(--display);
  letter-spacing: -.045em;
}
.title {
  font: 800 clamp(36px, 5.6vw, 68px)/.98 var(--display);
  letter-spacing: -.04em;
}
.title--sm { font-size: clamp(32px, 4.6vw, 56px); }
.title--light { color: var(--white); }
.lead {
  max-width: 560px;
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.5;
  letter-spacing: -.01em;
  color: var(--muted);
}
.lead strong { color: var(--ink); font-weight: 600; }

/* ---------- Atoms ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px;
  background: var(--surface-2);
  border-radius: 99px;
  font-size: 14px; font-weight: 600; letter-spacing: -.01em;
}

.chip {
  display: inline;
  justify-self: start;
  align-self: flex-start;
  padding: 2px 8px;
  background: var(--black);
  color: var(--white);
  font: 800 clamp(20px, 2vw, 24px)/1.35 var(--display);
  letter-spacing: -.02em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.chip--light { background: var(--white); color: var(--black); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px; padding: 0 26px;
  border: 0; border-radius: 99px;
  font: 600 16px/1 var(--font); letter-spacing: -.01em;
  cursor: pointer;
  transition: transform .25s var(--ease), background-color .25s, color .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn--sm { height: 40px; padding: 0 18px; font-size: 14px; }
.btn--dark { background: var(--black); color: var(--white); }
.btn--dark:hover { background: #2a282e; }
.btn--light { background: var(--surface-2); color: var(--ink); }
.btn--light:hover { background: var(--line); }
.btn--white { background: var(--white); color: var(--black); }

.round-btn {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px;
  border: 0; border-radius: 50%;
  background: var(--surface-2); color: var(--ink);
  cursor: pointer;
  transition: transform .3s var(--ease), background-color .25s;
}
.round-btn:hover { background: var(--line); }
.round-btn--light { background: rgba(255, 255, 255, .14); color: var(--white); }
.round-btn--light:hover { background: rgba(255, 255, 255, .24); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .82);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
}
.nav__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  max-width: var(--wrap); margin: 0 auto; height: 72px; padding: 0 var(--gutter);
}
.nav__logo img { height: 30px; width: auto; }
.nav__links { display: flex; gap: 4px; }
.nav__links a, .nav__text {
  padding: 8px 14px; border-radius: 99px;
  font-size: 14px; font-weight: 500;
  transition: background-color .2s;
}
.nav__links a:hover, .nav__text:hover { background: var(--surface); }
.nav__actions { display: flex; align-items: center; gap: 8px; }
.nav__menu { display: none; }

.menu {
  display: grid; gap: 4px;
  padding: 8px var(--gutter) 24px;
  border-bottom: 1px solid var(--surface-2);
  background: var(--white);
}
.menu[hidden] { display: none; }
.menu a:not(.btn) { padding: 12px 4px; font: 700 22px/1.2 var(--display); letter-spacing: -.02em; }
.menu .btn { margin-top: 12px; }

/* ---------- Hero ---------- */
.hero { padding: clamp(56px, 9vw, 120px) 0 0; text-align: center; }
.hero__copy { display: grid; justify-items: center; gap: 24px; }
.hero__copy .lead { margin-top: 4px; }

/* Il titolo prende forma dal basso, una parola e uno strato alla volta. */
.hero__title { max-width: 100%; }
.hero__line { display: block; }
.hero__word { display: inline-block; }
.js .hero__word {
  animation: heroBuild 1.15s cubic-bezier(.16, 1, .3, 1) both;
  animation-delay: calc(var(--intro) + var(--word) * .11s);
}
@keyframes heroBuild {
  from {
    opacity: 0;
    clip-path: inset(100% -.08em 0);
    transform: translateY(.55em);
    text-shadow: 0 .06em var(--faint), 0 .12em var(--surface-2);
  }
  55% { opacity: 1; }
  to {
    opacity: 1;
    clip-path: inset(-.12em -.08em -.12em);
    transform: translateY(0);
    text-shadow: 0 0 transparent, 0 0 transparent;
  }
}

.hero__cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 8px; }

.marquee {
  margin-top: clamp(56px, 8vw, 96px);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track {
  display: flex; gap: 20px; width: max-content;
  padding: 10px 0 40px;
  animation: slide 60s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes slide { to { transform: translateX(calc(-50% - 10px)); } }

.tile {
  flex: 0 0 auto; width: clamp(240px, 24vw, 300px);
  padding: 14px 14px 18px;
  background: var(--surface);
  border-radius: var(--r-lg);
  text-align: left;
  transition: transform .4s var(--ease);
}
.tile:hover { transform: translateY(-6px); }
.tile__media {
  aspect-ratio: 5 / 4; overflow: hidden;
  border-radius: var(--r-md);
  background: var(--surface-2);
  box-shadow: var(--shadow);
}
.tile__media img { width: 100%; height: 100%; object-fit: cover; }
.tile__meta { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.avatar {
  flex: none; display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--surface-2);
  font: 800 14px/1 var(--display);
}
.tile h3 { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.tile p { font-size: 13px; color: var(--muted); }

/* ---------- Statement ---------- */
.statement { padding: clamp(80px, 12vw, 160px) var(--gutter); }
.statement__text {
  max-width: 900px; margin: 0 auto;
  font: 800 clamp(30px, 4.4vw, 56px)/1.08 var(--display);
  letter-spacing: -.035em;
  text-align: center;
}
.statement__text .w { color: var(--faint); transition: color .35s; }
.statement__text .w.on { color: var(--ink); }

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 9vw, 120px) 0; scroll-margin-top: 72px; }
.section__head { display: grid; justify-items: center; gap: 20px; margin-bottom: clamp(40px, 6vw, 72px); text-align: center; }
[id] { scroll-margin-top: 88px; }

/* ---------- Collezioni: lista grande ---------- */
.clist { position: relative; border-bottom: 1px solid var(--surface-2); }
.crow {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 56px 1fr auto auto; align-items: center; gap: 24px;
  padding: clamp(22px, 2.8vw, 34px) 8px;
  border-top: 1px solid var(--surface-2);
  transition: color .35s, padding .5s var(--ease);
}
.crow__num { align-self: start; padding-top: .9em; font-size: 13px; font-weight: 600; color: var(--muted); }
.crow__main { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; min-width: 0; }
.crow__name {
  font: 800 clamp(36px, 6.4vw, 88px)/.98 var(--display);
  letter-spacing: -.045em;
  transition: transform .5s var(--ease);
}
.crow__types { flex-basis: 100%; font-size: 14px; color: var(--muted); }
.crow__tag {
  padding: 4px 10px; border-radius: 99px;
  background: var(--black); color: var(--white);
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
}
.crow__count { padding: 5px 12px; border-radius: 99px; background: var(--surface); font-size: 13px; font-weight: 600; white-space: nowrap; }
.crow__go { width: 48px; height: 48px; transition: transform .4s var(--ease), background-color .3s, color .3s; }
.crow__thumb { display: none; }

/* Passando su una riga le altre si attenuano */
.clist:hover .crow { color: var(--faint); }
.clist:hover .crow .crow__count { color: var(--muted); }
.clist .crow:hover { color: var(--ink); }
.crow:hover .crow__name { transform: translateX(14px); }
.crow:hover .crow__go { background: var(--black); color: var(--white); transform: rotate(45deg); }
.clist:hover .crow:not(:hover) .crow__tag { background: var(--surface-2); color: var(--muted); }

@media (hover: none) {
  .crow { grid-template-columns: 1fr auto; }
  .crow__num, .crow__count, .crow__go { display: none; }
  .crow__thumb { display: block; width: 72px; height: 72px; object-fit: cover; border-radius: var(--r-md); }
  .clist:hover .crow { color: inherit; }
}

/* ---------- Steps ---------- */
.steps { --step-pad: clamp(14px, 1.6vw, 20px); display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step {
  display: grid; gap: 12px; align-content: start; justify-items: start;
  padding: var(--step-pad) var(--step-pad) clamp(24px, 2.6vw, 32px);
  background: var(--surface);
  border-radius: var(--r-xl);
}
.step h3, .step p { padding: 0 8px; }
.step h3 { font: 800 22px/1.2 var(--display); letter-spacing: -.02em; }
.step p { color: var(--muted); font-size: 15px; }
.step__num {
  display: inline-grid; place-items: center;
  height: 28px; margin: 8px 8px 0; padding: 0 11px;
  border-radius: 99px;
  background: var(--surface-2); color: var(--ink);
  font: 700 13px/1 var(--font); letter-spacing: .02em;
  transition: background-color .4s, color .4s;
}
.step.is-active .step__num { background: var(--black); color: var(--white); }

/* Linea che collega i passaggi e si riempie con lo scroll */
.steps__track {
  grid-column: 1 / -1;
  position: relative;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
  height: 12px; margin-bottom: 4px;
}
.steps__track::before, .steps__fill {
  content: ""; position: absolute; top: 50%; left: calc(var(--step-pad) + 14px); right: calc((100% - 40px) / 3 - var(--step-pad) - 14px);
  height: 2px; margin-top: -1px; border-radius: 2px;
  background: var(--surface-2);
}
.steps__fill { background: var(--black); transform: scaleX(var(--p, 0)); transform-origin: left; }
.steps__track i {
  position: relative; z-index: 1;
  width: 12px; height: 12px; margin-left: calc(var(--step-pad) + 8px);
  border-radius: 50%;
  background: var(--white); box-shadow: inset 0 0 0 2px var(--surface-2);
  transition: box-shadow .4s, background-color .4s;
}
.steps__track i.is-on { background: var(--black); box-shadow: inset 0 0 0 2px var(--black); }

.steps__cta { display: grid; justify-items: center; gap: 12px; margin-top: clamp(32px, 4vw, 48px); text-align: center; }
.steps__cta p { font-size: 14px; color: var(--muted); }

/* Animazioni dei passaggi (partono quando il passaggio diventa attivo) */
.viz {
  container-type: inline-size;
  position: relative; justify-self: stretch;
  aspect-ratio: 4 / 3; overflow: hidden;
  border-radius: var(--r-lg);
  background: var(--white);
  color: var(--ink);
}
.viz svg { position: absolute; inset: 8% 6% 14%; width: 88%; height: 78%; overflow: visible; }
.js .step:not(.is-active) .viz *, .js .step:not(.is-active) .viz *::before { animation-play-state: paused !important; }
.viz__chip {
  position: absolute; left: 12px; bottom: 12px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 99px;
  background: var(--surface); font-size: 12px; font-weight: 600;
}
.live { width: 6px; height: 6px; border-radius: 50%; background: var(--ink); animation: blink 1.2s steps(2, jump-none) infinite; }
@keyframes blink { 50% { opacity: .2; } }

/* 01 · schizzo che si disegna */
.sketch-line { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: sketchA 6s var(--ease) infinite; }
.sketch-line--b { animation-name: sketchB; }
.sketch-line--c { stroke: var(--muted); animation-name: sketchC; }
.sketch-dim { fill: none; stroke: var(--muted); stroke-width: 1; opacity: 0; animation: sketchDim 6s var(--ease) infinite; }
.sketch-dim text { fill: var(--muted); stroke: none; font: 600 9px var(--font); }
@keyframes sketchA { 0% { stroke-dashoffset: 1; opacity: 1; } 25%, 85% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes sketchB { 0%, 12% { stroke-dashoffset: 1; opacity: 1; } 37%, 85% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes sketchC { 0%, 30% { stroke-dashoffset: 1; opacity: 1; } 45%, 85% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes sketchDim { 0%, 42% { opacity: 0; } 52%, 85% { opacity: 1; } 100% { opacity: 0; } }
.viz__bubble {
  position: absolute; top: 12px; left: 12px;
  padding: 7px 12px; border-radius: 14px 14px 14px 4px;
  background: var(--black); color: var(--white);
  font-size: 12px; font-weight: 500;
  opacity: 0; transform: translateY(6px) scale(.96); transform-origin: left bottom;
  animation: bubble 6s var(--ease) infinite;
}
@keyframes bubble { 0%, 55% { opacity: 0; transform: translateY(6px) scale(.96); } 62%, 88% { opacity: 1; transform: none; } 100% { opacity: 0; transform: none; } }

/* 02 · modello 3D in wireframe che ruota (costruito da script.js) */
.viz--3d { perspective: 600px; }
.wire {
  position: absolute; left: 50%; top: 46%;
  width: 0; height: 0;
  font-size: calc(100cqw / 220);   /* 1em = 1 unità del modello */
  transform-style: preserve-3d;
  transform: rotateX(-24deg);
}
.wire__spin { position: absolute; transform-style: preserve-3d; animation: spin 12s linear infinite; }
.wire__ring, .wire__seg { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.wire__ring { border: 1px solid rgba(25, 23, 28, .4); border-radius: 50%; }
.wire__seg { width: 1px; background: rgba(25, 23, 28, .7); }
@keyframes spin { from { transform: rotateY(0); } to { transform: rotateY(360deg); } }

/* 03 · oggetto che cresce strato dopo strato */
.print-ghost { fill: none; stroke: var(--line); stroke-width: 1.2; stroke-dasharray: 3 3; }
.print-bed { stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }
.print-fill { color: var(--ink); transform-box: fill-box; transform-origin: bottom; transform: scaleY(0); animation: printFill 6s linear infinite; }
.print-head { fill: var(--ink); animation: printHead 6s linear infinite; }
.print-head__x { animation: printX .7s ease-in-out infinite alternate; }
@keyframes printFill { 0% { transform: scaleY(0); opacity: 1; } 75%, 90% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }
@keyframes printHead { 0% { transform: translate(100px, 130px); opacity: 1; } 75% { transform: translate(100px, 20px); opacity: 1; } 82%, 100% { transform: translate(100px, 4px); opacity: 0; } }
@keyframes printX { from { transform: translateX(-34px); } to { transform: translateX(34px); } }

/* ---------- Laboratorio ---------- */
.section--lab { background: var(--surface); border-radius: var(--r-xl); margin: 0 clamp(8px, 1.4vw, 16px); }
.lab { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.lab__card {
  display: grid; gap: 18px; align-content: start;
  padding: clamp(20px, 2.4vw, 28px);
  background: var(--white);
  border-radius: var(--r-xl);
}
.lab__media {
  aspect-ratio: 4 / 3;
  display: grid; place-items: center;
  border-radius: var(--r-lg);
  background: #f7f7f7;
  overflow: hidden;
}
.lab__media img { width: 86%; height: 86%; object-fit: contain; mix-blend-mode: multiply; }
.lab__media--fill img { width: 100%; height: 100%; object-fit: cover; mix-blend-mode: normal; }
.lab__card .chip { justify-self: start; margin-top: 4px; }
.specs { display: grid; }
.specs li {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--surface-2);
  font-size: 14px;
}
.specs span { color: var(--muted); }
.specs strong { font-weight: 600; text-align: right; }

/* ---------- CTA / Contatti ---------- */
.cta {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 64px);
  padding: clamp(28px, 5vw, 64px);
  background: var(--black); color: var(--white);
  border-radius: var(--r-xl);
}
.cta__copy { display: grid; gap: 22px; align-content: space-between; }
.cta__copy p { color: rgba(255, 255, 255, .64); font-size: 17px; max-width: 380px; }
.cta__logo { width: 150px; height: auto; opacity: .9; }

.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 6px; font-size: 13px; font-weight: 500; color: rgba(255, 255, 255, .7); }
.form input, .form select, .form textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, .12); border-radius: 14px;
  background: rgba(255, 255, 255, .06); color: var(--white);
  font: 400 16px/1.4 var(--font);
  transition: border-color .2s, background-color .2s;
}
.form select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23fff' stroke-width='1.6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; }
.form select option { color: var(--ink); }
.form textarea { resize: vertical; min-height: 110px; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: rgba(255, 255, 255, .5); background-color: rgba(255, 255, 255, .1); }
.form .btn { margin-top: 6px; justify-self: start; }
.form__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.form__actions .btn { flex: 1 1 180px; padding-inline: 18px; }
.btn--email { background: transparent; color: var(--white); border: 1px solid rgba(255, 255, 255, .4); }
.btn--email:hover { background: rgba(255, 255, 255, .1); border-color: var(--white); }
.form__opt { font-weight: 400; color: rgba(255, 255, 255, .45); }
.form__hint { font-size: 13px; color: rgba(255, 255, 255, .55); }
.form__hint strong { color: var(--white); font-weight: 600; }
.form__note a { color: var(--white); text-decoration: underline; text-underline-offset: 3px; }
.form__note { min-height: 1.5em; font-size: 14px; color: rgba(255, 255, 255, .7); }

/* ---------- Footer ---------- */
.footer { padding: clamp(56px, 7vw, 88px) 0 28px; }
.footer__inner { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.footer__brand { display: grid; gap: 16px; align-content: start; }
.footer__brand img { width: 160px; height: auto; }
.footer__brand p { color: var(--muted); font-size: 14px; max-width: 260px; }
.footer__access { justify-self: start; }
.footer__col { display: grid; gap: 10px; align-content: start; }
.footer__col h4 { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.footer__col a { font-size: 14px; font-weight: 500; }
.footer__col a:hover { text-decoration: underline; text-underline-offset: 3px; }
.footer__bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px;
  margin-top: clamp(40px, 6vw, 72px); padding-top: 20px;
  border-top: 1px solid var(--surface-2);
  font-size: 13px; color: var(--muted);
}

/* ---------- Pagine collezione ---------- */
.nav__links a[aria-current] { background: var(--surface); }
.btn--xs { height: 34px; padding: 0 14px; font-size: 13px; }

.hero--page { padding-top: clamp(32px, 5vw, 64px); }
.display--page { font-size: clamp(48px, 9vw, 120px); }
.crumbs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; font-size: 13px; color: var(--muted); }
.crumbs a:hover { color: var(--ink); }
.crumbs [aria-current] { color: var(--ink); font-weight: 500; }

.collage {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 12px;
  margin-top: clamp(40px, 6vw, 72px);
  padding: 12px;
  background: var(--surface);
  border-radius: var(--r-xl);
}
.collage img {
  width: 100%; height: clamp(200px, 30vw, 380px);
  object-fit: cover;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
}

.section--tight { padding: clamp(40px, 6vw, 72px) 0; }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter {
  height: 40px; padding: 0 18px;
  border: 0; border-radius: 99px;
  background: var(--surface); color: var(--ink);
  font: 500 14px/1 var(--font);
  cursor: pointer;
  transition: background-color .2s, color .2s;
}
.filter:hover { background: var(--surface-2); }
.filter.is-active { background: var(--black); color: var(--white); }
.toolbar__count { font-size: 14px; color: var(--muted); }

.pgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.product {
  display: flex; flex-direction: column;
  padding: 12px 12px 18px;
  background: var(--surface);
  border-radius: var(--r-lg);
  transition: transform .4s var(--ease);
}
.product:hover { transform: translateY(-4px); }
.product[hidden] { display: none; }
.product__media { aspect-ratio: 5 / 4; overflow: hidden; border-radius: var(--r-md); background: var(--surface-2); }
.product__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.product:hover .product__media img { transform: scale(1.04); }
.product__body { flex: 1; display: flex; flex-direction: column; justify-content: space-between; gap: 18px; padding: 16px 8px 0; }
.product__type { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.product h3 { margin-top: 4px; font: 800 21px/1.2 var(--display); letter-spacing: -.02em; }
.product p { margin-top: 6px; font-size: 14px; color: var(--muted); }
.product { position: relative; }
.product__link::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.product__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.product__go { width: 34px; height: 34px; background: var(--white); }
.product:hover .product__go { transform: rotate(45deg); }

/* ---------- Pagina progetto ---------- */
.hero--project { padding-top: clamp(24px, 4vw, 48px); text-align: left; }
.crumbs--left { justify-content: flex-start; margin-bottom: 24px; }
.project { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: start; }

.gallery { display: grid; gap: 12px; padding: 12px; background: var(--surface); border-radius: var(--r-xl); }
.gallery__main { aspect-ratio: 1; overflow: hidden; border-radius: var(--r-lg); background: var(--white); box-shadow: var(--shadow); }
.gallery__main img { width: 100%; height: 100%; object-fit: cover; transition: opacity .25s; }
.gallery__main img.is-contain { object-fit: contain; padding: 8%; }
.gallery__main img.is-swapping { opacity: 0; }
.gallery__thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.thumb {
  aspect-ratio: 1; padding: 0; overflow: hidden;
  border: 2px solid transparent; border-radius: var(--r-md);
  background: var(--white);
  cursor: pointer;
  transition: border-color .2s, transform .3s var(--ease);
}
.thumb:hover { transform: translateY(-2px); }
.thumb.is-active { border-color: var(--black); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb--contain img { object-fit: contain; padding: 12%; }

.info { position: sticky; top: 96px; display: grid; gap: 18px; padding-top: 8px; }
.info .title { font-size: clamp(36px, 4.6vw, 60px); }
.info__lead { font-size: 17px; line-height: 1.6; color: var(--muted); }
.info .specs { margin-top: 4px; }
.info .specs li:last-child { border-bottom: 1px solid var(--surface-2); }
.info__cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.info__note { font-size: 13px; color: var(--muted); }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pager__link {
  display: flex; align-items: center; gap: 16px;
  padding: 20px 24px;
  background: var(--surface);
  border-radius: var(--r-lg);
  font: 800 20px/1.2 var(--display); letter-spacing: -.02em;
  transition: background-color .2s;
}
.pager__link:hover { background: var(--surface-2); }
.pager__link small { display: block; margin-bottom: 4px; font: 500 12px/1 var(--font); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.pager__link .round-btn { flex: none; background: var(--white); }
.pager__link--next { justify-content: flex-end; text-align: right; }
.product__mat { padding: 5px 12px; border-radius: 99px; background: var(--white); font-size: 12px; font-weight: 500; }

.strip {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 28px;
  padding: clamp(28px, 5vw, 56px);
  background: var(--black); color: var(--white);
  border-radius: var(--r-xl);
}
.strip p { margin-top: 14px; max-width: 440px; color: rgba(255, 255, 255, .64); }

.others { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.other { padding: 10px 10px 14px; background: var(--surface); border-radius: var(--r-lg); transition: transform .4s var(--ease); }
.other:hover { transform: translateY(-4px); }
.other__media { aspect-ratio: 3 / 2; overflow: hidden; border-radius: var(--r-md); }
.other__media img { width: 100%; height: 100%; object-fit: cover; }
.other__meta { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 0 4px; font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.other__go { width: 32px; height: 32px; margin-left: auto; background: var(--white); }
.other:hover .other__go { transform: rotate(45deg); }

/* ---------- Floating button ---------- */
.fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 40;
  display: grid; place-items: center;
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--black); color: var(--white);
  box-shadow: 0 10px 30px -8px rgba(0, 0, 0, .45);
  transition: transform .3s var(--ease), opacity .3s;
}
.fab:hover { transform: scale(1.08); }
/* Compare solo dopo la prima schermata */
.js .fab:not(.is-visible) { opacity: 0; transform: translateY(12px) scale(.9); pointer-events: none; }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
/* L'hero entra subito al caricamento, senza aspettare lo scroll (parte quando il loader si apre) */
.js .hero .reveal { opacity: 1; transform: none; animation: rise .9s var(--ease) both; animation-delay: var(--intro); }
.js .hero .reveal:nth-child(2) { animation-delay: calc(var(--intro) + .08s); }
.js .hero .reveal:nth-child(3) { animation-delay: calc(var(--intro) + .16s); }
.js .hero .reveal:nth-child(4) { animation-delay: calc(var(--intro) + .24s); }
.js .hero .marquee, .js .hero .collage { animation-delay: calc(var(--intro) + .32s); }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }

/* ---------- Transizioni di pagina (loader + sipario) ---------- */
:root { --intro: 1.05s; }
.nav-in { --intro: .2s; }

/* Ingresso: pannello nero, il logo si rivela da sinistra, poi il pannello sale */
.loader {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center;
  background: var(--black);
  animation: loaderOut .7s cubic-bezier(.7, 0, .2, 1) .95s forwards;
}
.loader__inner { display: grid; justify-items: center; gap: 18px; }
.loader__logo {
  width: 148px; height: auto;
  -webkit-mask-image: linear-gradient(90deg, #000 45%, transparent 55%);
          mask-image: linear-gradient(90deg, #000 45%, transparent 55%);
  -webkit-mask-size: 240% 100%; mask-size: 240% 100%;
  -webkit-mask-position: 100% 0; mask-position: 100% 0;
  animation: logoIn .75s var(--ease) .1s forwards;
}
.loader__bar {
  width: 64px; height: 1px;
  background: rgba(255, 255, 255, .5);
  transform: scaleX(0); transform-origin: left;
  animation: barIn .8s var(--ease) .15s forwards;
}
@keyframes logoIn { to { -webkit-mask-position: 0 0; mask-position: 0 0; } }
@keyframes barIn { to { transform: scaleX(1); } }
@keyframes loaderOut { to { clip-path: inset(0 0 100% 0); visibility: hidden; pointer-events: none; } }

/* Arrivando da un'altra pagina del sito il logo è già visibile: il pannello si apre subito */
.nav-in .loader { animation-delay: .05s; animation-duration: .6s; }
.nav-in .loader__logo { animation: none; -webkit-mask-position: 0 0; mask-position: 0 0; }
.nav-in .loader__bar { animation: none; transform: scaleX(1); }

/* Uscita: il sipario sale dal basso, poi cambia pagina */
.curtain {
  position: fixed; inset: 0; z-index: 210;
  display: grid; place-content: center; justify-items: center; gap: 14px;
  background: var(--black); color: var(--white);
  clip-path: inset(100% 0 0 0);
  transition: clip-path .55s cubic-bezier(.7, 0, .2, 1);
  pointer-events: none;
}
.curtain__logo { width: 148px; height: auto; opacity: 0; transform: translateY(10px); transition: opacity .35s .2s, transform .45s var(--ease) .2s; }
.curtain__label { max-width: 80vw; padding: 0 16px; text-align: center; line-height: 1.8; font-size: 11px; font-weight: 500; letter-spacing: .28em; text-transform: uppercase; opacity: 0; transition: opacity .35s .3s; }
.is-leaving .curtain { clip-path: inset(0); pointer-events: all; }
.is-leaving .curtain__logo { opacity: 1; transform: none; }
.is-leaving .curtain__label { opacity: .6; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .nav__links, .nav__text { display: none; }
  .nav__menu { display: inline-grid; }
  .steps { grid-template-columns: 1fr; }
  .steps__track { display: none; }
  /* Tablet: animazione a sinistra, testo a destra */
  .step { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 24px; align-items: center; padding-bottom: var(--step-pad); }
  .step .viz { grid-row: 1 / span 3; }
  .step__num { margin-top: 0; align-self: end; }
  .step p { align-self: start; }
  .cta { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: span 2; }
  .pgrid { grid-template-columns: 1fr 1fr; }
  .others { grid-template-columns: 1fr 1fr; }
  .project { grid-template-columns: 1fr; }
  .info { position: static; }
}
@media (max-width: 640px) {
  .crow { grid-template-columns: 1fr auto; gap: 16px; padding: 20px 0; }
  .crow__num, .crow__count, .crow__go { display: none; }
  .crow__thumb { display: block; width: 64px; height: 64px; object-fit: cover; border-radius: var(--r-md); }
  .crow__types { font-size: 13px; }
  .step { grid-template-columns: 1fr; padding-bottom: 24px; }
  .step .viz { grid-row: auto; }
  .step__num { margin-top: 8px; }
  .nav__actions .btn { display: none; }
  .nav__logo img { height: 24px; }
  .lab { grid-template-columns: 1fr; }
  .hero__cta .btn { flex: 1 1 100%; }
  .collage { grid-template-columns: 1fr 1fr; padding: 8px; gap: 8px; }
  .collage img:first-child { grid-column: span 2; }
  .collage img { height: 180px; border-radius: var(--r-md); }
  .pgrid { grid-template-columns: 1fr; }
  .filters { flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter); scrollbar-width: none; }
  .filter { flex: none; }
  .strip .btn { width: 100%; }
  .gallery { padding: 8px; }
  .gallery__thumbs { gap: 8px; }
  .info__cta .btn { flex: 1 1 100%; }
  .pager { grid-template-columns: 1fr; }
  .pager__link { font-size: 17px; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .loader { display: none; }
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; }
}
