/* ============================================================================
   tweaks.css — varianti espressive pilotate dal pannello Tweaks.
   Nessun token nuovo: tutte le varianti rimappano i token di :root in styles.css.
   Il pannello è invisibile finché i Tweaks non sono attivi (?tweaks=1).
   ========================================================================== */

/* ---------- 1. Tono visivo ---------------------------------------------- */

/* Riservato (default): carta calda, keyline sottili, ombre appena percepibili */

/* Editoriale: superfici bianche, nessuna ombra, tipografia più larga e arieggiata */
html[data-tone="editorial"] {
  --bg: #FFFFFF;
  --bg-alt: #FAF8F3;
  --border: #E6E3DC;
}
html[data-tone="editorial"] .assetcard,
html[data-tone="editorial"] .reason,
html[data-tone="editorial"] .card,
html[data-tone="editorial"] .qa,
html[data-tone="editorial"] .callcard {
  box-shadow: none;
  border-radius: 0;
  border-top-width: 1px;
}
html[data-tone="editorial"] .assetcard,
html[data-tone="editorial"] .reason { border-top-color: var(--border); }
html[data-tone="editorial"] .assetcard::before { border-color: var(--ink-900); }
html[data-tone="editorial"] h1,
html[data-tone="editorial"] h2,
html[data-tone="editorial"] h3 { letter-spacing: -.015em; }
html[data-tone="editorial"] .lede,
html[data-tone="editorial"] .why-close,
html[data-tone="editorial"] .pm-potential { line-height: 1.75; }
html[data-tone="editorial"] .reason__num { color: var(--border); }

/* Industriale: superfici più marcate, bordi netti, angoli squadrati, ombre decise */
html[data-tone="industrial"] {
  --bg: #F2EFE8;
  --bg-alt: #E9E5DC;
  --border: #C9C4B8;
}
html[data-tone="industrial"] .assetcard,
html[data-tone="industrial"] .reason,
html[data-tone="industrial"] .card,
html[data-tone="industrial"] .qa,
html[data-tone="industrial"] .callcard,
html[data-tone="industrial"] .why-stats,
html[data-tone="industrial"] .pm-panel {
  border-radius: 2px;
}
html[data-tone="industrial"] .assetcard,
html[data-tone="industrial"] .reason {
  border-width: 1px;
  border-top-width: 4px;
  box-shadow: 4px 4px 0 0 rgba(20, 18, 15, .1);
}
html[data-tone="industrial"] .assetcard:hover,
html[data-tone="industrial"] .reason:hover { box-shadow: 6px 6px 0 0 rgba(20, 18, 15, .16); }
html[data-tone="industrial"] .eyebrow,
html[data-tone="industrial"] .pm-badge,
html[data-tone="industrial"] .assetcard__title { letter-spacing: .04em; }
html[data-tone="industrial"] .btn { border-radius: 2px; }

/* ---------- 2. Densità -------------------------------------------------- */

html[data-density="compact"] {
  --section-y: 52px;
  --gutter: clamp(16px, 3vw, 32px);
}
html[data-density="compact"] .assetgrid,
html[data-density="compact"] .reasons { gap: 8px; }
html[data-density="compact"] .assetcard { padding: 12px 14px 11px 36px; }
html[data-density="compact"] .reason { padding: 18px 20px; }
html[data-density="compact"] .hero__body,
html[data-density="compact"] .hero__inner { gap: 14px; }
html[data-density="compact"] h2 { margin-bottom: .5em; }

html[data-density="airy"] {
  --section-y: 132px;
  --gutter: clamp(24px, 6vw, 72px);
}
html[data-density="airy"] .assetgrid,
html[data-density="airy"] .reasons { gap: 26px; }
html[data-density="airy"] .assetcard { padding: 24px 26px 22px 50px; }
html[data-density="airy"] .reason { padding: 38px 36px; }
html[data-density="airy"] .hero__inner { gap: 34px; }
html[data-density="airy"] h2 { margin-bottom: 1em; }

/* ---------- 3. Movimento ------------------------------------------------ */

/* discreet: solo le entrate, nessun moto perpetuo */
html[data-motion="discreet"] .ring__arc,
html[data-motion="discreet"] .ring__dot,
html[data-motion="discreet"] .beam,
html[data-motion="discreet"] #por-que-ahora,
html[data-motion="discreet"] #activo::before,
html[data-motion="discreet"] #proceso::after { animation: none !important; }
html[data-motion="discreet"] .hero__video { display: none; }

/* none: nessuna animazione, nessun video */
html[data-motion="none"] *,
html[data-motion="none"] *::before,
html[data-motion="none"] *::after {
  animation: none !important;
  transition: none !important;
}
html[data-motion="none"] .hero__video,
html[data-motion="none"] .beams,
html[data-motion="none"] .ring { display: none; }

/* ---------- Pannello ---------------------------------------------------- */

.tweaks { display: none; }

html[data-tweaks="on"] .tweaks {
  display: grid;
  gap: 14px;
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 300;
  width: 252px;
  padding: 18px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: 0 20px 44px -18px rgba(20, 18, 15, .38);
  font-size: .82rem;
}
.tweaks__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tweaks__title { margin: 0; font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--warm-700); }
.tweaks__close {
  width: 28px; height: 28px; flex: none; cursor: pointer;
  border: 1px solid var(--border); border-radius: var(--r-sm);
  background: var(--bg-alt); color: var(--ink-900); font-size: 1rem; line-height: 1;
}
.tweaks__close:hover { background: var(--gg-yellow); border-color: var(--gg-yellow); }
.tweaks__group { display: grid; gap: 8px; }
.tweaks__label { font-size: .68rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--fg-muted); }
.tweaks__opts { display: flex; gap: 6px; }
.tweaks__opt {
  flex: 1; min-height: 34px; cursor: pointer;
  border: 1px solid var(--border); border-radius: var(--r-sm);
  background: var(--bg-alt); color: var(--warm-700);
  font-family: inherit; font-size: .76rem; font-weight: 700;
}
.tweaks__opt:hover { border-color: var(--warm-300); }
.tweaks__opt[aria-pressed="true"] { background: var(--ink-900); border-color: var(--ink-900); color: var(--white); }

@media (max-width: 640px) {
  html[data-tweaks="on"] .tweaks { left: 12px; right: 12px; width: auto; bottom: 12px; }
}
