/* ==========================================================================
   NALOFIT — foglio di stile unico.
   Colori campionati dall'immagine di riferimento nalofit.png, carattere Inter.
   ========================================================================== */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/inter-var.woff2') format('woff2');
}

/* --- Variabili: i valori esatti dell'immagine ------------------------------ */
:root {
  --sfondo: #111b19;
  --scheda: #26352e;
  --riga: #45534c;
  --bianco: #ffffff;
  --salvia: #a5c9ae;
  --testo: #d0d9d3;
  --pillola: #163322;
  --verde: #06b84c;

  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --pad: 21px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  background: var(--sfondo);
}

body {
  margin: 0;
  background: var(--sfondo);
  color: var(--bianco);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;

  /* Logo, slogan e card al centro della finestra, anche in verticale. */
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: calc(var(--banner-h, 0px) + var(--pad)) 0 var(--pad);
}

h1, h2, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, select { font: inherit; color: inherit; }

::selection { background: var(--bianco); color: var(--sfondo); }

/* Nessun effetto al passaggio del mouse su link e menu: e' una regola del
   marchio, non una dimenticanza. */

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: -9999px;
  z-index: 100;
}
.skip:focus {
  left: 16px; top: 16px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--bianco);
  color: var(--sfondo);
}

/* --- Barra in cima -------------------------------------------------------- */
.nav__inner {
  display: flex;
  justify-content: center;
  padding: 0 var(--pad);
}

.brand {
  display: block;
  flex: 0 0 auto;
}
/* Largo quanto la riga dello slogan. */
.brand svg {
  width: 248px;
  height: auto;
}

/* Le bandiere restano nell'angolo in alto a destra della pagina. */
.nav__right {
  position: absolute;
  top: calc(var(--banner-h, 0px) + var(--pad));
  right: var(--pad);
  z-index: 50;
}

/* --- La pagina ------------------------------------------------------------ */
main {
  padding: 36px var(--pad) 0;
}

.slogan {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-align: center;
}

/* Le card: tre per riga, in un blocco stretto al centro della pagina. */
.schede {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-width: 600px;
  margin: 36px auto 0;
}

.scheda {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 72px;
  padding: 8px;
  border-radius: 10px;
  background: var(--scheda);
  text-align: center;
}

.scheda__titolo {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
}
@media (min-width: 560px) {
  .scheda__titolo { font-size: 14px; }
}

/* --- Banner di scelta della lingua ---------------------------------------- */
.lang-banner {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  border-bottom: 1px solid var(--riga);
  background: var(--scheda);
}
.lang-banner[hidden] { display: none; }

.lang-banner__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 20px;
}
.lang-banner__text { font-size: 14px; color: var(--testo); }
.lang-banner__actions { display: flex; align-items: center; gap: 10px; }

.lang-banner__cta {
  height: 34px;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--sfondo);
  background: var(--bianco);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}
.lang-banner__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  color: var(--salvia);
  background: none;
  border: 0;
  cursor: pointer;
}
.lang-banner__close svg { width: 16px; height: 16px; }

.lang-field { position: relative; display: inline-flex; }
.lang-field__select {
  height: 34px;
  padding: 0 32px 0 12px;
  font-size: 14px;
  color: var(--bianco);
  background: var(--sfondo);
  border: 1px solid var(--riga);
  border-radius: 999px;
  appearance: none;
}
.lang-field__select option { color: #000; }
.lang-field__chevron {
  position: absolute;
  top: 50%;
  right: 10px;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  color: var(--salvia);
  pointer-events: none;
}
.lang-field__chevron svg { width: 100%; height: 100%; }

/* --- Selettore lingua ------------------------------------------------------ */
.lang-switch { position: relative; }

.lang-switch__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  background: none;
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.lang-switch__chevron { width: 16px; height: 16px; transition: transform 0.2s; }
.lang-switch__chevron svg { width: 100%; height: 100%; }
.lang-switch__btn[aria-expanded='true'] .lang-switch__chevron { transform: rotate(180deg); }

.lang-flag {
  display: block;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  overflow: hidden;
}
.lang-flag svg { width: 100%; height: 100%; }

.lang-menu {
  position: absolute;
  top: calc(100% + 7px);
  left: 0;
  z-index: 20;
  display: grid;
  gap: 11px;
}
.lang-menu[hidden] { display: none; }
