/* ==========================================================================
   Giovanni Del Rio — Infermiere libero professionista
   Design system · v1.0
   Tipografia: Fraunces (display) + Inter Tight (testo)
   Palette: petrolio clinico + acqua + segnale corallo su carta calda
   Animazioni: solo transform/opacity → composited, 60fps
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. TOKENS
   -------------------------------------------------------------------------- */
:root {
  /* Colore — scala petrolio */
  --ink:           #071A1B;
  --ink-2:         #12312F;
  --petrol:        #0E4744;
  --petrol-600:    #0B3A38;
  --petrol-700:    #082B2A;
  --petrol-900:    #051C1C;

  /* Accenti */
  --aqua:          #17A398;
  --aqua-light:    #4FC9BD;
  --aqua-wash:     #E4F4F1;
  --signal:        #D9584C;   /* emergenza — usato con parsimonia */
  --signal-wash:   #FBEDEB;
  --gold:          #C8A15A;   /* onorificenze / Milano-Cortina */

  /* Neutri */
  --paper:         #FBFAF7;
  --paper-2:       #F4F2ED;
  --surface:       #FFFFFF;
  --muted:         #5B6B6A;
  --muted-2:       #7C8C8B;
  --line:          rgba(7, 26, 27, .10);
  --line-strong:   rgba(7, 26, 27, .18);

  /* Tipografia */
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-text:    "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --fs-eyebrow: .74rem;
  --fs-micro:   .82rem;
  --fs-small:   .94rem;
  --fs-body:    clamp(1rem, .96rem + .18vw, 1.09rem);
  --fs-lead:    clamp(1.1rem, 1.02rem + .42vw, 1.34rem);
  --fs-h4:      clamp(1.14rem, 1.06rem + .32vw, 1.32rem);
  --fs-h3:      clamp(1.35rem, 1.2rem + .62vw, 1.75rem);
  --fs-h2:      clamp(1.9rem, 1.5rem + 1.75vw, 3.1rem);
  --fs-h1:      clamp(2.5rem, 1.7rem + 3.5vw, 4.6rem);
  --fs-display: clamp(3rem, 1.9rem + 4.6vw, 5.6rem);

  /* Spazio */
  --gutter:      clamp(1.15rem, .6rem + 2.4vw, 2.5rem);
  --section:     clamp(4.5rem, 3rem + 7vw, 8.5rem);
  --section-sm:  clamp(3rem, 2rem + 4.5vw, 5.5rem);
  --maxw:        1200px;
  --maxw-narrow: 760px;

  /* Forma */
  --r-sm:  10px;
  --r-md:  16px;
  --r-lg:  22px;
  --r-xl:  30px;
  --r-pill: 999px;

  /* Ombre stratificate */
  --sh-1: 0 1px 2px rgba(7,26,27,.05), 0 2px 6px rgba(7,26,27,.04);
  --sh-2: 0 2px 4px rgba(7,26,27,.04), 0 8px 20px rgba(7,26,27,.06);
  --sh-3: 0 4px 8px rgba(7,26,27,.04), 0 18px 44px rgba(7,26,27,.10);
  --sh-4: 0 8px 16px rgba(7,26,27,.06), 0 32px 72px rgba(7,26,27,.14);

  /* Movimento */
  --e-out:   cubic-bezier(.22, 1, .36, 1);
  --e-inout: cubic-bezier(.65, 0, .35, 1);
  --e-soft:  cubic-bezier(.33, 1, .68, 1);
  --t-fast: .18s;
  --t-mid:  .34s;
  --t-slow: .6s;

  --header-h: 76px;
}

/* --------------------------------------------------------------------------
   2. RESET
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

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

body {
  font-family: var(--font-text);
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-synthesis-weight: none;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, picture, svg, video { display: block; max-width: 100%; }
img { height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }
:focus-visible {
  outline: 2px solid var(--aqua);
  outline-offset: 3px;
  border-radius: 4px;
}

/* --------------------------------------------------------------------------
   3. TIPOGRAFIA
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, .display {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -.022em;
  font-variation-settings: "SOFT" 24, "WONK" 1, "opsz" 90;
  text-wrap: balance;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: 1.15; font-variation-settings: "SOFT" 18, "WONK" 0, "opsz" 40; }
h4 {
  font-size: var(--fs-h4); line-height: 1.25;
  font-variation-settings: "SOFT" 14, "WONK" 0, "opsz" 22;
}

p { text-wrap: pretty; }
strong, b { font-weight: 600; }

.lead {
  font-size: var(--fs-lead);
  line-height: 1.55;
  color: var(--muted);
  letter-spacing: -.011em;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .6em;
  font-family: var(--font-text);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: .17em;
  text-transform: uppercase;
  color: var(--petrol);
}
.eyebrow::before {
  content: "";
  width: 26px; height: 2px;
  background: var(--aqua);
  border-radius: 2px;
  flex: none;
}
.eyebrow--center { justify-content: center; }

.muted { color: var(--muted); }
.small { font-size: var(--fs-small); }
.micro { font-size: var(--fs-micro); }

/* Parola evidenziata nei titoli */
.hl {
  color: var(--petrol);
  font-style: italic;
  font-variation-settings: "SOFT" 60, "WONK" 1, "opsz" 120;
}
.hl-mark {
  position: relative;
  white-space: nowrap;
}
.hl-mark::after {
  content: "";
  position: absolute;
  left: -.06em; right: -.06em; bottom: .06em;
  height: .34em;
  background: linear-gradient(90deg, var(--aqua-wash), rgba(79,201,189,.42));
  border-radius: 3px;
  z-index: -1;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .7s var(--e-out) .15s;
}
.is-revealed .hl-mark::after,
.reveal.is-in .hl-mark::after { transform: scaleX(1); }

