/* ============================================================================
   TickNGo — sito vetrina
   Palette e impostazione istituzionale (musei, enti pubblici, fondazioni,
   enti privati, concessionari). Foglio di stile condiviso da tutte le pagine.
   ========================================================================= */

:root {
  /* Arancione scurito (da #d1590b) per contrasto AA >= 4.5:1 su bianco e sul tint */
  --orange: #b04a06;
  --orange-bright: #ef7c1b;
  --orange-tint: #fbeadb;
  --ink: #1b1a18;
  --ink-soft: #423f3a;
  --ink-faint: #6d685f;
  --paper: #fbf9f5;
  --paper-alt: #f2ede4;
  --paper-dark: #211f1c;
  --line: #e3dcd0;
  --line-strong: #cfc6b7;
  --white: #ffffff;

  /* Font del tema: Jost per i titoli (token --serif), Barlow per il testo (token --sans) */
  --serif:
    var(--font-jost), 'Iowan Old Style', 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia,
    'Times New Roman', serif;
  --sans:
    var(--font-barlow), system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --container: 1180px;
  --gutter: clamp(20px, 5vw, 64px);
  --radius: 3px;

  --shadow-sm: 0 1px 2px rgba(27, 26, 24, 0.06), 0 4px 14px rgba(27, 26, 24, 0.05);
  --shadow-md: 0 6px 24px rgba(27, 26, 24, 0.1), 0 2px 6px rgba(27, 26, 24, 0.06);
}

/* --- reset ---------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  /* NIENTE scroll-behavior: smooth qui: interferisce con il ripristino
     della posizione di scroll sul tasto "indietro" (limitazione nota di
     Next.js, vedi i commenti in site.js). Lo smooth scroll per le ancore
     stessa-pagina lo fa site.js su click. */
}
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-soft);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: var(--orange);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
h1,
h2,
h3,
h4 {
  font-family: var(--serif);
  color: var(--ink);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
}
h1 {
  font-size: clamp(2rem, 4.6vw, 3.15rem);
  letter-spacing: -0.01em;
}
h2 {
  font-size: clamp(1.55rem, 3vw, 2.15rem);
}
h3 {
  font-size: 1.24rem;
}
h4 {
  font-size: 1.02rem;
}
p {
  margin: 0 0 1.1em;
}
ul,
ol {
  margin: 0 0 1.1em;
  padding-left: 1.25em;
}
li {
  margin: 0.3em 0;
}
hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2.5rem 0;
}
strong {
  color: var(--ink);
  font-weight: 600;
}

/* --- layout helpers ---------------------------------------------------------- */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section {
  padding-block: clamp(48px, 8vw, 96px);
}
.section--tight {
  padding-block: clamp(36px, 5vw, 56px);
}
/* come --tight ma solo sopra: per pagine che aprono con una sezione
   subito dopo l'header, senza il page-head a fare da respiro */
.section--tight-top {
  padding-top: clamp(24px, 3.5vw, 40px);
}
.section--alt {
  background: var(--paper-alt);
}
.section--dark {
  background: var(--paper-dark);
  color: #cfc8bd;
}
.section--dark h1,
.section--dark h2,
.section--dark h3 {
  color: #fff;
}
.section--dark a {
  color: var(--orange-bright);
}
.lede {
  font-size: clamp(1.1rem, 2vw, 1.32rem);
  line-height: 1.6;
  color: var(--ink-soft);
}
.measure {
  max-width: 62ch;
}
.center {
  text-align: center;
}
.center .lede {
  margin-inline: auto;
}
.lede--full {
  max-width: none;
}

.eyebrow {
  font-family: var(--sans);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--orange);
  margin: 0 0 1rem;
  display: flex;
  align-items: center;
  gap: 0.7em;
}
.eyebrow::before {
  content: '';
  width: 34px;
  height: 2px;
  background: var(--orange);
  display: inline-block;
}
.center .eyebrow {
  justify-content: center;
}

.grid {
  display: grid;
  gap: clamp(20px, 3vw, 34px);
}
.grid--2 {
  grid-template-columns: repeat(2, 1fr);
}
.grid--3 {
  grid-template-columns: repeat(3, 1fr);
}
.grid--4 {
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 900px) {
  .grid--3,
  .grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 620px) {
  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: 1fr;
  }
}

