/* =========================================================
   vivosolution
   Fondo bianco marmo, testo e accento blu notte (dal logo).
   Righe sottili al posto delle card.
   ========================================================= */

:root {
  /* Bianco marmo e blu notte, presi dal logo */
  --bg: #f3f2ee;          /* bianco marmo */
  --bg-0: #fbfaf7;        /* campi del form */
  --bg-2: #ebe9e3;        /* fasce alternate */
  --bg-3: #e2dfd7;        /* hover */
  --bg-4: #cfcbc1;

  --fg: #14263c;          /* blu notte */
  --fg-2: #3f4d61;
  --fg-3: #5d6979;
  --rule: rgba(20, 38, 60, 0.13);
  --rule-strong: rgba(20, 38, 60, 0.26);

  --accent: #14263c;
  --accent-hover: #24395a;
  --on-accent: #f3f2ee;   /* testo sul blu notte */
  --on-accent-2: #aebfd6; /* testo secondario sul blu notte */

  --error: #b42318;
  --ph-bg: #fbeec5;
  --ph-ink: #6b4a00;

  --display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --body: "Schibsted Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --wrap: 1280px;
  --gutter: clamp(16px, 4vw, 48px);
  --section-y: clamp(88px, 11vw, 160px);
  --header-h: 72px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --radius: 14px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
  background: var(--bg);
  color-scheme: light;
  scrollbar-color: var(--bg-4) var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  caret-color: var(--accent);
}

::selection { background: var(--accent); color: var(--on-accent); }

