/* ==========================================================================
   SOFTRADING SPREAD — design system
   Token semantici in HSL, nessun colore grezzo nei componenti.
   Ritmo spaziale 4/8px. Nessuna dipendenza esterna.
   ========================================================================== */

:root {
  /* --- colore ------------------------------------------------------------ */
  --bg-base:       218 62% 5%;
  --bg-elevated:   217 44% 9%;
  --bg-surface:    216 36% 13%;
  --bg-paper:      210 33% 98%;
  --bg-paper-alt:  212 28% 94%;

  --fg-primary:    210 33% 97%;
  --fg-secondary:  214 20% 72%;
  --fg-muted:      214 15% 58%;
  --fg-on-paper:   218 45% 10%;
  --fg-on-paper-2: 216 16% 38%;

  --accent:        217 100% 58%;   /* accenti su fondo scuro   5.05:1 */
  --accent-soft:   217 100% 68%;   /* link su fondo scuro      7.10:1 */
  --accent-strong: 217 100% 50%;   /* superfici piene e carta  5.02:1 su bianco */
  --accent-hover:  217 100% 45%;   /* hover dei bottoni        5.95:1 su bianco */
  --accent-2:      172 82% 44%;

  --border:        216 26% 18%;
  --border-strong: 216 24% 26%;
  --border-paper:  214 20% 86%;

  --danger:        358 70% 58%;
  --success:       162 60% 42%;

  /* --- tipografia -------------------------------------------------------- */
  --font-display: "Syne", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --step--1: clamp(0.8125rem, 0.79rem + 0.11vw, 0.875rem);
  --step-0:  clamp(1rem, 0.96rem + 0.18vw, 1.0625rem);
  --step-1:  clamp(1.125rem, 1.06rem + 0.32vw, 1.3125rem);
  --step-2:  clamp(1.375rem, 1.25rem + 0.62vw, 1.75rem);
  --step-3:  clamp(1.75rem, 1.5rem + 1.25vw, 2.5rem);
  --step-4:  clamp(2.125rem, 1.6rem + 2.6vw, 3.5rem);
  --step-5:  clamp(2.5rem, 1.6rem + 4.5vw, 5rem);

  /* --- spazio ------------------------------------------------------------ */
  --sp-1: 0.25rem;  --sp-2: 0.5rem;   --sp-3: 0.75rem;  --sp-4: 1rem;
  --sp-6: 1.5rem;   --sp-8: 2rem;     --sp-12: 3rem;    --sp-16: 4rem;
  --sp-20: 5rem;    --sp-24: 6rem;

  --section-y: clamp(4rem, 2.5rem + 7vw, 8rem);
  --shell: 1240px;
  --gutter: clamp(1.25rem, 0.9rem + 1.8vw, 2.5rem);

  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 20px;

  --ring: 0 0 0 3px hsl(var(--accent) / 0.45);
  --shadow-lift: 0 18px 48px -24px hsl(218 70% 2% / 0.9);

  --header-h: 72px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 240ms;
}

/* ==========================================================================
   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) + var(--sp-4));
}

body {
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  color: hsl(var(--fg-secondary));
  background: hsl(var(--bg-base));
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
ul, ol { padding: 0; list-style: none; }
address { font-style: normal; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: hsl(var(--fg-primary));
  text-wrap: balance;
}
h1 { font-size: var(--step-5); }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }

p { text-wrap: pretty; }

a { color: hsl(var(--accent-soft)); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: hsl(var(--fg-primary)); }

:focus-visible {
  outline: 2px solid hsl(var(--accent-soft));
  outline-offset: 3px;
  border-radius: 3px;
}

::selection { background: hsl(var(--accent) / 0.35); color: hsl(var(--fg-primary)); }

/* ==========================================================================
   utility di struttura
   ========================================================================== */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

