/* ============================================================
   Home lucatedesco.it: sistema di sezioni e componenti
   Caricato nel sito e nell'editor (enqueue_block_assets).
   Colore principale da --link-color (Personalizza), riserva #b41917.
   ============================================================ */

:root {
  --td-accent: var(--link-color, #b41917);
  --td-ink: #141414;
  --td-muted: #5f5f66;
  --td-paper: #f3f2ef;
  --td-panel: #ffffff;
  --td-line: rgba(20, 20, 20, .10);
  --td-ok: #1a7f37;
  --td-wide: 1240px;
  --td-gutter: clamp(18px, 4vw, 40px);
  --td-radius-xl: clamp(22px, 3vw, 36px);
  --td-radius: 20px;
  --td-shadow: 0 1px 2px rgba(20, 20, 20, .04), 0 12px 32px rgba(20, 20, 20, .07);
  --td-shadow-hover: 0 2px 4px rgba(20, 20, 20, .05), 0 22px 48px rgba(20, 20, 20, .11);
  --td-display: "TD Inter", "Inter", system-ui, sans-serif;
}

/* Titoli della home: Inter (incluso nel tema), indipendente dal font scelto in Personalizza */
@font-face {
  font-family: "TD Inter";
  src: url("../fonts/inter/Inter-VariableFont_slnt,wght.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* Fondo pagina: solo dove c'è la nuova home */
body:has(.td-hero) { background-color: var(--td-paper); color: var(--td-ink); }
body:has(.td-hero) main { padding-top: 0; }

/* ---------- Sezioni ---------- */
.td-section {
  box-sizing: border-box;
  padding: clamp(72px, 10vw, 140px) var(--td-gutter);
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}
.td-section { --td-max: var(--td-wide); }
.td-section.td-narrow { --td-max: 720px; }
.td-section > * { max-width: var(--td-max); margin-left: auto; margin-right: auto; }
.td-section.td-tight { padding-top: clamp(40px, 6vw, 72px); padding-bottom: clamp(40px, 6vw, 72px); }

/* Pannello bianco arrotondato dentro la sezione (stile "canvas") */
.td-panel {
  box-sizing: border-box;
  background: var(--td-panel);
  border-radius: var(--td-radius-xl);
  padding: clamp(28px, 6vw, 80px);
}

/* ---------- Tipografia ---------- */
.td-section h1, .td-hero h1,
.td-section h2, .td-section h3 {
  font-family: var(--td-display);
  color: inherit;
  letter-spacing: -.035em;
  text-wrap: balance;
}
.td-hero h1 {
  font-size: clamp(2.4rem, 4.5vw, 4.4rem);
  font-weight: 600;
  line-height: 1.02;
  margin-top: 0; margin-bottom: .45em;
}
.td-section h2 {
  font-size: clamp(2.1rem, 4.6vw, 4rem);
  font-weight: 600;
  line-height: 1.04;
  margin-top: 0; margin-bottom: .5em;
}
.td-section h3 {
  font-size: clamp(1.25rem, 1.7vw, 1.5rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.02em;
  margin-top: 0; margin-bottom: .5em;
}
.td-lead, .td-hero .td-lead {
  font-size: clamp(1.05rem, 1.35vw, 1.25rem);
  line-height: 1.6;
  color: var(--td-muted);
  max-width: 34em;
}
.td-section p { line-height: 1.65; }
.td-muted { color: var(--td-muted); }

/* ---------- Etichetta (Paragrafo > Etichetta): pillola piccola sopra i titoli ---------- */
.is-style-eyebrow {
  display: flex;
  align-items: center;
  gap: .5em;
  width: fit-content;
  margin-top: 0 !important; margin-bottom: 1.4rem !important;
  padding: .35em .9em;
  border: 1px solid var(--td-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .7);
  font-size: .78rem !important;
  font-weight: 600;
  letter-spacing: .02em;
  line-height: 1.4;
  color: var(--td-ink);
}
.is-style-eyebrow::before {
  content: "";
  width: .45em;
  height: .45em;
  border-radius: 50%;
  background: var(--td-accent);
}
/* allineata a sinistra del contenuto della sezione, o centrata */
.td-section > .is-style-eyebrow { margin-left: max(0px, calc((100% - var(--td-max)) / 2)) !important; }
.is-style-eyebrow.has-text-align-center,
.td-section > .is-style-eyebrow.has-text-align-center { margin-left: auto !important; margin-right: auto !important; }
.td-on-dark .is-style-eyebrow { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .18); color: #fff; }

/* ---------- Pillola (Paragrafo > Pillola): disponibilità con pallino pulsante ---------- */
.is-style-pill {
  display: flex;
  align-items: center;
  gap: .6em;
  width: fit-content;
  max-width: 100%;
  margin-top: 0 !important; margin-bottom: 1.6rem !important;
  padding: .5em 1.1em .5em .9em;
  border-radius: 999px;
  background: var(--td-panel);
  box-shadow: var(--td-shadow);
  font-size: .88rem !important;
  font-weight: 600;
  line-height: 1.35;
}
.is-style-pill::before {
  content: "";
  flex: 0 0 auto;
  width: .55em;
  height: .55em;
  border-radius: 50%;
  background: var(--td-accent);
  animation: td-pulse 2.4s ease-out infinite;
}
@keyframes td-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(180, 25, 23, .45); }
  70%  { box-shadow: 0 0 0 .6em rgba(180, 25, 23, 0); }
  100% { box-shadow: 0 0 0 0 rgba(180, 25, 23, 0); }
}

/* ---------- Pulsanti della home ---------- */
.td-section .wp-block-button__link,
.td-hero .wp-block-button__link {
  border-radius: 999px !important;
  padding: .95em 1.6em !important;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  transition: transform .2s ease, background-color .2s ease, box-shadow .2s ease;
}
.td-section .wp-block-button:not(.is-style-outline) .wp-block-button__link,
.td-hero .wp-block-button:not(.is-style-outline) .wp-block-button__link {
  background-color: var(--td-ink) !important;
  color: #fff !important;
}
.td-section .wp-block-button:not(.is-style-outline) .wp-block-button__link:hover,
.td-hero .wp-block-button:not(.is-style-outline) .wp-block-button__link:hover {
  background-color: var(--td-accent) !important;
  transform: translateY(-2px);
}
.td-section .is-style-outline .wp-block-button__link,
.td-hero .is-style-outline .wp-block-button__link {
  background: transparent !important;
  border: 1.5px solid currentColor !important;
  color: var(--td-ink) !important;
}
.td-on-dark .is-style-outline .wp-block-button__link { color: #fff !important; }
.td-on-dark .wp-block-button:not(.is-style-outline) .wp-block-button__link { background-color: #fff !important; color: var(--td-ink) !important; }
.td-on-dark .wp-block-button:not(.is-style-outline) .wp-block-button__link:hover { background-color: var(--td-accent) !important; color: #fff !important; }
.wp-block-button__link:focus-visible { outline: 2px solid var(--td-accent); outline-offset: 3px; }

/* ============================================================
   1. Apertura: foto a tutta pagina, testo a sinistra
   ============================================================ */
.td-hero {
  position: relative;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: min(100svh, 980px);
  padding: clamp(120px, 14vw, 180px) var(--td-gutter) clamp(40px, 6vw, 72px);
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  overflow: hidden;
  background: #ecebe8;
}
.td-hero > .td-hero-photo {
  position: absolute;
  inset: 0;
  margin: 0;
  z-index: 0;
}
.td-hero > .td-hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 72% 30%;
}
/* velo chiaro a sinistra per la leggibilità */
.td-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(243, 242, 239, .92) 0%, rgba(243, 242, 239, .75) 34%, rgba(243, 242, 239, 0) 62%);
}
.td-hero > :not(.td-hero-photo) { position: relative; z-index: 2; }
.td-hero-inner {
  width: 100%;
  max-width: var(--td-wide);
  margin: 0 auto;
}
.td-hero-inner > * { max-width: 640px; }
.td-hero-inner > h1 { max-width: 780px; }

/* riga con persona + pulsanti */
.td-cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
  margin-top: 2rem;
}
.td-cta-row > * { margin: 0 !important; }

/* Chip persona (classe "td-person-chip" su un Gruppo con immagine + testo) */
.td-person-chip {
  display: flex !important;
  align-items: center;
  gap: 10px;
  width: fit-content;
  padding: 6px 16px 6px 6px;
  border-radius: 999px;
  background: var(--td-panel);
  box-shadow: var(--td-shadow);
}
.td-person-chip > * { margin: 0 !important; }
.td-person-chip .wp-block-image img {
  display: block;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}
.td-person-chip .wp-block-image { position: relative; }
.td-person-chip .wp-block-image::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 1px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--td-ok);
  border: 2px solid #fff;
}
.td-person-chip p { font-size: .85rem !important; line-height: 1.25; }
.td-person-chip p strong { display: block; font-size: .92rem; }