h1, h2, h3, p, ul, ol, dl, dd, figure, fieldset { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
[hidden] { display: none !important; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.icon {
  width: 1.1em;
  height: 1.1em;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

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

.skip-link {
  position: absolute; left: 16px; top: -64px; z-index: 100;
  padding: 10px 16px; border-radius: 10px;
  background: var(--accent); color: var(--on-accent);
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

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

/* Segnaposto da sostituire con contenuti reali */
.ph {
  background: var(--ph-bg);
  color: var(--ph-ink);
  border-radius: 4px;
  padding: 0 0.3em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* ---------- Tipografia ---------- */
h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  font-variation-settings: "wdth" 90;
  text-wrap: balance;
}
h1 {
  font-size: clamp(2.25rem, 1.4rem + 3.4vw, 4.5rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
}
h2 {
  font-size: clamp(2rem, 1.3rem + 2.8vw, 4rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
}
h3 {
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.625rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}
p { text-wrap: pretty; }

.lead {
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
  line-height: 1.55;
  color: var(--fg-2);
  max-width: 38em;
}

/* ---------- Bottoni ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s var(--ease-out), border-color 0.2s var(--ease-out), color 0.2s var(--ease-out), transform 0.2s var(--ease-out);
}
.btn:active { transform: scale(0.98); }
.btn-sm { min-height: 42px; padding: 0 18px; font-size: 0.9375rem; }

.btn-solid { background: var(--accent); color: var(--on-accent); }
.btn-solid:hover { background: var(--accent-hover); }

.btn-line { border-color: var(--rule-strong); color: var(--fg); }
.btn-line:hover { border-color: var(--fg); }

.btn .icon { transition: transform 0.25s var(--ease-out); }
.btn:hover .icon { transform: translateX(3px); }

.btn:disabled { opacity: 0.6; cursor: progress; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s var(--ease-out), border-color 0.3s var(--ease-out);
}
.site-header.is-solid {
  background: var(--bg);
  border-bottom-color: var(--rule);
}

.header-row {
  display: flex;
  align-items: center;
  height: var(--header-h);
}

.header-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 300;
  font-variation-settings: "wdth" 90;
  letter-spacing: -0.03em;
  text-decoration: none;
  color: var(--fg);
}
.header-logo b { font-weight: 700; }
/* Marchio: le due foglie del logo, in blu notte */
.mark { flex-shrink: 0; width: auto; height: 30px; aspect-ratio: 165.9 / 205.5; fill: var(--accent); }
.wordmark-mark, .success-mark { fill: var(--accent); }

/* In cima alla pagina il logo piccolo è nascosto: c'è quello grande */
/* Il logo piccolo occupa spazio solo quando compare: così in cima il menu
   parte dal bordo sinistro, allineato al nome grande */
.site-header [data-header-logo] {
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  white-space: nowrap;
  transition: max-width 0.45s var(--ease-out), margin 0.45s var(--ease-out), opacity 0.3s var(--ease-out), visibility 0.3s;
}
.site-header.is-solid [data-header-logo] {
  max-width: 240px;
  margin-right: 32px;
  opacity: 1;
  visibility: visible;
}
.nav { margin-right: auto; }

/* Telefoni stretti: meno spazio tra gli elementi, così il nome non viene tagliato */
@media (max-width: 420px) {
  .site-header.is-solid [data-header-logo] { margin-right: 12px; }
  .header-row > .btn.btn-sm { padding: 0 14px; margin-right: 8px; }
}
@media (max-width: 350px) {
  .header-row > .btn.btn-sm { display: none; }
  .nav-toggle { margin-left: auto; }
}

.nav ul { display: flex; gap: 4px; margin-left: -12px; }
.nav a {
  display: block;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--fg-2);
  font-size: 0.9375rem;
  text-decoration: none;
  transition: color 0.2s, background-color 0.2s;
}
.nav a:hover { color: var(--fg); background: var(--bg-3); }
.nav a[aria-current="location"] { color: var(--fg); }

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--fg);
  cursor: pointer;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 16px;
  height: 1.5px;
  border-radius: 1px;
  background: currentColor;
  transition: transform 0.25s var(--ease-out), background-color 0.2s;
}
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before,
.nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -5px; }
.nav-toggle-bars::after { top: 5px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-5px) rotate(-45deg); }

@media (max-width: 900px) {
  .header-row > .btn { margin-left: auto; margin-right: 10px; }
  .nav-toggle { display: inline-flex; }
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--rule);
  }
  .nav.is-open { display: block; min-height: calc(100svh - var(--header-h)); }
  .nav ul { flex-direction: column; gap: 0; margin-left: 0; padding: 8px var(--gutter) 24px; }
  .nav a {
    padding: 16px 0;
    border-radius: 0;
    border-bottom: 1px solid var(--rule);
    font-family: var(--display);
    font-size: 1.5rem;
    font-variation-settings: "wdth" 90;
    letter-spacing: -0.02em;
    color: var(--fg);
  }
  .nav a:hover { background: none; }
  .nav li:last-child a { border-bottom: 0; }
  .site-header.menu-open { background: var(--bg); border-bottom-color: var(--rule); }
}

/* ---------- Prima schermata ---------- */
.hero-inner {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: calc(100svh - var(--header-h));
  padding-top: clamp(12px, 2vw, 32px);
  padding-bottom: clamp(24px, 4vw, 48px);
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 0.12em;
  font-family: var(--display);
  /* valore prudente; main.js lo adatta alla larghezza reale del contenuto */
  font-size: min(15rem, calc((100vw - var(--gutter) * 2) / 5.4));
  font-variation-settings: "wdth" 88, "opsz" 96;
  line-height: 0.9;
  letter-spacing: -0.03em;
  white-space: nowrap;
}
.wordmark-mark {
  position: relative;
  top: -0.025em;
  height: 0.76em;
  width: auto;
  aspect-ratio: 165.9 / 205.5;
  flex-shrink: 0;
  margin-right: 0.02em;
  overflow: visible;
}
.wm-vivo, .wm-solution { display: inline-block; }
.wm-vivo { font-weight: 760; letter-spacing: -0.02em; }
.wm-solution { font-weight: 300; letter-spacing: -0.035em; color: var(--fg-2); }

