/* ==========================================================================
   Fin Solution — foglio di stile principale
   Struttura: 1. Token  2. Base  3. Layout  4. Tipografia  5. Componenti
              6. Header/Menu  7. Sezioni  8. Pagine  9. Footer  10. Motion
   ========================================================================== */

/* 1. TOKEN ----------------------------------------------------------------- */
:root {
  --ink: #0a1628;
  --ink-2: #0e1f3a;
  --ink-3: #172b4d;
  --blue: #2553b8;
  --blue-600: #1b3f91;
  --blue-400: #4b7be0;
  --blue-300: #8fb0f5;
  --blue-100: #dde7fb;
  --paper: #f4f2ed;
  --paper-2: #ebe7de;
  --white: #ffffff;

  --text: var(--ink);
  --muted: #56617a;
  --muted-inv: rgba(236, 241, 250, 0.66);
  --line: rgba(10, 22, 40, 0.12);
  --line-inv: rgba(255, 255, 255, 0.14);

  --font-serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --font-sans: "Geist", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --gutter: clamp(20px, 4.2vw, 64px);
  --maxw: 1360px;
  --radius: 22px;
  --radius-sm: 14px;
  --header-h: 84px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.76, 0, 0.24, 1);
  --ease-back: cubic-bezier(0.34, 1.56, 0.64, 1);

  --section-y: clamp(96px, 13vw, 190px);
}

/* 2. BASE ------------------------------------------------------------------ */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

body.is-locked { overflow: hidden; }

img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p, figure, dl, dd { margin: 0; }

::selection { background: var(--blue); color: var(--white); }

:focus-visible {
  outline: 2px solid var(--blue-400);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 500;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  font-weight: 500;
  transform: translateY(-160%);
  transition: transform 0.3s var(--ease);
}
.skip:focus { transform: none; }

.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;
}

/* 3. LAYOUT ---------------------------------------------------------------- */
.container {
  width: min(100% - 2 * var(--gutter), var(--maxw));
  margin-inline: auto;
}

.section { position: relative; padding-block: var(--section-y); }
.section--tight { padding-block: clamp(72px, 9vw, 130px); }

.theme-dark {
  background: var(--ink);
  color: var(--white);
  --text: var(--white);
  --muted: var(--muted-inv);
  --line: var(--line-inv);
}
.theme-blue {
  background: var(--blue);
  color: var(--white);
  --text: var(--white);
  --muted: rgba(255, 255, 255, 0.74);
  --line: rgba(255, 255, 255, 0.22);
}
.theme-paper-2 { background: var(--paper-2); }

/* grana sottile sulle superfici scure */
.grain { position: relative; isolation: isolate; }
.grain::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.07;
  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='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* 4. TIPOGRAFIA ------------------------------------------------------------ */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 18%, transparent);
}
.theme-dark .eyebrow::before,
.theme-blue .eyebrow::before { background: var(--blue-300); box-shadow: 0 0 0 4px rgba(143, 176, 245, 0.18); }
.eyebrow__num { color: var(--text); }

.display {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.015em;
}
.display em,
.h2 em,
.h3 em { font-style: italic; color: var(--blue); }
.theme-dark .display em,
.theme-dark .h2 em,
.theme-blue .display em,
.theme-blue .h2 em { color: var(--blue-300); }

.h1 { font-size: clamp(3.1rem, 8.4vw, 8.6rem); }
.h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2.6rem, 6vw, 5.6rem);
  line-height: 1;
  letter-spacing: -0.012em;
}
.h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(1.7rem, 2.6vw, 2.35rem);
  line-height: 1.08;
}
.lead {
  font-size: clamp(1.1rem, 1.35vw, 1.28rem);
  line-height: 1.6;
  color: var(--muted);
  max-width: 34em;
}
.body-text p + p { margin-top: 1.1em; }
.body-text { color: var(--muted); }
.body-text strong { color: var(--text); font-weight: 500; }

.mono { font-family: var(--font-mono); letter-spacing: 0.02em; }

/* 5. COMPONENTI ------------------------------------------------------------ */

/* Bottoni --- testo che "rotola" in hover, freccia in loop, effetto magnetico */
.btn {
  --btn-bg: var(--ink);
  --btn-fg: var(--white);
  --btn-icon-bg: rgba(255, 255, 255, 0.14);
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  height: 58px;
  padding: 0 8px 0 26px;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 15.5px;
  font-weight: 500;
  letter-spacing: 0.005em;
  white-space: nowrap;
  isolation: isolate;
  overflow: hidden;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease), background-color 0.4s;
  will-change: transform;
}
.btn::before {
  /* riempimento circolare che parte dal basso */
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  z-index: -1;
  width: 140%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--btn-hover, var(--blue));
  transform: translate(-50%, 0) scale(0.2);
  transition: transform 0.7s var(--ease), top 0.7s var(--ease);
}
.btn:hover::before,
.btn:focus-visible::before { top: -20%; transform: translate(-50%, 0) scale(1); }
.btn__txt {
  display: inline-block;
  height: 1.3em;
  line-height: 1.3em;
  overflow: hidden;
}
.btn__txt > span {
  display: inline-block;
  text-shadow: 0 1.3em 0 currentColor;
  transition: transform 0.55s var(--ease);
}
.btn:hover .btn__txt > span,
.btn:focus-visible .btn__txt > span { transform: translateY(-1.3em); }
.btn__icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--btn-icon-bg);
  overflow: hidden;
  flex: none;
}
.btn__icon svg { width: 16px; height: 16px; }
.btn:hover .btn__icon svg { animation: arrow-loop 0.6s var(--ease) both; }
@keyframes arrow-loop {
  0% { transform: none; }
  45% { transform: translateX(140%); }
  46% { transform: translateX(-140%); }
  100% { transform: none; }
}
.btn--primary { --btn-bg: var(--blue); --btn-hover: var(--ink); }
.theme-dark .btn--primary,
.theme-blue .btn--primary { --btn-hover: var(--white); }
.theme-dark .btn--primary:hover,
.theme-blue .btn--primary:hover { color: var(--ink); }
.theme-dark .btn--primary:hover .btn__icon,
.theme-blue .btn--primary:hover .btn__icon { background: rgba(10, 22, 40, 0.1); }
.btn--light { --btn-bg: var(--white); --btn-fg: var(--ink); --btn-hover: var(--blue-100); --btn-icon-bg: rgba(10, 22, 40, 0.08); }
.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--text);
  --btn-hover: var(--ink);
  --btn-icon-bg: transparent;
  box-shadow: inset 0 0 0 1px var(--line);
}
.btn--ghost:hover,
.btn--ghost:focus-visible { color: var(--white); }
.theme-dark .btn--ghost,
.theme-blue .btn--ghost { --btn-hover: var(--white); }
.theme-dark .btn--ghost:hover,
.theme-blue .btn--ghost:hover,
.theme-dark .btn--ghost:focus-visible,
.theme-blue .btn--ghost:focus-visible { color: var(--ink); }
.btn--sm { height: 46px; padding: 0 22px; font-size: 14.5px; }
.btn--block { width: 100%; justify-content: space-between; }

/* Link con freccia e sottolineatura animata */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  font-size: 15px;
  color: var(--text);
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  padding-bottom: 3px;
  transition: background-size 0.5s var(--ease), gap 0.4s var(--ease);
}
.link-arrow svg { width: 14px; height: 14px; transition: transform 0.4s var(--ease); }
.link-arrow:hover { background-size: 100% 1px; gap: 14px; }
.link-arrow:hover svg { transform: translateX(2px); }

/* Media con cornice e parallax */
.media {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--ink-2);
}
.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.14);
  will-change: transform;
}

/* Chip / tag */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 13.5px;
  line-height: 1.2;
  color: var(--text);
}