/* toni di sezione */
.tone-dark  { background: hsl(var(--bg-base)); }
.tone-deep  { background: hsl(var(--bg-elevated)); }
.tone-light { background: hsl(var(--bg-paper)); color: hsl(var(--fg-on-paper-2)); }
.tone-light h1, .tone-light h2, .tone-light h3, .tone-light h4 { color: hsl(var(--fg-on-paper)); }
.tone-light .eyebrow { color: hsl(var(--fg-on-paper-2)); }
.tone-light .eyebrow::before { background: hsl(var(--accent)); }
.tone-light a { color: hsl(var(--accent-strong)); }
.tone-light :focus-visible { outline-color: hsl(var(--accent-strong)); }
.tone-light .rule { background: hsl(var(--border-paper)); }

.skip-link {
  position: absolute; left: var(--sp-4); top: var(--sp-4);
  transform: translateY(-200%);
  background: hsl(var(--accent)); color: hsl(var(--fg-primary));
  padding: var(--sp-3) var(--sp-4); border-radius: var(--radius-sm);
  z-index: 200; font-weight: 600; text-decoration: none;
  transition: transform var(--dur) var(--ease);
}
.skip-link:focus-visible { transform: translateY(0); }

.eyebrow {
  display: inline-flex; align-items: center; gap: var(--sp-3);
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: hsl(var(--fg-muted));
  margin-bottom: var(--sp-6);
}
.eyebrow::before {
  content: ""; width: 28px; height: 2px; flex: none;
  background: hsl(var(--accent));
}

.lead { font-size: var(--step-1); color: hsl(var(--fg-secondary)); max-width: 62ch; }
.tone-light .lead { color: hsl(var(--fg-on-paper-2)); }

.measure { max-width: 68ch; }
.rule { height: 1px; background: hsl(var(--border)); border: 0; }

.section__head { max-width: 62ch; margin-bottom: clamp(2.5rem, 1.8rem + 3vw, 4rem); }
.section__head p { margin-top: var(--sp-6); font-size: var(--step-1); }

/* ==========================================================================
   bottoni
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--sp-3);
  min-height: 48px;
  padding: var(--sp-3) var(--sp-8);
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: var(--step-0);
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
              border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: hsl(var(--accent-strong));
  color: #fff;
}
.btn--primary:hover { background: hsl(var(--accent-hover)); color: #fff; }

.btn--ghost {
  background: transparent;
  color: hsl(var(--fg-primary));
  border-color: hsl(var(--border-strong));
}
.btn--ghost:hover { border-color: hsl(var(--accent)); color: hsl(var(--fg-primary)); background: hsl(var(--accent) / 0.08); }
.tone-light .btn--ghost { color: hsl(var(--fg-on-paper)); border-color: hsl(var(--border-paper)); }
.tone-light .btn--ghost:hover { background: hsl(var(--accent) / 0.06); color: hsl(var(--fg-on-paper)); }

.btn__arrow { transition: transform var(--dur) var(--ease); }
.btn:hover .btn__arrow { transform: translateX(3px); }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--sp-4); }

/* link testuale con freccia */
.link-arrow {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  font-weight: 600; text-decoration: none;
  min-height: 44px;
}
.link-arrow svg { transition: transform var(--dur) var(--ease); }
.link-arrow:hover svg { transform: translateX(4px); }

/* ==========================================================================
   header
   ========================================================================== */
.header {
  position: fixed; inset-inline: 0; top: 0; z-index: 100;
  height: var(--header-h);
  display: flex; align-items: center;
  background: hsl(var(--bg-base) / 0);
  border-bottom: 1px solid transparent;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease),
              backdrop-filter var(--dur) var(--ease);
}
.header.is-stuck {
  background: hsl(var(--bg-base) / 0.88);
  border-bottom-color: hsl(var(--border));
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
}
.header__inner {
  width: 100%; max-width: var(--shell); margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-6);
}

