/* Fraunces 400 latin-ext */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/fraunces-400-latin-ext.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;
}
/* Fraunces 400 latin */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/fraunces-400-latin.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;
}
/* Fraunces 600 latin-ext */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/assets/fonts/fraunces-400-latin-ext.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;
}
/* Fraunces 600 latin */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/assets/fonts/fraunces-400-latin.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;
}
/* Fraunces 700 latin-ext */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/assets/fonts/fraunces-400-latin-ext.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;
}
/* Fraunces 700 latin */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/assets/fonts/fraunces-400-latin.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;
}
/* Inter 400 latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/inter-400-latin-ext.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;
}
/* Inter 400 latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/inter-400-latin.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;
}
/* Inter 500 latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/assets/fonts/inter-400-latin-ext.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;
}
/* Inter 500 latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/assets/fonts/inter-400-latin.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;
}
/* Inter 600 latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/assets/fonts/inter-400-latin-ext.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;
}
/* Inter 600 latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/assets/fonts/inter-400-latin.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;
}
/* Inter 700 latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/assets/fonts/inter-400-latin-ext.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;
}
/* Inter 700 latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/assets/fonts/inter-400-latin.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;
}
/* =====================================================================
   RENTASITE — TOKEN: unica fonte di verità.
   Se non è un token, non si spedisce.
   Un canvas · un inchiostro · un accento · due font ·
   una scala di spacing · una famiglia di raggi · quattro ombre · una easing
   ===================================================================== */

:root {
  /* --- Colore ------------------------------------------------------ */
  --paper:            #FAFAF8;   /* canvas caldo, mai #FFFFFF */
  --paper-deep:       #F4F3EF;   /* fondo del gradiente / sezioni soft */
  --card:             #FDFCFA;   /* superficie card: fill, non bordo */
  --ink:              #16181D;   /* near-black, mai #000000 */
  --ink-soft:         #1D2027;
  --grey:             #686C74;   /* AA su canvas (4.75:1) */
  --grey-strong:      #4A4E56;   /* testo di supporto lungo */
  --hairline:         rgba(22, 24, 29, 0.12);
  --hairline-strong:  rgba(22, 24, 29, 0.20);

  --surface-dark:     #0E0F12;   /* l'unica superficie scura */
  --surface-dark-2:   #16181D;
  --hairline-invert:  rgba(255, 255, 255, 0.10);
  --ink-invert-soft:  #C9CBD1;
  --grey-invert:      #A8ACB4;

  --accent:           #5B2BD6;   /* l'unico viola — momento, mai superficie */
  --accent-hover:     #7448EC;
  --accent-deep:      #451CAB;
  --accent-text:      #5B2BD6;   /* accento come testo su canvas (6.9:1) */
  --accent-invert:    #8A6BFF;   /* accento come testo su superficie scura (5.1:1) */
  --danger:           #A3341F;

  /* --- Famiglia d'accento — solo per gradienti, sfondi e infografiche.
         Il testo resta inchiostro; l'accento primario resta uno. ------- */
  --accent-2:         #3C6DF0;   /* indaco — struttura */
  --accent-3:         #C438A0;   /* magenta — voce del brand */
  --accent-warm:      #F2A93B;   /* ambra — persone, calore */
  --tint-1:           color-mix(in srgb, var(--accent) 10%, transparent);
  --tint-2:           color-mix(in srgb, var(--accent-2) 10%, transparent);
  --tint-3:           color-mix(in srgb, var(--accent-3) 10%, transparent);
  --tint-warm:        color-mix(in srgb, var(--accent-warm) 12%, transparent);
  --surface-hero:     #0B0810;   /* inchiostro con cast viola */
  --mesh-image:       url("/assets/img/rs-mesh.webp");
  --grain:            url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");


  /* --- Tipografia — due famiglie, una scala ------------------------ */
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --text-label:   12px;
  --text-button:  14px;
  --text-nav:     16px;
  --text-small:   16px;
  --text-body:    18px;
  --text-lead:    20px;
  --text-h3:      clamp(1.25rem, 1rem + .8vw, 1.5rem);      /* 20 → 24 */
  --text-h2:      clamp(1.5rem, 1rem + 2.2vw, 2.5rem);      /* 24 → 40 */
  --text-h1:      clamp(1.75rem, .9rem + 4.2vw, 3.5rem);    /* 28 → 56 */

  --lh-body:      1.5;
  --lh-label:     1.3;
  --lh-h3:        1.2;
  --lh-h2:        1.08;
  --lh-display:   0.98;          /* si stringe man mano che la size cresce */
  --track-label:  1px;           /* si apre sotto i 14px in maiuscolo */
  --track-button: 1.5px;
  --track-display: -0.5px;       /* si stringe sul display */
  --measure:      62ch;

  /* --- Spacing — scala 8, niente valori fuori scala ---------------- */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 40px;
  --space-6: 48px;
  --space-8: 64px;
  --space-10: 80px;

  --shell:     1200px;
  --header-h:  72px;
  --logo-h:    52px;
  --section-y: clamp(var(--space-8), 7vw, var(--space-10));
  --hero-y:    clamp(var(--space-6), 6vw, var(--space-10));

  /* --- Raggi — piccolo elemento, piccolo raggio -------------------- */
  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   16px;
  --radius-xl:   24px;
  --radius-pill: 999px;

  /* --- Ombre — tre step tintati d'inchiostro + un glow ------------- */
  --shadow-sm:   0 1px 2px rgba(16, 18, 29, 0.06);
  --shadow-md:   0 8px 24px rgba(16, 18, 29, 0.10);
  --shadow-lg:   0 20px 50px rgba(16, 18, 29, 0.16);
  --shadow-glow: 0 0 30px rgba(91, 43, 214, 0.30);

  /* --- Motion — una easing firma, due bande di durata -------------- */
  --ease-signature: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast:     .2s;
  --dur-ui:       .4s;
  --dur-entrance: 1.2s;
  --reveal-shift: 32px;
}
/* =====================================================================
   CORE — reset, base, layout, componenti, motion
   Ogni valore qui dentro è un riferimento a un token di :root.
   Nessun hex grezzo, nessun numero magico.
   ===================================================================== */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: var(--lh-body);
  color: var(--ink);
  background: var(--paper);
  background-image: linear-gradient(180deg, var(--paper) 0%, var(--paper-deep) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body.menu-open { overflow: hidden; }

img, svg, video { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }

/* ---------- Tipografia: ogni size esce dalla scala ---------- */

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; letter-spacing: var(--track-display); }
h1 { font-size: var(--text-h1); line-height: var(--lh-display); }
h2 { font-size: var(--text-h2); line-height: var(--lh-h2); }
h3 { font-size: var(--text-h3); line-height: var(--lh-h3); letter-spacing: 0; }
h1 em, h2 em { font-style: italic; font-weight: 400; color: var(--ink-soft); }

p { max-width: var(--measure); }
strong { font-weight: 600; }

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-label);
  line-height: var(--lh-label);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  font-weight: 500;
  color: var(--grey);
}
.lead { font-size: var(--text-lead); color: var(--ink-soft); }

/* ---------- Layout ---------- */

.shell { width: min(100% - var(--space-4), var(--shell)); margin-inline: auto; }
.section { padding-block: var(--section-y); }
.section-soft { background: var(--paper-deep); }

.section-ink {
  background: var(--surface-dark);
  color: var(--paper);
}
.section-ink h1, .section-ink h2, .section-ink h3 { color: var(--paper); }
.section-ink h1 em, .section-ink h2 em { color: var(--paper); opacity: .72; }
.section-ink p { color: var(--ink-invert-soft); }
.section-ink .eyebrow { color: var(--grey-invert); }

.section-heading { display: grid; gap: var(--space-3); margin-bottom: var(--space-6); }
.section-heading .eyebrow { margin-bottom: var(--space-1); }
.heading-split { grid-template-columns: 1fr; }
@media (min-width: 900px) {
  .heading-split { grid-template-columns: 1.1fr .9fr; gap: var(--space-6); align-items: end; }
  .heading-split > p { color: var(--grey-strong); }
}
.heading-wide { max-width: 56ch; }

/* ---------- Accessibilità ---------- */

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: var(--space-2); top: calc(var(--space-2) * -6);
  z-index: 100; background: var(--ink); color: var(--paper);
  padding: var(--space-1) var(--space-2); border-radius: var(--radius-sm);
  text-decoration: none; transition: top var(--dur-ui) var(--ease-signature);
}
.skip-link:focus { top: var(--space-2); }