/* In fondo alla prima schermata: frase a sinistra, "Scorri" a destra */
.hero-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}
.hero-tagline {
  max-width: 16em;
  font-family: var(--display);
  font-variation-settings: "wdth" 88, "opsz" 96;
  font-size: clamp(1.75rem, 1rem + 3vw, 3.5rem);
  line-height: 1;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.ht-light { font-weight: 300; color: var(--fg-2); }
.ht-bold { font-weight: 760; color: var(--fg); }
.js .hero-tagline { animation: fade 0.8s var(--ease-out) 0.35s both; }

.scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  color: var(--fg-3);
  font-size: 0.875rem;
  text-decoration: none;
  transition: color 0.2s;
}
.scroll-cue:hover { color: var(--fg); }
.scroll-cue .icon {
  width: 36px;
  height: 36px;
  padding: 9px;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
}

/* Sotto i 700px il nome va su due righe, più grande */
@media (max-width: 700px) {
  .wordmark {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    column-gap: 0.1em;
    font-size: calc((100vw - var(--gutter) * 2) / 2.75);
    line-height: 0.86;
  }
  .wordmark-text { display: contents; }
  .wm-solution { grid-column: 1 / -1; }
  .wordmark-mark { height: 0.74em; top: -0.02em; }
}

/* Firma: all'apertura le due foglie del logo salgono, una dopo l'altra */
.js .wordmark-mark path {
  transform-box: fill-box;
  animation: blade 1s var(--ease-out) backwards;
}
.js .wordmark-mark .blade-low { animation-delay: 0.15s; }
.js .wordmark-mark .blade-high { animation-delay: 0.32s; }
.js .wm-vivo,
.js .wm-solution { animation: rise 0.9s var(--ease-out) both; }
.js .wm-solution { animation-delay: 0.08s; }
.js .site-header .btn,
.js .scroll-cue { animation: fade 0.8s var(--ease-out) 0.5s both; }
/* solo su desktop: su mobile il pannello del menu deve apparire subito */
@media (min-width: 901px) {
  .js .site-header .nav { animation: fade 0.8s var(--ease-out) 0.5s both; }
}

@keyframes blade {
  from { opacity: 0; transform: translate(-14%, 14%); }
  to { opacity: 1; transform: none; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(0.18em); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Promessa ---------- */
.intro {
  padding-top: clamp(72px, 9vw, 128px);
  border-top: 1px solid var(--rule);
}
.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: end;
}
.intro h1 { max-width: 15em; }
.intro-side .lead { max-width: none; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 28px;
  color: var(--fg-2);
  font-size: 0.9375rem;
}
.facts li { display: inline-flex; align-items: center; gap: 8px; }
.facts .icon { color: var(--accent); }

@media (max-width: 900px) {
  .intro-grid { grid-template-columns: 1fr; align-items: start; }
}
@media (max-width: 520px) {
  .actions .btn { flex: 1 1 100%; }
}

/* ---------- Sezioni ---------- */
.section { padding-block: var(--section-y); }
.section-raised { background: var(--bg-2); }

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 16px clamp(32px, 6vw, 96px);
  align-items: end;
  margin-bottom: clamp(48px, 6vw, 88px);
}
@media (max-width: 900px) {
  .section-head { grid-template-columns: 1fr; }
}

.aside-link {
  margin-top: clamp(40px, 5vw, 64px);
  color: var(--fg-2);
  font-size: 1.0625rem;
}
.aside-link a {
  color: var(--accent);
  font-weight: 500;
  text-decoration-color: rgba(20, 38, 60, 0.35);
  transition: text-decoration-color 0.2s;
}
.aside-link a:hover { text-decoration-color: var(--accent); }

/* ---------- Problemi: righe a due colonne ---------- */
.problems {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(32px, 6vw, 96px);
}
.problems li {
  display: grid;
  align-content: start;
  gap: 10px;
  padding-block: 28px;
  border-top: 1px solid var(--rule);
}
.problem {
  font-family: var(--display);
  font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
  font-weight: 500;
  font-variation-settings: "wdth" 92;
  line-height: 1.2;
  letter-spacing: -0.015em;
}
.answer {
  position: relative;
  padding-left: 28px;
  color: var(--fg-2);
}
.answer::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.75em;
  width: 16px;
  height: 2px;
  border-radius: 1px;
  background: var(--accent);
}
@media (max-width: 760px) {
  .problems { grid-template-columns: 1fr; }
  .problems li { padding-block: 22px; }
}