.brand {
  display: inline-flex; align-items: center; gap: var(--sp-3);
  color: hsl(var(--fg-primary)); text-decoration: none;
  font-family: var(--font-display); font-weight: 700;
  letter-spacing: -0.01em; line-height: 1.1;
  min-height: 44px;
}
.brand__mark { width: 32px; height: 32px; flex: none; }
.brand__text { display: flex; flex-direction: column; }
.brand__name { font-size: 0.95rem; letter-spacing: 0.04em; text-transform: uppercase; }
.brand__sub {
  font-family: var(--font-body); font-size: 0.625rem; font-weight: 500;
  letter-spacing: 0.2em; text-transform: uppercase; color: hsl(var(--fg-muted));
}

.nav { display: none; }
.nav__list { display: flex; align-items: center; gap: var(--sp-2); }
.nav__link {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4);
  min-height: 44px;
  border-radius: 999px;
  font-size: 0.9375rem; font-weight: 500;
  color: hsl(var(--fg-secondary)); text-decoration: none;
  background: none; border: 0; cursor: pointer;
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.nav__link:hover { color: hsl(var(--fg-primary)); background: hsl(var(--fg-primary) / 0.06); }
.nav__link[aria-current="page"] { color: hsl(var(--fg-primary)); }
.nav__link[aria-current="page"]::after {
  content: ""; width: 4px; height: 4px; border-radius: 50%;
  background: hsl(var(--accent)); margin-left: 2px;
}

.nav__item { position: relative; }
.nav__caret { transition: transform var(--dur) var(--ease); }
.nav__item.is-open .nav__caret { transform: rotate(180deg); }

.nav__panel {
  position: absolute; top: calc(100% + 8px); left: 50%;
  transform: translateX(-50%) translateY(-6px);
  min-width: 288px;
  padding: var(--sp-2);
  background: hsl(var(--bg-elevated));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  box-shadow: var(--shadow-lift);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease),
              visibility 0s linear var(--dur);
}
.nav__item.is-open .nav__panel {
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: translateX(-50%) translateY(0);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease),
              visibility 0s linear 0s;
}
.nav__panel a {
  display: block; padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius-sm);
  font-size: 0.9375rem; color: hsl(var(--fg-secondary)); text-decoration: none;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.nav__panel a:hover, .nav__panel a:focus-visible { background: hsl(var(--accent) / 0.12); color: hsl(var(--fg-primary)); }

.header__cta { display: none; }

.burger {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 48px; height: 48px; padding: 12px;
  background: none; border: 1px solid hsl(var(--border-strong)); border-radius: 999px;
  cursor: pointer;
}
.burger span {
  display: block; height: 2px; width: 100%; border-radius: 2px;
  background: hsl(var(--fg-primary));
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* drawer mobile */
.drawer {
  position: fixed; inset: 0; z-index: 99;
  background: hsl(var(--bg-base) / 0.98);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  padding: calc(var(--header-h) + var(--sp-8)) var(--gutter) var(--sp-12);
  overflow-y: auto; overscroll-behavior: contain;
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  /* visibility non viene interpolata: scatta subito in apertura e attende la
     dissolvenza in chiusura. Cosi' il focus puo' entrare nel pannello appena aperto. */
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease),
              visibility 0s linear var(--dur);
}
.drawer.is-open {
  opacity: 1; visibility: visible; transform: translateY(0);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease),
              visibility 0s linear 0s;
}
body.nav-open { overflow: hidden; }

