/* ==========================================================================
   Testa Holding — sito vetrina
   Palette e carattere dal manuale del logo (Testa-Holding-Logo/LEGGIMI.md):
   Nero Testa #141414 · Avorio #F4F1EA · Bianco #FFFFFF · Plus Jakarta Sans
   ========================================================================== */

:root {
  --nero: #141414;
  --nero-2: #1a1a19;
  --nero-3: #0e0e0e;
  --avorio: #f4f1ea;
  --bianco: #ffffff;

  --bg: var(--nero);
  --ink: var(--avorio);
  --ink-2: rgba(244, 241, 234, .64);
  --ink-3: rgba(244, 241, 234, .38);
  --line: rgba(244, 241, 234, .13);

  --paper: var(--avorio);
  --paper-ink: var(--nero);
  --paper-ink-2: rgba(20, 20, 20, .62);
  --paper-line: rgba(20, 20, 20, .14);

  --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.77, 0, .18, 1);

  --pad: clamp(1.25rem, 4vw, 3.5rem);
  --radius: clamp(1.5rem, 3.5vw, 3rem);
  --header-h: clamp(4.5rem, 9vh, 5.75rem);
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: clip;
  background: var(--bg);
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: clamp(1rem, .95rem + .2vw, 1.125rem);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

.js body.is-loading,
body.menu-open { overflow: hidden; }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
img, svg, canvas { display: block; max-width: 100%; }
ol, ul { list-style: none; }
em { font-style: normal; font-weight: 300; }
h1, h2, h3 { font-weight: 500; }
p { text-wrap: pretty; }
::selection { background: var(--avorio); color: var(--nero); }
:focus-visible { outline: 1px solid currentColor; outline-offset: 4px; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip {
  position: fixed; top: 1rem; left: 1rem; z-index: 300;
  padding: .75rem 1rem;
  background: var(--avorio); color: var(--nero);
  font-size: .85rem; font-weight: 500;
  transform: translateY(-200%);
  transition: transform .3s var(--ease);
}
.skip:focus { transform: none; }

.has-cursor, .has-cursor * { cursor: none !important; }

/* Etichetta di sezione: "01 —— Manifesto" */
.section-label {
  display: inline-flex; align-items: center; gap: .9rem;
  font-size: .72rem; font-weight: 500; line-height: 1;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink-2);
}
.section-label span { order: -1; color: var(--ink); font-variant-numeric: tabular-nums; }
.section-label::before { content: ""; width: 2.5rem; height: 1px; background: currentColor; opacity: .5; }

/* Indicatore di avanzamento "01 ——— 03" */
.status {
  display: flex; align-items: center; gap: .9rem;
  font-size: .72rem; font-weight: 500; letter-spacing: .16em;
  color: var(--ink-2); font-variant-numeric: tabular-nums;
}
.status__bar { position: relative; width: clamp(5rem, 12vw, 10rem); height: 1px; background: var(--line); overflow: hidden; }
.status__bar i { position: absolute; inset: 0; background: var(--ink); transform: scaleX(0); transform-origin: 0 50%; }

