/* ==========================================================================
   Componenti riutilizzabili
   ========================================================================== */

/* --- Header ------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(8, 19, 31, 0.82);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}
.site-header.is-scrolled {
  background: rgba(8, 19, 31, 0.96);
  border-bottom-color: var(--line-dark);
}

/* Scorrendo in giù l'header si ritira: la sua "Prenota una call" e quella
   della barra fissa in basso restavano a schermo insieme, due pulsanti uguali
   nella stessa schermata. Torna appena si risale, che è quando serve. */
.site-header {
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease),
              transform 0.28s var(--ease);
}
.site-header.is-hidden { transform: translateY(-100%); }
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  width: 100%;
}

.brand { display: flex; align-items: center; gap: 0.7rem; flex: none; }
.brand img {
  height: 38px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.95;
}
.brand__text {
  display: none;
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #fff;
}
@media (min-width: 30rem) { .brand__text { display: block; } }

.nav { margin-left: auto; }
.nav > .btn { display: none; }
.nav ul { display: flex; align-items: center; gap: clamp(1rem, 2.2vw, 2rem); }
.nav ul a {
  color: var(--text-on-dark-muted);
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: color 0.2s var(--ease);
}
.nav ul a:hover { color: #fff; }
/* Navigazione mobile ------------------------------------------------- */
.nav-toggle {
  display: none;
  flex: none;
  margin-left: auto;
  width: 44px; height: 44px;
  padding: 0;
  background: none;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 18px; height: 1.5px;
  margin: 0 auto;
  background: #fff;
  transition: transform 0.25s var(--ease), opacity 0.2s var(--ease);
}
.nav-toggle span + span { margin-top: 5px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

@media (max-width: 69.99rem) {
  .nav-toggle { display: block; order: 3; margin-left: 0.5rem; }
  .header-cta { order: 2; margin-left: auto; }

  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    margin: 0;
    padding: 1.5rem var(--gutter) 2.25rem;
    background: var(--ink-900);
    border-bottom: 1px solid var(--line-dark);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s;
  }
  .nav.is-open { opacity: 1; transform: none; visibility: visible; }
  .nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .nav li + li { border-top: 1px solid var(--line-dark); }
  .nav ul a {
    display: block;
    padding: 0.95rem 0;
    font-size: var(--step-0);
    color: #fff;
  }
  .nav > .btn { display: inline-flex; margin-top: 1.5rem; width: 100%; }
}

.header-cta { margin-left: auto; }
@media (min-width: 62rem) { .header-cta { margin-left: 0; } }

/* --- Bottoni ------------------------------------------------------------ */
.btn {
  --btn-bg: var(--gold-500);
  --btn-fg: var(--ink-900);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.95em 1.7em;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 1px solid var(--btn-bg);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease),
              border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.btn:hover { background: var(--gold-400); border-color: var(--gold-400); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--sm { padding: 0.7em 1.2em; }
.btn--lg { padding: 1.1em 2.2em; font-size: var(--step-0); }

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: #fff;
  border-color: rgba(255, 255, 255, 0.32);
}
.btn--ghost:hover { background: rgba(255, 255, 255, 0.08); border-color: #fff; }

.btn--outline {
  --btn-bg: transparent;
  --btn-fg: var(--ink-900);
  border-color: var(--line);
}
.btn--outline:hover { background: var(--sand-200); border-color: var(--ink-900); }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.85rem; align-items: center; }

@media (max-width: 26rem) {
  .header-cta { padding: 0.7em 0.9em; font-size: 0.78rem; }
}

/* --- Card --------------------------------------------------------------- */
.card {
  padding: clamp(1.5rem, 2.5vw, 2rem);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
              border-color 0.25s var(--ease);
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--sand-300);
}
.card h3 { font-size: var(--step-1); margin-bottom: 0.7rem; }
.card p { font-size: var(--step--1); line-height: 1.7; color: var(--text-muted); }

.card__num {
  display: block;
  margin-bottom: 1.1rem;
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--gold-500);
  font-variant-numeric: tabular-nums;
}

