/**
 * Lo stile del sito di CampBoom, dal progetto fatto in Claude Design: pagina chiara, Inter Tight, schermate vere
 * dell'app, il nero per i tasti e il cremisi dell'icona in pochi punti. Le pagine dei documenti usano gli stessi
 * colori e lo stesso carattere.
 */

:root {
  --bg: #f6f6f4;
  --bianco: #ffffff;
  --tenue: #ecece8;
  --tenue-2: #e9e9e5;
  --ink: #111318;
  --muted: #5b606b;
  --muted-2: #4a4f5a;
  --riga: #deded9;
  --rosso: #c8202e;
  --scuro: #111318;
  --scuro-2: #1c2029;
  --scuro-3: #2a2e38;
  --su-scuro: #f6f6f4;
  --su-scuro-muted: #b9bdc6;

  --largo: 1200px;
  --margine: 32px;
  --spazio: clamp(96px, 11vw, 160px);
  --titolo: clamp(2.25rem, 1.2rem + 3.2vw, 3.75rem);
  --uscita: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 1.55;
}

h1, h2, h3, p, ul { margin: 0; }
ul[role="list"] { list-style: none; padding: 0; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
a:hover { color: var(--muted); }
button { font: inherit; color: inherit; }

h2 { font-size: var(--titolo); font-weight: 600; letter-spacing: -0.04em; line-height: 1.02; text-wrap: balance; }

:focus-visible { outline: 3px solid var(--rosso); outline-offset: 3px; }
::selection { background: var(--ink); color: var(--bianco); }

.salta {
  position: absolute; left: var(--margine); top: -100px; z-index: 10;
  background: var(--ink); color: var(--bianco); padding: 12px 18px; border-radius: 999px; font-weight: 600;
}
.salta:focus { top: 12px; color: var(--bianco); }

.centrato { text-align: center; margin-left: auto; margin-right: auto; }

/* I tasti: pillole piene. */
.tasto {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 28px; border-radius: 999px;
  background: var(--ink); color: var(--bianco);
  font-size: 17px; font-weight: 600; text-decoration: none;
  transition: background-color 0.2s, transform 0.2s var(--uscita);
}
.tasto:hover { background: #2b2f38; color: var(--bianco); }
.tasto:active { transform: scale(0.97); }
.tasto--piccolo { min-height: 44px; padding: 0 20px; font-size: 16px; }
.tasto--tenue { background: var(--tenue-2); color: var(--ink); }
.tasto--tenue:hover { background: #dcdcd6; color: var(--ink); }
.tasto--rosso { background: var(--rosso); }
.tasto--rosso:hover { background: #a91a26; }
.tasto--bianco { background: var(--bianco); color: var(--ink); }
.tasto--bianco:hover { background: #f1f1ee; color: var(--ink); }

/* ── Testata ── */

.testata {
  max-width: var(--largo); margin: 0 auto; padding: 24px var(--margine);
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.marchio {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 20px; font-weight: 700; letter-spacing: -0.02em; text-decoration: none;
}
.marchio svg { width: 26px; height: 26px; }
.marchio:hover { color: var(--ink); }
.testata__sezioni { display: flex; gap: 32px; font-size: 16px; font-weight: 500; }
.testata__sezioni a { text-decoration: none; }

/* ── Apertura ── */

.eroe {
  max-width: var(--largo); margin: 0 auto; padding: 88px var(--margine) 0;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.eroe h1 {
  font-size: clamp(3rem, 1.2rem + 6vw, 6rem); font-weight: 600; letter-spacing: -0.045em; line-height: 0.98;
  max-width: 14ch; text-wrap: balance;
}
.eroe__frase { margin-top: 28px; font-size: 21px; line-height: 1.5; color: var(--muted); max-width: 34em; }
.eroe__azioni { display: flex; gap: 16px; margin-top: 40px; flex-wrap: wrap; justify-content: center; }

.vetrina {
  max-width: 1360px; margin: 0 auto; padding: 72px var(--margine) 0; overflow: hidden;
  display: flex; justify-content: center; align-items: flex-end; gap: 28px;
}
.vetrina img { flex-shrink: 0; border-radius: 28px; }
.vetrina .vetrina__centro { width: 268px; border-radius: 32px; }
.vetrina__lato1 { width: 230px; margin-bottom: 28px; }
.vetrina__lato2 { width: 210px; margin-bottom: 64px; }

.numeri { background: var(--bianco); }
.numeri__interno {
  max-width: var(--largo); margin: 0 auto; padding: 56px var(--margine);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px;
}
.numeri__interno p:not(.numeri__cifra) { margin-top: 8px; color: var(--muted); }
.numeri__cifra { font-size: 56px; font-weight: 600; letter-spacing: -0.04em; line-height: 1; }

/* ── Sezioni ── */

.sezione { max-width: var(--largo); margin: 0 auto; padding: var(--spazio) var(--margine) 0; }
.sezione__testa { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; }
.sezione__testa h2 { max-width: 12ch; }
.sezione__testa p { max-width: 30em; color: var(--muted); }

.mondi {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; margin-top: 56px;
}
.mondo { background: var(--tenue); border-radius: 28px; overflow: hidden; display: flex; flex-direction: column; }
.mondo__schermo { height: 300px; overflow: hidden; display: flex; justify-content: center; padding-top: 32px; }
.mondo__schermo img { width: 220px; border-radius: 24px 24px 0 0; align-self: flex-start; transition: transform 0.5s var(--uscita); }
.mondo:hover .mondo__schermo img { transform: translateY(-8px); }
.mondo__testo {
  background: var(--bianco); padding: 22px 24px 24px; flex-grow: 1;
  display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 6px 12px;
}
.mondo__testo h3 { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.mondo__testo span { font-size: 14px; font-weight: 600; color: var(--muted); }
.mondo__testo p { grid-column: 1 / -1; font-size: 16px; color: var(--muted); }

/* ── La sfida ── */

.sfida {
  background: var(--scuro); color: var(--su-scuro); border-radius: 36px;
  padding: clamp(32px, 5vw, 72px);
  display: flex; gap: 56px; flex-wrap: wrap; align-items: center;
}
.sfida__testo { flex: 1 1 380px; min-width: 0; }
.sfida__testo > p { margin-top: 20px; color: var(--su-scuro-muted); max-width: 30em; }
.livelli-elenco { margin-top: 36px; }
.livelli-elenco li { display: flex; justify-content: space-between; gap: 16px; padding: 18px 0; }
.livelli-elenco li + li { border-top: 1px solid var(--scuro-3); }
.livelli-elenco li span:first-child { font-weight: 600; }
.livelli-elenco li span:last-child { color: var(--su-scuro-muted); text-align: right; }

.campo {
  flex: 1 1 380px; min-width: 0; max-width: 440px; margin: 0 auto;
  background: var(--scuro-2); border-radius: 28px; padding: 28px;
}
.campo__testa { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.campo__testa > span { font-size: 14px; color: var(--su-scuro-muted); }
.livelli, .modo { display: inline-flex; gap: 6px; }
.livelli button, .modo button {
  border: 0; border-radius: 999px; padding: 8px 14px; cursor: pointer;
  font-size: 14px; font-weight: 600; background: var(--scuro-3); color: var(--su-scuro);
  transition: background-color 0.2s, color 0.2s;
}
.livelli button:hover, .modo button:hover { background: #3a3f4b; }
.livelli button[aria-pressed="true"], .modo button[aria-pressed="true"] { background: var(--su-scuro); color: var(--ink); }

.griglia {
  display: grid; grid-template-columns: repeat(var(--lato), minmax(0, 1fr));
  gap: calc(36px / var(--lato));
  font-size: calc(120px / var(--lato));
}
.cella {
  aspect-ratio: 1; display: grid; place-items: center; padding: 0; border: 0;
  border-radius: calc(48px / var(--lato));
  background: #2f3442; color: var(--su-scuro);
  font-weight: 700; line-height: 1; cursor: pointer;
  transition: background-color 0.15s, transform 0.15s var(--uscita);
}
button.cella:hover { background: #3b4152; }
button.cella:active { transform: scale(0.93); }
.cella--aperta, button.cella--aperta:hover { background: var(--scuro); cursor: default; }
.cella[data-n="1"] { color: #7fb2ff; }
.cella[data-n="2"] { color: #5fd394; }
.cella[data-n="3"] { color: #ff8a80; }
.cella[data-n="4"] { color: #f2c14e; }
.cella[data-n="5"] { color: #ffa65c; }
.cella--mina { background: #3a1820; color: #ff6b6b; }
.cella--colpita { background: var(--rosso); color: var(--bianco); }
.bandierina-segno { width: 40%; height: 46%; position: relative; display: block; }
.bandierina-segno::before { content: ""; position: absolute; left: 10%; top: 0; bottom: 0; width: 13%; background: var(--su-scuro); }
.bandierina-segno::after { content: ""; position: absolute; left: 23%; top: 0; width: 72%; height: 56%; background: var(--rosso); clip-path: polygon(0 0, 100% 50%, 0 100%); }

.campo__stato { margin-top: 18px; font-size: 14px; color: var(--su-scuro-muted); min-height: 2.6em; }
.campo__comandi { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.campo__rifai {
  background: none; border: 0; padding: 8px 0; cursor: pointer;
  font-size: 14px; font-weight: 600; color: var(--su-scuro);
  text-decoration: underline; text-underline-offset: 4px;
}
.campo__rifai:hover { color: var(--su-scuro-muted); }

/* ── Prezzi ── */

#prezzi h2 { max-width: 16ch; }
.piani { margin-top: 56px; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.piano { background: var(--bianco); border-radius: 28px; padding: 36px; display: flex; flex-direction: column; gap: 20px; }
.piano h3 { font-size: 28px; font-weight: 600; letter-spacing: -0.03em; }
.piano__per { color: var(--muted); }
.piano ul { display: flex; flex-direction: column; gap: 12px; font-size: 16px; }
.piano li { padding-left: 26px; position: relative; }
.piano li::before {
  content: ""; position: absolute; left: 0; top: 0.42em; width: 14px; height: 8px;
  border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg);
}
.piano__prezzo { margin-top: auto; font-size: 32px; font-weight: 600; letter-spacing: -0.03em; }
.piano__prezzo--testo { font-size: 18px; letter-spacing: 0; }
.piano--scuro { background: var(--scuro); color: var(--su-scuro); }
.piano--scuro .piano__per { color: var(--su-scuro-muted); }
.piano--scuro .tasto { margin-top: auto; align-self: flex-start; }
.nota { margin-top: 24px; font-size: 15px; color: var(--muted); max-width: 46em; }

/* ── Domande ── */

.domande { display: flex; gap: 64px; flex-wrap: wrap; }
.domande__testa { flex: 1 1 280px; min-width: 0; }
.domande__testa p { margin-top: 20px; color: var(--muted); }
.domande__elenco { flex: 2 1 560px; min-width: 0; }
.domanda { padding: 24px 0; border-top: 1px solid var(--riga); }
.domanda h3 { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.domanda p { margin-top: 8px; font-size: 17px; color: var(--muted-2); }

/* ── Invito ── */

.invito {
  background: var(--rosso); color: var(--bianco); border-radius: 36px;
  padding: clamp(40px, 6vw, 88px);
  display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap;
}
.invito h2 { max-width: 13ch; }
.invito__azioni { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; font-size: 15px; }

/* ── Piede ── */

.piede { max-width: var(--largo); margin: 0 auto; padding: 120px var(--margine) 48px; display: flex; flex-direction: column; gap: 56px; }
.piede__riga { display: flex; justify-content: space-between; gap: 48px; flex-wrap: wrap; }
.piede__chi { max-width: 320px; }
.piede__nome { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.piede__chi p:not(.piede__nome) { margin-top: 10px; font-size: 15px; color: var(--muted); }
.piede__colonne { display: flex; gap: 72px; flex-wrap: wrap; font-size: 15px; }
.piede__colonne div { display: flex; flex-direction: column; gap: 10px; }
.piede__colonne h2 { font-size: 15px; font-weight: 600; letter-spacing: 0; line-height: 1.55; }
.piede__colonne a { text-decoration: none; }
.piede__legale { font-size: 14px; color: var(--muted); }

/* ── Le pagine dei documenti ── */

.documento .testata .tasto { min-height: 44px; }

.doc-testa { max-width: var(--largo); margin: 0 auto; padding: 56px var(--margine) 0; }
.doc-schede { display: inline-flex; gap: 4px; padding: 4px; background: var(--tenue-2); border-radius: 999px; flex-wrap: wrap; }
.doc-schede a {
  text-decoration: none; font-size: 15px; font-weight: 600; padding: 10px 18px; border-radius: 999px; color: var(--muted-2);
  transition: background-color 0.2s, color 0.2s;
}
.doc-schede a:hover { color: var(--ink); background: #f1f1ee; }
.doc-schede a[aria-current="page"] { background: var(--bianco); color: var(--ink); }
.doc-testa h1 {
  margin-top: 40px; font-size: clamp(2.75rem, 1.4rem + 4.4vw, 5rem); font-weight: 600;
  letter-spacing: -0.045em; line-height: 1; max-width: 14ch; text-wrap: balance;
}
.doc-sotto { margin-top: 24px; font-size: 22px; line-height: 1.5; color: var(--muted); max-width: 34em; }
.doc-meta { display: flex; gap: 12px 32px; flex-wrap: wrap; margin-top: 32px; font-size: 15px; color: var(--muted); }

.doc-corpo {
  max-width: var(--largo); margin: 0 auto; padding: 72px var(--margine) 0;
  display: grid; grid-template-columns: 260px minmax(0, 760px); gap: 72px; align-items: start;
}
.doc-indice { position: sticky; top: 24px; font-size: 15px; max-height: calc(100vh - 48px); overflow-y: auto; }
.doc-indice > p { font-weight: 600; margin-bottom: 14px; }
.doc-indice ol { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 2px; }
.doc-indice a {
  display: flex; gap: 10px; text-decoration: none; padding: 7px 12px; border-radius: 10px; color: var(--muted-2);
  transition: background-color 0.2s, color 0.2s;
}
.doc-indice a span { width: 20px; flex-shrink: 0; color: #80858f; }
.doc-indice a:hover { color: var(--ink); background: #ededea; }
.doc-indice a[aria-current="true"] { background: var(--bianco); color: var(--ink); font-weight: 600; }

.doc-testo { font-size: 18px; line-height: 1.65; min-width: 0; }
.doc-testo h2 {
  font-size: 30px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.2;
  margin: 80px 0 16px; scroll-margin-top: 24px; display: flex; gap: 16px; align-items: baseline;
}
.doc-testo > h2:first-child { margin-top: 0; }
.doc-testo h2 .num { color: var(--rosso); font-size: 18px; min-width: 1.2em; }
.doc-testo h3 { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; margin: 32px 0 8px; }
.doc-testo p, .doc-testo ul, .doc-testo ol { margin: 0 0 16px; }
.doc-testo ul, .doc-testo ol { padding-left: 1.3em; }
.doc-testo li + li { margin-top: 6px; }
.doc-testo li::marker { color: #80858f; }
.doc-testo a { text-underline-offset: 3px; }
.doc-testo strong { font-weight: 600; }
.doc-testo table { border-collapse: collapse; width: 100%; font-size: 16px; margin-bottom: 16px; background: var(--bianco); border-radius: 16px; overflow: hidden; }
.doc-testo th, .doc-testo td { text-align: left; padding: 12px 16px; vertical-align: top; }
.doc-testo tr + tr td { border-top: 1px solid var(--tenue); }

.riquadro { background: var(--bianco); border-radius: 20px; padding: 24px; margin: 24px 0; font-size: 17px; }
.riquadro--avviso { background: #f6e3e4; }
.riquadro > :first-child { margin-top: 0; }
.riquadro > :last-child { margin-bottom: 0; }

.doc-aiuto {
  margin-top: 96px; background: var(--scuro); color: var(--su-scuro); border-radius: 28px; padding: 36px;
  display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap;
}
.doc-aiuto h2 { margin: 0; font-size: 26px; display: block; }
.doc-aiuto p { margin: 8px 0 0; color: var(--su-scuro-muted); font-size: 16px; }

.doc-piede {
  max-width: var(--largo); margin: 0 auto; padding: 120px var(--margine) 48px;
  display: flex; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; font-size: 15px; color: var(--muted);
}
.doc-piede nav { display: flex; gap: 12px 24px; flex-wrap: wrap; }
.doc-piede a { text-decoration: none; }

/* ── Movimento ── */

.js [data-entra] {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.8s var(--uscita), transform 0.8s var(--uscita);
  transition-delay: var(--ritardo, 0ms);
}
.js [data-entra].dentro { opacity: 1; transform: none; }

@keyframes sale { from { opacity: 0; transform: translateY(48px); } to { opacity: 1; transform: none; } }
.js .vetrina img { animation: sale 1s var(--uscita) both; }
.js .vetrina__lato1 { animation-delay: 0.12s; }
.js .vetrina__lato2 { animation-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-entra] { opacity: 1; transform: none; transition: none; }
  .js .vetrina img { animation: none; }
  .mondo__schermo img { transition: none; }
}

/* ── Schermi stretti ── */

@media (max-width: 900px) {
  .testata__sezioni { display: none; }
  .vetrina__lato2 { display: none; }
  .doc-corpo { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: 48px; }
  .doc-indice { position: static; max-height: none; background: var(--bianco); border-radius: 20px; padding: 20px; }
}

@media (max-width: 600px) {
  :root { --margine: 20px; }
  body { font-size: 17px; }
  .eroe { padding-top: 48px; }
  .eroe__frase { font-size: 19px; }
  .eroe__azioni .tasto { width: 100%; }
  .vetrina { gap: 14px; padding-top: 48px; }
  .vetrina .vetrina__centro { width: 200px; }
  .vetrina__lato1 { width: 150px; margin-bottom: 20px; }
  .numeri__interno { grid-template-columns: 1fr 1fr; gap: 24px; padding: 40px var(--margine); }
  .numeri__cifra { font-size: 44px; }
  .mondi { grid-template-columns: 1fr; }
  .sfida { border-radius: 28px; padding: 28px 20px; }
  .campo { padding: 18px; }
  .invito { border-radius: 28px; }
  .piede__colonne { gap: 32px; }
  .doc-testa { padding-top: 32px; }
  .doc-schede { display: flex; flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
  .doc-schede a { white-space: nowrap; padding: 10px 14px; }
  .doc-sotto { font-size: 19px; }
  .doc-testo { font-size: 17px; }
  .doc-testo h2 { font-size: 25px; margin-top: 64px; }
  .doc-aiuto { padding: 28px 24px; }
}