.hatch {
  background-image: repeating-linear-gradient(-45deg, var(--orange) 0 2px, transparent 2px 10px);
}

/* --- buttons ------------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.8em 1.5em;
  border-radius: var(--radius);
  border: 1px solid var(--orange);
  background: var(--orange);
  color: #fff;
  cursor: pointer;
  transition:
    background 0.15s ease,
    transform 0.15s ease;
}
.btn:hover {
  background: var(--orange-bright);
  border-color: var(--orange-bright);
  text-decoration: none;
  transform: translateY(-1px);
}
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn--ghost:hover {
  background: var(--white);
  border-color: var(--ink);
}
.btn--light {
  background: #fff;
  color: var(--ink);
  border-color: #fff;
}
.btn--light:hover {
  background: var(--orange-tint);
  border-color: var(--orange-tint);
}
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* --- top bar ---------------------------------------------------------------- */
.topbar {
  background: var(--paper-dark);
  color: #b8b1a5;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 40px;
  gap: 16px;
}
.topbar a {
  color: #d8d2c6;
}
.topbar .topbar__meta {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}
.topbar .lang {
  display: flex;
  gap: 8px;
}
.topbar .lang span[aria-current] {
  color: #fff;
  font-weight: 700;
}
@media (max-width: 720px) {
  .topbar__meta span.hide-sm {
    display: none;
  }
}

/* --- site header / nav ---------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 249, 245, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 84px;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
}
.brand:hover {
  text-decoration: none;
}
.brand__img {
  height: 46px;
  width: auto;
  display: block;
}
@media (max-width: 620px) {
  .brand__img {
    height: 38px;
  }
}

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav a.nav__link,
.nav button.nav__link {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink-soft);
  padding: 0.6em 0.9em;
  border-radius: var(--radius);
  background: none;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
}
.nav a.nav__link:hover,
.nav button.nav__link:hover {
  color: var(--ink);
  background: var(--paper-alt);
  text-decoration: none;
}
.nav a.nav__link[aria-current='page'] {
  color: var(--orange);
}

.nav__item {
  position: relative;
}
.nav__panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 260px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 8px;
  display: none;
}
.nav__item.is-open .nav__panel,
.nav__item:hover .nav__panel {
  display: block;
}
.nav__panel a {
  display: block;
  padding: 0.6em 0.8em;
  border-radius: var(--radius);
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-weight: 600;
}
.nav__panel a:hover {
  background: var(--paper-alt);
  color: var(--ink);
  text-decoration: none;
}
.nav__panel a small {
  display: block;
  font-weight: 400;
  color: var(--ink-faint);
  font-size: 0.82rem;
}

.nav__cta {
  margin-left: 8px;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  width: 44px;
  height: 40px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav-toggle svg {
  width: 22px;
  height: 22px;
}

@media (max-width: 1000px) {
  .nav-toggle {
    display: inline-flex;
  }
  .nav {
    position: fixed;
    inset: 85px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 16px var(--gutter) 26px;
    transform: translateY(-160%);
    transition: transform 0.25s ease;
    max-height: calc(100vh - 124px);
    overflow-y: auto;
  }
  .nav.is-open {
    transform: translateY(0);
    box-shadow: var(--shadow-md);
  }
  .nav a.nav__link,
  .nav button.nav__link {
    padding: 0.85em 0.6em;
    font-size: 1.05rem;
    width: 100%;
    justify-content: space-between;
  }
  .nav__item {
    position: static;
  }
  .nav__panel {
    position: static;
    display: none;
    box-shadow: none;
    border: 0;
    border-left: 2px solid var(--line);
    border-radius: 0;
    margin: 2px 0 8px 12px;
  }
  .nav__item.is-open .nav__panel {
    display: block;
  }
  .nav__cta {
    margin: 12px 0 0;
  }
  .nav__cta .btn {
    width: 100%;
    justify-content: center;
  }
}

/* --- hero ----------------------------------------------------------------- */
.hero {
  position: relative;
  background: linear-gradient(180deg, var(--paper) 0%, var(--paper-alt) 100%);
  overflow: hidden;
}
.hero .container {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  padding-block: clamp(52px, 8vw, 104px);
}
.hero__kicker {
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--orange);
}

