/* AutoInRegola: sito statico. Niente cookie, niente script, font ospitati qui. */

@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url("/fonts/barlow-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-display: swap; src: url("/fonts/barlow-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Semi Condensed"; font-weight: 700; font-display: swap; src: url("/fonts/barlow-semi-condensed-latin-700-normal.woff2") format("woff2"); }

:root {
  color-scheme: light dark;
  --targa: #1d4ed8;
  --targa-scuro: #173ca8;
  --su-targa: #ffffff;
  --su-targa-tenue: #dbe5ff;
  --stelle: #ffcc00;
  --bg: #ffffff;
  --superficie: #f1f3f6;
  --testo: #18181b;
  --testo-tenue: #52525b;
  --linea: #d4d4d8;
  --link: #1d4ed8;
  --asfalto: #26282d;
  --su-asfalto: #f4f4f5;
  --su-asfalto-tenue: #b9bbc2;
  --verde: #1a9850;
  --ambra: #e6a817;
  --rosso: #d73027;
  --ok-bg: #dcfce7; --ok-fg: #166534;
  --vicina-bg: #ffedd5; --vicina-fg: #9a3412;
  --scaduta-bg: #fee2e2; --scaduta-fg: #991b1b;
  --barra: #8a8a93;
}

@media (prefers-color-scheme: dark) {
  :root {
    --targa-scuro: #1e3a8a;
    --bg: #18181b;
    --superficie: #27272a;
    --testo: #fafafa;
    --testo-tenue: #c4c4cc;
    --linea: #3f3f46;
    --link: #93b4fd;
    --ok-bg: #052e16; --ok-fg: #bbf7d0;
    --vicina-bg: #431407; --vicina-fg: #fed7aa;
    --scaduta-bg: #450a0a; --scaduta-fg: #fecaca;
    --barra: #71717a;
  }
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--testo);
  font: 400 1.125rem/1.55 "Barlow", system-ui, sans-serif;
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3 {
  font-family: "Barlow Semi Condensed", "Barlow", system-ui, sans-serif;
  font-weight: 700;
  line-height: 1.08;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(2.5rem, 6.4vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4.4vw, 3.1rem); }
h3 { font-size: 1.5rem; }
p { margin: 0; }
a { color: var(--link); text-underline-offset: 0.16em; }
:focus-visible { outline: 3px solid var(--ambra); outline-offset: 3px; border-radius: 2px; }

.guida { width: min(100% - 32px, 1120px); margin-inline: auto; }

/* Testata */
.testata { background: var(--targa-scuro); color: var(--su-targa); }
.testata .guida { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 14px; }
.marchio { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-weight: 600; }
.marchio img { width: 32px; height: 32px; border-radius: 8px; display: block; }
.testata a:not(.marchio) { color: inherit; }

/* Apertura: la targa è l'unico elemento grafico forte della pagina */
.apertura { background: var(--targa); color: var(--su-targa); padding-block: clamp(36px, 7vw, 80px) clamp(44px, 8vw, 96px); }
.targa {
  container-type: inline-size;
  display: grid;
  grid-template-columns: 8.5% 1fr 8.5%;
  background: #fbfbf8;
  border: 3px solid #101114;
  border-radius: clamp(8px, 1.4vw, 16px);
  overflow: hidden;
  box-shadow: 0 2px 0 #0d2a80, 0 18px 40px -22px #061a55;
  margin-bottom: clamp(32px, 6vw, 64px);
}
.targa-banda { background: #123eb8; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 6% 0; font-weight: 600; font-size: 3cqi; line-height: 1; }
.targa-banda svg { width: 66%; height: auto; display: block; }
.targa-scritta {
  color: #101114;
  font-family: "Barlow Semi Condensed", "Barlow", sans-serif;
  font-weight: 700;
  font-size: 10.6cqi;
  letter-spacing: 0.02em;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  padding-block: 0.34em 0.38em;
}
.apertura-testo { max-width: 46rem; }
.apertura-testo > p { margin-top: 20px; font-size: clamp(1.15rem, 2.2vw, 1.35rem); color: var(--su-targa-tenue); max-width: 40rem; }
.azioni { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 28px; }
.bottone { display: inline-block; background: #fff; color: #173ca8; font-weight: 600; text-decoration: none; padding: 13px 24px; border-radius: 8px; }
.bottone:hover { background: #dbe5ff; }
.azioni span { color: var(--su-targa-tenue); }

/* Funzioni: testo e oggetto affiancati, senza riquadri uguali */
.funzione { padding-block: clamp(56px, 8vw, 104px); }
.funzione + .funzione { padding-top: 0; }
.funzione .guida { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.funzione.invertita .testo { order: 2; }
.testo { max-width: 34rem; }
.testo p { margin-top: 16px; color: var(--testo-tenue); }
.esempio { font-size: 0.95rem; color: var(--testo-tenue); margin-top: 10px; }

/* Il cartello dei prezzi */
.oggetto { min-width: 0; }
.cartello { width: min(100%, 390px); margin-inline: auto; }
.cartello-corpo { background: var(--asfalto); color: var(--su-asfalto); border-radius: 12px 12px 4px 4px; padding: 20px; }
.cartello-corpo h3 { margin-bottom: 12px; font-size: 1.25rem; font-family: inherit; font-weight: 600; }
.cartello ul { list-style: none; margin: 0; padding: 0; }
.cartello li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-block: 10px; border-top: 1px solid #44464d; }
.cartello .prezzo { font-family: "Barlow Semi Condensed", sans-serif; font-weight: 700; font-size: 2.3rem; line-height: 1; font-variant-numeric: tabular-nums; }
.prezzo.basso { color: #5fdc92; }
.prezzo.medio { color: #f5c64a; }
.prezzo.alto { color: #ff8a80; }
.cartello small { display: block; margin-top: 8px; font-size: 0.95rem; color: var(--su-asfalto-tenue); }
.cartello-palo { width: 38px; height: 44px; margin-inline: auto; background: var(--asfalto); }

/* Le scadenze */
.scadenze { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--linea); }
.scadenze li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; padding-block: 18px; border-bottom: 1px solid var(--linea); }
.scadenze strong { font-weight: 600; font-size: 1.25rem; }
.stato { font-weight: 600; font-size: 1rem; padding: 4px 12px; border-radius: 999px; }
.stato.ok { background: var(--ok-bg); color: var(--ok-fg); }
.stato.vicina { background: var(--vicina-bg); color: var(--vicina-fg); }
.stato.scaduta { background: var(--scaduta-bg); color: var(--scaduta-fg); }

/* Il registro */
.costo { font-family: "Barlow Semi Condensed", sans-serif; font-weight: 700; font-size: clamp(3rem, 7vw, 4.6rem); line-height: 1; font-variant-numeric: tabular-nums; }
.costo-nota { color: var(--testo-tenue); margin-bottom: 24px; }
.barre { display: grid; grid-template-columns: repeat(12, 1fr); align-items: end; gap: 6px; height: 150px; padding: 0; margin: 0; list-style: none; border-bottom: 2px solid var(--linea); }
.barre li { background: var(--barra); border-radius: 3px 3px 0 0; }
.barre li:last-child { background: var(--targa); }

/* Privacy: la fascia d'asfalto */
.senza { background: var(--asfalto); color: var(--su-asfalto); padding-block: clamp(56px, 8vw, 96px); }
.senza h2 { max-width: 40rem; }
.senza ul { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 28px clamp(24px, 4vw, 56px); }
.senza h3 { margin-bottom: 6px; }
.senza li p { color: var(--su-asfalto-tenue); }
.senza a { color: #fff; }
.senza .chiusura { margin-top: 32px; }

/* Costi e domande */
.blocco { padding-block: clamp(56px, 8vw, 96px); }
.costi { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 32px clamp(32px, 6vw, 88px); margin-top: 32px; }
.costi h3 { margin-bottom: 10px; }
.costi ul { margin: 0; padding-left: 1.2em; color: var(--testo-tenue); }
.costi li + li { margin-top: 4px; }
.costi p { margin-top: 12px; color: var(--testo-tenue); }

.domande { background: var(--superficie); }
.domande .guida { max-width: 780px; }
.domande details { border-bottom: 1px solid var(--linea); }
.domande h2 { margin-bottom: 24px; }
.domande summary { cursor: pointer; font-weight: 600; font-size: 1.2rem; padding-block: 16px; }
.domande details p { padding-bottom: 18px; color: var(--testo-tenue); max-width: 68ch; }

/* Piede */
.piede { background: var(--targa-scuro); color: var(--su-targa-tenue); padding-block: 36px; font-size: 1rem; }
.piede a { color: #fff; }
.piede nav { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-bottom: 14px; }

/* Pagine di testo */
.documento { padding-block: clamp(40px, 6vw, 72px); }
.documento .guida { max-width: 720px; }
.documento h1 { font-size: clamp(2.3rem, 5vw, 3.4rem); }
.documento h2 { font-size: 1.7rem; margin-top: 40px; }
.documento p, .documento ul { margin-top: 12px; }
.documento ul { padding-left: 1.2em; }
.documento li + li { margin-top: 8px; }
.aggiornata { color: var(--testo-tenue); margin-top: 8px; }

@media (max-width: 760px) {
  body { font-size: 1.0625rem; }
  .funzione .guida { grid-template-columns: minmax(0, 1fr); }
  .funzione.invertita .testo { order: 0; }
}
