/* ==========================================================================
   DETA Assicurazioni SA: foglio di stile
   Struttura: font, variabili, base, componenti, intestazione, pagine,
   piè di pagina, movimento, responsive, stampa
   ========================================================================== */

/* ---------- Font (Inter, ospitato in locale: nessuna richiesta a terzi) ---------- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-var.woff2") format("woff2-variations"),
       url("../fonts/inter-latin-var.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-ext-var.woff2") format("woff2-variations"),
       url("../fonts/inter-latin-ext-var.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Variabili ---------- */
:root {
  /* colori del marchio (dal logo DETA 2026) */
  --red: #F14555;
  --red-ink: #D0293F;      /* rosso per testi piccoli: contrasto AA su bianco */
  --red-deep: #D22E43;     /* riempimento dei pulsanti al passaggio del mouse */
  --red-soft: #FDEEF0;
  --ink: #1F1B1D;
  --ink-2: #4A4648;
  --muted: #6E696C;
  --line: #E7E5E9;
  --line-strong: #D6D3D8;
  --card: #F4F3F6;
  --bg: #FFFFFF;
  --bg-2: #F8F7F9;
  --dark: #171415;

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --container: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 76px;
  --section: clamp(88px, 11vw, 152px);

  --r-xl: clamp(28px, 3vw, 40px);
  --r-lg: 28px;
  --r: 22px;
  --r-sm: 14px;

  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);

  --shadow-sm: 0 1px 2px rgba(23, 20, 21, .05), 0 2px 8px rgba(23, 20, 21, .04);
  --shadow-md: 0 2px 4px rgba(23, 20, 21, .04), 0 12px 32px rgba(23, 20, 21, .08);
  --shadow-lg: 0 4px 10px rgba(23, 20, 21, .04), 0 28px 70px rgba(23, 20, 21, .12);
}

/* ---------- 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);
  background: var(--bg);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink-2);
  background: transparent;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
a, button, summary, label { -webkit-tap-highlight-color: transparent; }
a[href^="tel:"] { white-space: nowrap; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
ul, ol { list-style: none; margin: 0; padding: 0; }
p, figure, blockquote, address { margin: 0; }
address { font-style: normal; }
h1, h2, h3, h4 { margin: 0; color: var(--ink); font-weight: 700; letter-spacing: -.03em; line-height: 1.05; text-wrap: balance; overflow-wrap: break-word; }
:lang(de) h1, :lang(de) h2, :lang(de) h3, :lang(de) .statement, :lang(de) .epoca-title, :lang(de) .cta-title { -webkit-hyphens: auto; hyphens: auto; }
em { font-style: normal; }
[hidden] { display: none !important; }

::selection { background: var(--red); color: #fff; }

:focus-visible { outline: 2.5px solid var(--red); outline-offset: 3px; border-radius: 8px; }
[tabindex="-1"]:focus { outline: 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;
}

.skip-link {
  position: fixed; top: 12px; left: 12px; z-index: 100;
  padding: 12px 18px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 600;
  transform: translateY(-160%); transition: transform .3s var(--ease);
}
.skip-link:focus { transform: none; }

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.icon { width: 1.25em; height: 1.25em; flex: none; }

/* Lenis (scorrimento fluido) */
html.lenis, html.lenis body { height: auto; }

/* Filigrana: il motivo a spirali del sito precedente, molto leggero e fisso dietro ai contenuti
   (se si cambia l'immagine, aumentare il numero dopo "?v=": così i browser non mostrano più quella vecchia) */
body::before {
  content: ""; position: fixed; z-index: -1; left: 0; top: 0; width: 100%; height: 100vh; height: 100lvh;
  background: url("../img/filigrana.webp?v=2") center / cover no-repeat;
  opacity: var(--wm, .06); pointer-events: none;
}
@media print { body::before { display: none; } }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: clip; }

/* ---------- Tipografia ---------- */
.display {
  font-size: clamp(3.1rem, 7.6vw, 6.75rem);
  font-weight: 760;
  letter-spacing: -.048em;
  line-height: .95;
}
.h1 {
  font-size: clamp(2.45rem, 5.4vw, 4.9rem);
  font-weight: 745;
  letter-spacing: -.046em;
  line-height: .99;
}
.h2 {
  font-size: clamp(2.2rem, 4.6vw, 4.1rem);
  font-weight: 730;
  letter-spacing: -.042em;
  line-height: 1;
}
.lead {
  font-size: clamp(1.125rem, 1.45vw, 1.3125rem);
  line-height: 1.55;
  color: var(--ink-2);
  text-wrap: pretty;
}
.accent { color: var(--red); }

.eyebrow {
  display: inline-flex; align-items: center; gap: .6em;
  margin-bottom: 22px;
  font-size: .9375rem; font-weight: 550; letter-spacing: -.005em; line-height: 1.2;
  color: var(--muted);
}
.eyebrow::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--red); }
.eyebrow .num { color: var(--red-ink); font-weight: 650; font-variant-numeric: tabular-nums; }
.eyebrow-light { color: rgba(255, 255, 255, .9); }
.eyebrow-light::before { background: #fff; }

/* ---------- Pulsanti ---------- */
.btn {
  --btn-bg: var(--ink);
  --btn-fg: #fff;
  --btn-fill: var(--red-deep);
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  height: 52px; padding: 0 1.5em;
  border-radius: 999px;
  background: var(--btn-bg); color: var(--btn-fg);
  font-weight: 600; font-size: 1rem; letter-spacing: -.01em; white-space: nowrap;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), color .3s;
  -webkit-tap-highlight-color: transparent;
}
.btn::before {
  content: ""; position: absolute; inset: -1px; z-index: -1; border-radius: inherit;
  background: var(--btn-fill);
  transform: translateY(102%); transition: transform .6s var(--ease);
}
.btn:hover::before, .btn:focus-visible::before { transform: translateY(0); }
.btn .icon { width: 1.15em; height: 1.15em; transition: transform .5s var(--ease); }
.btn:hover .icon { transform: translateX(3px); }
.btn:active { transform: scale(.97); }
.btn-sm { height: 44px; padding: 0 1.15em; font-size: .9375rem; }
.btn-lg { height: 58px; padding: 0 1.75em; font-size: 1.0625rem; }
.btn-block { width: 100%; }
.btn-light { --btn-bg: #fff; --btn-fg: var(--ink); --btn-fill: var(--card); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-dark { --btn-bg: var(--ink); }

.magnetic { will-change: transform; }

/* pulsante video nell'hero */
.btn-play { display: inline-flex; align-items: center; gap: 14px; height: 58px; padding-right: 8px; font-weight: 600; color: var(--ink); }
.btn-play-icon {
  position: relative; display: grid; place-items: center;
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--red-soft); color: var(--red-ink);
  transition: transform .5s var(--ease), background-color .3s, color .3s;
}
.btn-play-icon::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 1.5px solid var(--red); opacity: 0; transform: scale(.8);
  transition: transform .6s var(--ease), opacity .6s;
}
.btn-play-icon .icon { width: 18px; height: 18px; margin-left: 2px; }
.btn-play-text small { margin-left: .35em; font-size: .875em; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.btn-play:hover .btn-play-icon { transform: scale(1.06); background: var(--red); color: #fff; }
.btn-play:hover .btn-play-icon::after { opacity: .35; transform: scale(1.3); }

/* link testuali con freccia */
.card-link {
  display: inline-flex; align-items: center; gap: .45em;
  font-weight: 600; font-size: .9375rem; color: var(--ink);
}
.card-link .icon { width: 1.05em; height: 1.05em; transition: transform .45s var(--ease); }
.card-link:hover .icon { transform: translateX(4px); }
.card-link > span:first-child { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat; transition: background-size .45s var(--ease); }
.card-link:hover > span:first-child { background-size: 100% 1.5px; }

/* menu a comparsa (lingua del sito e del video) */
@keyframes popIn { from { opacity: 0; transform: translateY(-6px) scale(.97); } to { opacity: 1; transform: none; } }
.pop-list {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 5;
  min-width: 210px; padding: 6px; border-radius: 18px;
  background: #fff; box-shadow: 0 0 0 1px var(--line), var(--shadow-lg);
  transform-origin: 100% 0; animation: popIn .4s var(--ease);
}

/* ---------- Intestazione (sempre visibile) ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  height: var(--header-h);
  transition: background-color .35s, box-shadow .35s, backdrop-filter .35s;
  view-transition-name: site-header;
}
.site-header.is-scrolled {
  background: rgba(255, 255, 255, .86);
  -webkit-backdrop-filter: saturate(1.8) blur(18px);
  backdrop-filter: saturate(1.8) blur(18px);
  box-shadow: 0 1px 0 rgba(23, 20, 21, .07);
}
/* tre colonne: logo a sinistra, menu esattamente al centro della pagina, pulsanti a destra */
.header-inner { height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; column-gap: 24px; }

.brand { display: block; justify-self: start; color: var(--ink); }
.brand .logo { width: auto; height: 40px; transition: transform .5s var(--ease); }
.brand:hover .logo { transform: scale(1.03); }

.nav { justify-self: center; }
.nav ul { display: flex; gap: 2px; }
.nav a {
  position: relative; display: block; padding: 10px 12px; border-radius: 999px;
  font-size: .9688rem; font-weight: 550; color: var(--ink-2); white-space: nowrap;
  transition: color .25s, background-color .25s;
}
.nav a:hover { color: var(--ink); background: rgba(23, 20, 21, .045); }
.nav a::after {
  content: ""; position: absolute; left: 50%; bottom: 3px; width: 4px; height: 4px; margin-left: -2px;
  border-radius: 50%; background: var(--red);
  transform: scale(0); transition: transform .45s var(--ease);
}
.nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"]::after { transform: scale(1); }

.header-actions { display: flex; align-items: center; justify-self: end; gap: 8px; }

/* badge FINMA: sempre visibile, porta al registro ufficiale */
.finma-badge {
  display: inline-flex; align-items: center; gap: 9px;
  height: 46px; padding: 0 16px 0 11px; border-radius: 999px;
  background: var(--card); color: var(--ink);
  transition: background-color .3s, box-shadow .3s;
}
.finma-badge .icon { width: 22px; height: 22px; color: var(--red-ink); transition: transform .5s var(--ease); }
.finma-badge-text { display: grid; line-height: 1.12; }
.finma-badge-text small { font-size: .6875rem; font-weight: 600; letter-spacing: .01em; color: var(--muted); }
.finma-badge-text strong { font-size: .875rem; font-weight: 680; letter-spacing: .02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.finma-short { display: none; }
.finma-badge:hover { background: #fff; box-shadow: 0 0 0 1.5px var(--line), var(--shadow-sm); }
.finma-badge:hover .icon { transform: rotate(-8deg) scale(1.08); }

/* scelta della lingua */
.lang { position: relative; }
.lang > summary {
  display: inline-flex; align-items: center; gap: 4px; height: 46px; padding: 0 10px 0 14px; border-radius: 999px;
  font-weight: 650; font-size: .9375rem; color: var(--ink); cursor: pointer; list-style: none;
  transition: background-color .25s;
}
.lang > summary::-webkit-details-marker { display: none; }
.lang > summary::marker { content: ""; }
.lang > summary:hover, .lang[open] > summary { background: rgba(23, 20, 21, .05); }
.lang > summary .icon { width: 16px; height: 16px; transition: transform .45s var(--ease); }
.lang[open] > summary .icon { transform: rotate(180deg); }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 5;
  min-width: 200px; padding: 6px; border-radius: 18px;
  background: #fff; box-shadow: 0 0 0 1px var(--line), var(--shadow-lg);
  transform-origin: 100% 0; animation: popIn .4s var(--ease);
}
.lang-menu a {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 11px 12px; border-radius: 12px; font-weight: 560; color: var(--ink-2);
  transition: background-color .2s, color .2s;
}
.lang-menu a:hover { background: var(--card); color: var(--ink); }
.lang-menu small { font-size: .75rem; font-weight: 650; letter-spacing: .04em; color: var(--muted); }
.lang-menu a[aria-current="true"] { color: var(--ink); font-weight: 650; }
.lang-menu a[aria-current="true"] small { color: var(--red-ink); }

.header-cta[aria-current="page"] { --btn-bg: var(--red-deep); }

.scroll-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; overflow: hidden; pointer-events: none; }
.scroll-progress span { display: block; height: 100%; background: var(--red); transform-origin: 0 50%; transform: scaleX(0); }

.menu-toggle { display: none; position: relative; width: 46px; height: 46px; border-radius: 50%; background: var(--card); flex: none; }
.menu-toggle-lines { position: absolute; left: 50%; top: 50%; width: 18px; height: 10px; margin: -5px 0 0 -9px; }
.menu-toggle-lines span {
  position: absolute; left: 0; right: 0; height: 2px; border-radius: 2px; background: var(--ink);
  transition: transform .5s var(--ease), top .5s var(--ease);
}
.menu-toggle-lines span:first-child { top: 0; }
.menu-toggle-lines span:last-child { top: 8px; }
.menu-open .menu-toggle-lines span:first-child { top: 4px; transform: rotate(45deg); }
.menu-open .menu-toggle-lines span:last-child { top: 4px; transform: rotate(-45deg); }

/* menu mobile */
.menu-mobile {
  position: fixed; inset: 0; z-index: 45;
  background: var(--bg);
  padding-top: calc(var(--header-h) + 8px);
  clip-path: inset(0 0 100% 0);
  transition: clip-path .7s var(--ease);
  overflow-y: auto;
}
.menu-open .menu-mobile { clip-path: inset(0 0 0 0); }
.menu-open .site-header { background: var(--bg); box-shadow: none; }
.menu-mobile-inner { display: flex; flex-direction: column; justify-content: space-between; min-height: calc(100svh - var(--header-h) - 8px); padding-bottom: 32px; }
.menu-mobile-links a {
  display: flex; align-items: baseline; gap: 14px; padding: 10px 0;
  font-size: clamp(2.1rem, 9.5vw, 3rem); font-weight: 720; letter-spacing: -.045em; line-height: 1.1; color: var(--ink);
  border-bottom: 1px solid var(--line);
  opacity: 0; transform: translateY(24px);
  transition: opacity .5s var(--ease), transform .7s var(--ease), color .2s;
}
.menu-mobile-links a span { font-size: .875rem; font-weight: 600; letter-spacing: 0; color: var(--red-ink); font-variant-numeric: tabular-nums; }
.menu-mobile-links a[aria-current="page"] { color: var(--red-ink); }
.menu-mobile-links a:active { color: var(--red); }
.menu-open .menu-mobile-links a { opacity: 1; transform: none; }
.menu-open .menu-mobile-links li:nth-child(1) a { transition-delay: .12s; }
.menu-open .menu-mobile-links li:nth-child(2) a { transition-delay: .17s; }
.menu-open .menu-mobile-links li:nth-child(3) a { transition-delay: .22s; }
.menu-open .menu-mobile-links li:nth-child(4) a { transition-delay: .27s; }
.menu-open .menu-mobile-links li:nth-child(5) a { transition-delay: .32s; }
.menu-open .menu-mobile-links li:nth-child(6) a { transition-delay: .37s; }
.menu-mobile-foot { display: grid; gap: 14px; margin-top: 36px; color: var(--muted); font-size: .9375rem; }
.menu-mobile-foot .btn { width: 100%; }
.menu-mobile-mail { font-weight: 600; color: var(--ink); font-size: 1.0625rem; }
.menu-mobile-langs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 6px; }
.menu-mobile-langs a {
  display: grid; place-items: center; height: 46px; border-radius: 999px;
  background: var(--card); font-weight: 650; color: var(--ink-2); letter-spacing: .02em;
  transition: background-color .25s, color .25s;
}
.menu-mobile-langs a[aria-current="true"] { background: var(--ink); color: #fff; }

/* ---------- Sezioni: struttura comune ---------- */
section { position: relative; }
.section-head { margin-bottom: clamp(48px, 6vw, 80px); }
.section-head-split { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(24px, 5vw, 80px); align-items: end; }
.section-head-split .lead { max-width: 34em; }
.section-head-center { text-align: center; max-width: 820px; margin-inline: auto; }
.section-head-center .eyebrow { justify-content: center; }
.section-head-center .lead { margin-top: 24px; }

/* intestazione delle pagine interne */
.page-hero { padding: calc(var(--header-h) + clamp(56px, 8vw, 120px)) 0 clamp(40px, 5vw, 72px); overflow: hidden; }
.page-hero::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  width: 60vmax; height: 60vmax; right: -26vmax; top: -34vmax;
  background: radial-gradient(closest-side, rgba(241, 69, 85, .06), rgba(241, 69, 85, 0));
}
.page-hero .section-head { margin-bottom: 0; }
.page-hero .h1 { max-width: 13.5em; }
.page-hero-prose .lead { margin-top: 24px; max-width: 36em; }
.page-top { padding-top: calc(var(--header-h) + clamp(48px, 7vw, 104px)) !important; }

/* ---------- Home: hero ---------- */
.hero {
  min-height: min(100svh, 980px);
  display: flex; align-items: center;
  padding: calc(var(--header-h) + clamp(32px, 6vw, 72px)) 0 clamp(40px, 6vw, 88px);
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  width: 70vmax; height: 70vmax; right: -28vmax; top: -30vmax;
  background: radial-gradient(closest-side, rgba(241, 69, 85, .07), rgba(241, 69, 85, 0));
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  margin-bottom: 28px; padding: 8px 16px 8px 12px; border-radius: 999px;
  background: var(--card); font-size: .9375rem; font-weight: 550; color: var(--ink-2);
}
.live-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
.live-dot::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--red);
  animation: ping 2.4s var(--ease-out) infinite;
}
@keyframes ping { 0% { transform: scale(1); opacity: .55; } 80%, 100% { transform: scale(3.2); opacity: 0; } }