.drawer__list { display: flex; flex-direction: column; gap: var(--sp-1); }
.drawer__link {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 56px; padding: var(--sp-3) var(--sp-2);
  font-family: var(--font-display); font-size: var(--step-2); font-weight: 700;
  color: hsl(var(--fg-primary)); text-decoration: none;
  border-bottom: 1px solid hsl(var(--border));
}
.drawer__sub { display: flex; flex-direction: column; padding-left: var(--sp-2); }
.drawer__sub a {
  min-height: 48px; display: flex; align-items: center;
  font-size: 0.9375rem; color: hsl(var(--fg-secondary)); text-decoration: none;
  border-bottom: 1px solid hsl(var(--border) / 0.6);
}
.drawer__sub a::before {
  content: ""; width: 14px; height: 1px; background: hsl(var(--accent)); margin-right: var(--sp-3); flex: none;
}
.drawer__foot { margin-top: var(--sp-12); display: flex; flex-direction: column; gap: var(--sp-4); }
.drawer__foot .btn { width: 100%; }
.drawer__meta { font-size: var(--step--1); color: hsl(var(--fg-muted)); line-height: 1.8; }

@media (min-width: 62.5em) {
  .nav { display: block; }
  .header__cta { display: inline-flex; }
  .burger { display: none; }
  .drawer { display: none; }
}

/* ==========================================================================
   hero
   ========================================================================== */
.hero {
  position: relative;
  min-height: min(100svh, 920px);
  display: flex; align-items: flex-end;
  padding-top: calc(var(--header-h) + var(--sp-16));
  padding-bottom: var(--sp-12);
  overflow: hidden;
  isolation: isolate;
}
.hero__canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: -2; opacity: 0.85;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(90% 60% at 12% 18%, hsl(var(--accent) / 0.20), transparent 62%),
    radial-gradient(70% 55% at 88% 6%, hsl(var(--accent-2) / 0.14), transparent 60%),
    linear-gradient(to bottom, hsl(var(--bg-base) / 0.10) 0%, hsl(var(--bg-base) / 0.72) 62%, hsl(var(--bg-base)) 100%);
  pointer-events: none;
}
.hero__inner { width: 100%; }
.hero h1 { max-width: 16ch; }
.hero h1 .line { display: block; overflow: hidden; }
.hero h1 .line > span { display: block; }
.hero__lead { margin-top: var(--sp-8); max-width: 56ch; font-size: var(--step-1); }
.hero__actions { margin-top: var(--sp-10, 2.5rem); }

.hero__stats {
  margin-top: clamp(3rem, 2rem + 4vw, 5rem);
  padding-top: var(--sp-8);
  border-top: 1px solid hsl(var(--border));
  display: grid; gap: var(--sp-6);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.hero__stat dt {
  font-family: var(--font-display); font-weight: 700;
  font-size: var(--step-2); color: hsl(var(--fg-primary));
  letter-spacing: -0.02em;
}
.hero__stat dd {
  margin: var(--sp-1) 0 0; font-size: var(--step--1);
  color: hsl(var(--fg-muted)); text-transform: uppercase; letter-spacing: 0.1em;
}
@media (min-width: 48em) { .hero__stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.scroll-cue {
  display: none;
  position: absolute; right: var(--gutter); bottom: var(--sp-12);
  writing-mode: vertical-rl;
  font-size: var(--step--1); letter-spacing: 0.24em; text-transform: uppercase;
  color: hsl(var(--fg-muted));
}
.scroll-cue::after {
  content: ""; display: block; width: 1px; height: 56px; margin-top: var(--sp-4);
  background: linear-gradient(to bottom, hsl(var(--accent)), transparent);
}
@media (min-width: 62.5em) { .scroll-cue { display: block; } }

/* pagine interne: hero compatto */
.pagehero {
  position: relative;
  padding-top: calc(var(--header-h) + clamp(3rem, 2rem + 5vw, 6rem));
  padding-bottom: clamp(3rem, 2rem + 4vw, 5rem);
  background:
    radial-gradient(80% 70% at 10% 0%, hsl(var(--accent) / 0.16), transparent 60%),
    hsl(var(--bg-base));
  border-bottom: 1px solid hsl(var(--border));
  overflow: hidden;
}
.pagehero h1 { max-width: 18ch; }
.pagehero .lead { margin-top: var(--sp-6); }

.crumbs { display: flex; flex-wrap: wrap; gap: var(--sp-2); font-size: var(--step--1); margin-bottom: var(--sp-6); color: hsl(var(--fg-muted)); }
.crumbs a {
  color: hsl(var(--fg-muted)); text-decoration: none;
  display: inline-flex; align-items: center;
  min-height: 24px; padding-inline: 2px;   /* WCAG 2.2 target minimo */
}
.crumbs a:hover { color: hsl(var(--fg-primary)); text-decoration: underline; }
.crumbs li { display: flex; align-items: center; gap: var(--sp-2); }
.crumbs li + li::before { content: "/"; color: hsl(var(--border-strong)); }

/* ==========================================================================
   marquee
   ========================================================================== */
.marquee {
  position: relative;
  padding-block: var(--sp-4);
  background: linear-gradient(90deg, hsl(var(--accent)) 0%, hsl(var(--accent-2)) 100%);
  overflow: hidden;
  display: flex;
}
.marquee__track {
  display: flex; flex: none; align-items: center; gap: var(--sp-8);
  padding-right: var(--sp-8);
  animation: marquee 32s linear infinite;
  will-change: transform;
}
.marquee span {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(0.875rem, 0.8rem + 0.4vw, 1.0625rem);
  letter-spacing: 0.08em; text-transform: uppercase;
  color: hsl(var(--bg-base)); white-space: nowrap;
}
.marquee span::after { content: "/"; margin-left: var(--sp-8); opacity: 0.4; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-100%); } }