:where(a, button, input, select, textarea, summary, details):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}
.section-ink :where(a, button, summary):focus-visible { outline-color: var(--accent-invert); }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: blur(12px) saturate(1.4);
  border-bottom: 1px solid transparent;
  transition: background var(--dur-ui) var(--ease-signature),
              border-color var(--dur-ui) var(--ease-signature),
              box-shadow var(--dur-ui) var(--ease-signature);
}
.site-header.is-scrolled {
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  border-bottom-color: var(--hairline);
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-3); min-height: var(--header-h);
}
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { width: auto; height: var(--logo-h); object-fit: contain; }

.main-nav { display: flex; align-items: center; gap: var(--space-3); }
.main-nav a {
  font-size: var(--text-nav); line-height: var(--lh-body);
  text-decoration: none; color: var(--ink-soft);
  transition: opacity var(--dur-fast) var(--ease-signature);
}
.main-nav a:hover { opacity: .6; }
.main-nav a[aria-current="page"] { color: var(--ink); font-weight: 500; }
.main-nav a[aria-current="page"]:not(.nav-cta)::after {
  content: ""; display: block; height: 2px; margin-top: 4px;
  background: var(--accent); border-radius: var(--radius-pill);
}

.nav-cta {
  background: var(--ink); color: var(--paper) !important;
  padding: 10px var(--space-3); border-radius: var(--radius-pill);
  font-size: var(--text-button); letter-spacing: var(--track-button);
  text-transform: uppercase; font-weight: 500;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--dur-ui) var(--ease-signature),
              transform var(--dur-ui) var(--ease-signature),
              opacity var(--dur-fast) var(--ease-signature);
}
.nav-cta:hover { opacity: 1; box-shadow: var(--shadow-md); }
.nav-cta:active { transform: scale(.97); }

.menu-toggle {
  display: none; width: 44px; height: 44px; border: 1px solid var(--hairline);
  background: transparent; border-radius: var(--radius-pill); cursor: pointer;
  align-items: center; justify-content: center; flex-direction: column; gap: 5px;
}
.menu-toggle i { display: block; width: 18px; height: 1.5px; background: var(--ink); transition: transform var(--dur-ui) var(--ease-signature), opacity var(--dur-ui) var(--ease-signature); }
.menu-toggle[aria-expanded="true"] i:first-of-type { transform: translateY(3.25px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] i:last-of-type { transform: translateY(-3.25px) rotate(-45deg); }

@media (max-width: 899px) {
  .menu-toggle { display: inline-flex; }
  .main-nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--hairline);
    padding: var(--space-2) var(--space-3) var(--space-4);
    box-shadow: var(--shadow-lg);
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: opacity var(--dur-ui) var(--ease-signature), transform var(--dur-ui) var(--ease-signature);
  }
  .main-nav.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .main-nav a { padding-block: var(--space-2); border-bottom: 1px solid var(--hairline); }
  .main-nav a[aria-current="page"]:not(.nav-cta)::after { display: none; }
  .nav-cta { border-bottom: 0 !important; text-align: center; margin-top: var(--space-2); padding-block: var(--space-2); }
}

/* ---------- Bottoni e link ---------- */

.button {
  display: inline-flex; align-items: center; gap: var(--space-1);
  background: var(--ink); color: var(--paper);
  padding: var(--space-2) var(--space-4);
  border: 0; border-radius: var(--radius-xl); cursor: pointer;
  font-size: var(--text-button); line-height: 1; font-weight: 500;
  letter-spacing: var(--track-button); text-transform: uppercase; text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--dur-ui) var(--ease-signature), transform var(--dur-ui) var(--ease-signature);
}
.button::after { content: "→"; color: var(--accent); font-size: 15px; transition: transform var(--dur-ui) var(--ease-signature); }
.button:hover { box-shadow: var(--shadow-md); }
.button:hover::after { transform: translateX(3px); }
.button:active { transform: scale(.97); }

.button-light { background: var(--paper); color: var(--ink); }
.button-light::after { color: var(--accent-text); }
.section-ink .button-light::after { color: var(--accent); }

.text-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--accent-text); text-decoration: none; font-weight: 500;
  transition: opacity var(--dur-fast) var(--ease-signature);
}
.text-link span { transition: transform var(--dur-ui) var(--ease-signature); }
.text-link:hover { opacity: .6; }
.text-link:hover span { transform: translateX(3px); }
.section-ink .text-link { color: var(--accent-invert); }

/* ---------- Superfici ---------- */

.card, .surface {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--dur-ui) var(--ease-signature), transform var(--dur-ui) var(--ease-signature);
}
a.card:hover, a.surface:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.section-ink .card, .section-ink .surface {
  background: var(--surface-dark-2); box-shadow: none; border: 1px solid var(--hairline-invert);
}

.chip {
  display: inline-flex; align-items: center;
  border: 1.5px solid var(--ink); border-radius: var(--radius-pill);
  padding: 6px var(--space-2);
  font-size: var(--text-label); letter-spacing: var(--track-label);
  text-transform: uppercase; font-weight: 500; text-decoration: none;
  transition: background var(--dur-fast) var(--ease-signature),
              color var(--dur-fast) var(--ease-signature),
              border-color var(--dur-fast) var(--ease-signature);
}
.chip:hover { background: var(--accent); border-color: var(--accent); color: var(--paper); }

.check-list { list-style: none; padding: 0; display: grid; gap: var(--space-1); }
.check-list li { position: relative; padding-left: var(--space-3); color: var(--grey-strong); }
.check-list li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: var(--space-1); height: var(--space-1); border-radius: var(--radius-pill);
  background: var(--accent);
}
.section-ink .check-list li { color: var(--ink-invert-soft); }

/* ---------- Hero condiviso ---------- */

.hero { padding-block: var(--hero-y) var(--section-y); position: relative; }
.hero-grid { display: grid; gap: var(--space-6); align-items: center; }
@media (min-width: 1000px) { .hero-grid { grid-template-columns: 1.05fr .95fr; gap: var(--space-6); } }
.hero-copy > * + * { margin-top: var(--space-2); }
.hero-copy h1 { margin-top: var(--space-3); }
.hero-lead { font-size: var(--text-lead); color: var(--grey-strong); max-width: var(--measure); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); margin-top: var(--space-4) !important; }
.hero-note { font-size: var(--text-small); color: var(--grey); }

.trust-line { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-4) !important; }
.trust-line li {
  font-size: var(--text-label); letter-spacing: var(--track-label); text-transform: uppercase;
  color: var(--grey); display: inline-flex; align-items: center; gap: var(--space-1);
}
.trust-line li::before { content: ""; width: 4px; height: 4px; border-radius: var(--radius-pill); background: var(--accent); flex: none; }

/* ---------- Page hero (pagine interne) ---------- */

.page-hero { padding-block: calc(var(--section-y) * .9) calc(var(--section-y) * .5); }
.page-hero-grid { display: grid; gap: var(--space-4); }
@media (min-width: 900px) { .page-hero-grid { grid-template-columns: 1.15fr .85fr; align-items: end; gap: var(--space-6); } }
.page-hero-grid > p { font-size: var(--text-lead); color: var(--grey-strong); }
.page-hero h1 { margin-top: var(--space-2); }

/* ---------- Final CTA ---------- */

.final-cta-inner, .final-cta-card {
  background: var(--surface-dark);
  color: var(--paper);
  border-radius: var(--radius-lg);
  padding: clamp(var(--space-6), 7vw, var(--space-8));
  display: grid; gap: var(--space-3); justify-items: start;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}