/* Marquee */
.marquee {
  --gap: clamp(28px, 4vw, 64px);
  position: relative;
  display: flex;
  overflow: hidden;
  user-select: none;
  padding-block: clamp(28px, 4vw, 52px);
  border-block: 1px solid var(--line);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track {
  display: flex;
  flex: none;
  align-items: center;
  gap: var(--gap);
  padding-right: var(--gap);
  animation: marquee var(--dur, 38s) linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__item {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 6vw, 5.4rem);
  line-height: 1;
  white-space: nowrap;
  letter-spacing: -0.01em;
  color: var(--text);
}
.marquee__star {
  width: clamp(18px, 2.2vw, 30px);
  height: clamp(18px, 2.2vw, 30px);
  color: var(--blue);
  flex: none;
  animation: spin 9s linear infinite;
}
.marquee--small .marquee__item { font-size: clamp(1.6rem, 3.2vw, 2.8rem); }
@keyframes marquee { to { transform: translateX(-100%); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* Section head */
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px clamp(32px, 6vw, 110px);
  align-items: end;
  margin-bottom: clamp(48px, 7vw, 100px);
}
.section-head .eyebrow { grid-column: 1 / -1; }
.section-head--stack { grid-template-columns: 1fr; }

/* 6. HEADER & MENU --------------------------------------------------------- */
.progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 2px;
  z-index: 120;
  pointer-events: none;
}
.progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--blue-400), var(--blue-300));
  transform-origin: 0 50%;
  transform: scaleX(var(--p, 0));
}

.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  color: var(--ink);
  transition: transform 0.6s var(--ease), color 0.4s, background-color 0.4s, box-shadow 0.4s;
}
.header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(244, 242, 237, 0.78);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  backdrop-filter: saturate(160%) blur(16px);
  box-shadow: 0 1px 0 var(--line);
  opacity: 0;
  transition: opacity 0.4s, background-color 0.4s;
}
.header.is-scrolled::before { opacity: 1; }
.header.on-dark { color: var(--white); }
.header.on-dark::before { background: rgba(10, 22, 40, 0.62); box-shadow: 0 1px 0 var(--line-inv); }
.header.is-hidden { transform: translateY(-100%); }

.header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-right: auto;
  line-height: 1;
}
.brand__mark {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 42px;
  font-family: var(--font-serif);
  font-size: 44px;
  line-height: 1;
}
.brand__mark span { position: absolute; }
.brand__mark span:first-child { left: 0; top: -2px; }
.brand__mark span:last-child {
  left: 12px;
  top: 6px;
  font-style: italic;
  color: var(--blue);
  transition: transform 0.6s var(--ease);
}
.on-dark .brand__mark span:last-child,
.theme-dark .brand__mark span:last-child,
.menu .brand__mark span:last-child { color: var(--blue-300); }
.brand:hover .brand__mark span:last-child { transform: translate(2px, -2px) rotate(-6deg); }
.brand__name {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.brand__name small {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.2em;
  opacity: 0.6;
}

.nav ul { display: flex; gap: 6px; }
.nav a {
  position: relative;
  display: inline-block;
  padding: 10px 14px;
  font-size: 14.5px;
  font-weight: 450;
  letter-spacing: 0.01em;
  opacity: 0.86;
  transition: opacity 0.3s;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 5px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: 100% 50%;
  transition: transform 0.5s var(--ease);
}
.nav a:hover { opacity: 1; }
.nav a:hover::after,
.nav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: 0 50%; }
.nav a[aria-current="page"] { opacity: 1; }

.header .btn--primary { --btn-hover: var(--ink); }
.header.on-dark .btn--primary { --btn-hover: var(--white); }
.header.on-dark .btn--primary:hover { color: var(--ink); }

.burger {
  display: none;
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid currentColor;
  border-color: color-mix(in srgb, currentColor 30%, transparent);
}
.burger span {
  position: absolute;
  left: 14px;
  right: 14px;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.5s var(--ease), top 0.5s var(--ease);
}
.burger span:first-child { top: 19px; }
.burger span:last-child { top: 27px; }
.burger[aria-expanded="true"] span:first-child { top: 23px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { top: 23px; transform: rotate(-45deg); }

.menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  padding: calc(var(--header-h) + 24px) var(--gutter) 32px;
  background: var(--ink);
  color: var(--white);
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.8s var(--ease-io), visibility 0s 0.8s;
  visibility: hidden;
}
.menu.is-open {
  clip-path: inset(0 0 0 0);
  visibility: visible;
  transition: clip-path 0.8s var(--ease-io), visibility 0s;
}
.menu__links { display: grid; gap: 4px; margin-top: 8px; }
.menu__links a {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 8px 0;
  font-family: var(--font-serif);
  font-size: clamp(2.6rem, 11vw, 4.2rem);
  line-height: 1;
  border-bottom: 1px solid var(--line-inv);
  overflow: hidden;
}
.menu__links a > span:last-child {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 0.9s var(--ease);
}
.menu__links a > span:first-child {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--blue-300);
  opacity: 0;
  transition: opacity 0.6s;
}
.menu.is-open .menu__links a > span:last-child { transform: none; transition-delay: calc(0.25s + var(--i) * 0.07s); }
.menu.is-open .menu__links a > span:first-child { opacity: 1; transition-delay: calc(0.4s + var(--i) * 0.07s); }
.menu__links a[aria-current="page"] { color: var(--blue-300); }
.menu__foot {
  margin-top: auto;
  display: grid;
  gap: 18px;
  font-size: 15px;
  color: var(--muted-inv);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s, transform 0.8s var(--ease);
}
.menu.is-open .menu__foot { opacity: 1; transform: none; transition-delay: 0.6s; }

/* 7. SEZIONI --------------------------------------------------------------- */

/* HERO */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: calc(var(--header-h) + 40px);
  padding-bottom: clamp(28px, 4vw, 48px);
  overflow: hidden;
  isolation: isolate;
}
.hero--page { min-height: min(92svh, 900px); }
.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}
.hero__glow {
  position: absolute;
  z-index: -1;
  width: 70vw;
  height: 70vw;
  right: -20vw;
  top: -25vw;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(37, 83, 184, 0.55), rgba(37, 83, 184, 0) 70%);
  filter: blur(10px);
  pointer-events: none;
  animation: glow 14s ease-in-out infinite alternate;
}
.hero__glow--b {
  left: -25vw;
  right: auto;
  top: auto;
  bottom: -40vw;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(closest-side, rgba(75, 123, 224, 0.28), transparent 70%);
  animation-duration: 18s;
}
@keyframes glow {
  to { transform: translate(-6vw, 5vw) scale(1.12); }
}
.hero__veil {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(10, 22, 40, 0.55) 0%, transparent 22%),
    linear-gradient(0deg, rgba(10, 22, 40, 0.9) 0%, rgba(10, 22, 40, 0.35) 38%, transparent 62%),
    linear-gradient(90deg, rgba(10, 22, 40, 0.55) 0%, transparent 55%);
}
.todo {
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(255, 196, 0, 0.18);
  color: #ffd66b;
  font-family: var(--font-mono);
  font-size: 0.9em;
}
.hero__inner {
  display: grid;
  gap: clamp(28px, 3.5vw, 44px);
  padding-bottom: clamp(40px, 6vw, 90px);
}
.hero__title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(3.1rem, 8.2vw, 9.2rem);
  line-height: 0.94;
  letter-spacing: -0.02em;
}
.hero__title em { font-style: italic; color: var(--blue-300); }
.hero__title .amp {
  font-style: italic;
  color: var(--blue-400);
  padding-right: 0.06em;
}
.hero__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px 40px;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line-inv);
  font-size: 13.5px;
  color: var(--muted-inv);
}
.hero__meta { display: flex; flex-wrap: wrap; gap: 8px 26px; }
.hero__meta span,
.hero__meta a { display: inline-flex; align-items: center; gap: 8px; }
.hero__meta a { transition: color 0.3s; }
.hero__meta a:hover { color: var(--white); }
.hero__meta svg { width: 15px; height: 15px; color: var(--blue-300); }
.scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--white);
}
.scroll-cue__line {
  position: relative;
  width: 1px;
  height: 34px;
  background: var(--line-inv);
  overflow: hidden;
}
.scroll-cue__line::after {
  content: "";
  position: absolute;
  left: 0;
  top: -40%;
  width: 100%;
  height: 40%;
  background: var(--white);
  animation: cue 2.2s var(--ease-io) infinite;
}
@keyframes cue { to { top: 110%; } }