/* Sottolineatura animata */
.link-line {
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size .7s var(--ease);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.link-line:hover, .link-line:focus-visible { background-size: 100% 1px; }

/* --------------------------------------------------------------------------
   Testo diviso in lettere (JS) + comparse
   -------------------------------------------------------------------------- */
.split .w {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding: .1em .06em .16em;
  margin: -.1em -.06em -.16em;
}
.split .c {
  display: inline-block;
  transform: translate3d(0, 135%, 0);
  transition: transform 1.3s var(--ease);
  transition-delay: calc(var(--d, 0ms) + var(--i, 0) * 30ms);
}
.split.is-in .c { transform: none; }

.js [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 2.5rem, 0);
  transition: opacity 1.1s var(--ease), transform 1.4s var(--ease);
  transition-delay: var(--delay, 0s);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* --------------------------------------------------------------------------
   Preloader
   -------------------------------------------------------------------------- */
.loader {
  position: fixed; inset: 0; z-index: 100;
  background: var(--nero-3);
  clip-path: inset(0 0 0 0);
  transition: clip-path 1.2s var(--ease-io);
}
html:not(.js) .loader { display: none; }
.loader.is-done { clip-path: inset(0 0 100% 0); }

.loader__mark {
  position: absolute; left: 50%; top: 50%;
  width: clamp(4.5rem, 8vw, 6.5rem); aspect-ratio: 1;
  transform: translate(-50%, -50%);
  transition: transform 1.2s var(--ease-io);
}
.loader.is-done .loader__mark { transform: translate(-50%, -150%); }

.lb { position: absolute; overflow: hidden; background: rgba(244, 241, 234, .07); }
.lb i { position: absolute; inset: 0; background: var(--avorio); }
.lb--top { left: 0; top: 0; width: 100%; height: 30%; }
.lb--left { left: 0; top: 38%; width: 46%; height: 62%; }
.lb--right { left: 54%; top: 38%; width: 46%; height: 62%; }
.lb--top i { transform: scaleX(var(--f, 0)); transform-origin: 0 50%; }
.lb--left i { transform: scaleY(var(--f, 0)); transform-origin: 50% 100%; }
.lb--right i { transform: scaleY(var(--f, 0)); transform-origin: 50% 0; }

.loader__foot {
  position: absolute; left: var(--pad); right: var(--pad); bottom: var(--pad);
  display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem;
}
.loader__name {
  font-size: .72rem; font-weight: 500; line-height: 1.8;
  letter-spacing: .2em; text-transform: uppercase; color: var(--ink-2);
}
.loader__count {
  font-size: clamp(3.5rem, 11vw, 9rem); font-weight: 300;
  line-height: .78; letter-spacing: -.05em;
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   Barra di avanzamento pagina
   -------------------------------------------------------------------------- */
.progress {
  position: fixed; top: 0; left: 0; z-index: 60;
  width: 100%; height: 2px;
  background: var(--avorio);
  transform: scaleX(0); transform-origin: 0 50%;
  mix-blend-mode: difference;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0 var(--pad);
  color: var(--bianco);
  mix-blend-mode: difference;
  transition: transform .9s var(--ease);
}
.js .header { opacity: 0; }
.is-ready .header { opacity: 1; transition: transform .9s var(--ease), opacity 1.2s var(--ease) .5s; }
.header.is-hidden { transform: translate3d(0, -100%, 0); }

.brand img { height: 2.4rem; width: auto; }

.header__right { display: flex; align-items: center; gap: clamp(1.25rem, 3vw, 2.5rem); }
.lang { display: flex; gap: .9rem; font-size: .72rem; font-weight: 500; letter-spacing: .16em; }
.lang a { position: relative; padding: .5rem 0; opacity: .5; transition: opacity .4s var(--ease); }
.lang a:hover, .lang a:focus-visible, .lang a[aria-current="page"] { opacity: 1; }
.lang a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: .16em; bottom: .25rem; height: 1px;
  background: currentColor;
}

.menu-btn {
  display: inline-flex; align-items: center; gap: .9rem;
  height: 2.75rem;
  font-size: .72rem; font-weight: 500; letter-spacing: .2em; text-transform: uppercase;
}
.menu-btn__label { display: block; height: 1.2em; overflow: hidden; line-height: 1.2; text-align: right; }
.menu-btn__label span { display: block; transition: transform .8s var(--ease); }
.menu-btn[aria-expanded="true"] .menu-btn__label span { transform: translateY(-100%); }
.menu-btn__icon { position: relative; width: 1.6rem; height: .6rem; }
.menu-btn__icon i {
  position: absolute; left: 0; width: 100%; height: 1.5px;
  background: currentColor;
  transition: transform .8s var(--ease), top .8s var(--ease);
}
.menu-btn__icon i:first-child { top: 0; }
.menu-btn__icon i:last-child { top: calc(100% - 1.5px); }
.menu-btn[aria-expanded="true"] .menu-btn__icon i:first-child { top: calc(50% - .75px); transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-btn__icon i:last-child { top: calc(50% - .75px); transform: rotate(-45deg); }

/* --------------------------------------------------------------------------
   Menu a schermo intero
   -------------------------------------------------------------------------- */
.menu {
  position: fixed; inset: 0; z-index: 40;
  visibility: hidden;
  transition: visibility 0s linear 1.1s;
}
.menu.is-open { visibility: visible; transition-delay: 0s; }

.menu__bg {
  position: absolute; inset: 0;
  background: var(--nero-2);
  clip-path: circle(0 at calc(100% - var(--pad) - 1.5rem) calc(var(--header-h) / 2));
  transition: clip-path 1.1s var(--ease-io);
}
.menu.is-open .menu__bg { clip-path: circle(150vmax at calc(100% - var(--pad) - 1.5rem) calc(var(--header-h) / 2)); }

.menu__inner {
  position: relative; height: 100%;
  display: flex; flex-direction: column; justify-content: space-between; gap: 2rem;
  padding: calc(var(--header-h) + clamp(1rem, 6vh, 4rem)) var(--pad) var(--pad);
  overflow-y: auto;
}
.menu__list a {
  display: flex; align-items: baseline; gap: clamp(1rem, 2vw, 1.75rem);
  overflow: hidden;
  padding: .02em .1em .08em 0;
  font-size: clamp(2.6rem, min(13vh, 11vw), 9rem);
  font-weight: 500; line-height: 1.04; letter-spacing: -.045em;
  transition: opacity .5s var(--ease);
}
.menu__list a > span {
  display: inline-block;
  transform: translate3d(0, 110%, 0);
  transition: transform .9s var(--ease), letter-spacing .6s var(--ease), font-weight .3s;
}
.menu.is-open .menu__list a > span { transform: none; transition-delay: calc(.3s + var(--i) * 60ms), 0s, 0s; }
.menu__num { font-size: .75rem; font-weight: 500; letter-spacing: .14em; color: var(--ink-3); }
.menu__list:hover a { opacity: .35; }
.menu__list a:hover, .menu__list a:focus-visible { opacity: 1; }
.menu__list a:hover .menu__label { font-weight: 300; letter-spacing: -.02em; }

.menu__foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem;
  font-size: .85rem; line-height: 1.6; color: var(--ink-2);
  opacity: 0; transform: translate3d(0, 1.25rem, 0);
  transition: opacity .6s var(--ease), transform .9s var(--ease);
}
.menu.is-open .menu__foot { opacity: 1; transform: none; transition-delay: .65s; }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  height: 100vh; height: 100svh;
  min-height: 620px;
  overflow: hidden;
  isolation: isolate;
}
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; background: var(--bg); }
.hero__canvas.is-fallback {
  background:
    radial-gradient(55% 60% at 72% 45%, rgba(244, 241, 234, .07), transparent 70%),
    var(--bg);
}