/* --- hero con foto a tutta larghezza (home) ------------------------------ */
/* Definizione bassa: blur minimo per ammorbidirla + scuritura, così il
   testo bianco resta leggibile. object-fit: cover è essenziale: con fill
   next/image NON lo imposta da solo e la foto viene stirata. Lo scale
   evita di vedere i bordi sfocati dove il blur scopre il bordo. */
.hero--photo {
  background: #211f1c; /* fallback scuro mentre la foto carica */
}
.hero--photo .hero__bg {
  z-index: 0;
  object-fit: cover;
  object-position: center;
  filter: brightness(0.5);
  transform: scale(1.06);
}
/* home: solo titolo e CTA centrati sulla foto, con più respiro verticale */
.hero--photo .container {
  z-index: 1;
  grid-template-columns: 1fr; /* niente pannello: solo testo sulla foto */
  text-align: center;
  padding-block: clamp(80px, 12vw, 180px);
}
.hero--photo .btn-row {
  justify-content: center;
}
.hero--photo .hero__kicker {
  color: #fff;
}
.hero--photo h1,
.hero--photo .lede {
  color: #fff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}

/* --- prefooter con foto di sfondo (CtaSection) ----------------------------- */
/* Stessa costruzione dell'hero--photo: foto a tutta larghezza sfocata e
   scurita, testo bianco. Qui il container è su due colonne: blocco
   "Parliamone insieme" a sinistra, form di contatto a destra. */
.cta-banner {
  position: relative;
  overflow: hidden;
  background: #211f1c; /* fallback scuro mentre la foto carica */
}
.cta-banner .cta-banner__bg {
  z-index: 0;
  object-fit: cover;
  filter: blur(9px) brightness(0.2);
  transform: scale(1.08);
}
.cta-banner .container {
  /* relative è indispensabile: il container di default è static e
     z-index: 1 verrebbe ignorato (l'immagine coprirebbe il testo,
     stessa trappola dell'hero--photo) */
  position: relative;
  z-index: 1;
  /* container più largo del standard (--container: 1180px): la form a due
     colonne (lp-form--cols) altrimenti resterebbe schiacciata */
  max-width: 1360px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  padding-block: clamp(28px, 4vw, 56px);
}
/* blocco di testo agganciato in alto (riferimento agenzia), la form resta
   centrata verticalmente */
.cta-banner__intro {
  align-self: start;
}
/* titolo del blocco di testo più grande del standard, con più respiro */
.cta-banner h2 {
  font-size: clamp(2.2rem, 4vw, 3.1rem);
  margin-block: 0.8em;
}
.cta-banner .lede + .lede {
  margin-top: 1em;
}
/* l'accento arancione chiaro: il token --orange, scurito per il bianco,
   su fondo scuro non passerebbe (come in section--dark) */
.cta-banner .eyebrow {
  color: var(--orange-bright);
}
.cta-banner h2,
.cta-banner .lede {
  color: #fff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}
/* la landing limita il form a 560px su mobile: nel banner quel limite
   lascerebbe la colonna mezza vuota tra ~616 e 900px */
.cta-banner .lp-form {
  max-width: none;
}
@media (max-width: 900px) {
  .cta-banner .container {
    grid-template-columns: 1fr;
  }
  /* su mobile il titolo torna alla dimensione standard delle sezioni,
     altrimenti con la colonna unica diventa enorme */
  .cta-banner h2 {
    font-size: clamp(1.55rem, 3vw, 2.15rem);
    margin-block: 0.4em;
  }
}

.hero h1 {
  margin-top: 0.5rem;
}
.hero__panel {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(135deg, rgba(209, 89, 11, 0.14), rgba(33, 31, 28, 0.04)), var(--paper);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: flex-end;
  padding: 22px;
}
.hero__panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(209, 89, 11, 0.2) 0 2px,
    transparent 2px 12px
  );
  mask-image: linear-gradient(120deg, #000 0 35%, transparent 70%);
}
/* vecchia didascalia del pannello: solo figli diretti che non siano il
   wrapper di BadgedImage (che altrimenti eredita pill bianca e padding) */
.hero__panel > span:not(.ai-wrap) {
  position: relative;
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
  padding: 0.4em 0.8em;
  border-radius: var(--radius);
}
.hero__panel img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
@media (max-width: 900px) {
  .hero .container {
    grid-template-columns: 1fr;
  }
}

/* --- generic media placeholder ------------------------------------------------ */
.ph {
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(135deg, rgba(209, 89, 11, 0.12), rgba(33, 31, 28, 0.05)), var(--paper-alt);
  position: relative;
  overflow: hidden;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--ink-faint);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.ph::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(33, 31, 28, 0.06) 0 1px,
    transparent 1px 11px
  );
}
.ph span {
  position: relative;
  z-index: 1;
  padding: 0 1em;
}
.ph--tall {
  min-height: 320px;
}
/* min-height: 0 alza il floor di .ph (180px): con aspect-ratio, il min-height
   partecipa al calcolo del min-content della larghezza (180 × 16/7 ≈ 411px),
   che su mobile sfora il viewport e allarga la pagina. Senza floor la
   larghezza resta quella del contenitore e l'altezza deriva dal ratio. */