.final-cta-inner h2, .final-cta-card h2 { color: var(--paper); max-width: 22ch; }
.final-cta-inner h2 em, .final-cta-card h2 em { color: var(--paper); opacity: .72; }
.final-cta-inner .eyebrow, .final-cta-card .eyebrow { color: var(--grey-invert); }
.final-cta-inner p, .final-cta-card p { color: var(--ink-invert-soft); }
.final-cta-inner .button, .final-cta-card .button { margin-top: var(--space-2); }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--paper-deep); color: var(--grey-strong);
  border-top: 1px solid var(--hairline);
  padding-block: var(--space-8) var(--space-4);
}
.footer-grid, .footer-top { display: grid; gap: var(--space-6); }
@media (min-width: 700px) { .footer-grid, .footer-top { grid-template-columns: 1.4fr repeat(3, 1fr); gap: var(--space-4); } }
.site-footer h2 {
  font-family: var(--font-body); font-size: var(--text-label); letter-spacing: var(--track-label);
  text-transform: uppercase; color: var(--grey); margin-bottom: var(--space-2); font-weight: 500;
}
.site-footer a, .site-footer span:not(.brand span) { display: block; text-decoration: none; color: var(--grey-strong); padding-block: 5px; transition: color var(--dur-fast) var(--ease-signature); }
.site-footer a:hover { color: var(--ink); }
.site-footer p { color: var(--grey); font-size: var(--text-small); max-width: 34ch; margin-top: var(--space-2); }
/* Il logo ufficiale resta nei suoi colori: nessun filtro, nessuna inversione. */
.brand-footer img { filter: none; }
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: var(--space-2); justify-content: space-between;
  margin-top: var(--space-6); padding-top: var(--space-3);
  border-top: 1px solid var(--hairline);
  font-size: var(--text-small); color: var(--grey);
}

.whatsapp-float {
  position: fixed; right: var(--space-3); bottom: var(--space-3); z-index: 40;
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 56px; height: 56px; padding-inline: var(--space-2);
  background: var(--ink); color: var(--paper); text-decoration: none;
  border-radius: var(--radius-pill); box-shadow: var(--shadow-md);
  font-size: var(--text-button); letter-spacing: var(--track-button); text-transform: uppercase;
  transition: transform var(--dur-ui) var(--ease-signature), box-shadow var(--dur-ui) var(--ease-signature);
}
.whatsapp-float:hover { box-shadow: var(--shadow-lg); }
.whatsapp-float:active { transform: scale(.97); }

/* ---------- Form ---------- */

.contact-grid { display: grid; gap: var(--space-6); align-items: start; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: .8fr 1.2fr; } }

.contact-card { background: var(--card); border-radius: var(--radius-lg); padding: var(--space-4); box-shadow: var(--shadow-sm); display: grid; gap: var(--space-2); align-content: start; }
.contact-card > a, .contact-card address {
  display: grid; gap: 2px; text-decoration: none; font-style: normal;
  padding-block: var(--space-2); border-top: 1px solid var(--hairline);
  transition: opacity var(--dur-fast) var(--ease-signature);
}
.contact-card > a:hover { opacity: .6; }
.contact-card span { font-size: var(--text-label); letter-spacing: var(--track-label); text-transform: uppercase; color: var(--grey); }
.contact-card strong { font-size: var(--text-body); font-weight: 500; }

.contact-form { display: grid; gap: var(--space-3); background: var(--card); border-radius: var(--radius-lg); padding: clamp(var(--space-3), 4vw, var(--space-5)); box-shadow: var(--shadow-sm); }
.contact-form label { display: grid; gap: var(--space-1); font-size: var(--text-small); font-weight: 500; }
.contact-form label small { color: var(--grey); font-weight: 400; }
.field-row { display: grid; gap: var(--space-3); align-items: end; }
@media (min-width: 700px) { .field-row { grid-template-columns: 1fr 1fr; } }
.contact-form input[type="text"], .contact-form input[type="email"], .contact-form select, .contact-form textarea {
  width: 100%; padding: 14px var(--space-2);
  background: var(--paper);
  border: 1px solid var(--hairline-strong); border-radius: var(--radius-sm);
  font-size: var(--text-body); font-weight: 400;
  transition: border-color var(--dur-fast) var(--ease-signature), box-shadow var(--dur-fast) var(--ease-signature);
}
.contact-form textarea { resize: vertical; min-height: 160px; }
.contact-form :is(input, select, textarea):focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.consent { grid-template-columns: auto 1fr; align-items: start; gap: var(--space-1) !important; font-weight: 400 !important; }
.consent input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--accent); }
.consent a { color: var(--accent-text); }
.honeypot { position: absolute; left: -9999px; }
.form-note { font-size: var(--text-small); color: var(--grey); }
.form-status { padding: var(--space-2) var(--space-3); border-radius: var(--radius-md); font-size: var(--text-small); }
.form-status.success { background: color-mix(in srgb, var(--accent) 12%, var(--paper)); color: var(--accent-deep); }
.form-status.error { background: color-mix(in srgb, var(--danger) 10%, var(--paper)); color: var(--danger); }
.form-status ul { margin: var(--space-1) 0 0; padding-left: var(--space-2); }

/* ---------- FAQ ---------- */

.faq-list { display: grid; gap: var(--space-2); }
.faq-list details {
  background: var(--card); border-radius: var(--radius-md);
  padding: var(--space-3); box-shadow: var(--shadow-sm);
}
.faq-list summary {
  cursor: pointer; font-weight: 500; list-style: none;
  display: flex; justify-content: space-between; align-items: start; gap: var(--space-2);
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; color: var(--accent); font-size: var(--text-lead); line-height: 1; transition: transform var(--dur-ui) var(--ease-signature); }
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list p { margin-top: var(--space-2); color: var(--grey-strong); }

/* ---------- Motion — una sola easing, due bande di durata ---------- */

.js [data-reveal] {
  opacity: 0; transform: translateY(var(--reveal-shift));
  transition: opacity var(--dur-entrance) var(--ease-signature),
              transform var(--dur-entrance) var(--ease-signature);
}
.js [data-reveal].is-visible { opacity: 1; transform: none; }
.js [data-reveal]:nth-child(2) { transition-delay: .1s; }
.js [data-reveal]:nth-child(3) { transition-delay: .2s; }
.js [data-reveal]:nth-child(4) { transition-delay: .3s; }
.js [data-reveal]:nth-child(5) { transition-delay: .4s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
  .js [data-reveal] { opacity: 1 !important; transform: none !important; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .whatsapp-float, .final-cta-inner, .final-cta-card { display: none; }
  body { background: #fff; }
}

/* ---------- Pagine legali ---------- */

.legal { display: grid; gap: var(--space-6); max-width: 76ch; }
.legal article { display: grid; gap: var(--space-2); }
.legal h2 { font-size: var(--text-h3); }
.legal p { color: var(--grey-strong); }
.legal a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; transition: opacity var(--dur-fast) var(--ease-signature); }
.legal a:hover { opacity: .6; }
.legal code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: var(--text-small);
  background: var(--paper-deep); border: 1px solid var(--hairline); border-radius: var(--radius-sm); padding: 1px 6px;
}
.legal-note { font-size: var(--text-small); color: var(--grey); border-left: 2px solid var(--hairline-strong); padding-left: var(--space-2); }
/* =====================================================================
   RENTASITE — composizioni di pagina
   Solo riferimenti a token. Nessun hex grezzo, nessun pixel magico.
   ===================================================================== */

/* ---------- Hero: il mock del sito ----------
   È un'illustrazione: rappresenta il sito di un cliente qualunque, quindi ha
   una sua piccola tavolozza giocosa. Fuori da questo blocco non si usa. */

