/* =============================================================
   STILE DEL SITO
   I colori del cliente sono subito qui sotto.
   Il resto di solito non va toccato.
   ============================================================= */

:root {
  /* --- Colori del cliente --- */
  --colore-principale: #000000;
  --colore-accento: #37e2fa;
  /* Testo sopra i colori del cliente: bianco o quasi nero, lo sceglie lo script */
  --testo-su-principale: #ffffff;
  --testo-su-accento: #1c1b1a;

  /* --- Colori neutri --- */
  --testo: #1c1b1a;
  --testo-tenue: #5c5752;
  --sfondo: #ffffff;
  --sfondo-alt: #f7f4f0;
  --bordo: #e6e1da;
  --bordo-campi: #938a80;
  --scuro: #1c1b1a;
  --verde-whatsapp: #137a4b;
  --rosso-errore: #b3261e;

  /* --- Caratteri: solo font di sistema (veloci e senza problemi di privacy) --- */
  --font-testo: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-titoli: Georgia, "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;

  /* --- Forme --- */
  --raggio: 14px;
  --ombra: 0 1px 2px rgb(28 27 26 / 0.05), 0 12px 32px rgb(28 27 26 / 0.08);
  --larghezza: 1120px;
  --altezza-testata: 4.25rem;
}

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

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--altezza-testata) + 1rem);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-testo);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--testo);
  background: var(--sfondo);
}

img,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

h1,
h2,
h3 {
  margin: 0 0 0.6em;
  font-family: var(--font-titoli);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.3rem, 4.5vw + 1rem, 4.2rem); }
h2 { font-size: clamp(1.8rem, 2vw + 1.1rem, 2.6rem); }
h3 { font-size: 1.3rem; }

p {
  margin: 0 0 1em;
}

a {
  color: inherit;
  text-decoration-color: var(--colore-accento);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-color: currentColor;
}

:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 3px;
}

/* ---------------------------------------------------------- utilità */

.contenitore {
  width: min(100% - 2rem, var(--larghezza));
  margin-inline: auto;
}

.visivamente-nascosto {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icona {
  flex: none;
  width: 1.25em;
  height: 1.25em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.salta {
  position: absolute;
  top: -4rem;
  left: 1rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  background: var(--scuro);
  color: #fff;
}

.salta:focus {
  top: 1rem;
}

/* ---------------------------------------------------------- bottoni */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.85rem 1.4rem;
  border: 2px solid transparent;
  border-radius: 999px;
  background: var(--colore-principale);
  color: var(--testo-su-principale);
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, transform 0.15s;
}

.btn:hover { background: color-mix(in srgb, var(--colore-principale) 82%, black); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.6; cursor: wait; }

.btn--grande { padding: 1rem 1.65rem; font-size: 1.05rem; }
.btn--piccolo { padding: 0.55rem 1.05rem; font-size: 0.95rem; white-space: nowrap; }

.btn--invertito { background: var(--testo-su-principale); color: var(--colore-principale); }
.btn--invertito:hover { background: color-mix(in srgb, var(--testo-su-principale) 88%, var(--colore-principale)); }

.btn--contorno { background: transparent; color: inherit; border-color: currentColor; }
.btn--contorno:hover { background: color-mix(in srgb, currentColor 10%, transparent); }

.btn--whatsapp { background: var(--verde-whatsapp); color: #fff; }
.btn--whatsapp:hover { background: color-mix(in srgb, var(--verde-whatsapp) 82%, black); }

.btn--accento { background: var(--colore-accento); color: var(--testo-su-accento); }
.btn--accento:hover { background: color-mix(in srgb, var(--colore-accento) 85%, black); }

/* ---------------------------------------------------------- testata e menu */

.testata {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(255 255 255 / 0.92);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--bordo);
}

.testata__riga {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--altezza-testata);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--testo);
  text-decoration: none;
}

.logo img {
  width: auto;
  height: 2.5rem;
}