.ph--wide {
  aspect-ratio: 16 / 7;
  min-height: 0;
}

/* crop della foto del blocco CHI SIAMO della home, solo su desktop
   (il feature-block va in colonna unica sotto gli 860px). Percentuale
   invece che px come su lp-why__video: la foto (1670×941) ha sbordo
   orizzontale minore e un offset fisso rischia la striscia di sfondo.
   50% = centro, 100% = bordo destro: da regolare a occhio */
@media (min-width: 861px) {
  .home-intro__media .ai-wrap--fill > img {
    object-position: 70% center;
  }
}

/* immagine reale al posto del segnaposto .ph: stessa cornice, senza tratteggio */
.ph--img {
  position: relative;
  overflow: hidden;
  min-height: 320px;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-md);
}
.ph--img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- cards ------------------------------------------------------------------ */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(20px, 3vw, 30px);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}
.card h3 {
  margin-bottom: 0.35em;
}
.card p:last-child {
  margin-bottom: 0;
}
.card__tag {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--orange);
  background: var(--orange-tint);
  padding: 0.35em 0.7em;
  border-radius: 999px;
  margin-bottom: 1rem;
}
.card__icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--orange-tint);
  color: var(--orange);
  margin-bottom: 1rem;
}
.card__icon svg {
  width: 24px;
  height: 24px;
}
.card--flat {
  box-shadow: none;
  background: transparent;
  border-color: var(--line);
}
/* immagine prodotto dentro una card (sezione controllo accessi): le tre
   foto hanno proporzioni diverse, area uniforme e object-fit: contain */
.card__media {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 210px;
  margin-bottom: 1rem;
}
.card__media img {
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}
.card--dark {
  background: #2c2925;
  border-color: #3a352f;
  color: #cfc8bd;
}
.card--dark h3 {
  color: #fff;
}

/* --- badge "AI Enhanced" sulle immagini (BadgedImage) --------------------- */
/* ancorato in alto a sinistra al container dell'immagine: assoluto, non
   si sposta con i cambi di viewport */
.ai-wrap {
  position: relative;
  display: inline-block;
  max-width: 100%;
}
/* ai-wrap--fill è assoluto e copre tutto il parent posizionato (hero,
   hero__panel, ph--img): come un'immagine fill nuda, non partecipa al
   layout e non serve che il parent abbia altezza definita */
.ai-wrap--fill {
  position: absolute;
  inset: 0;
  width: auto;
  height: auto;
}
.ai-badge {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  line-height: 0;
}
.ai-badge img {
  display: block;
  height: 22px;
  width: auto;
}
/* nei contenitori media l'altezza delle immagini passa dal wrapper */
.card__media > .ai-wrap,
.plan__media > .ai-wrap {
  height: 100%;
}
/* i contenitori (hero__panel, ph--img, card__media, plan__media) hanno regole
   "img { position: absolute; inset: 0; ... }" che colpirebbero anche il
   badge: qui il badge resta sé stesso dentro ognuno di loro */
.hero__panel .ai-badge img,
.ph--img .ai-badge img,
.card__media .ai-badge img,
.plan__media .ai-badge img {
  position: static;
  inset: auto;
  width: auto;
  height: 22px;
  object-fit: fill;
}