.td-kicker {
  margin-top: 0 !important; margin-bottom: 1.1rem !important;
  font-size: .76rem !important;
  font-weight: 600;
  letter-spacing: .14em;
  line-height: 1.5;
  text-transform: uppercase;
  color: var(--td-muted);
}
.proof-line { margin-top: 1.4rem !important; font-size: .9rem !important; color: var(--td-muted); }

/* Card numero fluttuante sulla foto */
.td-hero-float {
  position: absolute !important;
  right: max(var(--td-gutter), calc(50% - var(--td-wide) / 2));
  bottom: clamp(40px, 6vw, 72px);
  z-index: 3 !important;
  width: 250px;
}

/* ============================================================
   Card numero (Gruppo > Card numero)
   ============================================================ */
.is-style-stat-card {
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  padding: clamp(22px, 2.4vw, 30px);
  border-radius: var(--td-radius);
  background-color: var(--td-panel);
  box-shadow: var(--td-shadow);
  animation: td-float 7s ease-in-out infinite;
}
.is-style-stat-card::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 18px;
  width: 78px;
  height: 40px;
  pointer-events: none;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 78 40' fill='none'%3E%3Cpath d='M3 36C16 34 20 14 32 14s16 12 26 10S70 8 75 4' stroke='%23b41917' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E");
  opacity: .85;
}
.is-style-stat-card > * { position: relative; margin: 0 !important; }
.is-style-stat-card > p:first-child {
  font-family: var(--td-display);
  font-size: clamp(2.2rem, 3.4vw, 3rem) !important;
  font-weight: 600;
  letter-spacing: -.04em;
  line-height: 1;
  color: var(--td-ink);
  font-variant-numeric: tabular-nums;
  margin-bottom: .4em !important;
}
.is-style-stat-card > p:not(:first-child) { color: var(--td-muted); font-size: .92rem !important; line-height: 1.45; }
@keyframes td-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-7px); }
}