.logo__segno {
  display: grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 10px;
  background: var(--colore-principale);
  color: var(--testo-su-principale);
  font-family: var(--font-titoli);
  font-size: 1.25rem;
  font-weight: 700;
}

.logo__nome {
  font-family: var(--font-titoli);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.1;
}

.menu-btn {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0 0.6rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--testo);
  cursor: pointer;
}

.menu-btn span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.2s, opacity 0.2s;
}

.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  display: none;
  flex-direction: column;
  padding: 0.5rem 1rem 1.25rem;
  background: var(--sfondo);
  border-bottom: 1px solid var(--bordo);
  box-shadow: var(--ombra);
}

.menu.aperto {
  display: flex;
}

.menu a {
  padding: 0.85rem 0.25rem;
  border-bottom: 1px solid var(--bordo);
  color: var(--testo);
  font-weight: 500;
  text-decoration: none;
}

.menu a:not(.btn):hover {
  text-decoration: underline;
  text-decoration-color: var(--colore-accento);
}

.menu a.btn {
  margin-top: 1rem;
  padding: 0.85rem 1.4rem;
  border: 2px solid transparent;
  color: var(--testo-su-principale);
  font-weight: 600;
}

/* ---------------------------------------------------------- apertura (hero) */

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(4.5rem, 12vw, 8.5rem) 0 clamp(4rem, 10vw, 7.5rem);
  background: linear-gradient(140deg, var(--colore-principale) 0%, color-mix(in srgb, var(--colore-principale) 72%, black) 100%);
  color: var(--testo-su-principale);
}

.hero::before {
  content: "";
  position: absolute;
  right: -12rem;
  bottom: -16rem;
  width: 38rem;
  height: 38rem;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--colore-accento) 45%, transparent) 0%, transparent 65%);
  pointer-events: none;
}

.hero--foto {
  background: linear-gradient(rgb(0 0 0 / 0.55), rgb(0 0 0 / 0.55)), url("../img/hero.jpg") center / cover no-repeat;
  color: #fff;
}

.hero--foto::before {
  display: none;
}

.hero__contenuto {
  position: relative;
  max-width: 46rem;
}

.hero__sopratitolo {
  display: inline-block;
  margin-bottom: 1.25rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: color-mix(in srgb, currentColor 14%, transparent);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  margin-bottom: 0.4em;
}

.hero__testo {
  max-width: 36rem;
  font-size: clamp(1.1rem, 0.6vw + 1rem, 1.3rem);
  opacity: 0.92;
}

.hero__azioni {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.25rem;
}

.hero__azioni .btn {
  flex: 1 1 14rem;
}

/* ---------------------------------------------------------- sezioni */

.sezione {
  padding: clamp(3.75rem, 9vw, 6.5rem) 0;
}

.sezione--alt {
  background: var(--sfondo-alt);
}

.titolo-sezione::after {
  content: "";
  display: block;
  width: 3.25rem;
  height: 4px;
  margin-top: 0.9rem;
  border-radius: 4px;
  background: var(--colore-accento);
}

.sezione__intro {
  max-width: 42rem;
  margin-bottom: 2.5rem;
  color: var(--testo-tenue);
  font-size: 1.1rem;
}

.due-colonne {
  display: grid;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}

.due-colonne--in-alto {
  align-items: start;
}

.griglia {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16.5rem), 1fr));
  gap: 1.25rem;
}

.scheda {
  position: relative;
  overflow: hidden;
  padding: 2rem 1.75rem 1.75rem;
  border: 1px solid var(--bordo);
  border-radius: var(--raggio);
  background: var(--sfondo);
  box-shadow: var(--ombra);
}

.scheda::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--colore-accento);
}

.scheda h3 {
  margin-bottom: 0.4rem;
}

.scheda p {
  margin: 0;
  color: var(--testo-tenue);
}

.scheda .scheda__prezzo {
  margin-top: 1rem;
  color: var(--testo);
  font-weight: 700;
}

.foto {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--raggio);
  box-shadow: var(--ombra);
}