/* ==========================================================================
   card numerate / griglie
   ========================================================================== */
.grid { display: grid; gap: var(--sp-6); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }

.card {
  position: relative;
  padding: var(--sp-8);
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, hsl(var(--bg-elevated)) 0%, hsl(var(--bg-base)) 100%);
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
  height: 100%;
}
.card:hover { border-color: hsl(var(--accent) / 0.55); transform: translateY(-3px); }
.card__num {
  font-family: var(--font-display); font-weight: 700;
  font-size: var(--step-1); color: hsl(var(--accent));
  letter-spacing: 0.04em; display: block; margin-bottom: var(--sp-6);
}
.card h3 { margin-bottom: var(--sp-4); }
.card p { color: hsl(var(--fg-secondary)); }

.tone-light .card {
  background: #fff;
  border-color: hsl(var(--border-paper));
  box-shadow: 0 1px 2px hsl(218 40% 20% / 0.05);
}
.tone-light .card:hover { border-color: hsl(var(--accent) / 0.5); }
.tone-light .card p { color: hsl(var(--fg-on-paper-2)); }

/* lista numerata a righe (stile "Cosa offriamo") */
.rows { border-top: 1px solid hsl(var(--border)); }
.tone-light .rows { border-top-color: hsl(var(--border-paper)); }
.row {
  display: grid; gap: var(--sp-3);
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  padding-block: clamp(1.75rem, 1.2rem + 2vw, 2.75rem);
  border-bottom: 1px solid hsl(var(--border));
  position: relative;
}
.tone-light .row { border-bottom-color: hsl(var(--border-paper)); }
.row__num {
  font-family: var(--font-display); font-weight: 700;
  font-size: var(--step--1); letter-spacing: 0.12em;
  color: hsl(var(--accent));
}
.row__body h3 { margin-bottom: var(--sp-3); }
.row__body p { max-width: 68ch; }
.row__body .link-arrow { margin-top: var(--sp-4); }
@media (min-width: 56em) {
  .row { grid-template-columns: 4rem minmax(0, 20rem) minmax(0, 1fr); gap: var(--sp-8); align-items: start; }
  .row__num { padding-top: 0.35em; }
  .row__head { align-self: start; }
  .row__body { padding-top: 0.2em; }
}
.row--link:hover h3 { color: hsl(var(--accent-soft)); }
.tone-light .row--link:hover h3 { color: hsl(var(--accent)); }
.row__stretch::after { content: ""; position: absolute; inset: 0; }