/* ============================================================
   2. Lavori che scorrono: card arrotondate
   ============================================================ */
.td-works { padding: clamp(40px, 6vw, 72px) 0 clamp(8px, 2vw, 24px); overflow: hidden; }
.td-works .pattern-scroll { display: flex !important; flex-wrap: nowrap !important; width: max-content; gap: clamp(14px, 2vw, 24px) !important; }
.td-works .pattern-scroll .wp-block-image { margin: 0; flex: 0 0 auto; }
.td-works .pattern-scroll img {
  max-height: clamp(170px, 18vw, 270px) !important;
  border: 0 !important;
  border-radius: 18px;
  box-shadow: var(--td-shadow) !important;
}

/* ============================================================
   Recensione grande + nomi dei clienti
   ============================================================ */
.td-quote {
  font-family: var(--td-display);
  font-size: clamp(1.4rem, 2.6vw, 2.15rem) !important;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -.02em;
  text-wrap: balance;
}
.td-quote mark { background: transparent; color: var(--td-accent); }
.td-quote-author {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 1.6rem;
}
.td-quote-author > * { margin: 0 !important; }
.td-quote-author p { font-size: .92rem !important; line-height: 1.3; text-align: left; }
.td-avatar-ph {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e4e2dd, #cfccc5);
  flex: 0 0 44px;
}
.td-clients {
  display: flex !important;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 40px;
  margin-top: clamp(40px, 6vw, 64px) !important;
  padding-top: clamp(28px, 4vw, 40px);
  border-top: 1px solid var(--td-line);
}
.td-clients > * { margin: 0 !important; }
.td-clients p {
  font-family: var(--td-display);
  font-size: clamp(1rem, 1.5vw, 1.3rem) !important;
  font-weight: 600;
  letter-spacing: -.02em;
  color: #9a9890;
}
.td-clients .td-clients-label { flex-basis: 100%; text-align: center; font-family: inherit; font-size: .82rem !important; font-weight: 500; letter-spacing: 0; color: var(--td-muted); }