.site-builder {
  --mock-ink: #17161C;
  --mock-grey: #6C6A78;
  --mock-red: #F04E3E;
  --mock-violet: #6B4BF0;
  --mock-amber: #F2A93B;
  --mock-mint-bg: #CFF2DF;
  --mock-mint-ink: #14electric;
  --mock-mint-ink: #146B45;
  --mock-lav: #E6DFFA;
  --mock-pink: #FBD9D6;
  --mock-yellow: #FBEEC0;

  position: relative;
  padding: var(--space-2) clamp(var(--space-2), 3vw, var(--space-5)) 128px;
  transform: perspective(1200px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: transform var(--dur-entrance) var(--ease-signature);
  will-change: transform;
}
.builder-card {
  background: #FFFFFF;
  border-radius: var(--radius-xl);
  padding: var(--space-2) var(--space-2) var(--space-2);
  box-shadow: 0 30px 60px rgba(23, 22, 28, .12), 0 2px 6px rgba(23, 22, 28, .05);
}
.builder-toolbar {
  display: flex; align-items: center; gap: 6px;
  padding: var(--space-1) var(--space-1) var(--space-2);
}
.builder-toolbar i { width: 10px; height: 10px; border-radius: var(--radius-pill); background: var(--mock-red); }
.builder-toolbar i:nth-child(2) { background: var(--mock-amber); }
.builder-toolbar i:nth-child(3) { background: #4CC98A; }
.builder-toolbar span {
  margin-left: var(--space-2); flex: 1; max-width: 260px;
  background: #F2F1F6; border-radius: var(--radius-pill);
  padding: 5px var(--space-2); font-size: var(--text-label); color: var(--mock-grey); text-align: center;
}
.builder-canvas { border-radius: var(--radius-lg); overflow: hidden; }
.mini-nav {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-2);
  padding: var(--space-2) var(--space-5); border-bottom: 1px solid #EFEDF5;
  font-size: var(--text-label);
}
.mini-nav b { color: var(--mock-violet); text-transform: uppercase; letter-spacing: 1px; }
.mini-nav span { color: var(--mock-grey); }
.mini-hero { position: relative; padding: var(--space-5) var(--space-5) var(--space-4); display: grid; gap: var(--space-2); justify-items: start; }
.mini-hero small {
  font-size: var(--text-label); letter-spacing: 1px; text-transform: uppercase;
  font-weight: 600; color: var(--mock-red);
}
.mini-hero strong {
  font-family: var(--font-body); font-size: clamp(1.25rem, 2.4vw, 1.75rem);
  font-weight: 700; line-height: 1.12; color: var(--mock-ink); letter-spacing: -.4px; max-width: 62%;
}
.mini-orb {
  position: absolute; right: var(--space-4); top: 50%; translate: 0 -50%;
  width: clamp(80px, 12vw, 132px); aspect-ratio: 1; border-radius: var(--radius-pill);
  background: linear-gradient(150deg, #FF9A3D 0%, #F0553F 45%, #E0389B 100%);
  box-shadow: 0 18px 40px rgba(224, 56, 155, .28);
}
.mini-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-2); padding: 0 var(--space-5) var(--space-3); }
.mini-cards i { display: block; height: var(--space-8); border-radius: var(--radius-md); background: var(--mock-lav); }
.mini-cards i:nth-child(2) { background: var(--mock-pink); }
.mini-cards i:nth-child(3) { background: var(--mock-yellow); }

/* Le pastiglie: cosa c'è dentro il canone, appoggiate sui bordi della finestra */
.builder-layer, .builder-social, .builder-ready {
  background: #FFFFFF;
  box-shadow: 0 16px 34px rgba(23, 22, 28, .14);
}
.builder-layer {
  position: absolute; z-index: 2;
  display: grid; grid-template-areas: "num" "title" "sub"; gap: 1px;
  border-radius: var(--radius-pill);
  padding: var(--space-2) var(--space-3);
  border-left: 4px solid var(--mock-red);
}
.builder-layer span {
  grid-area: num; position: absolute; top: 10px; right: var(--space-2);
  font-size: 10px; letter-spacing: 1px; color: var(--mock-grey);
}
.builder-layer strong { grid-area: title; font-size: var(--text-small); font-weight: 700; color: var(--mock-ink); }
.builder-layer small { grid-area: sub; font-size: var(--text-label); color: var(--mock-grey); white-space: nowrap; }
.layer-1 { left: 0; top: 2%; border-left-color: var(--mock-red); }
.layer-2 { right: 0; top: 40%; border-left-color: var(--mock-violet); }
.layer-3 { left: 0; bottom: 192px; border-left-color: var(--mock-amber); }

/* 04 — i canali social gestiti con MyAutoSocial */
.builder-social {
  position: absolute; z-index: 3; right: 0; bottom: 0;
  width: min(330px, 78%); border-radius: var(--radius-lg);
  padding: var(--space-2) var(--space-3);
  display: grid; gap: 6px; border-left: 4px solid #3C6DF0;
}
.builder-social p { display: flex; align-items: baseline; gap: var(--space-1); margin: 0; }
.builder-social span { font-size: 10px; letter-spacing: 1px; color: var(--mock-grey); }
.builder-social strong { font-size: var(--text-small); font-weight: 700; color: var(--mock-ink); }
.builder-social em {
  font-family: var(--font-display); font-style: italic; font-size: var(--text-small);
  line-height: 1.25; color: var(--mock-ink);
}
.social-icons { list-style: none; padding: 0; margin: 2px 0 0; display: flex; align-items: center; gap: 8px; }
.social-icons .si { display: block; width: 26px; height: 26px; }
.social-icons svg { width: 100%; height: 100%; display: block; }