.hero__inner {
  position: relative; height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto minmax(0, 1fr) auto;
  column-gap: clamp(2rem, 5vw, 6rem);
  padding: calc(var(--header-h) + clamp(.25rem, 1.5vh, 1rem)) var(--pad) clamp(1.25rem, 3.5vh, 2.5rem);
  will-change: transform, opacity;
}

.hero__meta {
  grid-column: 1 / -1;
  display: flex; justify-content: space-between; gap: 1rem;
  font-size: .7rem; font-weight: 500; letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink-2);
}

.hero__stage { grid-column: 2; grid-row: 2; display: grid; place-items: center; }

.hero__title {
  grid-column: 1; grid-row: 2; align-self: end;
  padding-bottom: clamp(1rem, 3.5vh, 2.25rem);
  font-size: clamp(3.25rem, min(9.4vw, 17vh), 11.5rem);
  font-weight: 500; line-height: .92; letter-spacing: -.055em;
}
.hero__title .l { display: block; }

.hero__bottom {
  position: relative;
  grid-column: 1 / -1;
  display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem;
  padding-top: clamp(1rem, 2.5vh, 1.5rem);
}
.hero__bottom::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: var(--line);
}
.hero__lead { max-width: 36ch; color: var(--ink-2); font-size: clamp(.95rem, 1.1vw, 1.1rem); line-height: 1.55; }