/* ============================================================
   3. Numeri: griglia a riquadri (bento)
   ============================================================ */
.td-bento {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(12px, 1.6vw, 20px);
}
.td-bento > * { margin: 0 !important; }
.td-bento > .is-style-stat-card { animation: none; min-height: 210px; display: flex; flex-direction: column; justify-content: flex-end; }
.td-bento > .td-bento-accent {
  grid-column: span 2;
  grid-row: span 2;
  background: var(--td-accent) !important;
  color: #fff;
}
.td-bento > .td-bento-accent::after { filter: brightness(0) invert(1); opacity: .5; width: 140px; height: 72px; top: 28px; right: 28px; }
.td-bento > .td-bento-accent > p:first-child { color: #fff; font-size: clamp(3.4rem, 7vw, 6.5rem) !important; }
.td-bento > .td-bento-accent > p:not(:first-child) { color: rgba(255, 255, 255, .86); font-size: 1.05rem !important; }
.td-bento > .td-span-2 { grid-column: span 2; }
.td-bento-note { grid-column: 1 / -1; font-size: .85rem !important; color: var(--td-muted); padding: 4px 4px 0; }

/* ============================================================
   4. Problema: titolo grande centrato
   ============================================================ */
.td-statement h2 { font-size: clamp(2.3rem, 5.4vw, 4.6rem); }
.td-statement p:not(.is-style-eyebrow) { font-size: clamp(1.05rem, 1.4vw, 1.25rem) !important; }
.td-statement p strong { color: var(--td-ink); }

/* ============================================================
   Intestazione di sezione a due colonne (titolo a sinistra, testo a destra)
   ============================================================ */
.td-head {
  display: grid !important;
  grid-template-columns: 1.2fr 1fr;
  align-items: end;
  gap: 24px 64px;
  margin-bottom: clamp(36px, 5vw, 64px) !important;
}
.td-head > * { margin: 0 !important; }
.td-head .td-head-title > :last-child { margin-bottom: 0 !important; }

/* ============================================================
   5/6. Card con linea (Gruppo o Colonna > Card con linea)
   ============================================================ */
.is-style-card-accent {
  position: relative;
  box-sizing: border-box;
  padding: clamp(26px, 3vw, 40px) !important;
  border-radius: var(--td-radius);
  background-color: var(--td-panel);
  box-shadow: var(--td-shadow);
  overflow: hidden;
  transition: box-shadow .3s ease, translate .3s ease;
}
.is-style-card-accent::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: var(--td-accent);
  transform: scaleX(.18);
  transform-origin: left;
  transition: transform .5s cubic-bezier(.2, .7, .25, 1);
}
.is-style-card-accent:hover { box-shadow: var(--td-shadow-hover); translate: 0 -4px; }
.is-style-card-accent:hover::before { transform: scaleX(1); }
.is-style-card-accent > :first-child { margin-top: 0; }
.is-style-card-accent > :last-child { margin-bottom: 0; }
.td-card-index {
  font-family: var(--td-display);
  font-size: .85rem !important;
  font-weight: 600;
  color: var(--td-accent);
  margin-top: 0 !important; margin-bottom: clamp(36px, 5vw, 64px) !important;
}
.td-section .wp-block-columns.td-cards { gap: clamp(14px, 1.8vw, 22px); }
.td-section .wp-block-columns.td-cards > .wp-block-column { display: flex; flex-direction: column; }

/* Risultato in evidenza nei casi */
.case-highlight {
  font-family: var(--td-display);
  font-size: clamp(2.2rem, 4.4vw, 3.6rem) !important;
  font-weight: 600;
  letter-spacing: -.04em;
  line-height: 1.02;
  color: var(--td-accent);
  font-variant-numeric: tabular-nums;
  margin-top: 0 !important; margin-bottom: 1.2rem !important;
  text-wrap: balance;
}
.case-highlight.td-words { font-size: clamp(1.6rem, 2.8vw, 2.4rem) !important; }

/* ============================================================
   7. Metodo: foto + passaggi
   ============================================================ */
