/* Rebirth Technologies
   Layout: sezioni a tutta larghezza che alternano Industrial Dark e Ice,
   contenuto allineato a sinistra su una colonna da 1280px.
   Il gesto grafico è la diagonale del marchio R: torna nella "cucitura"
   dell'hero (legacy → specifica ricostruita), nelle bande dei riquadri
   in evidenza e nel blocco contatti. */

/* ── Font (ospitati sul sito, licenza SIL Open Font License) ──
   Sottoinsieme "latin" da Google Fonts: nessuna richiesta a server esterni. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("fonts/inter-variable.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/space-grotesk-variable.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/ibm-plex-mono-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/ibm-plex-mono-500.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;
}

:root {
  /* Palette dal brand kit */
  --ink: #0B1220;          /* Industrial Dark */
  --ink-2: #111A2C;
  --ink-3: #1C2740;
  --yellow: #FFC107;       /* Construction Yellow */
  --gold: #E0A800;         /* Golden */
  --steel: #64748B;        /* Steel */
  --steel-soft: #9AA6B8;   /* Steel schiarito per testo su fondo scuro */
  --cloud: #E5EAF0;        /* Cloud */
  --ice: #F8FAFC;          /* Ice */
  --line-dark: rgba(229, 234, 240, 0.14);
  --line-light: rgba(11, 18, 32, 0.14);

  /* Tipografia dal brand kit */
  --f-display: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --f-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --fs-display: clamp(2.75rem, 1.4rem + 5.4vw, 6.25rem);
  --fs-h1: clamp(2.35rem, 1.2rem + 3.2vw, 4.4rem);
  --fs-h2: clamp(2rem, 1.35rem + 2.4vw, 3.5rem);
  --fs-h3: clamp(1.2rem, 1.05rem + 0.5vw, 1.45rem);
  --fs-body: 1.0625rem;
  --fs-small: 0.9375rem;
  --fs-mono: 0.8125rem;

  --gutter: clamp(20px, 5vw, 72px);
  --max: 1280px;
  --header-h: 76px;
  --section-y: clamp(80px, 10vw, 152px);

  color-scheme: dark;
}

/* ── Base ─────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--ice);
  font-family: var(--f-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p { margin: 0; }

a { color: inherit; }

ul, ol { margin: 0; padding: 0; list-style: none; }

dl, dd { margin: 0; }

:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  background: var(--yellow);
  color: var(--ink);
  padding: 10px 16px;
  font-weight: 600;
}
.skip:focus { top: 16px; }

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

/* ── Elementi tipografici ricorrenti ──────────────────── */

/* Etichetta con la spaziatura larga di "T E C H N O L O G I E S" nel logo */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
  font-family: var(--f-display);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--steel);
}
.eyebrow::before {
  content: "";
  flex: 0 0 32px;
  height: 2px;
  background: var(--gold);
}
.eyebrow--light { color: var(--steel-soft); }
.eyebrow--light::before { background: var(--yellow); }
.eyebrow--ink { color: var(--ink); }
.eyebrow--ink::before { background: var(--ink); }

.h2 { font-size: var(--fs-h2); max-width: 20ch; }
.h3 { font-size: var(--fs-h3); }

.display {
  font-size: var(--fs-display);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.035em;
}

/* Sottolineatura spessa, come le headline del riferimento */
.mark {
  background: linear-gradient(var(--yellow), var(--yellow)) 0 94% / 100% 0.11em no-repeat;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  padding-bottom: 0.04em;
}
.section--light .mark {
  background-image: linear-gradient(var(--gold), var(--gold));
}

/* Parola gigante in filigrana dietro i titoli */
.ghost {
  position: absolute;
  top: -0.42em;
  left: -0.04em;
  z-index: 0;
  font-family: var(--f-display);
  font-size: clamp(5.5rem, 17vw, 15rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  color: rgba(229, 234, 240, 0.045);
  pointer-events: none;
  user-select: none;
}

.section-head { position: relative; }
.section-head > :not(.ghost) { position: relative; z-index: 1; }

/* ── Pulsanti ─────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 17px 26px;
  border: 1px solid transparent;
  font-family: var(--f-display);
  font-size: 0.96875rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.btn .arrow { transition: transform 0.2s; }
.btn:hover .arrow { transform: translateX(4px); }

.btn--yellow { background: var(--yellow); color: var(--ink); }
.btn--yellow:hover { background: var(--gold); }

.btn--ghost { border-color: rgba(229, 234, 240, 0.35); color: var(--ice); }
.btn--ghost:hover { border-color: var(--ice); }

/* ── Header ───────────────────────────────────────────── */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  transition: background-color 0.3s;
}
.site-header.is-scrolled,
.site-header.is-open {
  background: rgba(11, 18, 32, 0.92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  height: var(--header-h);
}

.site-header__logo img { height: 44px; width: auto; }

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.4vw, 34px);
}
.site-nav a {
  position: relative;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(248, 250, 252, 0.78);
  text-decoration: none;
  transition: color 0.2s;
}
.site-nav a:not(.site-nav__cta)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  background: var(--yellow);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s;
}
.site-nav a:hover { color: var(--ice); }
.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after { transform: scaleX(1); }
.site-nav a[aria-current="page"] { color: var(--ice); }

.site-nav .site-nav__cta {
  padding: 10px 18px;
  border: 1px solid var(--yellow);
  color: var(--yellow);
}
.site-nav .site-nav__cta:hover { background: var(--yellow); color: var(--ink); }

/* Selettore lingua IT / EN */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 2px;
}
.site-nav .lang-switch a {
  padding: 6px 6px;
  font: 500 0.75rem var(--f-mono);
  letter-spacing: 0.06em;
  color: rgba(248, 250, 252, 0.55);
}
.site-nav .lang-switch a::after { display: none; }
.site-nav .lang-switch a:hover { color: var(--ice); }
.site-nav .lang-switch a[aria-current="true"] { color: var(--yellow); }
.lang-switch span { color: rgba(248, 250, 252, 0.3); font: 0.75rem var(--f-mono); }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border: 0;
  background: none;
  color: var(--ice);
  font: 500 0.875rem var(--f-body);
  cursor: pointer;
}
.nav-toggle__icon,
.nav-toggle__icon::before {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  transition: transform 0.25s;
}
.nav-toggle__icon { position: relative; transform: translateY(-3px); }
.nav-toggle__icon::before { content: ""; position: absolute; top: 7px; }
.is-open .nav-toggle__icon { transform: translateY(1px) rotate(45deg); }
.is-open .nav-toggle__icon::before { transform: translateY(-7px) rotate(-90deg); }

.site-header__progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
}
.site-header__progress span {
  display: block;
  height: 100%;
  background: var(--yellow);
  transform: scaleX(0);
  transform-origin: left;
}

@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: fixed;
    top: calc(var(--header-h) + env(safe-area-inset-top, 0px));
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 28px;
    background: var(--ink);
    border-bottom: 1px solid var(--line-dark);
    display: none;
  }
  .is-open .site-nav { display: flex; }
  .site-nav a {
    padding: 16px 0;
    font-size: 1.125rem;
    border-bottom: 1px solid var(--line-dark);
  }
  .site-nav a::after { display: none; }
  .lang-switch {
    order: 1;
    gap: 6px;
    padding-top: 20px;
  }
  .site-nav .lang-switch a {
    padding: 8px 4px;
    font-size: 0.875rem;
    border-bottom: 0;
  }
  .site-nav .site-nav__cta {
    margin-top: 20px;
    text-align: center;
    border-bottom: 1px solid var(--yellow);
  }
}

/* ── Hero ─────────────────────────────────────────────── */

.hero {
  position: relative;
  background: var(--ink);
  overflow: hidden;
  isolation: isolate;
}

