/* Giardino Bonelli.
   Colori presi dalla sala: il verde scuro, il crema dei muri, il rosso del divanetto.
   L'apertura è la sala che si apre da una finestra a tutta pagina, con il nome sopra e gli orari;
   il menù a schede accanto ai tavoli; l'indirizzo accanto alla veranda; Villa Bonelli in chiusura. */

:root {
  --verde: #1f3a2e;
  --verde-2: #29493b;
  --verde-3: #335646;
  --crema: #efeee9;
  --crema-2: #dfddd5;
  --rosso: #8e2430;
  --rosso-2: #741b25;
  --inchiostro: #1d1b18;
  --tenue: #625b50;
  --salvia: #c3cfc6;

  --font: "DM Sans", "Helvetica Neue", Arial, sans-serif;
  --font-nome: "Audiowide", "DM Sans", "Helvetica Neue", Arial, sans-serif; /* il carattere dell'insegna e del menù del locale: solo nome e titoli, sempre in maiuscolo */
  --step-small: clamp(0.875rem, 0.84rem + 0.12vw, 0.9375rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1rem + 0.9vw, 1.75rem);
  --step-head: clamp(1.75rem, 1rem + 3.2vw, 4rem);
  --step-display: clamp(2.75rem, 0.4rem + 10.4vw, 8.5rem);

  --margine: clamp(16px, 2.4vw, 36px);
  --barra: 68px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
  --t-press: 140ms;
  --t-hover: 180ms;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: var(--barra); }
body { margin: 0; background: var(--crema); color: var(--inchiostro); font-family: var(--font); font-size: var(--step-body); line-height: 1.5; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, dl, dd, figure, ul { margin: 0; }
ul { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
:focus-visible { outline: 2px solid var(--rosso); outline-offset: 3px; }
[hidden] { display: none !important; }

.titolo { font-family: var(--font-nome); font-size: var(--step-head); font-weight: 400; line-height: 1.08; letter-spacing: 0.02em; text-transform: uppercase; font-size-adjust: cap-height 0.7; }
.righe .riga { display: block; overflow: clip; padding-bottom: 0.1em; margin-bottom: -0.1em; }
.righe [data-riga] { display: block; }

.pulsante {
  display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 26px;
  background: var(--crema); color: var(--verde); font-weight: 600; text-decoration: none;
  transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease, color var(--t-hover) ease;
}
.pulsante:active { transform: scale(0.96); }
.pulsante--rosso { background: var(--rosso); color: #fff; }
.pulsante--vuoto { background: rgb(239 238 233 / 0.16); color: var(--crema); }

/* barra */
.top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 32px;
  height: var(--barra); padding: 0 var(--margine); background: var(--verde); color: var(--crema);
}
.top a { text-decoration: none; }
.top__nome { font-family: var(--font-nome); font-size: 1.125rem; line-height: 1; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; font-size-adjust: cap-height 0.7; }
.top__voci { display: flex; gap: 32px; margin-left: auto; font-weight: 500; }
.top__voci a { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 6px; transition: text-decoration-color var(--t-hover) ease; }
.top__azione { min-height: 44px; padding: 0 20px; white-space: nowrap; }
.top__voci a { white-space: nowrap; }

/* apertura: la sala a tutta pagina */
.apertura { position: relative; display: grid; align-items: end; height: calc(100svh - var(--barra)); min-height: 600px; overflow: clip; color: var(--crema); background: var(--verde); }
.apertura__finestra { position: absolute; inset: 0; overflow: clip; isolation: isolate; background: #453634; }
.apertura__foto { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 62%); }
/* le foto si danno il cambio: la nuova entra sopra la precedente, che resta piena finché non è coperta */
.apertura__foto + .apertura__foto { opacity: 0; }
.js .apertura__foto { opacity: 0; transition: opacity 1800ms var(--ease-soft); }
.js .apertura__foto.era { opacity: 1; z-index: 1; transition: none; }
.js .apertura__foto.is-su { opacity: 1; z-index: 2; }
.apertura__scorri { position: absolute; z-index: 2; right: var(--margine); bottom: clamp(28px, 4vw, 56px); display: flex; align-items: center; gap: 16px; }
.apertura__scorri[hidden] { display: none; }
.apertura__segni { display: flex; gap: 6px; filter: drop-shadow(0 0 3px rgb(0 0 0 / 0.55)); margin: 0; padding: 0; list-style: none; }
.apertura__segni li { width: 22px; height: 2px; background: rgb(239 238 233 / 0.38); transition: background-color 600ms ease; }
.apertura__segni li.is-su { background: var(--crema); }
.apertura::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to top, rgb(20 34 27 / 0.94) 0%, rgb(20 34 27 / 0.6) 42%, rgb(20 34 27 / 0) 72%); } /* taste-skill-ignore: velo neutro sotto il testo sulla foto */
.apertura__carta { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr); justify-items: start; gap: 20px;  padding: 0 var(--margine) clamp(28px, 4vw, 56px); }
.nome { grid-column: 1 / -1; padding-top: 0.14em; font-family: var(--font-nome); font-size: var(--step-display); font-weight: 400; line-height: 1.02; letter-spacing: 0.03em; text-transform: uppercase; font-size-adjust: cap-height 0.7; }
.apertura__frase { font-size: var(--step-lead); line-height: 1.3; max-width: 30ch; }
.apertura__orari { padding-left: 16px; border-left: 1px solid rgb(239 238 233 / 0.5); font-weight: 600; line-height: 1.5; font-variant-numeric: tabular-nums; text-align: left; }
.apertura__azioni { display: flex; flex-wrap: wrap; gap: 12px; }