.js .hero [data-intro] {
  opacity: 0; transform: translate3d(0, 1.5rem, 0);
  transition: opacity 1.2s var(--ease), transform 1.4s var(--ease);
  transition-delay: var(--delay, 0s);
}
.js .hero [data-intro].is-in { opacity: 1; transform: none; }

/* Badge rotante */
.badge {
  position: relative; flex: none;
  width: clamp(5.5rem, 8vw, 7.25rem); aspect-ratio: 1;
  display: grid; place-items: center;
  border-radius: 50%;
  transition: transform .6s var(--ease);
}
.badge__ring { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; animation: spin 18s linear infinite; }
.badge__ring text { fill: var(--ink); font-size: 8.2px; font-weight: 500; letter-spacing: .28em; }
.badge__arrow {
  width: 40%; aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--avorio); color: var(--nero);
  transition: transform .6s var(--ease);
}
.badge__arrow svg { width: 42%; height: 42%; }
.badge:hover .badge__arrow { transform: scale(1.18); }
@keyframes spin { to { transform: rotate(360deg); } }

/* Simbolo 3D interattivo */
.mark3d {
  --rx: 0deg; --ry: 0deg; --s: 0;
  position: relative;
  width: clamp(9rem, min(26vw, 42vh), 30rem); aspect-ratio: 1;
  perspective: 1400px;
}
.mark3d__tilt {
  position: absolute; inset: 0;
  transform-style: preserve-3d;
  transform: rotateX(var(--rx)) rotateY(var(--ry));
}
.mb, .sb { position: absolute; transform-style: preserve-3d; }
.mb--top, .sb--top { left: 0; top: 0; width: 100%; height: 30%; }
.mb--left, .sb--left { left: 0; top: 38%; width: 46%; height: 62%; }
.mb--right, .sb--right { left: 54%; top: 38%; width: 46%; height: 62%; }
.mb__inner, .sb__inner { position: absolute; inset: 0; transform-style: preserve-3d; }

.face {
  position: absolute; inset: 0;
  background: linear-gradient(150deg, #ffffff 0%, var(--avorio) 45%, #e9e4d9 100%);
}
.ex { position: absolute; inset: 0; }

.mb { transition: transform 1.8s var(--ease); }
.mb--top { transition-delay: .15s; }
.mb--left { transition-delay: .3s; }
.mb--right { transition-delay: .42s; }
.js .mark3d:not(.is-in) .mb--top { transform: translate3d(0, -140%, 0) rotateX(-60deg); }
.js .mark3d:not(.is-in) .mb--left { transform: translate3d(-40%, 120%, 0) rotateY(50deg); }
.js .mark3d:not(.is-in) .mb--right { transform: translate3d(40%, 160%, 0) rotateY(-50deg); }
.js .mark3d:not(.is-in) .mark3d__tilt { visibility: hidden; }

.mb--top .mb__inner { transform: translate3d(0, calc(var(--s) * -14%), calc(26px + var(--s) * 50px)); }
.mb--left .mb__inner { transform: translate3d(calc(var(--s) * -9%), calc(var(--s) * 3%), calc(var(--s) * 12px)); }
.mb--right .mb__inner { transform: translate3d(calc(var(--s) * 9%), calc(var(--s) * 3%), calc(14px + var(--s) * 30px)); }

.mark3d__glow { position: absolute; inset: 0; transform: translateZ(-40px); opacity: calc(.12 + var(--s) * .88); }
.mark3d__glow i, .struct__glow i {
  position: absolute;
  background: var(--bianco);
  box-shadow: 0 0 24px 4px rgba(255, 255, 255, .45), 0 0 90px 24px rgba(255, 255, 255, .14);
}
.mark3d__glow i:first-child, .struct__glow i:first-child { left: 0; top: 30%; width: 100%; height: 8%; }
.mark3d__glow i:last-child, .struct__glow i:last-child { left: 46%; top: 38%; width: 8%; height: 62%; }
.mark3d__glow i { filter: blur(6px); }

/* --------------------------------------------------------------------------
   Manifesto
   -------------------------------------------------------------------------- */
.manifesto { position: relative; padding: clamp(7rem, 20vh, 13rem) var(--pad) clamp(7rem, 20vh, 13rem); }
.manifesto__text {
  margin-top: clamp(2rem, 5vh, 3.5rem);
  max-width: 64rem;
  font-size: clamp(1.85rem, 4.2vw, 4.25rem);
  line-height: 1.1; letter-spacing: -.04em; font-weight: 500;
  text-indent: clamp(0rem, 12vw, 12rem);
}
.manifesto__text .mw { transition: opacity .35s linear; }
.js .manifesto__text .mw { opacity: .16; }

/* --------------------------------------------------------------------------
   Struttura (simbolo che si scompone con lo scroll)
   -------------------------------------------------------------------------- */
.struct { position: relative; border-top: 1px solid var(--line); }
.struct__sticky { padding: clamp(5rem, 14vh, 8rem) var(--pad); }
.struct__head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.struct__grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 6rem); align-items: center;
  margin-top: 3rem;
}
.step h2 { font-size: clamp(2.6rem, 6.2vw, 6.75rem); line-height: .95; letter-spacing: -.055em; }
.step p { margin-top: 1.5rem; max-width: 32ch; color: var(--ink-2); font-size: clamp(1rem, 1.3vw, 1.25rem); }
.step + .step { margin-top: 4rem; }