/* --------------------------------------------------------------------------
   4. LAYOUT
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: var(--maxw-narrow); }

.section { padding-block: var(--section); position: relative; }
.section--sm { padding-block: var(--section-sm); }
.section--tight { padding-block: clamp(2.5rem, 2rem + 3vw, 4rem); }

.section-head { max-width: 42rem; margin-bottom: clamp(2.2rem, 1.6rem + 2.4vw, 3.6rem); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head h2 { margin-top: .7rem; }
.section-head p { margin-top: 1.1rem; }

.stack > * + * { margin-top: 1.05rem; }
.stack-lg > * + * { margin-top: 1.8rem; }

.grid { display: grid; gap: clamp(1.1rem, .8rem + 1.2vw, 1.9rem); }
/* 400px è la soglia che tiene davvero due colonne fino a ~900px di viewport:
   con valori più bassi auto-fit ne infila tre e le liste di quattro card
   restano con un elemento orfano in fondo. */
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }

.divider { height: 1px; background: var(--line); border: 0; }

/* Fondi alternati */
.bg-paper2 { background: var(--paper-2); }
.bg-dark {
  background: var(--petrol-900);
  color: #E8F1EF;
}
.bg-dark h1, .bg-dark h2, .bg-dark h3, .bg-dark h4 { color: #FCFEFD; }
.bg-dark .lead, .bg-dark .muted { color: rgba(232,241,239,.72); }
.bg-dark .eyebrow { color: var(--aqua-light); }
.bg-dark .divider { background: rgba(255,255,255,.12); }

/* Grana premium su fondi scuri */
.grain::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .35;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.42'/%3E%3C/svg%3E");
}

/* --------------------------------------------------------------------------
   5. BOTTONI
   -------------------------------------------------------------------------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6em;
  padding: .84em 1.5em;
  border-radius: var(--r-pill);
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: -.005em;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  isolation: isolate;
  overflow: hidden;
  transition: transform var(--t-mid) var(--e-out),
              box-shadow var(--t-mid) var(--e-out),
              background-color var(--t-fast) linear,
              color var(--t-fast) linear,
              border-color var(--t-fast) linear;
  will-change: transform;
}
.btn:hover { transform: translate3d(0, -2px, 0); }
.btn:active { transform: translate3d(0, 0, 0); transition-duration: .08s; }
.btn svg { flex: none; width: 1.05em; height: 1.05em; }

/* Sheen che attraversa il bottone all'hover */
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.22) 50%, transparent 70%);
  transform: translate3d(-120%, 0, 0);
  transition: transform .75s var(--e-out);
}
.btn:hover::before { transform: translate3d(120%, 0, 0); }

.btn-primary {
  background: var(--petrol);
  color: #F6FCFB;
  box-shadow: 0 1px 2px rgba(7,26,27,.16), 0 8px 22px rgba(14,71,68,.24);
}
.btn-primary:hover {
  background: var(--petrol-600);
  box-shadow: 0 2px 4px rgba(7,26,27,.18), 0 16px 36px rgba(14,71,68,.30);
}

.btn-accent {
  background: var(--aqua);
  color: #04211F;
  box-shadow: 0 1px 2px rgba(7,26,27,.12), 0 8px 22px rgba(23,163,152,.28);
}
.btn-accent:hover { background: var(--aqua-light); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
}
.btn-ghost:hover { border-color: var(--petrol); background: rgba(14,71,68,.04); }

.btn-light {
  background: rgba(255,255,255,.10);
  color: #EAF4F2;
  border: 1px solid rgba(255,255,255,.22);
  backdrop-filter: blur(8px);
}
.btn-light:hover { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.36); }

.btn-white { background: #fff; color: var(--petrol-700); box-shadow: var(--sh-3); }
.btn-sm { padding: .62em 1.15em; font-size: var(--fs-micro); }
.btn-lg { padding: 1em 1.9em; font-size: 1rem; }

/* Link con freccia animata */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  font-weight: 600;
  font-size: var(--fs-small);
  color: var(--petrol);
  transition: gap var(--t-mid) var(--e-out), color var(--t-fast) linear;
}
.link-arrow svg { width: 1.05em; height: 1.05em; transition: transform var(--t-mid) var(--e-out); }
.link-arrow:hover { gap: .85em; color: var(--aqua); }
.link-arrow:hover svg { transform: translate3d(2px, 0, 0); }

/* --------------------------------------------------------------------------
   6. HEADER
   -------------------------------------------------------------------------- */
