/* ==========================================================================
   Music Compass — sito marketing
   Palette ereditate da MusicCompassTheme.swift (vedi themes.css)
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

:root {
  --font-display: "Unbounded", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* scala tipografica fluida */
  --fs-hero: clamp(2.5rem, 1.2rem + 5.4vw, 5.5rem);
  --fs-h2:   clamp(1.9rem, 1.2rem + 2.6vw, 3.25rem);
  --fs-h3:   clamp(1.15rem, 1rem + 0.7vw, 1.5rem);
  --fs-lead: clamp(1.05rem, 0.98rem + 0.4vw, 1.3rem);
  --fs-body: 1rem;
  --fs-sm:   0.875rem;
  --fs-xs:   0.78rem;

  /* spaziatura */
  --sp-1: 0.5rem;  --sp-2: 0.75rem; --sp-3: 1rem;   --sp-4: 1.5rem;
  --sp-5: 2rem;    --sp-6: 3rem;    --sp-7: 4rem;   --sp-8: 6rem;
  --section-y: clamp(4rem, 2rem + 8vw, 8rem);

  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;

  --maxw: 1200px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);   /* expo.out */
  --dur: 520ms;
}

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--cream);
  background: var(--bg-1);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color 600ms var(--ease-out), color 600ms var(--ease-out);
}

/* sfondo vivo: due aloni che seguono la palette attiva */
body::before {
  content: "";
  position: fixed;
  inset: -30vh -10vw;
  z-index: -1;
  background:
    radial-gradient(46vw 46vw at 78% 4%,  color-mix(in oklab, var(--gold) 20%, transparent), transparent 68%),
    radial-gradient(52vw 52vw at 10% 82%, color-mix(in oklab, var(--accent-cyan) 16%, transparent), transparent 70%),
    linear-gradient(165deg, var(--bg-0), var(--bg-1) 46%, var(--bg-2));
  transition: background 600ms var(--ease-out);
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.lead { font-size: var(--fs-lead); line-height: 1.55; color: color-mix(in oklab, var(--cream) 82%, var(--muted-fg)); text-wrap: pretty; max-width: 62ch; }

.wrap { width: min(100% - 2.5rem, var(--maxw)); margin-inline: auto; }

/* accessibilità -------------------------------------------------------- */
:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 3px; border-radius: 4px; }
.skip {
  position: absolute; left: 50%; translate: -50% -140%;
  z-index: 200; padding: 0.7rem 1.2rem; border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  background: var(--gold); color: var(--on-gold); font-weight: 600;
  transition: translate 200ms var(--ease-out);
}
.skip:focus { translate: -50% 0; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(16px);
  background: color-mix(in oklab, var(--bg-2) 72%, transparent);
  border-bottom: 1px solid color-mix(in oklab, var(--cream) 10%, transparent);
}
.site-header__inner { display: flex; align-items: center; gap: var(--sp-4); padding-block: 0.7rem; }

.brand { display: flex; align-items: center; gap: 0.65rem; margin-inline-end: auto; }
.brand img { width: 38px; height: 38px; border-radius: 9px; box-shadow: 0 4px 14px rgb(0 0 0 / 0.3); }
.brand__text { font-family: var(--font-display); font-weight: 700; font-size: 0.95rem; line-height: 1.05; letter-spacing: 0.01em; }
.brand__text span { display: block; color: var(--accent-text); }

.nav { display: flex; gap: 0.25rem; }
.nav a {
  padding: 0.55rem 0.85rem; border-radius: 999px; font-size: var(--fs-sm); font-weight: 500;
  color: color-mix(in oklab, var(--cream) 72%, transparent);
  transition: color 200ms, background-color 200ms;
}
.nav a:hover { color: var(--cream); background: color-mix(in oklab, var(--cream) 9%, transparent); }
@media (max-width: 860px) { .nav { display: none; } }