.builder-ready {
  position: absolute; z-index: 2; left: 0; bottom: var(--space-5);
  display: inline-flex; align-items: center; gap: var(--space-1);
  background: var(--mock-mint-bg); color: var(--mock-mint-ink);
  border-radius: var(--radius-pill); padding: 8px var(--space-3);
  font-size: var(--text-label); font-weight: 600; box-shadow: none;
}
.builder-ready i { width: 8px; height: 8px; border-radius: var(--radius-pill); background: #1FA96A; }

@media (max-width: 1099px) {
  .site-builder { padding: 0; display: grid; gap: var(--space-2); }
  .builder-layer, .builder-social, .builder-ready { position: static; translate: none; width: auto; }
  .builder-layer { border-radius: var(--radius-md); }
  .builder-ready { justify-self: start; }
  .layer-1, .layer-2, .layer-3 { inset: auto; }
}

/* ---------- Cosa include ---------- */

.included-grid { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.included-grid article {
  background: var(--card); border-radius: var(--radius-lg); padding: var(--space-4);
  box-shadow: var(--shadow-sm); display: grid; gap: var(--space-2); align-content: start;
  transition: box-shadow var(--dur-ui) var(--ease-signature), transform var(--dur-ui) var(--ease-signature);
}
.included-grid article:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.included-grid span { font-family: var(--font-display); font-size: var(--text-lead); color: var(--accent-text); }
.included-grid p { color: var(--grey-strong); font-size: var(--text-small); }

/* ---------- Il canone ---------- */

.rent-strip { background: var(--paper-deep); }
.rent-layout { display: grid; gap: var(--space-6); align-items: center; }
@media (min-width: 900px) { .rent-layout { grid-template-columns: 1fr 1fr; gap: var(--space-8); } }
.receipt {
  background: var(--card); border-radius: var(--radius-lg); padding: clamp(var(--space-3), 4vw, var(--space-5));
  box-shadow: var(--shadow-md); display: grid; gap: var(--space-2);
}
.receipt > div { display: flex; justify-content: space-between; gap: var(--space-3); padding-bottom: var(--space-2); border-bottom: 1px solid var(--hairline); }
.receipt span { color: var(--grey); font-size: var(--text-small); }
.receipt strong { font-weight: 500; font-size: var(--text-small); text-align: right; }
.receipt-total { border-bottom: 0 !important; padding-top: var(--space-1); }
.receipt-total span { color: var(--ink); font-size: var(--text-body); }
.receipt-total strong { font-family: var(--font-display); font-size: var(--text-h3); color: var(--accent-text); }
.receipt small { font-size: var(--text-label); line-height: var(--lh-body); color: var(--grey); }

/* ---------- Processo ---------- */

.process-list { list-style: none; padding: 0; display: grid; gap: 0; counter-reset: step; }
.process-list li {
  display: grid; grid-template-columns: auto 1fr auto; gap: var(--space-3);
  align-items: start; padding-block: var(--space-4); border-top: 1px solid var(--hairline);
}
.process-list li:last-child { border-bottom: 1px solid var(--hairline); }
.process-list li > span { font-family: var(--font-display); font-size: var(--text-h3); color: var(--accent-text); line-height: 1; }
.process-list p { color: var(--grey-strong); font-size: var(--text-small); margin-top: 4px; }
.process-list small {
  font-size: var(--text-label); letter-spacing: var(--track-label); text-transform: uppercase; color: var(--grey);
  border: 1px solid var(--hairline-strong); border-radius: var(--radius-pill); padding: 4px var(--space-2);
  white-space: nowrap;
}
@media (max-width: 699px) { .process-list li { grid-template-columns: auto 1fr; } .process-list small { grid-column: 2; justify-self: start; } }

/* ---------- Realizzazioni ---------- */

.work-grid { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.work-card {
  background: var(--card); border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-sm); display: grid; align-content: start;
  transition: box-shadow var(--dur-ui) var(--ease-signature), transform var(--dur-ui) var(--ease-signature);
}
.work-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.work-visual { background: var(--paper-deep); aspect-ratio: 4 / 3; overflow: hidden; }
.work-visual img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform var(--dur-entrance) var(--ease-signature); }
.work-card:hover .work-visual img { transform: scale(1.03); }
.work-card > div { padding: var(--space-3); display: grid; gap: var(--space-1); }
.work-card small { font-size: var(--text-label); letter-spacing: var(--track-label); text-transform: uppercase; color: var(--grey); }
.work-card p { color: var(--grey-strong); font-size: var(--text-small); }
.work-note { margin-top: var(--space-3); font-size: var(--text-label); letter-spacing: var(--track-label); text-transform: uppercase; color: var(--grey); }

/* ---------- Fit ---------- */

.fit { background: var(--paper-deep); }
.fit-grid { display: grid; gap: var(--space-4); align-items: start; }
@media (min-width: 900px) { .fit-grid { grid-template-columns: 1fr 1fr; gap: var(--space-8); } }
.fit-grid ul { list-style: none; padding: 0; display: grid; gap: var(--space-2); }
.fit-grid li { position: relative; padding-left: var(--space-4); padding-bottom: var(--space-2); border-bottom: 1px solid var(--hairline); color: var(--grey-strong); }
.fit-grid li::before { content: ""; position: absolute; left: 0; top: .62em; width: var(--space-1); height: var(--space-1); border-radius: var(--radius-pill); background: var(--accent); }

/* ---------- Il servizio ---------- */

.detail-grid { display: grid; gap: var(--space-6); align-items: start; }
@media (min-width: 900px) { .detail-grid { grid-template-columns: .8fr 1.2fr; gap: var(--space-8); } }
.detail-grid aside p { color: var(--grey-strong); margin-top: var(--space-2); }
.detail-grid aside h2 { margin-top: var(--space-1); }
.detail-list { display: grid; gap: 0; }
.detail-list article { display: grid; grid-template-columns: auto 1fr; gap: var(--space-3); padding-block: var(--space-3); border-top: 1px solid var(--hairline); }
.detail-list article:last-child { border-bottom: 1px solid var(--hairline); }
.detail-list span { font-family: var(--font-display); font-size: var(--text-lead); color: var(--accent-text); line-height: 1.2; }
.detail-list p { color: var(--grey-strong); font-size: var(--text-small); margin-top: 4px; }

.plan-grid { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.plan-grid article {
  background: var(--card); border-radius: var(--radius-lg); padding: var(--space-4);
  box-shadow: var(--shadow-sm); display: grid; gap: var(--space-2); align-content: start;
  transition: box-shadow var(--dur-ui) var(--ease-signature), transform var(--dur-ui) var(--ease-signature);
}
.plan-grid article:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.plan-grid span { font-size: var(--text-label); letter-spacing: var(--track-label); text-transform: uppercase; color: var(--grey); }
.plan-grid p { color: var(--grey-strong); font-size: var(--text-small); }
.plan-grid a { text-decoration: none; font-size: var(--text-button); letter-spacing: var(--track-button); text-transform: uppercase; color: var(--accent-text); transition: opacity var(--dur-fast) var(--ease-signature); }
.plan-grid a:hover { opacity: .6; }
.plan-grid article.plan-featured { background: var(--surface-dark); color: var(--paper); box-shadow: var(--shadow-lg), var(--shadow-glow); }
.plan-grid .plan-featured h3 { color: var(--paper); }
.plan-grid .plan-featured span { color: var(--accent-invert); }
.plan-grid .plan-featured p { color: var(--ink-invert-soft); }
.plan-grid .plan-featured a { color: var(--accent-invert); }

.faq-grid { display: grid; gap: var(--space-4); align-items: start; }
@media (min-width: 900px) { .faq-grid { grid-template-columns: .8fr 1.2fr; gap: var(--space-8); } }
.faq-grid h2 { margin-top: var(--space-1); }

/* =====================================================================
   Il mock si costruisce da solo — una sequenza sola, poi si ferma.
   Lo stato "a riposo" è quello finale: se l'animazione non parte
   (JS spento, reduced-motion, pannello accessibilità) si vede tutto.
   ===================================================================== */

@keyframes bm-card   { from { opacity: 0; transform: translateY(16px) scale(.985); } }
@keyframes bm-fade   { from { opacity: 0; transform: translateY(8px); } }
@keyframes bm-write  { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes bm-orb    { from { opacity: 0; transform: translate(0, -50%) scale(.35); } }
@keyframes bm-block  { from { opacity: 0; transform: scaleY(.2); } }
@keyframes bm-left   { from { opacity: 0; transform: translateX(-28px); } }
@keyframes bm-right  { from { opacity: 0; transform: translateX(28px); } }
@keyframes bm-up     { from { opacity: 0; transform: translateY(20px); } }
@keyframes bm-badge  {
  0%   { opacity: 0; transform: translateY(10px); background: #ECEBF2; color: var(--mock-grey); }
  55%  { opacity: 1; transform: none; background: #ECEBF2; color: var(--mock-grey); }
  100% { opacity: 1; transform: none; }
}
@keyframes bm-dot    { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.7); } }

.site-builder.is-visible .builder-card    { animation: bm-card .9s var(--ease-signature) both; }
.site-builder.is-visible .builder-toolbar i,
.site-builder.is-visible .builder-toolbar span { animation: bm-fade .5s var(--ease-signature) both .35s; }
.site-builder.is-visible .builder-toolbar i:nth-child(2) { animation-delay: .42s; }
.site-builder.is-visible .builder-toolbar i:nth-child(3) { animation-delay: .49s; }
.site-builder.is-visible .mini-nav        { animation: bm-fade .6s var(--ease-signature) both .6s; }
.site-builder.is-visible .mini-hero small { animation: bm-fade .5s var(--ease-signature) both .9s; }
.site-builder.is-visible .mini-hero strong span { display: block; animation: bm-write .7s var(--ease-signature) both 1.1s; }
.site-builder.is-visible .mini-hero strong span:last-child { animation-delay: 1.45s; }
.site-builder.is-visible .mini-orb        { animation: bm-orb 1s var(--ease-signature) both 1.3s; }
.site-builder.is-visible .mini-cards i    { animation: bm-block .5s var(--ease-signature) both 1.9s; transform-origin: bottom; }
.site-builder.is-visible .mini-cards i:nth-child(2) { animation-delay: 2.05s; }
.site-builder.is-visible .mini-cards i:nth-child(3) { animation-delay: 2.2s; }
.site-builder.is-visible .layer-1         { animation: bm-left .7s var(--ease-signature) both 2.45s; }
.site-builder.is-visible .layer-2         { animation: bm-right .7s var(--ease-signature) both 2.7s; }
.site-builder.is-visible .layer-3         { animation: bm-left .7s var(--ease-signature) both 2.95s; }
.site-builder.is-visible .builder-social  { animation: bm-up .8s var(--ease-signature) both 3.25s; }
.site-builder.is-visible .social-icons li { animation: bm-fade .45s var(--ease-signature) both 3.7s; }
.site-builder.is-visible .social-icons li:nth-child(2) { animation-delay: 3.82s; }
.site-builder.is-visible .social-icons li:nth-child(3) { animation-delay: 3.94s; }
.site-builder.is-visible .builder-ready   { animation: bm-badge 1.1s var(--ease-signature) both 3.9s; }
.site-builder.is-visible .builder-ready i { animation: bm-dot .9s var(--ease-signature) both 4.5s; }

@media (prefers-reduced-motion: reduce) {
  .site-builder.is-visible *, .site-builder.is-visible { animation: none !important; }
}
/* =====================================================================
   ATMOSFERA — colore, sfondi, grana, infografiche
   La famiglia d'accento vive qui: gradienti, sfondi e diagrammi.
   Il testo resta inchiostro, l'accento primario resta uno.
   ===================================================================== */

/* ---------- Grana condivisa ---------- */

.grain::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: var(--grain); background-size: 140px 140px;
  opacity: .32; mix-blend-mode: overlay;
}

/* ---------- Hero cinematografico (superficie scura + video) ---------- */

.hero-cinema {
  position: relative; isolation: isolate; overflow: hidden;
  background: var(--surface-hero);
  color: var(--paper);
  padding-block: calc(var(--section-y) * 1.2) calc(var(--section-y) * 1.1);
  margin-top: calc(var(--header-h) * -1);
  padding-top: calc(var(--header-h) + var(--section-y));
}
.hero-cinema .hero-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: -3; opacity: 1;
}
.hero-cinema .hero-veil {
  position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(46% 78% at 17% 50%, color-mix(in srgb, var(--surface-hero) 84%, transparent) 0%, color-mix(in srgb, var(--surface-hero) 46%, transparent) 60%, transparent 90%),
    radial-gradient(55% 80% at 92% 8%, color-mix(in srgb, var(--accent-2) 22%, transparent) 0%, transparent 58%),
    radial-gradient(50% 70% at 4% 98%, color-mix(in srgb, var(--accent-3) 22%, transparent) 0%, transparent 56%),
    linear-gradient(100deg, color-mix(in srgb, var(--surface-hero) 70%, transparent) 0%, color-mix(in srgb, var(--surface-hero) 14%, transparent) 46%, transparent 74%),
    linear-gradient(180deg, transparent 78%, var(--surface-hero) 100%);
}
.hero-cinema .hero-glow {
  position: absolute; z-index: -1; inset: auto 0 -30% 0; height: 60%;
  background: radial-gradient(50% 60% at 50% 100%, color-mix(in srgb, var(--accent) 26%, transparent) 0%, transparent 70%);
  pointer-events: none;
}
.hero-cinema h1, .hero-cinema h2 { color: var(--paper); }
.hero-cinema h1 em { color: var(--paper); opacity: .78; }
.hero-cinema .eyebrow { color: var(--accent-invert); }
.hero-cinema .hero-lead { color: var(--ink-invert-soft); }
.hero-cinema .trust-line li { color: var(--ink-invert-soft); }
.hero-cinema .button { background: var(--paper); color: var(--ink); }
.hero-cinema .button::after { color: var(--accent-deep); }
.hero-cinema .text-link { color: var(--accent-invert); }

/* Il bordo netto tra hero scuro e canvas caldo: una hairline luminosa */
.hero-cinema::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; z-index: 1;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent) 55%, transparent), transparent);
}