/* COSA FACCIAMO */
.statement {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4.6vw, 4.6rem);
  line-height: 1.06;
  letter-spacing: -0.012em;
  max-width: 25ch;
}
.statement .sw { transition: opacity 0.25s linear, color 0.25s linear; }
.statement em { font-style: italic; color: var(--blue); }

.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(40px, 7vw, 120px);
  align-items: center;
  margin-top: clamp(56px, 8vw, 120px);
}
.about__media { aspect-ratio: 4 / 5; }
.about__grid--text { align-items: start; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.about__grid--text .keys { margin-top: 0; }
.about__media figcaption {
  position: absolute;
  left: 18px;
  bottom: 18px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(10, 22, 40, 0.55);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.about__text .body-text { font-size: clamp(1.05rem, 1.25vw, 1.2rem); max-width: 32em; }
.keys {
  display: grid;
  margin-block: clamp(36px, 4vw, 52px);
  border-top: 1px solid var(--line);
}
.keys li {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.keys__n { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.keys__t { font-family: var(--font-serif); font-size: clamp(1.4rem, 2vw, 1.8rem); line-height: 1.1; }
.keys svg { width: 22px; height: 22px; color: var(--blue); }

/* PAYROLL TEASER + CEDOLINO */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(48px, 7vw, 120px);
  align-items: center;
}
.split__text { display: grid; gap: 28px; justify-items: start; }
.split__text .body-text { font-size: clamp(1.05rem, 1.2vw, 1.16rem); max-width: 31em; }

.payslip {
  position: relative;
  perspective: 1200px;
  padding: clamp(24px, 4vw, 56px) clamp(10px, 3vw, 40px);
}
.payslip__card {
  --muted: #56617a;
  --line: rgba(10, 22, 40, 0.12);
  position: relative;
  padding: clamp(22px, 2.6vw, 34px);
  border-radius: 24px;
  background: linear-gradient(160deg, #ffffff 0%, #f5f7fc 100%);
  color: var(--ink);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.6) inset,
    0 40px 80px -30px rgba(0, 0, 0, 0.55),
    0 18px 36px -18px rgba(10, 22, 40, 0.45);
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transform-style: preserve-3d;
  transition: transform 0.8s var(--ease);
  font-size: 14px;
}
.payslip__card::after {
  /* riflesso che segue il puntatore */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(420px circle at var(--gx, 70%) var(--gy, 0%), rgba(255, 255, 255, 0.7), transparent 45%);
  mix-blend-mode: soft-light;
  pointer-events: none;
}
.payslip__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px dashed rgba(10, 22, 40, 0.16);
}
.payslip__label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.payslip__head strong { font-family: var(--font-serif); font-weight: 400; font-size: 26px; line-height: 1.2; }
.payslip__badge {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--blue-100);
  color: var(--blue-600);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.payslip__meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px dashed rgba(10, 22, 40, 0.16);
}
.payslip__meta dt { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.payslip__meta dd { font-weight: 500; font-size: 13.5px; }
.payslip__rows { padding: 10px 0; }
.payslip__rows li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(10, 22, 40, 0.06);
  font-variant-numeric: tabular-nums;
}
.payslip__rows li span:last-child { font-family: var(--font-mono); font-size: 13px; }
.payslip__rows li.neg span:last-child { color: #8a4b3a; }
.payslip__net {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 8px;
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--white);
}
.payslip__net span { font-size: 13px; color: var(--muted-inv); }
.payslip__net strong { font-family: var(--font-mono); font-size: 22px; font-weight: 500; font-variant-numeric: tabular-nums; }
.payslip__checks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.payslip__checks span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  background: #e9f3ec;
  color: #1f6b3d;
  font-size: 12px;
  font-weight: 500;
}
.payslip__checks svg { width: 12px; height: 12px; }
.payslip__float {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 16px;
  background: rgba(23, 43, 77, 0.72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line-inv);
  color: var(--white);
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.6);
  animation: float 6s ease-in-out infinite;
}
.payslip__float svg { width: 18px; height: 18px; color: var(--blue-300); }
.payslip__float--a { top: 4%; right: -2%; }
.payslip__float--b { bottom: 6%; left: -4%; animation-delay: -3s; }
@keyframes float {
  50% { transform: translateY(-10px); }
}
/* animazione di compilazione del cedolino */
.js .payslip__rows li,
.js .payslip__checks span {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.6s var(--ease), transform 0.8s var(--ease);
}
.js .payslip.is-in .payslip__rows li,
.js .payslip.is-in .payslip__checks span { opacity: 1; transform: none; }
.payslip.is-in .payslip__rows li:nth-child(1) { transition-delay: 0.35s; }
.payslip.is-in .payslip__rows li:nth-child(2) { transition-delay: 0.45s; }
.payslip.is-in .payslip__rows li:nth-child(3) { transition-delay: 0.55s; }
.payslip.is-in .payslip__rows li:nth-child(4) { transition-delay: 0.65s; }
.payslip.is-in .payslip__rows li:nth-child(5) { transition-delay: 0.75s; }
.payslip.is-in .payslip__checks span:nth-child(1) { transition-delay: 1.5s; }
.payslip.is-in .payslip__checks span:nth-child(2) { transition-delay: 1.65s; }
.payslip.is-in .payslip__checks span:nth-child(3) { transition-delay: 1.8s; }

/* SERVIZI — lista a fisarmonica + visual sticky */
.services {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(40px, 7vw, 120px);
  align-items: start;
}
.services__aside {
  position: sticky;
  top: calc(var(--header-h) + 32px);
  display: grid;
  gap: 32px;
}
.services__visual {
  position: relative;
  aspect-ratio: 4 / 3.2;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 1px 0 var(--line), 0 30px 60px -40px rgba(10, 22, 40, 0.35);
  overflow: hidden;
}
.services__visual .illo {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 0.6s var(--ease), transform 0.9s var(--ease);
}
.services__visual .illo.is-on { opacity: 1; transform: none; }
.services__label {
  position: absolute;
  left: 18px;
  bottom: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  z-index: 2;
}
.services__label b { color: var(--blue); font-weight: 500; }