.skip-link {
  position: fixed;
  top: .6rem; left: .6rem;
  z-index: 200;
  padding: .7em 1.2em;
  background: var(--petrol);
  color: #fff;
  border-radius: var(--r-pill);
  font-size: var(--fs-micro);
  font-weight: 600;
  transform: translate3d(0, -160%, 0);
  transition: transform var(--t-mid) var(--e-out);
}
.skip-link:focus { transform: translate3d(0, 0, 0); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251,250,247,.72);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-mid) linear, background-color var(--t-mid) linear,
              box-shadow var(--t-mid) var(--e-out);
}
.site-header.is-stuck {
  border-bottom-color: var(--line);
  background: rgba(251,250,247,.90);
  box-shadow: 0 1px 24px rgba(7,26,27,.06);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
}

.brand { display: inline-flex; align-items: center; gap: .7rem; flex: none; }
.brand-mark {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--petrol), var(--petrol-700));
  color: #fff;
  font-family: var(--font-display);
  font-size: .92rem;
  font-weight: 600;
  letter-spacing: .01em;
  box-shadow: 0 2px 8px rgba(14,71,68,.28), inset 0 1px 0 rgba(255,255,255,.16);
  transition: transform var(--t-mid) var(--e-out);
}
.brand:hover .brand-mark { transform: rotate(-4deg) scale(1.05); }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -.015em;
  font-variation-settings: "SOFT" 10, "WONK" 0, "opsz" 20;
}
.brand-role {
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.nav { display: flex; align-items: center; gap: .2rem; }
/* Il CTA dentro la nav esiste solo per il pannello mobile */
.nav .btn { display: none; }
.nav a:not(.btn) {
  position: relative;
  white-space: nowrap;
  padding: .55em .85em;
  border-radius: var(--r-sm);
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--ink-2);
  transition: color var(--t-fast) linear;
}
.nav a:not(.btn)::after {
  content: "";
  position: absolute;
  left: .85em; right: .85em; bottom: .3em;
  height: 1.5px;
  background: var(--aqua);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform var(--t-mid) var(--e-out);
}
.nav a:not(.btn):hover { color: var(--petrol); }
.nav a:not(.btn):hover::after,
.nav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left center; }
.nav a[aria-current="page"] { color: var(--petrol); font-weight: 600; }

.header-actions { display: flex; align-items: center; gap: .6rem; flex: none; }

.menu-toggle {
  display: none;
  width: 44px; height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  /* Griglia, non flex: place-content centra il blocco delle tre barre su
     entrambi gli assi. Su un flex in colonna servirebbe justify-content,
     ed è proprio la sua assenza che le lasciava incollate in alto. */
  place-content: center;
  justify-items: center;
  gap: 5px;
  transition: border-color var(--t-fast) linear, background-color var(--t-fast) linear;
}
.menu-toggle:hover { border-color: var(--petrol); background: var(--aqua-wash); }
.menu-toggle span {
  display: block;
  width: 18px; height: 2px;   /* intero: le tre barre cadono su pixel pieni */
  background: var(--ink);
  border-radius: 2px;
  transition: transform var(--t-mid) var(--e-out), opacity var(--t-fast) linear;
}
/* Passo fra i centri delle barre = altezza + gap = 7px: è la traslazione
   esatta che porta la prima e la terza a incrociarsi al centro. */
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translate3d(0, 7px, 0) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: scaleX(.3); }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translate3d(0, -7px, 0) rotate(-45deg); }

@media (max-width: 940px) {
  .menu-toggle { display: grid; }
  .header-actions .btn { display: none; }
  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: .25rem;
    padding: 1.2rem var(--gutter) 1.8rem;
    /* su schermi bassi o in orizzontale il pannello scorre invece di
       far uscire l'ultima voce dallo schermo */
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--sh-3);
    transform: translate3d(0, -12px, 0);
    opacity: 0;
    visibility: hidden;
    transition: transform var(--t-mid) var(--e-out), opacity var(--t-mid) linear,
                visibility 0s linear var(--t-mid);
  }
  .nav.is-open {
    transform: translate3d(0, 0, 0);
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
  }
  .nav a:not(.btn) { padding: .8em .4em; font-size: 1.05rem; border-bottom: 1px solid var(--line); }
  .nav a:not(.btn)::after { display: none; }
  .nav .btn { display: inline-flex; margin-top: 1rem; }
}

/* --------------------------------------------------------------------------
   7. HERO
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  padding-block: clamp(3.5rem, 2rem + 7vw, 7rem) clamp(3.5rem, 2rem + 6vw, 6.5rem);
  overflow: hidden;
  background:
    radial-gradient(80% 60% at 78% 8%, rgba(23,163,152,.13), transparent 62%),
    radial-gradient(70% 55% at 6% 92%, rgba(14,71,68,.10), transparent 60%),
    var(--paper);
}

/* Sfere gradiente in lento movimento (solo transform) */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: .5;
  pointer-events: none;
  will-change: transform;
}
.orb-1 {
  width: 460px; height: 460px;
  top: -140px; right: -110px;
  background: radial-gradient(circle at 35% 35%, rgba(79,201,189,.62), rgba(23,163,152,0) 68%);
  animation: float-a 22s var(--e-inout) infinite;
}
.orb-2 {
  width: 380px; height: 380px;
  bottom: -160px; left: -120px;
  background: radial-gradient(circle at 60% 40%, rgba(14,71,68,.40), rgba(14,71,68,0) 70%);
  animation: float-b 27s var(--e-inout) infinite;
}
@keyframes float-a {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50%      { transform: translate3d(-34px, 40px, 0) scale(1.08); }
}
@keyframes float-b {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50%      { transform: translate3d(38px, -32px, 0) scale(1.1); }
}

