/* Ubisia · sito di presentazione — vedi «Note al foglio di stile» in README.md
   (le sezioni là hanno gli stessi nomi dei separatori qui sotto). */

/* ---- caratteri ---------------------------------------------------------- */

@font-face {
  font-family: 'Space Grotesk';
  src: url('font/SpaceGrotesk.woff2') format('woff2-variations');
  font-weight: 300 700;
  font-display: swap;
}

@font-face {
  font-family: 'Hanken Grotesk';
  src: url('font/HankenGrotesk.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: 'Space Mono';
  src: url('font/SpaceMono-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

/* ---- palette ------------------------------------------------------------ */

:root {
  --sfondo:       #F6F5F1;
  --pannello:     #EEEDE7;
  --scheda:       #FFFFFF;
  --testo:        #101F1E;
  --testo-tenue:  #5A6360;
  --azione:       #1E7A85;
  --bordo:        #E2E0D8;
  --menta:        #37B58C;
  --menta-testo:  #1F8A66;

  --marchio-punto: #1E7A85;

  --colonna: 46rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --sfondo:      #101F1E;
    --pannello:    #16292A;
    --scheda:      #22383A;
    --testo:       #F6F5F1;
    --testo-tenue: #7FA6A2;
    --azione:      #2E96A3;
    --bordo:       #2A3E3C;
    --menta-testo: #37B58C;

    --marchio-punto: #37B58C;
  }
}

/* ---- base --------------------------------------------------------------- */

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

body {
  margin: 0;
  background: var(--sfondo);
  color: var(--testo);
  font-family: 'Hanken Grotesk', system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;

  text-align: center;

  padding: clamp(2rem, 7vw, 5.5rem) clamp(1.5rem, 6vw, 3rem);
  max-width: calc(var(--colonna) + 6rem);
  margin-inline: auto;
}

a {
  color: var(--azione);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.salta {
  position: absolute;
  left: -9999px;
}
.salta:focus {
  left: 1rem;
  top: 1rem;
  background: var(--scheda);
  padding: 0.6rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--bordo);
}

:focus-visible {
  outline: 2px solid var(--azione);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---- marchio ------------------------------------------------------------ */

.marchio {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.025em;
  margin: 0;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 600;
  font-size: clamp(3.5rem, 10vw, 4.5rem);
  letter-spacing: -0.03em;
  line-height: 1;
}

.marchio__segno {
  height: 0.725em;
  width: 0.699em;
  color: var(--testo);
  flex: none;
}

.marchio__punto { fill: var(--marchio-punto); }

.testata { margin-bottom: clamp(3rem, 10vw, 6rem); }

/* ---- apertura ----------------------------------------------------------- */

h1 {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 500;
  font-size: clamp(2.1rem, 6.4vw, 3.4rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 auto 1.25rem;
  max-width: 18ch;
  text-wrap: balance;
}

.apertura__sotto {
  margin: 0 auto;
  max-width: 42ch;
  font-size: 1.1875rem;
  color: var(--testo-tenue);
}

/* ---- i tre passi -------------------------------------------------------- */

.passi {
  margin-top: clamp(3rem, 9vw, 5.5rem);
  border-top: 1px solid var(--bordo);
}

.passi ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}

.passi li {
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--bordo);
}

.passi h2 {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 500;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  margin: 0 0 0.3rem;
}

.passi p {
  margin: 0 auto;
  color: var(--testo-tenue);
  max-width: 48ch;
}

@media (min-width: 46rem) {
  .passi ol {
    grid-template-columns: repeat(3, 1fr);
    gap: 0 2.5rem;
  }
  .passi li { padding: 2rem 0 2.25rem; }
}

/* ---- il campione d'archivio --------------------------------------------- */

.campione {
  margin-top: clamp(3rem, 9vw, 5rem);
  background: var(--pannello);
  border: 1px solid var(--bordo);
  border-radius: 16px;
  padding: clamp(1.5rem, 4vw, 2.25rem);
}

.campione__domanda {
  margin: 0 0 1.25rem;
  font-size: 1.1875rem;
  color: var(--testo-tenue);
}

.campione__esito {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 0.85rem;
}

.campione__nome {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 500;
  font-size: 1.25rem;
}

.campione__dove {
  color: var(--testo-tenue);
}

.campione__codice {
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 0.9375rem;
  letter-spacing: 0.02em;
  color: var(--menta-testo);
  border: 1px solid var(--bordo);
  background: var(--scheda);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  white-space: nowrap;
}

/* ---- le schermate dell'app ---------------------------------------------- */

.schermate {
  margin-top: clamp(3.5rem, 10vw, 6rem);
}

.schermate h2 {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 500;
  font-size: 1.5rem;
  letter-spacing: -0.015em;
  margin: 0 0 0.3rem;
}

.schermate__nota {
  margin: 0 0 2rem;
  color: var(--testo-tenue);
}

.schermate__fila {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

@media (min-width: 62rem) {
  .schermate__fila {
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    width: min(62rem, calc(100vw - 3rem));
  }
}

.schermate__fila img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--bordo);
  border-radius: 22px;
}

.schermate__fila p {
  margin: 0.9rem 0 0;
  color: var(--testo-tenue);
  font-size: 1rem;
}

@media (max-width: 46rem) {
  .schermate__fila {
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin-inline: calc(clamp(1.5rem, 6vw, 3rem) * -1);
    padding-inline: clamp(1.5rem, 6vw, 3rem);
    padding-bottom: 0.5rem;
    scrollbar-width: thin;
  }

  .schermate__fila li {
    flex: 0 0 72%;
    scroll-snap-align: start;
  }
}

/* ---- la chiusura -------------------------------------------------------- */

.chiusura {
  margin-top: clamp(4rem, 12vw, 7rem);
  padding-top: 1.75rem;
  border-top: 1px solid var(--bordo);
}

.chiusura__tagline {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 500;
  font-size: 1.125rem;
  margin: 0 0 0.35rem;
}

.chiusura__nome {
  margin: 0;
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  color: var(--testo-tenue);
}

.chiusura__societa {
  margin: 1.75rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--bordo);
  color: var(--testo-tenue);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.chiusura__societa strong {
  font-weight: 600;
  color: var(--testo);
}

.chiusura__piva {
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 0.875rem;
  white-space: nowrap;
}

.chiusura__contatto {
  margin: 1rem 0 0;
  color: var(--testo-tenue);
  font-size: 0.9375rem;
}

.chiusura__contatto a {
  color: var(--azione);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