.td-split {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
.td-split > * { margin: 0 !important; }
.td-sticky { position: sticky; top: 110px; }
.td-photo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--td-radius-xl);
}
.td-photo { margin: 2rem 0 0 !important; }

ol.is-style-steps {
  list-style: none;
  counter-reset: td-step;
  margin: 0;
  padding: 0;
}
ol.is-style-steps > li {
  counter-increment: td-step;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 4px 20px;
  margin: 0;
  padding: 26px 0;
  border-top: 1px solid var(--td-line);
  font-size: 1.02rem;
  line-height: 1.6;
  color: var(--td-muted);
}
ol.is-style-steps > li:last-child { border-bottom: 1px solid var(--td-line); }
ol.is-style-steps > li::before {
  content: counter(td-step, decimal-leading-zero);
  grid-row: span 2;
  font-family: var(--td-display);
  font-size: 1.9rem;
  font-weight: 600;
  letter-spacing: -.04em;
  line-height: 1;
  color: var(--td-accent);
  font-variant-numeric: tabular-nums;
}
ol.is-style-steps > li > strong:first-child {
  display: block;
  font-family: var(--td-display);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -.02em;
  color: var(--td-ink);
}

/* ============================================================
   8. Il sito è tuo: unico pannello scuro
   ============================================================ */
.td-dark-panel {
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  border-radius: var(--td-radius-xl);
  background: #121212 !important;
  color: #fff;
  padding: clamp(56px, 10vw, 130px) clamp(24px, 6vw, 80px) !important;
  text-align: center;
}
.td-dark-panel::before,
.td-dark-panel::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 260px;
  pointer-events: none;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 420 260' fill='none'%3E%3Cpath d='M6 250C70 240 92 120 170 118s96 86 160 60S392 40 414 8' stroke='%23b41917' stroke-width='10' stroke-linecap='round'/%3E%3C/svg%3E");
  opacity: .9;
}
.td-dark-panel::before { left: -150px; bottom: -110px; }
.td-dark-panel::after { right: -140px; top: -90px; transform: rotate(180deg); }
.td-dark-panel > * { position: relative; z-index: 1; max-width: 760px; margin-left: auto !important; margin-right: auto !important; }
.td-dark-panel h2 { color: #fff; font-size: clamp(2.6rem, 6.4vw, 5.6rem) !important; }
.td-dark-panel p:not(.is-style-eyebrow) { color: rgba(255, 255, 255, .82); font-size: clamp(1.05rem, 1.4vw, 1.25rem) !important; }

/* ============================================================
   Recensioni (segnaposto)
   ============================================================ */
.td-review { display: flex; flex-direction: column; gap: 18px; }
.td-review > * { margin: 0 !important; }
.td-stars { color: var(--td-accent); letter-spacing: .15em; font-size: 1rem !important; }
.td-review .td-quote-author { justify-content: flex-start; margin-top: auto; }

/* ============================================================
   9. FAQ (blocco Dettagli)
   ============================================================ */
.wp-block-details {
  box-sizing: border-box;
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
  padding: 0;
  border-bottom: 1px solid var(--td-line);
  interpolate-size: allow-keywords;
}
.wp-block-details summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 0;
  font-weight: 600;
  font-size: 1.08rem;
}
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after {
  content: "+";
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--td-paper);
  font-size: 1.3rem;
  font-weight: 400;
  line-height: 1;
  color: var(--td-ink);
  transition: transform .3s ease, background-color .3s ease, color .3s ease;
}
.wp-block-details[open] summary::after { transform: rotate(45deg); background: var(--td-accent); color: #fff; }
.wp-block-details summary:focus-visible { outline: 2px solid var(--td-accent); outline-offset: 4px; border-radius: 6px; }
.wp-block-details > :not(summary) { margin-top: 0; margin-bottom: 22px; line-height: 1.65; color: var(--td-muted); padding-right: 52px; }
.wp-block-details::details-content {
  block-size: 0;
  overflow: hidden;
  transition: block-size .35s ease, content-visibility .35s allow-discrete;
}
.wp-block-details[open]::details-content { block-size: auto; }
.td-faq .wp-block-details { max-width: none; }
.td-faq .wp-block-details:first-of-type { border-top: 1px solid var(--td-line); }

/* ============================================================
   10. Contatti: pannello con ritratto e card persona
   ============================================================ */
.td-contact .td-split { align-items: center; }
.td-portrait { position: relative; margin: 0 !important; }
.td-portrait img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 20%;
  border-radius: var(--td-radius-xl);
}
.td-contact .td-person-chip {
  position: absolute;
  left: 18px;
  bottom: 18px;
}
.td-contact h2 { font-size: clamp(2rem, 3.8vw, 3.4rem); }
.td-contact .td-address { margin-top: 2rem !important; font-size: .85rem !important; color: var(--td-muted); }