.acc { border-top: 1px solid var(--line); }
.acc__item { border-bottom: 1px solid var(--line); }
.acc__head {
  position: relative;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: clamp(22px, 2.6vw, 34px) 0;
  text-align: left;
}
.acc__num {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
  transition: color 0.4s;
}
.acc__title {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 3.2vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  transition: transform 0.6s var(--ease), color 0.4s;
}
.acc__head:hover .acc__title { transform: translateX(10px); }
.acc__head:hover .acc__num,
.acc__item.is-open .acc__num { color: var(--blue); }
.acc__item.is-open .acc__title { font-style: italic; }
.acc__toggle {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--line);
  transition: background-color 0.4s, border-color 0.4s, transform 0.6s var(--ease);
}
.acc__toggle::before,
.acc__toggle::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 1.5px;
  background: currentColor;
  transform: translate(-50%, -50%);
  transition: transform 0.5s var(--ease);
}
.acc__toggle::after { transform: translate(-50%, -50%) rotate(90deg); }
.acc__head:hover .acc__toggle { border-color: var(--blue); }
.acc__item.is-open .acc__toggle { background: var(--blue); border-color: var(--blue); color: var(--white); transform: rotate(180deg); }
.acc__item.is-open .acc__toggle::after { transform: translate(-50%, -50%) rotate(0deg); }
.acc__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.7s var(--ease);
}
.acc__item.is-open .acc__panel { grid-template-rows: 1fr; }
.acc__inner { overflow: hidden; }
.acc__body {
  display: grid;
  gap: 22px;
  justify-items: start;
  padding: 0 0 clamp(26px, 3vw, 40px) 76px;
  color: var(--muted);
  max-width: 44em;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.5s, transform 0.7s var(--ease);
}
.acc__item.is-open .acc__body { opacity: 1; transform: none; transition-delay: 0.15s; }
.acc__body .illo-inline { display: none; }

/* ILLUSTRAZIONI (SVG) */
.illo { width: 100%; height: 100%; color: var(--blue); }
.illo text { font-family: var(--font-mono); font-size: 10px; fill: var(--muted); letter-spacing: 0.06em; }
.illo .grid-l { stroke: rgba(10, 22, 40, 0.06); stroke-width: 1; }
.illo .draw {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 1.6s var(--ease) var(--d, 0s);
}
.illo .pop {
  transform-box: fill-box;
  transform-origin: center;
  transform: scale(0.4);
  opacity: 0;
  transition: transform 0.8s var(--ease-back) var(--d, 0s), opacity 0.4s var(--d, 0s);
}
.illo .bar {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  transform: scaleY(0);
  transition: transform 1.1s var(--ease) var(--d, 0s);
}
.illo .fade {
  opacity: 0;
  transition: opacity 0.8s var(--d, 0s);
}
.illo.is-on .draw,
.is-in > .illo .draw { stroke-dashoffset: 0; }
.illo.is-on .pop,
.is-in > .illo .pop { transform: none; opacity: 1; }
.illo.is-on .bar,
.is-in > .illo .bar { transform: none; }
.illo.is-on .fade,
.is-in > .illo .fade { opacity: 1; }
.illo .lens { animation: lens 6s var(--ease-io) infinite; transform-box: view-box; }
@keyframes lens {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(-70px, 58px); }
  66% { transform: translate(-10px, 110px); }
}

/* METODO */
.method__intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px clamp(40px, 7vw, 120px);
  align-items: end;
}
.method__intro .body-text { font-size: clamp(1.05rem, 1.3vw, 1.22rem); }
.steps {
  --p: 0;
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 48px);
  margin-top: clamp(64px, 9vw, 130px);
  padding-top: 56px;
}
.steps::before,
.steps::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 11px;
  height: 1px;
  background: var(--line);
}
.steps::after {
  background: linear-gradient(90deg, var(--blue-300), var(--white));
  transform-origin: 0 50%;
  transform: scaleX(var(--p));
}
.step { position: relative; display: grid; gap: 18px; align-content: start; }
.step__dot {
  position: absolute;
  top: -56px;
  left: 0;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--ink);
  transition: border-color 0.5s, background-color 0.5s, box-shadow 0.5s;
}
.step__dot::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: var(--blue-300);
  transform: scale(0);
  transition: transform 0.6s var(--ease-back);
}
.step.is-active .step__dot { border-color: var(--blue-300); box-shadow: 0 0 0 8px rgba(143, 176, 245, 0.1); }
.step.is-active .step__dot::after { transform: scale(1); }
.step__n {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(3.4rem, 6vw, 5.6rem);
  line-height: 0.9;
  color: transparent;
  -webkit-text-stroke: 1px var(--muted);
  transition: color 0.6s, -webkit-text-stroke-color 0.6s;
}
.step.is-active .step__n { color: var(--blue-300); -webkit-text-stroke-color: transparent; }
.step__t { font-size: clamp(1.1rem, 1.4vw, 1.3rem); font-weight: 450; line-height: 1.4; max-width: 17em; }

/* TEAM */
.team {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 28px);
}
.member {
  position: relative;
  display: grid;
  gap: 20px;
}
.member__portrait {
  position: relative;
  aspect-ratio: 4 / 4.6;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(155deg, var(--ink-3), var(--ink));
  isolation: isolate;
}
.member__portrait::before {
  content: "";
  position: absolute;
  inset: -30%;
  z-index: -1;
  background:
    radial-gradient(40% 40% at var(--mx, 70%) var(--my, 20%), rgba(75, 123, 224, 0.55), transparent 70%),
    radial-gradient(50% 50% at 10% 100%, rgba(143, 176, 245, 0.18), transparent 70%);
  transition: background-position 0.6s;
}
.member__initials {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: clamp(5rem, 11vw, 9.5rem);
  line-height: 1;
  color: var(--white);
  letter-spacing: -0.04em;
  transition: transform 0.9s var(--ease), letter-spacing 0.9s var(--ease);
}
.member__initials i { font-style: italic; color: var(--blue-300); }
.member:hover .member__initials { transform: scale(1.06); letter-spacing: 0.02em; }
.member__portrait img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.member__tag {
  position: absolute;
  left: 16px;
  top: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-inv);
}
.member__name {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.member__name h3 { font-family: var(--font-serif); font-weight: 400; font-size: clamp(1.6rem, 2.2vw, 2.1rem); line-height: 1.1; }
.member__name span { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.member__name:has(.member__role) { display: grid; gap: 6px; justify-content: stretch; }
.member__role { display: grid; gap: 4px; font-size: 15px; font-weight: 500; color: var(--blue); }
.member__role span { font-weight: 400; letter-spacing: 0.02em; }

.team--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.team--4 .member__initials { font-size: clamp(4.5rem, 8vw, 7.5rem); }

/* Payroll: professionisti esterni */
.partners {
  display: grid;
  gap: clamp(28px, 3.4vw, 44px);
  margin-top: clamp(64px, 8vw, 110px);
  padding-top: clamp(40px, 5vw, 64px);
  border-top: 1px solid var(--line);
}
.partners__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px clamp(32px, 6vw, 110px);
  align-items: end;
}
.partners__title { font-family: var(--font-serif); font-weight: 400; font-size: clamp(2rem, 3.6vw, 3.4rem); line-height: 1.04; letter-spacing: -0.01em; }
.partners__title em { font-style: italic; color: var(--blue); }
.partners__head p { color: var(--muted); max-width: 30em; }
.partners__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 1.6vw, 22px); }
.partner {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  min-height: clamp(260px, 26vw, 340px);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease);
}
.partner:hover { transform: translateY(-4px); box-shadow: 0 30px 60px -40px rgba(10, 22, 40, 0.4); }
.partner__photo { position: relative; margin: 0; background: linear-gradient(180deg, #e7e9ee, #ffffff); }
.partner__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 14%; }
.partner__photo--initials {
  display: grid;
  place-items: center;
  background:
    radial-gradient(60% 50% at 70% 20%, rgba(75, 123, 224, 0.45), transparent 70%),
    linear-gradient(155deg, var(--ink-3), var(--ink));
  font-family: var(--font-serif);
  font-size: clamp(3.4rem, 6vw, 5.4rem);
  line-height: 1;
  color: var(--white);
  letter-spacing: -0.03em;
}
.partner__photo--initials i { font-style: italic; color: var(--blue-300); }
.partner__body { display: grid; align-content: end; gap: 8px; padding: clamp(22px, 2.6vw, 34px); }
.partner__tag { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--blue); }
.partner__name { font-family: var(--font-serif); font-weight: 400; font-size: clamp(1.8rem, 2.6vw, 2.5rem); line-height: 1.05; }
.partner__role { font-size: 15px; color: var(--muted); }