/* Lieviti & Spiriti: il campo rosso del divanetto; le due formule si leggono come il menù, nome, prezzo e cosa comprende */
.lieviti { padding: clamp(80px, 9vw, 160px) var(--margine); background: var(--rosso); color: #fff; }
.lieviti__testa { display: grid; gap: 20px; }
.lieviti__chi { font-size: var(--step-lead); line-height: 1.35; max-width: 34ch; text-wrap: pretty; }
.lieviti__formule { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: clamp(48px, 6vw, 96px); }
.formula { padding: clamp(24px, 3vw, 44px); background: var(--rosso-2); }
.formula__testa { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 2px 24px; padding-bottom: clamp(20px, 2.4vw, 32px); }
.formula h3 { font-family: var(--font-nome); font-size: clamp(1.125rem, 0.95rem + 0.6vw, 1.5rem); font-weight: 400; line-height: 1.15; letter-spacing: 0.04em; text-transform: uppercase; font-size-adjust: cap-height 0.7; }
.formula__quando { grid-row: 2; font-weight: 600; color: rgb(255 255 255 / 0.82); font-variant-numeric: tabular-nums; }
.formula__prezzo { grid-column: 2; grid-row: 1 / span 2; align-self: start; font-weight: 600; font-size: clamp(2.25rem, 1.5rem + 2.2vw, 3.5rem); line-height: 0.9; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.formula__prezzo small { display: block; margin-top: 8px; font-family: var(--font); font-size: var(--step-body); line-height: 1.2; text-align: right; color: rgb(255 255 255 / 0.82); }
.formula ul { border-top: 1px solid rgb(255 255 255 / 0.28); }
.formula li { padding: 18px 0; border-bottom: 1px solid rgb(255 255 255 / 0.16); }
.formula li:last-child { border-bottom: 0; padding-bottom: 0; }
.formula li span { display: block; font-size: var(--step-lead); font-weight: 500; line-height: 1.25; }
.formula small { display: block; margin-top: 4px; font-size: var(--step-body); line-height: 1.45; color: rgb(255 255 255 / 0.88); }

/* menù: a tutta larghezza, le schede in alto */
.menu { padding: clamp(80px, 9vw, 160px) var(--margine); }
.menu__testa { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px 32px; }
.menu__testa p { font-weight: 600; color: var(--tenue); font-variant-numeric: tabular-nums; }
.schede { display: flex; flex-wrap: wrap; gap: 4px 28px; margin-top: 36px; padding-bottom: 14px; border-bottom: 2px solid var(--verde); }
.schede button { position: relative; padding: 8px 0 12px; border: 0; background: none; color: var(--tenue); font: inherit; font-weight: 600; cursor: pointer; transition: color var(--t-hover) ease; }
.schede button::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--rosso); transform: scaleX(0); transform-origin: left; transition: transform 380ms var(--ease-out); }
.schede button[aria-selected="true"] { color: var(--inchiostro); }
.schede button[aria-selected="true"]::after { transform: none; }
.pannello { margin-top: 32px; }
.menu__gruppo + .menu__gruppo { margin-top: 40px; }
.menu__nota { margin-top: 40px; padding-top: 16px; border-top: 1px solid currentColor; font-size: var(--step-small); }
.menu__gruppo h3 { padding-bottom: 10px; font-family: var(--font-nome); font-size: clamp(1.125rem, 0.95rem + 0.6vw, 1.5rem); font-weight: 400; line-height: 1.15; letter-spacing: 0.04em; text-transform: uppercase; font-size-adjust: cap-height 0.7; color: var(--rosso); }
.menu__gruppo ul { columns: 2; column-gap: clamp(28px, 3vw, 48px); }
@media (min-width: 1200px) { .menu__gruppo ul { columns: 3; } }
.menu__gruppo li { break-inside: avoid; display: grid; grid-template-columns: 1fr auto; column-gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--crema-2); } /* taste-skill-ignore: filetti del menù */
.menu__gruppo li span { font-weight: 600; }
.menu__gruppo li b { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.menu__gruppo small { grid-column: 1 / -1; margin-top: 2px; font-size: max(1rem, var(--step-small)); line-height: 1.4; }

/* orari e indirizzo */
.dove { padding: clamp(64px, 8vw, 128px) var(--margine); background: var(--verde); color: var(--crema); }
.dove__griglia { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 4fr) minmax(0, 4fr); gap: 40px clamp(28px, 4vw, 64px); align-items: start; margin-top: 40px; padding-top: 8px; border-top: 1px solid var(--verde-3); }
.settimana { margin: 0; }
.settimana div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 14px; border-bottom: 1px solid var(--verde-3); transition: background-color 400ms ease, color 400ms ease; } /* taste-skill-ignore: filetti voluti */
.settimana dd { font-weight: 600; font-variant-numeric: tabular-nums; }
.dove__indirizzo { margin-top: 12px; font-weight: 500; font-size: var(--step-lead); line-height: 1.25; }
.dove__telefono { margin-top: 12px; font-weight: 600; }
.dove__indirizzo a, .dove__telefono a { text-decoration-color: rgb(239 238 233 / 0.4); transition: text-decoration-color var(--t-hover) ease; }
.dove__azioni { display: grid; gap: 8px; margin-top: 12px; }
.cella { display: flex; align-items: center; justify-content: space-between; min-height: 64px; padding: 0 22px; background: var(--verde-2); font-weight: 600; text-decoration: none; transition: background-color var(--t-hover) ease, transform var(--t-press) var(--ease-out); }
.cella::after { content: "→"; transition: transform 300ms var(--ease-out); }
.cella:active { transform: scale(0.98); }
.cella--piena { background: var(--rosso); color: #fff; }

/* Villa Bonelli */

/* chiusura: il nome torna a tutta larghezza */
.piede { padding: clamp(48px, 6vw, 96px) var(--margine) var(--margine); background: var(--verde); color: var(--crema); }
.piede__nome { font-family: var(--font-nome); font-size: clamp(1.25rem, 7.2vw, 9rem); line-height: 1; letter-spacing: 0.03em; text-transform: uppercase; white-space: nowrap; font-size-adjust: cap-height 0.7; }
.piede__righe { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; margin-top: 32px; color: var(--salvia); font-size: var(--step-small); }
.piede__righe p + p { margin-top: 4px; }
.piede__gruppo { width: auto; height: 24px; mix-blend-mode: screen; opacity: 0.8; } /* il nero del logo sparisce sul verde */

@media (hover: hover) and (pointer: fine) {
  .pulsante:hover { background: #fff; }
  .pulsante--rosso:hover { background: var(--rosso-2); color: #fff; }
  .pulsante--vuoto:hover { background: rgb(239 238 233 / 0.28); color: var(--crema); }
  .top__voci a:hover { text-decoration-color: currentColor; }
  .schede button:hover { color: var(--inchiostro); }
  .menu__gruppo li { transition: background-color var(--t-hover) ease; }
  .menu__gruppo li:hover span { color: var(--rosso); }
  .dove__indirizzo a:hover, .dove__telefono a:hover { text-decoration-color: currentColor; }
  .cella:hover { background: var(--verde-3); }
  .cella--piena:hover { background: var(--rosso-2); }
  .cella:hover::after { transform: translateX(6px); }
}

/* movimento */
@media (prefers-reduced-motion: no-preference) {
  /* la firma: la sala si apre da una finestra a tutta pagina, poi il nome sale riga per riga */
  .js .apertura__finestra[data-apre] { clip-path: inset(22% 28% 30% 28%); animation: apre 1100ms var(--ease-in-out) 60ms forwards; }
  .js .apertura__foto { transform: scale(1.18); animation: posa 1300ms var(--ease-expo) 60ms forwards, deriva 26s var(--ease-soft) 1.4s infinite alternate; }
  .js .apertura::after { opacity: 0; animation: arriva 600ms ease 200ms forwards; }
  .js .apertura [data-riga] { transform: translateY(105%); animation: su 800ms var(--ease-expo) forwards; animation-delay: calc(200ms + var(--i) * 110ms); }
  .js .apertura [data-arriva] { opacity: 0; transform: translateY(14px); animation: arriva 600ms var(--ease-out) forwards; animation-delay: var(--d); }
  @supports (animation-timeline: view()) {
    .apertura__carta { animation: sale-via linear both; animation-timeline: view(); animation-range: exit 0% exit 100%; }
  }

  .js .righe[data-sale] [data-riga] { transform: translateY(105%); transition: transform 900ms var(--ease-expo) calc(var(--i) * 90ms); }
  .js .righe[data-sale].is-in [data-riga] { transform: none; }
  .js [data-sale]:not(.righe) { opacity: 0; transform: translateY(20px); transition: opacity 600ms var(--ease-out) 150ms, transform 800ms var(--ease-expo) 150ms; }
  .js [data-sale]:not(.righe).is-in { opacity: 1; transform: none; }
  .js .settimana[data-sale] { transition-delay: 120ms; }
  .js .dove__indirizzo[data-sale] { transition-delay: 220ms; }
  .js .dove__telefono[data-sale] { transition-delay: 280ms; }
  .js .dove__azioni[data-sale] { transition-delay: 340ms; }
  .js .lieviti__chi[data-sale] { transition-delay: 220ms; }
  .js .formula[data-sale] { transition-delay: calc(150ms + var(--d, 0ms)); }

  /* le righe del menù arrivano una dopo l'altra a ogni scheda */
  .js .pannello.entra li { animation: riga-menu 600ms var(--ease-out) both; animation-delay: calc(var(--n, 0) * 35ms); }


  .js .piede__nome { transform: translateY(30%); opacity: 0; transition: transform 1100ms var(--ease-expo), opacity 600ms ease; }
  .js .piede__nome.is-in { transform: none; opacity: 1; }
}
@keyframes apre { to { clip-path: inset(0); } }
@keyframes posa { to { transform: scale(1); } }
@keyframes deriva { from { transform: scale(1); } to { transform: scale(1.07) translateX(-1.5%); } }
@keyframes su { to { transform: none; } }
@keyframes arriva { to { opacity: 1; transform: none; } }
@keyframes riga-menu { from { opacity: 0; transform: translateY(12px); } }
@keyframes sale-via { to { transform: translateY(-14%); opacity: 0.2; } }

@media (max-width: 1000px) {
  .top__voci { display: none; }
  .top { justify-content: space-between; }
  .dove__griglia { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .dove__azioni { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; }
  .lieviti__formule { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .top__voci { display: none; }
  .top { justify-content: space-between; gap: 12px; }
  .top__nome { font-size: 0.8125rem; }
  .top__azione { padding: 0 14px; font-size: var(--step-small); }
  .apertura { height: auto; min-height: calc(92svh - var(--barra)); }
  .apertura__carta { grid-template-columns: minmax(0, 1fr); padding-top: 38svh; }
  .nome { font-size: 14.6vw; }
  .apertura__azioni .pulsante { flex: 1 1 auto; }
  .apertura__scorri { top: 16px; bottom: auto; }
  .menu__gruppo ul { columns: 1; }
  .piede__nome { font-size: 7.2vw; }
  .dove__griglia { grid-template-columns: minmax(0, 1fr); }
  .dove__azioni { grid-template-columns: minmax(0, 1fr); }
}

.intero { white-space: nowrap; }
