/* Gusmeo — foglio di stile condiviso. Nessuna risorsa esterna, nessun cookie. */
:root {
  --notte: #0f1d38;
  --fondo: #f3f5f9;
  --carta: #ffffff;
  --testo: #14213d;
  --testo-tenue: #4d5a75;
  --oro: #8f6d1c;
  --oro-pieno: #c9a44c;
  --linea: #d5dbe7;
  --scheda-fondo: #0f1d38;
  --scheda-testo: #f4efe1;
  --scheda-tenue: #aab4cc;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --fondo: #0b1529;
    --carta: #12203c;
    --testo: #f1ecdf;
    --testo-tenue: #a9b3ca;
    --oro: #d6b461;
    --linea: #263657;
    --scheda-fondo: #17284b;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fondo);
  color: var(--testo);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
}
img { max-width: 100%; }
a { color: var(--oro); text-underline-offset: 0.18em; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--oro-pieno); outline-offset: 3px; border-radius: 4px; }

/* Lingua: si mostra solo quella attiva */
html[data-lingua="it"] [lang="en"],
html[data-lingua="en"] [lang="it"] { display: none; }

.contenitore { max-width: 68rem; margin: 0 auto; padding: 0 1.5rem; }

/* Testata */
.testata { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 1.25rem; padding-bottom: 1.25rem; }
.marchio { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; color: var(--testo); }
.marchio img { width: 44px; height: 44px; border-radius: 10px; }
.marchio span { font-family: var(--serif); font-size: 1.5rem; letter-spacing: 0.01em; }
.navigazione { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; justify-content: flex-end; }
.navigazione a { color: var(--testo); text-decoration: none; font-size: 0.95rem; }
.navigazione a:hover { text-decoration: underline; }
.lingue { display: flex; border: 1px solid var(--linea); border-radius: 999px; overflow: hidden; }
.lingue button {
  font: inherit; font-size: 0.85rem; padding: 0.3rem 0.8rem; border: 0; cursor: pointer;
  background: transparent; color: var(--testo-tenue);
}
.lingue button[aria-pressed="true"] { background: var(--notte); color: #f4efe1; }
@media (prefers-color-scheme: dark) {
  .lingue button[aria-pressed="true"] { background: var(--oro-pieno); color: #0b1529; }
}

/* Apertura */
.apertura { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 3.5rem; align-items: center; padding-top: 3.5rem; padding-bottom: 4.5rem; }
.apertura h1 {
  font-family: var(--serif); font-weight: 500; line-height: 1.05;
  font-size: clamp(2.6rem, 6.2vw, 4.6rem); margin: 0 0 1.25rem; letter-spacing: -0.01em;
}
.apertura p.sommario { font-size: 1.2rem; color: var(--testo-tenue); max-width: 32rem; margin: 0 0 1.75rem; }
.motto { font-family: var(--serif); font-style: italic; color: var(--oro); font-size: 1.15rem; margin: 0 0 1.5rem; }
.stato {
  display: inline-block; padding: 0.7rem 1.2rem; border-radius: 12px;
  background: var(--notte); color: #f4efe1; font-size: 0.98rem;
}
@media (prefers-color-scheme: dark) { .stato { background: var(--carta); border: 1px solid var(--linea); } }

/* La scheda: l'elemento che racconta l'app */
.scheda {
  background: var(--scheda-fondo); color: var(--scheda-testo);
  border-radius: 22px; padding: 1.75rem 1.75rem 1.5rem;
  box-shadow: 0 24px 60px -28px rgba(15, 29, 56, 0.55);
  transform: rotate(1.4deg);
}
.scheda h2 { font-family: var(--serif); font-weight: 500; font-size: 1.6rem; margin: 0; line-height: 1.2; }
.scheda .luogo { color: var(--scheda-tenue); font-size: 0.92rem; margin: 0.2rem 0 1.4rem; }
.voti { list-style: none; margin: 0 0 1.4rem; padding: 0; display: grid; gap: 0.7rem; }
.voti li { display: grid; grid-template-columns: 5.2rem 1fr; align-items: center; gap: 0.9rem; font-size: 0.92rem; }
.barra { height: 7px; border-radius: 999px; background: rgba(255, 255, 255, 0.13); overflow: hidden; }
.barra i { display: block; height: 100%; border-radius: 999px; background: var(--oro-pieno); }
.piatto { border-top: 1px solid rgba(255, 255, 255, 0.15); padding-top: 1rem; display: flex; justify-content: space-between; gap: 1rem; font-size: 0.95rem; }
.piatto .stelle { color: var(--oro-pieno); letter-spacing: 0.1em; white-space: nowrap; }
.scheda .nota { font-family: var(--serif); font-style: italic; color: var(--scheda-tenue); margin: 0.9rem 0 0; font-size: 0.98rem; }

/* Sezioni */
.sezione { padding-top: 3.5rem; padding-bottom: 3.5rem; }
.sezione::before { content: ""; display: block; border-top: 1px solid var(--linea); margin-bottom: 3.5rem; margin-top: -3.5rem; }
.sezione h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(1.7rem, 3.4vw, 2.3rem); line-height: 1.15; margin: 0 0 2rem; max-width: 30rem; }
.colonne { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
.colonne h3 { font-family: var(--serif); font-weight: 600; font-size: 1.25rem; margin: 0 0 0.5rem; color: var(--oro); }
.colonne p { margin: 0; color: var(--testo-tenue); }
.due { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
.due p { margin: 0 0 1rem; max-width: 34rem; }
.elenco { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.9rem; }
.elenco li { padding-left: 1.4rem; position: relative; }
.elenco li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--oro-pieno); }

/* Pagine di testo (privacy, supporto) */
.documento { max-width: 44rem; padding-top: 2.5rem; padding-bottom: 4rem; }
.documento h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(2.1rem, 5vw, 3rem); line-height: 1.1; margin: 0 0 0.5rem; }
.documento .aggiornamento { color: var(--testo-tenue); margin: 0 0 2.5rem; font-size: 0.95rem; }
.documento h2 { font-family: var(--serif); font-weight: 600; font-size: 1.4rem; margin: 2.5rem 0 0.6rem; }
.documento h3 { font-size: 1.05rem; margin: 1.5rem 0 0.3rem; }
.documento p, .documento li { color: var(--testo); }
.documento ul { padding-left: 1.2rem; }
.documento li { margin-bottom: 0.4rem; }
.riquadro { background: var(--carta); border: 1px solid var(--linea); border-left: 4px solid var(--oro-pieno); border-radius: 10px; padding: 1.1rem 1.3rem; margin: 0 0 1rem; }
.riquadro p { margin: 0 0 0.5rem; }
.riquadro p:last-child { margin-bottom: 0; }