/* Uno "stage" = testo a sinistra, visual a destra. Nello slider gli stage
   sono impilati nella stessa cella della griglia. */
.hero__stage {
  position: relative;
  display: flex;
  align-items: center;
  min-height: min(100svh, 960px);
  padding-block: calc(var(--header-h) + 72px) 140px;
}
.hero--page .hero__stage { min-height: min(88svh, 840px); padding-bottom: 104px; }

/* velatura che separa il testo dal visual */
.hero__stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, var(--ink) 0%, var(--ink) 40%, rgba(11, 18, 32, 0.6) 50%, rgba(11, 18, 32, 0) 60%);
  pointer-events: none;
}

.hero__visual {
  position: absolute;
  top: var(--header-h);
  bottom: 0;
  left: calc(50% + 8px);
  right: max(0px, calc(50% - 920px));
  z-index: 0;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 4%, #000 80%, transparent 100%), linear-gradient(90deg, #000 0, #000 88%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(180deg, transparent 0, #000 4%, #000 80%, transparent 100%), linear-gradient(90deg, #000 0, #000 88%, transparent 100%);
  mask-composite: intersect;
}

/* nello slider il visual si ferma sopra la barra dei comandi */
@media (min-width: 901px) {
  .hero--slider .hero__visual { bottom: 104px; }
}

/* Visual 1 · eseguibile → specifica ricostruita, separati dalla diagonale della R */
.seam { --x: 31%; --skew: 8%; }

.code {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 92px 0 0 4%;
  font-family: var(--f-mono);
  font-size: clamp(0.75rem, 0.9vw, 1rem);
  line-height: 1.85;
  white-space: normal;
  overflow: hidden;
}
.code span { display: block; min-height: 1.85em; white-space: pre; }

.code--legacy { color: rgba(154, 166, 184, 0.42); }

.code--modern {
  padding-left: 44%;
  background: #131D33;
  color: #CBD5E1;
  clip-path: polygon(calc(var(--x) + var(--skew)) 0, 100% 0, 100% 100%, calc(var(--x) - var(--skew)) 100%);
}
.code--modern b { font-weight: 500; color: var(--yellow); }
.code--modern s { text-decoration: none; color: #F3D27C; }
.code--modern .c { color: var(--steel-soft); }
.code--modern i { font-style: normal; }
.code--modern .ok { color: var(--yellow); }
.code--modern .tbc { color: var(--steel-soft); background: rgba(100, 116, 139, 0.22); padding: 1px 4px; }

.seam__line {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: var(--yellow);
  clip-path: polygon(calc(var(--x) + var(--skew)) 0, calc(var(--x) + var(--skew) + 3px) 0, calc(var(--x) - var(--skew) + 3px) 100%, calc(var(--x) - var(--skew)) 100%);
}

.seam__tags {
  position: absolute;
  top: 40px;
  left: 0;
  right: 0;
  font-family: var(--f-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.seam__tags span {
  position: absolute;
  top: 0;
  left: 4%;
  padding: 6px 10px;
  background: var(--ink);
  border: 1px solid var(--line-dark);
  color: var(--steel-soft);
}
.seam__tags span + span { left: 44%; border-color: rgba(255, 193, 7, 0.5); color: var(--yellow); }

/* Visual 2 · schermata di un'applicazione di reparto */
.mock {
  display: flex;
  align-items: center;
  padding-left: 4%;
}
.mock__stripe {
  position: absolute;
  inset: 0;
  background: var(--gold);
  clip-path: polygon(62% 0, 70% 0, 34% 100%, 26% 100%);
  opacity: 0.9;
}
.mock__stripe--alt { clip-path: polygon(30% 0, 38% 0, 74% 100%, 66% 100%); }
.mock__panel {
  position: relative;
  width: min(92%, 560px);
  background: #131D33;
  border: 1px solid var(--line-dark);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.7);
  font-size: 0.8125rem;
  color: #CBD5E1;
}
.mock__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-dark);
  font-family: var(--f-display);
  font-weight: 500;
  color: var(--ice);
}
.mock__sync {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-mono);
  font-size: 0.6875rem;
  font-weight: 400;
  color: var(--steel-soft);
  white-space: nowrap;
}
.mock__sync::before { content: ""; width: 7px; height: 7px; background: var(--yellow); }
.mock table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.mock th, .mock td { padding: 11px 18px; text-align: left; white-space: nowrap; }
.mock th {
  font-family: var(--f-mono);
  font-size: 0.625rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--steel-soft);
}
.mock td { border-top: 1px solid rgba(229, 234, 240, 0.07); }
.mock td:nth-child(3) { text-align: right; font-family: var(--f-mono); }
.mock th:nth-child(3) { text-align: right; }
.mock td:first-child { font-family: var(--f-mono); color: var(--ice); }
.chip {
  display: inline-block;
  padding: 2px 8px;
  font-size: 0.6875rem;
  font-weight: 500;
  border: 1px solid currentColor;
}
.chip--ok { color: #86C5A4; }
.chip--wait { color: var(--steel-soft); }
.chip--stop { color: var(--ink); background: var(--yellow); border-color: var(--yellow); }
.mock__foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-top: 1px solid var(--line-dark);
  font-family: var(--f-mono);
  font-size: 0.6875rem;
  color: var(--steel-soft);
}

/* Visual 3 · registro di un agente */
.agentlog {
  display: flex;
  align-items: center;
  padding-left: 4%;
}
.agentlog__panel {
  position: relative;
  width: min(96%, 620px);
  padding: 22px 0;
  background: #0E1729;
  border: 1px solid var(--line-dark);
  font-family: var(--f-mono);
  font-size: clamp(0.6875rem, 0.8vw, 0.8125rem);
  line-height: 1.6;
}
.agentlog__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 16px;
  padding: 0 20px 16px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--line-dark);
  color: var(--steel-soft);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.625rem;
}
.agentlog__head span:last-child { color: var(--yellow); }
.agentlog ol { display: grid; }
.agentlog li {
  display: grid;
  grid-template-columns: 9ch 13ch minmax(0, 1fr);
  gap: 12px;
  padding: 5px 20px;
  color: #CBD5E1;
}
.agentlog time { color: var(--steel); }
.agentlog .who { color: var(--steel-soft); }
.agentlog .warn { background: rgba(255, 193, 7, 0.08); }
.agentlog .warn .what { color: var(--yellow); }
.agentlog .human { background: var(--yellow); color: var(--ink); }
.agentlog .human time, .agentlog .human .who { color: rgba(11, 18, 32, 0.7); }