/* Griglia clinica di sfondo */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(7,26,27,.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(7,26,27,.045) 1px, transparent 1px);
  background-size: 62px 62px;
  mask-image: radial-gradient(78% 68% at 50% 32%, #000 8%, transparent 78%);
  -webkit-mask-image: radial-gradient(78% 68% at 50% 32%, #000 8%, transparent 78%);
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(0, .88fr);
  gap: clamp(2.2rem, 1rem + 4vw, 4rem);
  align-items: center;
}
/* Il titolo hero è composto di righe fisse: va dimensionato perché ci stiano */
.hero h1 { font-size: clamp(2.25rem, 1.5rem + 2.6vw, 3.5rem); }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
}

.hero h1 { margin-top: 1.1rem; }
.hero-copy { margin-top: 1.4rem; max-width: 34rem; }
.hero-actions {
  margin-top: 2.1rem;
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}

/* Badge disponibilità con battito */
.badge-live {
  display: inline-flex;
  align-items: center;
  gap: .55em;
  padding: .42em .95em .42em .75em;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--sh-1);
  font-size: var(--fs-micro);
  font-weight: 600;
  color: var(--ink-2);
}
.pulse-dot {
  position: relative;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--aqua);
  flex: none;
}
.pulse-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--aqua);
  animation: pulse-ring 2.2s var(--e-out) infinite;
}
@keyframes pulse-ring {
  0%   { transform: scale(1); opacity: .7; }
  70%  { transform: scale(3.2); opacity: 0; }
  100% { transform: scale(3.2); opacity: 0; }
}

/* Riga di prova sociale sotto l'hero */
.trust-row {
  margin-top: 2.6rem;
  padding-top: 1.7rem;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 120px), 1fr));
  gap: 1.2rem 1.6rem;
}
.trust-item { display: flex; flex-direction: column; gap: .15rem; }
.trust-value {
  font-family: var(--font-display);
  font-size: 1.42rem;
  font-weight: 600;
  letter-spacing: -.02em;
  color: var(--petrol);
  font-variation-settings: "SOFT" 12, "WONK" 0, "opsz" 30;
}
.trust-label {
  font-size: .78rem;
  line-height: 1.35;
  color: var(--muted-2);
  font-weight: 500;
}

/* Scheda ritratto */
.hero-figure { position: relative; }
.portrait {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--r-xl);
  overflow: hidden;
  background:
    linear-gradient(155deg, rgba(255,255,255,.14), transparent 55%),
    linear-gradient(160deg, var(--petrol) 0%, var(--petrol-700) 55%, var(--ink) 100%);
  box-shadow: var(--sh-4);
  border: 1px solid rgba(255,255,255,.14);
}
/* La foto copre il ripiego: essendo posizionata, va tenuta sopra
   il monogramma assoluto che sta sotto di lei nel flusso di pittura. */
.portrait img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 18%;
}
/* Ripiego elegante finché la foto non c'è: monogramma + ECG */
.portrait-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: .8rem;
  text-align: center;
  color: rgba(255,255,255,.9);
  padding: 2rem;
}
.portrait-fallback .mono {
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 500;
  letter-spacing: .02em;
  font-variation-settings: "SOFT" 40, "WONK" 1, "opsz" 144;
  opacity: .95;
}
.portrait-fallback .cap {
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(255,255,255,.55);
}

/* Etichetta fluttuante sul ritratto */
.portrait-tag {
  position: absolute;
  /* deve stare sopra foto (z-1), velo (z-1) e tracciato ECG (z-2) */
  z-index: 3;
  left: clamp(-1.6rem, -2vw, -.5rem);
  bottom: clamp(1.2rem, 3vw, 2.2rem);
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .8rem 1.15rem;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.7);
  border-radius: var(--r-md);
  box-shadow: var(--sh-3);
  max-width: min(78%, 300px);
}
.portrait-tag .icon {
  width: 34px; height: 34px;
  flex: none;
  display: grid; place-items: center;
  border-radius: 10px;
  background: var(--aqua-wash);
  color: var(--petrol);
}
.portrait-tag .icon svg { width: 18px; height: 18px; }
.portrait-tag-title { font-size: .84rem; font-weight: 700; line-height: 1.25; }
.portrait-tag-sub { font-size: .72rem; color: var(--muted-2); line-height: 1.3; }

/* Su telefono il ritratto si accorcia e l'etichetta esce da sopra la foto */
@media (max-width: 700px) {
  .portrait { aspect-ratio: 1 / 1; }
  .portrait-tag {
    position: static;
    max-width: none;
    margin-top: .9rem;
    box-shadow: var(--sh-2);
  }
}

/* Traccia ECG animata */
.ecg {
  position: absolute;
  left: 0; right: 0;
  bottom: 0;
  z-index: 2;
  height: 90px;
  pointer-events: none;
  opacity: .55;
}
/* Velo scuro in basso: dà stacco al tracciato ECG e all'etichetta
   quando sotto c'è la foto invece del fondo pieno. */
