/*
 * Sito pubblico unikoapp.it. Specifica: docs/sito.md. Grafica: docs/grafica.md (stessi colori,
 * stessi caratteri, stesso logo del programma). Disegno di riferimento: docs/grafica/Main.html.
 *
 * REGOLA: i colori si scrivono SOLO nel blocco :root qui sotto (un test lo controlla).
 * Niente JavaScript, niente risorse esterne, niente stili in linea (la CSP del sito li vieta).
 */

/* ===== Variabili ===== */
:root {
  --antracite: #383E42; /* RAL 7016 */
  --testo-su-scuro: #D3D7DA;
  --bianco: #FFFFFF;

  --inchiostro: #1F2427;
  --testo-secondario: #474D51;
  --testo-tenue: #596065;

  --arancio: #BD5418;
  --arancio-scuro: #8E3F12;
  --arancio-chiaro: #FBE9DC;

  --fondo: #F5F5F4;
  --carta: #FFFFFF;
  --bordo: #E3E5E6;
  --bordo-campo: #D2D5D7;
  --tratteggio-disegno: #A3A9AD; /* diagonali del disegno della finestra */
  --ombra-scheda: rgba(31, 36, 39, 0.25);

  --ambra-chiaro: #FCEFD9;
  --ambra-scuro: #7A4208;

  --larghezza-massima: 1200px;
}

/* ===== 2. Caratteri (serviti da static/fonts/, nessun dominio esterno) ===== */
/* Sora: titoli e numeri importanti */
@font-face {
  font-family: "Sora";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/sora-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Sora";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/sora-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Sora";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/sora-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Sora";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/sora-latin-ext-700-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Plus Jakarta Sans: tutto il resto */
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/plus-jakarta-sans-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/plus-jakarta-sans-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/plus-jakarta-sans-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/plus-jakarta-sans-latin-ext-500-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/plus-jakarta-sans-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/plus-jakarta-sans-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/plus-jakarta-sans-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/plus-jakarta-sans-latin-ext-700-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ===== Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--fondo);
  color: var(--inchiostro);
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}
h1, h2, h3, p { margin: 0; }
main { flex: 1 0 auto; }
a { color: var(--arancio-scuro); }
a:hover { color: var(--arancio); }
a:focus-visible, .pulsante:focus-visible {
  outline: 3px solid var(--arancio-scuro);
  outline-offset: 3px;
  border-radius: 6px;
}
.fascia-scura a:focus-visible, .pannello-arancio a:focus-visible {
  outline-color: var(--bianco);
}
.contenitore {
  max-width: var(--larghezza-massima);
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}
.salta-al-contenuto {
  position: absolute;
  left: 16px;
  top: -64px;
  padding: 10px 16px;
  background: var(--antracite);
  color: var(--bianco);
  border-radius: 8px;
  z-index: 10;
}
.salta-al-contenuto:focus { top: 12px; color: var(--bianco); }

/* ===== Testata ===== */
.testata { background: var(--carta); border-bottom: 1px solid var(--bordo); }
.testata .contenitore {
  padding-top: 16px;
  padding-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--inchiostro);
}
.logo:hover { color: var(--inchiostro); }
.logo-disegno { stroke: var(--arancio); }
.logo-parola {
  font-family: Sora, sans-serif;
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.5px;
}
.menu {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 28px;
  font-weight: 500;
  font-size: 15px;
}
.menu a { color: var(--inchiostro); text-decoration: none; }
.menu a:hover { color: var(--arancio-scuro); text-decoration: underline; }
.menu a.pulsante { color: var(--bianco); text-decoration: none; }

/* ===== Pulsanti ===== */
.pulsante {
  display: inline-block;
  text-decoration: none;
  font-weight: 600;
  border-radius: 10px;
  padding: 12px 20px;
  background: var(--arancio);
  color: var(--bianco);
}
.pulsante:hover, .menu a.pulsante:hover { background: var(--arancio-scuro); color: var(--bianco); text-decoration: none; }
.pulsante-grande { padding: 16px 26px; border-radius: 12px; font-size: 16px; }
.pulsante-bianco {
  background: var(--carta);
  color: var(--inchiostro);
  border: 1px solid var(--bordo-campo);
}
.pulsante-bianco:hover { background: var(--fondo); color: var(--inchiostro); }

