/* ==========================================================================
   Albese Wash — sito
   Palette dal marchio: inchiostro, acqua, foglia. L'ambra non compare qui:
   sul sito non c'è nulla da segnalare, e sarebbe rumore.
   ========================================================================== */

@font-face {
  font-family: 'Jost';
  src: url('/assets/font/jost-var-latin.woff2') format('woff2-variations');
  font-weight: 300 500;
  font-display: swap;
  font-style: normal;
}

@font-face {
  font-family: 'Schibsted Grotesk';
  src: url('/assets/font/schibsted-grotesk-var-latin.woff2') format('woff2-variations');
  font-weight: 400 700;
  font-display: swap;
  font-style: normal;
}

:root {
  --ink: #0d0d0d;
  --acqua: #5baeda;
  --acqua-fonda: #2e93c4;
  /* I collegamenti nel testo hanno bisogno di 4,5:1: l'azzurro fondo
     si ferma a 3,45:1 su bianco. Questo arriva a 5,6:1. */
  --collegamento: #1b6f97;
  --foglia: #57b947;
  --foglia-fonda: #3d8f30;

  --fondo: #f5f6f7;
  --carta: #ffffff;
  --linea: #dee2e6;
  --testo: #14181c;
  --testo-tenue: #59626c; /* 6,1:1 sul fondo chiaro */

  --scuro: #0d0d0d;
  --scuro-testo: #f4f6f8;
  --scuro-tenue: #9aa3ad; /* 6,7:1 sul nero */
  --scuro-linea: #262b31;

  --display: 'Jost', 'Futura', 'Century Gothic', sans-serif;
  --testo-font: 'Schibsted Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --ombra: 0 1px 2px rgb(13 13 13 / 0.05), 0 8px 24px -12px rgb(13 13 13 / 0.18);
  --ombra-alta: 0 2px 4px -1px rgb(13 13 13 / 0.08), 0 14px 32px -10px rgb(13 13 13 / 0.22);

  --colonna: 68rem;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--fondo);
  color: var(--testo);
  font-family: var(--testo-font);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

/* Le superfici che non ho disegnato io portano comunque il marchio. */
::selection {
  background: #cfe8f5;
  color: var(--ink);
}

:where(a, button):focus-visible {
  outline: 2px solid var(--acqua-fonda);
  outline-offset: 3px;
  border-radius: 6px;
}

.salta {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--ink);
  color: #fff;
  border-radius: 0 0 10px 0;
}
.salta:focus {
  left: 0;
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: -0.02em;
  text-wrap: balance;
  margin: 0;
}

p {
  margin: 0;
  text-wrap: pretty;
}

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

.marchio {
  display: inline-block;
  width: 3.9rem;
  height: 2.75rem;
  background: url('/assets/marchio-chiaro.png') center / contain no-repeat;
  flex-shrink: 0;
}

.apertura .marchio,
.chiusura .marchio,
.testata .marchio {
  background-image: url('/assets/marchio-scuro.png');
}

/* --- testata --------------------------------------------------------- */

.testata {
  color: var(--scuro-testo);
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.75rem clamp(1rem, 4vw, 2.5rem);
  background: var(--scuro);
  border-bottom: 1px solid var(--scuro-linea);
}

.testata .marchio {
  width: 2.9rem;
  height: 2.05rem;
}

.testata nav {
  display: flex;
  gap: clamp(0.75rem, 3vw, 2rem);
}

.testata a {
  color: var(--scuro-tenue);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 0.5rem 0;
  transition: color 0.15s ease;
}

.testata a:hover {
  color: #fff;
}

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

.apertura {
  background: var(--scuro);
  color: var(--scuro-testo);
  padding: clamp(3rem, 9vw, 6.5rem) clamp(1rem, 4vw, 2.5rem) clamp(3.5rem, 8vw, 5.5rem);
}

.apertura-testo {
  max-width: var(--colonna);
  margin-inline: auto;
}