.portrait::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  z-index: 1;
  height: 42%;
  background: linear-gradient(to top, rgba(5,28,28,.72), transparent);
  pointer-events: none;
}
.ecg svg { width: 100%; height: 100%; }
.ecg path {
  fill: none;
  stroke: var(--aqua);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
  animation: ecg-draw 5.5s linear infinite;
}
@keyframes ecg-draw {
  0%   { stroke-dashoffset: 1400; }
  55%  { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -1400; }
}

/* --------------------------------------------------------------------------
   8. MARQUEE CREDENZIALI
   -------------------------------------------------------------------------- */
.marquee {
  position: relative;
  overflow: hidden;
  padding-block: 1.35rem;
  border-block: 1px solid var(--line);
  background: var(--surface);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex;
  width: max-content;
  gap: 2.6rem;
  animation: marquee 42s linear infinite;
  will-change: transform;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}
.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.marquee-item::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--aqua);
  flex: none;
}

/* --------------------------------------------------------------------------
   9. CARD
   -------------------------------------------------------------------------- */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(1.4rem, 1.1rem + 1vw, 2rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
  overflow: hidden;
  transition: transform var(--t-mid) var(--e-out),
              box-shadow var(--t-mid) var(--e-out),
              border-color var(--t-mid) linear;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--aqua), var(--petrol));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--t-slow) var(--e-out);
}
.card:hover {
  transform: translate3d(0, -6px, 0);
  box-shadow: var(--sh-3);
  border-color: rgba(23,163,152,.35);
}
.card:hover::before { transform: scaleX(1); }

.card-icon {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: var(--aqua-wash);
  color: var(--petrol);
  margin-bottom: 1.15rem;
  flex: none;
  transition: transform var(--t-mid) var(--e-out), background-color var(--t-mid) linear;
}
.card-icon svg { width: 23px; height: 23px; }
.card:hover .card-icon { transform: scale(1.08) rotate(-3deg); background: #D7EEEA; }

.card h3 { font-size: var(--fs-h4); }
.card h3 + p { margin-top: .65rem; }
.card p { font-size: var(--fs-small); color: var(--muted); }
.card .link-arrow { margin-top: auto; padding-top: 1.35rem; }

/* Card che è tutta un link */
.card-link::after {
  content: "";
  position: absolute;
  inset: 0;
}

/* Elenco di spunte dentro le card */
.ticks { display: grid; gap: .6rem; margin-top: 1.1rem; }
.ticks li {
  position: relative;
  padding-left: 1.7rem;
  font-size: var(--fs-small);
  line-height: 1.5;
  color: var(--muted);
}
.ticks li::before {
  content: "";
  position: absolute;
  left: 0; top: .42em;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--aqua-wash) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230E4744' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 10px no-repeat;
}
.bg-dark .ticks li { color: rgba(232,241,239,.78); }
.bg-dark .ticks li::before {
  background-color: rgba(79,201,189,.18);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234FC9BD' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}

/* Card servizio con numero d'ordine */
.card-num {
  position: absolute;
  top: 1.2rem; right: 1.4rem;
  font-family: var(--font-display);
  font-size: 2.6rem;
  line-height: 1;
  font-weight: 500;
  color: rgba(7,26,27,.055);
  font-variation-settings: "SOFT" 40, "WONK" 1, "opsz" 144;
  transition: color var(--t-mid) linear, transform var(--t-mid) var(--e-out);
  pointer-events: none;
}
.card:hover .card-num { color: rgba(23,163,152,.16); transform: translate3d(0, -3px, 0); }

/* Card scura */
.card-dark {
  background: linear-gradient(160deg, var(--petrol-600), var(--petrol-900));
  border-color: rgba(255,255,255,.10);
  color: #E8F1EF;
}
.card-dark h3 { color: #fff; }
.card-dark p { color: rgba(232,241,239,.72); }
.card-dark .card-icon { background: rgba(79,201,189,.16); color: var(--aqua-light); }
.card-dark .link-arrow { color: var(--aqua-light); }
.card-dark .card-num { color: rgba(255,255,255,.07); }

/* --------------------------------------------------------------------------
   10. STATISTICHE
   -------------------------------------------------------------------------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.stat {
  background: var(--surface);
  padding: clamp(1.5rem, 1.2rem + 1vw, 2.2rem);
  transition: background-color var(--t-mid) linear;
}
.stat:hover { background: var(--paper-2); }
.stat-value {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 1.7rem + 1.9vw, 3.2rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.03em;
  color: var(--petrol);
  font-variation-settings: "SOFT" 20, "WONK" 1, "opsz" 100;
  display: flex;
  align-items: baseline;
  gap: .06em;
}
.stat-label {
  margin-top: .7rem;
  font-size: var(--fs-small);
  line-height: 1.45;
  color: var(--muted);
}
.bg-dark .stats { background: rgba(255,255,255,.10); border-color: rgba(255,255,255,.12); }
.bg-dark .stat { background: var(--petrol-900); }
.bg-dark .stat:hover { background: var(--petrol-700); }
.bg-dark .stat-value { color: var(--aqua-light); }
.bg-dark .stat-label { color: rgba(232,241,239,.66); }

/* --------------------------------------------------------------------------
   11. TIMELINE PERCORSO
   -------------------------------------------------------------------------- */
.timeline { position: relative; padding-left: 2.4rem; }
.timeline::before {
  content: "";
  position: absolute;
  left: 7px; top: .6rem; bottom: .6rem;
  width: 2px;
  background: linear-gradient(180deg, var(--aqua), var(--line) 92%);
  border-radius: 2px;
  transform: scaleY(0);
  transform-origin: top center;
  transition: transform 1.4s var(--e-soft);
}
.timeline.is-in::before { transform: scaleY(1); }

.tl-item { position: relative; padding-bottom: 2.4rem; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: "";
  position: absolute;
  left: calc(-2.4rem + 1px);
  top: .5rem;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--surface);
  border: 3px solid var(--aqua);
  box-shadow: 0 0 0 5px var(--paper);
  transition: transform var(--t-mid) var(--e-out), background-color var(--t-mid) linear;
}
.tl-item:hover::before { transform: scale(1.22); background: var(--aqua); }
.tl-date {
  font-size: var(--fs-micro);
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--aqua);
}
.tl-item h3 { margin-top: .35rem; font-size: var(--fs-h4); }
.tl-place {
  margin-top: .3rem;
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--petrol);
}
.tl-item p { margin-top: .55rem; font-size: var(--fs-small); color: var(--muted); }