/* Header trasparente finché sta sopra un hero a tutta pagina */
body.hero-glass .site-header:not(.is-scrolled) {
  background: transparent; backdrop-filter: none; border-bottom-color: transparent; box-shadow: none;
}

/* Header trasparente e chiaro finché sta sopra un hero scuro */
body.hero-dark .site-header:not(.is-scrolled) {
  background: transparent; backdrop-filter: none; border-bottom-color: transparent; box-shadow: none;
}
body.hero-dark .site-header:not(.is-scrolled) .main-nav a { color: var(--ink-invert-soft); }
body.hero-dark .site-header:not(.is-scrolled) .main-nav a[aria-current="page"] { color: var(--paper); }
body.hero-dark .site-header:not(.is-scrolled) .nav-cta { background: var(--paper); color: var(--ink) !important; }
body.hero-dark .site-header:not(.is-scrolled) .menu-toggle { border-color: var(--hairline-invert); }
body.hero-dark .site-header:not(.is-scrolled) .menu-toggle i { background: var(--paper); }
@media (max-width: 899px) {
  body.hero-dark .site-header:not(.is-scrolled) .main-nav.is-open { background: var(--surface-hero); }
  body.hero-dark .site-header:not(.is-scrolled) .main-nav.is-open a { border-bottom-color: var(--hairline-invert); }
}

/* Console in vetro sopra il video */
.hero-cinema .it-console {
  background: color-mix(in srgb, var(--surface-dark) 62%, transparent);
  backdrop-filter: blur(18px) saturate(1.25);
  border-color: color-mix(in srgb, var(--paper) 16%, transparent);
}
.console-gauge { display: grid; grid-template-columns: auto 1fr; gap: var(--space-3); align-items: center; }
.console-gauge svg { width: 88px; height: 88px; flex: none; }
.gauge-track { fill: none; stroke: var(--hairline-invert); stroke-width: 6; }
/* Il cerchio è chiuso: quattro archi, uno per ciascun colore della famiglia,
   gli stessi che marcano le aree qui sotto. */
.gauge-seg {
  stroke-width: 6; stroke-linecap: butt;
  stroke-dasharray: var(--seg) 226;
  stroke-dashoffset: var(--seg);
  transition: stroke-dashoffset 1.2s var(--ease-signature);
  transition-delay: var(--gauge-delay, 0s);
}
.is-visible .gauge-seg, .it-console.is-visible .gauge-seg { stroke-dashoffset: 0; }
.gauge-label { font-size: var(--text-label); letter-spacing: var(--track-label); text-transform: uppercase; color: var(--grey-invert); }
.gauge-label strong { display: block; font-family: var(--font-display); font-size: var(--text-h3); letter-spacing: 0; text-transform: none; color: var(--paper); font-weight: 400; margin-top: 4px; }

/* I tag della console prendono i colori della famiglia */
.console-grid span { position: relative; padding-left: var(--space-4); }
.console-grid span::before {
  content: ""; position: absolute; left: var(--space-2); top: 50%; translate: 0 -50%;
  width: 10px; height: 10px; border-radius: var(--radius-pill); background: var(--accent);
}
.console-grid span:nth-child(2)::before { background: var(--accent-2); }
.console-grid span:nth-child(3)::before { background: var(--accent-3); }
.console-grid span:nth-child(4)::before { background: var(--accent-warm); }
.console-grid span:nth-child(5)::before { background: var(--accent-2); }
.console-grid span:nth-child(6)::before { background: var(--accent-3); }

/* ---------- Hero aurora (canvas chiaro + video di colore) ---------- */

.hero-aurora {
  position: relative; isolation: isolate; overflow: hidden;
  margin-top: calc(var(--header-h) * -1);
  padding-top: calc(var(--header-h) + var(--hero-y));
}
.hero-aurora .hero-video {
  position: absolute; inset: -10%; width: 120%; height: 120%;
  object-fit: cover; z-index: -3; opacity: 1; filter: saturate(1.18) contrast(1.04);
}
.hero-aurora .hero-veil {
  position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(52% 62% at 2% 48%, var(--paper) 0%, color-mix(in srgb, var(--paper) 82%, transparent) 45%, transparent 82%),
    linear-gradient(180deg, color-mix(in srgb, var(--paper) 28%, transparent) 0%, transparent 32%, transparent 72%, var(--paper) 100%);
}

/* ---------- Sfondi di sezione: mesh, tinte, griglia ---------- */

.section-mesh {
  position: relative; isolation: isolate;
  background-image: var(--mesh-image);
  background-size: cover; background-position: center;
}
.section-mesh::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, color-mix(in srgb, var(--paper) 68%, transparent), color-mix(in srgb, var(--paper) 84%, transparent));
}

.section-tint { position: relative; isolation: isolate; overflow: hidden; }
.section-tint::before {
  content: ""; position: absolute; inset: -20% -10%; z-index: -1;
  background:
    radial-gradient(38% 55% at 12% 18%, var(--tint-1) 0%, transparent 70%),
    radial-gradient(34% 50% at 92% 30%, var(--tint-2) 0%, transparent 70%),
    radial-gradient(40% 60% at 70% 100%, var(--tint-3) 0%, transparent 70%);
}
.section-tint-warm::before {
  background:
    radial-gradient(40% 60% at 88% 12%, var(--tint-warm) 0%, transparent 70%),
    radial-gradient(38% 55% at 8% 88%, var(--tint-3) 0%, transparent 70%);
}

.section-ink.section-glow {
  position: relative; isolation: isolate; overflow: hidden;
}
.section-ink.section-glow::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(55% 85% at 92% 4%, color-mix(in srgb, var(--accent) 42%, transparent) 0%, transparent 62%),
    radial-gradient(50% 75% at 4% 98%, color-mix(in srgb, var(--accent-3) 40%, transparent) 0%, transparent 60%),
    radial-gradient(40% 60% at 50% 50%, color-mix(in srgb, var(--accent-2) 14%, transparent) 0%, transparent 70%);
}
.section-ink.section-glow::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: var(--grain); background-size: 140px 140px; opacity: .22; mix-blend-mode: overlay;
}

/* ---------- Infografiche ---------- */

.figure { position: relative; display: grid; gap: var(--space-2); }
.figure svg { width: 100%; height: auto; overflow: visible; }
.figure figcaption {
  font-size: var(--text-label); letter-spacing: var(--track-label);
  text-transform: uppercase; color: var(--grey);
}
.section-ink .figure figcaption { color: var(--grey-invert); }