/* Card persona (Gruppo > Card persona): resta disponibile come componente */
.is-style-person-card {
  box-sizing: border-box;
  max-width: 440px;
  margin-left: auto !important;
  margin-right: auto !important;
  padding: clamp(26px, 3.2vw, 40px);
  border-radius: var(--td-radius);
  background-color: var(--td-panel);
  box-shadow: var(--td-shadow);
  text-align: center;
}
.person-status {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  color: var(--td-muted);
}
.person-status::before {
  content: "";
  width: .55em;
  height: .55em;
  border-radius: 50%;
  background: var(--td-ok);
}

/* Pulsanti "Chiedi all'AI" */
.td-ai-buttons { justify-content: center; gap: 10px; }

/* ---------- Parole che ruotano ---------- */
.rotating-words mark { background: transparent; color: var(--td-accent); }
.rotating-words .rw { display: grid; }  /* su una riga propria: nessuno spazio vuoto prima del testo che segue */
.rotating-words .rw-word {
  grid-area: 1 / 1;
  opacity: 0;
  transform: translateY(.3em);
  transition: opacity .3s ease, transform .3s ease;
}
/* la parola nuova entra dopo che la vecchia è uscita: nessuna sovrapposizione */
.rotating-words .rw-word.is-active { opacity: 1; transform: none; transition-delay: .3s; }
.td-sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Contatore ---------- */
.count-up { font-variant-numeric: tabular-nums; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
  .td-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .td-bento > .td-bento-accent { grid-row: auto; }
  .td-head { grid-template-columns: 1fr; }
}
@media (max-width: 781px) {
  .td-hero { min-height: 0; padding-top: 96px; justify-content: flex-start; }
  .td-hero::before { display: none; }
  .td-hero > .td-hero-photo { position: relative; inset: auto; order: 3; margin: 32px calc(-1 * var(--td-gutter)) 0 !important; }
  .td-hero > .td-hero-photo img { height: auto; aspect-ratio: 4 / 3.4; object-position: 70% 30%; }
  .td-hero-float { position: relative !important; right: auto; bottom: auto; order: 4; width: auto; max-width: 300px; margin: -48px 0 0 auto !important; }
  .td-split { grid-template-columns: 1fr; }
  .td-sticky { position: static; }
  .td-bento > .is-style-stat-card { min-height: 0; }
  .td-dark-panel::before, .td-dark-panel::after { width: 240px; height: 150px; }
  .wp-block-details > :not(summary) { padding-right: 0; }
}
@media (max-width: 520px) {
  .td-bento { grid-template-columns: 1fr; }
  .td-bento > .td-bento-accent, .td-bento > .td-span-2 { grid-column: auto; }
  .td-cta-row { flex-direction: column; align-items: flex-start; }
}

/* ---------- Movimento ridotto ---------- */
@media (prefers-reduced-motion: reduce) {
  .is-style-pill::before,
  .is-style-stat-card,
  .load { animation: none !important; opacity: 1 !important; }
  .is-style-card-accent,
  .is-style-card-accent::before,
  .rotating-words .rw-word,
  .wp-block-details summary::after,
  .wp-block-details::details-content,
  .td-section .wp-block-button__link,
  .td-hero .wp-block-button__link { transition: none !important; }
  .is-style-card-accent:hover { translate: none; }
}

/* ---------- Solo editor ---------- */
.editor-styles-wrapper .is-style-stat-card,
.editor-styles-wrapper .is-style-pill::before { animation: none; }
.editor-styles-wrapper .wp-block-details::details-content { block-size: auto; }
.editor-styles-wrapper .td-hero > .td-hero-photo { position: relative; }
.editor-styles-wrapper .td-hero::before { display: none; }