/* ---------- Servizi: elenco a righe ---------- */
.services { border-bottom: 1px solid var(--rule); }
/* Un solo pulsante a destra, a metà altezza dell'elenco (tra il secondo e il terzo servizio) */
.services-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px clamp(32px, 5vw, 80px);
  align-items: center;
}
.service {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 12px clamp(24px, 4vw, 64px);
  align-items: baseline;
  padding-block: 30px;
  border-top: 1px solid var(--rule);
}
.service h3 { font-size: clamp(1.375rem, 1.15rem + 0.9vw, 2rem); }
.service p { color: var(--fg-2); max-width: 36em; }

@media (max-width: 900px) {
  .service { grid-template-columns: 1fr; gap: 8px; padding-block: 26px; }
  .services-layout { grid-template-columns: 1fr; }
  .services-cta { justify-self: start; }
}

/* ---------- Metodo ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 40px);
}
.step {
  display: grid;
  align-content: start;
  gap: 10px;
  padding-top: 24px;
  border-top: 1px solid var(--rule-strong);
}
.step-num {
  font-family: var(--display);
  font-size: clamp(4rem, 3rem + 3vw, 6rem);
  font-weight: 300;
  font-variation-settings: "wdth" 85;
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--accent);
  margin-bottom: 16px;
}
.step-meta { color: var(--accent); font-size: 0.9375rem; font-weight: 500; }
.step p:last-child { color: var(--fg-2); }

@media (max-width: 1000px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 48px; }
}
@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; row-gap: 0; }
  .step {
    grid-template-columns: 64px 1fr;
    column-gap: 16px;
    row-gap: 6px;
    padding-block: 24px;
  }
  .step-num { grid-row: span 3; font-size: 3.5rem; margin: 0; }
  .step:last-child { padding-bottom: 0; }
}

/* ---------- Case study ---------- */
.case {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
  padding-top: clamp(32px, 4vw, 48px);
  border-top: 1px solid var(--rule);
}
.case h3 { font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.75rem); letter-spacing: -0.03em; line-height: 1.05; }

.case-story { display: grid; gap: 22px; margin-top: 36px; }
.case-story dt { font-weight: 600; margin-bottom: 4px; }
.case-story dd { margin: 0; color: var(--fg-2); }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
.tags li {
  padding: 5px 12px;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  color: var(--fg-2);
  font-size: 0.875rem;
}