/* Pagina privacy */
.hero--legal { min-height: 0; padding-top: calc(var(--header-h) + clamp(60px, 10vw, 140px)); }
.legal {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
  gap: clamp(32px, 6vw, 100px);
  align-items: start;
}
.legal__toc { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 10px; font-size: 15px; }
.legal__toc a { color: var(--muted); border-left: 2px solid var(--line); padding-left: 14px; transition: color 0.3s, border-color 0.3s; }
.legal__toc a:hover { color: var(--blue); border-color: var(--blue); }
.prose { max-width: 70ch; color: var(--muted); font-size: 16.5px; line-height: 1.7; }
.prose h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2rem, 3.4vw, 3rem);
  line-height: 1.05;
  color: var(--text);
  margin: 0 0 24px;
  scroll-margin-top: calc(var(--header-h) + 24px);
}
.prose h2:not(:first-child) { margin-top: 64px; padding-top: 48px; border-top: 1px solid var(--line); }
.prose h3 { font-size: 17px; font-weight: 600; color: var(--text); margin: 32px 0 10px; }
.prose p + p { margin-top: 12px; }
.prose ul { list-style: disc; padding-left: 22px; display: grid; gap: 10px; margin: 12px 0; }
.prose strong { color: var(--text); font-weight: 500; }
.legal__updated { margin-top: 48px !important; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; }

/* Home: persona di riferimento */
.person {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(40px, 7vw, 120px);
  align-items: center;
}
.person__photo {
  position: relative;
  aspect-ratio: 4 / 5;
  max-width: 460px;
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--ink-2);
  box-shadow: 0 40px 80px -50px rgba(10, 22, 40, 0.5);
}
.person__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.person__text { display: grid; gap: 26px; justify-items: start; }
.person__id { display: grid; gap: 6px; padding-top: 22px; border-top: 1px solid var(--line); width: 100%; }
.person__name { font-family: var(--font-serif); font-weight: 400; font-size: clamp(2rem, 3.4vw, 3.1rem); line-height: 1; }
.person__role { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--blue); }
.person__text .body-text { font-size: clamp(1.05rem, 1.25vw, 1.18rem); max-width: 32em; }

/* Servizi: competenze */
.skills { display: grid; gap: 28px; margin-top: clamp(56px, 7vw, 100px); }
.skills__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.skill {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: clamp(22px, 2.6vw, 34px);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transition: background-color 0.4s;
}
.skill:hover { background: var(--white); }
.skill svg { width: 30px; height: 30px; color: var(--blue); margin-bottom: 8px; transition: transform 0.6s var(--ease-back); }
.skill:hover svg { transform: translateY(-3px) rotate(-6deg); }
.skill h3 { font-family: var(--font-serif); font-weight: 400; font-size: clamp(1.4rem, 1.9vw, 1.75rem); line-height: 1.1; }
.skill p { color: var(--muted); font-size: 15px; line-height: 1.55; }

/* elenchi con spunta */
.ticks { display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 30px; font-size: 15.5px; color: var(--text); }
.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--blue-100) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%232553b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>") center / 12px no-repeat;
}

/* Metodo con descrizioni */
.step__d { color: var(--muted); font-size: 15px; line-height: 1.6; max-width: 22em; }

/* CTA con la foto della sede: più luminosa, la foto deve vedersi */
.cta--office::before {
  background:
    radial-gradient(55% 45% at 50% 50%, rgba(10, 22, 40, 0.55), rgba(10, 22, 40, 0) 80%),
    linear-gradient(180deg, rgba(10, 22, 40, 0.5) 0%, rgba(10, 22, 40, 0.2) 45%, rgba(10, 22, 40, 0.75) 100%);
}
.cta--office .cta__bg img { object-position: 50% 40%; }
.cta--office .cta__title,
.cta--office .cta__meta { text-shadow: 0 2px 30px rgba(10, 22, 40, 0.55); }
.cta .credit { top: auto; bottom: 12px; }

/* CTA con foto */
.cta {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding-block: clamp(120px, 16vw, 230px);
  color: var(--white);
  text-align: center;
}
.cta__bg { position: absolute; inset: 0; z-index: -2; }
.cta__bg img { width: 100%; height: 118%; object-fit: cover; margin-top: -9%; will-change: transform; }
.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(10, 22, 40, 0.72) 0%, rgba(10, 22, 40, 0.45) 45%, rgba(10, 22, 40, 0.85) 100%),
    radial-gradient(60% 60% at 50% 50%, rgba(37, 83, 184, 0.25), transparent 70%);
}
.cta__inner { display: grid; justify-items: center; gap: 36px; }
.cta__title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(3rem, 8.4vw, 8.4rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  max-width: 12ch;
}
.cta__title em { font-style: italic; color: var(--blue-300); }
.cta__title--long { max-width: 20ch; font-size: clamp(2.6rem, 6.4vw, 6.6rem); }
.cta__meta { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255, 255, 255, 0.72); }

/* CONTATTI */
.contact {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(48px, 7vw, 120px);
  align-items: start;
}
.contact__info { display: grid; gap: 40px; }
.info-list { display: grid; border-top: 1px solid var(--line); }
.info-list li {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 16px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}
.info-list__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--blue-100);
  color: var(--blue);
}
.info-list__icon svg { width: 19px; height: 19px; }
.info-list dt,
.info-list .k { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.info-list .v { font-family: var(--font-serif); font-size: clamp(1.4rem, 1.9vw, 1.75rem); line-height: 1.2; margin-top: 4px; }
.info-list .v a {
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size 0.5s var(--ease), color 0.3s;
}
.info-list .v a:hover { color: var(--blue); background-size: 100% 1px; }
.mails { display: grid; gap: 12px; margin-top: 8px; }
.mails dt { font-size: 13px; color: var(--muted); }
.mails dd { font-family: var(--font-serif); font-size: clamp(1.2rem, 1.6vw, 1.45rem); line-height: 1.25; overflow-wrap: anywhere; }
.mails a {
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size 0.5s var(--ease), color 0.3s;
}
.mails a:hover { color: var(--blue); background-size: 100% 1px; }
.how__note {
  max-width: 24em;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  font-size: 14.5px;
  color: var(--muted);
}
.how__note a { color: var(--blue-300); border-bottom: 1px solid rgba(143, 176, 245, 0.4); }
.how__note a:hover { border-color: var(--blue-300); }
.how__step .how__mail { display: inline-block; margin-top: 8px; font-size: 14px; color: var(--blue-300); }
.info-list__link {
  display: inline-block;
  margin-top: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--blue);
  border-bottom: 1px solid color-mix(in srgb, var(--blue) 35%, transparent);
  transition: border-color 0.3s;
}
.info-list__link:hover { border-color: var(--blue); }

/* credito immagine (foto da Street View) */
.credit {
  position: absolute;
  right: 12px;
  top: 10px;
  z-index: 2;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(10, 22, 40, 0.45);
  color: rgba(255, 255, 255, 0.8);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.04em;
  pointer-events: none;
}
.about__media--office img { object-position: 44% 50%; }