.struct__stage {
  position: relative; justify-self: center;
  width: min(100%, 68vh, 34rem); aspect-ratio: 1;
  perspective: 1800px;
}
.struct__plane { position: absolute; inset: 0; transform-style: preserve-3d; }
.struct__glow { position: absolute; inset: 0; opacity: 0; }
.face__n {
  position: absolute; left: .75rem; top: .6rem;
  font-size: .68rem; font-weight: 600; letter-spacing: .14em;
  color: var(--nero); opacity: var(--n, 0);
}

/* Modalità "pinnata" (attivata da JS) */
.struct.is-pinned { height: 340vh; }
.struct.is-pinned .struct__sticky {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  display: flex; flex-direction: column;
  padding-top: calc(var(--header-h) + 1rem);
  padding-bottom: clamp(1.5rem, 5vh, 3.5rem);
}
.struct.is-pinned .struct__grid { flex: 1; min-height: 0; margin-top: 0; }
.struct.is-pinned .struct__copy { display: grid; align-items: center; }
.struct.is-pinned .step { grid-area: 1 / 1; margin: 0; }
.struct.is-pinned .step .c { transform: translate3d(0, 135%, 0); transition-duration: .9s; transition-delay: calc(var(--i, 0) * 12ms); }
.struct.is-pinned .step.is-past .c { transform: translate3d(0, -150%, 0); }
.struct.is-pinned .step.is-active .c { transform: none; transition-duration: 1.2s; transition-delay: calc(.2s + var(--i, 0) * 24ms); }
.struct.is-pinned .step p { opacity: 0; transform: translate3d(0, 1rem, 0); transition: opacity .5s var(--ease), transform .8s var(--ease); }
.struct.is-pinned .step.is-active p { opacity: 1; transform: none; transition-delay: .45s; }

/* --------------------------------------------------------------------------
   Marchi: carosello dei loghi
   -------------------------------------------------------------------------- */
.brands {
  --logo-h: clamp(2rem, 3.4vw, 3.25rem);
  position: relative;
  padding: clamp(5rem, 12vh, 8rem) 0 clamp(4.5rem, 11vh, 7rem);
  border-top: 1px solid var(--line);
}
.brands__head {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1rem 2rem;
  padding: 0 var(--pad);
  margin-bottom: clamp(2.5rem, 7vh, 4.5rem);
}
.brands__title { font-size: clamp(1.5rem, 2.6vw, 2.5rem); font-weight: 300; line-height: 1.1; letter-spacing: -.03em; }