/* Illustrazione del flusso di prenotazione MC House */
.case-visual { position: sticky; top: calc(var(--header-h) + 24px); }
.booking {
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid var(--rule);
  border-radius: 20px;
  background: var(--bg);
  box-shadow: 0 30px 60px -30px rgba(20, 38, 60, 0.22);
}
.booking-title {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 600;
  font-variation-settings: "wdth" 90;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.booking-sub { color: var(--fg-3); font-size: 0.9375rem; margin-top: 4px; }
.booking-label { margin: 22px 0 10px; color: var(--fg-2); font-size: 0.8125rem; font-weight: 500; }

.booking-days, .booking-slots { display: grid; gap: 8px; }
.booking-days { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.booking-slots { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.booking-days span, .booking-slots span {
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 10px 4px;
  border: 1px solid var(--rule);
  border-radius: 12px;
  color: var(--fg-3);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}
.booking-days b { color: var(--fg); font-size: 1.125rem; font-weight: 600; }
.booking-slots span { color: var(--fg); font-size: 0.9375rem; font-weight: 500; }
.booking-slots small { color: var(--fg-3); font-size: 0.75rem; font-weight: 400; }
.booking .is-on { border-color: var(--accent); background: rgba(20, 38, 60, 0.06); }
.booking .is-on small { color: var(--accent); }
.booking .is-full { color: var(--fg-3); text-decoration: line-through; text-decoration-color: var(--fg-3); }
.booking .is-full small { text-decoration: none; }

.booking-sync {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
  color: var(--fg-2);
  font-size: 0.875rem;
}
.booking-sync .icon { color: var(--accent); }
.booking-btn {
  display: flex;
  justify-content: center;
  margin-top: 18px;
  padding: 14px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
}
.case-visual figcaption { margin-top: 12px; color: var(--fg-3); font-size: 0.8125rem; }

@media (max-width: 900px) {
  .case { grid-template-columns: 1fr; }
  .case-visual { position: static; max-width: 480px; }
}

/* ---------- Team ---------- */
.team {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 64px);
}
.person { padding-top: clamp(20px, 3vw, 28px); border-top: 1px solid var(--rule-strong); }
.person-text { display: grid; gap: 10px; align-content: start; }
.person-text h3 { font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.5rem); letter-spacing: -0.03em; }
.person-role { color: var(--fg-2); font-size: 0.9375rem; }
.person-mail { justify-self: start; margin-top: -6px; color: var(--fg-2); font-size: 0.9375rem; text-decoration: none; overflow-wrap: anywhere; }
.person-mail:hover { color: var(--fg); text-decoration: underline; }
.person-text > p:not(.person-role) { color: var(--fg-2); }
.person-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  color: var(--accent);
  font-weight: 500;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.person-link:hover { text-decoration: underline; }

@media (max-width: 640px) {
  .team { grid-template-columns: 1fr; gap: 32px; }
}

/* ---------- FAQ ---------- */
.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
.faq-grid .section-head { grid-template-columns: 1fr; margin-bottom: 0; position: sticky; top: calc(var(--header-h) + 32px); }

.faq { border-bottom: 1px solid var(--rule); }
.faq details { border-top: 1px solid var(--rule); }
.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding-block: 24px;
  font-family: var(--display);
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
  font-weight: 500;
  font-variation-settings: "wdth" 92;
  letter-spacing: -0.015em;
  line-height: 1.25;
  list-style: none;
  cursor: pointer;
  transition: color 0.2s;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.faq summary .icon {
  width: 22px;
  height: 22px;
  color: var(--accent);
  transition: transform 0.3s var(--ease-out);
}
.faq details[open] summary .icon { transform: rotate(45deg); }
.faq details p { padding-bottom: 26px; padding-right: 40px; color: var(--fg-2); max-width: 40em; }

@media (max-width: 900px) {
  .faq-grid { grid-template-columns: 1fr; }
  .faq-grid .section-head { position: static; margin-bottom: 16px; }
}

/* ---------- Contatti: campo blu notte ---------- */
.contact {
  padding-block: var(--section-y);
  background: var(--accent);
  color: var(--on-accent);
}
.contact ::selection { background: var(--bg); color: var(--accent); }
.contact :focus-visible { outline-color: var(--bg); }

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.contact h2 { font-size: clamp(2.5rem, 1.4rem + 4.4vw, 5.5rem); line-height: 0.95; letter-spacing: -0.035em; }
.contact-lead {
  margin-top: 24px;
  max-width: 28em;
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
  color: var(--on-accent-2);
}

.contact-direct { display: grid; gap: 12px; margin-top: 40px; max-width: 420px; }
.contact-direct a {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border: 1px solid rgba(243, 242, 238, 0.28);
  border-radius: var(--radius);
  text-decoration: none;
  transition: background-color 0.2s, border-color 0.2s;
}
.contact-direct a:hover { background: rgba(243, 242, 238, 0.08); border-color: var(--on-accent); }
.contact-direct .icon { width: 22px; height: 22px; }
.contact-direct span { display: grid; color: var(--on-accent-2); font-size: 0.9375rem; overflow-wrap: anywhere; }
.contact-direct b { color: var(--on-accent); font-size: 1.0625rem; font-weight: 600; }

.contact-panel {
  padding: clamp(24px, 4vw, 44px);
  border-radius: 24px;
  background: var(--bg);
  color: var(--fg);
  box-shadow: 0 40px 80px -40px rgba(4, 12, 24, 0.55);
}
.contact-panel ::selection { background: var(--accent); color: var(--on-accent); }
.contact-panel :focus-visible { outline-color: var(--accent); }

@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
}

/* ---------- Form ---------- */
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.field { display: grid; gap: 8px; margin-bottom: 22px; }
fieldset.field { border: 0; padding: 0; min-width: 0; }