/* Dove siamo: sedi + striscia del territorio */
.sedi {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(12px, 1.6vw, 22px);
}
.sede {
  position: relative;
  min-height: clamp(380px, 42vw, 580px);
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--white);
  isolation: isolate;
  background: var(--ink-2);
}
.sede img {
  position: absolute;
  inset: -8% 0;
  z-index: -2;
  width: 100%;
  height: 116%;
  object-fit: cover;
}
.sede--main img { object-position: 45% 50%; }
.sede::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(0deg, rgba(10, 22, 40, 0.92) 0%, rgba(10, 22, 40, 0.6) 34%, rgba(10, 22, 40, 0.15) 62%, rgba(10, 22, 40, 0) 82%);
}
.sede__body {
  position: absolute;
  left: clamp(20px, 3vw, 40px);
  right: clamp(20px, 3vw, 40px);
  bottom: clamp(20px, 3vw, 36px);
  display: grid;
  gap: 10px;
  justify-items: start;
}
.sede__k { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--blue-300); }
.sede__t { font-family: var(--font-serif); font-weight: 400; font-size: clamp(2.2rem, 4vw, 3.8rem); line-height: 1; }
.sede__t em { font-style: italic; color: var(--blue-300); }
.sede__a { color: rgba(255, 255, 255, 0.82); font-size: 15px; margin-bottom: 6px; }
.sede .btn--light { --btn-hover: var(--blue-100); }

.strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 1.6vw, 22px);
  margin-top: clamp(12px, 1.6vw, 22px);
}
.strip__item {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--ink-2);
}
.strip__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease);
}
.strip__item:hover img { transform: scale(1.06); }
.strip__item figcaption {
  position: absolute;
  left: 12px;
  bottom: 12px;
  right: 12px;
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(10, 22, 40, 0.6);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--white);
  font-size: 12.5px;
  line-height: 1.3;
}
.menu__foot a { color: var(--white); }

.form-card {
  padding: clamp(26px, 4vw, 56px);
  border-radius: calc(var(--radius) + 6px);
  background: var(--white);
  box-shadow: 0 1px 0 var(--line), 0 40px 80px -50px rgba(10, 22, 40, 0.35);
}
.form-card__title { font-family: var(--font-serif); font-size: clamp(2rem, 3vw, 2.8rem); line-height: 1.05; margin-bottom: 8px; }
.form-card__sub { color: var(--muted); margin-bottom: 32px; font-size: 15.5px; }
.form { display: grid; gap: 18px; }
.form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.field { position: relative; }
.field input,
.field textarea {
  width: 100%;
  padding: 26px 18px 10px;
  border: 1px solid rgba(10, 22, 40, 0.14);
  border-radius: 14px;
  background: #fbfaf7;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  transition: border-color 0.3s, background-color 0.3s, box-shadow 0.3s;
  resize: vertical;
}
.field textarea { min-height: 140px; }
.field label {
  position: absolute;
  left: 19px;
  top: 18px;
  font-size: 15.5px;
  color: var(--muted);
  pointer-events: none;
  transform-origin: 0 0;
  transition: transform 0.35s var(--ease), color 0.3s;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--blue);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(37, 83, 184, 0.12);
}
.field input:focus + label,
.field input:not(:placeholder-shown) + label,
.field textarea:focus + label,
.field textarea:not(:placeholder-shown) + label { transform: translateY(-11px) scale(0.76); color: var(--blue); }
.field.is-invalid input,
.field.is-invalid textarea { border-color: #b3412e; box-shadow: 0 0 0 4px rgba(179, 65, 46, 0.1); }
.field__err { display: block; min-height: 0; margin-top: 6px; font-size: 13px; color: #b3412e; }
.field__err:empty { display: none; }

.topics { border: 0; margin: 0; padding: 0; display: grid; gap: 12px; }
.topics legend { padding: 0; margin-bottom: 10px; font-size: 14px; color: var(--muted); }
.topics__list { display: flex; flex-wrap: wrap; gap: 8px; }
.topic input { position: absolute; opacity: 0; pointer-events: none; }
.topic span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(10, 22, 40, 0.14);
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}
.topic span::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid currentColor;
  transition: background-color 0.3s;
}
.topic:hover span { border-color: var(--blue); }
.topic input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--white); }
.topic input:checked + span::before { background: var(--blue-300); border-color: var(--blue-300); }
.topic input:focus-visible + span { outline: 2px solid var(--blue-400); outline-offset: 2px; }

.check {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  cursor: pointer;
}
.check input {
  appearance: none;
  width: 22px;
  height: 22px;
  margin: 0;
  border: 1px solid rgba(10, 22, 40, 0.25);
  border-radius: 6px;
  background: #fbfaf7;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background-color 0.3s, border-color 0.3s;
}
.check input::after {
  content: "";
  width: 10px;
  height: 6px;
  border-left: 2px solid var(--white);
  border-bottom: 2px solid var(--white);
  transform: translateY(-1px) rotate(-45deg) scale(0);
  transition: transform 0.3s var(--ease-back);
}
.check input:checked { background: var(--blue); border-color: var(--blue); }
.check input:checked::after { transform: translateY(-1px) rotate(-45deg) scale(1); }
.check a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.check.is-invalid input { border-color: #b3412e; }
.form__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 6px; }
.form__note { font-size: 13px; color: var(--muted); }
.form__status { font-size: 14.5px; line-height: 1.5; }
.form__status:empty { display: none; }
.form__status.is-ok { padding: 14px 16px; border-radius: 12px; background: #e9f3ec; color: #1f6b3d; }
.form__status.is-warn { padding: 14px 16px; border-radius: 12px; background: #fdf3e2; color: #7a4d0b; }
.form__status.is-err { padding: 14px 16px; border-radius: 12px; background: #fbe9e6; color: #8f2f1f; }

/* 8. PAGINE INTERNE -------------------------------------------------------- */
.page-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px clamp(40px, 6vw, 110px);
  align-items: end;
}
.page-hero__title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(3.4rem, 10vw, 10.5rem);
  line-height: 0.9;
  letter-spacing: -0.025em;
}
.page-hero__title em { font-style: italic; color: var(--blue-300); }
.page-hero__lead { color: var(--muted-inv); font-size: clamp(1.05rem, 1.3vw, 1.2rem); max-width: 33em; display: grid; gap: 1em; }
.page-hero__grid--stack { grid-template-columns: 1fr; gap: clamp(28px, 3vw, 44px); }
.page-hero__lead--row {
  max-width: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line-inv);
}
.page-hero__lead--row p { max-width: 30em; }

.index-list { display: grid; border-top: 1px solid var(--line-inv); }
.index-list a {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line-inv);
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  transition: padding 0.5s var(--ease), color 0.3s;
}
.index-list a span:first-child { font-family: var(--font-mono); font-size: 12px; color: var(--blue-300); }
.index-list a svg { width: 16px; height: 16px; transform: rotate(90deg); opacity: 0.5; transition: opacity 0.3s, transform 0.5s var(--ease); }
.index-list a:hover { padding-left: 10px; color: var(--blue-300); }
.index-list a:hover svg { opacity: 1; transform: rotate(90deg) translateX(3px); }

/* Blocchi servizio (pagina Servizi) */
.svc-block {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  gap: clamp(40px, 7vw, 120px);
  align-items: center;
  padding-block: clamp(64px, 9vw, 130px);
  border-top: 1px solid var(--line);
}
.svc-block:nth-child(even) .svc-block__visual { order: -1; }
.svc-block__text { display: grid; gap: 26px; justify-items: start; }
.svc-block__num {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(4.5rem, 9vw, 8rem);
  line-height: 0.8;
  color: transparent;
  -webkit-text-stroke: 1px var(--blue);
}
.svc-block__text .body-text { font-size: clamp(1.05rem, 1.25vw, 1.18rem); max-width: 32em; }
.svc-block .h2 { font-size: clamp(2.4rem, 4.6vw, 4.4rem); }
.svc-list { padding-top: clamp(24px, 4vw, 60px); }
.hero--short { min-height: min(78svh, 760px); }
.wide-media { aspect-ratio: 21 / 8; margin-top: clamp(64px, 8vw, 110px); }
.svc-block__visual {
  aspect-ratio: 4 / 3.2;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 1px 0 var(--line), 0 40px 80px -50px rgba(10, 22, 40, 0.4);
  overflow: hidden;
}
.dd-types { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; width: 100%; max-width: 32em; }
.dd-types li { padding: 18px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: rgba(255, 255, 255, 0.5); }
.dd-types b { display: block; font-family: var(--font-serif); font-weight: 400; font-size: 1.35rem; line-height: 1.15; }
.dd-types span { font-size: 13.5px; color: var(--muted); }