/* select nativi: leggeri, accessibili, nessuna dipendenza JS per aprirli */
.picker {
  /* min-height 44px: il select nativo da solo e' alto ~16px, sotto la
     soglia del bersaglio tattile. Qui e' il select stesso a riempirlo. */
  display: inline-flex; align-items: stretch; min-height: 44px;
  padding: 0 0.7rem; border-radius: 999px; gap: 0.4rem;
  background: color-mix(in oklab, var(--cream) 8%, transparent);
  border: 1px solid color-mix(in oklab, var(--cream) 14%, transparent);
}
.picker svg { width: 15px; height: 15px; opacity: 0.7; flex: none; align-self: center; }
.picker select {
  appearance: none; background: none; border: 0; color: var(--cream);
  align-self: stretch; min-height: 44px;
  font-size: var(--fs-sm); font-weight: 500; padding-inline-end: 0.9rem; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
                    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: right 3px center, right 0 center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.picker select option { background: var(--bg-2); color: var(--cream); }
@media (max-width: 560px) { .picker--theme { display: none; } }

/* ==========================================================================
   Bottoni
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  min-height: 52px; padding: 0.9rem 1.6rem;
  border-radius: 999px; font-weight: 600; font-size: 1rem;
  transition: transform 220ms var(--ease-out), box-shadow 220ms var(--ease-out), background-color 220ms;
  will-change: transform;
}
.btn svg { width: 19px; height: 19px; flex: none; }
.btn--primary {
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  color: var(--on-gold);
  box-shadow: 0 10px 30px -10px color-mix(in oklab, var(--gold) 70%, transparent);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -12px color-mix(in oklab, var(--gold) 78%, transparent); }
.btn--ghost {
  border: 1px solid color-mix(in oklab, var(--cream) 26%, transparent);
  color: var(--cream);
}
.btn--ghost:hover { background: color-mix(in oklab, var(--cream) 10%, transparent); transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero { padding-block: clamp(3rem, 1rem + 7vw, 6rem) var(--section-y); }
.hero__grid {
  display: grid; gap: clamp(2.5rem, 1rem + 5vw, 4.5rem);
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 940px) { .hero__grid { grid-template-columns: 1.05fr 0.95fr; } }

.badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.4rem 0.9rem 0.4rem 0.5rem; border-radius: 999px;
  font-size: var(--fs-sm); font-weight: 500;
  background: color-mix(in oklab, var(--gold) 15%, transparent);
  border: 1px solid color-mix(in oklab, var(--gold) 34%, transparent);
  color: var(--accent-text);
}
.badge__dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--gold);
  box-shadow: 0 0 0 0 color-mix(in oklab, var(--gold) 60%, transparent);
  animation: pulse 2.6s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in oklab, var(--gold) 60%, transparent); }
  70%  { box-shadow: 0 0 0 10px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.hero h1 { font-size: var(--fs-hero); margin-block: var(--sp-4) var(--sp-3); }
.hero h1 em {
  font-style: normal;
  background: linear-gradient(105deg, var(--accent-text), var(--gold) 55%, var(--accent-cyan));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-block: var(--sp-5) var(--sp-3); }
.hero__meta { display: flex; align-items: center; gap: 0.6rem; font-size: var(--fs-sm); color: var(--muted-fg); }
.hero__meta svg { width: 16px; height: 16px; }

/* ==========================================================================
   Cerchio delle quinte — il fulcro visivo
   ========================================================================== */
.circle-stage { position: relative; display: grid; place-items: center; aspect-ratio: 1; width: min(100%, 520px); margin-inline: auto; }
.circle-stage svg { width: 100%; height: auto; overflow: visible; }

.cof__ring { fill: none; stroke: color-mix(in oklab, var(--cream) 13%, transparent); stroke-width: 1; }
.cof__seg {
  fill: color-mix(in oklab, var(--cream) 6%, transparent);
  stroke: color-mix(in oklab, var(--cream) 12%, transparent);
  stroke-width: 1;
  cursor: pointer;
  transition: fill 260ms var(--ease-out);
}
.cof__seg:hover, .cof__seg.is-active { fill: color-mix(in oklab, var(--gold) 30%, transparent); }
.cof__label {
  font-family: var(--font-display); font-weight: 700; font-size: 15px;
  fill: var(--cream); text-anchor: middle; dominant-baseline: middle;
  pointer-events: none; transition: fill 260ms;
}
.cof__label--minor { font-family: var(--font-body); font-weight: 500; font-size: 11px; fill: color-mix(in oklab, var(--cream) 55%, transparent); }
.cof__seg.is-active + .cof__label, .cof__seg:hover + .cof__label { fill: var(--gold-soft); }

.cof__needle { transform-origin: 50% 50%; transition: rotate 900ms var(--ease-out); }
.cof__needle-line { stroke: var(--gold); stroke-width: 2.5; stroke-linecap: round; }
.cof__hub { fill: var(--bg-2); stroke: var(--gold); stroke-width: 2; }

.cof__center { text-anchor: middle; pointer-events: none; }
.cof__center-key { font-family: var(--font-display); font-weight: 700; font-size: 34px; fill: var(--accent-text); }
.cof__center-sig { font-family: var(--font-body); font-size: 11px; font-weight: 500; fill: var(--muted-fg); letter-spacing: 0.04em; }

/* nessuna rotazione del gruppo etichettato: il testo resterebbe capovolto.
   Il movimento lo danno l'ago e l'evidenziazione dei settori. */
.cof__spin { transform-origin: 50% 50%; }
.cof__ring { animation: breathe 7s ease-in-out infinite; transform-origin: 50% 50%; }
@keyframes breathe { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .cof__ring { animation: none; } .cof__needle { transition: none; } }

/* ==========================================================================
   Sezioni generiche
   ========================================================================== */
.section { padding-block: var(--section-y); }
.section__head { max-width: 68ch; margin-bottom: var(--sp-6); }
.section__head h2 { font-size: var(--fs-h2); margin-bottom: var(--sp-3); }
.kicker {
  display: inline-block; font-size: var(--fs-xs); font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-text);
  margin-bottom: var(--sp-2);
}

