/* ==========================================================================
   VIGINI COACHING — Foglio di stile principale
   Tutto il "look" del sito è qui dentro. Se vuoi cambiare i colori,
   modifica i valori nella sezione :root qui sotto.
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. NASCONDERE DAVVERO CIÒ CHE È NASCOSTO
   --------------------------------------------------------------------------
   Il browser nasconde da solo gli elementi con l'attributo "hidden", ma solo
   se nessuna regola CSS gli assegna un display diverso. I bottoni del sito
   usano "display: inline-flex", che vinceva sul comportamento predefinito:
   risultato, roba marcata come nascosta restava bene in vista (per esempio
   il bottone "Pannello admin" nell'area cliente).
   Questa riga chiude la questione una volta per tutte.
   -------------------------------------------------------------------------- */
[hidden] { display: none !important; }

/* --------------------------------------------------------------------------
   1. VARIABILI (colori, spazi, caratteri)
   -------------------------------------------------------------------------- */
:root {
  /* Colori */
  --ink: #0d0f12;           /* nero principale (sfondi scuri)   */
  --ink-2: #16191e;         /* nero più chiaro (card su scuro)  */
  --ink-3: #232830;         /* bordi su sfondo scuro            */
  --paper: #ffffff;         /* bianco                           */
  --paper-2: #f6f6f3;       /* grigio chiarissimo               */
  --line: #e6e6e1;          /* bordi su sfondo chiaro           */
  --text: #14171b;          /* testo su sfondo chiaro           */
  --muted: #5d656f;         /* testo secondario chiaro          */
  --text-inv: #f3f4f6;      /* testo su sfondo scuro            */
  --muted-inv: #a6adb6;     /* testo secondario scuro           */
  --accent: #2563eb;        /* BLU del brand (sfondo dei bottoni) */
  --accent-2: #1d4ed8;      /* blu più scuro, per il passaggio del mouse */
  --accent-ink: #ffffff;    /* testo sopra il blu                */
  --accent-soft: #6ea8fe;   /* blu chiaro: testo e icone su fondo scuro */
  --ok: #1f9d55;
  --warn: #b45309;
  --err: #c2334d;

  /* Raggi degli angoli */
  --r-xs: 6px;
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 24px;
  --r-pill: 999px;

  /* Ombre */
  --sh-sm: 0 1px 2px rgba(13,15,18,.06), 0 1px 1px rgba(13,15,18,.04);
  --sh: 0 4px 16px rgba(13,15,18,.07), 0 1px 3px rgba(13,15,18,.05);
  --sh-lg: 0 24px 60px rgba(13,15,18,.14), 0 4px 12px rgba(13,15,18,.06);

  /* Layout */
  --wrap: 1180px;
  --gutter: 22px;
  --nav-h: 72px;

  /* Caratteri */
  --font-display: 'Archivo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* --------------------------------------------------------------------------
   2. RESET E BASE
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -.025em;
  margin: 0 0 .5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.4rem, 6.2vw, 4.5rem); }
h2 { font-size: clamp(1.9rem, 4.2vw, 3rem); }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.5rem); letter-spacing: -.02em; }
h4 { font-size: 1.05rem; letter-spacing: -.01em; }
p  { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

::selection { background: var(--accent); color: var(--accent-ink); }

:focus-visible {
  outline: 3px solid var(--accent-soft);
  outline-offset: 3px;
  border-radius: 4px;
}

/* --------------------------------------------------------------------------
   3. UTILITÀ DI LAYOUT
   -------------------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap--narrow { max-width: 780px; }

.section { padding: clamp(56px, 8vw, 108px) 0; }
.section--tight { padding: clamp(40px, 5vw, 64px) 0; }
.section--dark { background: var(--ink); color: var(--text-inv); }
.section--dark h1, .section--dark h2, .section--dark h3 { color: var(--text-inv); }
.section--soft { background: var(--paper-2); }

.center { text-align: center; }
.mt-0 { margin-top: 0 } .mb-0 { margin-bottom: 0 }
.stack > * + * { margin-top: 14px; }

.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

.lead {
  font-size: clamp(1.05rem, 1.8vw, 1.2rem);
  color: var(--muted);
  max-width: 62ch;
}
.section--dark .lead { color: var(--muted-inv); }
.center .lead { margin-inline: auto; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display);
  font-size: .74rem; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: ''; width: 22px; height: 2px; background: var(--accent-2); border-radius: 2px;
}
.section--dark .eyebrow { color: var(--accent-soft); }
.section--dark .eyebrow::before { background: var(--accent-soft); }
.center .eyebrow::before { display: none; }

.section-head { max-width: 720px; margin-bottom: clamp(32px, 4vw, 52px); }
.center .section-head, .section-head.center { margin-inline: auto; }

/* --------------------------------------------------------------------------
   4. BOTTONI
   -------------------------------------------------------------------------- */
.btn {
  --btn-bg: var(--ink);
  --btn-fg: #fff;
  --btn-bd: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 15px 26px;
  font-family: var(--font-display);
  font-size: .95rem; font-weight: 700; letter-spacing: -.01em;
  background: var(--btn-bg); color: var(--btn-fg);
  border: 1.5px solid var(--btn-bd);
  border-radius: var(--r-pill);
  cursor: pointer;
  text-align: center;
  transition: transform .16s ease, box-shadow .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
  will-change: transform;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--sh); }