.marquee {
  position: relative; overflow: hidden;
  padding: clamp(2.25rem, 6vh, 3.75rem) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
}
.marquee__track { display: flex; width: max-content; will-change: transform; }
.marquee__group {
  display: flex; align-items: center; flex: none;
  gap: clamp(3.5rem, 8vw, 8rem); padding-right: clamp(3.5rem, 8vw, 8rem);
}
.marquee__group li { flex: none; display: flex; align-items: center; height: calc(var(--logo-h) * 1.4); }
.marquee__group img {
  height: calc(var(--logo-h) * var(--s, 1)); width: auto; max-width: none;
  opacity: .62;
  transition: opacity .5s var(--ease), transform .7s var(--ease);
}
.marquee__group li:hover img { opacity: 1; transform: scale(1.06); }

/* --------------------------------------------------------------------------
   Settori (sezione chiara)
   -------------------------------------------------------------------------- */
.sectors {
  position: relative; z-index: 2;
  background: var(--paper); color: var(--paper-ink);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: clamp(5rem, 14vh, 9rem) var(--pad) calc(clamp(5rem, 14vh, 8rem) + var(--radius));
}
.sectors ::selection { background: var(--nero); color: var(--avorio); }
.sectors .section-label { color: var(--paper-ink-2); }
.sectors .section-label span { color: var(--paper-ink); }
.sectors__head { margin-bottom: clamp(3rem, 8vh, 5rem); }
.sectors__title { margin-top: 1.5rem; font-size: clamp(3rem, 8.5vw, 8.75rem); line-height: .9; letter-spacing: -.06em; }
.sectors__title .l { display: block; }

.sectors__grid { display: flex; gap: clamp(.75rem, 1.5vw, 1.25rem); }

.sector {
  position: relative; isolation: isolate; overflow: hidden;
  flex: 1 1 0; min-width: 0;
  min-height: clamp(28rem, 68vh, 42rem);
  display: flex; flex-direction: column; justify-content: space-between; gap: 2rem;
  padding: clamp(1.5rem, 2.6vw, 2.75rem);
  border: 1px solid var(--paper-line);
  border-radius: clamp(1rem, 2vw, 1.75rem);
  container-type: inline-size;
}
.js .sector[data-reveal] {
  transition-property: opacity, transform, flex-grow, color;
  transition-duration: 1.1s, 1.4s, .9s, .6s;
  transition-timing-function: var(--ease);
  transition-delay: var(--delay, 0s), var(--delay, 0s), 0s, 0s;
}
.sector::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--nero);
  transform: translate3d(0, 101%, 0);
  transition: transform .9s var(--ease);
}

.sector__top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.sector__num { font-size: .75rem; font-weight: 500; letter-spacing: .16em; font-variant-numeric: tabular-nums; }
.sector__kicker { font-size: .7rem; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; opacity: .6; }

.sector__viz { flex: 1 0 auto; display: grid; place-items: center; min-height: 9rem; }
.sector__name {
  font-size: clamp(3.5rem, 9vw, 10.5rem);
  font-size: min(10.5rem, var(--fit, 24cqi)); /* segue la larghezza della card mentre si allarga */
  line-height: .85; letter-spacing: -.065em; white-space: nowrap;
}
.sector__desc { margin-top: 1.1rem; max-width: 30ch; opacity: .7; }

/* Visual IT: il simbolo in pixel */
.cells {
  display: grid;
  grid-template-columns: repeat(7, 1fr); grid-template-rows: repeat(7, 1fr);
  gap: clamp(4px, .55vw, 8px);
  width: min(100%, 15rem); aspect-ratio: 1;
}
.cells span { position: relative; }
.cells span::before, .cells span::after { content: ""; position: absolute; inset: 0; background: currentColor; }
.cells span::before { opacity: .1; animation: cell 4.2s ease-in-out infinite; animation-delay: var(--d, 0s); }
.cells span::after { opacity: var(--h, 0); transition: opacity .35s ease-out; }
.cells .gap { visibility: hidden; }
@keyframes cell { 0%, 100% { opacity: .1; } 8% { opacity: .9; } 24% { opacity: .1; } }