/* ==========================================================================
   Griglia funzioni — i gradienti sono quelli delle tile dell'app
   ========================================================================== */
.features { display: grid; gap: var(--sp-3); grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); }
.feature {
  position: relative; overflow: hidden;
  padding: var(--sp-4); border-radius: var(--radius-lg);
  min-height: 220px; display: flex; flex-direction: column; justify-content: flex-end;
  background: linear-gradient(150deg, var(--tile-a), var(--tile-b));
  color: #fff;
  isolation: isolate;
  transition: transform 380ms var(--ease-out), box-shadow 380ms var(--ease-out);
}
.feature::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(120% 90% at 15% 0%, rgb(255 255 255 / 0.22), transparent 60%);
}
.feature:hover { transform: translateY(-6px); box-shadow: 0 26px 50px -22px rgb(0 0 0 / 0.65); }
.feature__icon {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  background: rgb(255 255 255 / 0.18); margin-bottom: auto;
  border: 1px solid rgb(255 255 255 / 0.2);
}
.feature__icon svg { width: 24px; height: 24px; stroke: #fff; }
.feature h3 { font-size: var(--fs-h3); margin-block: var(--sp-3) 0.4rem; }
.feature p { font-size: var(--fs-sm); color: rgb(255 255 255 / 0.84); text-wrap: pretty; }
/* la prima card occupa due colonne dove c'è spazio */
@media (min-width: 900px) { .feature:first-child { grid-column: span 2; } }

/* ==========================================================================
   MIDI Studio
   ========================================================================== */
.studio__grid { display: grid; gap: clamp(2rem, 1rem + 4vw, 4rem); grid-template-columns: 1fr; align-items: center; }
@media (min-width: 940px) { .studio__grid { grid-template-columns: 0.92fr 1.08fr; } }

.points { display: grid; gap: var(--sp-3); margin-top: var(--sp-5); }
.point { display: flex; gap: var(--sp-3); align-items: flex-start; }
.point__icon {
  flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: color-mix(in oklab, var(--gold) 16%, transparent);
  border: 1px solid color-mix(in oklab, var(--gold) 32%, transparent);
}
.point__icon svg { width: 21px; height: 21px; stroke: var(--accent-text); }
.point h3 { font-size: 1.05rem; font-family: var(--font-body); font-weight: 600; letter-spacing: 0; margin-bottom: 0.2rem; }
.point p { font-size: var(--fs-sm); color: var(--muted-fg); text-wrap: pretty; }

/* tastiera: due ottave, CSS puro */
.keyboard-card {
  padding: var(--sp-4); border-radius: var(--radius-lg);
  background: linear-gradient(160deg, var(--panel-0), var(--panel-1));
  border: 1px solid color-mix(in oklab, var(--cream) 12%, transparent);
  box-shadow: 0 30px 60px -30px rgb(0 0 0 / 0.7);
}
.keyboard { position: relative; display: flex; height: clamp(120px, 24vw, 170px); border-radius: 8px; overflow: hidden; }
.key-white {
  position: relative; flex: 1; background: linear-gradient(180deg, #f7f7f5, #dedbd4);
  border-right: 1px solid rgb(0 0 0 / 0.22); border-radius: 0 0 5px 5px;
  transition: background 140ms;
}
.key-white:last-child { border-right: 0; }
.key-white.is-lit { background: linear-gradient(180deg, var(--gold-soft), var(--gold)); }
.key-black {
  /* width e left sono calcolati in JS dal numero di tasti bianchi */
  position: absolute; top: 0; height: 62%; z-index: 2;
  background: linear-gradient(180deg, #33373d, #101215);
  border-radius: 0 0 4px 4px; box-shadow: 0 3px 6px rgb(0 0 0 / 0.5);
  transition: background 140ms;
}
.key-black.is-lit { background: linear-gradient(180deg, var(--accent-cyan), color-mix(in oklab, var(--accent-cyan) 60%, #000)); }

.tracks { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: var(--sp-3); }
.track {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.3rem 0.7rem; border-radius: 999px; font-size: var(--fs-xs); font-weight: 500;
  background: color-mix(in oklab, var(--cream) 8%, transparent);
  border: 1px solid color-mix(in oklab, var(--cream) 14%, transparent);
  color: color-mix(in oklab, var(--cream) 78%, transparent);
}
.track__dot { width: 7px; height: 7px; border-radius: 50%; }

/* karaoke: riga di testo che scorre */
.karaoke { margin-top: var(--sp-3); padding: var(--sp-3); border-radius: var(--radius); background: color-mix(in oklab, var(--bg-2) 60%, transparent); }
.karaoke__label { font-size: var(--fs-xs); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted-fg); margin-bottom: 0.5rem; }
.karaoke__line { font-family: var(--font-display); font-size: clamp(1rem, 0.85rem + 0.7vw, 1.35rem); font-weight: 700; }
.karaoke__line span { color: color-mix(in oklab, var(--cream) 30%, transparent); transition: color 200ms; }
.karaoke__line span.is-sung { color: var(--accent-text); }

/* ==========================================================================
   Temi
   ========================================================================== */
.themes { display: grid; gap: var(--sp-3); grid-template-columns: repeat(auto-fit, minmax(min(100%, 165px), 1fr)); }
.theme-chip {
  display: flex; flex-direction: column; gap: 0.7rem;
  padding: var(--sp-3); border-radius: var(--radius);
  background: color-mix(in oklab, var(--cream) 6%, transparent);
  border: 1px solid color-mix(in oklab, var(--cream) 13%, transparent);
  text-align: start;
  transition: transform 260ms var(--ease-out), border-color 260ms, background-color 260ms;
}
.theme-chip:hover { transform: translateY(-4px); background: color-mix(in oklab, var(--cream) 10%, transparent); }
.theme-chip[aria-pressed="true"] { border-color: var(--accent-text); background: color-mix(in oklab, var(--gold) 14%, transparent); }
.theme-chip__swatches { display: flex; gap: 5px; }
.theme-chip__swatches i { width: 26px; height: 26px; border-radius: 8px; border: 1px solid rgb(255 255 255 / 0.16); }
.theme-chip__name { font-size: var(--fs-sm); font-weight: 600; }
.theme-chip__mode { font-size: var(--fs-xs); color: var(--muted-fg); }

/* ==========================================================================
   Lingue
   ========================================================================== */
.langs { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.lang-chip {
  padding: 0.55rem 1rem; border-radius: 999px; font-size: var(--fs-sm); font-weight: 500;
  background: color-mix(in oklab, var(--cream) 7%, transparent);
  border: 1px solid color-mix(in oklab, var(--cream) 13%, transparent);
  color: color-mix(in oklab, var(--cream) 82%, transparent);
  transition: transform 240ms var(--ease-out), border-color 240ms;
}
.lang-chip:hover { transform: translateY(-3px); border-color: color-mix(in oklab, var(--gold) 55%, transparent); }

/* ==========================================================================
   Piattaforme + schermata reale
   ========================================================================== */
.platforms__grid { display: grid; gap: clamp(2rem, 1rem + 4vw, 4rem); grid-template-columns: 1fr; align-items: center; }
@media (min-width: 940px) { .platforms__grid { grid-template-columns: 1fr 0.85fr; } }

/* due telefoni affiancati: il secondo leggermente arretrato e ruotato,
   cosi' la coppia si legge come una scena e non come due ritagli */
.gallery {
  display: flex; align-items: center; justify-content: center;
  gap: clamp(-2rem, -4vw, 0rem);
  perspective: 1400px;
}
.device {
  position: relative; width: min(46%, 260px); flex: none;
  border-radius: 40px; padding: 10px; margin: 0;
  background: linear-gradient(160deg, #3a3f47, #16181c);
  box-shadow: 0 40px 80px -34px rgb(0 0 0 / 0.85), inset 0 0 0 1px rgb(255 255 255 / 0.1);
  transition: transform 420ms var(--ease-out);
}
.device--lead  { z-index: 2; rotate: -3deg; translate: 6% 0; }
.device--trail { z-index: 1; rotate: 4deg;  translate: -6% 0; scale: 0.94; }
.gallery:hover .device--lead  { rotate: -1deg; translate: 2% 0; }
.gallery:hover .device--trail { rotate: 2deg;  translate: -2% 0; scale: 0.97; }

/* sotto i 560px la sovrapposizione diventa illeggibile: si scorre */
@media (max-width: 560px) {
  .gallery {
    gap: var(--sp-3); justify-content: flex-start;
    overflow-x: auto; scroll-snap-type: x mandatory;
    padding-block: var(--sp-2); margin-inline: calc(var(--sp-3) * -1);
    padding-inline: var(--sp-3);
    scrollbar-width: none;
  }
  .gallery::-webkit-scrollbar { display: none; }
  .device { width: 72%; scroll-snap-align: center; rotate: none; translate: none; scale: 1; }
  .device--lead, .device--trail { rotate: none; translate: none; scale: 1; }
}
@media (prefers-reduced-motion: reduce) { .device { transition: none; } }
.device__screen { border-radius: 31px; overflow: hidden; background: #000; aspect-ratio: 620 / 1348; }
.device__screen img { width: 100%; height: 100%; object-fit: cover; }
.device__notch {
  position: absolute; top: 20px; left: 50%; translate: -50% 0;
  width: 92px; height: 26px; border-radius: 999px; background: #000; z-index: 2;
}

.plat-list { display: grid; gap: var(--sp-2); margin-top: var(--sp-5); }
.plat {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3); border-radius: var(--radius);
  background: color-mix(in oklab, var(--cream) 6%, transparent);
  border: 1px solid color-mix(in oklab, var(--cream) 12%, transparent);
}
.plat svg { width: 24px; height: 24px; stroke: var(--accent-text); flex: none; }
.plat strong { font-weight: 600; font-size: 0.98rem; }
.plat span { display: block; font-size: var(--fs-sm); color: var(--muted-fg); }

/* ==========================================================================
   CTA beta
   ========================================================================== */
.cta {
  position: relative; overflow: hidden;
  padding: clamp(2.5rem, 1.5rem + 5vw, 5rem) clamp(1.5rem, 1rem + 3vw, 4rem);
  border-radius: var(--radius-lg); text-align: center;
  background: linear-gradient(155deg, var(--panel-0), var(--panel-1));
  border: 1px solid color-mix(in oklab, var(--gold) 26%, transparent);
}
.cta::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(60% 90% at 50% 0%, color-mix(in oklab, var(--gold) 22%, transparent), transparent 70%);
  pointer-events: none;
}
.cta > * { position: relative; }
.cta h2 { font-size: var(--fs-h2); margin-bottom: var(--sp-3); }
.cta .lead { margin-inline: auto; }
.cta__note { font-size: var(--fs-sm); color: var(--muted-fg); margin-top: var(--sp-3); }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  margin-top: var(--section-y);
  padding-block: var(--sp-5);
  border-top: 1px solid color-mix(in oklab, var(--cream) 10%, transparent);
  font-size: var(--fs-sm); color: var(--muted-fg);
}
.site-footer__inner { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; justify-content: space-between; }
.footer-links { display: flex; gap: var(--sp-3); }
.footer-links a { text-decoration: underline; text-underline-offset: 3px; transition: color 200ms; }
.footer-links a:hover { color: var(--accent-text); }

/* ==========================================================================
   Rivelazione allo scroll
   ========================================================================== */
/* Il contenuto si nasconde SOLO se il JS gira davvero: senza JS, o se lo
   script fallisce, la pagina resta leggibile invece di restare bianca. */
.js .reveal { opacity: 0; transform: translateY(26px); }
.reveal { opacity: 1; }
.js .reveal.is-in { opacity: 1; transform: none; transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out); }
.js .reveal[data-delay="1"].is-in { transition-delay: 60ms; }
.js .reveal[data-delay="2"].is-in { transition-delay: 120ms; }
.js .reveal[data-delay="3"].is-in { transition-delay: 180ms; }
.js .reveal[data-delay="4"].is-in { transition-delay: 240ms; }
.js .reveal[data-delay="5"].is-in { transition-delay: 300ms; }
.js .reveal[data-delay="6"].is-in { transition-delay: 360ms; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; }
  .badge__dot { animation: none; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important; scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   Pagine documento (privacy, supporto)
   ========================================================================== */
.doc { padding-block: clamp(2.5rem, 1rem + 5vw, 5rem) var(--section-y); max-width: 76ch; }
.doc__back {
  display: flex; width: fit-content; align-items: center; gap: 0.45rem;
  font-size: var(--fs-sm); font-weight: 500; color: var(--muted-fg);
  margin-bottom: var(--sp-4); transition: color 200ms;
}
.doc__back::before { content: "←"; }
.doc__back:hover { color: var(--accent-text); }

.doc h1 { font-size: var(--fs-h2); margin-bottom: var(--sp-3); }
.doc__updated { font-size: var(--fs-sm); color: var(--muted-fg); margin-bottom: var(--sp-5); }
.doc__lead { font-size: var(--fs-lead); color: var(--muted-fg); margin-bottom: var(--sp-5); text-wrap: pretty; }

.doc__note {
  padding: var(--sp-3); border-radius: var(--radius);
  background: color-mix(in oklab, var(--gold) 12%, transparent);
  border: 1px solid color-mix(in oklab, var(--gold) 30%, transparent);
  font-size: var(--fs-sm); color: var(--cream);
  margin-bottom: var(--sp-5);
}

.doc__body h2 {
  font-family: var(--font-body); font-weight: 600; letter-spacing: 0;
  font-size: 1.1rem; color: var(--accent-text);
  margin-top: var(--sp-5); margin-bottom: var(--sp-2);
}
.doc__body p { margin-bottom: var(--sp-3); text-wrap: pretty; }
.doc__list { list-style: none; display: grid; gap: var(--sp-2); margin-bottom: var(--sp-4); }
.doc__list li {
  padding: var(--sp-3); border-radius: var(--radius);
  background: color-mix(in oklab, var(--cream) 6%, transparent);
  border: 1px solid color-mix(in oklab, var(--cream) 12%, transparent);
  text-wrap: pretty;
}
.doc__list strong { color: var(--cream); }

/* contatto e FAQ della pagina di supporto */
.contact-card {
  display: flex; flex-wrap: wrap; gap: var(--sp-3);
  align-items: center; justify-content: space-between;
  padding: var(--sp-4); border-radius: var(--radius-lg);
  background: linear-gradient(150deg, var(--panel-0), var(--panel-1));
  border: 1px solid color-mix(in oklab, var(--gold) 24%, transparent);
  margin-bottom: var(--sp-5);
}
.contact-card h2 { margin-top: 0; margin-bottom: 0.3rem; }
.contact-card p { margin-bottom: 0; color: var(--muted-fg); font-size: var(--fs-sm); max-width: 46ch; }

.faq { display: grid; gap: var(--sp-2); }
.faq details {
  border-radius: var(--radius);
  background: color-mix(in oklab, var(--cream) 6%, transparent);
  border: 1px solid color-mix(in oklab, var(--cream) 12%, transparent);
  transition: border-color 240ms;
}
.faq details[open] { border-color: color-mix(in oklab, var(--accent-text) 45%, transparent); }
.faq summary {
  padding: var(--sp-3); cursor: pointer; font-weight: 600; list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; font-size: 1.3rem; line-height: 1; color: var(--accent-text);
  transition: rotate 240ms var(--ease-out); flex: none;
}
.faq details[open] summary::after { rotate: 45deg; }
.faq details p {
  padding: 0 var(--sp-3) var(--sp-3); margin: 0;
  color: var(--muted-fg); font-size: var(--fs-sm); text-wrap: pretty;
}

/* ==========================================================================
   Risalita alla casa madre
   Sulle pagine prodotto il marchio in testata riporta all'inizio del
   prodotto, non a Banfi's: questo e' il collegamento verso l'alto, e sta
   in testata perche' nel footer non lo si vede.
   ========================================================================== */
.up-link {
  display: inline-flex; align-items: center; gap: 0.25rem;
  min-height: 44px; padding: 0 0.7rem 0 0.4rem; border-radius: 999px;
  font-size: var(--fs-sm); font-weight: 500; white-space: nowrap;
  color: var(--muted-fg);
  border: 1px solid color-mix(in oklab, var(--cream) 14%, transparent);
  transition: color 200ms, border-color 200ms, background-color 200ms;
}
.up-link svg { width: 15px; height: 15px; flex: none; }
.up-link:hover {
  color: var(--cream);
  border-color: color-mix(in oklab, var(--accent-text) 55%, transparent);
  background: color-mix(in oklab, var(--cream) 7%, transparent);
}
/* sotto i 700px resta la sola freccia: il nome lo dice gia' la pagina */
@media (max-width: 700px) { .up-link span { display: none; } .up-link { padding: 0 0.5rem; } }