.bg-dark .timeline::before { background: linear-gradient(180deg, var(--aqua-light), rgba(255,255,255,.1) 92%); }
.bg-dark .tl-item::before { background: var(--petrol-900); box-shadow: 0 0 0 5px var(--petrol-900); }
.bg-dark .tl-place { color: var(--aqua-light); }

/* --------------------------------------------------------------------------
   12. FASCE / SPLIT EDITORIALE
   -------------------------------------------------------------------------- */
.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  gap: clamp(2rem, 1rem + 4vw, 4.5rem);
  align-items: center;
}
.split--top { align-items: start; }

.figure-frame {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--sh-3);
  background: linear-gradient(160deg, var(--petrol), var(--ink));
  aspect-ratio: 5 / 4;
}
.figure-frame img { width: 100%; height: 100%; object-fit: cover; }

/* Citazione */
.quote {
  position: relative;
  padding: clamp(1.8rem, 1.4rem + 1.6vw, 2.8rem);
  padding-left: clamp(2.6rem, 2rem + 2.4vw, 4rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-2);
}
.quote::before {
  content: "”";
  position: absolute;
  left: clamp(.9rem, .6rem + 1vw, 1.5rem);
  top: .1em;
  font-family: var(--font-display);
  font-size: 5rem;
  line-height: 1;
  color: var(--aqua);
  opacity: .3;
  font-variation-settings: "SOFT" 60, "WONK" 1, "opsz" 144;
}
.quote p {
  font-family: var(--font-display);
  font-size: var(--fs-lead);
  line-height: 1.45;
  font-weight: 400;
  letter-spacing: -.015em;
  font-variation-settings: "SOFT" 30, "WONK" 0, "opsz" 60;
}
.quote footer {
  margin-top: 1.2rem;
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted-2);
}

/* Pillole / tag */
.pills { display: flex; flex-wrap: wrap; gap: .5rem; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: .45em;
  padding: .4em .9em;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: var(--fs-micro);
  font-weight: 600;
  color: var(--ink-2);
  transition: transform var(--t-fast) var(--e-out), border-color var(--t-fast) linear,
              background-color var(--t-fast) linear;
}
.pill:hover { transform: translate3d(0, -2px, 0); border-color: var(--aqua); background: var(--aqua-wash); }
.pill--accent { background: var(--aqua-wash); border-color: rgba(23,163,152,.28); color: var(--petrol); }
.pill--gold { background: rgba(200,161,90,.12); border-color: rgba(200,161,90,.35); color: #7A5F26; }
.bg-dark .pill {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.16);
  color: rgba(232,241,239,.9);
}
.bg-dark .pill:hover { background: rgba(79,201,189,.14); border-color: var(--aqua-light); }

/* Riquadro in evidenza */
.callout {
  display: flex;
  gap: 1.1rem;
  padding: 1.3rem 1.5rem;
  border-radius: var(--r-md);
  background: var(--aqua-wash);
  border: 1px solid rgba(23,163,152,.24);
}
.callout .icon { flex: none; color: var(--petrol); }
.callout .icon svg { width: 22px; height: 22px; }
.callout p { font-size: var(--fs-small); color: var(--ink-2); }
.callout--signal { background: var(--signal-wash); border-color: rgba(217,88,76,.24); }
.callout--signal .icon { color: var(--signal); }

/* --------------------------------------------------------------------------
   13. ACCORDION FAQ
   -------------------------------------------------------------------------- */
.faq { display: grid; gap: .8rem; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--sh-1);
  overflow: hidden;
  transition: border-color var(--t-mid) linear, box-shadow var(--t-mid) var(--e-out);
}
.faq-item[open] { border-color: rgba(23,163,152,.35); box-shadow: var(--sh-2); }
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  padding: 1.15rem 1.4rem;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  font-size: var(--fs-small);
  line-height: 1.45;
  transition: color var(--t-fast) linear;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--petrol); }