.apertura h1 {
  font-size: clamp(2.5rem, 8vw, 5.25rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 300;
  /* L'unico momento animato: il titolo che si posa all'apertura. */
  animation: posa 900ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.apertura h1 em {
  font-style: normal;
  color: var(--acqua);
}

.introduzione {
  margin-top: 1.5rem;
  max-width: 34rem; /* misura di lettura, circa 70 caratteri */
  font-size: clamp(1.0625rem, 2.2vw, 1.25rem);
  color: var(--scuro-tenue);
  animation: posa 900ms 120ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes posa {
  from {
    opacity: 0;
    transform: translateY(14px);
    filter: blur(8px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: blur(0);
  }
}

/* --- stato aperto/chiuso --------------------------------------------- */

.stati {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  margin-top: 2.25rem;
}

/* Larghezza prevedibile fin dal primo disegno: il testo dello stato cambia
   lunghezza a ogni ora del giorno, e senza una base fissa la riga andrebbe
   a capo in modo diverso spostando tutta la pagina. */
.stato {
  flex: 1 1 19rem;
  max-width: 26rem;
}

.stato {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.6rem 1rem 0.6rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--scuro-linea);
  background: #14181c;
  font-size: 0.9375rem;
}

.stato-nome {
  font-weight: 600;
  color: var(--scuro-testo);
}

.stato-esito {
  color: var(--scuro-tenue);
}

.pallino {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--scuro-tenue);
  flex-shrink: 0;
}

.stato.aperto {
  border-color: color-mix(in srgb, var(--foglia) 45%, transparent);
}
.stato.aperto .pallino {
  background: var(--foglia);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--foglia) 22%, transparent);
}
.stato.aperto .stato-esito {
  color: var(--foglia);
}

.stato.chiuso .pallino {
  background: #6b737c;
}

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

