/* Leishape Creators, pagine pubbliche (quiz, grazie, testi legali, pagina della creator).
   Mondo «Scaletta della sfilata» su fondo BIANCO (Lucio 22/11): inchiostro cioccolato, tinte pelle come accenti,
   campiture piatte (niente ombre, gradienti, grigi), maiuscole larghe per testata/titoli/numeri/azioni.
   In fila i 4 best seller veri (non i leggings). Font locali OFL in /static/fonts.
   Il pannello /admin NON usa questo file (usa tokens.css + admin.css). */

@font-face { font-family: "Archivo Expanded"; src: url("/static/fonts/archivo-expanded-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Archivo Expanded"; src: url("/static/fonts/archivo-expanded-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("/static/fonts/archivo-text.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }

:root {
  /* tinte del marchio */
  --espresso: #2b1e19;
  --vanilla: #efe2d3;
  --tan: #c49a76;
  --bronze: #8a5a3c;
  /* ruoli */
  --bg: #ffffff;          /* fondo, sempre bianco */
  --ink: var(--espresso); /* testo e lastra dell'azione */
  --muted: #6b5245;       /* testo secondario (7:1 sul bianco) */
  --line: #e6d8ca;        /* linee sottili decorative */
  --pick: var(--tan);     /* risposta scelta: campitura tan, testo inchiostro */
  --mark: var(--bronze);  /* numeri d'uscita, icone, bordi dei campi, anello di fuoco (5,7:1) */
  --paper: var(--vanilla);/* campitura chiara per avvisi */
  --on-ink: #ffffff;      /* testo sopra la lastra cioccolato */
  --wide: "Archivo Expanded", "Archivo", system-ui, sans-serif;
  --text: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gut: 1.25rem;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12'%3E%3Cpath d='M0 6h22M17 1l5 5-5 5' fill='none' stroke='%23000' stroke-width='1.6'/%3E%3C/svg%3E");
  --check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2.5 8.5l3.5 3.5 7.5-8' fill='none' stroke='%23000' stroke-width='2'/%3E%3C/svg%3E");
  --alert: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='7' fill='none' stroke='%23000' stroke-width='1.5'/%3E%3Cpath d='M8 4v5' stroke='%23000' stroke-width='1.8'/%3E%3Ccircle cx='8' cy='11.6' r='1.1'/%3E%3C/svg%3E");
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%238a5a3c' stroke-width='1.6'/%3E%3C/svg%3E");
  color-scheme: light;
  scrollbar-color: var(--line) var(--bg);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font: 400 1rem/1.55 var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, p, figure, ul, ol { margin: 0; }
img, video { display: block; max-width: 100%; height: auto; }
::selection { background: var(--pick); color: var(--ink); }
a { color: var(--ink); text-decoration-line: underline; text-decoration-color: var(--tan); text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--mark); outline-offset: 3px; }
input, select, textarea, button { font: inherit; color: inherit; caret-color: var(--mark); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
strong { font-weight: 700; color: var(--ink); }

/* Testata: logo ufficiale + riga della pagina; la cucitura sotto è anche la barra di avanzamento del quiz. */
.mast { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.75rem; }
.mast-logo { display: inline-flex; padding: 0.5rem 0; }
.mast-logo img { width: 7rem; height: auto; }
.mast-line { font: 500 0.625rem/1.3 var(--wide); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); text-align: right; }
.seam { position: relative; height: 1px; background: var(--line); }
.seam-fill { position: absolute; inset: 0 auto 0 0; width: 0; height: 2px; top: -0.5px; background: var(--ink); transition: width 420ms var(--ease); }

/* Titoli larghi */
.display { font: 700 2.125rem/1.02 var(--wide); letter-spacing: -0.01em; text-transform: uppercase; text-wrap: balance; }
.display-sub { display: block; margin-top: 0.75rem; font: 400 1.3125rem/1.25 var(--text); letter-spacing: 0; text-transform: none; }

/* Lastra: l'azione principale, campitura cioccolato a tutta larghezza con freccia disegnata */
.btn, .slab {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  width: 100%; min-height: 3.625rem; padding: 0 1.125rem;
  border: 0; border-radius: 0; background: var(--ink); color: var(--on-ink);
  font: 700 0.8125rem/1.2 var(--wide); letter-spacing: 0.1em; text-transform: uppercase; text-align: left;
  cursor: pointer; transition: background-color 160ms var(--ease);
}
.btn::after, .slab::after {
  content: ""; flex: none; width: 1.5rem; height: 0.75rem; background: currentColor;
  -webkit-mask: var(--arrow) center / contain no-repeat; mask: var(--arrow) center / contain no-repeat;
  transition: transform 220ms var(--ease);
}
.btn:hover, .slab:hover { background: var(--bronze); }
.btn:hover::after, .slab:hover::after { transform: translateX(0.25rem); }
.btn:disabled { cursor: wait; background: var(--bronze); }
.btn:disabled::after { opacity: 0.5; }

/* Fila dei 4 best seller: passerella */
.lineup { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.375rem; list-style: none; padding: 0; }
.lineup picture { display: block; min-height: 0; }
.lineup img { width: 100%; height: 10.75rem; object-fit: cover; object-position: 50% 30%; background: var(--paper); }

/* Piede */
.foot { display: flex; gap: 1.5rem; margin-top: auto; padding: 1.5rem 0 1.25rem; border-top: 1px solid var(--line); }
.foot a { display: inline-flex; align-items: center; min-height: 2.75rem; font: 500 0.625rem/1 var(--wide); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--ink); }

/* Casella di spunta disegnata (niente grigio di sistema) */
.consent input[type="checkbox"], .cr-check input[type="checkbox"] {
  appearance: none; -webkit-appearance: none; display: inline-grid; place-content: center;
  width: 1.375rem; height: 1.375rem; flex: none; margin: 0.05rem 0 0; border: 1.5px solid var(--mark); border-radius: 0;
  background: var(--bg); cursor: pointer;
}
.consent input[type="checkbox"]::before, .cr-check input[type="checkbox"]::before {
  content: ""; width: 0.875rem; height: 0.875rem; background: var(--on-ink); transform: scale(0); transition: transform 160ms var(--ease);
  -webkit-mask: var(--check) center / contain no-repeat; mask: var(--check) center / contain no-repeat;
}
.consent input[type="checkbox"]:checked, .cr-check input[type="checkbox"]:checked { background: var(--mark); }
.consent input[type="checkbox"]:checked::before, .cr-check input[type="checkbox"]:checked::before { transform: scale(1); }

/* Pagina d'errore pubblica: stessa testata e stesso piede delle altre pagine */
.center-page { display: flex; flex-direction: column; max-width: 36rem; min-height: 100vh; margin: 0 auto; padding: 0 var(--gut); }
.center-main { padding: 3rem 0; }
.center-page .eyebrow { font: 700 4.5rem/1 var(--wide); color: var(--mark); margin-bottom: 1.5rem; }
.center-page h1 { font: 700 1.75rem/1.1 var(--wide); text-transform: uppercase; margin-bottom: 1rem; }
.center-page .center-main p { margin-bottom: 1rem; color: var(--muted); }
.center-page .link { color: var(--ink); }

@media (min-width: 768px) {
  :root { --gut: 2rem; }
  .display { font-size: 3rem; }
  .display-sub { font-size: 1.5rem; }
  .lineup img { height: 16rem; }
  .mast-logo img { width: 8rem; }
  .mast-line { font-size: 0.6875rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
}