.faq-chevron {
  flex: none;
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--aqua-wash);
  color: var(--petrol);
  transition: transform var(--t-mid) var(--e-out), background-color var(--t-mid) linear;
}
.faq-chevron svg { width: 13px; height: 13px; }
.faq-item[open] .faq-chevron { transform: rotate(180deg); background: var(--aqua); color: #fff; }
.faq-body { padding: 0 1.4rem 1.35rem; }
.faq-body p { font-size: var(--fs-small); color: var(--muted); }
.faq-body p + p { margin-top: .8rem; }
/* apertura fluida */
.faq-item[open] .faq-body { animation: faq-in .38s var(--e-out); }
@keyframes faq-in {
  from { opacity: 0; transform: translate3d(0, -8px, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

/* --------------------------------------------------------------------------
   14. CTA FINALE
   -------------------------------------------------------------------------- */
.cta {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-xl);
  padding: clamp(2.4rem, 1.8rem + 3.5vw, 4.5rem);
  background:
    radial-gradient(70% 120% at 88% 8%, rgba(23,163,152,.30), transparent 58%),
    linear-gradient(155deg, var(--petrol-600), var(--petrol-900));
  color: #EAF4F2;
  box-shadow: var(--sh-4);
}
.cta h2 { color: #fff; }
.cta p { color: rgba(234,244,242,.78); }
.cta-actions { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: .8rem; }
.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(70% 90% at 20% 100%, #000, transparent 72%);
  -webkit-mask-image: radial-gradient(70% 90% at 20% 100%, #000, transparent 72%);
  pointer-events: none;
}
.cta > * { position: relative; }

/* --------------------------------------------------------------------------
   15. CONTATTI
   -------------------------------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: clamp(1.2rem, .8rem + 1.6vw, 2rem);
}
.contact-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
  transition: transform var(--t-mid) var(--e-out), box-shadow var(--t-mid) var(--e-out),
              border-color var(--t-mid) linear;
}
.contact-card:hover {
  transform: translate3d(0, -4px, 0);
  box-shadow: var(--sh-3);
  border-color: rgba(23,163,152,.35);
}
.contact-card .icon {
  width: 44px; height: 44px;
  flex: none;
  display: grid; place-items: center;
  border-radius: 13px;
  background: var(--aqua-wash);
  color: var(--petrol);
}
.contact-card .icon svg { width: 21px; height: 21px; }
.contact-label {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.contact-value {
  margin-top: .2rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -.015em;
  font-variation-settings: "SOFT" 10, "WONK" 0, "opsz" 24;
  word-break: break-word;
}
.contact-note { margin-top: .3rem; font-size: var(--fs-micro); color: var(--muted-2); }

/* Form */
.form { display: grid; gap: 1.1rem; }
.field { display: grid; gap: .45rem; }
.field label {
  font-size: var(--fs-micro);
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: .82em 1em;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  font-size: var(--fs-small);
  transition: border-color var(--t-fast) linear, box-shadow var(--t-fast) linear;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--aqua);
  box-shadow: 0 0 0 3px rgba(23,163,152,.16);
}
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 1.1rem; }
.consent {
  display: flex;
  gap: .7rem;
  align-items: flex-start;
  font-size: var(--fs-micro);
  color: var(--muted);
  line-height: 1.5;
}
.consent input { width: 17px; height: 17px; margin-top: .18em; flex: none; accent-color: var(--petrol); }
.consent a { color: var(--petrol); text-decoration: underline; text-underline-offset: 2px; }

/* --------------------------------------------------------------------------
   16. BREADCRUMB + HERO PAGINA INTERNA
   -------------------------------------------------------------------------- */
.page-hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(2.8rem, 2rem + 4vw, 5rem) clamp(2.4rem, 1.8rem + 3vw, 4rem);
  background:
    radial-gradient(60% 70% at 88% 0%, rgba(23,163,152,.12), transparent 62%),
    var(--paper);
  border-bottom: 1px solid var(--line);
}
.page-hero h1 { margin-top: 1rem; max-width: 20ch; }
.page-hero .lead { margin-top: 1.3rem; max-width: 46rem; }
.page-hero .hero-actions { margin-top: 1.9rem; }

.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; font-size: var(--fs-micro); }
.breadcrumb li { display: flex; align-items: center; gap: .45rem; color: var(--muted-2); }
.breadcrumb a { color: var(--muted); transition: color var(--t-fast) linear; }
.breadcrumb a:hover { color: var(--petrol); }
.breadcrumb li + li::before { content: "/"; color: var(--line-strong); }
.breadcrumb [aria-current="page"] { color: var(--ink-2); font-weight: 600; }

/* Sommario laterale (pagine servizio) */
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: clamp(2rem, 1.4rem + 3vw, 4rem);
  align-items: start;
}
@media (max-width: 940px) {
  .article-layout { grid-template-columns: 1fr; }
  .sidebar { position: static !important; }
}
.sidebar { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 1.2rem; }

