/* ==========================================================================
   age-gate.css — verifica dell'età mostrata all'apertura del sito
   Palette: bianco, giallo e beige (niente verde)
   ========================================================================== */

.age-gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.25rem, 4vw, 2.5rem);
  color: var(--black);
  background: #f3ecdd;
}

/* L'utente ha già confermato in questa sessione: la finestra non compare */
html.age-verified .age-gate {
  display: none;
}

/* Blocca lo scroll della pagina finché non si è confermata l'età */
html.age-gate-pending,
html.age-gate-pending body {
  overflow: hidden;
}

.age-gate-panel {
  width: min(100%, 560px);
  padding: clamp(2rem, 5vw, 3.5rem);
  text-align: center;
  background: var(--white);
  border: 1px solid rgba(0, 0, 0, .18);
  border-top: 6px solid #ffe233;
  box-shadow: 0 24px 60px rgba(80, 64, 30, .16);
  animation: age-gate-in .5s ease both;
}

@keyframes age-gate-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.age-gate-logo {
  width: clamp(110px, 22vw, 150px);
  margin: 0 auto 1.75rem;
}

/* Il logo originale è giallo: su fondo bianco lo rendiamo nero */
.age-gate-logo img {
  width: 100%;
  height: auto;
  filter: brightness(0);
}

.age-gate-title {
  margin: 0 0 1.25rem;
  color: var(--black);
  font-size: clamp(1.15rem, 2.6vw, 1.6rem);
  letter-spacing: .08em;
  line-height: 1.25;
}

.age-gate-text,
.age-gate-question {
  margin: 0 auto 1rem;
  max-width: 42ch;
  color: rgba(0, 0, 0, .78);
  font-size: clamp(.85rem, 1.5vw, .95rem);
  line-height: 1.6;
}

.age-gate-question {
  margin-bottom: 1.75rem;
}

.age-gate-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .75rem;
}

.age-gate-button {
  flex: 1 1 200px;
  min-height: 48px;
  padding: .85rem 1.25rem;
  font-family: var(--font-body);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.age-gate-button:focus-visible {
  outline: 2px solid var(--black);
  outline-offset: 3px;
}

.age-gate-yes {
  color: var(--black);
  background: #ffe233;
  border: 1px solid #ffe233;
}

.age-gate-yes:hover {
  background: #f2d21f;
  border-color: #f2d21f;
}

.age-gate-no {
  color: var(--black);
  background: var(--white);
  border: 1px solid rgba(0, 0, 0, .45);
}

.age-gate-no:hover {
  background: #f8f1e2;
  border-color: var(--black);
}

.age-gate-denied {
  margin: 1.25rem auto 0;
  max-width: 42ch;
  padding: .8rem 1rem;
  color: var(--black);
  background: rgba(255, 226, 51, .55);
  border-left: 4px solid #ffe233;
  text-align: left;
  font-size: .85rem;
  line-height: 1.55;
}

.age-gate-privacy {
  margin: 1.5rem 0 0;
  font-size: .75rem;
  letter-spacing: .06em;
}

.age-gate-privacy a {
  color: inherit;
  border-bottom: 1px solid rgba(0, 0, 0, .35);
  padding-bottom: .1rem;
  opacity: .7;
  transition: opacity .2s ease;
}

.age-gate-privacy a:hover {
  opacity: 1;
}

.age-gate-privacy a:focus-visible {
  outline: 2px solid var(--black);
  outline-offset: 3px;
  opacity: 1;
}

.age-gate-footnote {
  margin: 1.25rem 0 0;
  color: var(--black);
  font-size: .7rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  opacity: .55;
}

/* Uscita in dissolvenza dopo la conferma */
.age-gate--leaving {
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s ease, visibility .35s ease;
}

@media (max-width: 520px) {
  .age-gate-actions {
    flex-direction: column;
  }

  .age-gate-button {
    flex: 0 0 auto;
    width: 100%;
  }
}