.card__list { margin-top: 1.1rem; display: grid; gap: 0.5rem; }
.card__list li {
  position: relative;
  padding-left: 1.35rem;
  font-size: var(--step--1);
  color: var(--text-muted);
  line-height: 1.55;
}
.card__list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.62em;
  width: 6px; height: 6px;
  border: 1px solid var(--gold-500);
  transform: rotate(45deg);
}

/* --- Statistiche -------------------------------------------------------- */
.stat { padding-block: 0.25rem; }
.stat__value {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4vw, 3.1rem);
  line-height: 1;
  color: var(--gold-400);
  font-variant-numeric: tabular-nums;
}
.stat__label {
  display: block;
  margin-top: 0.7rem;
  font-size: var(--step--1);
  line-height: 1.5;
  color: var(--text-on-dark-muted);
}
.stat__note {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  color: rgba(169, 184, 200, 0.65);
}

/* --- Tabella comparativa ------------------------------------------------ */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.table {
  width: 100%;
  min-width: 40rem;
  border-collapse: collapse;
  font-size: var(--step--1);
  background: var(--paper);
}
.table th, .table td {
  padding: 1rem 1.1rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.table thead th {
  background: var(--ink-900);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--step--1);
  letter-spacing: 0.03em;
  border-bottom: none;
}
.table tbody th {
  font-weight: 600;
  color: var(--text-strong);
  background: var(--sand-100);
  width: 12rem;
}
.table tbody tr:last-child th,
.table tbody tr:last-child td { border-bottom: none; }

/* --- Accordion FAQ ------------------------------------------------------ */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.35rem 0;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-size: var(--step-1);
  line-height: 1.35;
  color: var(--text-strong);
  transition: color 0.2s var(--ease);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--gold-600); }
.faq summary::after {
  content: "";
  flex: none;
  width: 12px; height: 12px;
  margin-left: auto;
  margin-top: 0.42em;
  border-right: 1.5px solid var(--gold-500);
  border-bottom: 1.5px solid var(--gold-500);
  transform: rotate(45deg);
  transition: transform 0.25s var(--ease);
}
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq__body {
  padding-bottom: 1.5rem;
  max-width: 52rem;
  font-size: var(--step-0);
  color: var(--text-body);
}
.faq__body p + p { margin-top: 0.8em; }

/* --- Video testimonianza ------------------------------------------------ */
.vcard {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--ink-800);
  box-shadow: var(--shadow-sm);
}
.vcard__media { position: relative; aspect-ratio: 9 / 16; }
.vcard__media img,
.vcard__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}
.vcard__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: linear-gradient(180deg, rgba(8,19,31,0.05) 0%, rgba(8,19,31,0.65) 100%);
  cursor: pointer;
  transition: background 0.25s var(--ease);
}
.vcard__play:hover { background: linear-gradient(180deg, rgba(8,19,31,0.1) 0%, rgba(8,19,31,0.75) 100%); }
.vcard__play span {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  transition: transform 0.25s var(--ease);
}
.vcard__play:hover span { transform: scale(1.08); }
.vcard__play svg { width: 18px; height: 18px; fill: var(--ink-900); margin-left: 3px; }
.vcard__play.is-hidden { opacity: 0; pointer-events: none; }

.vcard__caption {
  padding: 0.95rem 1.1rem 1.1rem;
  background: var(--ink-800);
}
.vcard__caption strong { display: block; color: #fff; font-size: var(--step--1); }
.vcard__caption span { font-size: 0.78rem; color: var(--text-on-dark-muted); }

/* --- Filetto decorativo ------------------------------------------------- */
.rule {
  height: 1px;
  border: 0;
  background: linear-gradient(90deg, var(--gold-500), transparent);
  margin: 0;
}

/* --- Nota / disclaimer -------------------------------------------------- */
.note {
  padding: 1.1rem 1.3rem;
  border-left: 2px solid var(--gold-500);
  background: var(--sand-100);
  font-size: var(--step--1);
  line-height: 1.6;
  color: var(--text-muted);
}
.section--dark .note {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-on-dark-muted);
}