/* feature list with tick */
.ticks {
  list-style: none;
  padding: 0;
  margin: 0;
}
.ticks li {
  position: relative;
  padding-left: 1.8em;
  margin: 0.55em 0;
}
.ticks li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 12px;
  height: 7px;
  border-left: 2px solid var(--orange);
  border-bottom: 2px solid var(--orange);
  transform: rotate(-45deg);
}

/* --- audience strip -------------------------------------------------------- */
.audience {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
}
.audience span {
  font-family: var(--serif);
  font-size: 1.02rem;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0.5em 1.1em;
  background: var(--white);
}

/* --- componenti della soluzione (home "Che cos'è") ------------------------- */
.system-grid {
  list-style: none;
  margin: 2.4rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  text-align: left;
}
@media (max-width: 1040px) {
  .system-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 680px) {
  .system-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 430px) {
  .system-grid {
    grid-template-columns: 1fr;
  }
}
.system-card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 3px solid var(--orange);
  border-radius: var(--radius);
  padding: 22px 18px 20px;
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease;
}
.system-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.system-card .ic {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  margin-bottom: 0.95rem;
  border-radius: 13px;
  background: var(--orange-tint);
  color: var(--orange);
}
.system-card .ic svg {
  width: 26px;
  height: 26px;
}
.system-card h3 {
  font-size: 1.04rem;
  margin: 0 0 0.28em;
}
.system-card p {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--ink-faint);
  margin: 0;
}

/* --- split blocks -------------------------------------------------------------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
}
.split--reverse .split__media {
  order: 2;
}
@media (max-width: 860px) {
  .split {
    grid-template-columns: 1fr;
  }
  .split--reverse .split__media {
    order: 0;
  }
}

/* --- numbered steps / tree ---------------------------------------------------- */
.tree-index {
  position: sticky;
  top: 96px;
  align-self: start;
  font-size: 0.92rem;
  border-left: 2px solid var(--line);
  padding-left: 18px;
}
.tree-index ol {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: t;
}
.tree-index li {
  margin: 0.1em 0;
}
.tree-index a {
  display: block;
  padding: 0.45em 0;
  color: var(--ink-faint);
  font-weight: 600;
}
.tree-index a:hover {
  color: var(--ink);
  text-decoration: none;
}
.tree-index a.is-active {
  color: var(--orange);
}
.tree-index .sub {
  padding-left: 14px;
  font-weight: 500;
}
.tree-index .sub a {
  font-size: 0.86rem;
  padding: 0.3em 0;
}

.doc {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: clamp(28px, 5vw, 64px);
}
@media (max-width: 940px) {
  .doc {
    grid-template-columns: 1fr;
  }
  .tree-index {
    position: static;
    border-left: 0;
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding-block: 12px;
  }
}

.node {
  padding-block: clamp(30px, 5vw, 52px);
  border-top: 1px solid var(--line);
  scroll-margin-top: 100px;
}
.node:first-child {
  border-top: 0;
}
.node__num {
  font-family: var(--serif);
  font-size: 0.95rem;
  color: var(--orange);
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
}
.node h2 {
  margin-bottom: 0.5em;
}
.node h3 {
  margin-top: 1.6em;
}
.subnodes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 1.4em;
}
@media (max-width: 820px) {
  .subnodes {
    grid-template-columns: 1fr;
  }
}