/* elenco con spunte */
.checks { display: grid; gap: var(--sp-4); }
.checks li {
  display: grid; grid-template-columns: auto 1fr; gap: var(--sp-4);
  align-items: start;
  padding-block: var(--sp-3);
  border-bottom: 1px solid hsl(var(--border));
}
.tone-light .checks li { border-bottom-color: hsl(var(--border-paper)); }
.checks svg { margin-top: 0.3em; color: hsl(var(--accent-2)); flex: none; }
@media (min-width: 48em) { .checks { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4) var(--sp-8); } }

/* dati societari */
.facts { display: grid; gap: var(--sp-6); grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); }
.facts div { border-top: 2px solid hsl(var(--accent) / 0.5); padding-top: var(--sp-4); }
.facts dt { font-size: var(--step--1); text-transform: uppercase; letter-spacing: 0.12em; color: hsl(var(--fg-muted)); }
.facts dd { margin: var(--sp-2) 0 0; font-family: var(--font-display); font-weight: 600; font-size: var(--step-1); color: hsl(var(--fg-primary)); letter-spacing: -0.01em; }
.tone-light .facts dd { color: hsl(var(--fg-on-paper)); }
.tone-light .facts dt { color: hsl(var(--fg-on-paper-2)); }

/* prosa (privacy, testi lunghi) */
.prose { max-width: 72ch; }
.prose p + p { margin-top: var(--sp-6); }
.prose h2 { font-size: var(--step-2); margin-top: var(--sp-12); margin-bottom: var(--sp-4); }
.prose h3 { font-size: var(--step-1); margin-top: var(--sp-8); margin-bottom: var(--sp-3); }
.prose ul { margin-top: var(--sp-4); display: grid; gap: var(--sp-3); }
.prose ul li { position: relative; padding-left: var(--sp-6); }
.prose ul li::before { content: ""; position: absolute; left: 0; top: 0.7em; width: 8px; height: 2px; background: hsl(var(--accent)); }

/* ==========================================================================
   accordion FAQ
   ========================================================================== */