/* ---------------------------------------------------------- recensioni */

.fascia {
  padding: 2.5rem 0;
  background: color-mix(in srgb, var(--colore-principale) 8%, var(--sfondo));
}

.fascia__riga {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.fascia p {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
  font-family: var(--font-titoli);
  font-size: clamp(1.25rem, 1vw + 1rem, 1.6rem);
  font-weight: 700;
}

.fascia p .icona {
  width: 1.6rem;
  height: 1.6rem;
  color: var(--colore-accento);
  fill: currentColor;
}

/* ---------------------------------------------------------- orari e indirizzo */

.orari {
  width: 100%;
  margin-bottom: 1rem;
  border-collapse: collapse;
}

.orari th,
.orari td {
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid var(--bordo);
  text-align: left;
}

.orari th {
  font-weight: 600;
}

.orari td {
  color: var(--testo-tenue);
  text-align: right;
}

.orari tr.oggi {
  background: color-mix(in srgb, var(--colore-accento) 16%, transparent);
}

.orari tr.oggi th,
.orari tr.oggi td {
  color: var(--testo);
  font-weight: 700;
}

.orari tr.oggi th::after {
  content: "oggi";
  margin-left: 0.5rem;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: var(--colore-accento);
  color: var(--testo-su-accento);
  font-size: 0.75rem;
  font-weight: 700;
  vertical-align: 0.1em;
}

.nota {
  color: var(--testo-tenue);
  font-size: 0.95rem;
}

.indirizzo {
  display: flex;
  gap: 0.75rem;
  font-size: 1.15rem;
  font-weight: 600;
}

.indirizzo .icona {
  margin-top: 0.25rem;
  color: var(--colore-principale);
}

/* ---------------------------------------------------------- contatti */

.contatti-lista {
  display: grid;
  gap: 1rem;
  margin: 1.75rem 0;
  padding: 0;
  list-style: none;
}

.contatti-lista li {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 1.1rem;
}

.contatti-lista .icona {
  width: 2.6rem;
  height: 2.6rem;
  padding: 0.65rem;
  border-radius: 50%;
  background: var(--sfondo);
  color: var(--colore-principale);
  box-shadow: var(--ombra);
}

.contatti-lista a {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.social:not(:has(a)) {
  display: none;
}

.copia {
  flex: none;
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--bordo-campi);
  border-radius: 999px;
  background: var(--sfondo);
  color: var(--testo);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.copia:hover {
  border-color: var(--colore-principale);
  color: var(--colore-principale);
}

.copia.copiato {
  border-color: var(--verde-whatsapp);
  color: var(--verde-whatsapp);
}

/* ---------------------------------------------------------- modulo contatti */

.modulo {
  display: grid;
  gap: 1.1rem;
  padding: clamp(1.5rem, 4vw, 2.25rem);
  border: 1px solid var(--bordo);
  border-radius: var(--raggio);
  background: var(--sfondo);
  box-shadow: var(--ombra);
}

.modulo h3 {
  margin: 0;
}

.modulo label {
  display: grid;
  gap: 0.4rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.facoltativo {
  color: var(--testo-tenue);
  font-weight: 400;
}

.modulo input,
.modulo textarea {
  width: 100%;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--bordo-campi);
  border-radius: 10px;
  background: #fff;
  color: var(--testo);
  font: inherit;
  font-weight: 400;
}

.modulo textarea {
  min-height: 8rem;
  resize: vertical;
}

.modulo input:focus-visible,
.modulo textarea:focus-visible {
  border-color: var(--colore-principale);
  outline: 3px solid color-mix(in srgb, var(--colore-principale) 40%, transparent);
  outline-offset: 1px;
}

.modulo .modulo__privacy {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-weight: 400;
}

.modulo .modulo__privacy input {
  flex: none;
  width: 1.2rem;
  height: 1.2rem;
  margin: 0.2rem 0 0;
  accent-color: var(--colore-principale);
}

.modulo button {
  justify-self: start;
}

.modulo__stato {
  min-height: 1.5em;
  margin: 0;
  font-weight: 600;
}

.modulo__stato.ok { color: var(--verde-whatsapp); }
.modulo__stato.errore { color: var(--rosso-errore); }

.modulo .trappola {
  display: none;
}

/* ---------------------------------------------------------- piè di pagina */

.piede {
  padding: 3.5rem 0 2rem;
  background: var(--scuro);
  color: #d8d2ca;
  font-size: 0.95rem;
}

.piede a {
  color: #fff;
}

.piede p {
  margin: 0;
}

.piede__griglia {
  display: grid;
  gap: 2rem;
}

.piede__nome {
  display: block;
  margin-bottom: 0.4rem;
  color: #fff;
  font-family: var(--font-titoli);
  font-size: 1.25rem;
}

.piede__link {
  display: grid;
  align-content: start;
  gap: 0.5rem;
}

.piede__fondo {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgb(255 255 255 / 0.12);
  color: #a59d94;
  font-size: 0.85rem;
}

.piede--semplice {
  padding: 1.75rem 0;
}

.piede--semplice .piede__fondo {
  margin: 0;
  padding: 0;
  border: 0;
}

/* ---------------------------------------------------------- barra contatti su smartphone */

.barra-mobile {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 40;
  display: grid;
  grid-auto-columns: 1fr;
  grid-auto-flow: column;
  padding-bottom: env(safe-area-inset-bottom, 0);
  border-top: 1px solid var(--bordo);
  background: var(--sfondo);
  box-shadow: 0 -6px 20px rgb(28 27 26 / 0.08);
}

.barra-mobile a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.6rem 0.25rem 0.55rem;
  color: var(--testo);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
}

.barra-mobile a + a {
  border-left: 1px solid var(--bordo);
}

.barra-mobile .icona {
  width: 1.4rem;
  height: 1.4rem;
  color: var(--colore-principale);
}

/* spazio in fondo per non coprire il footer con la barra */
.con-barra .piede {
  padding-bottom: 6.5rem;
}

/* ---------------------------------------------------------- pagine interne (privacy, 404) */

.pagina-testo {
  padding: clamp(3rem, 8vw, 5rem) 0;
}

.testo-lungo {
  max-width: 46rem;
}

.testo-lungo h1 {
  font-size: clamp(2rem, 3vw + 1rem, 3rem);
}

.testo-lungo h2 {
  margin-top: 2.25rem;
  font-size: 1.4rem;
}

.testo-lungo ul {
  padding-left: 1.25rem;
}

.testo-lungo li {
  margin-bottom: 0.5rem;
}

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

.pagina-errore {
  display: grid;
  place-items: center;
  min-height: 70vh;
  padding: 4rem 0;
  text-align: center;
}

.pagina-errore__codice {
  margin: 0 0 0.75rem;
  color: var(--colore-principale);
  font-family: var(--font-titoli);
  font-size: clamp(4rem, 12vw, 7rem);
  font-weight: 700;
  line-height: 1;
}

.pagina-errore__azioni {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2rem;
}

/* ---------------------------------------------------------- schermi grandi */

@media (min-width: 900px) {
  .menu-btn {
    display: none;
  }

  .menu {
    position: static;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1.75rem;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
  }

  .menu a {
    padding: 0.25rem 0;
    border: 0;
  }

  .menu a.btn {
    margin: 0;
    padding: 0.55rem 1.1rem;
  }

  .hero__azioni .btn {
    flex: 0 0 auto;
  }

  .due-colonne {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  /* se il modulo contatti non c'è, la colonna rimasta non resta a metà */
  .due-colonne:has(> :only-child) {
    grid-template-columns: minmax(0, 44rem);
  }

  .piede__griglia {
    grid-template-columns: 2fr 1fr 1fr;
  }

  .barra-mobile {
    display: none;
  }

  .con-barra .piede {
    padding-bottom: 2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