/* --- specs table -------------------------------------------------------------- */
.specs {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.specs caption {
  text-align: left;
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--ink);
  padding-bottom: 0.6em;
}
.specs th,
.specs td {
  text-align: left;
  padding: 0.7em 0.8em;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.specs th {
  width: 34%;
  color: var(--ink);
  font-weight: 600;
  background: var(--paper-alt);
}
.specs tbody tr:last-child td {
  border-bottom: 0;
}

/* --- blog ------------------------------------------------------------------ */
.post-card {
  overflow: hidden;
  padding: 0;
}
.post-card .ph {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  min-height: 190px;
}
.post-card__body {
  padding: 22px 24px 26px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.post-meta {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 0.7rem;
  display: flex;
  gap: 0.7em;
  flex-wrap: wrap;
}
.post-meta .cat {
  color: var(--orange);
  font-weight: 700;
}
.post-card h3 {
  font-size: 1.16rem;
}
.post-card__body p {
  font-size: 0.96rem;
}
.post-card a.more {
  margin-top: auto;
  font-weight: 700;
  font-size: 0.9rem;
}

.article {
  max-width: 720px;
  margin-inline: auto;
}
/* min-height: 0 come per .ph--wide: senza, il floor di .ph (180px) con il
   ratio 16/8 gonfia il min-content della larghezza a 360px e sfora su mobile */
.article__hero {
  aspect-ratio: 16/8;
  min-height: 0;
  margin: 1.6rem 0 2.4rem;
}
.article p {
  font-size: 1.08rem;
  line-height: 1.75;
}
.article h2 {
  margin-top: 1.8em;
}
.article blockquote {
  margin: 2rem 0;
  padding: 0.4em 0 0.4em 1.4rem;
  border-left: 3px solid var(--orange);
  font-family: var(--serif);
  font-size: 1.32rem;
  line-height: 1.5;
  color: var(--ink);
  font-style: italic;
}
.article figure {
  margin: 2.2rem 0;
}
.article figcaption {
  font-size: 0.85rem;
  color: var(--ink-faint);
  margin-top: 0.6em;
}
.article__foot {
  margin-top: 3rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
}

/* --- breadcrumb --------------------------------------------------------------- */
.crumb {
  font-size: 0.84rem;
  color: var(--ink-faint);
  letter-spacing: 0.03em;
  padding-top: 22px;
}
.crumb a {
  color: var(--ink-faint);
}
.crumb a:hover {
  color: var(--orange);
}
.crumb span {
  margin: 0 0.5em;
}

/* --- page head -------------------------------------------------------------- */
.page-head {
  background: linear-gradient(180deg, var(--paper) 0%, var(--paper-alt) 100%);
  border-bottom: 1px solid var(--line);
}
.page-head .container {
  padding-block: clamp(40px, 6vw, 74px);
}
.page-head h1 {
  margin-bottom: 0.3em;
}

/* --- toggle for the two product versions ------------------------------------- */
.versions {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 4px;
  background: var(--white);
  gap: 4px;
}
.versions a {
  padding: 0.5em 1.1em;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-faint);
}
.versions a:hover {
  text-decoration: none;
  color: var(--ink);
}
.versions a[aria-current] {
  background: var(--orange);
  color: #fff;
}

/* --- pagina prodotto: taglio commerciale --------------------------------- */
.feature-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 5vw, 60px);
  align-items: center;
  padding-block: clamp(32px, 5vw, 52px);
  border-top: 1px solid var(--line);
}
.feature-block:first-of-type {
  border-top: 0;
}
.feature-block--reverse .feature-block__media {
  order: 2;
}
@media (max-width: 860px) {
  .feature-block {
    grid-template-columns: 1fr;
  }
  .feature-block--reverse .feature-block__media {
    order: 0;
  }
}
.feature-block__media {
  align-self: stretch;
  min-height: 240px;
}

.plans {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(20px, 3vw, 30px);
}
@media (max-width: 720px) {
  .plans {
    grid-template-columns: 1fr;
  }
}
.plan {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(24px, 3vw, 36px);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}
.plan--highlight {
  border-color: var(--orange);
  box-shadow:
    0 0 0 1px var(--orange),
    var(--shadow-md);
}
.plan__media {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 230px;
  margin-bottom: 1.2rem;
}
.plan__media img {
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}
.plan__name {
  font-family: var(--sans);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 0.7rem;
}
.plan h3 {
  font-size: 1.5rem;
  margin-bottom: 0.15em;
}
.plan__meta {
  font-size: 0.95rem;
  color: var(--ink-faint);
  margin-bottom: 1.3rem;
}
.plan ul.ticks {
  margin-bottom: 1.6rem;
}
.plan .btn {
  margin-top: auto;
  align-self: flex-start;
}

/* piani e testo in grassetto dentro una sezione a fondo scuro */
.section--dark .plan {
  background: #2c2925;
  border-color: #3a352f;
  color: #cfc8bd;
  box-shadow: none;
}
.section--dark .plan h3 {
  color: #fff;
}
.section--dark .plan__meta {
  color: #a8a196;
}
.section--dark .plan--highlight {
  border-color: var(--orange-bright);
  box-shadow: 0 0 0 1px var(--orange-bright);
}
.section--dark strong,
.card--dark strong {
  color: #fff;
}