.hero-lead { margin-top: clamp(24px, 3vw, 34px); max-width: 33em; }
.hero-ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: clamp(30px, 3.5vw, 44px); }

.hero-visual { position: relative; width: 100%; max-width: 580px; justify-self: end; }

/* apertura: il mosaico degli uffici.
   All'inizio cinque foto compaiono una alla volta dietro tende colorate; poi, a turno, una foto si allarga
   e le altre restano come strisce attorno. Ogni 5 secondi il mosaico si ricompone attorno alla foto
   successiva e le strisce cambiano foto mentre sono piccole (15 foto, poi si ricomincia dall'ufficio di
   Luca Decarli). Le misure dipendono dall'attributo data-focus: c = centro, w = sinistra, n = alto,
   e = destra, s = basso, 0 = disposizione iniziale. --hs-s è la larghezza delle strisce.
   Senza JavaScript, o con "riduci movimento", il mosaico resta fermo con l'ufficio di consulenza al centro. */
.hero-stage {
  --hs-gap: 10px; --hs-r: 16px; --hs-s: .13;
  --hs-big: calc(1 - 2 * var(--hs-s)); --hs-half: calc((1 - var(--hs-s)) / 2);
  --a1: var(--hs-s); --a2: var(--hs-big); --a3: var(--hs-s);
  --b1: var(--hs-s); --b2: var(--hs-big); --b3: var(--hs-s);
  position: relative; width: 100%; margin: 0;
  aspect-ratio: 5 / 6; max-height: calc(100svh - var(--header-h) - 120px); min-height: 440px;
}
.hero-stage[data-focus="0"] { --a1: .2778; --a2: .4444; --a3: .2778; --b1: .2778; --b2: .4444; --b3: .2778; }
.hero-stage[data-focus="w"] { --a1: var(--hs-big); --a2: var(--hs-s); --a3: var(--hs-s); --b1: var(--hs-s); --b2: var(--hs-half); --b3: var(--hs-half); }
.hero-stage[data-focus="n"] { --a1: var(--hs-half); --a2: var(--hs-half); --a3: var(--hs-s); --b1: var(--hs-big); --b2: var(--hs-s); --b3: var(--hs-s); }
.hero-stage[data-focus="e"] { --a1: var(--hs-s); --a2: var(--hs-s); --a3: var(--hs-big); --b1: var(--hs-half); --b2: var(--hs-half); --b3: var(--hs-s); }
.hero-stage[data-focus="s"] { --a1: var(--hs-s); --a2: var(--hs-half); --a3: var(--hs-half); --b1: var(--hs-s); --b2: var(--hs-s); --b3: var(--hs-big); }
.hs-grid {
  --hs-span: calc(100% - 2 * var(--hs-gap));
  position: absolute; inset: 0; display: grid; gap: var(--hs-gap);
  grid-template-columns: calc(var(--hs-span) * var(--a1)) calc(var(--hs-span) * var(--a2)) calc(var(--hs-span) * var(--a3));
  grid-template-rows: calc(var(--hs-span) * var(--b1)) calc(var(--hs-span) * var(--b2)) calc(var(--hs-span) * var(--b3));
  grid-template-areas: "n n e" "w c e" "w s s";
  transition: grid-template-columns 1.3s var(--ease-in-out), grid-template-rows 1.3s var(--ease-in-out);
}
.hs-tile { position: relative; overflow: hidden; min-width: 0; min-height: 0; border-radius: var(--hs-r); background: var(--card); }
.hs-tile img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 1.3s var(--ease-in-out); }
.hs-tile.is-focus img { transform: scale(1.06); transition: transform 7s linear; }
.hs-tile::after { content: ""; position: absolute; inset: 0; z-index: 1; background: var(--tone, var(--red)); transform: scaleX(0); pointer-events: none; }
.hs-c { grid-area: c; --tone: var(--red); }
.hs-w { grid-area: w; --tone: var(--red); }
.hs-n { grid-area: n; --tone: var(--ink); }
.hs-e { grid-area: e; --tone: #0E5544; }
.hs-s { grid-area: s; --tone: #F6B3BC; }
.hs-tile.is-swap::after { animation: hsCurtain .85s var(--ease-in-out) both; }
.hs-label {
  position: absolute; z-index: 2; left: 12px; top: 12px; max-width: calc(100% - 24px);
  padding: 6px 12px; border-radius: 999px;
  background: rgba(23, 20, 21, .62); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font-size: .8125rem; font-weight: 620; line-height: 1.3; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  opacity: 0; transform: translateY(-6px); transition: opacity .3s, transform .4s var(--ease);
}
.hs-tile.is-focus .hs-label { opacity: 1; transform: none; transition: opacity .5s .8s, transform .6s var(--ease) .8s; }
.hs-cap { position: absolute; z-index: 3; left: 16px; bottom: 16px; max-width: calc(100% - 92px); }
.hs-cap a {
  display: inline-flex; align-items: center; gap: 10px; max-width: 100%;
  padding: 10px 14px 10px 16px; border-radius: 999px;
  background: rgba(255, 255, 255, .92); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: var(--shadow-sm);
  font-size: .9375rem; font-weight: 620; color: var(--ink); transition: transform .5s var(--ease), background-color .3s;
}
.hs-cap a:hover { transform: translateY(-2px); background: #fff; }
.hs-cap .icon { flex: none; width: 16px; height: 16px; color: var(--red-ink); transition: transform .45s var(--ease); }
.hs-cap a:hover .icon { transform: translateX(3px); }
.hs-cap-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
/* pausa: il cerchio rosso si riempie fino al cambio di foto */
.hs-toggle {
  position: absolute; z-index: 3; right: 16px; bottom: 16px; display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%; color: var(--ink);
  background: rgba(255, 255, 255, .92); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: var(--shadow-sm);
  transition: transform .4s var(--ease), background-color .3s;
}
.hs-toggle[hidden] { display: none; }
.hs-toggle:hover { transform: scale(1.06); background: #fff; }
.hs-toggle > * { grid-area: 1 / 1; }
.hs-ico .icon { display: block; width: 16px; height: 16px; }
.hs-ico-play, .hs-toggle.is-paused .hs-ico-pause { display: none; }
.hs-toggle.is-paused .hs-ico-play { display: block; }
.hs-ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.hs-ring circle { fill: none; stroke: var(--red); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 1 1; stroke-dashoffset: 1; }
.hs-toggle.is-running .hs-ring circle { animation: hsRing var(--hs-period, 5s) linear forwards; }

/* con JavaScript il mosaico aspetta l'apertura; se lo script non arriva, compare comunque dopo 2,4 secondi */
.js .hero-stage:not(.is-intro):not(.is-live):not(.is-static) .hs-grid,
.js .hero-stage:not(.is-intro):not(.is-live):not(.is-static) .hs-cap { opacity: 0; animation: hsShow .6s 2.4s both; }
.hero-stage.is-intro .hs-tile img { opacity: 0; }
.hero-stage.is-intro .hs-cap,
.hero-stage.is-intro .hs-toggle { opacity: 0; }
.hero-stage.is-play .hs-tile::after { animation: hsCurtain .9s var(--ease-in-out) var(--t, 0s) both; }
.hero-stage.is-play .hs-tile img { animation: hsImg 1.5s var(--ease) calc(var(--t, 0s) + .42s) both; }
.hero-stage.is-play .hs-cap,
.hero-stage.is-play .hs-toggle { animation: hsCap .7s var(--ease) 2.3s both; }
@keyframes hsCurtain {
  0% { transform: scaleX(0); transform-origin: 0 50%; }
  46% { transform: scaleX(1); transform-origin: 0 50%; }
  54% { transform: scaleX(1); transform-origin: 100% 50%; }
  100% { transform: scaleX(0); transform-origin: 100% 50%; }
}
@keyframes hsImg { 0% { opacity: 0; transform: scale(1.28); } 1% { opacity: 1; } 100% { opacity: 1; transform: none; } }
@keyframes hsShow { from { opacity: 0; } to { opacity: 1; } }
@keyframes hsCap { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes hsRing { to { stroke-dashoffset: 0; } }

/* invito a scorrere, sotto l'apertura */
.hero-hint {
  position: absolute; left: 50%; bottom: clamp(12px, 2.4vh, 24px); display: flex; align-items: center; gap: 10px;
  transform: translate(-50%, 8px); white-space: nowrap; pointer-events: none;
  font-size: .875rem; font-weight: 600; color: var(--muted);
  opacity: 0; transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.hero-hint.is-shown { opacity: 1; transform: translate(-50%, 0); }
@media (max-height: 760px) { .hero-hint { display: none; } }

/* ---------- Home: numeri ---------- */
.stats { padding: clamp(24px, 4vw, 48px) 0 var(--section); }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); }
.stat { position: relative; padding-top: 24px; }
.stat::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--ink);
  transform-origin: 0 50%;
}
.stat-value {
  display: flex; align-items: baseline;
  font-size: clamp(2.9rem, 5.1vw, 4.9rem); font-weight: 760; letter-spacing: -.055em; line-height: 1;
  color: var(--ink); font-variant-numeric: tabular-nums;
}
.stat-plus { color: var(--red); margin-left: .04em; }
.stat-label { margin-top: 12px; font-size: 1.0313rem; color: var(--muted); }
.stat-flag { width: 1.24em; height: 1.24em; margin: -.12em 0 -.12em -.2em; }
.stat-swiss .stat-label { max-width: 15em; color: var(--ink-2); }

/* ---------- Home: video ---------- */
.video-section { padding-bottom: var(--section); }
.video-shell { position: relative; }
.video-stage { position: relative; transform: scale(var(--vs, 1)); transform-origin: 50% 0; }
/* sugli schermi bassi il video si restringe quanto basta per stare tutto sotto l'intestazione */
.video-stage {
  margin-inline: auto;
  max-width: calc((100vh - var(--header-h) - 32px) * 16 / 9);
  max-width: calc((100svh - var(--header-h) - 32px) * 16 / 9);
}
.video-frame {
  position: relative; overflow: hidden; isolation: isolate;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-xl);
  background: #fff;
  box-shadow: 0 0 0 1px var(--line), 0 30px 60px -30px rgba(23, 20, 21, .22), 0 8px 24px -12px rgba(23, 20, 21, .08);
}
.video-frame video { width: 100%; height: 100%; object-fit: cover; background: #fff; }
.video-cta {
  position: absolute; left: clamp(14px, 2.6vw, 32px); bottom: clamp(14px, 2.6vw, 32px); z-index: 2;
  display: flex; align-items: center; gap: 14px;
  padding: 8px 22px 8px 8px; border-radius: 999px;
  background: rgba(255, 255, 255, .9);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 0 0 1px rgba(23, 20, 21, .06), var(--shadow-md);
  text-align: left;
  transition: transform .5s var(--ease), opacity .4s, box-shadow .4s;
}
.video-cta:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(23, 20, 21, .06), var(--shadow-lg); }
.video-cta-icon { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; background: var(--red); color: #fff; transition: transform .5s var(--ease); }
.video-cta:hover .video-cta-icon { transform: scale(1.07); }
.video-cta-icon .icon { width: 18px; height: 18px; margin-left: 2px; }
.video-cta-text { display: grid; line-height: 1.2; }
.video-cta-text strong { color: var(--ink); font-weight: 650; }
.video-cta-text small { color: var(--muted); font-size: .875rem; font-variant-numeric: tabular-nums; }
.video-frame.is-playing .video-cta { opacity: 0; pointer-events: none; transform: translateY(10px); }
.video-note { display: none; align-items: center; justify-content: center; gap: 8px; margin-top: 14px; font-size: .9375rem; color: var(--muted); }
.video-note .icon { width: 14px; height: 14px; color: var(--red-ink); }

.video-cursor {
  position: absolute; left: 0; top: 0; z-index: 3; pointer-events: none;
  display: grid; place-items: center; align-content: center; gap: 2px;
  width: 104px; height: 104px; margin: -52px 0 0 -52px; border-radius: 50%;
  background: var(--red); color: #fff; font-weight: 650; font-size: .875rem;
  transform: translate3d(var(--cx, 50%), var(--cy, 50%), 0) scale(0);
  transition: transform .45s var(--ease);
}
.video-cursor .icon { width: 20px; height: 20px; margin-left: 3px; }
.video-frame.show-cursor .video-cursor { transform: translate3d(var(--cx, 50%), var(--cy, 50%), 0) scale(1); }
.video-frame.is-playing .video-cursor { display: none; }
@media (hover: hover) and (pointer: fine) {
  .video-frame:not(.is-playing) { cursor: none; }
}

/* lingua del video: menu sopra l'angolo del video */
.video-lang { position: absolute; top: clamp(12px, 2vw, 24px); right: clamp(12px, 2vw, 24px); z-index: 6; }
.video-lang-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 12px 0 13px; border-radius: 999px;
  background: rgba(255, 255, 255, .92); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 0 0 1px rgba(23, 20, 21, .06), var(--shadow-md);
  font-weight: 620; font-size: .9375rem; color: var(--ink);
  transition: transform .5s var(--ease), box-shadow .4s;
}
.video-lang-btn:hover { transform: translateY(-1px); box-shadow: 0 0 0 1px rgba(23, 20, 21, .06), var(--shadow-lg); }
.video-lang-btn .icon { width: 18px; height: 18px; color: var(--red-ink); }
.video-lang-btn .icon:last-child { width: 15px; height: 15px; color: var(--ink); transition: transform .45s var(--ease); }
.video-lang.is-open .video-lang-btn .icon:last-child { transform: rotate(180deg); }
.video-lang-short { display: none; }
.video-lang-panel {
  position: absolute; right: 0; top: calc(100% + 8px);
  min-width: 232px; padding: 6px; border-radius: 18px;
  background: #fff; box-shadow: 0 0 0 1px var(--line), var(--shadow-lg);
  transform-origin: 100% 0; animation: popIn .4s var(--ease);
}
.video-lang-title { padding: 8px 12px 6px; font-size: .8125rem; font-weight: 600; color: var(--muted); }
.video-lang-panel button {
  display: grid; grid-template-columns: minmax(0, 1fr) auto 18px; align-items: center; gap: 12px;
  width: 100%; padding: 11px 12px; border-radius: 12px; text-align: left;
  font-weight: 560; color: var(--ink-2);
  transition: background-color .2s, color .2s;
}
.video-lang-panel button:hover { background: var(--card); color: var(--ink); }
.video-lang-panel button small { font-size: .8125rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.video-lang-panel button .icon { width: 18px; height: 18px; color: var(--red-ink); opacity: 0; transform: scale(.5); transition: opacity .25s, transform .45s var(--ease); }
.video-lang-panel button[aria-pressed="true"] { color: var(--ink); font-weight: 650; }
.video-lang-panel button[aria-pressed="true"] .icon { opacity: 1; transform: none; }

/* ---------- Home: approccio ---------- */
.approach { padding-bottom: var(--section); }
.approach-panel {
  position: relative; overflow: hidden;
  padding: clamp(44px, 7vw, 110px) clamp(26px, 6vw, 96px) clamp(52px, 8vw, 120px);
  border-radius: var(--r-xl); background: var(--red); color: #fff;
}
.approach-panel::after {
  content: ""; position: absolute; right: -12%; bottom: -55%; width: 70%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, .14), rgba(255, 255, 255, 0));
  pointer-events: none;
}
.statement {
  position: relative; z-index: 1;
  font-size: clamp(2.1rem, 5.1vw, 4.6rem); font-weight: 730; letter-spacing: -.045em; line-height: 1.04;
  color: #fff; text-wrap: balance; max-width: 15.5em;
}
.statement .sw { color: rgba(255, 255, 255, .34); transition: color .5s var(--ease); }
.statement .sw.is-lit { color: #fff; }
.statement em { position: relative; display: inline-block; }
.statement em::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: .02em; height: .07em; border-radius: 1em; background: #fff;
  transform-origin: 0 50%; transform: scaleX(0); transition: transform .9s var(--ease) .1s;
}
.statement em.is-lit::after, .statement.no-split em::after { transform: scaleX(1); }

.pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); margin-top: clamp(48px, 6vw, 80px); }
.pillar { padding-top: 24px; border-top: 1.5px solid var(--line-strong); }
.pillar-num { display: block; margin-bottom: 18px; font-size: .9375rem; font-weight: 650; color: var(--red-ink); font-variant-numeric: tabular-nums; }
.pillar h3 { font-size: clamp(1.4rem, 2vw, 1.75rem); font-weight: 700; letter-spacing: -.035em; }
.pillar p { margin-top: 12px; color: var(--muted); max-width: 26em; }

/* ---------- Home: da sempre lavoriamo solo in digitale ---------- */
.digital { padding-bottom: var(--section); }
.digital-panel {
  --mint: #A8F0CF;
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, .6fr); align-items: center; gap: clamp(28px, 5vw, 80px);
  padding: clamp(44px, 7vw, 104px) clamp(26px, 6vw, 96px);
  border-radius: var(--r-xl); color: #fff;
  background: linear-gradient(135deg, #0B3B32 0%, #0E5544 48%, #137157 100%);
}
.digital-panel::before {
  content: ""; position: absolute; z-index: -1; left: -22%; top: -45%; width: 80%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(168, 240, 207, .22), rgba(168, 240, 207, 0));
  animation: digitalGlow 16s var(--ease-in-out) infinite alternate; pointer-events: none;
}
.digital-panel::after {
  content: ""; position: absolute; z-index: -1; right: -16%; bottom: -62%; width: 72%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, .1), rgba(255, 255, 255, 0)); pointer-events: none;
}
@keyframes digitalGlow { to { transform: translate(60%, 40%) scale(1.15); } }
.digital .eyebrow-light::before { background: var(--mint); }
.digital-title { color: #fff; font-size: clamp(2.2rem, 4.8vw, 4.3rem); font-weight: 730; letter-spacing: -.045em; line-height: 1.02; text-wrap: balance; max-width: 13em; }
.digital-title em { font-style: normal; color: var(--mint); }
.digital-text { margin-top: clamp(20px, 2.4vw, 30px); max-width: 34em; font-size: clamp(1.125rem, 1.45vw, 1.3125rem); line-height: 1.55; color: rgba(255, 255, 255, .88); text-wrap: pretty; }
.digital-art { position: relative; justify-self: center; width: min(100%, 320px); aspect-ratio: 1; }
.digital-art::before { content: ""; position: absolute; inset: 4%; border-radius: 50%; background: radial-gradient(closest-side, rgba(168, 240, 207, .17), rgba(168, 240, 207, 0)); }
.digital-art svg { position: relative; display: block; width: 100%; height: 100%; overflow: visible; }
.digital-leaf { transform-box: view-box; transform-origin: 50px 162px; }
.digital-shape { fill: rgba(168, 240, 207, .16); stroke: var(--mint); stroke-width: 2.6; stroke-linejoin: round; transition: fill 1.2s var(--ease) .25s, stroke 1.2s var(--ease) .25s; }
.digital-paper { stroke: rgba(255, 255, 255, .72); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transition: opacity .45s var(--ease); }
.digital-vein, .digital-stem { stroke: var(--mint); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 1 2; stroke-dashoffset: 0; transition: stroke-dashoffset .9s var(--ease) 1.05s; }
.digital-rib, .digital-stem { stroke-width: 2.6; }
.digital-veins .digital-vein:nth-child(2), .digital-veins .digital-vein:nth-child(3) { transition-delay: 1.3s; }
.digital-veins .digital-vein:nth-child(4), .digital-veins .digital-vein:nth-child(5) { transition-delay: 1.42s; }
.digital-veins .digital-vein:nth-child(6), .digital-veins .digital-vein:nth-child(7) { transition-delay: 1.54s; }
.digital-stem { transition-delay: 1.2s; }
.digital-bits rect { fill: var(--mint); opacity: 0; transform-box: fill-box; transform-origin: center; }
/* con JavaScript e animazioni attive si parte dal foglio di carta */
.digital-art.is-paper .digital-shape { fill: rgba(255, 255, 255, .07); stroke: rgba(255, 255, 255, .92); transition: none; }
.digital-art.is-paper .digital-paper { opacity: 1; transition: none; }
.digital-art.is-paper .digital-vein, .digital-art.is-paper .digital-stem { stroke-dashoffset: 1; transition: none; }
.digital-art.is-on .digital-bits rect { animation: digitalBit 1.6s var(--ease-out) .4s both; }
.digital-art.is-on .digital-bits rect:nth-child(2) { animation-delay: .5s; }
.digital-art.is-on .digital-bits rect:nth-child(3) { animation-delay: .6s; }
.digital-art.is-on .digital-bits rect:nth-child(4) { animation-delay: .45s; }
.digital-art.is-on .digital-bits rect:nth-child(5) { animation-delay: .55s; }
.digital-art.is-on .digital-bits rect:nth-child(6) { animation-delay: .65s; }
@keyframes digitalBit {
  0% { opacity: 0; transform: translate(0, 0) scale(.4); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1); }
}
.digital-art.is-done .digital-leaf { animation: leafSway 7s var(--ease-in-out) infinite alternate; }
@keyframes leafSway { from { transform: rotate(-2.5deg); } to { transform: rotate(2.5deg); } }
@media (max-width: 860px) {
  .digital-panel { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .digital-art { order: -1; justify-self: start; width: 140px; margin: -10px 0 0 -12px; }
}
@media (prefers-reduced-motion: reduce) {
  .digital-panel::before { animation: none; }
}

/* ---------- Home: per chi lavoriamo ---------- */
.focus { padding: var(--section) 0; background: var(--bg-2); }
.focus-grid { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.focus-head { position: sticky; top: calc(var(--header-h) + 40px); }
.focus-head .lead { margin-top: 26px; max-width: 30em; }
.focus-list { border-top: 1.5px solid var(--line-strong); }
.focus-item { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; padding: 28px 0; border-bottom: 1.5px solid var(--line-strong); }
.focus-num { padding-top: 6px; font-size: .9375rem; font-weight: 650; color: var(--red-ink); font-variant-numeric: tabular-nums; }
.focus-item h3 { font-size: clamp(1.35rem, 2vw, 1.75rem); font-weight: 700; letter-spacing: -.035em; }
.focus-item p { margin-top: 10px; color: var(--muted); max-width: 32em; }
.focus-note {
  display: grid; justify-items: start; gap: 22px;
  margin-top: 32px; padding: clamp(24px, 3vw, 34px);
  border-radius: var(--r); background: #fff; box-shadow: 0 0 0 1px var(--line), var(--shadow-sm);
}
.focus-note p { font-size: 1.125rem; font-weight: 560; line-height: 1.5; color: var(--ink); text-wrap: pretty; }

/* ---------- Home: i vantaggi di un broker ---------- */
.benefits { padding-bottom: var(--section); }
.benefits-intro { display: grid; justify-items: start; gap: 28px; }
.benefit-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.benefit {
  position: relative; padding: clamp(24px, 2.4vw, 32px); border-radius: var(--r); background: var(--card);
  transition: background-color .45s, box-shadow .55s var(--ease), transform .55s var(--ease);
}
.benefit:hover { background: #fff; transform: translateY(-6px); box-shadow: 0 0 0 1px var(--line), var(--shadow-md); }
.benefit-icon {
  display: grid; place-items: center; width: 54px; height: 54px; margin-bottom: 26px; border-radius: 16px;
  background: #fff; color: var(--red-ink); box-shadow: var(--shadow-sm);
  transition: background-color .45s, color .45s, transform .55s var(--ease);
}
.benefit-icon .icon { width: 26px; height: 26px; }
.benefit:hover .benefit-icon { background: var(--red); color: #fff; transform: rotate(-6deg) scale(1.06); }
.benefit h3 { font-size: 1.25rem; font-weight: 680; letter-spacing: -.025em; line-height: 1.2; }
.benefit p { margin-top: 10px; font-size: 1rem; line-height: 1.55; color: var(--muted); }
.benefit-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px;
  margin-top: 16px; padding: 18px 18px 18px clamp(20px, 2.4vw, 30px);
  border: 1.5px solid var(--line); border-radius: var(--r); background: #fff;
}
.benefit-note { display: flex; align-items: center; gap: 14px; max-width: 46em; font-size: 1.0625rem; line-height: 1.45; color: var(--ink-2); text-wrap: pretty; }
.benefit-note strong { color: var(--ink); font-weight: 680; }
.benefit-check { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--red-soft); color: var(--red-ink); }
.benefit-check .icon { width: 18px; height: 18px; }
.benefit-panel.is-entering .benefit { animation: cardIn .8s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms); }
.benefit-panel.is-entering .benefit-foot { animation: cardIn .8s var(--ease) .42s both; }

/* ---------- Servizi ---------- */
.services { padding-bottom: var(--section); }
.services-intro { display: grid; gap: 28px; justify-items: start; }

.segmented {
  position: relative; display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  padding: 5px; border-radius: 999px; background: var(--card);
}
.segmented button, .segmented label {
  position: relative; z-index: 1; display: grid; place-items: center;
  height: 46px; padding: 0 28px; border-radius: 999px;
  font-weight: 600; font-size: 1rem; color: var(--muted); cursor: pointer; white-space: nowrap;
  transition: color .3s;
}
.segmented button[aria-selected="true"], .segmented label.is-checked { color: var(--ink); }
.segmented-pill {
  position: absolute; z-index: 0; top: 5px; bottom: 5px; left: 5px; width: calc(50% - 5px);
  border-radius: 999px; background: #fff; box-shadow: var(--shadow-sm);
  transition: transform .55s var(--ease);
}
.segmented[data-active="1"] .segmented-pill { transform: translateX(100%); }
.segmented label input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label:has(input:focus-visible) { outline: 2.5px solid var(--red); outline-offset: 2px; }

.service-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.service-card {
  position: relative; display: flex; flex-direction: column;
  min-height: 360px; padding: 26px 26px 28px;
  border-radius: var(--r); background: var(--card);
  transition: background-color .45s, box-shadow .55s var(--ease), transform .55s var(--ease);
}
.service-card:hover { background: #fff; transform: translateY(-6px); box-shadow: 0 0 0 1px var(--line), var(--shadow-md); }
.service-icon { width: 76px; height: 76px; margin: -4px 0 30px -8px; }
.service-card h2 { font-size: 1.375rem; font-weight: 680; letter-spacing: -.03em; line-height: 1.15; }
.service-card p { margin-top: 12px; font-size: 1rem; line-height: 1.55; color: var(--muted); }
.service-card .card-link { margin-top: auto; padding-top: 24px; }
.service-card .card-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.service-grid.is-entering .service-card { animation: cardIn .8s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms); }
@keyframes cardIn { from { opacity: 0; transform: translateY(26px) scale(.98); } to { opacity: 1; transform: none; } }

.epoca-card {
  display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: center; gap: clamp(16px, 3vw, 48px);
  margin-top: 16px; padding: clamp(28px, 4vw, 52px);
  border-radius: var(--r); background: var(--card); overflow: hidden;
}
.epoca-title { font-size: clamp(1.9rem, 3.4vw, 3rem); font-weight: 740; letter-spacing: -.045em; line-height: 1.02; color: var(--ink); text-wrap: balance; }
.epoca-copy > p:not(.epoca-title) { margin-top: 16px; max-width: 26em; color: var(--muted); }
.epoca-copy .card-link { margin-top: 26px; }
.epoca-visual { position: relative; }
.epoca-lottie { width: 100%; aspect-ratio: 320 / 128; }

.specialties { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 36px; }
.specialties-label { font-size: .9375rem; font-weight: 600; color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chips li {
  padding: 9px 16px; border-radius: 999px; border: 1.5px solid var(--line);
  font-size: .9375rem; font-weight: 550; color: var(--ink-2);
  transition: border-color .3s, color .3s, background-color .3s;
}
.chips li:hover { border-color: var(--red); color: var(--ink); background: var(--red-soft); }

/* compagnie partner */
.partners { padding: 0 0 var(--section); }
.marquees { display: grid; gap: 10px; margin-top: 8px; }
.marquee {
  position: relative; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track { display: flex; width: max-content; animation: marquee var(--dur, 60s) linear infinite; }
.marquee-reverse .marquee-track { animation-direction: reverse; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee li {
  display: flex; align-items: center; gap: clamp(22px, 3vw, 40px); padding-right: clamp(22px, 3vw, 40px);
  font-size: clamp(1.5rem, 3vw, 2.6rem); font-weight: 680; letter-spacing: -.04em; line-height: 1.5; white-space: nowrap;
  color: #8C868D; transition: color .3s;
}
.marquee li::after { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--red); opacity: .55; }
.marquee li:hover { color: var(--ink); }
@keyframes marquee { to { transform: translate3d(-50%, 0, 0); } }

/* ---------- Sinistri ---------- */
.claims { padding: clamp(16px, 3vw, 40px) 0 var(--section); }
.timeline-wrap { --dot: 26px; --gap: clamp(20px, 3vw, 40px); position: relative; }
.timeline { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.timeline-track {
  position: absolute; z-index: 0; top: calc(var(--dot) / 2 - 1px); height: 2px;
  left: calc(var(--dot) / 2); right: calc(25% - var(--gap) * .75 - var(--dot) / 2);
  background: var(--line-strong); border-radius: 2px; pointer-events: none;
}
.timeline-fill { position: absolute; inset: 0; background: var(--red); border-radius: inherit; transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }
.timeline-wrap[data-orient="v"] .timeline-fill { transform-origin: 50% 0; transform: scaleY(var(--p, 0)); }
.step { position: relative; z-index: 1; }
.step-dot {
  display: block; width: var(--dot); height: var(--dot); border-radius: 50%;
  background: var(--bg); border: 2px solid var(--line-strong);
  transition: border-color .5s var(--ease), background-color .5s var(--ease), box-shadow .6s var(--ease);
}
.step-dot::after { content: ""; display: block; width: 8px; height: 8px; margin: 7px; border-radius: 50%; background: #fff; transform: scale(0); transition: transform .5s var(--ease) .1s; }
.step.is-active .step-dot { border-color: var(--red); background: var(--red); box-shadow: 0 0 0 7px rgba(241, 69, 85, .14); }
.step.is-active .step-dot::after { transform: scale(1); }
.step-icon { width: 72px; height: 72px; margin: 26px 0 14px -8px; opacity: .35; transition: opacity .5s; }
.step.is-active .step-icon { opacity: 1; }
.step-num { display: block; font-size: .875rem; font-weight: 650; color: var(--red-ink); font-variant-numeric: tabular-nums; }
.step h2 { margin-top: 6px; font-size: 1.375rem; font-weight: 690; letter-spacing: -.03em; }
.step p { margin-top: 10px; color: var(--muted); font-size: 1rem; max-width: 22em; }

.claims-cta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 28px;
  margin-top: clamp(56px, 7vw, 96px); padding: 18px 18px 18px clamp(22px, 3vw, 34px);
  border-radius: 999px; background: var(--card);
}
.claims-cta p { color: var(--ink-2); }
.claims-cta strong { color: var(--ink); font-weight: 650; }
.claims-cta-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.claims-cta .btn { font-variant-numeric: tabular-nums; }
.claims-cta .btn .icon { width: 18px; height: 18px; }

/* ---------- Chi siamo ---------- */
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: end; }
.about-copy .lead { margin-top: 26px; max-width: 31em; }

.merge { position: relative; min-height: 1.94em; font-size: clamp(3.4rem, 8.2vw, 7.6rem); }
.merge-words { display: grid; justify-items: start; font-weight: 800; letter-spacing: -.055em; line-height: .97; color: var(--ink); }
.merge-line { display: flex; width: max-content; white-space: nowrap; will-change: transform; }
.merge-key { color: var(--red); }
.merge-rest { display: inline-block; overflow: hidden; color: #D9D5DA; transition: width .85s var(--ease-in-out), opacity .6s var(--ease); }
.merge.is-collapsing .merge-rest { opacity: 0; }
.merge-logo {
  position: absolute; left: 0; top: 0; width: 3.3em; color: var(--ink);
  opacity: 0; transform: translateY(.12em) scale(.96); transform-origin: 0 0;
  transition: opacity .8s var(--ease), transform 1s var(--ease);
  pointer-events: none;
}
.merge-logo .logo { width: 100%; height: auto; }
.merge-caption { margin-top: 26px; font-size: 1rem; font-weight: 550; color: var(--muted); letter-spacing: 0; }
.merge-caption span { color: var(--red-ink); font-weight: 700; }
.merge.is-merged .merge-words { opacity: 0; transition: opacity .5s var(--ease); }
.merge.is-merged .merge-logo { opacity: 1; transform: none; }

/* il messaggio di Luca Decarli: video verticale a sinistra, testo a destra (sul telefono uno sotto l'altro) */
.founder { padding: clamp(40px, 6vw, 88px) 0 clamp(8px, 2vw, 24px); }
.founder-grid {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  grid-template-areas: "media head" "media body";
  column-gap: clamp(40px, 7vw, 112px);
}
.founder-head { grid-area: head; align-self: end; }
.founder-media { grid-area: media; align-self: center; }
.founder-body { grid-area: body; align-self: start; }
.founder-title { max-width: 13em; font-size: clamp(2rem, 3.6vw, 3.4rem); }
.founder-body .lead { margin-top: 26px; max-width: 31em; }

/* il messaggio di Luca apre la pagina "Chi siamo": meno spazio sopra, così il video sta tutto nello schermo */
.founder.founder-hero { padding: calc(var(--header-h) + clamp(28px, 4vw, 64px)) 0 clamp(48px, 6vw, 88px); }
/* la storia del nome, subito sotto */
.about-story { padding: clamp(56px, 8vw, 120px) 0 clamp(8px, 2vw, 24px); }

/* il riquadro resta tutto visibile anche sugli schermi bassi */
.founder-frame {
  position: relative; overflow: hidden; isolation: isolate;
  width: min(100%, 400px, calc((100vh - var(--header-h) - 64px) * 9 / 16));
  width: min(100%, 400px, calc((100svh - var(--header-h) - 64px) * 9 / 16));
  aspect-ratio: 9 / 16; margin-inline: auto;
  border-radius: var(--r-xl); background: #E8E5E1;
  box-shadow: 0 0 0 1px var(--line), 0 30px 60px -30px rgba(23, 20, 21, .22), 0 8px 24px -12px rgba(23, 20, 21, .08);
  cursor: pointer;
}
.founder-frame video, .founder-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.founder-frame video { background: #E8E5E1; }
.founder-poster { z-index: 1; transition: opacity .6s var(--ease), transform 1.4s var(--ease); }
.founder-frame::after {
  content: ""; position: absolute; inset: auto 0 0; z-index: 1; height: 40%; pointer-events: none;
  background: linear-gradient(to top, rgba(23, 20, 21, .4), rgba(23, 20, 21, 0));
  transition: opacity .5s var(--ease);
}
@media (hover: hover) and (pointer: fine) {
  .founder-frame:not(.is-playing):hover .founder-poster { transform: scale(1.03); }
}
.founder-frame .video-cta { left: 14px; bottom: 14px; }
.founder-frame { container-type: inline-size; }
.founder-frame.is-playing { cursor: auto; }
.founder-frame.is-playing .founder-poster, .founder-frame.is-playing::after { opacity: 0; pointer-events: none; }
.founder-frame.is-playing .video-cta {
  opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(10px);
  transition: transform .5s var(--ease), opacity .4s, visibility 0s .4s;
}
/* sottotitoli: misura adatta al riquadro verticale, più grandi a schermo intero */
.founder-frame video::cue { font-family: "Inter", system-ui, sans-serif; font-size: 16px; line-height: 1.4; color: #fff; background: rgba(23, 20, 21, .78); }
.founder-frame video:fullscreen::cue { font-size: clamp(18px, 2.6vh, 34px); }
/* a schermo intero il video si vede intero, nelle sue proporzioni, senza zoom (bande nere ai lati o sopra e sotto) */
.founder-frame video:fullscreen, .video-frame video:fullscreen { object-fit: contain; background: #000; }
.founder-frame video:-webkit-full-screen, .video-frame video:-webkit-full-screen { object-fit: contain; background: #000; }
.founder-frame video:-webkit-full-screen::cue { font-size: clamp(18px, 2.6vh, 34px); }

.founder-sign { display: flex; align-items: center; gap: 14px; margin-top: 30px; }
.founder-sign-photo { flex: none; width: 56px; height: 56px; overflow: hidden; border-radius: 50%; background: var(--card); box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--red); }
.founder-sign-photo img { width: 100%; height: 100%; object-fit: cover; }
.founder-sign-text { display: grid; gap: 3px; line-height: 1.25; }
.founder-sign-text strong { font-weight: 680; color: var(--ink); }
.founder-sign-text small { font-size: .9375rem; color: var(--muted); }
.founder-meta { display: grid; gap: 12px; margin: 30px 0 0; padding: 22px 0 0; list-style: none; border-top: 1px solid var(--line); }
.founder-meta li { display: flex; align-items: center; gap: 10px; font-size: .9375rem; color: var(--muted); }
.founder-meta li > .icon { width: 20px; height: 20px; color: var(--red-ink); }

/* finestra con il testo del messaggio (stessa finestra dei CV) */
.cv-text .cv-body { display: block; }
.cv-text-body p { max-width: 40em; font-size: 1.0625rem; line-height: 1.7; color: var(--ink-2); text-wrap: pretty; }
.cv-text-body p + p { margin-top: 1.05em; }

/* team */
.team-section { padding: clamp(48px, 7vw, 104px) 0 var(--section); }
.team-group + .team-group { margin-top: clamp(56px, 7vw, 96px); }
.team-group-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  margin-bottom: 24px; padding-bottom: 18px; border-bottom: 2px solid var(--ink);
}
.team-group-title { font-size: clamp(1.45rem, 2.4vw, 2rem); font-weight: 720; letter-spacing: -.035em; }
.team-group-count { font-weight: 650; color: var(--red-ink); font-variant-numeric: tabular-nums; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.team-group-lead .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.person {
  position: relative; display: flex; flex-direction: column; align-items: flex-start;
  padding: 24px 22px 22px; border-radius: var(--r); background: var(--card);
  transition: background-color .45s, box-shadow .55s var(--ease), transform .55s var(--ease);
}
.person:has(.person-cv):hover { background: #fff; transform: translateY(-5px); box-shadow: 0 0 0 1px var(--line), var(--shadow-md); }
.person:has(.person-cv):active { transform: scale(.985); }
.person-photo, .cv-photo {
  position: relative; flex: none; display: block; overflow: hidden;
  width: 92px; aspect-ratio: 1; border-radius: 50%;
  background: #fff; box-shadow: 0 0 0 4px #fff, 0 0 0 5.5px var(--red);
  transition: transform .6s var(--ease);
}
.person-photo img, .cv-photo img { width: 100%; height: 100%; object-fit: cover; }
.person:hover .person-photo { transform: scale(1.04) rotate(-2deg); }
.is-initials { display: grid; place-items: center; background: linear-gradient(140deg, #fff 10%, var(--red-soft)); }
.is-initials span { font-size: 1.85rem; font-weight: 720; letter-spacing: -.04em; color: var(--red-ink); }
.person-body { display: flex; flex-direction: column; align-items: flex-start; flex: 1; width: 100%; margin-top: 24px; }
.person-name { font-size: 1.25rem; font-weight: 690; letter-spacing: -.03em; line-height: 1.2; }
.person-role { margin-top: 4px; font-size: .9688rem; color: var(--ink-2); }
.person-since { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; font-size: .875rem; color: var(--muted); }
.person-since::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
.person-finma {
  position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 6px;
  margin-top: 12px; padding: 5px 10px 5px 9px; border-radius: 999px;
  background: #fff; box-shadow: 0 0 0 1px var(--line);
  font-size: .8125rem; font-weight: 620; letter-spacing: .01em; line-height: 1.2; color: var(--ink-2); font-variant-numeric: tabular-nums;
  transition: box-shadow .3s, color .3s;
}
.person-finma-tag { font-size: .6875rem; font-weight: 760; letter-spacing: .06em; color: var(--red-ink); }
.person-finma .icon { width: 13px; height: 13px; color: var(--red-ink); transition: transform .4s var(--ease); }
.person-finma:hover { color: var(--ink); box-shadow: 0 0 0 1.5px var(--line-strong), var(--shadow-sm); }
.person-finma:hover .icon { transform: translate(2px, -2px); }
.person-cv { display: inline-flex; align-items: center; gap: .45em; margin-top: auto; padding-top: 22px; font-weight: 620; font-size: .9375rem; color: var(--ink); }
.person-cv .icon { width: 1.05em; height: 1.05em; transition: transform .45s var(--ease); }
.person-cv::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.person:hover .person-cv .icon { transform: translateX(4px); }
.person:hover .person-cv span { color: var(--red-ink); }

.person-lead { display: grid; grid-template-columns: 136px minmax(0, 1fr); gap: 28px; align-items: start; padding: clamp(24px, 3vw, 34px); border-radius: var(--r-lg); }
.person-lead .person-photo { width: 136px; }
.person-lead .person-body { margin-top: 0; }
.person-lead .person-name { font-size: clamp(1.5rem, 2.2vw, 1.9rem); }
.person-summary { margin-top: 16px; font-size: 1rem; line-height: 1.55; color: var(--muted); }

/* contatti di ogni persona: telefono dell'ufficio, cellulare, e-mail (sopra il collegamento al CV, quindi cliccabili) */
.person-contact, .cv-contact { margin: 0; padding: 0; list-style: none; }
.person-contact {
  display: grid; gap: 7px; width: 100%;
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line);
  font-size: .8438rem; line-height: 1.35;
}
.person-lead .person-contact { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 20px; font-size: .9063rem; }
.cv-contact { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 12px; font-size: .875rem; line-height: 1.35; }
.person-contact a, .cv-contact a {
  position: relative; z-index: 2; display: inline-flex; align-items: flex-start; gap: 9px;
  color: var(--ink-2); font-variant-numeric: tabular-nums; transition: color .25s;
}
.person-contact .icon, .cv-contact .icon { flex: none; width: 15px; height: 15px; margin-top: .08em; color: var(--red-ink); }
.person-contact a:hover, .cv-contact a:hover { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* Indietro: in cima alle pagine interne (torna alla pagina di prima, nello stesso punto) */
.page-back {
  position: relative; z-index: 2; display: flex; align-items: center; gap: 8px; width: fit-content;
  margin-bottom: 26px; padding: 7px 15px 7px 11px; border-radius: 999px;
  background: #fff; box-shadow: 0 0 0 1px var(--line);
  font-size: .875rem; font-weight: 620; line-height: 1.2; color: var(--ink-2);
  transition: box-shadow .3s, color .3s;
}
.page-back .icon { width: 16px; height: 16px; transition: transform .4s var(--ease); }
.page-back:hover { color: var(--ink); box-shadow: 0 0 0 1.5px var(--line-strong), var(--shadow-sm); }
.page-back:hover .icon { transform: translateX(-3px); }

/* CV in finestra */
.cv {
  width: min(940px, calc(100vw - 32px)); max-width: none; max-height: min(88dvh, 920px);
  margin: auto; padding: 0; border: 0; border-radius: var(--r-lg);
  background: #fff; color: var(--ink-2); box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.cv[open] { display: flex; animation: cvIn .55s var(--ease); }
.cv::backdrop { background: rgba(23, 20, 21, .5); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.cv[open]::backdrop { animation: fadeIn .4s var(--ease); }
@keyframes cvIn { from { opacity: 0; transform: translateY(24px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.cv-inner { display: flex; flex-direction: column; width: 100%; max-height: inherit; min-height: 0; }
.cv-head {
  position: relative; display: flex; align-items: center; gap: 22px;
  padding: 28px 84px 24px 30px; border-bottom: 1px solid var(--line);
}
.cv-photo { width: 84px; box-shadow: 0 0 0 3px #fff, 0 0 0 4.5px var(--red); }
.cv-photo.is-initials span { font-size: 1.6rem; }
.cv-title h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 730; letter-spacing: -.04em; }
.cv-role { margin-top: 6px; font-weight: 600; color: var(--ink); }
.cv-brand { font-weight: 500; color: var(--muted); }
.cv-since { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; font-size: .9375rem; color: var(--muted); }
.cv-since::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
.cv-finma { margin-top: 8px; }
.cv-finma a { display: inline-flex; align-items: center; gap: 6px; font-size: .9063rem; font-weight: 620; color: var(--ink); font-variant-numeric: tabular-nums; background: linear-gradient(var(--red), var(--red)) 0 100% / 0 1.5px no-repeat; transition: background-size .45s var(--ease); }
.cv-finma a:hover { background-size: 100% 1.5px; }
.cv-finma .icon { width: 14px; height: 14px; color: var(--red-ink); }
.cv-close {
  position: absolute; top: 20px; right: 20px; display: grid; place-items: center;
  width: 46px; height: 46px; border-radius: 50%; background: var(--card); color: var(--ink);
  transition: background-color .25s, transform .5s var(--ease);
}
.cv-close .icon { width: 20px; height: 20px; }
.cv-close:hover { background: var(--line); transform: rotate(90deg); }
.cv-body {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-content: start; gap: 30px 44px;
  padding: 28px 30px 32px;
}
.cv-summary { grid-column: 1 / -1; font-size: 1.125rem; line-height: 1.55; color: var(--ink); text-wrap: pretty; }
.cv-section h3 { margin-bottom: 12px; font-size: .875rem; font-weight: 650; letter-spacing: .01em; color: var(--red-ink); }
.cv-side { display: grid; align-content: start; gap: 28px; }
.cv-list li { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 14px; padding: 13px 0; border-top: 1px solid var(--line); }
.cv-list li:last-child { border-bottom: 1px solid var(--line); }
.cv-period { padding-top: 1px; font-size: .875rem; font-weight: 650; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cv-item-title { font-weight: 650; color: var(--ink); line-height: 1.4; }
.cv-item-sub { margin-top: 2px; font-size: .9688rem; line-height: 1.5; color: var(--muted); }
.cv-list-compact li { grid-template-columns: 76px minmax(0, 1fr); }
.cv-list-compact .cv-item-sub { margin-top: 0; color: var(--ink-2); }
.cv-list-compact .cv-wide { grid-column: 1 / -1; }
.cv-bullets li { position: relative; padding: 0 0 10px 18px; font-size: .9688rem; line-height: 1.5; color: var(--ink-2); }
.cv-bullets li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
.cv-langs { color: var(--ink-2); }
.cv-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px;
  padding: 16px 30px; border-top: 1px solid var(--line); background: var(--bg-2);
}
.cv-note { font-size: .8125rem; color: var(--muted); }
.cv-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cv-actions .icon { width: 18px; height: 18px; }

/* ---------- Contatti ---------- */
.contact { padding: var(--section) 0; }
.contact-grid { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.contact-info .lead { margin-top: 24px; max-width: 28em; }
.contact-list { margin-top: clamp(32px, 4vw, 48px); border-bottom: 1.5px solid var(--line); }
.contact-list li { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 16px; padding: 18px 0; border-top: 1.5px solid var(--line); }
.contact-label { padding-top: 3px; font-size: .9375rem; color: var(--muted); }
.contact-value { font-size: 1.125rem; font-weight: 620; color: var(--ink); line-height: 1.45; }
a.contact-value { justify-self: start; background: linear-gradient(var(--red), var(--red)) 0 100% / 0 1.5px no-repeat; transition: background-size .45s var(--ease), color .3s; }
a.contact-value:hover { background-size: 100% 1.5px; }

.map-card { display: flex; gap: 18px; margin-top: 28px; padding: 20px 22px 22px 14px; border-radius: var(--r); background: var(--card); }
.map-pin { flex: none; width: 96px; height: 96px; margin-top: -8px; }
.map-copy h2 { font-size: 1.125rem; font-weight: 680; letter-spacing: -.02em; }
.map-copy p { margin-top: 6px; font-size: .9688rem; color: var(--muted); }
.map-links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 12px; }
.map-links a { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; font-size: .9375rem; color: var(--ink); }
.map-links .icon { width: 16px; height: 16px; color: var(--red-ink); transition: transform .4s var(--ease); }
.map-links a:hover .icon { transform: translate(2px, -2px); }
.map-copy .map-floor { display: flex; align-items: flex-start; gap: 8px; margin-top: 10px; font-weight: 600; color: var(--ink); }
.map-floor .icon { flex: none; width: 18px; height: 18px; margin-top: 2px; color: var(--red-ink); }

.form-wrap {
  position: relative; padding: clamp(24px, 3.4vw, 44px);
  border-radius: var(--r-lg); background: #fff;
  box-shadow: 0 0 0 1px var(--line), 0 30px 60px -30px rgba(23, 20, 21, .18), 0 8px 24px -12px rgba(23, 20, 21, .06);
}
.contact-form { display: grid; gap: 14px; }
.form-intro { margin-bottom: 6px; padding-bottom: 20px; border-bottom: 1px solid var(--line); font-size: .9688rem; line-height: 1.55; color: var(--muted); }
.form-type { margin: 0 0 8px; padding: 0; border: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.form-type legend { float: left; margin-right: 4px; font-weight: 600; color: var(--ink); }
.segmented-sm label { height: 40px; padding: 0 20px; font-size: .9375rem; }
.form-row { display: grid; gap: 14px; }
.form-row-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.field { position: relative; }
.field input, .field textarea, .field select {
  width: 100%; height: 62px; padding: 26px 16px 8px;
  border: 1.5px solid var(--line); border-radius: var(--r-sm); background: #fff;
  font: inherit; font-size: 1rem; color: var(--ink);
  transition: border-color .25s, box-shadow .25s, background-color .25s;
  -webkit-appearance: none; appearance: none;
}
.field textarea { height: auto; min-height: 140px; padding-top: 30px; resize: vertical; line-height: 1.5; }
.field select { padding-right: 44px; cursor: pointer; text-overflow: ellipsis; }
.field-select .icon { position: absolute; right: 16px; top: 50%; width: 18px; height: 18px; margin-top: -9px; pointer-events: none; color: var(--muted); }
.field label {
  position: absolute; left: 17px; top: 20px; pointer-events: none;
  color: var(--muted); font-size: 1rem; line-height: 1.3;
  transform-origin: 0 0; transition: transform .3s var(--ease), color .25s;
  white-space: nowrap; max-width: calc(100% - 34px); overflow: hidden; text-overflow: ellipsis;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(31, 27, 29, .07); }
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label,
.field-select label { transform: translateY(-10px) scale(.78); }
.field input:focus + label, .field textarea:focus + label, .field select:focus + label { color: var(--ink); }
.field-error { display: none; margin: 6px 2px 0; font-size: .875rem; font-weight: 550; color: var(--red-ink); }
.field.is-invalid input, .field.is-invalid textarea { border-color: var(--red); box-shadow: 0 0 0 4px rgba(241, 69, 85, .1); }
.field.is-invalid .field-error, .check.is-invalid .field-error { display: block; }
.field-select select.is-prefilled { border-color: var(--red); box-shadow: 0 0 0 4px rgba(241, 69, 85, .08); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.check { position: relative; display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; align-items: start; margin-top: 4px; font-size: .9375rem; color: var(--ink-2); }
.check input {
  -webkit-appearance: none; appearance: none; width: 24px; height: 24px; margin: 1px 0 0; border-radius: 7px; border: 1.5px solid var(--line-strong);
  background: #fff center / 14px no-repeat; cursor: pointer; transition: background-color .2s, border-color .2s;
}
.check input:checked { background-color: var(--ink); border-color: var(--ink); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }
.check.is-invalid input { border-color: var(--red); }
.check label a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--red); }
.check .field-error { grid-column: 2; margin-top: 0; }

.form-actions { display: grid; gap: 10px; margin-top: 10px; }
.form-note { font-size: .875rem; color: var(--muted); text-align: center; }
.form-status { font-size: .9375rem; color: var(--red-ink); text-align: center; }
.form-status:empty { display: none; }
.btn.is-loading { pointer-events: none; opacity: .75; }

.form-success { display: grid; justify-items: center; text-align: center; padding: clamp(24px, 4vw, 48px) 8px; }
.success-lottie { width: 120px; height: 120px; }
.form-success h2 { margin-top: 18px; font-size: clamp(1.8rem, 3vw, 2.4rem); font-weight: 740; letter-spacing: -.04em; }
.form-success p { margin-top: 12px; max-width: 26em; color: var(--muted); }
.form-success .btn { margin-top: 28px; }

/* domande frequenti */
.faq { padding: var(--section) 0; background: var(--bg-2); }
.faq-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.faq-head { position: sticky; top: calc(var(--header-h) + 32px); }
.faq-more { margin-top: 26px; color: var(--muted); }
.faq-more a, .faq-body a { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 4px; text-decoration-thickness: 1.5px; }
.faq-list { border-top: 1.5px solid var(--line-strong); }
.faq-item { border-bottom: 1.5px solid var(--line-strong); }
.faq-item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 26px 0; cursor: pointer; list-style: none;
  font-size: clamp(1.125rem, 1.55vw, 1.3125rem); font-weight: 640; letter-spacing: -.02em; line-height: 1.3; color: var(--ink);
  transition: color .25s;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--red-ink); }
.faq-icon { position: relative; flex: none; width: 36px; height: 36px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1.5px var(--line); transition: background-color .35s, box-shadow .35s, transform .5s var(--ease); }
.faq-icon::before, .faq-icon::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; margin: -1px 0 0 -6px; border-radius: 2px;
  background: var(--ink); transition: transform .5s var(--ease), background-color .35s;
}
.faq-icon::after { transform: rotate(90deg); }
.faq-item[open] .faq-icon { background: var(--red); box-shadow: 0 0 0 1.5px var(--red); transform: rotate(180deg); }
.faq-item[open] .faq-icon::before, .faq-item[open] .faq-icon::after { background: #fff; }
.faq-item[open] .faq-icon::after { transform: rotate(0deg); }
.faq-body { overflow: hidden; }
.faq-body p { padding: 0 64px 28px 0; color: var(--ink-2); max-width: 40em; }

/* ---------- Invito al contatto (fine pagina) ---------- */
.cta-band { padding: 0 0 var(--section); }
.cta-panel {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 28px 56px;
  padding: clamp(32px, 5.5vw, 72px); border-radius: var(--r-xl);
  background: var(--dark); color: rgba(255, 255, 255, .72);
}
.cta-panel::after {
  content: ""; position: absolute; right: -10%; top: -70%; width: 60%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(241, 69, 85, .22), rgba(241, 69, 85, 0));
  pointer-events: none;
}
.cta-copy, .cta-actions { position: relative; z-index: 1; }
.cta-title { font-size: clamp(2rem, 4vw, 3.4rem); font-weight: 740; letter-spacing: -.045em; line-height: 1.02; color: #fff; }
.cta-copy p { margin-top: 16px; max-width: 32em; font-size: 1.0625rem; }
.cta-actions { display: grid; justify-items: start; gap: 18px; }
.cta-phone { display: inline-flex; align-items: center; gap: 10px; padding-left: 4px; font-weight: 600; color: #fff; font-variant-numeric: tabular-nums; }
.cta-phone .icon { width: 18px; height: 18px; color: var(--red); }
.cta-phone:hover span { text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 4px; }

/* ---------- Piè di pagina ---------- */
.site-footer { padding: clamp(64px, 8vw, 104px) 0 calc(28px + env(safe-area-inset-bottom)); background: var(--dark); color: rgba(255, 255, 255, .7); font-size: .9688rem; }
.footer-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 48px; padding-bottom: clamp(48px, 6vw, 72px); }
.footer-logo { display: inline-block; color: #fff; }
.footer-logo .logo { height: 52px; width: auto; }
.footer-claim { margin-top: 22px; font-size: clamp(1.4rem, 2.2vw, 1.85rem); font-weight: 700; letter-spacing: -.035em; line-height: 1.15; color: #fff; }
.footer-cta { display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; font-weight: 600; color: #fff; }
.footer-cta .icon { width: 18px; height: 18px; color: var(--red); transition: transform .45s var(--ease); }
.footer-cta:hover .icon { transform: translateX(4px); }
.footer-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.footer-title { margin-bottom: 16px; font-size: .875rem; font-weight: 600; letter-spacing: 0; color: rgba(255, 255, 255, .5); }
.footer-cols ul { display: grid; gap: 10px; }
.footer-cols a { transition: color .25s; }
.footer-cols a:hover { color: #fff; }
.footer-finma .icon { display: inline-block; width: 15px; height: 15px; margin-left: 4px; vertical-align: -2px; color: var(--red); }
.footer-bottom {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 28px;
  padding-top: 26px; border-top: 1px solid rgba(255, 255, 255, .12);
  font-size: .875rem; color: rgba(255, 255, 255, .55);
}
.footer-langs { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.footer-langs a { color: rgba(255, 255, 255, .7); transition: color .25s; }
.footer-langs a:hover, .footer-langs a[aria-current="true"] { color: #fff; }
.footer-langs a[aria-current="true"] { text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 4px; }
.nowrap { white-space: nowrap; }
.footer-register { color: rgba(255, 255, 255, .7); transition: color .25s; }
.footer-register:hover { color: #fff; }
.footer-register .icon { display: inline-block; width: 14px; height: 14px; margin-left: 3px; vertical-align: -2px; color: var(--red); }
.to-top { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; color: rgba(255, 255, 255, .8); font-weight: 600; }
.to-top .icon { width: 16px; height: 16px; transition: transform .4s var(--ease); }
.to-top:hover { color: #fff; }
.to-top:hover .icon { transform: translateY(-3px); }

/* ---------- Barra rapida su mobile ---------- */
.mobile-bar {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 40;
  display: none; grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px; border-radius: 999px;
  background: rgba(255, 255, 255, .9); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  box-shadow: 0 0 0 1px rgba(23, 20, 21, .06), var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(160%);
  transition: transform .6s var(--ease), opacity .4s, visibility 0s linear .6s;
}
.mobile-bar .btn { height: 48px; padding: 0 1em; }
.mobile-bar .btn .icon { width: 18px; height: 18px; }
.mobile-bar.is-visible { opacity: 1; visibility: visible; transform: none; transition: transform .6s var(--ease), opacity .4s, visibility 0s; }

/* proposta della lingua del browser */
.lang-suggest {
  position: fixed; left: 0; right: 0; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 60;
  display: flex; align-items: center; gap: 10px 14px;
  width: max-content; max-width: calc(100vw - 24px); margin-inline: auto;
  padding: 8px 8px 8px 20px; border-radius: 999px;
  background: var(--ink); color: #fff; box-shadow: var(--shadow-lg);
  transform: translateY(calc(100% + 40px)); transition: transform .7s var(--ease);
}
.lang-suggest.is-visible { transform: none; }
.menu-open .lang-suggest { visibility: hidden; }
.lang-suggest p { font-size: .9375rem; font-weight: 550; line-height: 1.35; }
.lang-suggest a { flex: none; padding: 9px 16px; border-radius: 999px; background: #fff; color: var(--ink); font-weight: 650; font-size: .875rem; white-space: nowrap; transition: background-color .25s; }
.lang-suggest a:hover { background: var(--red-soft); }
.lang-suggest button { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: rgba(255, 255, 255, .8); transition: background-color .25s, color .25s; }
.lang-suggest button:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.lang-suggest .icon { width: 18px; height: 18px; }

/* ---------- I nostri uffici ---------- */
/* ingresso, versione statica (movimento ridotto o senza JavaScript) */
.enter { padding: calc(var(--header-h) + clamp(48px, 7vw, 104px)) 0 clamp(40px, 5vw, 72px); }
.enter-sticky {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: center; gap: clamp(32px, 5vw, 72px);
  width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter);
}
.enter-copy .lead { margin-top: 24px; max-width: 30em; }
.enter-copy .btn { margin-top: 32px; }
.enter-stage { position: relative; }
.enter-door {
  margin: 0 auto; overflow: hidden; width: min(100%, 420px); aspect-ratio: 9 / 14;
  border-radius: var(--r-xl); background: var(--card); box-shadow: var(--shadow-lg);
}
.enter-door img, .enter-inside img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.enter-inside, .enter-hint { display: none; }

/* ingresso animato: scorrendo la porta si avvicina, poi si entra e si vede il corridoio con la poltrona rossa
   (--e: la porta si avvicina, --f: si entra, --w: compare il benvenuto) */
.enter.is-anim { height: 330svh; padding: 0; }
.enter.is-anim .enter-sticky {
  position: sticky; top: var(--header-h); display: block; height: calc(100svh - var(--header-h));
  max-width: none; margin: 0; padding: 0; overflow: hidden;
}
.enter.is-anim .enter-copy {
  position: absolute; z-index: 3; left: 0; right: 0; top: 50%;
  width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter);
  opacity: calc(1 - var(--c, 0)); transform: translateY(calc(-50% - var(--c, 0) * 56px));
  pointer-events: none;
}
.enter.is-anim .enter-copy > * { max-width: 34rem; pointer-events: auto; }
.enter.is-anim .enter-stage { position: absolute; inset: 0; }
.enter.is-anim .enter-door {
  --h0: calc((100svh - var(--header-h)) * .8);
  --w0: calc(var(--h0) * .5625);
  --x0: calc(72% - var(--w0) / 2);
  --y0: calc((100% - var(--h0)) / 2);
  position: absolute; z-index: 1; margin: 0; aspect-ratio: auto;
  left: calc(var(--x0) * (1 - var(--e, 0)));
  top: calc(var(--y0) * (1 - var(--e, 0)));
  width: calc(var(--w0) + (100% - var(--w0)) * var(--e, 0));
  height: calc(var(--h0) + (100% - var(--h0)) * var(--e, 0));
  border-radius: calc(var(--r-xl) * (1 - var(--e, 0)));
  box-shadow: 0 30px 70px -30px rgba(23, 20, 21, calc(.35 * (1 - var(--e, 0))));
}
.enter.is-anim .enter-door img { transform: scale(calc(1 + var(--e, 0) * .06 + var(--f, 0) * .28)); transform-origin: 50% 34%; }
.enter.is-anim .enter-inside { display: block; position: absolute; z-index: 2; inset: 0; margin: 0; opacity: var(--f, 0); }
.enter.is-anim .enter-main { position: absolute; inset: 0; overflow: hidden; }
.enter.is-anim .enter-main img { object-position: 50% 52%; transform: scale(calc(1.14 - var(--f, 0) * .14)); }
.enter-side { display: none; }
.enter-side img { width: 100%; height: 100%; object-fit: cover; }

/* schermi larghi: la porta diventa il pannello centrale di un trittico di foto verticali, su fondo scuro;
   il corridoio prende il posto della porta e ai lati si aprono l'ingresso visto da dentro e la terrazza */
@media (min-width: 900px) and (min-aspect-ratio: 5/4) {
  .enter.is-anim {
    --tp-pad: clamp(20px, 4svh, 40px);
    --tp-gap: clamp(10px, 1.2vw, 18px);
    --tp-h: min(calc(100svh - var(--header-h) - 2 * var(--tp-pad)), calc((100vw - 2 * var(--gutter) - 2 * var(--tp-gap)) / 3 * 16 / 9));
    --tp-w: calc(var(--tp-h) * 9 / 16);
  }
  .enter.is-anim .enter-door {
    left: calc(var(--x0) + (50% - var(--tp-w) / 2 - var(--x0)) * var(--e, 0));
    top: calc(var(--y0) + (50% - var(--tp-h) / 2 - var(--y0)) * var(--e, 0));
    width: calc(var(--w0) + (var(--tp-w) - var(--w0)) * var(--e, 0));
    height: calc(var(--h0) + (var(--tp-h) - var(--h0)) * var(--e, 0));
    border-radius: var(--r-lg);
  }
  .enter.is-anim .enter-door img { transform: scale(calc(1 + var(--e, 0) * .04 + var(--f, 0) * .16)); }
  .enter.is-anim .enter-inside { background: var(--dark); }
  .enter.is-anim .enter-main,
  .enter.is-anim .enter-side {
    display: block; position: absolute; inset: auto;
    left: calc(50% - var(--tp-w) / 2); top: calc(50% - var(--tp-h) / 2); width: var(--tp-w); height: var(--tp-h);
    overflow: hidden; border-radius: var(--r-lg);
  }
  .enter.is-anim .enter-main { z-index: 2; }
  .enter.is-anim .enter-side { z-index: 1; }
  .enter.is-anim .enter-side-l { transform: translateX(calc((var(--tp-w) + var(--tp-gap)) * var(--f, 0) * -1)); }
  .enter.is-anim .enter-side-r { transform: translateX(calc((var(--tp-w) + var(--tp-gap)) * var(--f, 0))); }
  .enter.is-anim .enter-welcome { justify-items: center; text-align: center; padding-inline: var(--gutter); }
}
.enter-welcome {
  position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; display: grid; gap: 8px;
  padding: clamp(48px, 8vw, 120px) max(var(--gutter), calc((100% - var(--container)) / 2)) clamp(28px, 5vw, 56px);
  background: linear-gradient(to top, rgba(23, 20, 21, .66), rgba(23, 20, 21, 0));
  color: #fff; opacity: var(--w, 0); transform: translateY(calc((1 - var(--w, 0)) * 26px));
}
.enter-welcome strong { font-size: clamp(2.1rem, 5vw, 4.4rem); font-weight: 750; letter-spacing: -.046em; line-height: 1; }
.enter-welcome span { font-size: 1.0625rem; font-weight: 550; color: rgba(255, 255, 255, .85); }
.enter.is-anim .enter-hint {
  position: absolute; z-index: 3; left: 50%; bottom: clamp(14px, 3vh, 28px); display: flex; align-items: center; gap: 10px;
  transform: translateX(-50%); white-space: nowrap;
  font-size: .875rem; font-weight: 600; color: var(--muted); opacity: calc(1 - var(--c, 0) * 2.5);
}
.enter-mouse { position: relative; width: 20px; height: 30px; border: 2px solid currentColor; border-radius: 12px; }
.enter-mouse::after {
  content: ""; position: absolute; left: 50%; top: 6px; width: 4px; height: 6px; margin-left: -2px; border-radius: 2px;
  background: var(--red); animation: mouseDot 1.8s var(--ease) infinite;
}
/* slideshow dopo l'entrata: in ogni pannello due livelli che si alternano in dissolvenza sopra la foto di partenza */
.enter-slide { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .9s var(--ease); }
.enter-slide.is-on { opacity: 1; }
.enter.is-anim .enter-main .enter-slide { transform: none; }
/* pulsante per fermare le foto: compare con lo slideshow (in basso a destra; sugli schermi larghi nell'angolo del trittico) */
.enter-toggle {
  z-index: 4; visibility: hidden; opacity: 0;
  transition: opacity .4s var(--ease), visibility 0s .4s, transform .4s var(--ease), background-color .3s;
}
.enter.is-slides .enter-toggle { visibility: visible; opacity: 1; transition: opacity .4s var(--ease), transform .4s var(--ease), background-color .3s; }
@media (min-width: 900px) and (min-aspect-ratio: 5/4) {
  .enter.is-anim .enter-toggle {
    right: auto; bottom: auto;
    left: calc(50% + var(--tp-w) * 1.5 + var(--tp-gap) - 60px);
    top: calc(50% + var(--tp-h) / 2 - 60px);
  }
}

/* con il benvenuto compare l'invito a scorrere: sotto ci sono le altre foto */
.enter-welcome .enter-more {
  display: inline-flex; align-items: center; gap: 10px; width: fit-content; margin-top: clamp(8px, 1.8svh, 20px);
  font-size: .9375rem; font-weight: 600; color: #fff; opacity: calc(var(--w, 0) * 2 - 1);
}
.enter-welcome .enter-more span { font-size: inherit; font-weight: inherit; color: inherit; }
.enter-welcome .enter-more-icon {
  display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255, 255, 255, .14); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .6);
}
.enter-more-icon .icon { width: 18px; height: 18px; animation: moreBob 1.8s var(--ease-in-out) infinite; }
@keyframes moreBob { 0%, 100% { transform: translateY(-2px); } 50% { transform: translateY(3px); } }
@keyframes mouseDot { 0% { opacity: 0; transform: translateY(-2px); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(9px); } }

/* gli spazi */
.spaces { padding: var(--section) 0 clamp(48px, 6vw, 80px); }
.spaces-intro { display: grid; justify-items: start; gap: 22px; }
.gallery { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: span 12; }
.tile { position: relative; display: block; overflow: hidden; isolation: isolate; border-radius: var(--r); background: var(--card); cursor: zoom-in; }
.tile-l { height: clamp(260px, 30vw, 440px); }
.tile-m { height: clamp(210px, 21vw, 300px); }
.tile-p { height: clamp(260px, 34vw, 500px); }
.tile-v { height: clamp(300px, 34vw, 520px); }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.tile:hover img { transform: scale(1.04); }
.tile-cap {
  position: absolute; left: 12px; bottom: 12px; z-index: 2; display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 10px 8px 14px; border-radius: 999px; background: rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: var(--shadow-sm);
  font-size: .875rem; font-weight: 620; color: var(--ink); transition: transform .5s var(--ease);
}
.tile-cap .icon { width: 16px; height: 16px; color: var(--red-ink); }
.tile:hover .tile-cap { transform: translateY(-2px); }
/* comparsa delle foto: si aprono come una tenda */
.js .tile[data-reveal] { opacity: 1; transform: none; clip-path: inset(16% 0 0 0 round var(--r)); transition: clip-path 1.15s var(--ease); }
.js .tile[data-reveal] img { transform: scale(1.12); transition: transform 1.5s var(--ease); }
.js .tile[data-reveal].is-in { clip-path: inset(0 0 0 0 round var(--r)); }
.js .tile[data-reveal].is-in img { transform: none; }
.js .tile[data-reveal].is-in:hover img { transform: scale(1.04); }

/* come trovarci */
.visit { padding: clamp(48px, 6vw, 80px) 0 var(--section); }
.visit-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px 28px; margin-top: 16px; padding: 22px 28px 22px 14px; }
.visit-card .map-pin { margin-top: -6px; align-self: start; }
.visit-address { margin-top: 6px; font-weight: 600; color: var(--ink); }

/* foto a schermo intero */
.lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; color: #fff; overscroll-behavior: contain; }
.lightbox[open] { display: grid; place-items: center; animation: fadeIn .35s var(--ease); }
.lightbox::backdrop { background: rgba(15, 13, 14, .9); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.lightbox[open]::backdrop { animation: fadeIn .35s var(--ease); }
.lb-figure { display: grid; justify-items: center; gap: 14px; margin: 0; max-width: min(1400px, calc(100vw - 180px)); touch-action: pan-y; }
.lb-figure img { width: auto; height: auto; max-width: 100%; max-height: calc(100dvh - 140px); border-radius: 14px; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.lb-figure img.is-in { animation: lbIn .5s var(--ease); }
@keyframes lbIn { from { opacity: 0; transform: scale(.975); } to { opacity: 1; transform: none; } }
.lb-figure figcaption { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 6px 14px; padding: 0 16px; font-weight: 600; text-align: center; }
.lb-count { color: rgba(255, 255, 255, .6); font-weight: 500; font-variant-numeric: tabular-nums; }
.lb-btn { position: absolute; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; transition: background-color .25s, transform .4s var(--ease); }
.lb-btn:hover { background: rgba(255, 255, 255, .24); }
.lb-btn .icon { width: 24px; height: 24px; }
.lb-prev { left: 24px; top: 50%; margin-top: -26px; }
.lb-next { right: 24px; top: 50%; margin-top: -26px; }
.lb-prev:hover { transform: translateX(-3px); }
.lb-next:hover { transform: translateX(3px); }
.lb-close { right: 24px; top: 24px; }
.lb-close:hover { transform: rotate(90deg); }

/* ---------- Pagine informative e 404 ---------- */
.prose { padding-bottom: var(--section); }
.prose-inner { max-width: 780px; }
.prose h2 { margin: 56px 0 14px; font-size: clamp(1.5rem, 2.4vw, 1.9rem); font-weight: 720; letter-spacing: -.035em; }
.prose h3 { margin: 28px 0 8px; font-size: 1.1875rem; font-weight: 680; letter-spacing: -.02em; }
.prose p, .prose ul, .prose dl { margin-top: 12px; color: var(--ink-2); }
.prose ul { padding-left: 1.2em; list-style: disc; }
.prose ul li { margin-top: 6px; }
.prose li::marker { color: var(--red); }
.prose a { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 3px; }
.prose dl { display: grid; grid-template-columns: minmax(140px, 220px) minmax(0, 1fr); gap: 10px 24px; padding: 22px 24px; border-radius: var(--r); background: var(--card); }
.prose dt { color: var(--muted); }
.prose dd { margin: 0; color: var(--ink); font-weight: 560; }
.prose .updated { margin-top: 56px; font-size: .9375rem; color: var(--muted); }
.translation-note { display: inline-flex; padding: 10px 16px; border-radius: 999px; background: var(--red-soft); font-size: .9375rem; color: var(--ink) !important; }

.notfound { min-height: 100svh; display: grid; place-items: center; text-align: center; padding: calc(var(--header-h) + 40px) 0 80px; }
.notfound .lottie { width: 160px; height: 160px; margin: 0 auto; }
.notfound .eyebrow { justify-content: center; }
.notfound .eyebrow::before { display: none; }
.notfound .h2 { margin-top: 12px; }
.notfound .lead { margin: 20px auto 0; max-width: 28em; }
.notfound .btn { margin-top: 32px; }

/* ---------- Animazioni di ingresso ---------- */
.js [data-reveal] {
  opacity: 0; transform: translate3d(0, 30px, 0);
  transition: opacity .9s var(--ease), transform 1.1s var(--ease);
  transition-delay: var(--d, 0ms);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }
.js .stat[data-reveal]::before { transform: scaleX(0); transition: transform 1.2s var(--ease); transition-delay: var(--d, 0ms); }
.js .stat[data-reveal].is-in::before { transform: scaleX(1); }

.js [data-split] .w { display: inline-block; overflow: hidden; vertical-align: top; padding: .1em 0 .14em; margin: -.1em 0 -.14em; }
.js [data-split] .wi { display: inline-block; transform: translate3d(0, 108%, 0); transition: transform 1.05s var(--ease); transition-delay: calc(var(--i, 0) * 55ms + var(--d, 0ms)); }
.js [data-split].is-in .wi { transform: none; }

/* passaggio fluido tra le pagine (browser recenti) */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vtOut .32s var(--ease) both; }
::view-transition-new(root) { animation: vtIn .55s var(--ease) both; }
@keyframes vtOut { to { opacity: 0; transform: translateY(-10px); } }
@keyframes vtIn { from { opacity: 0; transform: translateY(16px); } }

/* ---------- Responsive ---------- */
@media (max-width: 1240px) {
  .nav a { padding: 10px 10px; }
  .header-inner { column-gap: 16px; }
}

@media (max-width: 1179px) {
  /* su schermi più stretti il centro esatto non ci sta: il menu si affianca ai pulsanti */
  .header-inner { grid-template-columns: auto minmax(0, 1fr) auto; }
  .nav { justify-self: end; margin-right: 10px; }
}
@media (min-width: 1024px) and (max-width: 1279px) {
  /* in tedesco e francese le voci sono più lunghe: il passaggio avviene prima */
  :lang(de) .header-inner, :lang(fr) .header-inner { grid-template-columns: auto minmax(0, 1fr) auto; }
  :lang(de) .nav, :lang(fr) .nav { justify-self: end; margin-right: 10px; }
}

@media (max-width: 1100px) {
  .finma-long { display: none; }
  .finma-short { display: block; }
  .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .service-card { min-height: 300px; }
}

@media (max-width: 1023px) {
  :root { --header-h: 68px; }
  .nav, .header-cta { display: none; }
  .header-inner { grid-template-columns: auto minmax(0, 1fr); }
  .menu-toggle { display: block; }
  .brand .logo { height: 36px; }
  .finma-badge { height: 44px; }

  .hero { min-height: 0; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-visual { order: -1; justify-self: stretch; max-width: none; }
  .hero-stage { aspect-ratio: 16 / 10; max-height: none; min-height: 0; --hs-gap: 8px; --hs-r: 12px; --hs-s: .15; }
  .hero-hint { display: none; }
  .benefit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-head-split { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 44px; }
  .about-grid { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .merge { margin-top: 12px; }
  .focus-grid { grid-template-columns: minmax(0, 1fr); }
  .focus-head { position: static; }
  .faq-grid { grid-template-columns: minmax(0, 1fr); }
  .faq-head { position: static; }
  .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-top { grid-template-columns: minmax(0, 1fr); }
  .epoca-card { grid-template-columns: minmax(0, 1fr); }
  .epoca-visual { margin: 0 calc(-1 * clamp(28px, 4vw, 52px)) calc(-1 * clamp(12px, 2vw, 24px)); }
  .cta-panel { grid-template-columns: minmax(0, 1fr); }
  .cta-actions { grid-auto-flow: row; }
}

@media (max-width: 900px) {
  .team-group-lead .team-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 1023px) {
  .enter-sticky { grid-template-columns: minmax(0, 1fr); }
  .enter.is-anim .enter-copy { top: clamp(20px, 5svh, 48px); transform: translateY(calc(var(--c, 0) * -40px)); }
  .enter.is-anim .enter-door {
    --h0: calc((100svh - var(--header-h)) * .46);
    --x0: calc(50% - var(--w0) / 2);
    --y0: calc(100% - var(--h0) - clamp(56px, 9svh, 84px));
  }
  .visit-card { grid-template-columns: auto minmax(0, 1fr); }
  .visit-cta { grid-column: 1 / -1; justify-self: start; }
}

@media (max-width: 860px) {
  .timeline { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .timeline-track { right: auto; width: 2px; height: auto; top: calc(var(--dot) / 2); bottom: 40px; left: calc(var(--dot) / 2 - 1px); }
  .step { display: grid; grid-template-columns: var(--dot) minmax(0, 1fr); column-gap: 22px; padding-bottom: 40px; }
  .step:last-of-type { padding-bottom: 0; }
  .step-dot { grid-row: 1 / span 4; }
  .step-icon { grid-column: 2; width: 60px; height: 60px; margin: -14px 0 6px -6px; }
  .step-num, .step h2, .step p { grid-column: 2; }
  .pillars { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .claims-cta { border-radius: var(--r); padding: 22px; }
  .claims-cta-actions { width: 100%; justify-content: space-between; }
  .cv-body { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 767px) {
  body { font-size: 1rem; }
  .mobile-bar { display: grid; }
  .lang-suggest { width: auto; left: 12px; right: 12px; bottom: calc(84px + env(safe-area-inset-bottom)); flex-wrap: wrap; justify-content: space-between; border-radius: 22px; padding: 14px 10px 10px 18px; }
  .lang-suggest p { flex: 1 1 100%; padding-right: 4px; }
  .page-contact .lang-suggest, .page-404 .lang-suggest { bottom: calc(16px + env(safe-area-inset-bottom)); }
  .site-footer { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .page-contact .site-footer, .page-404 .site-footer { padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
  .hero { padding-top: calc(var(--header-h) + 28px); }
  .hero-eyebrow { margin-bottom: 22px; font-size: .875rem; }
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .hero-ctas .btn { width: 100%; }
  .hero-stage { aspect-ratio: 4 / 3; --hs-gap: 6px; --hs-r: 10px; }
  .hs-cap { left: 10px; bottom: 10px; max-width: calc(100% - 70px); }
  .hs-cap a { padding: 8px 12px 8px 13px; font-size: .875rem; }
  .hs-toggle { right: 10px; bottom: 10px; width: 40px; height: 40px; }
  .hs-label { left: 8px; top: 8px; max-width: calc(100% - 16px); padding: 5px 10px; font-size: .75rem; }
  .benefit-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .benefit { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 16px; padding: 20px; }
  .benefit-icon { grid-row: span 2; width: 46px; height: 46px; margin: 0; border-radius: 14px; }
  .benefit-icon .icon { width: 23px; height: 23px; }
  .benefit h3 { align-self: center; font-size: 1.125rem; }
  .benefit p { margin-top: 6px; }
  .benefit-foot { padding: 18px; }
  .benefit-note { align-items: flex-start; font-size: 1rem; }
  .benefit-foot .btn { width: 100%; }
  .btn-play { justify-content: center; }
  .service-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .service-card { min-height: 0; }
  .service-icon { width: 64px; height: 64px; margin-bottom: 20px; }
  .services-intro .segmented { width: 100%; }
  .video-frame { border-radius: var(--r); }
  .video-cta { left: auto; right: 12px; bottom: 12px; padding: 5px; gap: 0; }
  .video-cta-icon { width: 42px; height: 42px; }
  .video-cta-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .video-note { display: flex; }
  .video-lang { top: 10px; right: 10px; }
  .video-lang-btn { height: 40px; padding: 0 10px 0 11px; gap: 6px; font-size: .875rem; }
  .video-lang-name { display: none; }
  .video-lang-short { display: inline; }
  .team-grid, .team-group-lead .team-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .person, .person-lead {
    display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 16px; align-items: start;
    padding: 16px 18px 16px 16px; border-radius: var(--r);
  }
  .person-photo, .person-lead .person-photo { width: 64px; box-shadow: 0 0 0 3px #fff, 0 0 0 4.5px var(--red); }
  .is-initials span { font-size: 1.35rem; }
  .person-body { margin-top: 2px; }
  .person-name, .person-lead .person-name { font-size: 1.125rem; }
  .person-role { font-size: .9063rem; }
  .person-since { margin-top: 8px; font-size: .8125rem; }
  .person-finma { margin-top: 8px; font-size: .75rem; }
  .person-summary { margin-top: 10px; font-size: .9375rem; }
  .person-cv { padding-top: 12px; font-size: .9063rem; }
  .person-contact, .person-lead .person-contact { display: grid; gap: 6px; margin-top: 12px; padding-top: 10px; font-size: .8438rem; }
  .founder-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "media" "body"; }
  .founder-media { margin-top: 30px; }
  .founder-frame {
    width: min(100%, 420px, calc((100vh - var(--header-h) - 132px) * 9 / 16));
    width: min(100%, 420px, calc((100svh - var(--header-h) - 132px) * 9 / 16));
  }
  .founder-frame video::cue { font-size: 15px; }
  .founder-frame .video-cta { left: 12px; right: auto; bottom: 12px; padding: 6px 16px 6px 6px; gap: 11px; }
  .founder-frame .video-cta-text { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: nowrap; font-size: .9375rem; }
  .founder-body .lead { margin-top: 30px; }
  .page-back { margin-bottom: 18px; padding: 6px 13px 6px 10px; font-size: .8438rem; }
  .cv { width: 100%; max-height: 92dvh; margin: auto 0 0; border-radius: 24px 24px 0 0; }
  .cv-head { padding: 22px 70px 18px 20px; gap: 16px; }
  .cv-photo { width: 64px; }
  .cv-close { top: 16px; right: 14px; width: 42px; height: 42px; }
  .cv-body { padding: 22px 20px 28px; gap: 26px; }
  .cv-summary { font-size: 1.0313rem; }
  .cv-list li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .cv-list-compact li { grid-template-columns: minmax(0, 1fr); }
  .cv-foot { padding: 14px 20px calc(14px + env(safe-area-inset-bottom)); }
  .cv-note { display: none; }
  .cv-actions { width: 100%; }
  .cv-actions .btn { flex: 1; }
  .form-row-2 { grid-template-columns: minmax(0, 1fr); }
  .contact-list li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .map-card { flex-direction: column; padding: 18px 20px 22px; }
  .map-pin { width: 80px; height: 80px; margin: -10px 0 -8px -12px; }
  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-cols > div:first-child { grid-column: 1 / -1; }
  .to-top { margin-left: 0; }
  .faq-body p { padding-right: 0; }
  .prose dl { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .prose dd { margin-bottom: 10px; }
  .translation-note { border-radius: var(--r-sm); }
  .cta-actions .btn { width: 100%; }
  .cta-actions { justify-items: stretch; }
  .gallery { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .gallery > .tile { grid-column: 1 / -1; height: auto; aspect-ratio: 4 / 3; }
  .gallery > .tile-v.span-4 { aspect-ratio: 4 / 5; }
  .enter.is-anim .enter-copy .btn { display: none; }
  .enter.is-anim .enter-copy .lead { margin-top: 14px; font-size: 1rem; }
  .visit-card { grid-template-columns: minmax(0, 1fr); padding: 18px 20px 22px; }
  .visit-card .map-pin { margin: -10px 0 -8px -12px; }
  .visit-cta { width: 100%; }
  .lb-figure { max-width: 100vw; }
  .lb-figure img { border-radius: 0; max-height: calc(100dvh - 170px); }
  .lb-prev, .lb-next { top: auto; bottom: calc(18px + env(safe-area-inset-bottom)); margin-top: 0; }
  .lb-prev { left: calc(50% - 64px); }
  .lb-next { right: calc(50% - 64px); }
  .lb-close { top: calc(14px + env(safe-area-inset-top)); right: 14px; }
}

@container (max-width: 259px) {
  .founder-frame .video-cta { padding: 5px; gap: 0; }
  .founder-frame .video-cta-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

@media (max-width: 560px) {
  .lang { display: none; }
  .finma-badge { gap: 7px; padding: 0 13px 0 9px; }
  .finma-badge .icon { width: 20px; height: 20px; }
  .header-actions { gap: 6px; }
}

@media (max-width: 400px) {
  .stats-grid { column-gap: 16px; }
  .stat-value { font-size: 2.7rem; }
  .segmented button { padding: 0 16px; }
  .brand .logo { height: 32px; }
  .finma-badge-text strong { font-size: .8125rem; letter-spacing: 0; }
}

/* ---------- Senza JavaScript ---------- */
html:not(.js) .video-frame > video,
html:not(.js) .video-cta,
html:not(.js) .video-cursor,
html:not(.js) .video-lang,
html:not(.js) [data-tabs],
html:not(.js) .merge-caption { display: none; }
html:not(.js) .founder-frame > video,
html:not(.js) .founder-frame .video-cta,
html:not(.js) .founder-poster,
html:not(.js) .founder-frame::after { display: none; }
html.lb-open .lenis.lenis-stopped, html.lb-open { overflow: hidden; }
.video-frame noscript video { width: 100%; height: 100%; object-fit: cover; }
html:not(.js) .service-grid[hidden] { display: grid !important; margin-top: 16px; }
html:not(.js) .benefit-panel[hidden] { display: block !important; margin-top: 16px; }
html:not(.js) .cv:target { display: block; position: fixed; inset: 16px; z-index: 80; width: auto; max-height: none; margin: 0; overflow: auto; }

/* ---------- Movimento ridotto ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0ms !important; }
  .js [data-reveal], .js [data-split] .wi { opacity: 1 !important; transform: none !important; }
  .marquee-track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; }
  .marquee { -webkit-mask-image: none; mask-image: none; }
  .marquee-reverse { display: none; }
  .video-stage { transform: none; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* ---------- Stampa ---------- */
@media print {
  .site-header, .mobile-bar, .menu-mobile, .video-section, .hero-visual, .hero-hint, .lottie, .form-wrap, .lang-suggest, .cta-band { display: none !important; }
  .js [data-reveal], .js [data-split] .wi { opacity: 1 !important; transform: none !important; }
  body { color: #000; }
  /* stampa di un CV: solo la finestra aperta */
  html.cv-open body > *:not(dialog[open]) { display: none !important; }
  html.cv-open dialog[open] { position: static; display: block; width: auto; max-width: none; max-height: none; margin: 0; border-radius: 0; box-shadow: none; overflow: visible; animation: none; }
  html.cv-open .cv-body { display: grid; overflow: visible; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
  html.cv-open .cv-close, html.cv-open .cv-actions { display: none !important; }
  html.cv-open .cv-foot { background: none; }
  html.cv-open .cv-note { display: block; }
  html.cv-open .cv::backdrop { background: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
}

@media (prefers-reduced-motion: reduce) {
  .js .hero-stage:not(.is-intro):not(.is-live):not(.is-static) .hs-grid,
  .js .hero-stage:not(.is-intro):not(.is-live):not(.is-static) .hs-cap { opacity: 1; animation: none; }
  .hs-grid, .hs-tile img, .hs-tile.is-focus img, .hs-label, .hs-tile.is-focus .hs-label { transition: none; }
  .hs-tile.is-focus img { transform: none; }
  .hero-hint { transition: none; }
}