/* Visual Turismo: sole sull'orizzonte */
.sector__viz--sun svg { width: min(100%, 20rem); height: auto; overflow: hidden; fill: none; stroke: currentColor; stroke-width: 1; }
.sun { animation: rise 7s var(--ease-io) infinite alternate; }
.sun__core { fill: currentColor; stroke: none; }
.sun__ring { opacity: .45; }
.spin-slow { stroke-dasharray: 2 6; transform-origin: 120px 104px; animation: spin 40s linear infinite; }
.horizon { opacity: .9; }
.wave { animation: wave 5s linear infinite; }
.wave--1 { opacity: .55; }
.wave--2 { opacity: .35; animation-duration: 7s; }
.wave--3 { opacity: .2; animation-duration: 9s; }
@keyframes rise { from { transform: translateY(18px); } to { transform: translateY(-6px); } }
@keyframes wave { to { transform: translateX(-30px); } }

@media (hover: hover) and (min-width: 761px) {
  .sectors__grid:hover .sector { flex-grow: .78; }
  .sectors__grid .sector:hover { flex-grow: 1.3; color: var(--avorio); }
  .sector:hover::before { transform: none; }
  .sector:hover .wave { animation-duration: 2.2s; }
}

/* --------------------------------------------------------------------------
   Contatti
   -------------------------------------------------------------------------- */
.contact {
  position: relative; z-index: 3;
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: space-between;
  margin-top: calc(var(--radius) * -1);
  padding: clamp(5rem, 14vh, 9rem) var(--pad) clamp(3rem, 8vh, 5rem);
  background: var(--bg);
  border-radius: var(--radius) var(--radius) 0 0;
}
.contact__main {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem;
  margin: clamp(2.5rem, 8vh, 5rem) 0;
}
.contact__title { font-size: clamp(3rem, 10vw, 11rem); line-height: .88; letter-spacing: -.06em; }
.contact__title .l { display: block; }
.contact__title .l + .l { padding-left: clamp(0rem, 8vw, 9rem); }

.contact__cta {
  position: relative; flex: none; overflow: hidden;
  width: clamp(8rem, 13vw, 12rem); aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--avorio); color: var(--nero);
  font-size: clamp(.95rem, 1.2vw, 1.15rem); font-weight: 500; letter-spacing: -.01em;
}
.contact__cta::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: var(--bianco);
  transform: scale(0);
  transition: transform .7s var(--ease);
}
.contact__cta:hover::before { transform: scale(1); }
.contact__cta span { position: relative; display: inline-flex; align-items: center; gap: .4rem; }
.contact__cta svg { width: 1.1em; height: 1.1em; transition: transform .6s var(--ease); }
.contact__cta:hover svg { transform: rotate(45deg); }

.contact__grid {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 2rem;
  padding-top: 2rem; border-top: 1px solid var(--line);
}
.contact__k { display: block; margin-bottom: .75rem; font-size: .68rem; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3); }
.contact__v { font-size: clamp(1.05rem, 1.5vw, 1.35rem); line-height: 1.45; letter-spacing: -.01em; }
.contact__item:first-child .contact__v { font-size: clamp(1.35rem, 2.6vw, 2.4rem); letter-spacing: -.03em; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer { position: relative; overflow: hidden; padding: 1.75rem var(--pad) 0; border-top: 1px solid var(--line); }
.footer__top {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem 2rem;
  font-size: .8rem; color: var(--ink-3);
}
.to-top {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .72rem; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--ink);
}
.to-top svg { width: 1rem; height: 1rem; transform: rotate(180deg); }
.footer__logo { margin-top: clamp(3rem, 10vh, 6rem); padding-bottom: var(--pad); }
.footer__logo img { width: 100%; height: auto; }
.js .footer__logo[data-reveal] { opacity: 1; transform: none; clip-path: inset(100% 0 0 0); transition: clip-path 1.6s var(--ease-io); }
.js .footer__logo[data-reveal].is-in { clip-path: inset(0 0 0 0); }