/* nelle sezioni a fondo scuro l'accento arancione resta chiaro: il token
   --orange scurito per il contrasto su bianco qui non passerebbe */
.section--dark .eyebrow {
  color: var(--orange-bright);
}
.section--dark .eyebrow::before {
  background: var(--orange-bright);
}
.section--dark .plan__name {
  color: var(--orange-bright);
}
.section--dark .ticks li::before {
  border-color: var(--orange-bright);
}
/* i bottoni light nelle sezioni scure mantengono il testo scuro: la regola
   ".section--dark a" li colorerebbe di arancione chiaro su fondo bianco */
.section--dark .btn--light {
  color: var(--ink);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(16px, 3vw, 32px);
  text-align: center;
}
@media (max-width: 700px) {
  .metrics {
    grid-template-columns: repeat(2, 1fr);
  }
}
.metrics .metric b {
  display: block;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  color: #fff;
  line-height: 1;
  margin-bottom: 0.35rem;
}
.metrics .metric span {
  font-size: 0.9rem;
  color: #a8a196;
}

/* --- contact ------------------------------------------------------------------ */
.field {
  display: flex;
  flex-direction: column;
  gap: 0.35em;
  margin-bottom: 1.1em;
}
.field label {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-transform: uppercase;
}
.field input,
.field textarea,
.field select {
  font: inherit;
  font-size: 0.98rem;
  padding: 0.75em 0.85em;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
}
.field textarea {
  min-height: 130px;
  resize: vertical;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: 2px solid var(--orange);
  outline-offset: 1px;
  border-color: var(--orange);
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 1rem;
}
.contact-list li {
  padding: 0.8em 0;
  border-bottom: 1px solid var(--line);
}
.contact-list strong {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 0.2em;
}

/* sezioni con ancora interna: non devono finire sotto lo header sticky */
#contatti,
#storia {
  scroll-margin-top: 110px;
}

/* mappa Google nella sezione contatti */
.map-embed {
  margin-top: 1.4rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.map-embed iframe {
  display: block;
}
/* il wrapper di @next/third-parties porta l'altezza inline: serve !important;
   l'iframe segue perché il CSS batte l'attributo height="400" */
@media (max-width: 620px) {
  .map-embed > div {
    height: 280px !important;
  }
  .map-embed iframe {
    height: 280px;
  }
}

/* --- footer -------------------------------------------------------------------- */
.site-footer {
  background: var(--paper-dark);
  color: #a8a196;
  font-size: 0.92rem;
}
.site-footer .container {
  padding-block: clamp(44px, 6vw, 72px);
}
.site-footer a {
  color: #d3ccc0;
}
.site-footer a:hover {
  color: #fff;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
}
@media (max-width: 860px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 520px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}
.site-footer h3 {
  color: #fff;
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 1em;
}
.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.site-footer li {
  margin: 0.5em 0;
}
.site-footer .brand__img {
  height: 34px;
}
.footer-partner {
  margin-top: 1.4em;
  font-size: 0.82rem;
  color: #8f887c;
}
.footer-partner__logo {
  display: block;
  margin-top: 0.6em;
  height: 30px;
  width: auto;
}
/* logo SKIDATA nel blocco partner della pagina chi-siamo */
.partner-logo {
  display: block;
  width: 180px;
  height: auto;
  margin-top: 1rem;
}
.footer-social {
  display: flex;
  gap: 10px;
  margin-top: 1.4em;
}
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid #35302a;
  color: #d3ccc0;
}
.footer-social a:hover {
  border-color: #d3ccc0;
  color: #fff;
}
.footer-social svg {
  width: 18px;
  height: 18px;
}
.footer-bottom {
  border-top: 1px solid #35302a;
  margin-top: 2.4rem;
  padding-top: 1.6rem;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: #a8a196;
}
.footer-bottom__links {
  display: flex;
  gap: 20px;
}

/* --- consenso cookie (GDPR) -------------------------------------------------- */
/* i due fab (cookie + accessibilità) stanno in basso a DEstra, in riga:
   a sinistra, su mobile, coprivano i dati del footer */