.field label, .field legend { font-size: 0.9375rem; font-weight: 500; }
.field legend { padding: 0; margin-bottom: 10px; }
.optional { color: var(--fg-3); font-weight: 400; }
.hint { color: var(--fg-3); font-size: 0.8125rem; }

input[type="text"], input[type="email"], textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 16px;
  border: 1px solid var(--fg-3);   /* >= 3:1 sul fondo, come chiede WCAG 1.4.11 */
  border-radius: 12px;
  background: var(--bg-0);
  color: var(--fg);
  font: inherit;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}
textarea { min-height: 128px; resize: vertical; line-height: 1.5; }
input:hover, textarea:hover { border-color: var(--fg-2); }
input:focus-visible, textarea:focus-visible {
  outline: none;
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(20, 38, 60, 0.16);
}
[aria-invalid="true"] { border-color: var(--error) !important; }
.error { color: var(--error); font-size: 0.8125rem; }
.error:empty { display: none; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--fg-3);
  border-radius: 999px;
  color: var(--fg-2);
  font-size: 0.875rem;
  font-weight: 400;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.2s, background-color 0.2s, color 0.2s;
}
.chip:hover span { border-color: var(--fg-2); color: var(--fg); }
.chip input:checked + span { border-color: var(--accent); background: var(--accent); color: var(--on-accent); font-weight: 500; }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--fg-2);
  font-size: 0.875rem !important;
  font-weight: 400 !important;
  cursor: pointer;
}
.check input { flex-shrink: 0; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent); }
.check a { color: var(--accent); }

.form-note { margin: -4px 0 18px; color: var(--fg-3); font-size: 0.875rem; }
.form-note a { color: var(--fg-2); }
.form-note a:hover { color: var(--accent); }
.form-status { color: var(--error); font-size: 0.875rem; }
.form-status:empty { display: none; }
.form-status:not(:empty) { margin-bottom: 14px; }
.form-submit { width: 100%; }

.form-success { display: grid; justify-items: start; gap: 12px; padding: 24px 0; }
.form-success:focus { outline: none; }
.success-mark { width: auto; height: 48px; aspect-ratio: 165.9 / 205.5; }
.form-success h3 { font-size: 2rem; }
.form-success p { color: var(--fg-2); }
.success-fallback a { color: var(--accent); overflow-wrap: anywhere; }

@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
}

/* ---------- Footer ---------- */
.site-footer { padding-block: 64px 32px; color: var(--fg-2); font-size: 0.9375rem; }
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
}
.footer-logo { margin-right: 0; }
.footer-claim { margin-top: 16px; max-width: 26em; }
.footer-links li + li { margin-top: 10px; }
.footer-links a { text-decoration: none; transition: color 0.2s; overflow-wrap: anywhere; }
.footer-links a:hover { color: var(--fg); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  color: var(--fg-3);
  font-size: 0.8125rem;
}
.footer-bottom a:hover { color: var(--fg); }

@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 440px) {
  .footer-grid { grid-template-columns: 1fr; }
}

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

.case-story dd { text-wrap: pretty; }

/* ---------- Pagine legali (privacy, cookie) ---------- */
.legal { padding-block: clamp(48px, 7vw, 104px) var(--section-y); }
.legal-head {
  padding-bottom: clamp(32px, 4vw, 56px);
  margin-bottom: clamp(32px, 4vw, 56px);
  border-bottom: 1px solid var(--rule);
}
.legal-head .lead { margin-top: 20px; }
.legal-date { margin-top: 16px; color: var(--fg-3); font-size: 0.875rem; }