/* --------------------------------------------------------------------------
   Cursore personalizzato
   -------------------------------------------------------------------------- */
.cursor {
  position: fixed; inset: 0; z-index: 200;
  pointer-events: none;
  mix-blend-mode: difference;
  opacity: 0; transition: opacity .4s;
}
.cursor.is-visible { opacity: 1; }
.cursor__ring, .cursor__dot { position: absolute; top: 0; left: 0; will-change: transform; }
.cursor__dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: #fff; transition: opacity .3s; }
.cursor__circle {
  position: absolute; left: -21px; top: -21px;
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .5);
  transition: transform .55s var(--ease), background-color .4s, border-color .4s;
}
.cursor.is-hover .cursor__circle { transform: scale(1.6); background: #fff; border-color: transparent; }
.cursor.has-label .cursor__circle { transform: scale(2.3); }
.cursor.is-down .cursor__circle { transform: scale(.85); }
.cursor.is-hover .cursor__dot { opacity: 0; }
.cursor__label {
  position: absolute; transform: translate(-50%, -50%);
  font-size: .6rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: #000; white-space: nowrap;
  opacity: 0; transition: opacity .3s;
}
.cursor.has-label .cursor__label { opacity: 1; }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* --------------------------------------------------------------------------
   Grana pellicola
   -------------------------------------------------------------------------- */
.grain {
  position: fixed; inset: -50%; z-index: 90;
  pointer-events: none;
  opacity: .05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1.1s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate3d(0, 0, 0); }
  20% { transform: translate3d(-5%, 4%, 0); }
  40% { transform: translate3d(4%, -6%, 0); }
  60% { transform: translate3d(-8%, 2%, 0); }
  80% { transform: translate3d(6%, 5%, 0); }
  100% { transform: translate3d(0, 0, 0); }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 760px) {
  :root { --header-h: 4.5rem; }
  .brand img { height: 2.25rem; }

  .hero { min-height: 560px; }
  .hero__inner { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr) auto auto; }
  .hero__stage { grid-column: 1; grid-row: 2; }
  .mark3d { width: min(52vw, 30vh); }
  .hero__title { grid-column: 1; grid-row: 3; font-size: clamp(3rem, 15vw, 5.5rem); }
  .hero__bottom { align-items: center; }
  .hero__lead { font-size: .92rem; }
  .badge { width: 5.25rem; }

  .manifesto__text { text-indent: 0; }

  .struct__grid { grid-template-columns: 1fr; }
  .struct.is-pinned { height: 300vh; }
  .struct.is-pinned .struct__grid { grid-template-rows: minmax(0, 1fr) auto; gap: 1.5rem; }
  .struct.is-pinned .struct__stage { order: -1; width: auto; height: 100%; max-width: 100%; max-height: 19rem; align-self: center; }
  .step h2 { font-size: clamp(2.5rem, 12vw, 3.75rem); }
  .step p { margin-top: 1rem; font-size: 1rem; }
  .status { display: none; }

  .sectors__grid { flex-direction: column; }
  .sector { flex: none; min-height: 0; gap: 1.5rem; }
  .cells { width: min(100%, 11rem); }
  .sector__viz--sun svg { width: min(100%, 15rem); }

  .contact__title { font-size: clamp(2.75rem, 13vw, 4.5rem); }
  .contact__main { flex-direction: column; align-items: flex-start; }
  .contact__cta { align-self: flex-end; margin-top: -1rem; }
  .contact__grid { grid-template-columns: 1fr; gap: 1.75rem; }
  .footer__top { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .menu-btn__label { display: none; }
  .brand img { height: 2.1rem; }
}

/* --------------------------------------------------------------------------
   Movimento ridotto
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
  }
  .grain { display: none; }
}
