/* Section themes: .theme-dark (dark blue, dark glass) and .theme-light
   (light, white glass), alternating down the page. */

/* ==========================================================================
   SECTION THEMES v15 — alternanza chiaro / blu scuro
   .theme-dark  → blu scuro con aloni viola/verdi, box in vetro scuro, testi chiari
   .theme-light → chiaro con aloni viola/verdi, box in vetro bianco, testi scuri
   .theme-white → variante più luminosa per due sezioni chiare adiacenti
   Lime: solo dettagli (pallini, icone, bottoni, hover), non come colore dei testi.
   Parallasse: i layer ::before (aloni) e ::after (griglia) si muovono con
   --py / --py2, aggiornate da assets/site.js.
   ========================================================================== */
/* ---------- Struttura comune + layer parallasse ---------- */
section.theme-dark,
section.theme-light {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
section.theme-dark > .container,
section.theme-light > .container {
  position: relative;
  z-index: 2;
}
section.theme-dark::before,
section.theme-light::before,
section.theme-dark::after,
section.theme-light::after {
  content: "";
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  top: -18%;
  bottom: -18%;
  pointer-events: none;
  will-change: transform;
  opacity: 1;
  border-radius: 0;
  width: auto;
  height: auto;
  box-shadow: none;
  border: 0;
  filter: none;
  mix-blend-mode: normal;
  animation: none;
}
section.theme-dark::before,
section.theme-light::before {
  z-index: 0;
  transform: translate3d(0, var(--py, 0px), 0);
}
section.theme-dark::after,
section.theme-light::after {
  z-index: 1;
  transform: translate3d(0, var(--py2, 0px), 0);
  background-size: 80px 80px;
  -webkit-mask-image: radial-gradient(ellipse 75% 60% at 50% 45%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 75% 60% at 50% 45%, #000 20%, transparent 75%);
}
/* ---------- DARK ---------- */
section.theme-dark {
  background: linear-gradient(180deg, var(--navy) 0%, #081830 55%, var(--bg2) 100%);
  color: var(--color-text-on-dark);
  border-top: 0;
  border-bottom: 0;
}
section.theme-dark::before {
  background: radial-gradient(ellipse 42% 38% at 85% 18%, rgb(from var(--color-brand) r g b / 0.26), transparent 70%),
    radial-gradient(ellipse 38% 34% at 10% 78%, rgb(from var(--green) r g b / 0.11), transparent 70%),
    radial-gradient(ellipse 30% 26% at 45% 55%, rgb(from var(--violet) r g b / 0.35), transparent 70%);
}
section.theme-dark::after {
  background-image: none;
}
section.theme-dark:nth-of-type(even)::before {
  background: radial-gradient(ellipse 40% 36% at 12% 20%, rgb(from var(--color-brand) r g b / 0.24), transparent 70%),
    radial-gradient(ellipse 36% 32% at 88% 80%, rgb(from var(--green) r g b / 0.1), transparent 70%);
}
section.theme-dark.hero::before {
  background: radial-gradient(ellipse 45% 55% at 82% 8%, rgb(from var(--color-brand) r g b / 0.32), transparent 70%),
    radial-gradient(ellipse 30% 35% at 60% 90%, rgb(from var(--green) r g b / 0.1), transparent 70%),
    radial-gradient(ellipse 35% 40% at 5% 30%, rgb(from var(--violet) r g b / 0.4), transparent 70%);
}
.theme-dark .section-head p,
.theme-dark .lead,
.theme-dark .card p,
.theme-dark details p {
  color: var(--color-text-on-dark-muted);
}
/* Vetro scuro */
.theme-dark .card,
.theme-dark .loop-card,
.theme-dark .result-card-home,
.theme-dark .logo-tile,
.theme-dark .cta-box,
.theme-dark .area-panel {
  background: var(--glass-dark);
  border: 1px solid var(--glass-dark-border);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 24px 60px rgba(0, 0, 0, 0.22);
}
.theme-dark .card:before {
  background: rgb(from var(--color-brand) r g b / 0.22);
}
.theme-dark .card,
.theme-dark .loop-card,
.theme-dark .result-card-home {
  transition:
    border-color 0.3s,
    box-shadow 0.3s,
    transform 0.3s;
}
.theme-dark .card:hover,
.theme-dark .loop-card:hover,
.theme-dark .result-card-home:hover {
  border-color: rgb(from var(--color-accent) r g b / 0.45);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 1px rgb(from var(--color-accent) r g b / 0.12),
    0 26px 60px rgba(0, 0, 0, 0.28);
}
.theme-dark .loop-card:hover {
  transform: translateY(-4px);
}
.theme-dark .cta-box {
  background: radial-gradient(circle at 78% 18%, rgb(from var(--green) r g b / 0.14), transparent 32%),
    radial-gradient(circle at 20% 85%, rgb(from var(--color-brand) r g b / 0.22), transparent 38%), var(--glass-dark);
  border-color: rgba(255, 255, 255, 0.13);
}
.theme-dark .logo-tile {
  color: var(--slate-200);
}
.theme-dark .timeline-item,
.theme-dark .benefit,
.theme-dark details,
.theme-dark .accordion {
  border-color: var(--glass-dark-border);
}
/* Etichette su scuro: testo chiaro + pallino lime */
.theme-dark .card-num::before,
.theme-dark .case-meta::before,
.theme-light .card-num::before,
.theme-light .case-meta::before,
.theme-light .area-kicker::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-accent);
  margin-right: 9px;
  vertical-align: 1px;
  box-shadow: 0 0 10px rgb(from var(--color-accent) r g b / 0.55);
}
.theme-dark .inline-link {
  color: var(--color-text-on-dark);
}
.theme-dark .inline-link span {
  color: var(--color-accent);
}
.theme-dark .inline-link:hover {
  color: var(--color-accent);
}
/* Loop: numero in quadratino lime, etichetta chiara */
.step-icon.step-icon-lime {
  width: auto;
  height: auto;
  background: transparent;
  border: 0;
  box-shadow: none !important;
}
.step-fix:after {
  display: none;
}
/* Risultati: numeri con la sfumatura multicolor invece che lime pieno */
.theme-dark .result-number-home {
  background: linear-gradient(100deg, var(--slate-50), var(--blue-light) 48%, var(--mint));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  text-shadow: none;
}
.theme-dark .result-top-home span {
  color: var(--slate-200);
}
.theme-dark .result-card-home:after {
  background: radial-gradient(circle, rgb(from var(--color-brand) r g b / 0.28), transparent 70%);
  border: 0;
}
/* ---------- LIGHT ---------- */
section.theme-light {
  background: linear-gradient(135deg, #eff4f3 0%, #e6edef 50%, #ebebf7 100%);
  color: var(--ink);
  border-top: 0;
  border-bottom: 0;
}
section.theme-light.theme-white {
  background: linear-gradient(160deg, #fbfcfd 0%, #f3f6f8 60%, #f3f2fb 100%);
}
section.theme-light::before {
  background: radial-gradient(ellipse 40% 38% at 86% 14%, rgb(from var(--green) r g b / 0.22), transparent 70%),
    radial-gradient(ellipse 42% 40% at 8% 86%, rgb(from var(--color-brand) r g b / 0.14), transparent 70%),
    radial-gradient(ellipse 26% 24% at 55% 40%, rgb(from var(--violet) r g b / 0.06), transparent 70%);
}
section.theme-light.theme-white::before {
  background: radial-gradient(ellipse 38% 36% at 10% 12%, rgb(from var(--color-brand) r g b / 0.1), transparent 70%),
    radial-gradient(ellipse 40% 38% at 92% 88%, rgb(from var(--green) r g b / 0.16), transparent 70%);
}
section.theme-light::after {
  background-image: linear-gradient(rgb(from var(--navy) r g b / 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgb(from var(--navy) r g b / 0.035) 1px, transparent 1px);
}
.theme-light h1,
.theme-light h2,
.theme-light h3,
.theme-light summary,
.theme-light strong {
  color: var(--ink);
}
.theme-light .section-head p,
.theme-light .lead,
.theme-light .card p,
.theme-light details p,
.theme-light .notice {
  color: var(--ink-muted);
}
/* Titoli: sfumatura multicolor originale (viola → blu-verde → verde) */
.theme-light .grad {
  background: linear-gradient(100deg, var(--color-brand), var(--teal) 55%, var(--green-dark));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  padding: 0;
}
/* Etichette */
.theme-light .card-num,
.theme-light .case-meta,
.theme-light .area-kicker {
  opacity: 1;
}
.theme-light .card-num::before,
.theme-light .case-meta::before,
.theme-light .area-kicker::before {
  margin-right: 0;
}
/* Vetro chiaro */
.theme-light .card,
.theme-light .area-panel,
.theme-light .how-diagram-home,
.theme-light .logo-tile {
  background: var(--glass-light);
  border: 1px solid var(--glass-light-border);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 20px 55px rgb(from var(--violet) r g b / 0.09);
}
/* Bottoni su chiaro */
.theme-light .inline-link {
  color: var(--ink);
}
.theme-light .inline-link span {
  color: var(--color-brand);
}
/* Form */
/* ---------- Home: componenti specifici ---------- */
.theme-light .area-copy p {
  color: var(--ink-muted);
  opacity: 1;
}
.theme-light .area-list b {
  color: var(--color-brand);
}
.theme-light .area-list span {
  color: var(--ink-2);
}
.theme-light .benefit-icon {
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.theme-light .benefit-with-icon:hover .benefit-icon {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 0 0 4px rgb(from var(--color-accent) r g b / 0.14),
    0 0 22px rgb(from var(--color-accent) r g b / 0.4) !important;
}
section.theme-light.partners-marquee-section {
  padding: 40px 0 44px;
}
.theme-light .partners-kicker {
  margin-bottom: 22px;
}
@media (prefers-reduced-motion: reduce) {
  section.theme-dark::before,
  section.theme-light::before,
  section.theme-dark::after,
  section.theme-light::after {
    transform: none;
  }
  .partners-track,
  .journey-progress,
  .journey-dot,
  .step-fix,
  .step-fix span,
  .how-kleecks-home > i,
  .hero-live-dot {
    animation: none !important;
  }
}
section.theme-light.partners-marquee-section::after {
  display: none;
}
