/* ==========================================================
   Studio Legale Firmani - style.css
   Palette derivata dal brand reale (logo terracotta, rombo)
   ========================================================== */

:root {
  --terra: #e4643d;        /* terracotta brand */
  --terra-scuro: #a03e1c;  /* per testi su chiaro e CTA (contrasto AA con bianco) */
  --terra-cupo: #843114;   /* hover dei bottoni pieni */
  --terra-chiaro: #faece7; /* tinta di fondo per sezioni accento */
  --ink: #26211d;          /* antracite testi */
  --ink-soft: #5c554f;     /* testi secondari */
  --line: #e8e2dd;         /* filetti */
  --bg: #ffffff;
  --bg-alt: #faf8f6;
  --max: 1120px;
  --radius: 10px;
  --shadow-sm: 0 2px 8px -4px rgba(38, 33, 29, 0.14);
  --shadow-md: 0 10px 26px -14px rgba(38, 33, 29, 0.28);
  --shadow-header: 0 10px 28px -18px rgba(38, 33, 29, 0.4);
  --font-display: "Sora", system-ui, sans-serif;
  --font-body: "Source Sans 3", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

/* L'header è sticky: senza questo scarto le ancore arrivano dietro di lui.
   Solo sui bersagli reali dei link, non su ogni elemento con un id.
   Sotto gli 860px la topbar sparisce e l'header passa da 109 a 73px. */
.service-block, .faq-group, #contenuto, #dove-siamo { scroll-margin-top: 125px; }
@media (max-width: 860px) {
  .service-block, .faq-group, #contenuto, #dove-siamo { scroll-margin-top: 88px; }
}

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
}

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

a { color: var(--terra-scuro); }
a, button, label, input, select, textarea { touch-action: manipulation; }
a:focus-visible, button:focus-visible, label:focus-visible {
  outline: 3px solid var(--terra);
  outline-offset: 2px;
}

.container { max-width: var(--max); margin: 0 auto; padding: 0 1.75rem; }

/* ---------- Skip link ---------- */
/* Nascosto con una translazione, non con top negativo: un elemento
   posizionato sopra l'origine del documento spinge il browser a
   scorrere la pagina di altrettanto al caricamento. */
.skip-link {
  position: absolute; left: 1rem; top: 0; z-index: 100;
  transform: translateY(-150%);
  background: var(--ink); color: #fff; text-decoration: none;
  padding: 0.6rem 1.1rem; border-radius: 0 0 8px 8px;
  font-family: var(--font-display); font-weight: 600; font-size: 0.9rem;
}
.skip-link:focus { transform: translateY(0); }

/* ---------- Firma grafica: il rombo del logo ---------- */
.rombo {
  display: inline-block;
  width: 10px; height: 10px;
  background: var(--terra);
  transform: rotate(45deg);
  flex: none;
}

.eyebrow {
  display: flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--terra-scuro);
  margin-bottom: 0.9rem;
}
.eyebrow::before { content: ""; width: 9px; height: 9px; background: var(--terra); transform: rotate(45deg); }

/* ---------- Tipografia ---------- */
h1, h2, h3 { font-family: var(--font-display); line-height: 1.18; letter-spacing: -0.015em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); font-weight: 700; }
h1 .h1-sub { font-size: 0.82em; }
/* Nella hero "Al risarcimento ci pensiamo noi." sta su una riga: il corpo
   scala con la larghezza della colonna (la frase è larga circa 16 volte il
   font). Senza container query resta il comportamento normale, che va a capo. */
@supports (font-size: 1cqi) {
  .hero-copy { container-type: inline-size; }
  .hero-copy .h1-sub { font-size: min(0.82em, 6cqi); white-space: nowrap; }
}
h1 .h1-accent { color: var(--terra); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 700; margin-bottom: 1rem; }
h3 { font-size: 1.15rem; font-weight: 600; }
.lead { font-size: 1.2rem; color: var(--ink-soft); }

/* Testi giustificati (con sillabazione per evitare spazi irregolari) */
p, .review blockquote {
  text-align: justify;
  -webkit-hyphens: auto;
  hyphens: auto;
}
/* I blocchi centrati restano centrati */
.cta-final p, .map-embed p, .reviews-more p {
  text-align: center;
  -webkit-hyphens: manual;
  hyphens: manual;
}