.azioni {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.bottone {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0 1.35rem;
  border-radius: 12px;
  font-family: var(--display);
  font-size: 1.0625rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid var(--scuro-linea);
  background: transparent;
  color: var(--scuro-testo);
  transition:
    transform 0.15s ease,
    background-color 0.15s ease,
    border-color 0.15s ease;
}

.bottone:hover {
  background: #1a1f25;
  border-color: #39414a;
}

.bottone:active {
  transform: scale(0.985);
}

.bottone.primario {
  background: var(--acqua);
  border-color: var(--acqua);
  color: #04141c;
  box-shadow: var(--ombra-alta);
}

.bottone.primario:hover {
  background: #7cc0e4;
  border-color: #7cc0e4;
}

.bottone .numero {
  font-variant-numeric: tabular-nums;
  opacity: 0.75;
}

/* Nelle sezioni chiare i bottoni cambiano abito. */
.dove .bottone {
  border-color: var(--linea);
  background: var(--carta);
  color: var(--testo);
  box-shadow: var(--ombra);
}
.dove .bottone:hover {
  background: #f0f3f5;
  border-color: #c3cad1;
}
.dove .bottone.primario {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.dove .bottone.primario:hover {
  background: #262c33;
  border-color: #262c33;
}

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

main > section:not(.apertura) {
  padding: clamp(3.25rem, 8vw, 5.5rem) clamp(1rem, 4vw, 2.5rem);
}

main > section:not(.apertura) > * {
  max-width: var(--colonna);
  margin-inline: auto;
}

h2 {
  font-size: clamp(1.75rem, 4.5vw, 2.75rem);
  font-weight: 300;
  letter-spacing: -0.03em;
}

/* Più aria sopra un titolo che sotto: è il titolo a raccogliere ciò che segue. */
h2 + * {
  margin-top: 1.25rem;
}

/* --- servizi --------------------------------------------------------- */

.principale {
  margin-top: 2rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border-radius: 20px;
  background: var(--ink);
  color: var(--scuro-testo);
  box-shadow: var(--ombra-alta);
}

.principale h3 {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 400;
  color: #fff;
}

.principale p {
  margin-top: 0.875rem;
  max-width: 44rem;
  color: var(--scuro-tenue);
}

.principale strong {
  color: var(--acqua);
  font-weight: 600;
}

.elenco-servizi {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  border-top: 1px solid var(--linea);
}

.elenco-servizi li {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--linea);
  display: grid;
  gap: 0.35rem 2.5rem;
}

@media (min-width: 44rem) {
  .elenco-servizi li {
    grid-template-columns: 18rem 1fr;
    align-items: baseline;
  }
}

.elenco-servizi h3 {
  font-size: 1.3125rem;
  font-weight: 400;
}

.elenco-servizi p {
  color: var(--testo-tenue);
  max-width: 40rem;
}

.aziende {
  margin-top: 2.5rem;
  padding: 1.25rem 1.5rem;
  border-radius: 14px;
  background: color-mix(in srgb, var(--foglia) 10%, var(--carta));
  border: 1px solid color-mix(in srgb, var(--foglia) 32%, transparent);
  max-width: 46rem;
}

.aziende strong {
  display: block;
  font-family: var(--display);
  font-size: 1.125rem;
  font-weight: 500;
  margin-bottom: 0.15rem;
}

/* --- orari ----------------------------------------------------------- */

.orari {
  background: var(--carta);
  border-block: 1px solid var(--linea);
}

.nota-orari {
  color: var(--testo-tenue);
  max-width: 40rem;
}

.tabelle {
  display: grid;
  gap: 1.25rem;
  margin-top: 2rem;
}

@media (min-width: 40rem) {
  .tabelle {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

table {
  width: 100%;
  border-collapse: collapse;
}

caption {
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 500;
  text-align: left;
  padding-bottom: 0.85rem;
  color: var(--testo);
}

tbody tr {
  border-top: 1px solid var(--linea);
}

th,
td {
  padding: 0.7rem 0;
  text-align: left;
  font-weight: 400;
  vertical-align: top;
}

th {
  color: var(--testo-tenue);
  font-weight: 500;
}

td {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

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

.avviso-ferie {
  margin-top: 2rem;
  font-size: 0.9375rem;
  color: var(--testo-tenue);
  max-width: 42rem;
}

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

.apertura a,
.chiusura p a {
  color: inherit;
}

/* --- recensione ------------------------------------------------------ */

.voce {
  text-align: center;
}

blockquote {
  margin: 0;
  max-width: 40rem;
  margin-inline: auto;
}

blockquote p {
  font-family: var(--display);
  font-size: clamp(1.375rem, 3.5vw, 2rem);
  font-weight: 300;
  line-height: 1.35;
  letter-spacing: -0.025em;
}

blockquote p::before {
  content: '«';
}
blockquote p::after {
  content: '»';
}

blockquote footer {
  margin-top: 1.25rem;
  font-size: 0.9375rem;
  color: var(--testo-tenue);
}

/* --- dove siamo ------------------------------------------------------ */

.dove {
  background: var(--carta);
  border-top: 1px solid var(--linea);
}

address {
  font-style: normal;
  font-family: var(--display);
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 400;
  line-height: 1.45;
}

.dove .azioni {
  margin-top: 1.75rem;
}

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

.chiusura {
  background: var(--scuro);
  color: var(--scuro-tenue);
  padding: clamp(2.5rem, 6vw, 4rem) clamp(1rem, 4vw, 2.5rem);
  text-align: center;
  font-size: 0.9375rem;
}

.chiusura .marchio {
  width: 3.4rem;
  height: 2.4rem;
  margin-bottom: 1.25rem;
}

.chiusura p {
  margin-top: 0.35rem;
}

.social {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-top: 1.25rem;
}

.social a {
  color: var(--scuro-testo);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid #39414a;
  padding-bottom: 2px;
  transition: border-color 0.15s ease;
}

.social a:hover {
  border-color: var(--acqua);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