/* tratti che si disegnano quando la figura entra */
.draw { stroke-dasharray: var(--len, 400); stroke-dashoffset: var(--len, 400); transition: stroke-dashoffset 1.6s var(--ease-signature); }
.ring-seg { stroke-dasharray: var(--seg) 578; stroke-dashoffset: var(--seg); transition: stroke-dashoffset 1.4s var(--ease-signature); }
.is-visible .ring-seg { stroke-dashoffset: 0; }
.is-visible .draw { stroke-dashoffset: 0; }
.fade-node { opacity: 0; transition: opacity .8s var(--ease-signature), transform .8s var(--ease-signature); transform: translateY(6px); }
.is-visible .fade-node { opacity: 1; transform: none; }
.is-visible .fade-node:nth-of-type(2) { transition-delay: .12s; }
.is-visible .fade-node:nth-of-type(3) { transition-delay: .24s; }
.is-visible .fade-node:nth-of-type(4) { transition-delay: .36s; }
.is-visible .fade-node:nth-of-type(5) { transition-delay: .48s; }
.is-visible .fade-node:nth-of-type(6) { transition-delay: .60s; }

.svg-label { font-family: var(--font-body); font-size: 13px; fill: var(--ink); }
.svg-label-sm { font-family: var(--font-body); font-size: 11px; letter-spacing: 1px; text-transform: uppercase; fill: var(--grey); }
.section-ink .svg-label { fill: var(--paper); }
.section-ink .svg-label-sm { fill: var(--grey-invert); }
.svg-node { fill: var(--card); stroke: var(--hairline-strong); stroke-width: 1; }
.section-ink .svg-node { fill: var(--surface-dark-2); stroke: var(--hairline-invert); }

@media (prefers-reduced-motion: reduce) {
  .draw, .ring-seg { stroke-dashoffset: 0 !important; }
  .fade-node { opacity: 1 !important; transform: none !important; }
  .gauge-seg { stroke-dashoffset: 0 !important; }
  .hero-video { display: none; }
}

/* ---------- Glifi colorati per le card ---------- */

.glyph {
  width: 44px; height: 44px; border-radius: var(--radius-md);
  display: grid; place-items: center; flex: none;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent-deep);
}
.glyph svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.glyph-2 { background: color-mix(in srgb, var(--accent-2) 14%, transparent); color: color-mix(in srgb, var(--accent-2) 78%, var(--ink)); }
.glyph-3 { background: color-mix(in srgb, var(--accent-3) 12%, transparent); color: color-mix(in srgb, var(--accent-3) 82%, var(--ink)); }
.glyph-4 { background: color-mix(in srgb, var(--accent-warm) 18%, transparent); color: color-mix(in srgb, var(--accent-warm) 55%, var(--ink)); }

/* ---------- Barre colorate sulle card ---------- */

.priority-grid article, .included-grid article, .family-grid article, .plan-grid article {
  position: relative; overflow: hidden;
}
.priority-grid article::before, .included-grid article::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}
.priority-grid article:nth-child(2)::before, .included-grid article:nth-child(2)::before { background: linear-gradient(90deg, var(--accent-2), var(--accent-3)); }
.priority-grid article:nth-child(3)::before, .included-grid article:nth-child(3)::before { background: linear-gradient(90deg, var(--accent-3), var(--accent)); }
.priority-grid article:nth-child(4)::before, .included-grid article:nth-child(4)::before { background: linear-gradient(90deg, var(--accent-warm), var(--accent-3)); }

/* ---------- Aggiustamenti di composizione ---------- */

.card-top { display: flex; align-items: center; gap: var(--space-2); }
.card-index { font-family: var(--font-display); font-size: var(--text-lead); color: var(--accent-text); }
.included-grid article { padding-top: var(--space-5); }

.figure-infra svg { max-width: 100%; }
.figure-infra { margin-bottom: var(--space-6); }
@media (max-width: 699px) { .figure-infra { display: none; } }

.ring-legend { list-style: none; padding: 0; display: grid; gap: var(--space-1); }
.ring-legend li { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-small); color: var(--grey-strong); }
.ring-legend i { width: 10px; height: 10px; border-radius: var(--radius-pill); flex: none; }
.figure-ring svg { max-width: 240px; }
.figure-ring { justify-items: start; }

.rent-layout-3 { display: grid; gap: var(--space-6); align-items: center; }
@media (min-width: 900px) { .rent-layout-3 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1150px) { .rent-layout-3 { grid-template-columns: .95fr .75fr 1fr; gap: var(--space-6); } }

/* Il video dell'hero non deve mai vincere sul testo */
@media (max-width: 899px) {
  .hero-cinema { padding-top: calc(var(--header-h) + var(--space-6)); }
  .hero-aurora .hero-video { opacity: .8; }
}


/* ---------- Linee di percorso colorate ---------- */

.trust-method-grid ol, .process-list { position: relative; }
.trust-method-grid ol::before {
  content: ""; position: absolute; left: 9px; top: 8px; bottom: 8px; width: 2px; border-radius: var(--radius-pill);
  background: linear-gradient(180deg, var(--accent), var(--accent-2) 40%, var(--accent-3) 75%, transparent);
  opacity: .55;
}
.trust-method-grid li { padding-left: var(--space-4); }
.trust-method-grid li > span { position: relative; z-index: 1; }
.process-list::before {
  content: ""; position: absolute; left: 10px; top: var(--space-4); bottom: var(--space-4); width: 2px; border-radius: var(--radius-pill);
  background: linear-gradient(180deg, var(--accent), var(--accent-3) 55%, var(--accent-warm));
  opacity: .5;
}
.process-list li > span { position: relative; z-index: 1; background: var(--paper); padding-block: 2px; }

/* La sezione facility prende una tinta fredda */
.facility-minor { position: relative; isolation: isolate; overflow: hidden; }
.facility-minor::before {
  content: ""; position: absolute; inset: -30% -10%; z-index: -1;
  background: radial-gradient(38% 60% at 82% 20%, var(--tint-2) 0%, transparent 70%),
              radial-gradient(34% 55% at 10% 90%, var(--tint-1) 0%, transparent 70%);
}

/* ---------- Realizzazioni: le anteprime sono verticali (2:3), non si tagliano ---------- */

.work-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
@media (min-width: 980px) { .work-grid { grid-template-columns: repeat(3, 1fr); } }
.work-card { text-decoration: none; color: inherit; }
.work-visual { aspect-ratio: 2 / 3; background: var(--paper-deep); }
.work-visual img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.work-card h3 { font-size: var(--text-h3); }
.works-more {
  margin-top: var(--space-5); display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: var(--space-3);
}
.works-more .work-note { margin-top: 0; }

/* Pagina realizzazioni: una riga per progetto */
.work-list { display: grid; gap: var(--space-8); }
.work-row { display: grid; gap: var(--space-4); align-items: center; }
@media (min-width: 800px) {
  .work-row { grid-template-columns: minmax(240px, .8fr) 1.2fr; gap: var(--space-6); }
  .work-row:nth-child(even) .work-visual { order: 2; }
}
.work-row .work-visual {
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md);
  max-width: 420px;
}
.work-body { display: grid; gap: var(--space-2); align-content: start; }
.work-body h2 { margin-top: var(--space-1); }
.work-summary { font-size: var(--text-lead); color: var(--ink-soft); }
.work-body p { color: var(--grey-strong); }
.tag-row { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-1); }
.tag-row li {
  font-size: var(--text-label); letter-spacing: var(--track-label); text-transform: uppercase;
  border: 1px solid var(--hairline-strong); border-radius: var(--radius-pill);
  padding: 4px var(--space-2); color: var(--grey);
}

/* ---------- Banda video dentro la pagina ---------- */

.video-band-grid { display: grid; gap: var(--space-6); align-items: center; }
@media (min-width: 900px) { .video-band-grid { grid-template-columns: .9fr 1.1fr; gap: var(--space-8); } }
.video-band-grid p { color: var(--grey-strong); }
.video-band-grid h2 { margin-block: var(--space-2); }
.video-frame { margin: 0; display: grid; gap: var(--space-2); }
.video-frame video {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg), var(--shadow-glow);
  background: var(--surface-hero);
}
.video-frame figcaption {
  font-size: var(--text-label); letter-spacing: var(--track-label);
  text-transform: uppercase; color: var(--grey);
}