.prose > * + * { margin-top: 1.15rem; }
.prose h2 { margin-top: clamp(2.4rem, 2rem + 1.6vw, 3.4rem); }
.prose h3 { margin-top: 2rem; }
.prose h2 + p, .prose h3 + p { margin-top: .9rem; }
.prose p { color: var(--muted); }
.prose strong { color: var(--ink); }
.prose a:not(.btn):not(.link-arrow) {
  color: var(--petrol);
  text-decoration: underline;
  text-decoration-color: rgba(23,163,152,.4);
  text-underline-offset: 3px;
  transition: text-decoration-color var(--t-fast) linear;
}
.prose a:not(.btn):not(.link-arrow):hover { text-decoration-color: var(--aqua); }

/* --------------------------------------------------------------------------
   17. FOOTER
   -------------------------------------------------------------------------- */
.site-footer {
  position: relative;
  background: var(--petrol-900);
  color: rgba(232,241,239,.72);
  padding-block: clamp(3rem, 2.4rem + 3vw, 4.5rem) 2rem;
  overflow: hidden;
}
/* Niente auto-fit qui: mescolarlo con una traccia in fr fa sì che i minimi
   rigidi delle colonne consumino tutta la larghezza e la traccia flessibile
   del brand collassi a zero, mandando il contenuto fuori dalla cella.
   Meglio tre stadi espliciti. */
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 1.4rem + 2.4vw, 3.5rem);
}
.footer-brand { min-width: 0; }

/* Tablet: le tre colonne di link affiancate, il brand sopra a tutta larghezza */
@media (min-width: 620px) {
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}

/* Desktop: brand a sinistra, tre colonne di link a destra */
@media (min-width: 980px) {
  .footer-grid { grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); }
  .footer-brand { grid-column: auto; }
}
.site-footer .brand-name { color: #fff; }
.site-footer .brand-role { color: rgba(232,241,239,.5); }
.footer-about { margin-top: 1.2rem; font-size: var(--fs-small); max-width: 34ch; }
/* un numero di telefono spezzato su tre righe non è più un numero */
.site-footer .pill { white-space: nowrap; }
.footer-col h2 {
  font-family: var(--font-text);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--aqua-light);
  margin-bottom: 1rem;
}
.footer-col li + li { margin-top: .6rem; }
.footer-col a {
  font-size: var(--fs-small);
  color: rgba(232,241,239,.72);
  transition: color var(--t-fast) linear, transform var(--t-fast) var(--e-out);
  display: inline-block;
}
.footer-col a:hover { color: #fff; transform: translate3d(3px, 0, 0); }

.footer-bottom {
  margin-top: clamp(2.4rem, 2rem + 2vw, 3.5rem);
  padding-top: 1.6rem;
  border-top: 1px solid rgba(255,255,255,.12);
  display: flex;
  flex-wrap: wrap;
  gap: .8rem 1.6rem;
  align-items: center;
  justify-content: space-between;
  font-size: var(--fs-micro);
  color: rgba(232,241,239,.5);
}
.footer-bottom a { transition: color var(--t-fast) linear; }
.footer-bottom a:hover { color: var(--aqua-light); }
.footer-legal { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; }

/* Barra azioni mobile */
.action-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 90;
  display: none;
  gap: .6rem;
  padding: .7rem var(--gutter) calc(.7rem + env(safe-area-inset-bottom));
  background: rgba(251,250,247,.92);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  transform: translate3d(0, 110%, 0);
  transition: transform var(--t-mid) var(--e-out);
}
.action-bar.is-visible { transform: translate3d(0, 0, 0); }
.action-bar .btn { flex: 1; }
@media (max-width: 720px) {
  .action-bar { display: flex; }
  body { padding-bottom: 4.6rem; }
}

/* --------------------------------------------------------------------------
   18. ANIMAZIONI DI INGRESSO
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translate3d(0, 22px, 0);
  transition: opacity .7s var(--e-out), transform .7s var(--e-out);
  transition-delay: var(--delay, 0ms);
  will-change: transform, opacity;
}
.reveal.is-in {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}
.reveal.is-in { will-change: auto; }

.reveal-left  { transform: translate3d(-26px, 0, 0); }
.reveal-right { transform: translate3d(26px, 0, 0); }
.reveal-scale { transform: translate3d(0, 16px, 0) scale(.97); }
.reveal-left.is-in, .reveal-right.is-in, .reveal-scale.is-in { transform: translate3d(0, 0, 0) scale(1); }

/* Titolo hero: righe che salgono da una maschera */
.mask-lines { overflow: hidden; }
.mask-line {
  display: block;
  transform: translate3d(0, 110%, 0);
  transition: transform 1s var(--e-out);
  transition-delay: var(--delay, 0ms);
}
.is-loaded .mask-line { transform: translate3d(0, 0, 0); }

/* Fallback: se il JS non parte, mostra tutto */
.no-js .reveal { opacity: 1; transform: none; }
.no-js .mask-line { transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal, .mask-line { opacity: 1 !important; transform: none !important; }
  .hl-mark::after { transform: scaleX(1) !important; }
  .timeline::before { transform: scaleY(1) !important; }
}

/* --------------------------------------------------------------------------
   19. UTILITY
   -------------------------------------------------------------------------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: .8rem; }
.mt-2 { margin-top: 1.6rem; }
.mt-3 { margin-top: 2.4rem; }
.mt-4 { margin-top: 3.2rem; }
.center-actions { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; }

@media print {
  .site-header, .action-bar, .site-footer, .orb, .ecg { display: none !important; }
  body { background: #fff; }
}