.faq { border-top: 1px solid hsl(var(--border)); max-width: 80ch; }
.tone-light .faq { border-top-color: hsl(var(--border-paper)); }
.faq__item { border-bottom: 1px solid hsl(var(--border)); }
.tone-light .faq__item { border-bottom-color: hsl(var(--border-paper)); }
.faq__q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--sp-6);
  min-height: 64px; padding: var(--sp-4) 0;
  background: none; border: 0; cursor: pointer; text-align: left;
  font-family: var(--font-display); font-weight: 600; font-size: var(--step-1);
  color: hsl(var(--fg-primary));
}
.tone-light .faq__q { color: hsl(var(--fg-on-paper)); }
.faq__q:hover { color: hsl(var(--accent-soft)); }
.tone-light .faq__q:hover { color: hsl(var(--accent)); }
.faq__icon { flex: none; width: 20px; height: 20px; position: relative; }
.faq__icon::before, .faq__icon::after {
  content: ""; position: absolute; inset: 50% 0 auto 0; height: 2px;
  background: hsl(var(--accent)); transform: translateY(-50%);
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.faq__icon::after { transform: translateY(-50%) rotate(90deg); }
.faq__q[aria-expanded="true"] .faq__icon::after { transform: translateY(-50%) rotate(0deg); opacity: 0; }
/* L'altezza e' gestita dal JS (valore in pixel, poi auto a transizione finita):
   niente trucchi con grid-template-rows, che non si espande in modo affidabile. */
.faq__a { overflow: hidden; }
.js .faq__a { transition: height var(--dur) var(--ease); }
.faq__a p { padding-bottom: var(--sp-6); max-width: 70ch; }

/* ==========================================================================
   CTA
   ========================================================================== */
.cta-band {
  position: relative; overflow: hidden;
  background:
    radial-gradient(70% 120% at 85% 0%, hsl(var(--accent) / 0.26), transparent 60%),
    radial-gradient(60% 110% at 5% 100%, hsl(var(--accent-2) / 0.18), transparent 60%),
    hsl(var(--bg-elevated));
  border-block: 1px solid hsl(var(--border));
}
.cta-band__inner { display: grid; gap: var(--sp-8); align-items: center; }
.cta-band h2 { max-width: 20ch; }
.cta-band p { margin-top: var(--sp-6); max-width: 52ch; }
@media (min-width: 56em) {
  .cta-band__inner { grid-template-columns: minmax(0, 1fr) auto; gap: var(--sp-16); }
}

/* ==========================================================================
   form
   ========================================================================== */
.form { display: grid; gap: var(--sp-6); }
@media (min-width: 42em) { .form { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.field { display: flex; flex-direction: column; gap: var(--sp-2); }
.field--full { grid-column: 1 / -1; }
.field > label { font-size: var(--step--1); font-weight: 600; letter-spacing: 0.04em; color: hsl(var(--fg-secondary)); text-transform: uppercase; }
.field .req { color: hsl(var(--accent)); }

.input, .select, .textarea {
  width: 100%;
  min-height: 52px;
  padding: var(--sp-3) var(--sp-4);
  background: hsl(var(--bg-elevated));
  border: 1px solid hsl(var(--border-strong));
  border-radius: var(--radius);
  color: hsl(var(--fg-primary));
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.textarea { min-height: 160px; resize: vertical; line-height: 1.6; }
.input::placeholder, .textarea::placeholder { color: hsl(var(--fg-muted)); }
.input:hover, .select:hover, .textarea:hover { border-color: hsl(var(--border-strong)); }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: hsl(var(--accent)); box-shadow: var(--ring);
}
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2397A6BC' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--sp-4) center;
  padding-right: var(--sp-12);
}
.field[data-invalid="true"] .input,
.field[data-invalid="true"] .select,
.field[data-invalid="true"] .textarea { border-color: hsl(var(--danger)); }
.field__error { font-size: var(--step--1); color: hsl(var(--danger)); min-height: 0; }
.field__hint { font-size: var(--step--1); color: hsl(var(--fg-muted)); }

.consent { display: grid; grid-template-columns: auto 1fr; gap: var(--sp-3); align-items: start; }
.consent input[type="checkbox"] {
  appearance: none; flex: none;
  width: 24px; height: 24px; margin-top: 1px;
  border: 1px solid hsl(var(--border-strong)); border-radius: var(--radius-sm);
  background: hsl(var(--bg-elevated)); cursor: pointer;
  display: grid; place-content: center;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.consent input[type="checkbox"]::before {
  content: ""; width: 11px; height: 11px; transform: scale(0);
  transition: transform var(--dur) var(--ease);
  box-shadow: inset 1em 1em #fff;
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}
.consent input[type="checkbox"]:checked { background: hsl(var(--accent)); border-color: hsl(var(--accent)); }
.consent input[type="checkbox"]:checked::before { transform: scale(1); }
.consent label { font-size: 0.9375rem; line-height: 1.6; cursor: pointer; }

.form__foot { grid-column: 1 / -1; display: flex; flex-direction: column; gap: var(--sp-6); }
@media (min-width: 42em) { .form__foot { flex-direction: row; align-items: center; justify-content: space-between; } }
.form__status { font-size: 0.9375rem; }
.form__status[data-state="error"] { color: hsl(var(--danger)); }
.form__status[data-state="ok"] { color: hsl(var(--success)); }

.form-panel {
  padding: clamp(1.5rem, 1rem + 2.5vw, 3rem);
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-lg);
  background: hsl(var(--bg-elevated) / 0.6);
}

/* blocco contatti a due colonne */
.split { display: grid; gap: clamp(2.5rem, 1.8rem + 3vw, 4rem); }
@media (min-width: 62.5em) { .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); } }