/* Payroll — perché sceglierci (bento) */
.bento {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(12px, 1.4vw, 20px);
}
.bento__card {
  position: relative;
  grid-column: span 2;
  display: grid;
  align-content: space-between;
  gap: 48px;
  min-height: 340px;
  padding: clamp(24px, 2.6vw, 36px);
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--line);
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease);
}
.bento__card:nth-child(1),
.bento__card:nth-child(2) { grid-column: span 3; }
.bento__card::before {
  /* luce che segue il cursore */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgba(37, 83, 184, 0.1), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s;
}
.bento__card:hover { transform: translateY(-4px); box-shadow: 0 30px 60px -40px rgba(10, 22, 40, 0.4); }
.bento__card:hover::before { opacity: 1; }
.bento__card--dark { background: var(--ink); color: var(--white); border-color: transparent; }
.bento__card--dark::before { background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgba(143, 176, 245, 0.2), transparent 60%); }
.bento__card--dark p { color: var(--muted-inv) !important; }
.bento__card--blue { background: var(--blue); color: var(--white); border-color: transparent; }
.bento__card--blue p { color: rgba(255, 255, 255, 0.8) !important; }
.bento__card--blue .bento__icon { background: rgba(255, 255, 255, 0.14); color: var(--white); }
.bento__card--dark .bento__icon { background: rgba(143, 176, 245, 0.14); color: var(--blue-300); }
.bento__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.bento__icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--blue-100);
  color: var(--blue);
  transition: transform 0.6s var(--ease-back);
}
.bento__card:hover .bento__icon { transform: rotate(-8deg) scale(1.06); }
.bento__icon svg { width: 26px; height: 26px; }
.bento__n { font-family: var(--font-mono); font-size: 12px; opacity: 0.6; }
.bento__card h3 { font-family: var(--font-serif); font-weight: 400; font-size: clamp(1.6rem, 2.3vw, 2.2rem); line-height: 1.08; margin-bottom: 14px; max-width: 16ch; }
.bento__card p { color: var(--muted); font-size: 15.5px; line-height: 1.6; max-width: 36em; }

/* Payroll — come funziona (timeline verticale) */
.how {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(40px, 7vw, 120px);
  align-items: start;
}
.how__aside { position: sticky; top: calc(var(--header-h) + 40px); display: grid; gap: 28px; justify-items: start; }
.how__list { --p: 0; position: relative; display: grid; }
.how__list::before,
.how__list::after {
  content: "";
  position: absolute;
  left: 27px;
  top: 60px;
  bottom: 60px;
  width: 1px;
  background: var(--line);
}
.how__list::after {
  background: linear-gradient(180deg, var(--blue-300), var(--blue-400));
  transform-origin: 50% 0;
  transform: scaleY(var(--p));
}
.how__step {
  position: relative;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: clamp(20px, 3vw, 40px);
  padding-block: clamp(28px, 3.4vw, 44px);
}
.how__dot {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--ink);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
  transition: background-color 0.5s, color 0.5s, border-color 0.5s, transform 0.6s var(--ease-back);
}
.how__step.is-active .how__dot { background: var(--blue-300); border-color: var(--blue-300); color: var(--ink); transform: scale(1.06); }
.how__step h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  line-height: 1.05;
  margin-bottom: 10px;
  opacity: 0.45;
  transition: opacity 0.6s;
}
.how__step p { color: var(--muted); max-width: 30em; opacity: 0.45; transition: opacity 0.6s; }
.how__step.is-active h3,
.how__step.is-active p { opacity: 1; }

/* Contatti — banda città */
.city {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--radius) + 8px);
  aspect-ratio: 21 / 9;
  color: var(--white);
  isolation: isolate;
}
.city img { position: absolute; inset: -8% 0; width: 100%; height: 116%; object-fit: cover; z-index: -2; }
.city::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(10, 22, 40, 0.75), rgba(10, 22, 40, 0.1)); }
.city__txt { position: absolute; left: clamp(22px, 4vw, 56px); bottom: clamp(22px, 4vw, 56px); display: grid; gap: 10px; }
.city__txt strong { font-family: var(--font-serif); font-weight: 400; font-size: clamp(2.2rem, 5vw, 4.6rem); line-height: 1; }
.city__txt span { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255, 255, 255, 0.75); }

/* 9. FOOTER ---------------------------------------------------------------- */
.footer {
  position: relative;
  overflow: hidden;
  padding-top: clamp(80px, 10vw, 140px);
  background: var(--ink);
  color: var(--white);
}
.footer__top {
  display: grid;
  grid-template-columns: minmax(0, 5fr) repeat(3, minmax(0, 2.4fr));
  gap: 48px clamp(24px, 4vw, 64px);
  padding-bottom: clamp(56px, 7vw, 96px);
}
.footer__claim { font-family: var(--font-serif); font-size: clamp(1.8rem, 2.6vw, 2.5rem); line-height: 1.1; margin-top: 28px; max-width: 14ch; }
.footer__claim em { font-style: italic; color: var(--blue-300); }
.footer h4 {
  margin-bottom: 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-inv);
}
.footer__list { display: grid; gap: 10px; font-size: 15.5px; overflow-wrap: anywhere; }
.info-list .v,
.menu__foot { overflow-wrap: anywhere; }
.footer__list a { position: relative; opacity: 0.9; transition: opacity 0.3s, color 0.3s; }
.footer__list a:hover { opacity: 1; color: var(--blue-300); }
.footer__list .muted { color: var(--muted-inv); }
.footer__word {
  display: block;
  font-family: var(--font-serif);
  font-size: clamp(4.5rem, 19.5vw, 22rem);
  line-height: 0.78;
  letter-spacing: -0.035em;
  white-space: nowrap;
  text-align: center;
  color: transparent;
  background: linear-gradient(180deg, rgba(143, 176, 245, 0.62) 0%, rgba(75, 123, 224, 0.28) 55%, rgba(75, 123, 224, 0.04) 92%);
  -webkit-background-clip: text;
  background-clip: text;
  user-select: none;
  transform: translateY(var(--wy, 18%));
}
.footer__word em { font-style: italic; }
.footer__bottom {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 32px;
  padding-block: 26px;
  border-top: 1px solid var(--line-inv);
  font-size: 13px;
  color: var(--muted-inv);
}
.footer__legal { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer__legal a:hover { color: var(--white); }
.to-top {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
}
.to-top span {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line-inv);
  transition: background-color 0.4s, color 0.4s, transform 0.5s var(--ease);
}
.to-top svg { width: 14px; height: 14px; transform: rotate(-90deg); }
.to-top:hover span { background: var(--white); color: var(--ink); transform: translateY(-3px); }

/* Transizione tra pagine */
.pt { position: fixed; inset: 0; z-index: 300; pointer-events: none; }
.pt__panel {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--white);
  transform: translateY(100%);
}
.pt__panel::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: 12vh;
  background: var(--ink);
  border-radius: 0 0 50% 50% / 0 0 100% 100%;
  transform: scaleY(-1);
  transform-origin: bottom;
}
.pt__brand { display: grid; justify-items: center; gap: 18px; opacity: 0; transition: opacity 0.4s; }
.pt__brand .brand__mark { width: 50px; height: 62px; font-size: 66px; }
.pt__brand .brand__mark span:last-child { left: 18px; top: 8px; color: var(--blue-300); }
.pt__bar { width: 120px; height: 1px; background: var(--line-inv); overflow: hidden; }
.pt__bar::after { content: ""; display: block; height: 100%; background: var(--blue-300); transform-origin: 0 50%; transform: scaleX(0); }
.pt__name { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--muted-inv); }