.cookie-consent-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--white);
  color: var(--orange);
  box-shadow: var(--shadow-md);
  cursor: pointer;
}
.cookie-consent-fab svg {
  width: 22px;
  height: 22px;
}
.cookie-consent-fab:hover {
  border-color: var(--ink);
  color: var(--ink);
}
.cookie-consent-overlay {
  position: fixed;
  inset: 0;
  z-index: 95;
  background: rgba(27, 26, 24, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--gutter);
}
.cookie-consent {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  max-width: 540px;
  width: 100%;
  padding: clamp(22px, 3vw, 32px);
}
.cookie-consent h2 {
  font-size: 1.3rem;
  margin-bottom: 0.4em;
}
.cookie-consent p {
  margin-bottom: 1.4rem;
}
.cookie-consent .btn-row {
  justify-content: flex-end;
}

/* --- pannello accessibilità --------------------------------------------------- */
/* fab affiancato a sinistra di quello dei cookie (right: 20px + 44px + gap) */
.a11y-fab {
  position: fixed;
  right: 76px;
  bottom: 20px;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--white);
  color: var(--orange);
  box-shadow: var(--shadow-md);
  cursor: pointer;
}
.a11y-fab svg {
  width: 22px;
  height: 22px;
}
.a11y-fab:hover {
  border-color: var(--ink);
  color: var(--ink);
}
.a11y-overlay {
  position: fixed;
  inset: 0;
  z-index: 95;
  background: rgba(27, 26, 24, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--gutter);
}
.a11y-dialog {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  max-width: 540px;
  width: 100%;
  padding: clamp(22px, 3vw, 32px);
}
.a11y-dialog h2 {
  font-size: 1.3rem;
  margin-bottom: 0.4em;
}
.a11y-dialog p {
  margin-bottom: 1.4rem;
}
.a11y-dialog .btn-row {
  justify-content: flex-end;
}
/* una preferenza per riga: colonna fissa, non si spacca col testo ingrandito */
.a11y-toggles {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.6rem;
}
.a11y-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 44px;
  padding: 0 0.2rem;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
}
.a11y-toggle input {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 auto;
  margin: 0;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  position: relative;
  background: var(--line-strong);
  cursor: pointer;
  transition: background 0.15s ease;
}
.a11y-toggle input::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--white);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: transform 0.15s ease;
}
.a11y-toggle input:checked {
  background: var(--orange);
}
.a11y-toggle input:checked::after {
  transform: translateX(20px);
}
.a11y-toggle input:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}
/* il focus programmato del salto al contenuto non deve mostrare l'outline */
main[tabindex='-1']:focus {
  outline: none;
}

/* --- movimento ridotto (pannello + impostazione OS) ------------------------- */
/* 0.01ms e non "none": gli eventi transitionend devono comunque scattare o i
   componenti a stati (drawer, dialog) restano appesi a metà. html stesso è
   incluso: il css base gli mette scroll-behavior smooth e il selettore *
   da solo non lo coprirebbe. */
html.a11y-reduced-motion,
html.a11y-reduced-motion *,
html.a11y-reduced-motion *::before,
html.a11y-reduced-motion *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
  scroll-behavior: auto !important;
}
@media (prefers-reduced-motion: reduce) {
  html,
  html *,
  html *::before,
  html *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
/* eccezione: lo spinner di invio del form landing resta animato, è un
   indicatore di attività essenziale e da fermo sembrerebbe rotto */
html.a11y-reduced-motion .lp-overlay__spinner,
html .lp-overlay__spinner {
  animation-duration: 0.8s !important;
}

/* --- link sottolineati (pannello) --------------------------------------------- */
html.a11y-underline a {
  text-decoration: underline !important;
}

/* --- utilities ----------------------------------------------------------------- */
.mt-0 {
  margin-top: 0;
}
.mb-0 {
  margin-bottom: 0;
}
.text-justify {
  text-align: justify;
  text-wrap: pretty;
}
.stack > * + * {
  margin-top: 1rem;
}
.pill-note {
  display: inline-block;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  background: var(--orange-tint);
  color: var(--orange);
  border-radius: 999px;
  padding: 0.4em 0.9em;
  font-weight: 600;
}
.skip-link {
  position: absolute;
  left: -9999px;
}
.skip-link:focus {
  left: 16px;
  top: 10px;
  background: #fff;
  padding: 0.6em 1em;
  z-index: 100;
  border-radius: var(--radius);
}