/* ---------- Conformità EAA e AI Act ---------- */

.compliance-grid { display: grid; gap: var(--space-6); }
@media (min-width: 1000px) { .compliance-grid { grid-template-columns: .85fr 1.15fr; gap: var(--space-8); align-items: start; } }
.compliance-grid > div:first-child p { color: var(--grey-strong); margin-top: var(--space-3); }
.compliance-cards { display: grid; gap: var(--space-3); }
@media (min-width: 700px) { .compliance-cards { grid-template-columns: 1fr 1fr; } }
.compliance-cards article {
  background: var(--card); border-radius: var(--radius-lg); padding: var(--space-4);
  box-shadow: var(--shadow-sm); display: grid; gap: var(--space-2); align-content: start;
}
.compliance-cards h3 { font-size: var(--text-h3); }
.compliance-cards p { color: var(--grey-strong); font-size: var(--text-small); }
/* =====================================================================
   ACCESSIBILITÀ — strumento utente + modalità
   Requisiti richiamati: EN 301 549, WCAG 2.1 AA, D.Lgs. 82/2022 (EAA).
   Le preferenze restano sul dispositivo di chi naviga (localStorage).
   ===================================================================== */

:root { --a11y-scale: 1; }

/* La scala tipografica passa dallo zoom utente: un solo moltiplicatore. */
:root {
  --text-label:  calc(12px * var(--a11y-scale));
  --text-button: calc(14px * var(--a11y-scale));
  --text-nav:    calc(16px * var(--a11y-scale));
  --text-small:  calc(16px * var(--a11y-scale));
  --text-body:   calc(18px * var(--a11y-scale));
  --text-lead:   calc(20px * var(--a11y-scale));
  --text-h3:     calc(clamp(1.25rem, 1rem + .8vw, 1.5rem) * var(--a11y-scale));
  --text-h2:     calc(clamp(1.5rem, 1rem + 2.2vw, 2.5rem) * var(--a11y-scale));
  --text-h1:     calc(clamp(1.75rem, .9rem + 4.2vw, 3.5rem) * var(--a11y-scale));
}

/* ---------- Il pulsante e il pannello ---------- */

.a11y { position: fixed; left: var(--space-3); bottom: var(--space-3); z-index: 60; }
.a11y-toggle {
  width: 56px; height: 56px; border-radius: var(--radius-pill); cursor: pointer;
  border: 1px solid var(--hairline); background: var(--paper); color: var(--ink);
  display: grid; place-items: center; box-shadow: var(--shadow-md);
  transition: box-shadow var(--dur-ui) var(--ease-signature), transform var(--dur-ui) var(--ease-signature);
}
.a11y-toggle svg { width: 26px; height: 26px; }
.a11y-toggle:hover { box-shadow: var(--shadow-lg); }
.a11y-toggle:active { transform: scale(.97); }

.a11y-panel {
  position: absolute; left: 0; bottom: calc(56px + var(--space-2));
  width: min(320px, calc(100vw - var(--space-6)));
  background: var(--card); color: var(--ink);
  border: 1px solid var(--hairline); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: var(--space-3);
  display: grid; gap: var(--space-2);
}
.a11y-panel[hidden] { display: none; }
.a11y-panel h2 {
  font-family: var(--font-body); font-size: var(--text-label); letter-spacing: var(--track-label);
  text-transform: uppercase; color: var(--grey); font-weight: 500;
}
.a11y-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); font-size: var(--text-small); }
.a11y-steps { display: inline-flex; align-items: center; gap: 6px; }
.a11y-steps button {
  min-width: 36px; height: 36px; border-radius: var(--radius-sm); cursor: pointer;
  border: 1px solid var(--hairline-strong); background: var(--paper); color: var(--ink);
  font-size: var(--text-small); font-weight: 500;
}
.a11y-steps button:hover { border-color: var(--accent); }
.a11y-steps output { min-width: 52px; text-align: center; font-size: var(--text-label); color: var(--grey); font-variant-numeric: tabular-nums; }

.a11y-switch { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-small); cursor: pointer; }
.a11y-switch input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; }

.a11y-reset {
  justify-self: start; cursor: pointer; background: transparent; border: 0; padding: 0;
  font-size: var(--text-label); letter-spacing: var(--track-label); text-transform: uppercase;
  color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px;
}
.a11y-panel > a {
  font-size: var(--text-label); color: var(--grey); text-decoration: underline; text-underline-offset: 3px;
  padding-top: var(--space-2); border-top: 1px solid var(--hairline);
}

@media (max-width: 599px) {
  .a11y { left: var(--space-2); bottom: var(--space-2); }
  .a11y-toggle { width: 48px; height: 48px; }
  .a11y-panel { bottom: calc(48px + var(--space-2)); }
}

/* ---------- Modalità: contrasto elevato ---------- */

html.a11y-contrast {
  --grey: #3A3D44;
  --grey-strong: #16181D;
  --grey-invert: #F2F2F0;
  --ink-invert-soft: #FFFFFF;
  --hairline: rgba(22, 24, 29, .45);
  --hairline-strong: rgba(22, 24, 29, .7);
  --hairline-invert: rgba(255, 255, 255, .5);
  --accent-text: var(--accent-deep);
  --card: #FFFFFF;
}
html.a11y-contrast .section-tint::before,
html.a11y-contrast .section-mesh::before,
html.a11y-contrast .section-ink.section-glow::before,
html.a11y-contrast .section-ink.section-glow::after,
html.a11y-contrast .facility-minor::before,
html.a11y-contrast .grain::after { display: none; }
html.a11y-contrast .section-mesh { background-image: none; background: var(--paper-deep); }
html.a11y-contrast .hero-video { display: none; }
html.a11y-contrast .hero-cinema .hero-veil,
html.a11y-contrast .hero-aurora .hero-veil { background: var(--surface-hero); }
html.a11y-contrast .hero-aurora .hero-veil { background: var(--paper); }
html.a11y-contrast .hero-cinema .it-console,
html.a11y-contrast .site-builder { backdrop-filter: none; background: var(--surface-dark); }
html.a11y-contrast .card,
html.a11y-contrast .priority-grid article,
html.a11y-contrast .included-grid article,
html.a11y-contrast .work-card,
html.a11y-contrast .plan-grid article,
html.a11y-contrast .family-grid article,
html.a11y-contrast .contact-card,
html.a11y-contrast .contact-form,
html.a11y-contrast .faq-list details { border: 1px solid var(--hairline-strong); }

/* ---------- Modalità: link evidenziati ---------- */

html.a11y-links :is(main, footer) a:not(.button):not(.nav-cta):not(.a11y-toggle) {
  text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px;
}
html.a11y-links .main-nav a { text-decoration: underline; text-underline-offset: 5px; }
html.a11y-links :is(main, footer) a:not(.button):not(.nav-cta):focus-visible { outline-width: 3px; }

/* ---------- Modalità: spaziatura del testo (WCAG 1.4.12) ---------- */

html.a11y-spacing :is(p, li, dd, dt, figcaption, label, .hero-lead, .work-summary) {
  line-height: 1.8 !important;
  letter-spacing: .12em !important;
  word-spacing: .16em !important;
}
html.a11y-spacing p + p { margin-top: 2em !important; }
html.a11y-spacing :is(h1, h2, h3) { line-height: 1.3 !important; letter-spacing: 0 !important; }

/* ---------- Modalità: animazioni ferme ---------- */

html.a11y-motion *, html.a11y-motion *::before, html.a11y-motion *::after {
  animation-duration: .001ms !important; animation-iteration-count: 1 !important;
  animation-delay: 0s !important; transition-delay: 0s !important;
  transition-duration: .001ms !important; scroll-behavior: auto !important;
}
/* Le sequenze costruite con ritardi non devono lasciare nulla invisibile */
html.a11y-motion .site-builder, html.a11y-motion .site-builder * { animation: none !important; }
html.a11y-motion [data-reveal] { opacity: 1 !important; transform: none !important; }
html.a11y-motion .hero-video { display: none; }
html.a11y-motion .site-builder { transform: none !important; }

/* Chi ha già chiesto meno movimento al sistema non deve vedere il video partire */
@media (prefers-reduced-motion: reduce) { .hero-video { display: none; } }