html.pt-cover .pt__panel { transform: none; animation: pt-safety 0.9s var(--ease-io) 3.2s forwards; }
html.pt-cover .pt__brand { opacity: 1; }
html.pt-first .pt__bar::after { animation: pt-bar 0.9s var(--ease-io) 0.1s forwards; }
html.pt-reveal .pt__panel { transform: translateY(-100%); transition: transform 1s var(--ease-io); }
html.pt-reveal .pt__panel::after { transform: scaleY(1); top: 100%; bottom: auto; transform-origin: top; }
html.pt-leave .pt__panel { transform: none; transition: transform 0.7s var(--ease-io); pointer-events: all; }
html.pt-leave .pt__brand { opacity: 1; transition-delay: 0.35s; }
@keyframes pt-safety { to { transform: translateY(-100%); } }
@keyframes pt-bar { to { transform: scaleX(1); } }

/* 10. MOTION --------------------------------------------------------------- */
/* Le animazioni partono solo se JS è attivo: senza JS il contenuto è visibile. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 1s var(--ease), transform 1.2s var(--ease);
  transition-delay: var(--d, 0s);
}
.js [data-reveal="fade"] { transform: none; }
.js [data-reveal="scale"] { transform: scale(0.94); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

.js [data-reveal="clip"] {
  opacity: 1;
  transform: none;
  clip-path: inset(100% 0 0 0 round var(--radius));
  transition: clip-path 1.4s var(--ease-io);
  transition-delay: var(--d, 0s);
}
.js [data-reveal="clip"].is-in { clip-path: inset(0 0 0 0 round var(--radius)); }
.js [data-reveal="clip"] img { transition: scale 1.8s var(--ease); scale: 1.25; }
.js [data-reveal="clip"].is-in img { scale: 1; }

/* testo diviso in parole con maschera */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0 0.06em 0.12em; margin: 0 -0.06em -0.12em; }
.wi { display: inline-block; }
.js [data-split] .wi {
  transform: translateY(108%) rotate(4deg);
  transform-origin: 0 100%;
  transition: transform 1.2s var(--ease);
  transition-delay: calc(var(--d, 0s) + var(--i) * 0.055s);
}
.js [data-split].is-in .wi { transform: none; }

/* linea che si disegna */
.js [data-line] { transform: scaleX(0); transform-origin: 0 50%; transition: transform 1.4s var(--ease-io) var(--d, 0s); }
.js [data-line].is-in { transform: none; }

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0s !important;
  }
  .marquee__track { animation: none; }
  .js [data-reveal],
  .js [data-split] .wi,
  .js [data-line] { opacity: 1 !important; transform: none !important; clip-path: none !important; }
  .js [data-reveal="clip"] img { scale: 1; }
}

/* RESPONSIVE --------------------------------------------------------------- */
@media (max-width: 1180px) {
  .nav a { padding: 10px 10px; }
  .nav a::after { left: 10px; right: 10px; }
  .footer__top { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 1024px) {
  /* Telefono e tablet: niente scorrimento laterale (anche su iPhone, che ignora overflow-x: clip
     sulle versioni meno recenti). Qui non ci sono elementi sticky, quindi hidden è sicuro. */
  html,
  body { overflow-x: hidden; max-width: 100%; }
  html { overscroll-behavior-x: none; touch-action: pan-y pinch-zoom; }
  :root { --header-h: 74px; }
  .nav,
  .header__cta { display: none; }
  .burger { display: block; }
  .services { grid-template-columns: 1fr; }
  .services__aside { position: static; }
  .services__visual { display: none; }
  .acc__body .illo-inline {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: var(--radius-sm);
    background: var(--white);
    box-shadow: 0 1px 0 var(--line);
    overflow: hidden;
  }
  .how { grid-template-columns: 1fr; }
  .how__aside { position: static; }
  .team--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bento__card,
  .bento__card:nth-child(1),
  .bento__card:nth-child(2) { grid-column: span 3; }
  .bento__card:nth-child(5) { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  body { font-size: 16.5px; }
  .section-head,
  .method__intro,
  .page-hero__grid,
  .about__grid,
  .split,
  .contact,
  .svc-block { grid-template-columns: 1fr; }
  .svc-block:nth-child(even) .svc-block__visual { order: 0; }
  .about__media { aspect-ratio: 4 / 3.4; }
  .steps { grid-template-columns: 1fr; gap: 40px; padding-top: 0; padding-left: 52px; }
  .steps::before,
  .steps::after { left: 11px; right: auto; top: 0; bottom: 0; width: 1px; height: auto; }
  .steps::after { transform-origin: 50% 0; transform: scaleY(var(--p)); background: linear-gradient(180deg, var(--blue-300), var(--white)); }
  .step__dot { top: 4px; left: -52px; }
  .team { grid-template-columns: 1fr; max-width: 460px; }
  .sedi { grid-template-columns: 1fr; }
  .person { grid-template-columns: 1fr; }
  .legal { grid-template-columns: 1fr; }
  .legal__toc { position: static; display: flex; flex-wrap: wrap; gap: 8px 20px; }
  .team.team--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: none; gap: 14px; }
  .team--4 .member__portrait { aspect-ratio: 1; }
  .team--4 .member__initials { font-size: clamp(3.2rem, 14vw, 5rem); }
  .team--4 .member__name h3 { font-size: 1.35rem; }
  .team--4 .member__role { font-size: 13.5px; }
  .partners__head { grid-template-columns: 1fr; }
  .partners__list { grid-template-columns: 1fr; }
  .person__photo { max-width: 420px; }
  .skills__grid { grid-template-columns: 1fr 1fr; }
  .sede { min-height: 420px; }
  .strip { grid-template-columns: 1fr 1fr; }
  .strip li:last-child { grid-column: 1 / -1; }
  .strip li:last-child .strip__item { aspect-ratio: 16 / 9; }
  .member__portrait { aspect-ratio: 4 / 3; }
  .hero__foot .hero__meta { display: none; }
  .city { aspect-ratio: 4 / 3; }
  .payslip__float--a { right: 0; }
  .payslip__float--b { left: 0; }
}

@media (max-width: 640px) {
  .hero { padding-bottom: 20px; }
  .hero__title { font-size: clamp(2.9rem, 13.2vw, 4.4rem); }
  .btn { height: 54px; font-size: 15px; }
  .hero__actions { width: 100%; }
  .hero__actions .btn { flex: 1 1 auto; justify-content: space-between; }
  .form__row { grid-template-columns: 1fr; }
  .bento { grid-template-columns: 1fr; }
  .bento__card,
  .bento__card:nth-child(n) { grid-column: 1 / -1; min-height: 0; }
  .acc__head { grid-template-columns: 40px minmax(0, 1fr) 44px; }
  .acc__toggle { width: 44px; height: 44px; }
  .acc__body { padding-left: 0; }
  .payslip__meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .payslip__head strong { font-size: 22px; }
  .payslip__meta div:last-child { display: none; }
  .payslip__float { display: none; }
  .keys li { grid-template-columns: 40px 1fr auto; }
  .footer__top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__top > div:last-child { grid-column: 1 / -1; }
  .dd-types { grid-template-columns: 1fr; }
  .skills__grid { grid-template-columns: 1fr; }
  .partner { grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); min-height: 220px; }
  .team--4 .member__tag { font-size: 9.5px; left: 12px; top: 12px; }
  .how__list::before,
  .how__list::after { left: 23px; }
  .how__dot { width: 48px; height: 48px; }
  .how__step { grid-template-columns: 48px minmax(0, 1fr); }
}