.legal-grid {
  display: grid;
  grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
.legal-toc { position: sticky; top: calc(var(--header-h) + 24px); }
.legal-toc ol { display: grid; gap: 2px; }
.legal-toc a {
  display: block;
  padding: 6px 0;
  color: var(--fg-3);
  font-size: 0.9375rem;
  text-decoration: none;
  transition: color 0.2s;
}
.legal-toc a:hover { color: var(--fg); }

.legal-body { max-width: 37em; }
.legal-body section { padding-block: 8px 32px; }
.legal-body section + section { padding-top: 32px; border-top: 1px solid var(--rule); }
.legal-body h2 { font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem); letter-spacing: -0.025em; margin-bottom: 16px; }
.legal-body h3 { font-size: 1.125rem; letter-spacing: -0.01em; margin: 24px 0 8px; }
.legal-body p, .legal-body li { color: var(--fg-2); }
.legal-body p + p { margin-top: 12px; }
.legal-body strong { color: var(--fg); font-weight: 600; }
.legal-body ul { display: grid; gap: 10px; margin: 12px 0; }
.legal-body li { position: relative; padding-left: 22px; }
.legal-body li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.72em;
  width: 10px;
  height: 2px;
  border-radius: 1px;
  background: var(--accent);
}
.legal-body a { color: var(--accent); overflow-wrap: anywhere; }

.footer-bottom a[aria-current="page"] { color: var(--fg); }

@media (max-width: 900px) {
  .legal-grid { grid-template-columns: 1fr; }
  .legal-toc { position: static; padding-bottom: 8px; border-bottom: 1px solid var(--rule); }
}
.legal-body li { text-wrap: pretty; }

/* ---------- Progetti dimostrativi (sezione Lavori) ---------- */
.demos { margin-top: 0; }
.demos-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 16px clamp(32px, 6vw, 96px);
  align-items: end;
  padding-top: clamp(32px, 4vw, 48px);
  border-top: 1px solid var(--rule);
  margin-bottom: clamp(40px, 5vw, 72px);
}
.demos-head h3 { font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.75rem); letter-spacing: -0.03em; line-height: 1.05; }
.demos-head p { color: var(--fg-2); max-width: 40em; }

.demo {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(36px, 6vw, 88px);
  align-items: center;
}
.demo + .demo { margin-top: clamp(64px, 8vw, 112px); }
.demo:nth-of-type(even) .demo-visual { order: 2; }

.demo-visual { position: relative; padding: 0 clamp(28px, 5vw, 64px) clamp(28px, 4vw, 48px) 0; }
.demo-desktop {
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: var(--bg-0);
  box-shadow: 0 30px 60px -30px rgba(20, 38, 60, 0.3);
}
.demo-bar { display: flex; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--rule); background: var(--bg-2); }
.demo-bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--bg-4); }
.demo-desktop img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.demo-phone {
  position: absolute;
  right: 0;
  bottom: 0;
  width: clamp(96px, 22%, 168px);
  overflow: hidden;
  border: 5px solid var(--fg);
  border-radius: 22px;
  background: var(--fg);
  box-shadow: 0 24px 48px -20px rgba(20, 38, 60, 0.45);
}
.demo-phone img { width: 100%; height: auto; aspect-ratio: 462 / 1000; object-fit: cover; object-position: top; border-radius: 16px; }

.demo-label { color: var(--fg-3); font-size: 0.9375rem; font-weight: 500; }
.demo-text h4 {
  margin: 10px 0 0;
  font-family: var(--display);
  font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.5rem);
  font-weight: 600;
  font-variation-settings: "wdth" 90;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.demo-lead { margin-top: 16px; color: var(--fg-2); }
.demo-features { display: grid; gap: 10px; margin-top: 24px; }
.demo-features li { position: relative; padding-left: 26px; }
.demo-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.75em;
  width: 14px;
  height: 2px;
  border-radius: 1px;
  background: var(--accent);
}
.demo .tags { margin-top: 24px; }
.demo-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 28px; }
.demo-pending { color: var(--fg-3); font-size: 0.9375rem; }
.demo-pending a { color: var(--fg); font-weight: 500; }

@media (max-width: 900px) {
  .demos-head, .demo { grid-template-columns: 1fr; }
  .demo:nth-of-type(even) .demo-visual { order: 0; }
}
.demo-features li, .demo-lead { text-wrap: pretty; }
.booking-days .is-on { color: var(--fg-2); }

/* Campo trappola anti-spam: invisibile per le persone */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