/* ---------- Topbar ---------- */
.topbar { background: var(--ink); color: #d9d0c9; font-size: 0.82rem; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; min-height: 36px; gap: 1rem; }
.topbar-note { display: flex; align-items: center; gap: 0.5rem; }
.topbar-note::before { content: ""; width: 7px; height: 7px; background: var(--terra); transform: rotate(45deg); }
.topbar-links { display: flex; gap: 1.4rem; }
.topbar a { color: #fff; text-decoration: none; font-weight: 600; }
.topbar a:hover { color: var(--terra); }
@media (max-width: 860px) { .topbar { display: none; } }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.25s ease;
}
.site-header.is-scrolled { box-shadow: var(--shadow-header); }
.nav-bar {
  display: flex; align-items: center;
  gap: 1rem; min-height: 72px;
}
.brand { display: flex; align-items: center; text-decoration: none; }
.brand img { height: 44px; width: auto; }
@media (max-width: 480px) { .brand img { height: 38px; } }

.site-nav { margin-left: auto; }
.nav-phone { display: none; }

.nav-toggle { display: none; }
.nav-toggle-label { display: none; cursor: pointer; padding: 0.5rem; border-radius: 8px; }
.nav-toggle-label .icon-wrap { position: relative; display: block; width: 26px; height: 26px; }
.nav-toggle-label svg {
  width: 26px; height: 26px; stroke: var(--ink);
  position: absolute; top: 0; left: 0;
  transition: opacity 0.25s ease, transform 0.3s ease;
}
.nav-toggle-label .icon-close { opacity: 0; transform: rotate(-45deg) scale(0.7); }
.nav-toggle:checked ~ .nav-toggle-label .icon-open { opacity: 0; transform: rotate(45deg) scale(0.7); }
.nav-toggle:checked ~ .nav-toggle-label .icon-close { opacity: 1; transform: rotate(0deg) scale(1); }

.nav-menu { display: flex; align-items: center; gap: 1.6rem; list-style: none; }
.nav-menu a {
  font-family: var(--font-display); font-size: 0.92rem; font-weight: 600;
  text-decoration: none; color: var(--ink-soft);
  padding: 0.35rem 0;
  transition: color 0.2s ease;
}
.nav-menu a:hover { color: var(--ink); }
.nav-menu li:not(.nav-cta-li) a { position: relative; }
.nav-menu li:not(.nav-cta-li) a::after {
  content: "";
  position: absolute; left: 50%; bottom: -7px;
  width: 7px; height: 7px; background: var(--terra);
  transform: translateX(-50%) rotate(45deg) scale(0);
  transition: transform 0.18s ease;
}
.nav-menu li:not(.nav-cta-li) a:hover::after,
.nav-menu li:not(.nav-cta-li) a[aria-current="page"]::after { transform: translateX(-50%) rotate(45deg) scale(1); }
.nav-menu a[aria-current="page"] { color: var(--ink); }
.nav-menu a.nav-cta {
  display: inline-flex; align-items: center; gap: 0.45rem;
  background: var(--terra); color: #fff !important;
  padding: 0.55rem 1.1rem; border-radius: 999px;
  border-bottom: none !important;
  transition: background 0.2s ease, transform 0.15s ease;
}
.nav-menu a.nav-cta:hover { background: var(--terra-scuro); }
.nav-menu a.nav-cta:active { transform: scale(0.97); }
.nav-cta svg { width: 17px; height: 17px; flex: none; }

@media (max-width: 860px) {
  .nav-phone {
    display: inline-flex; align-items: center; justify-content: center;
    margin-left: auto;
    width: 44px; height: 44px; border-radius: 50%;
    color: var(--terra-scuro); background: var(--terra-chiaro);
    transition: background 0.2s ease;
  }
  .nav-phone:hover { background: #f5dcd2; }
  .nav-phone svg { width: 20px; height: 20px; }
  .nav-toggle-label { display: block; }
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    margin-left: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 0 1.5rem;
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
    transform: translateY(-6px);
    box-shadow: 0 12px 20px -12px rgba(38, 33, 29, 0.18);
    transition: max-height 0.35s ease, opacity 0.25s ease, transform 0.3s ease, padding 0.35s ease, visibility 0s linear 0.35s;
  }
  .nav-toggle:checked ~ .site-nav {
    max-height: calc(100dvh - 72px);
    overflow-y: auto;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    padding: 0.5rem 1.5rem 1rem;
    transition: max-height 0.35s ease, opacity 0.3s ease 0.05s, transform 0.3s ease 0.05s, padding 0.35s ease;
  }
  .nav-menu { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-menu li {
    border-top: 1px solid var(--line);
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.25s ease, transform 0.25s ease;
  }
  .nav-menu li:first-child { border-top: none; }
  .nav-toggle:checked ~ .site-nav .nav-menu li {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.12s;
  }
  .nav-menu a { display: block; padding: 0.85rem 0; font-size: 1rem; }
  .nav-menu li a::after { display: none; }
  .nav-menu a[aria-current="page"] { color: var(--terra-scuro); }
  .nav-menu a.nav-cta { display: flex; justify-content: center; padding: 0.7rem 1.1rem; margin-top: 0.75rem; }
  body.nav-open { overflow: hidden; }
}

/* ---------- Hero ---------- */
.hero {
  border-bottom: 1px solid var(--line);
  background: linear-gradient(160deg, var(--bg-alt) 55%, var(--terra-chiaro) 130%);
}
.hero-grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr;
  gap: 2.5rem; align-items: center;
  padding-top: 3.5rem; padding-bottom: 3rem;
}
.hero-copy .lead { margin: 1.1rem 0 1.8rem; max-width: 34rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; }
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-display); font-weight: 600; font-size: 0.98rem;
  text-decoration: none; padding: 0.8rem 1.5rem; border-radius: var(--radius);
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--terra-scuro); color: #fff; }
.btn-primary:hover { background: var(--terra-cupo); box-shadow: var(--shadow-md); }
.btn-ghost { border: 1.5px solid var(--line); color: var(--ink); background: #fff; }
.btn-ghost:hover { border-color: var(--terra-scuro); color: var(--terra-scuro); }
.btn-reviews { background: var(--terra); color: #fff; }
.btn-reviews:hover { background: var(--terra-scuro); box-shadow: var(--shadow-md); }

/* CTA principale della home: un alone terracotta che si allarga a intervalli.
   Si ferma al passaggio del mouse e al focus; con prefers-reduced-motion
   la regola globale in cima al file lo spegne. */
.btn-pulse { animation: btn-pulse 2.4s ease-out infinite; }
.btn-pulse:hover, .btn-pulse:focus-visible { animation: none; }
@keyframes btn-pulse {
  0%   { box-shadow: 0 0 4px 0 rgba(228, 100, 61, 0.5); }
  70%  { box-shadow: 0 0 28px 18px rgba(228, 100, 61, 0); }
  100% { box-shadow: 0 0 4px 0 rgba(228, 100, 61, 0); }
}

.hero-photo { position: relative; }
.hero-photo img { border-radius: var(--radius); }
.hero-photo::after {
  content: "";
  position: absolute; right: -14px; bottom: -14px;
  width: 84px; height: 84px;
  background: var(--terra); transform: rotate(45deg);
  z-index: -1; opacity: 0.9;
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; padding-top: 2rem; padding-bottom: 2.5rem; gap: 1.6rem; }
  .hero-photo::after { display: none; }
  .hero-photo img { width: 100%; max-height: 320px; object-fit: cover; object-position: 65% 25%; }
  .hero-copy .lead { font-size: 1.08rem; margin: 0.9rem 0 1.4rem; }
}
@media (max-width: 420px) {
  .hero-actions .btn { width: 100%; justify-content: center; }
}

/* ---------- Barra contatti ---------- */
.contact-strip { border-bottom: 1px solid var(--line); background: #fff; }
.contact-strip .container {
  display: grid; grid-template-columns: repeat(3, 1fr);
}
.contact-item {
  display: flex; align-items: center; gap: 0.85rem;
  padding: 1.1rem 1rem; text-decoration: none; color: var(--ink);
  transition: background 0.2s ease;
}
.contact-item:hover { background: var(--bg-alt); }
.contact-item + .contact-item { border-left: 1px solid var(--line); }
.contact-item svg { width: 22px; height: 22px; stroke: var(--terra); flex: none; }
.contact-item small { display: block; color: var(--ink-soft); font-size: 0.78rem; }
.contact-item b { font-size: 0.95rem; font-weight: 600; }
@media (max-width: 700px) {
  .contact-strip .container { grid-template-columns: 1fr; }
  .contact-item + .contact-item { border-left: none; border-top: 1px solid var(--line); }
}

/* ---------- Sezioni ---------- */
.section { padding: 4rem 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 42rem; margin-bottom: 2.2rem; }

/* ---------- Card servizi ---------- */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 1.25rem; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem;
  display: grid; grid-template-columns: auto 1fr;
  column-gap: 0.8rem; align-items: center;
  transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: #ddccc2; }
.card .rombo { margin-bottom: 0.9rem; width: 12px; height: 12px; }
.card-icon { grid-column: 1; grid-row: 1; width: 32px; height: 32px; color: var(--terra); }
.card-icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { grid-column: 2; grid-row: 1; margin-bottom: 0; }
.card p { grid-column: 1 / -1; margin-top: 0.85rem; color: var(--ink-soft); font-size: 0.98rem; }

.chips { display: flex; flex-wrap: wrap; gap: 0.55rem; margin-top: 1.4rem; }
.chip {
  font-size: 0.85rem; color: var(--ink-soft);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 0.3rem 0.85rem; text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.chip:hover { border-color: var(--terra); color: var(--terra-scuro); background: var(--terra-chiaro); }

/* ---------- Split (testo + foto) ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: center; }
.split img { border-radius: var(--radius); }
.split-copy p + p { margin-top: 0.9rem; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* ---------- Come funziona ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; counter-reset: step; }
.step {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem;
  display: grid; grid-template-columns: auto 1fr;
  column-gap: 1.1rem; align-items: center;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.step:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
/* Rombo e numero occupano la stessa cella: restano sovrapposti qualunque sia l'altezza del titolo */
.step::before {
  counter-increment: step;
  content: "";
  grid-column: 1; grid-row: 1;
  width: 36px; height: 36px;
  background: var(--terra);
  transform: rotate(45deg);
}
.step::after {
  content: counter(step);
  grid-column: 1; grid-row: 1;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-family: var(--font-display); font-weight: 700;
  /* il rombo ha una transform: senza questo verrebbe disegnato sopra il numero */
  position: relative; z-index: 1;
}
.step h3 { grid-column: 2; grid-row: 1; margin-bottom: 0; }
.step p { grid-column: 1 / -1; margin-top: 0.85rem; color: var(--ink-soft); font-size: 0.97rem; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Numeri ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; text-align: center; }
.stat b { font-family: var(--font-display); font-size: 2.2rem; font-weight: 700; color: var(--terra-scuro); display: block; }
.stat span { color: var(--ink-soft); font-size: 0.95rem; }
@media (max-width: 700px) { .stats { grid-template-columns: 1fr; gap: 1.75rem; } }

/* ---------- Recensioni ---------- */
.reviews-summary {
  display: flex; align-items: center; flex-wrap: wrap; gap: 0.7rem;
  margin-top: 1.1rem;
}
.reviews-summary .reviews-score {
  font-family: var(--font-display);
  font-size: 1.9rem; font-weight: 700; line-height: 1;
}
.reviews-summary .stars { display: flex; gap: 3px; }
.reviews-summary .stars svg { width: 21px; height: 21px; fill: #fbbc04; }
.reviews-summary .reviews-count { color: var(--ink-soft); font-size: 0.95rem; }

.reviews { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 1.25rem; }
.review {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  border-top: 3px solid var(--terra);
  padding: 1.5rem;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.review:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.review .stars { display: flex; gap: 3px; margin-bottom: 0.8rem; }
.review .stars svg { width: 19px; height: 19px; fill: #fbbc04; }
.reviews-more { margin-top: 1.5rem; text-align: center; }
.review blockquote { font-style: italic; color: var(--ink-soft); margin-bottom: 0.9rem; }
.review cite { font-style: normal; font-weight: 600; font-size: 0.92rem; }
.review-source { font-weight: 400; color: var(--ink-soft); font-size: 0.85rem; }

/* ---------- CTA finale ---------- */
.cta-final {
  background: radial-gradient(120% 160% at 85% 0%, #40332a 0%, var(--ink) 55%);
  color: #fff;
  border-radius: var(--radius);
  padding: 2.75rem 2rem; text-align: center;
}
.cta-final h2 { color: #fff; }
.cta-final p { color: #cfc8c2; max-width: 36rem; margin: 0.5rem auto 1.6rem; }

/* ---------- Galleria dettagli ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.gallery img { border-radius: var(--radius); }

/* ---------- Banner consenso cookie ---------- */
.cookie-banner {
  position: fixed; left: 50%; bottom: 1.25rem; transform: translateX(-50%);
  z-index: 90;
  width: min(94vw, 40rem);
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  border-top: 3px solid var(--terra);
  box-shadow: var(--shadow-md);
  padding: 1.25rem 1.5rem;
}
.cookie-banner p { margin-bottom: 0.9rem; font-size: 0.95rem; color: var(--ink-soft); }
.cookie-banner-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.cookie-banner-actions .btn { padding: 0.55rem 1.4rem; }

/* ---------- Pagine legali ---------- */
.legal { max-width: 46rem; }
.legal h2 { margin-top: 2.4rem; font-size: 1.35rem; }
.legal h3 { margin-top: 1.4rem; margin-bottom: 0.4rem; }
.legal p { margin-bottom: 0.9rem; color: var(--ink-soft); }
.legal ul { padding-left: 1.2rem; margin: 0.5rem 0 1rem; color: var(--ink-soft); }
.legal li { margin-bottom: 0.4rem; }
.legal-updated { font-size: 0.88rem; }

/* Honeypot antispam: invisibile agli utenti, i bot lo compilano */
.botcheck { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------- Mappa (contatti) ---------- */
.map-embed {
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
  min-height: 280px; padding: 1.5rem; text-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.9rem;
}
.map-embed .map-pin { width: 34px; height: 34px; color: var(--terra); }
.map-embed p { margin: 0; }
.map-embed .map-privacy { color: var(--ink-soft); font-size: 0.85rem; max-width: 30rem; }
.map-embed-active { display: block; padding: 0; overflow: hidden; }
.map-embed-active iframe { display: block; width: 100%; height: 100%; min-height: 280px; border: 0; }

/* ---------- Pagina servizi ---------- */
.service-block { padding: 1.75rem 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 300px 1fr; gap: 1.5rem; }
.service-block:first-of-type { border-top: none; }
.service-block h3 { display: flex; align-items: center; gap: 0.6rem; }
.service-block p { color: var(--ink-soft); }
@media (max-width: 700px) { .service-block { grid-template-columns: 1fr; gap: 0.4rem; } }

/* ---------- Foto pagina servizi ---------- */
.service-photos {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem; padding: 2rem 0; border-top: 1px solid var(--line);
}
.service-photos img { border-radius: var(--radius); }
/* Tre foto verticali (3:4) affiancate: restano su una riga anche su mobile,
   impilate diventerebbero troppo lunghe. */
.service-photos--verticali { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 700px) { .service-photos--verticali { gap: 0.5rem; } }

/* ---------- Form contatti ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-grid .full { grid-column: 1 / -1; }
label { font-family: var(--font-display); font-weight: 600; font-size: 0.88rem; display: block; margin-bottom: 0.35rem; }
input, select, textarea {
  width: 100%; font: inherit; color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 8px;
  padding: 0.7rem 0.9rem; background: #fff;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--terra); outline: none;
  box-shadow: 0 0 0 3px rgba(228, 100, 61, 0.18);
}
.privacy-row { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.9rem; color: var(--ink-soft); }
.privacy-row input { width: auto; margin-top: 0.3rem; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #cfc8c2; margin-top: 4rem; }
.footer-grid {
  display: grid; grid-template-columns: 1.3fr 1fr 1fr;
  gap: 2rem; padding-top: 3rem; padding-bottom: 2rem;
}
.site-footer h3 { color: #fff; font-size: 1rem; margin-bottom: 0.9rem; }
.site-footer a { color: #cfc8c2; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 0.5rem; }
.footer-bottom {
  border-top: 1px solid #3d3630;
  padding-top: 1.2rem; padding-bottom: 1.2rem; font-size: 0.85rem;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem;
}
.footer-logo { height: 46px; width: auto; max-width: 100%; margin-bottom: 1rem; }
/* riga di firma: il credit sta su una riga propria, centrata */
.footer-bottom--firma {
  flex-direction: column; align-items: center; gap: 0.75rem; text-align: center;
}
.credit {
  display: inline-flex; flex-direction: column; align-items: center; gap: 0.3rem;
  color: #cfc8c2; text-decoration: none; transition: color 0.2s ease;
}
.credit-label {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.7rem; letter-spacing: 0.04em; color: #8d847c;
}
.credit svg { display: block; height: 13px; width: auto; fill: currentColor; }
.site-footer .credit:hover { color: #fff; }
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr; gap: 0; padding-top: 1.25rem; padding-bottom: 0.75rem; }
  .footer-grid > div { padding: 1.25rem 0; }
  .footer-grid > div + div { border-top: 1px solid #3d3630; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 0.25rem; }
  .footer-bottom--firma { align-items: center; gap: 0.75rem; }
  .site-footer { margin-top: 2.5rem; }
}

/* ---------- Pulsante WhatsApp flottante ---------- */
.wa-float {
  position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 60;
  width: 56px; height: 56px; border-radius: 50%;
  background: #1d9e75; color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
  transition: background 0.2s ease, transform 0.2s ease;
}
.wa-float svg { width: 30px; height: 30px; }
.wa-float:hover { background: #157a5a; transform: scale(1.06); }
.wa-float:active { transform: scale(0.96); }

/* ---------- Tasto "Torna su" (creato da nav.js, visibile solo sotto gli 860px) ---------- */
.to-top {
  position: fixed; right: calc(1.1rem + 6px); bottom: calc(1.1rem + 56px + 0.75rem); z-index: 60;
  width: 44px; height: 44px; border-radius: 50%;
  background: #fff; color: var(--ink); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);
  cursor: pointer;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0.25s;
}
.to-top.is-visible {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s;
}
.to-top svg { width: 22px; height: 22px; }
.to-top:active { transform: scale(0.94); }
@media (min-width: 861px) { .to-top { display: none; } }

/* ---------- Reveal on scroll (disattivato con prefers-reduced-motion) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    transition-delay: var(--reveal-delay, 0s);
  }
  .reveal.is-visible { opacity: 1; transform: none; }
}

/* ---------- Pagine interne: intestazione ---------- */
.page-head { background: var(--bg-alt); border-bottom: 1px solid var(--line); padding: 2.75rem 0; }
.page-head p { color: var(--ink-soft); max-width: 44rem; margin-top: 0.6rem; }

/* ---------- Domande frequenti (accordion nativo con <details>) ---------- */
.faq > * { max-width: 52rem; }
.faq-toc { margin: 0 0 2.5rem; }
.faq-group + .faq-group { margin-top: 3rem; }
.faq-group h2 { font-size: clamp(1.3rem, 2.4vw, 1.6rem); margin-bottom: 0.75rem; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item:first-of-type { border-top: 1px solid var(--line); }
.faq-item summary {
  display: flex; align-items: flex-start; gap: 0.9rem;
  padding: 1.1rem 0;
  font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; line-height: 1.4;
  cursor: pointer; list-style: none;
  transition: color 0.2s ease;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before {
  content: ""; flex: none;
  width: 9px; height: 9px; margin-top: 0.45em;
  background: var(--terra); transform: rotate(45deg);
  transition: transform 0.2s ease;
}
.faq-item[open] summary::before { transform: rotate(45deg) scale(1.3); }
.faq-item summary::after {
  content: "+"; flex: none; margin-left: auto;
  font-size: 1.4rem; line-height: 1; color: var(--terra-scuro);
}
.faq-item[open] summary::after { content: "\2212"; }
.faq-item summary:hover { color: var(--terra-scuro); }
.faq-item summary:focus-visible { outline: 2px solid var(--terra-scuro); outline-offset: 3px; border-radius: 4px; }
.faq-answer { padding: 0 0 1.25rem calc(9px + 0.9rem); color: var(--ink-soft); }
.faq-answer p + p { margin-top: 0.6rem; }
.faq-answer strong { font-weight: 600; color: var(--ink); }