/* le righe compaiono in sequenza quando lo stage diventa attivo */
.is-active .agentlog li { animation: logline 0.5s both; }
.is-active .agentlog li:nth-child(2) { animation-delay: 0.5s; }
.is-active .agentlog li:nth-child(3) { animation-delay: 1s; }
.is-active .agentlog li:nth-child(4) { animation-delay: 1.5s; }
.is-active .agentlog li:nth-child(5) { animation-delay: 2s; }
.is-active .agentlog li:nth-child(6) { animation-delay: 2.5s; }
.is-active .agentlog li:nth-child(7) { animation-delay: 3s; }
.is-active .agentlog li:nth-child(8) { animation-delay: 3.5s; }
@keyframes logline { from { opacity: 0.12; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* Testo */
.hero__inner { position: relative; z-index: 2; }

.hero__title {
  max-width: 10.5em;
  font-size: var(--fs-h1);
  font-weight: 700;
  line-height: 1.03;
  letter-spacing: -0.03em;
}

.hero__lead {
  max-width: 34em;
  margin-top: 32px;
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  line-height: 1.55;
  color: #C7D0DC;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 44px;
}

/* Slider */
.hero__slides { display: grid; }
.hero__slides > .hero__stage {
  grid-area: 1 / 1;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s ease, visibility 0s linear 0.7s;
}
.hero__slides > .hero__stage.is-active {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.7s ease, visibility 0s;
}

.hero__controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 40px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
}
.hero__count {
  margin-right: auto;
  font-family: var(--f-mono);
  font-size: 0.75rem;
  color: var(--steel-soft);
  font-variant-numeric: tabular-nums;
}
.hero__count b { font-weight: 500; color: var(--ice); }
.hero__btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line-dark);
  background: transparent;
  color: var(--ice);
  font: 400 1rem var(--f-body);
  cursor: pointer;
  transition: border-color 0.2s;
}
.hero__btn:hover { border-color: var(--ice); }
.hero__dots { display: flex; gap: 10px; }
.hero__dot {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: clamp(72px, 9vw, 132px);
  padding: 10px 0 0;
  border: 0;
  background: none;
  color: var(--steel-soft);
  font: 500 0.6875rem var(--f-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: left;
  cursor: pointer;
}
.hero__dot::before {
  content: "";
  display: block;
  height: 2px;
  width: 100%;
  background: linear-gradient(var(--yellow), var(--yellow)) 0 0 / var(--fill, 0%) 100% no-repeat, rgba(229, 234, 240, 0.2);
}
.hero__dot[aria-current="true"] { color: var(--ice); }

@media (max-width: 900px) {
  .hero__stage,
  .hero--page .hero__stage {
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
    padding-bottom: 0;
  }
  .hero--slider .hero__stage { padding-bottom: 96px; }
  .hero__stage::before { display: none; }
  .hero__visual {
    position: relative;
    order: 2;
    inset: auto;
    height: 380px;
    margin-top: 56px;
  }
  .seam { --x: 22%; --skew: 10%; }
  .code { padding: 52px 0 0 var(--gutter); font-size: 0.6875rem; }
  .code--modern { padding-left: 38%; }
  .seam__tags { top: 0; }
  .seam__tags span:first-child { left: var(--gutter); }
  .seam__tags span + span { left: 38%; }
  .mock, .agentlog { padding-inline: var(--gutter); }
  .mock__panel, .agentlog__panel { width: 100%; }
  .hero__dots .hero__dot { width: 44px; font-size: 0; gap: 0; }
  .hero__controls { bottom: 28px; }
}

@media (max-width: 560px) {
  .seam__tags span:first-child { display: none; }
  .mock th:nth-child(2), .mock td:nth-child(2) { display: none; }
  .agentlog li { grid-template-columns: 8ch minmax(0, 1fr); }
  .agentlog .who { display: none; }
}

/* ── Sezioni ──────────────────────────────────────────── */

.section { position: relative; padding-block: var(--section-y); }
.section--tight { padding-block: 0; }

.section--light { background: var(--ice); color: var(--ink); }
.section--light .ghost { color: rgba(11, 18, 32, 0.045); }

.section--dark { background: var(--ink); color: var(--ice); }

.section--steel {
  color: var(--ice);
  background:
    radial-gradient(ellipse 70% 60% at 62% 28%, rgba(100, 116, 139, 0.45), transparent 70%),
    linear-gradient(180deg, #0E1626, var(--ink));
}

/* ── Il bisogno ───────────────────────────────────────── */

.symptoms {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: clamp(48px, 6vw, 80px);
}

.symptom {
  display: flex;
  flex-direction: column;
  min-height: 320px;
  padding: 26px 24px 28px;
  background: var(--ice);
  color: var(--ink);
  border-bottom: 4px solid transparent;
  transition: transform 0.25s, border-color 0.25s;
}
.symptom:hover { transform: translateY(-4px); border-bottom-color: var(--yellow); }

.symptom__diag {
  font-family: var(--f-mono);
  font-size: 0.75rem;
  line-height: 1.7;
  color: var(--steel);
}
.symptom__diag em {
  font-style: normal;
  color: var(--ink);
  background: rgba(255, 193, 7, 0.38);
  padding: 0 3px;
}

.symptom h3 {
  margin-top: auto;
  padding-top: 32px;
  font-size: var(--fs-h3);
}
.symptom p {
  margin-top: 10px;
  font-size: var(--fs-small);
  line-height: 1.55;
  color: #3A475C;
}

.verdict {
  max-width: 24ch;
  margin-top: clamp(56px, 7vw, 96px);
  font-family: var(--f-display);
  font-size: clamp(1.6rem, 1.1rem + 2vw, 2.75rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.verdict span { color: var(--yellow); }

@media (max-width: 1100px) {
  .symptoms { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .symptom { min-height: 260px; }
}
@media (max-width: 560px) {
  .symptoms { grid-template-columns: minmax(0, 1fr); }
  .symptom { min-height: 0; }
}

/* "Il bisogno": stesse schede de "Il problema", su fondo scuro */
.symptoms--ok .symptom {
  background: var(--ink-2);
  color: var(--ice);
  border: 1px solid var(--line-dark);
  border-bottom-width: 4px;
}
.symptoms--ok .symptom:hover { border-bottom-color: var(--yellow); }
.symptoms--ok .symptom__diag { color: var(--steel-soft); }
.symptoms--ok .symptom__diag em { color: var(--ink); background: var(--yellow); }
.symptoms--ok .symptom p { color: #BAC4D2; }

/* ── PRISM ────────────────────────────────────────────── */

.prism__acronym {
  margin-top: 14px;
  font-family: var(--f-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.04em;
  color: var(--steel);
}
.prism__acronym b { color: var(--ink); font-weight: 500; background: rgba(255, 193, 7, 0.38); padding: 0 2px; }

.prism {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(36px, 5vw, 72px);
  align-items: center;
  margin-top: clamp(48px, 6vw, 80px);
}
.prism__col { position: relative; }
.prism__label {
  margin-bottom: 14px;
  font-family: var(--f-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--steel);
}
.prism__col li {
  padding: 12px 0;
  border-top: 1px solid var(--line-light);
  font-family: var(--f-display);
  font-size: 1.125rem;
  font-weight: 500;
}
.prism__col li:last-child { border-bottom: 1px solid var(--line-light); }
.prism__col--out li::before { content: "✓ "; color: var(--gold); }

/* frecce tra le colonne */
.prism__col::after,
.prism__core::after {
  content: "→";
  position: absolute;
  top: 50%;
  right: calc(-1 * clamp(36px, 5vw, 72px) / 2);
  transform: translate(50%, -50%);
  font-size: 1.5rem;
  color: var(--gold);
}
.prism__col--out::after { display: none; }

.prism__core {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  min-height: 240px;
  padding: 32px;
  background:
    linear-gradient(115deg, transparent 62%, var(--gold) 62%, var(--gold) 70%, transparent 70%, transparent 76%, var(--yellow) 76%, var(--yellow) 80%, transparent 80%),
    var(--ink);
  color: #BAC4D2;
  font-family: var(--f-mono);
  font-size: var(--fs-mono);
}
.prism__name {
  font-family: var(--f-display);
  font-size: clamp(2.5rem, 1.8rem + 2vw, 3.5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--ice);
}

@media (max-width: 860px) {
  .prism { grid-template-columns: minmax(0, 1fr); gap: 56px; }
  .prism__col::after,
  .prism__core::after {
    content: "↓";
    top: auto;
    right: auto;
    bottom: -28px;
    left: 50%;
    transform: translate(-50%, 50%);
  }
  .prism__core { min-height: 180px; }
}

/* ── Il rischio ───────────────────────────────────────── */

.split {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(40px, 6vw, 96px);
}
.split__head .h2 { max-width: 12ch; }

.risks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 40px);
}

.risk {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 24px;
  border-top: 3px solid var(--ink);
}
.risk h3 { font-size: var(--fs-h3); }
.risk p { font-size: var(--fs-small); color: #3A475C; }

.risk .risk__effect {
  margin-top: auto;
  padding-top: 18px;
  font-family: var(--f-mono);
  font-size: var(--fs-mono);
  font-weight: 500;
  color: var(--ink);
}
.risk__effect span { color: var(--gold); }

@media (max-width: 1000px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .split__head .h2 { max-width: 18ch; }
}
@media (max-width: 760px) {
  .risks { grid-template-columns: minmax(0, 1fr); gap: 40px; }
}

/* ── Perché adesso (riquadro incorniciato) ────────────── */

.inset {
  position: relative;
  margin-inline: clamp(0px, 2vw, 28px);
  padding-block: clamp(72px, 9vw, 128px);
  background: var(--ink);
  color: var(--ice);
  overflow: hidden;
}

.inset__shapes {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: min(36%, 560px);
}

.inset__inner { position: relative; z-index: 1; }
.inset__inner .h2 { max-width: 16ch; }

.reasons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 3vw, 44px);
  max-width: min(100%, 880px);
  margin-top: clamp(44px, 5vw, 64px);
}

.reason { display: flex; flex-direction: column; gap: 12px; }
.reason h3 { font-size: 1.25rem; line-height: 1.2; }
.reason p:not(.tag) { font-size: var(--fs-small); color: #BAC4D2; }

.tag {
  font-family: var(--f-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--yellow);
}

@media (max-width: 1100px) {
  .inset__shapes { width: 30%; opacity: 0.35; }
}
@media (max-width: 760px) {
  .reasons { grid-template-columns: minmax(0, 1fr); }
  .inset__shapes { width: 60%; opacity: 0.18; }
}

/* ── La metodologia ───────────────────────────────────── */

/* segue direttamente la sezione PRISM, anch'essa su fondo chiaro */
#risposta, #answer { padding-top: clamp(24px, 3vw, 48px); }

.sequence {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 40px);
  margin-top: clamp(56px, 7vw, 96px);
  counter-reset: none;
}
.sequence li {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 28px;
  border-top: 1px solid var(--line-light);
}
.sequence li::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 0;
  width: 9px;
  height: 9px;
  background: var(--gold);
}
.sequence__n {
  font-family: var(--f-mono);
  font-size: var(--fs-mono);
  color: var(--steel);
}
.sequence h3 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); }
.sequence p { max-width: 26ch; color: #3A475C; }

@media (max-width: 760px) {
  .sequence { grid-template-columns: minmax(0, 1fr); gap: 36px; }
}

/* ── Scorrimento orizzontale (metodo, sistemi) ────────────────────────────────────────── */

.hscroll {
  position: relative;
  background: var(--ink);
  color: var(--ice);
  padding-block: var(--section-y);
}

.hscroll__head { position: relative; }
.hscroll__head .ghost { top: -0.2em; }
.hscroll__head > :not(.ghost) { position: relative; z-index: 1; }
.hscroll__head .h2 { max-width: 16ch; }
.hscroll__intro {
  max-width: 44em;
  margin-top: 22px;
  color: #BAC4D2;
  position: relative;
  z-index: 1;
}

.hscroll__viewport {
  margin-top: clamp(40px, 5vw, 64px);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.hscroll__viewport::-webkit-scrollbar { display: none; }

.hscroll__track {
  --lead: max(var(--gutter), calc((100vw - var(--max)) / 2));
  display: flex;
  align-items: stretch;
  gap: 16px;
  width: max-content;
  padding-inline: var(--lead);
}

.phase {
  display: flex;
  flex-direction: column;
  flex: 0 0 clamp(290px, 27vw, 360px);
  padding: 30px 28px 32px;
  background: var(--ink-2);
  border: 1px solid var(--line-dark);
  scroll-snap-align: start;
  scroll-margin-inline-start: var(--gutter);
  transition: border-color 0.25s;
}
.phase:hover { border-color: rgba(255, 193, 7, 0.55); }

.phase__n {
  font-family: var(--f-display);
  font-size: 3.25rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--yellow);
}
.phase h3 { margin-top: 22px; font-size: 1.6rem; }
.phase__sub { margin-top: 6px; font-size: var(--fs-small); color: var(--steel-soft); }

.phase dl {
  display: grid;
  gap: 8px;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line-dark);
}
.phase dt {
  font-family: var(--f-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--steel-soft);
}
.phase dd { font-size: 0.9375rem; line-height: 1.55; color: #DCE3EC; }
.phase dd + dt { margin-top: 12px; }

/* etichette verticali che separano Assessment e Trasformazione */
.phase-group {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  padding: 6px 4px;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}
.phase-group span {
  font-family: var(--f-display);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--yellow);
}
.phase-group small {
  font-family: var(--f-mono);
  font-size: 0.6875rem;
  color: var(--steel-soft);
}
.phase-group:not(:first-child) { margin-left: 24px; }

.gate {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  flex: 0 0 clamp(240px, 20vw, 280px);
  padding: 30px 28px 32px;
  background: var(--yellow);
  color: var(--ink);
  scroll-snap-align: start;
}
.gate__label {
  font-family: var(--f-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.gate__text {
  font-family: var(--f-display);
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.hscroll__progress {
  margin-top: 36px;
}
.hscroll__progress::before {
  content: "";
  display: block;
  height: 2px;
  background: var(--line-dark);
}
.hscroll__progress span {
  display: block;
  height: 2px;
  margin-top: -2px;
  background: var(--yellow);
  transform: scaleX(0.12);
  transform-origin: left;
}

/* Modalità "pinned": la sezione resta ferma e i pannelli scorrono in orizzontale.
   Il blocco agganciato è alto quanto il suo contenuto; main.js lo centra sotto
   l'header (top) e calcola l'altezza della sezione, così non restano vuoti
   grandi sopra e sotto sugli schermi alti. */
.hscroll.is-pinned { padding-block: 0; }
.hscroll.is-pinned .hscroll__sticky {
  position: sticky;
  top: var(--header-h);
  display: flex;
  flex-direction: column;
  padding-block: clamp(32px, 4vw, 56px);
  overflow: hidden;
}
.hscroll.is-pinned .hscroll__viewport { overflow: visible; scroll-snap-type: none; }
.hscroll.is-pinned .hscroll__track { will-change: transform; }
.hscroll.is-pinned .hscroll__intro { max-width: 52em; }

@media (max-width: 700px) {
  .phase { flex-basis: 84vw; }
  .gate { flex-basis: 72vw; }
}

/* ── Banda chiara (Come si parte, pagina automazione) ── */

.figures-band { background: var(--cloud); padding-block: clamp(64px, 8vw, 112px); }

/* ── Automazione ──────────────────────────────────────── */

.flow {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 40px;
  margin-top: clamp(48px, 6vw, 72px);
}
.flow li {
  position: relative;
  padding: 14px 20px;
  border: 1px solid rgba(229, 234, 240, 0.22);
  font-family: var(--f-display);
  font-size: 0.9375rem;
  font-weight: 500;
}
.flow li:not(:last-child)::after {
  content: "→";
  position: absolute;
  top: 50%;
  right: -30px;
  transform: translateY(-50%);
  color: var(--yellow);
  font-family: var(--f-body);
}
.flow .flow__human { background: var(--yellow); border-color: var(--yellow); color: var(--ink); }

.compare {
  max-width: 980px;
  margin-top: clamp(48px, 6vw, 72px);
}
.compare__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(20px, 4vw, 64px);
  padding-block: 20px;
  border-top: 1px solid var(--line-dark);
}
.compare__row > span:first-child { color: var(--steel-soft); }
.compare__row > span:last-child { color: var(--ice); }
.compare__row--head {
  padding-block: 0 14px;
  border-top: 0;
  font-family: var(--f-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.compare__row--head > span:last-child { color: var(--yellow); }

.note {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-top: 40px;
  font-family: var(--f-mono);
  font-size: var(--fs-mono);
  color: var(--steel-soft);
}
.note::before {
  content: "";
  flex: 0 0 8px;
  height: 8px;
  background: var(--yellow);
}

@media (max-width: 760px) {
  .flow { flex-direction: column; gap: 30px; }
  .flow li { align-self: flex-start; }
  .flow li:not(:last-child)::after {
    content: "↓";
    top: auto;
    bottom: -27px;
    right: auto;
    left: 20px;
    transform: none;
  }
  .compare__row { font-size: var(--fs-small); }
}

/* ── Come si parte ────────────────────────────────────── */

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 40px);
  margin-top: clamp(48px, 6vw, 72px);
}
.steps li { position: relative; display: flex; flex-direction: column; gap: 10px; }
.steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 21px;
  left: 60px;
  right: -12px;
  height: 1px;
  background: rgba(11, 18, 32, 0.25);
}
.steps__n {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 14px;
  border: 1.5px solid var(--ink);
  font-family: var(--f-display);
  font-weight: 500;
}
.steps li:last-child .steps__n { background: var(--yellow); border-color: var(--yellow); }
.steps h3 { font-size: var(--fs-h3); }
.steps p { font-size: var(--fs-small); color: #3A475C; }

.steps__foot {
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid var(--line-light);
  font-family: var(--f-mono);
  font-size: var(--fs-mono);
  color: var(--steel);
}

@media (max-width: 900px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 44px; }
  .steps li:nth-child(2)::after { display: none; }
}
@media (max-width: 520px) {
  .steps { grid-template-columns: minmax(0, 1fr); }
  .steps li::after { display: none; }
}

/* ── Contatti ─────────────────────────────────────────── */

.cta {
  position: relative;
  padding-block: var(--section-y);
  background: var(--yellow);
  color: var(--ink);
  overflow: hidden;
}

.cta__shape {
  position: absolute;
  right: 0;
  bottom: 0;
  height: 100%;
  width: min(44%, 620px);
}

.cta__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(48px, 6vw, 96px);
  align-items: start;
}

.display--ink { max-width: 9ch; }

.cta__lead { max-width: 30em; margin-top: 28px; font-size: 1.125rem; }
.cta__mail { margin-top: 20px; font-size: 1rem; }
.cta__mail a { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }

.cta :focus-visible { outline-color: var(--ink); }
.cta .form :focus-visible { outline-color: var(--yellow); }

.form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px 24px;
  padding: clamp(28px, 4vw, 48px);
  background: var(--ink);
  color: var(--ice);
}
.form__row { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.form__row--half { grid-column: auto; }

.form label {
  font-family: var(--f-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--steel-soft);
}
.form label span { text-transform: none; letter-spacing: 0; }

.form input[type="text"],
.form input[type="email"],
.form input[type="tel"],
.form textarea {
  width: 100%;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid rgba(229, 234, 240, 0.3);
  border-radius: 0;
  background: transparent;
  color: var(--ice);
  font: 400 1rem/1.5 var(--f-body);
  transition: border-color 0.2s;
}
.form textarea { resize: vertical; min-height: 96px; }
.form select {
  width: 100%;
  padding: 10px 28px 10px 0;
  border: 0;
  border-bottom: 1px solid rgba(229, 234, 240, 0.3);
  border-radius: 0;
  background:
    linear-gradient(45deg, transparent 50%, var(--steel-soft) 50%) right 6px center / 6px 6px no-repeat,
    linear-gradient(-45deg, transparent 50%, var(--steel-soft) 50%) right 0 center / 6px 6px no-repeat;
  color: var(--ice);
  font: 400 1rem/1.5 var(--f-body);
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}
.form select option { background: var(--ink); color: var(--ice); }
.form select:focus { outline: none; border-bottom-color: var(--yellow); box-shadow: 0 1px 0 var(--yellow); }
.form textarea::placeholder { color: #66748A; }
.form input:focus,
.form textarea:focus { outline: none; border-bottom-color: var(--yellow); box-shadow: 0 1px 0 var(--yellow); }
.form [aria-invalid="true"] { border-bottom-color: #F87171; }

.form__check { flex-direction: row; align-items: flex-start; gap: 12px; }
.form__check input { flex: 0 0 auto; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--yellow); }
.form__check label {
  font-family: var(--f-body);
  font-size: 0.8125rem;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.5;
}

.form__error { grid-column: 1 / -1; font-size: 0.875rem; color: #FCA5A5; }
.form .btn { grid-column: 1 / -1; justify-self: start; }
.form__note { grid-column: 1 / -1; margin-top: -10px; font-size: 0.8125rem; color: var(--steel-soft); }
.form[hidden] { display: none; }
.form .btn[disabled] { opacity: 0.6; cursor: progress; }

/* Conferma di invio: stesso pannello del form */
.form--done { display: flex; flex-direction: column; gap: 12px; color: #BAC4D2; }
.form--done:focus { outline: none; }
.form__done-title {
  font-family: var(--f-display);
  font-size: var(--fs-h3);
  font-weight: 500;
  color: var(--ice);
}
.form__done-title::before { content: "✓ "; color: var(--yellow); }

@media (max-width: 960px) {
  .cta__grid { grid-template-columns: minmax(0, 1fr); }
  .cta__shape { width: 70%; opacity: 0.9; height: 45%; }
}
@media (max-width: 520px) {
  .form { grid-template-columns: minmax(0, 1fr); }
  .form__row--half { grid-column: 1 / -1; }
}

/* ── Footer ───────────────────────────────────────────── */

.footer {
  padding-block: clamp(64px, 7vw, 96px) calc(32px + env(safe-area-inset-bottom, 0px));
  background: var(--ink);
  color: var(--steel-soft);
  font-size: 0.875rem;
}

.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
}
.footer__brand img { width: 220px; }
.footer__brand p { max-width: 34em; margin-top: 24px; }
.footer__brand .footer__follow { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 20px; }

.footer__label {
  margin-bottom: 14px;
  font-family: var(--f-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ice);
}
.footer__nav { display: flex; flex-direction: column; gap: 8px; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--yellow); }
.footer__social { display: inline-flex; align-items: center; gap: 8px; }
.footer__icon { flex: 0 0 auto; }
.footer__legal { display: flex; flex-direction: column; gap: 14px; }
.footer__legal .footer__label { margin-bottom: 0; }

.footer__base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--line-dark);
}
.footer__claim {
  font-family: var(--f-display);
  font-size: 0.75rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

@media (max-width: 860px) {
  .footer__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .footer__grid { grid-template-columns: minmax(0, 1fr); }
}

/* ── Home · Cosa facciamo ─────────────────────────────── */

.intro {
  max-width: 44em;
  margin-top: 22px;
  color: #BAC4D2;
}
.section--light .intro { color: #3A475C; }

.services {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: clamp(48px, 6vw, 80px);
}

.service {
  display: flex;
  flex-direction: column;
  min-height: 360px;
  padding: 26px 24px 28px;
  background: var(--ice);
  color: var(--ink);
  text-decoration: none;
  border-bottom: 4px solid transparent;
  transition: transform 0.25s, border-color 0.25s;
}
.service:hover { transform: translateY(-4px); border-bottom-color: var(--yellow); }
.service__out {
  font-family: var(--f-mono);
  font-size: 0.75rem;
  color: var(--steel);
}
.service h3 { margin-top: 56px; font-size: clamp(1.35rem, 1.1rem + 0.6vw, 1.6rem); }
.service .more { margin-top: auto; padding-top: 22px; }
.service p { margin-top: 10px; font-size: var(--fs-small); line-height: 1.55; color: #3A475C; }
.more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  font-family: var(--f-display);
  font-size: 0.875rem;
  font-weight: 500;
}
.more span { transition: transform 0.2s; }
a:hover > .more span, .more:hover span { transform: translateX(4px); }

@media (max-width: 1100px) {
  .services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .service { min-height: 300px; }
}
@media (max-width: 560px) {
  .services { grid-template-columns: minmax(0, 1fr); }
  .service { min-height: 0; }
}

/* ── Home · fascia Agenti AI ──────────────────────────── */

.btn--light { background: var(--ice); color: var(--ink); }
.btn--light:hover { background: var(--yellow); }

.inset__inner .intro { max-width: 36em; }
.inset__inner .btn { margin-top: 32px; }

.feature-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: min(100%, 900px);
  margin-top: clamp(44px, 5vw, 64px);
}
.feature-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 230px;
  padding: 24px;
  background: rgba(28, 39, 64, 0.72);
  border: 1px solid var(--line-dark);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.feature-card h3 { margin-top: auto; font-size: 1.25rem; }
.feature-card p:not(.tag) { font-size: var(--fs-small); color: #BAC4D2; }

@media (max-width: 760px) {
  .feature-cards { grid-template-columns: minmax(0, 1fr); }
  .feature-card { min-height: 0; }
}

/* ── Home · software che trattiamo ────────────────────── */

.sys {
  display: flex;
  flex-direction: column;
  flex: 0 0 clamp(270px, 24vw, 320px);
  min-height: 360px;
  padding: 26px 26px 28px;
  background: var(--ink-2);
  border: 1px solid var(--line-dark);
  scroll-snap-align: start;
  transition: border-color 0.25s;
}
.sys:hover { border-color: rgba(255, 193, 7, 0.55); }
.sys__stack {
  align-self: flex-start;
  padding: 5px 9px;
  border: 1px solid var(--line-dark);
  font-family: var(--f-mono);
  font-size: 0.6875rem;
  color: var(--steel-soft);
}
.sys h3 { margin-top: auto; padding-top: 40px; font-size: 1.45rem; }
.sys p { margin-top: 10px; font-size: var(--fs-small); color: #BAC4D2; }

.sys--end {
  background: var(--yellow);
  border-color: var(--yellow);
  color: var(--ink);
  text-decoration: none;
}
.sys--end:hover { border-color: var(--yellow); }
.sys--end p { color: var(--ink); }
.sys--end .sys__stack { border-color: rgba(11, 18, 32, 0.3); color: var(--ink); }

/* ── Home · come lavoriamo ────────────────────────────── */

.commitments {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 40px);
  margin-top: clamp(56px, 7vw, 96px);
  padding: clamp(28px, 4vw, 44px);
  background: var(--cloud);
}
.commitments h3 { font-size: 1.15rem; }
.commitments p { margin-top: 8px; font-size: var(--fs-small); color: #3A475C; }

@media (max-width: 1100px) {
  .commitments { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .commitments { grid-template-columns: minmax(0, 1fr); }
}

/* ── Pagine servizio ──────────────────────────────────── */

.crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
  font-family: var(--f-mono);
  font-size: 0.75rem;
  color: var(--steel-soft);
}
.crumb a { text-decoration: none; }
.crumb a:hover { color: var(--yellow); }
.crumb span[aria-hidden] { color: var(--steel); }

.related {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px 24px;
  margin-top: 40px;
  font-family: var(--f-display);
  font-weight: 500;
}
.related a { color: var(--yellow); text-decoration: none; }
.section--light .related a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 5px; }

/* ── Movimento ridotto ────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

@media (max-width: 560px) {
  .eyebrow { letter-spacing: 0.2em; }
  .btn { padding-inline: 22px; }
}

/* ── Aggiunte pagine ──────────────────────────────────── */

.section--frame { padding-block: clamp(0px, 2vw, 28px); }

.sequence--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.section--dark .sequence li { border-top-color: var(--line-dark); }
.section--dark .sequence li::before { background: var(--yellow); }
.section--dark .sequence__n { color: var(--steel-soft); }
.section--dark .sequence p { color: #BAC4D2; }

@media (max-width: 1000px) {
  .sequence--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 44px; }
}
@media (max-width: 560px) {
  .sequence--4 { grid-template-columns: minmax(0, 1fr); }
}

.sys-wrap { display: flex; flex: 0 0 auto; scroll-snap-align: start; scroll-margin-inline-start: var(--gutter); }
.sys { scroll-margin-inline-start: var(--gutter); }
.section--light .inset .intro { color: #BAC4D2; }

/* ── Revisione commerciale ────────────────────────────── */

.services__note {
  margin-top: 28px;
  font-family: var(--f-mono);
  font-size: var(--fs-mono);
  color: var(--steel-soft);
}

.sequence__out {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px dashed var(--line-light);
  font-size: var(--fs-small);
  color: var(--ink);
}
.sequence .sequence__out { max-width: 30ch; color: var(--ink); }
.sequence__out span {
  display: block;
  margin-bottom: 2px;
  font-family: var(--f-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--steel);
}
#come-lavoriamo .intro, #how-we-work .intro { margin-top: 28px; }

a.sys { color: inherit; text-decoration: none; }
a.sys:focus-visible { outline-offset: -4px; }

/* le parole in filigrana non devono allargare la pagina; clip non rompe position: sticky */
.section, .hscroll, .cta { overflow-x: clip; }
.hero__visual { overflow: hidden; }

/* ── Pagina 404 ───────────────────────────────────────── */

.notfound {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 100svh;
  padding-block: calc(var(--header-h) + 64px) 64px;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(ellipse 60% 55% at 70% 30%, rgba(100, 116, 139, 0.32), transparent 70%),
    var(--ink);
}
.notfound__shape {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: -1;
  width: min(38vw, 520px);
  height: calc(100% - var(--header-h) - 24px);
}
.notfound__inner .display { max-width: 11ch; }
.notfound__code {
  margin-bottom: 40px;
  font-family: var(--f-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.08em;
  color: var(--steel-soft);
}
.notfound__code span { color: var(--yellow); }
.notfound__en {
  max-width: 34em;
  margin-top: 72px;
  padding-top: 28px;
  border-top: 1px solid var(--line-dark);
  font-size: var(--fs-small);
  color: #BAC4D2;
}
.notfound__en h2 { margin-bottom: 8px; color: var(--ice); }
.notfound__link {
  display: inline-block;
  margin-top: 14px;
  color: var(--yellow);
  font-weight: 500;
  text-decoration: none;
}
.notfound__link:hover { text-decoration: underline; text-underline-offset: 4px; }
.notfound + .footer { padding-top: 0; }
.notfound + .footer .footer__base { margin-top: 0; }

@media (max-width: 760px) {
  .notfound__shape { width: 70%; height: 40%; opacity: 0.5; }
}

/* ── Banner cookie ────────────────────────────────────── */

.cookie-banner {
  position: fixed;
  left: var(--gutter);
  right: var(--gutter);
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 70;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
  max-width: 760px;
  padding: 22px 24px;
  background: var(--ink-2);
  border: 1px solid var(--line-dark);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
  color: #BAC4D2;
  font-size: var(--fs-small);
}
.cookie-banner[hidden],
.menu-open .cookie-banner { display: none; }
.menu-open .fenice { display: none; }
.cookie-banner__text { flex: 1 1 320px; }
.cookie-banner__text a { color: var(--yellow); }
.cookie-banner__actions { display: flex; gap: 10px; }
/* "Rifiuta" resta della stessa dimensione di "Accetta" e ben visibile (linee guida del Garante) */
.cookie-banner .btn { padding: 11px 20px; font-size: 0.875rem; }

@media (max-width: 560px) {
  .cookie-banner { left: 12px; right: 12px; padding: 18px; }
  .cookie-banner__actions { width: 100%; }
  .cookie-banner .btn { flex: 1; justify-content: center; }
}

/* link "Preferenze cookie" nel footer: un pulsante che sembra un link */
.footer__link {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.footer__link:hover { color: var(--yellow); }

/* ── Pagine legali (cookie policy, privacy policy) ───── */

.legal { padding-top: calc(var(--header-h) + clamp(48px, 7vw, 96px)); }
.legal__body { max-width: 46em; }
.legal__body h1 { font-size: var(--fs-h2); }
.legal__updated { margin-top: 14px; font-family: var(--f-mono); font-size: var(--fs-mono); color: var(--steel); }
.legal__body h2 { margin-top: 48px; font-size: var(--fs-h3); }
.legal__body h3 { margin-top: 28px; font-size: 1.125rem; }
.legal__body p,
.legal__body ul { margin-top: 14px; color: #3A475C; }
.legal__body ul { padding-left: 1.2em; list-style: disc; }
.legal__body li + li { margin-top: 6px; }
.legal__body a { color: var(--ink); text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.legal__table { width: 100%; margin-top: 18px; border-collapse: collapse; font-size: var(--fs-small); }
.legal__table th,
.legal__table td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--line-light); text-align: left; vertical-align: top; color: #3A475C; }
.legal__table th { font-family: var(--f-mono); font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--steel); }
.legal__table code { font-family: var(--f-mono); font-size: 0.8125rem; color: var(--ink); }
.legal__scroll { overflow-x: auto; }
.legal__body .btn { margin-top: 20px; }
/* le pagine legali partono su fondo chiaro: l'header resta sempre scuro */
.page-legal .site-header { background: rgba(11, 18, 32, 0.96); }

/* ── Fenice: assistente AI in chat (creato da main.js) ── */

.fenice {
  position: fixed;
  right: calc(16px + env(safe-area-inset-right, 0px));
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 60; /* sotto il banner cookie */
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  font-family: var(--f-body);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.fenice[hidden] { display: none; }
.fenice.is-visible { opacity: 1; transform: none; }

/* avatar dell'operatore: cuffie e microfono su giallo, pallino verde "online" */
.fenice__mark {
  position: relative;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  background: var(--yellow);
  color: var(--ink);
}
.fenice__status {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 11px;
  height: 11px;
  border: 2px solid var(--ink-2);
  border-radius: 50%;
  background: #22C55E;
}
.fenice__head .fenice__status { border-color: var(--ink); }

.fenice__launcher {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 7px 18px 7px 7px;
  border: 1px solid var(--line-dark);
  border-top: 3px solid var(--yellow);
  background: var(--ink-2);
  color: var(--ice);
  font-family: var(--f-display);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
}
.fenice__launcher:hover { transform: translateY(-2px); border-color: rgba(229, 234, 240, 0.35); border-top-color: var(--yellow); }
.fenice.is-open .fenice__launcher { display: none; }

/* fumetto di benvenuto */
.fenice__teaser {
  position: relative;
  max-width: 280px;
  padding: 16px 40px 16px 18px;
  background: var(--ice);
  color: var(--ink);
  font-size: 0.9375rem;
  line-height: 1.45;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.35);
  animation: fenice-pop 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.3);
}
.fenice__teaser[hidden] { display: none; }
.fenice__teaser p { cursor: pointer; }
.fenice__teaser::after {
  content: "";
  position: absolute;
  right: 28px;
  bottom: -8px;
  border: 8px solid transparent;
  border-bottom: 0;
  border-top-color: var(--ice);
}
.fenice__teaser .fenice__x { position: absolute; top: 6px; right: 6px; color: var(--steel); }
.fenice__teaser .fenice__x:hover { color: var(--ink); }

@keyframes fenice-pop {
  from { opacity: 0; transform: translateY(10px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

.fenice__x {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: var(--steel-soft);
  font-size: 1.375rem;
  line-height: 1;
  cursor: pointer;
}
.fenice__x:hover { color: var(--ice); }

/* pannello della chat */
.fenice__panel {
  display: flex;
  flex-direction: column;
  width: min(390px, calc(100vw - 32px));
  height: min(580px, calc(100dvh - 32px));
  background: var(--ink);
  border: 1px solid var(--line-dark);
  border-top: 3px solid var(--yellow);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
  color: var(--ice);
  animation: fenice-pop 0.3s ease-out;
}
.fenice__panel[hidden] { display: none; }

.fenice__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 10px 14px 16px;
  border-bottom: 1px solid var(--line-dark);
}
.fenice__who { flex: 1; min-width: 0; }
.fenice__title { font-family: var(--f-display); font-size: 1.0625rem; font-weight: 600; }
.fenice__sub {
  font-family: var(--f-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--steel-soft);
}
.fenice__reset {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: var(--steel-soft);
  cursor: pointer;
}
.fenice__reset:hover { color: var(--ice); }
.fenice__reset[hidden] { display: none; }

.fenice__log {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 18px 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
  list-style: none;
}
.fenice__msg {
  max-width: 88%;
  padding: 10px 14px;
  font-size: 0.9375rem;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.fenice__msg--bot { align-self: flex-start; background: var(--ink-3); border-left: 2px solid var(--yellow); }
.fenice__msg--user { align-self: flex-end; background: var(--ice); color: var(--ink); }
.fenice__msg--error { border-left-color: #F87171; color: #FCA5A5; }

.fenice__msg--typing { display: flex; gap: 5px; padding: 14px; }
.fenice__msg--typing span {
  width: 6px;
  height: 6px;
  background: var(--steel-soft);
  animation: fenice-dot 1s infinite ease-in-out;
}
.fenice__msg--typing span:nth-child(2) { animation-delay: 0.15s; }
.fenice__msg--typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes fenice-dot {
  0%, 80%, 100% { opacity: 0.3; transform: none; }
  40% { opacity: 1; transform: translateY(-3px); }
}

.fenice__chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 14px; }
.fenice__chips[hidden] { display: none; }
.fenice__chip {
  padding: 7px 12px;
  border: 1px solid rgba(255, 193, 7, 0.45);
  background: transparent;
  color: var(--ice);
  font: 400 0.8125rem/1.3 var(--f-body);
  text-align: left;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
}
.fenice__chip:hover { background: rgba(255, 193, 7, 0.12); border-color: var(--yellow); }

.fenice__form {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 12px 12px 14px 16px;
  border-top: 1px solid var(--line-dark);
}
.fenice__label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.fenice__form textarea {
  flex: 1;
  min-width: 0;
  max-height: 120px;
  padding: 9px 0;
  border: 0;
  border-bottom: 1px solid rgba(229, 234, 240, 0.3);
  border-radius: 0;
  background: transparent;
  color: var(--ice);
  font: 400 1rem/1.4 var(--f-body); /* 16px: niente zoom automatico su iPhone */
  resize: none;
}
.fenice__form textarea::placeholder { color: #66748A; }
.fenice__form textarea:focus { outline: none; border-bottom-color: var(--yellow); }
.fenice__send {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border: 0;
  background: var(--yellow);
  color: var(--ink);
  cursor: pointer;
  transition: background-color 0.2s;
}
.fenice__send:hover { background: var(--gold); }
.fenice__send[disabled] { opacity: 0.5; cursor: progress; }


.fenice :focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }

@media (max-width: 560px) {
  .fenice { right: 12px; left: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
  .fenice__panel { width: 100%; height: min(600px, calc(100dvh - 24px)); }
  .fenice__launcher-label { display: none; }
  .fenice__launcher { padding: 7px; }
}

@media (prefers-reduced-motion: reduce) {
  .fenice, .fenice__teaser, .fenice__panel { animation: none; transition: none; }
  .fenice__msg--typing span { animation: none; opacity: 0.7; }
}
/* il contenitore occupa la fascia in basso: solo i suoi elementi ricevono i clic */
.fenice { pointer-events: none; }
.fenice > * { pointer-events: auto; }

/* Fenice: modulo di ricontatto */
.fenice [hidden] { display: none !important; }

.fenice__bar { padding: 0 16px 10px; }
.fenice__callme {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--yellow);
  font: 500 0.8125rem/1.3 var(--f-display);
  letter-spacing: 0.02em;
  cursor: pointer;
}
.fenice__callme:hover span { text-decoration: underline; text-underline-offset: 3px; }

.fenice__msg-cta { align-self: flex-start; list-style: none; }
.fenice__chip--cta { border-color: var(--yellow); background: rgba(255, 193, 7, 0.12); font-weight: 500; }

.fenice__lead {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.fenice__lead-title { font-family: var(--f-display); font-size: 1.125rem; font-weight: 600; }
.fenice__lead-intro { margin-top: -6px; font-size: 0.8125rem; line-height: 1.5; color: #BAC4D2; }

.fenice__field { display: flex; flex-direction: column; gap: 4px; }
.fenice__field > span {
  font-family: var(--f-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--steel-soft);
}
.fenice__field em { font-style: normal; text-transform: none; letter-spacing: 0; }
.fenice__field input,
.fenice__field textarea {
  width: 100%;
  padding: 7px 0;
  border: 0;
  border-bottom: 1px solid rgba(229, 234, 240, 0.3);
  border-radius: 0;
  background: transparent;
  color: var(--ice);
  font: 400 1rem/1.4 var(--f-body);
  resize: none;
}
.fenice__field input:focus,
.fenice__field textarea:focus { outline: none; border-bottom-color: var(--yellow); }
.fenice__lead [aria-invalid="true"] { border-bottom-color: #F87171; }

.fenice__check { display: flex; align-items: flex-start; gap: 10px; font-size: 0.8125rem; line-height: 1.45; color: #BAC4D2; }
.fenice__check input { flex: 0 0 auto; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--yellow); }
.fenice__check input[aria-invalid="true"] { outline: 2px solid #F87171; outline-offset: 1px; }

.fenice__lead-error { font-size: 0.8125rem; color: #FCA5A5; }

.fenice__lead-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 4px; }
.fenice__lead-actions .btn { padding: 12px 18px; font-size: 0.875rem; }
.fenice__lead-actions .btn[disabled] { opacity: 0.6; cursor: progress; }
.fenice__back {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--steel-soft);
  font: 400 0.8125rem/1.3 var(--f-body);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.fenice__back:hover { color: var(--ice); }

/* ── Automazione e AI: ecosistema di agenti, MCP/A2A, casi d'uso ── */

/* sei ruoli d'esempio: griglia piena, card un po' più basse */
.feature-cards--agents { max-width: none; }
.feature-cards--agents .feature-card { min-height: 200px; }

/* MCP e A2A: due card affiancate con sigla ed esempi */
.risks--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.risk .risk__label {
  font-family: var(--f-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--steel);
}
.risk__list {
  display: grid;
  gap: 6px;
  margin: -6px 0 0;
  padding: 0;
  list-style: none;
  font-size: var(--fs-small);
  color: #3A475C;
}
.risk__list li { position: relative; padding-left: 20px; }
.risk__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 9px;
  height: 2px;
  background: var(--gold);
}
.risk__list--steps { counter-reset: step; }
.risk__list--steps li::before {
  counter-increment: step;
  content: counter(step);
  top: 0.15em;
  width: auto;
  height: auto;
  background: none;
  font-family: var(--f-mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--gold);
}
.split__intro { margin-top: 20px; font-size: var(--fs-small); color: #3A475C; max-width: 32ch; }

/* casi d'uso */
.cases {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: clamp(44px, 5vw, 64px);
}
.case {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  background: rgba(28, 39, 64, 0.72);
  border: 1px solid var(--line-dark);
  border-top: 3px solid var(--yellow);
}
.case h3 { font-size: 1.25rem; }
.case__list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--fs-small);
  color: #BAC4D2;
}
.case__list li { position: relative; padding-left: 20px; }
.case__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 9px;
  height: 2px;
  background: var(--yellow);
}

@media (max-width: 1000px) {
  .cases { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split__intro { max-width: none; }
}
@media (max-width: 760px) {
  .risks--two, .cases { grid-template-columns: minmax(0, 1fr); }
}

/* link alle pagine MCP e A2A dalle schede della pagina Automazione e AI */
.risk .risk__more { margin-top: 4px; color: var(--ink); text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 5px; }

/* ── Pagine fuori navigazione: landing per le ads e Fenice a tutto schermo ── */

.site-header__cta { padding: 11px 20px; font-size: 0.875rem; white-space: nowrap; }
.footer--minimal { padding-block: 0 calc(24px + env(safe-area-inset-bottom, 0px)); }
.footer--minimal .footer__base { margin-top: 0; }
.footer--minimal a, .footer--minimal .footer__link { color: inherit; }

/* landing: rassicurazioni sotto i pulsanti della hero */
.lp-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  font-family: var(--f-mono);
  font-size: var(--fs-mono);
  color: var(--steel-soft);
}
.lp-trust li::before { content: "✓ "; color: var(--yellow); }

/* Fenice a tutto schermo */
.chatpage {
  min-height: 100vh;
  min-height: 100dvh;
  padding: calc(var(--header-h) + 32px) 0 32px;
  color: var(--ice);
  background:
    radial-gradient(ellipse 60% 50% at 30% 20%, rgba(100, 116, 139, 0.35), transparent 70%),
    linear-gradient(180deg, #0E1626, var(--ink));
}
.chatpage__inner {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.chatpage__intro { position: sticky; top: calc(var(--header-h) + 32px); padding-top: 12px; }
.chatpage__title { font-size: clamp(2rem, 1.3rem + 2.2vw, 3.25rem); max-width: 14ch; }
.chatpage__lead { margin-top: 24px; max-width: 34em; color: #BAC4D2; }
.chatpage__list { margin-top: 28px; }
.chatpage__chat {
  height: calc(100vh - var(--header-h) - 64px);
  height: calc(100dvh - var(--header-h) - 64px);
  min-height: 520px;
}

.fenice--page {
  position: static;
  display: block;
  height: 100%;
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.fenice--page .fenice__panel {
  width: 100%;
  height: 100%;
  animation: none;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
}
.fenice--page .fenice__head { padding: 16px 14px 16px 20px; }
.fenice--page .fenice__log { padding: 24px 20px; gap: 12px; }
.fenice--page .fenice__msg { max-width: 82%; font-size: 1rem; }
.fenice--page .fenice__chips { padding: 0 20px 16px; }
.fenice--page .fenice__chip { font-size: 0.875rem; padding: 9px 14px; }
.fenice--page .fenice__bar { padding: 0 20px 12px; }
.fenice--page .fenice__form { padding: 14px 14px 16px 20px; }

@media (max-width: 960px) {
  .chatpage__inner { grid-template-columns: minmax(0, 1fr); }
  .chatpage__intro { position: static; }
  .chatpage__chat { height: 80vh; height: 80dvh; min-height: 460px; }
}
@media (max-width: 560px) {
  .chatpage { padding-top: calc(var(--header-h) + 20px); }
  .chatpage__list { display: none; }
  .fenice--page { left: auto; right: auto; bottom: auto; }
  .site-header--minimal .site-header__bar { gap: 12px; }
  .site-header--minimal .site-header__logo img { height: 34px; }
  .site-header--minimal .site-header__cta { padding: 9px 12px; font-size: 0.8125rem; gap: 8px; }
}