.btn:active { transform: translateY(0); }
.btn svg { flex: none; }

.btn--accent { --btn-bg: var(--accent); --btn-fg: var(--accent-ink); --btn-bd: var(--accent); }
.btn--accent:hover { --btn-bg: var(--accent-2); --btn-bd: var(--accent-2); }
.btn--light  { --btn-bg: #fff; --btn-fg: var(--ink); --btn-bd: #fff; }
.btn--ghost  { --btn-bg: transparent; --btn-fg: var(--text); --btn-bd: var(--line); }
.btn--ghost:hover { --btn-bd: var(--ink); }
/* Varianti su fondo scuro (hero, sezioni scure, testata area riservata) */
.section--dark .btn--ghost,
.hero .btn--ghost,
.dash-head .btn--ghost,
.site-footer .btn--ghost { --btn-fg: var(--text-inv); --btn-bd: var(--ink-3); }
.section--dark .btn--ghost:hover,
.hero .btn--ghost:hover,
.dash-head .btn--ghost:hover,
.site-footer .btn--ghost:hover { --btn-bd: var(--muted-inv); }
.btn--sm { padding: 10px 18px; font-size: .86rem; }
.btn--full { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.center .btn-row { justify-content: center; }

/* --------------------------------------------------------------------------
   5. HEADER / NAVIGAZIONE
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav {
  height: var(--nav-h);
  display: flex; align-items: center; gap: 26px;
}
.brand { display: flex; align-items: center; gap: 11px; flex: none; }
.brand__mark {
  width: 38px; height: 38px; border-radius: 11px;
  background: var(--ink); color: var(--accent-soft);
  overflow: hidden;
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 800; font-size: .95rem;
  letter-spacing: -.03em;
}
.brand__mark img { width: 100%; height: 100%; object-fit: contain; }
.brand__mark--logo { background: transparent; border-radius: 0; width: 44px; height: 44px; }
.brand__text { display: flex; flex-direction: column; line-height: 1.05; }
.brand__name { font-family: var(--font-display); font-weight: 800; font-size: 1.02rem; letter-spacing: -.03em; }
.brand__sub  { font-size: .64rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }

.nav__links { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav__link {
  padding: 9px 14px; border-radius: var(--r-pill);
  font-size: .94rem; font-weight: 500; color: var(--muted);
  transition: color .18s ease, background .18s ease;
}
.nav__link:hover { color: var(--text); background: var(--paper-2); }
.nav__link.is-active { color: var(--text); font-weight: 600; }
.nav__actions { display: flex; align-items: center; gap: 10px; margin-left: 14px; }

.nav__toggle {
  display: none;
  margin-left: auto;
  width: 44px; height: 44px;
  background: transparent; border: 1.5px solid var(--line);
  border-radius: 12px; cursor: pointer;
  align-items: center; justify-content: center;
}
.nav__toggle span, .nav__toggle span::before, .nav__toggle span::after {
  content: ''; display: block; width: 18px; height: 2px;
  background: var(--text); border-radius: 2px; transition: transform .22s ease, opacity .18s ease;
}
.nav__toggle span::before { position: absolute; transform: translateY(-6px); }
.nav__toggle span::after  { position: absolute; transform: translateY(6px); }
.nav__toggle span { position: relative; }
body.nav-open .nav__toggle span { background: transparent; }
body.nav-open .nav__toggle span::before { transform: rotate(45deg); }
body.nav-open .nav__toggle span::after  { transform: rotate(-45deg); }

@media (max-width: 900px) {
  .nav__toggle { display: inline-flex; }
  .nav__links {
    position: fixed; inset: var(--nav-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 16px var(--gutter) 26px;
    margin: 0;
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
    max-height: calc(100vh - var(--nav-h)); overflow-y: auto;
  }
  body.nav-open .nav__links { opacity: 1; transform: none; pointer-events: auto; }
  .nav__link { padding: 14px 12px; font-size: 1.05rem; }
  .nav__actions { margin: 12px 0 0; flex-direction: column; align-items: stretch; }
  .nav__actions .btn { width: 100%; }
}

/* --------------------------------------------------------------------------
   6. HERO
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  background: var(--ink); color: var(--text-inv);
  padding: clamp(64px, 9vw, 118px) 0 clamp(56px, 8vw, 96px);
  overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: -30% -10% auto auto;
  width: 720px; height: 720px; border-radius: 50%;
  background: radial-gradient(circle, rgba(37,99,235,.30), transparent 62%);
  pointer-events: none;
}
.hero::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(110,168,254,.55), transparent);
}
.hero__inner { position: relative; z-index: 1; display: grid; gap: 46px; grid-template-columns: 1.15fr .85fr; align-items: center; }
@media (max-width: 940px) { .hero__inner { grid-template-columns: 1fr; gap: 34px; } }

.hero h1 { color: #fff; margin-bottom: 20px; }
.hero h1 em { font-style: normal; color: var(--accent-soft); }
.hero__lead { color: var(--muted-inv); font-size: clamp(1.05rem, 1.9vw, 1.22rem); max-width: 54ch; margin-bottom: 30px; }

.pill {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 7px 15px 7px 9px; margin-bottom: 22px;
  border: 1px solid var(--ink-3); border-radius: var(--r-pill);
  background: rgba(255,255,255,.04);
  font-size: .82rem; color: var(--muted-inv);
}
.pill b { color: var(--accent-soft); font-weight: 700; }
.pill__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-soft); box-shadow: 0 0 0 4px rgba(110,168,254,.2); }

.hero__stats { display: flex; flex-wrap: wrap; gap: 34px; margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--ink-3); }
.stat__num { font-family: var(--font-display); font-size: 1.85rem; font-weight: 800; letter-spacing: -.03em; color: #fff; line-height: 1; }
.stat__lbl { font-size: .8rem; color: var(--muted-inv); margin-top: 6px; }

.hero__card {
  background: var(--ink-2); border: 1px solid var(--ink-3);
  border-radius: var(--r-lg); padding: 28px;
  box-shadow: 0 30px 70px rgba(0,0,0,.4);
}
.hero__card h3 { color: #fff; font-size: 1.15rem; margin-bottom: 18px; }
.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 13px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; font-size: .96rem; color: var(--muted-inv); }
.check-list li b { color: var(--text-inv); font-weight: 600; }
.check-list .tick {
  flex: none; width: 21px; height: 21px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center; font-size: .7rem; font-weight: 900; margin-top: 2px;
}

/* Striscia scorrevole */
.marquee {
  background: var(--accent); color: var(--accent-ink);
  padding: 13px 0; overflow: hidden; white-space: nowrap;
}
.marquee__track { display: inline-flex; gap: 44px; animation: slide 26s linear infinite; padding-right: 44px; }
.marquee span { font-family: var(--font-display); font-weight: 700; font-size: .84rem; letter-spacing: .12em; text-transform: uppercase; }
@keyframes slide { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee__track { animation: none; } }

/* --------------------------------------------------------------------------
   7. CARD
   -------------------------------------------------------------------------- */
.card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 26px;
  display: flex; flex-direction: column; gap: 12px;
  transition: transform .2s ease, box-shadow .25s ease, border-color .2s ease;
}
.card--hover:hover { transform: translateY(-4px); box-shadow: var(--sh-lg); border-color: transparent; }
.section--dark .card { background: var(--ink-2); border-color: var(--ink-3); color: var(--muted-inv); }
.section--dark .card h3 { color: #fff; }

/* --------------------------------------------------------------------------
   COPERTINA DEL PRODOTTO
   Di serie è una copertina "tipografica": fondo blu scuro, il nome del
   programma in grande e lo squalo in filigrana. È sempre allineata bene
   e non dipende da nessuna immagine.
   Se in config.js indichi un file in "immagine", quello prende il posto
   della grafica automatica e viene centrato senza deformarsi.
   -------------------------------------------------------------------------- */
.card__cover {
  position: relative; overflow: hidden;
  margin: -26px -26px 6px;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  aspect-ratio: 16 / 10;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 20px 22px;
  background:
    radial-gradient(120% 120% at 85% 15%, rgba(37,99,235,.55), transparent 60%),
    linear-gradient(155deg, #101725 0%, #0d0f12 55%, #131c2c 100%);
  color: #fff;
}
/* squalo in filigrana */
.card__cover::after {
  content: ''; position: absolute; right: -14%; top: 50%;
  width: 78%; aspect-ratio: 1; transform: translateY(-50%);
  background: var(--filigrana, none) center/contain no-repeat;
  /* lo squalo è scuro: lo trasformo in sagoma bianca, così si vede
     come filigrana sul fondo blu notte */
  filter: brightness(0) invert(1);
  opacity: .10; z-index: 0; pointer-events: none;
}
/* il testo deve stare sopra la filigrana */
.card__cover > * { position: relative; z-index: 1; }
/* riga luminosa in basso */
.card__cover::before {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: .7;
}
.card__cover .cov-eyebrow {
  font-family: var(--font-display); font-size: .64rem; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase; color: var(--accent-soft);
  margin-bottom: 6px;
}
.card__cover .cov-titolo {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(1.25rem, 2.4vw, 1.6rem); line-height: 1.05;
  letter-spacing: -.03em; text-wrap: balance;
}
.card__cover .cov-meta {
  margin-top: 8px; font-size: .78rem; color: rgba(255,255,255,.62);
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
}
.card__cover .cov-meta span { display: inline-flex; align-items: center; gap: 6px; }
.card__cover .cov-meta i {
  font-style: normal; width: 4px; height: 4px; border-radius: 50%;
  background: var(--accent-soft); display: inline-block;
}
/* variante con immagine caricata da te */
.card__cover--img { padding: 0; display: grid; place-items: center; }
.card__cover--img img {
  width: 100%; height: 100%; object-fit: contain; object-position: center;
  padding: 14px;
}
.card--hover:hover .card__cover::after { opacity: .2; transition: opacity .3s ease; }

.card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.card__price {
  font-family: var(--font-display); font-weight: 800; font-size: 1.35rem;
  letter-spacing: -.03em; white-space: nowrap;
}
.card__price small { display: block; font-size: .68rem; font-weight: 500; letter-spacing: .05em; color: var(--muted); text-transform: uppercase; }
.card p { color: var(--muted); font-size: .95rem; }
.card .btn { margin-top: auto; }

.badge {
  display: inline-block; padding: 5px 11px; border-radius: var(--r-pill);
  font-size: .7rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  background: var(--paper-2); color: var(--muted); border: 1px solid var(--line);
}
.badge--accent { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.badge--dark { background: var(--ink); color: var(--accent-soft); border-color: var(--ink); }

.icon-box {
  width: 46px; height: 46px; border-radius: 14px;
  background: var(--paper-2); border: 1px solid var(--line);
  display: grid; place-items: center; font-size: 1.2rem;
}
.section--dark .icon-box { background: rgba(110,168,254,.12); border-color: rgba(110,168,254,.26); }

/* Passi numerati */
.steps { counter-reset: s; display: grid; gap: 20px; }
.step { position: relative; padding-left: 66px; }
.step::before {
  counter-increment: s; content: counter(s, decimal-leading-zero);
  position: absolute; left: 0; top: 0;
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 800; font-size: .95rem;
  background: var(--ink); color: var(--accent);
}
.section--dark .step::before { background: var(--accent); color: #fff; }
.step h3 { margin-bottom: 6px; }
.step p { color: var(--muted); margin: 0; }
.section--dark .step p { color: var(--muted-inv); }

/* --------------------------------------------------------------------------
   8. TABELLA PREZZI COACHING
   -------------------------------------------------------------------------- */
.plans { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.plan {
  position: relative; text-align: center;
  border: 1.5px solid var(--line); border-radius: var(--r-lg);
  padding: 30px 20px 24px; background: var(--paper);
  color: var(--text);   /* serve anche dentro le sezioni scure */
  display: flex; flex-direction: column; gap: 6px;
  transition: transform .2s ease, box-shadow .25s ease, border-color .2s ease;
}
/* Il bottone dentro una card chiara resta scuro anche in sezione scura */
.section--dark .plan .btn--ghost { --btn-fg: var(--text); --btn-bd: var(--line); }
.section--dark .plan .btn--ghost:hover { --btn-bd: var(--ink); }
.section--dark .plan--best .btn--ghost { --btn-fg: var(--text-inv); --btn-bd: var(--ink-3); }
.plan:hover { transform: translateY(-4px); box-shadow: var(--sh-lg); }
.plan--best { border-color: var(--ink); background: var(--ink); color: var(--text-inv); }
.plan--best .plan__perm, .plan--best .plan__note { color: var(--muted-inv); }
.plan__flag {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: var(--accent-ink);
  padding: 5px 14px; border-radius: var(--r-pill);
  font-family: var(--font-display); font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  white-space: nowrap;
}
.plan__dur { font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; letter-spacing: -.01em; }
.plan--best .plan__dur { color: #fff; }
.plan__price { font-family: var(--font-display); font-weight: 800; font-size: 2.5rem; letter-spacing: -.04em; line-height: 1.05; }
.plan--best .plan__price { color: var(--accent-soft); }
.plan__perm { font-size: .82rem; color: var(--muted); }
.plan__note { font-size: .82rem; color: var(--muted); margin-top: 2px; }
.plan .btn { margin-top: 16px; }

/* --------------------------------------------------------------------------
   9. TAB (schede/servizi)
   -------------------------------------------------------------------------- */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 34px; }
.tab {
  padding: 11px 20px; border-radius: var(--r-pill);
  border: 1.5px solid var(--line); background: transparent;
  font-family: var(--font-display); font-weight: 700; font-size: .9rem;
  color: var(--muted); cursor: pointer;
  transition: all .18s ease;
}
.tab:hover { border-color: var(--ink); color: var(--text); }
.tab.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.tab-panel { display: none; animation: fade .28s ease; }
.tab-panel.is-active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* --------------------------------------------------------------------------
   10. FAQ (accordion)
   -------------------------------------------------------------------------- */
.faq { border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__q {
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  padding: 22px 44px 22px 0; position: relative;
  font-family: var(--font-display); font-weight: 700; font-size: 1.06rem; letter-spacing: -.015em;
  color: var(--text);
}
.faq__q::after {
  content: '+'; position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  font-size: 1.5rem; font-weight: 400; color: var(--muted); transition: transform .22s ease;
}
.faq__item.is-open .faq__q::after { transform: translateY(-50%) rotate(45deg); }
.faq__a { display: none; padding: 0 44px 24px 0; color: var(--muted); }
.faq__item.is-open .faq__a { display: block; }

/* --------------------------------------------------------------------------
   11. FORM
   -------------------------------------------------------------------------- */
.field { display: block; margin-bottom: 18px; }
.field > span { display: block; font-size: .86rem; font-weight: 600; margin-bottom: 7px; }
.field > span em { font-style: normal; color: var(--muted); font-weight: 400; }
.input, .select, .textarea {
  width: 100%; padding: 13px 15px;
  background: var(--paper); border: 1.5px solid var(--line);
  border-radius: var(--r-sm); font-size: 1rem;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(13,15,18,.07);
}
.textarea { min-height: 130px; resize: vertical; }
.radio-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.radio-card { position: relative; }
.radio-card input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.radio-card span {
  display: block; padding: 14px 16px; border: 1.5px solid var(--line);
  border-radius: var(--r-sm); cursor: pointer; font-size: .95rem;
  transition: all .16s ease;
}
.radio-card input:checked + span { border-color: var(--ink); background: var(--ink); color: #fff; }
.radio-card input:focus-visible + span { outline: 3px solid var(--accent-soft); outline-offset: 2px; }

.form-note { font-size: .84rem; color: var(--muted); }
.alert {
  padding: 14px 16px; border-radius: var(--r-sm); font-size: .92rem;
  border: 1px solid var(--line); background: var(--paper-2); margin-bottom: 18px;
}
.alert--ok  { border-color: rgba(31,157,85,.35);  background: rgba(31,157,85,.08);  color: #14663a; }
.alert--err { border-color: rgba(194,51,77,.35);  background: rgba(194,51,77,.07);  color: #8f2137; }
.alert--info{ border-color: rgba(13,15,18,.14);   background: var(--paper-2); }
.alert[hidden] { display: none; }

/* Box IBAN / bonifico */
.iban-box {
  background: var(--paper-2); border: 1px dashed var(--line);
  border-radius: var(--r); padding: 20px; font-size: .95rem;
}
.iban-box dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; }
.iban-box dt { color: var(--muted); font-size: .85rem; }
.iban-box dd { margin: 0; font-weight: 600; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; }

/* --------------------------------------------------------------------------
   12. FOOTER
   -------------------------------------------------------------------------- */
.site-footer { background: var(--ink); color: var(--muted-inv); padding: 68px 0 30px; }
.footer__grid { display: grid; gap: 38px; grid-template-columns: 1.4fr 1fr 1fr 1fr; }
@media (max-width: 820px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer__grid { grid-template-columns: 1fr; } }
.site-footer .brand__name { color: #fff; }
.site-footer h4 {
  color: #fff; font-size: .78rem; letter-spacing: .15em; text-transform: uppercase; margin-bottom: 16px;
}
.footer__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: .93rem; }
.footer__list a:hover { color: var(--accent-soft); }
.footer__bottom {
  margin-top: 46px; padding-top: 22px; border-top: 1px solid var(--ink-3);
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
  font-size: .82rem; color: #737b85;
}
.social { display: flex; gap: 10px; margin-top: 18px; }
.social a {
  width: 40px; height: 40px; border-radius: 12px;
  border: 1px solid var(--ink-3); display: grid; place-items: center;
  transition: all .18s ease;
}
.social a:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* --------------------------------------------------------------------------
   13. BANDA CTA
   -------------------------------------------------------------------------- */
.cta-band {
  background: var(--accent); color: var(--accent-ink);
  padding: clamp(48px, 6vw, 78px) 0; text-align: center;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.82); max-width: 56ch; margin-inline: auto; }
.cta-band .btn--ghost { --btn-fg: #fff; --btn-bd: rgba(255,255,255,.45); }
.cta-band .btn--ghost:hover { --btn-bd: #fff; }
.cta-band .btn:not(.btn--ghost) { --btn-bg: #fff; --btn-fg: var(--ink); --btn-bd: #fff; }

/* --------------------------------------------------------------------------
   14. AREA RISERVATA
   -------------------------------------------------------------------------- */
.auth-wrap {
  min-height: calc(100vh - var(--nav-h));
  display: grid; place-items: center; padding: 48px var(--gutter);
  background: var(--paper-2);
}
.auth-card {
  width: 100%; max-width: 440px;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 34px; box-shadow: var(--sh);
}
.auth-card h1 { font-size: 1.7rem; margin-bottom: 8px; }
.auth-card .lead { font-size: .95rem; margin-bottom: 26px; }
.auth-switch { margin-top: 20px; font-size: .9rem; color: var(--muted); text-align: center; }
.auth-switch a { font-weight: 600; color: var(--text); text-decoration: underline; }

.dash-head {
  background: var(--ink); color: var(--text-inv); padding: 40px 0 34px;
}
.dash-head h1 { color: #fff; font-size: clamp(1.7rem, 3.6vw, 2.4rem); margin-bottom: 6px; }
.dash-head p { color: var(--muted-inv); margin: 0; }

.file-list { display: grid; gap: 12px; }
.file-row {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--paper); transition: border-color .18s ease, box-shadow .2s ease;
}
.file-row:hover { border-color: var(--ink); box-shadow: var(--sh-sm); }
.file-row__icon {
  flex: none; width: 42px; height: 42px; border-radius: 11px;
  background: var(--paper-2); display: grid; place-items: center;
  font-size: .68rem; font-weight: 800; font-family: var(--font-display); color: var(--err);
}
.file-row__main { flex: 1 1 auto; min-width: 0; }
.file-row__main strong { display: block; font-size: .98rem; }
.file-row__main span { font-size: .82rem; color: var(--muted); }

.empty-state {
  text-align: center; padding: 56px 24px;
  border: 1.5px dashed var(--line); border-radius: var(--r-lg); color: var(--muted);
}

.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.table th { font-size: .74rem; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.table tbody tr:hover { background: var(--paper-2); }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.admin-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 30px; flex-wrap: wrap; }
.admin-tab {
  padding: 12px 18px; background: none; border: 0; border-bottom: 2px solid transparent;
  font-family: var(--font-display); font-weight: 700; font-size: .93rem; color: var(--muted); cursor: pointer;
}
.admin-tab.is-active { color: var(--text); border-bottom-color: var(--ink); }

/* Layout a due colonne del pannello: su telefono diventa una colonna sola */
.admin-split { display: grid; gap: 30px; align-items: start; grid-template-columns: minmax(280px, 380px) 1fr; }
.admin-split--sm { grid-template-columns: minmax(260px, 330px) 1fr; }
@media (max-width: 860px) { .admin-split, .admin-split--sm { grid-template-columns: 1fr; gap: 24px; } }

/* Riquadri con i numeri della panoramica */
.stat-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); }
.stat-tile {
  border: 1px solid var(--line); border-radius: var(--r); padding: 18px 18px 16px;
  background: var(--paper);
}
.stat-tile--hi { border-color: var(--accent); background: rgba(37,99,235,.06); }
.stat-tile b {
  display: block; font-family: var(--font-display); font-weight: 800;
  font-size: 1.85rem; letter-spacing: -.03em; line-height: 1.1;
}
.stat-tile span {
  display: block; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); margin-top: 6px;
}

/* Barra dei filtri degli ordini */
.filtri { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.filtro {
  padding: 9px 16px; border-radius: var(--r-pill); border: 1.5px solid var(--line);
  background: transparent; font-size: .87rem; font-weight: 600; color: var(--muted); cursor: pointer;
  transition: all .16s ease; white-space: nowrap;
}
.filtro:hover { border-color: var(--ink); color: var(--text); }
.filtro.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.filtro em { font-style: normal; opacity: .7; margin-left: 5px; }

/* Editor di un prodotto */
.prod-card { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; margin-bottom: 18px; background: var(--paper); }
.prod-card__head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.prod-card__head h4 { margin: 0; }
.prod-grid { display: grid; gap: 0 16px; grid-template-columns: 1fr 1fr; }
@media (max-width: 620px) { .prod-grid { grid-template-columns: 1fr; } }
.prod-cover {
  width: 100%; max-width: 190px; aspect-ratio: 1; border-radius: var(--r);
  background: var(--ink); display: grid; place-items: center; overflow: hidden; margin-bottom: 10px;
}
.prod-cover img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.switch { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; cursor: pointer; }

.dropzone {
  border: 2px dashed var(--line); border-radius: var(--r-lg);
  padding: 40px 24px; text-align: center; color: var(--muted);
  cursor: pointer; transition: all .18s ease; background: var(--paper);
}
.dropzone:hover, .dropzone.is-over { border-color: var(--ink); background: var(--paper-2); color: var(--text); }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: var(--r-pill);
  font-size: .74rem; font-weight: 600;
  background: var(--paper-2); border: 1px solid var(--line);
}
.chip--ok   { background: rgba(31,157,85,.1);  border-color: rgba(31,157,85,.3);  color: #14663a; }
.chip--wait { background: rgba(180,83,9,.1);   border-color: rgba(180,83,9,.28);  color: #8a4409; }

/* --------------------------------------------------------------------------
   15. VARIE
   -------------------------------------------------------------------------- */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 0 0 var(--r-sm) 0;
}
.skip-link:focus { left: 0; }

/* L'animazione di comparsa si attiva SOLO se JavaScript funziona: così, se per
   qualsiasi motivo lo script non parte, i contenuti restano comunque visibili. */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

.prose { max-width: 74ch; }
.prose h2 { font-size: 1.5rem; margin-top: 2em; }
.prose h3 { font-size: 1.14rem; margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.3em; color: var(--muted); }
.prose li { margin-bottom: .5em; }
.prose a { text-decoration: underline; }

.cookie-bar {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 200;
  background: var(--ink); color: var(--text-inv);
  border-radius: var(--r); padding: 18px 20px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
  box-shadow: var(--sh-lg); max-width: 680px; margin-inline: auto;
  font-size: .9rem;
}
.cookie-bar p { margin: 0; flex: 1 1 260px; color: var(--muted-inv); }
.cookie-bar[hidden] { display: none; }

@media print {
  .site-header, .site-footer, .cookie-bar, .btn { display: none !important; }
  body { color: #000; background: #fff; }
}