.contact-card { border-top: 2px solid hsl(var(--accent) / 0.5); padding-top: var(--sp-4); }
.contact-card + .contact-card { margin-top: var(--sp-8); }
.contact-card h3 { font-size: var(--step-1); margin-bottom: var(--sp-2); }
.contact-card address { font-style: normal; line-height: 1.8; }
.contact-card a { word-break: break-word; }

/* ==========================================================================
   footer
   ========================================================================== */
.footer { background: hsl(var(--bg-elevated)); border-top: 1px solid hsl(var(--border)); padding-block: var(--sp-16) var(--sp-8); }
.footer__grid { display: grid; gap: var(--sp-12); }
@media (min-width: 48em) { .footer__grid { grid-template-columns: 1.4fr 1fr 1fr; gap: var(--sp-8); } }
.footer h2, .footer h3 { font-size: var(--step--1); text-transform: uppercase; letter-spacing: 0.14em; color: hsl(var(--fg-muted)); font-family: var(--font-body); font-weight: 600; margin-bottom: var(--sp-6); }
.footer__links { display: grid; gap: var(--sp-1); }
.footer__links a { display: inline-flex; align-items: center; min-height: 44px; color: hsl(var(--fg-secondary)); text-decoration: none; font-size: 0.9375rem; }
.footer__links a:hover { color: hsl(var(--fg-primary)); text-decoration: underline; }
.footer__brand .brand { margin-bottom: var(--sp-6); }
.footer__blurb { max-width: 42ch; font-size: 0.9375rem; }
.footer__legal {
  margin-top: var(--sp-16); padding-top: var(--sp-8);
  border-top: 1px solid hsl(var(--border));
  display: grid; gap: var(--sp-4);
  font-size: var(--step--1); color: hsl(var(--fg-muted)); line-height: 1.8;
}
.footer__legal p { max-width: none; }
.footer__legal a { color: hsl(var(--fg-muted)); }
.footer__legal a:hover { color: hsl(var(--fg-primary)); }
.footer__bottom { display: flex; flex-wrap: wrap; gap: var(--sp-4) var(--sp-6); justify-content: space-between; align-items: center; }

/* ==========================================================================
   reveal on scroll
   ========================================================================== */
.reveal { opacity: 0; transform: translateY(18px); }
.js .reveal { transition: opacity 620ms var(--ease), transform 620ms var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
html:not(.js) .reveal { opacity: 1; transform: none; }

/* ==========================================================================
   accessibilità: motion ridotto
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
  .marquee__track { animation: none; }
  .hero__canvas { display: none; }
}

/* ==========================================================================
   stampa
   ========================================================================== */
@media print {
  .header, .drawer, .marquee, .scroll-cue, .cta-band, .hero__canvas { display: none !important; }
  body { background: #fff; color: #000; }
  h1, h2, h3, h4 { color: #000; }
  .section { padding-block: 1rem; }
}

/* ==========================================================================
   addenda: gruppo nav con toggle separato + placeholder dati mancanti
   ========================================================================== */
.nav__group { display: inline-flex; align-items: center; }
.nav__toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 44px; margin-left: -8px;
  background: none; border: 0; cursor: pointer;
  color: hsl(var(--fg-secondary));
  border-radius: 999px;
}
.nav__toggle:hover { color: hsl(var(--fg-primary)); }
.nav__toggle svg { transition: transform var(--dur) var(--ease); }
.nav__item.is-open .nav__toggle svg { transform: rotate(180deg); }
.nav__panel ul { display: grid; gap: 2px; }

.pending {
  font-style: italic;
  color: hsl(var(--fg-muted));
  border-bottom: 1px dashed hsl(var(--border-strong));
}
.tone-light .pending { color: hsl(var(--fg-on-paper-2)); border-bottom-color: hsl(var(--border-paper)); }

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