/* Piede */
.piede { padding-top: 0; padding-bottom: 3rem; color: var(--testo-tenue); font-size: 0.92rem; }
.piede .riga { border-top: 1px solid var(--linea); padding-top: 2rem; display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.piede nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.piede p { margin: 0; }

/* Schermate dell'app dentro la sagoma di un telefono */
.telefono {
  margin: 0 auto; width: min(100%, 17.5rem); aspect-ratio: 660 / 1434;
  border-radius: 2.6rem; border: 0.55rem solid #070d1c; background: #0f1a31;
  overflow: hidden; box-shadow: 0 28px 60px -30px rgba(15, 29, 56, 0.7);
}
.telefono img { display: block; width: 100%; height: 100%; object-fit: cover; }
@media (prefers-color-scheme: dark) { .telefono { border-color: #2a3b61; } }

/* Apertura: cosa fa l'app, in quattro voci, e tre schermate affiancate */
.cosa-fa { list-style: none; margin: 0 0 1.75rem; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem 1.75rem; max-width: 34rem; }
.cosa-fa li { font-size: 0.98rem; color: var(--testo-tenue); line-height: 1.4; }
.cosa-fa strong { display: block; font-family: var(--serif); font-size: 1.15rem; font-weight: 600; color: var(--oro); }
.trio { display: flex; justify-content: center; align-items: center; }
.trio .telefono { flex: none; margin: 0; width: 36%; border-width: 0.4rem; border-radius: 1.9rem; }
.trio .telefono:nth-child(1) { margin-right: -7%; transform: rotate(-5deg); }
.trio .telefono:nth-child(2) { width: 42%; z-index: 1; border-radius: 2.1rem; }
.trio .telefono:nth-child(3) { margin-left: -7%; transform: rotate(5deg); }

/* Vetrina a schede: un pulsante per funzione */
.schede { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: -0.5rem 0 1.5rem; }
.schede[hidden] { display: none; }
.schede button {
  font: inherit; font-family: var(--serif); font-size: 1.1rem; padding: 0.5rem 1.2rem; cursor: pointer;
  border: 1px solid var(--linea); border-radius: 999px; background: transparent; color: var(--testo);
}
.schede button[aria-selected="true"] { background: var(--notte); border-color: var(--notte); color: #f4efe1; }
@media (prefers-color-scheme: dark) {
  .schede button[aria-selected="true"] { background: var(--oro-pieno); border-color: var(--oro-pieno); color: #0b1529; }
}
.con-schede .blocco { padding: 0.5rem 0 0; }
.con-schede .blocco[hidden] { display: none; }
.con-schede .blocco:nth-of-type(even) .blocco-testo { order: 0; }
.con-schede .blocco h3 { display: none; }
.con-schede .blocco p { font-size: 1.15rem; }
.con-schede .telefono { width: min(100%, 15rem); }

/* Blocchi illustrati: testo da un lato, schermata dall'altro, alternati */
.blocco { display: grid; grid-template-columns: 1fr 1fr; gap: 3.5rem; align-items: center; padding: 2rem 0; }
.blocco:nth-of-type(even) .blocco-testo { order: 2; }
.blocco h3 { font-family: var(--serif); font-weight: 600; font-size: 1.6rem; margin: 0 0 0.6rem; color: var(--oro); }
.blocco p { margin: 0 0 1.25rem; color: var(--testo-tenue); max-width: 30rem; }
.blocco .elenco { max-width: 30rem; }

/* Lavoro: tre passaggi illustrati */
.introduzione { font-size: 1.15rem; color: var(--testo-tenue); max-width: 40rem; margin: -1rem 0 2.5rem; }
.passi { list-style: none; margin: 0 0 3rem; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
.passo .telefono { width: min(100%, 12.5rem); margin-bottom: 1.5rem; }
.passo h3 { font-family: var(--serif); font-weight: 600; font-size: 1.25rem; margin: 0 0 0.5rem; display: flex; align-items: center; gap: 0.6rem; }
.passo p { margin: 0; color: var(--testo-tenue); }
.numero {
  flex: none; width: 1.9rem; height: 1.9rem; border-radius: 50%; display: inline-grid; place-items: center;
  background: var(--oro-pieno); color: #0b1529; font-family: var(--sans); font-size: 0.95rem; font-weight: 700;
}
.elenco.in-riga { grid-template-columns: repeat(3, 1fr); gap: 1.5rem 2.5rem; }
.avvertenza { margin: 2rem 0 0; font-size: 0.9rem; color: var(--testo-tenue); }

@media (max-width: 820px) {
  .apertura { grid-template-columns: 1fr; gap: 2.5rem; padding-top: 2rem; padding-bottom: 3rem; }
  .scheda { transform: none; }
  .cosa-fa { gap: 0.8rem 1.25rem; }
  .trio { max-width: 24rem; margin: 0 auto; }
  .blocco { grid-template-columns: 1fr; gap: 1.75rem; padding: 1.5rem 0; }
  .blocco:nth-of-type(even) .blocco-testo { order: 0; }
  .passi { grid-template-columns: 1fr; gap: 2rem; }
  .passo { display: grid; grid-template-columns: 7rem 1fr; column-gap: 1.1rem; align-items: start; }
  .passo .telefono { grid-row: span 2; width: 100%; margin: 0; border-width: 0.25rem; border-radius: 1.1rem; }
  .passo h3 { margin-top: 0.3rem; }
  .elenco.in-riga { grid-template-columns: 1fr; }
  .introduzione { margin-top: -0.5rem; }
  .colonne { grid-template-columns: 1fr; gap: 1.75rem; }
  .due { grid-template-columns: 1fr; gap: 1.5rem; }
  .sezione { padding-top: 2.5rem; padding-bottom: 2.5rem; }
  .sezione::before { margin-bottom: 2.5rem; margin-top: -2.5rem; }
  .navigazione { gap: 0.9rem; }
  .marchio span { font-size: 1.3rem; }
}