/* ===== Parte alta ===== */
.parte-alta {
  padding-top: 88px;
  padding-bottom: 72px;
  display: flex;
  flex-wrap: wrap;
  gap: 56px;
  align-items: center;
}
.parte-alta-testo {
  flex: 1 1 480px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.pillola {
  align-self: flex-start;
  background: var(--arancio-chiaro);
  color: var(--arancio-scuro);
  font-weight: 600;
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 999px;
}
.pillola-ambra {
  font-size: 12px;
  background: var(--ambra-chiaro);
  color: var(--ambra-scuro);
  padding: 3px 8px;
  vertical-align: middle;
}
.pillola-piccola { font-size: 13px; padding: 4px 10px; }
h1, h2, h3 { font-family: Sora, sans-serif; }
h1 {
  font-size: 52px;
  line-height: 1.08;
  letter-spacing: -1.5px;
  font-weight: 700;
}
.introduzione { font-size: 19px; line-height: 1.6; color: var(--testo-secondario); }
.azioni { display: flex; flex-wrap: wrap; gap: 12px; }

/* ===== Esempio di preventivo (in HTML e CSS, non un'immagine) ===== */
.preventivo {
  flex: 1 1 440px;
  min-width: 0;
  margin: 0;
  background: var(--carta);
  border: 1px solid var(--bordo);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 24px 48px -24px var(--ombra-scheda);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.preventivo-testa {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.preventivo-titolo { display: flex; flex-direction: column; gap: 2px; }
.preventivo-numero { font-size: 13px; color: var(--testo-tenue); }
.preventivo-cliente { font-family: Sora, sans-serif; font-weight: 600; font-size: 18px; }
.posizione {
  display: flex;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--bordo);
  border-radius: 14px;
  align-items: flex-start;
}
.finestra { flex: none; }
.finestra .telaio { stroke: var(--inchiostro); }
.finestra .diagonale { stroke: var(--tratteggio-disegno); }
.posizione-righe {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
}
.posizione-nome { font-weight: 600; }
.riga { display: flex; justify-content: space-between; gap: 8px; }
.riga .importo { font-weight: 600; white-space: nowrap; }
.riga-opzionale { color: var(--testo-tenue); font-style: italic; }
.riga-opzionale .importo { font-weight: 400; }
.preventivo-totale {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding-top: 4px;
  border-top: 1px dashed var(--bordo-campo);
}
.preventivo-totale-etichetta { color: var(--testo-tenue); font-size: 14px; }
.preventivo-totale-importo { font-family: Sora, sans-serif; font-weight: 700; font-size: 26px; }

/* ===== Fascia scura ===== */
.fascia-scura { background: var(--antracite); color: var(--bianco); }
.fascia-scura .contenitore {
  padding-top: 56px;
  padding-bottom: 56px;
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  align-items: center;
  justify-content: space-between;
}
.fascia-scura .problema {
  font-family: Sora, sans-serif;
  font-size: 28px;
  line-height: 1.3;
  font-weight: 600;
  flex: 1 1 520px;
}
.fascia-scura .risposta {
  font-size: 17px;
  line-height: 1.6;
  color: var(--testo-su-scuro);
  flex: 1 1 360px;
}

/* ===== Sezioni ===== */
.sezione {
  padding-top: 88px;
  padding-bottom: 88px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.sezione-testa { display: flex; flex-direction: column; gap: 12px; max-width: 720px; }
h2 { font-size: 38px; line-height: 1.2; letter-spacing: -0.8px; font-weight: 700; }
.sezione-testa p, .per-chi-testo p { font-size: 18px; color: var(--testo-secondario); line-height: 1.6; }
.passi {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 24px;
}
.passo {
  background: var(--carta);
  border: 1px solid var(--bordo);
  border-radius: 18px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.passo-numero { font-family: Sora, sans-serif; font-weight: 700; font-size: 15px; color: var(--arancio-scuro); }
h3 { font-size: 21px; line-height: 1.3; font-weight: 600; }
.passo p, .funzione p { color: var(--testo-secondario); line-height: 1.6; }

.sezione#prodotti { padding-bottom: 0; }
.schede-prodotti {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}
.scheda-prodotti {
  background: var(--carta);
  border: 1px solid var(--bordo);
  border-radius: 18px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.etichette { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.etichette li {
  background: var(--carta);
  border: 1px solid var(--bordo-campo);
  color: var(--inchiostro);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  padding: 6px 12px;
  border-radius: 999px;
}

.funzioni {
  background: var(--carta);
  border-top: 1px solid var(--bordo);
  border-bottom: 1px solid var(--bordo);
}
.funzioni-elenco {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 28px 40px;
}
.funzione { display: flex; flex-direction: column; gap: 8px; }
.funzione h3 { font-size: 18px; }

.per-chi {
  padding-top: 88px;
  padding-bottom: 88px;
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  align-items: center;
}
.per-chi-testo { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.pannello-arancio {
  flex: 1 1 380px;
  min-width: 0;
  background: var(--arancio);
  color: var(--bianco);
  border-radius: 20px;
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.pannello-arancio h3 { font-size: 26px; line-height: 1.25; font-weight: 700; }
.pannello-arancio p { line-height: 1.6; color: var(--bianco); }
.pulsante-su-arancio {
  text-decoration: none;
  align-self: flex-start;
  background: var(--bianco);
  color: var(--arancio-scuro);
  padding: 14px 22px;
  border-radius: 12px;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.pulsante-su-arancio:hover { background: var(--arancio-chiaro); color: var(--arancio-scuro); }

/* ===== Piè di pagina ===== */
.piede { background: var(--antracite); color: var(--testo-su-scuro); }
.piede .contenitore {
  padding-top: 40px;
  padding-bottom: 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  justify-content: space-between;
  font-size: 14px;
  line-height: 1.6;
}
.piede nav { display: flex; gap: 20px; }
.piede a { color: var(--bianco); }
.piede a:hover { color: var(--arancio-chiaro); }

/* ===== Pagine di testo (privacy, cookie) e pagina 404 ===== */
.testo-legale {
  max-width: 780px;
  padding-top: 64px;
  padding-bottom: 88px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.testo-legale h1 { font-size: 40px; letter-spacing: -1px; }
.testo-legale p { line-height: 1.7; color: var(--testo-secondario); }
.testo-legale strong { color: var(--inchiostro); }
.testo-legale .data { font-size: 14px; color: var(--testo-tenue); }
.testo-legale a { color: var(--arancio-scuro); }
.non-trovata {
  padding-top: 112px;
  padding-bottom: 120px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}
.non-trovata .codice {
  font-family: Sora, sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--arancio-scuro);
}
.non-trovata p { font-size: 18px; color: var(--testo-secondario); max-width: 560px; line-height: 1.6; }
.non-trovata h1 { font-size: 44px; }

/* ===== Schermi stretti ===== */
@media (max-width: 900px) {
  .parte-alta { padding-top: 56px; padding-bottom: 48px; gap: 40px; }
  .sezione, .per-chi { padding-top: 56px; padding-bottom: 56px; }
  h1 { font-size: 42px; letter-spacing: -1.2px; }
  h2 { font-size: 32px; }
  .fascia-scura .problema { font-size: 24px; }
}
@media (max-width: 700px) {
  .schede-prodotti { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  /* il menu si riduce al solo pulsante «Richiedi la prova» */
  .menu a:not(.pulsante) { display: none; }
  .contenitore { padding-left: 16px; padding-right: 16px; }
  h1 { font-size: 34px; letter-spacing: -0.8px; }
  h2 { font-size: 28px; letter-spacing: -0.5px; }
  .introduzione { font-size: 17px; }
  .preventivo { padding: 16px; }
  .posizione { flex-direction: column; }
  .preventivo-totale-importo { font-size: 22px; }
  .fascia-scura .contenitore { padding-top: 40px; padding-bottom: 40px; }
  .fascia-scura .problema { font-size: 21px; }
  .passo, .scheda-prodotti { padding: 22px; }
  .pannello-arancio { padding: 26px; }
  .testo-legale { padding-top: 40px; padding-bottom: 56px; }
  .testo-legale h1 { font-size: 32px; }
  .non-trovata { padding-top: 64px; padding-bottom: 72px; }
  .non-trovata h1 { font-size: 32px; }
  .piede .contenitore { padding-top: 32px; padding-bottom: 32px; }
}
