/* Jacky Open Space, "Dal giorno alla notte".
   La pagina scorre come una giornata al JOS: latte del mattino, arancio dell'aperitivo,
   petrolio e notte delle pareti del locale, poi di nuovo mattina. */

@font-face {
  font-family: "Jost";
  src: url("../fonts/jost-latin.woff2") format("woff2");
  font-weight: 200 700;
  font-display: swap;
}
@font-face {
  font-family: "Caveat Brush";
  src: url("../fonts/caveat-brush-latin.woff2") format("woff2");
  font-display: swap;
}

:root {
  --latte: #f2e7d8;
  --latte-scuro: #e6d5bf;
  --inchiostro: #172526;
  --inchiostro-2: #3d4b4b;
  --spritz: #e8601c;
  --spritz-chiaro: #f39a5e;
  --arancio: #ef8a4c;
  --petrolio: #12403f;
  --petrolio-2: #1b5553;
  --notte: #0b1617;
  --notte-2: #132425;
  --chiaro: #f6efe6;
  --chiaro-2: #b9c7c4;
  --neon: #ff6db0;
  --verde: #3fcf7a;

  --corpo: "Jost", ui-sans-serif, system-ui, sans-serif;
  --mano: "Caveat Brush", "Jost", cursive;

  --esce: cubic-bezier(0.23, 1, 0.32, 1);
  --margine: clamp(1rem, 4.5vw, 4rem);
  --larghezza: 1320px;
}

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

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

body {
  margin: 0;
  background: var(--latte);
  color: var(--inchiostro);
  font-family: var(--corpo);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-weight: 400;
  overflow-x: clip;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, h4, p, figure, blockquote, ol, ul { margin: 0; }

a, button, [role="button"] { touch-action: manipulation; }

:focus-visible {
  outline: 3px solid var(--spritz);
  outline-offset: 3px;
  border-radius: 2px;
}

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

.salta {
  position: absolute; left: 1rem; top: -4rem; z-index: 30;
  background: var(--inchiostro); color: var(--chiaro);
  padding: .7rem 1rem; text-decoration: none;
}
.salta:focus { top: 1rem; }

/* ---------- Testata ---------- */

.testata {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; align-items: center; gap: 2rem;
  padding: calc(.75rem + env(safe-area-inset-top, 0px)) var(--margine) .75rem;
  color: var(--inchiostro);
  transition: background-color .4s var(--esce), color .4s var(--esce), box-shadow .4s var(--esce);
}
.testata.is-staccata {
  background: color-mix(in srgb, var(--latte) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgb(23 37 38 / .08);
}
.testata.is-scura { color: var(--chiaro); }
.testata.is-scura.is-staccata {
  background: color-mix(in srgb, var(--notte) 84%, transparent);
  box-shadow: 0 1px 0 rgb(246 239 230 / .08);
}

.marchio {
  display: inline-flex; flex-direction: column; align-items: center;
  text-decoration: none; line-height: 1;
}
.marchio__nome { font-weight: 300; font-size: 1.35rem; letter-spacing: .2em; margin-right: -.2em; }
.marchio__sotto {
  font-size: .5rem; font-weight: 500; letter-spacing: .38em; margin-right: -.38em;
  border-top: 1px solid currentColor; padding-top: 3px; margin-top: 3px;
}

.menu { display: none; gap: 1.75rem; margin-left: auto; }
.menu a {
  text-decoration: none; font-size: .95rem; font-weight: 500;
  padding: .5rem 0; position: relative;
}
.menu a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: .25rem; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform .25s var(--esce);
}
@media (hover: hover) and (pointer: fine) {
  .menu a:hover::after { transform: scaleX(1); }
}

.stato {
  display: inline-flex; align-items: center; gap: .55rem;
  font-weight: 500;
}
.stato--piccolo { margin-left: auto; font-size: .85rem; }
.stato__punto {
  width: .55rem; height: .55rem; border-radius: 50%;
  background: var(--inchiostro-2); flex: none; position: relative;
}
.testata.is-scura .stato__punto { background: var(--chiaro-2); }
.is-aperto .stato__punto, .testata.is-scura .is-aperto .stato__punto { background: var(--verde); }

@media (min-width: 960px) {
  .menu { display: flex; }
  .stato--piccolo { margin-left: 0; min-width: 15rem; justify-content: flex-end; }
}
@media (max-width: 380px) {
  .stato--piccolo { display: none; }
}
/* Sul telefono l'apertura ha già nome e stato: la testata li mostra solo dopo il primo scorrimento. */
@media (max-width: 959px) {
  .testata .marchio, .testata .stato--piccolo { transition: opacity .3s var(--esce); }
  .js .testata:not(.is-staccata) .marchio,
  .js .testata:not(.is-staccata) .stato--piccolo { opacity: 0; pointer-events: none; }
}

/* ---------- Bottoni ---------- */

.azioni { display: flex; flex-wrap: wrap; gap: .75rem; }

.bottone {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3.1rem; padding: .8rem 1.5rem;
  border-radius: 999px; text-decoration: none; white-space: nowrap;
  font-weight: 600; font-size: 1rem; letter-spacing: .01em;
  user-select: none; -webkit-user-select: none;
  transition: transform .14s var(--esce), background-color .2s, color .2s, border-color .2s;
}
.bottone:active { transform: scale(.97); }

.bottone--pieno { background: var(--inchiostro); color: var(--chiaro); }
.bottone--vuoto { border: 1.5px solid var(--inchiostro); color: var(--inchiostro); }
.bottone--chiaro { background: var(--chiaro); color: var(--notte); }
.bottone--pieno-scuro { background: var(--chiaro); color: var(--petrolio); }
.bottone--pepi { background: var(--neon); color: var(--notte); }

@media (hover: hover) and (pointer: fine) {
  .bottone--pieno:hover { background: var(--petrolio); }
  .bottone--vuoto:hover { background: var(--inchiostro); color: var(--chiaro); }
  .bottone--chiaro:hover, .bottone--pieno-scuro:hover { background: var(--spritz-chiaro); color: var(--notte); }
  .bottone--pepi:hover { background: var(--chiaro); }
}

/* ---------- Note scritte a mano ---------- */

.nota {
  font-family: var(--mano); font-size: 1.7rem; line-height: 1;
  color: var(--spritz); transform: rotate(-4deg);
}

/* ---------- Apertura ---------- */

.apertura {
  min-height: 100svh;
  display: grid; gap: 2.5rem;
  padding: calc(6rem + env(safe-area-inset-top, 0px)) var(--margine) 3rem;
  max-width: var(--larghezza); margin: 0 auto;
  align-items: center;
}

.logo { display: flex; flex-direction: column; align-items: flex-start; margin-bottom: 2rem; }
.logo__nome {
  display: flex; font-weight: 200; line-height: .9;
  font-size: clamp(4rem, 15vw, 8.5rem); letter-spacing: .14em;
}
.logo__sotto {
  position: relative;
  font-weight: 500; font-size: clamp(.8rem, 2.4vw, 1.25rem);
  letter-spacing: .62em; padding: .55rem 0 0 .2em; margin-top: .4rem;
}
.logo__sotto::before {
  content: ""; position: absolute; top: 0; left: 0; right: .6em; height: 2px;
  background: currentColor; transform-origin: left;
}

.apertura__titolo {
  font-weight: 600; font-size: clamp(2rem, 4.6vw, 3.4rem);
  line-height: 1.05; letter-spacing: -.02em; max-width: 14ch;
  text-wrap: balance;
}
.apertura__sotto {
  margin-top: 1rem; max-width: 36ch; font-size: 1.15rem; color: var(--inchiostro-2);
}
.stato--grande { margin: 1.5rem 0 1.25rem; font-size: 1rem; }

.apertura__foto { position: relative; }
.apertura__foto img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 40%;
  border-radius: 1.25rem;
}
.apertura__foto .nota {
  position: absolute; right: .25rem; bottom: -2.2rem;
}

@media (min-width: 900px) {
  .apertura {
    grid-template-columns: 1.15fr .85fr;
    gap: clamp(2rem, 5vw, 5rem);
    padding-top: 6.5rem;
  }
  .apertura__foto img { aspect-ratio: 3 / 4; max-height: calc(100svh - 9rem); }
}

/* ---------- La giornata ---------- */

.momento {
  display: grid; gap: 2.5rem;
  padding: clamp(4rem, 10vw, 7rem) var(--margine);
}
.momento > * { max-width: var(--larghezza); }

.momento__parola {
  font-weight: 200; line-height: .85; letter-spacing: -.035em;
  font-size: clamp(4.2rem, 16vw, 11rem);
}
.momento__ora {
  font-family: var(--mano); font-size: 1.8rem; line-height: 1.1;
  margin-top: .75rem; transform: rotate(-2deg); transform-origin: left;
}
.momento__corpo { margin-top: 1.25rem; max-width: 40ch; font-size: 1.15rem; }

.momento__foto img { border-radius: 1rem; object-fit: cover; }

.momento--mattina { background: var(--latte); }
.momento--mattina .momento__ora { color: var(--spritz); }

.momento__foto--coppia { position: relative; padding-bottom: 18%; width: 100%; max-width: 34rem; justify-self: center; }
.momento__foto--coppia img:first-child { width: 78%; aspect-ratio: 4 / 5; }
.momento__foto--coppia img:last-child {
  position: absolute; right: 0; bottom: 0; width: 46%; aspect-ratio: 3 / 4;
  border: 6px solid var(--latte);
}

.cielo { height: clamp(8rem, 22vw, 16rem); }
.cielo--pomeriggio { background: linear-gradient(var(--latte), var(--arancio)); }
.cielo--tramonto { background: linear-gradient(var(--arancio), #8a4a3a 45%, var(--petrolio)); }

.momento--aperitivo { background: var(--arancio); color: var(--notte); }
.momento--aperitivo .momento__corpo { color: var(--notte); }

.momento__foto--tris {
  display: grid; gap: .75rem;
  grid-template-columns: 1fr 1fr;
  align-items: start;
}
.momento__foto--tris img:nth-child(1) { aspect-ratio: 3 / 4; margin-top: 3rem; }
.momento__foto--tris img:nth-child(2) { aspect-ratio: 1; grid-column: 1 / -1; grid-row: 1; }
.momento__foto--tris img:nth-child(3) { aspect-ratio: 3 / 4; }

.momento--notte {
  background: linear-gradient(var(--petrolio), var(--notte) 70%);
  color: var(--chiaro);
}
.momento--notte .momento__ora { color: var(--neon); }
.momento--notte .momento__corpo { color: var(--chiaro-2); }

.momento__foto--notte { display: grid; gap: .75rem; grid-template-columns: 1fr; width: 100%; max-width: 38rem; justify-self: center; }
.momento__foto--notte img:first-child { aspect-ratio: 1; }
.momento__foto--notte img:last-child { aspect-ratio: 16 / 11; width: 80%; justify-self: end; margin-top: -4rem; border: 6px solid var(--notte); }

@media (min-width: 900px) {
  .momento {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: clamp(3rem, 6vw, 6rem);
    align-items: center;
    max-width: calc(var(--larghezza) + 2 * var(--margine));
    margin: 0 auto;
  }
  .momento--mattina, .momento--aperitivo { max-width: none; }
  .momento--mattina > *, .momento--aperitivo > * { width: 100%; }
  .giornata .momento { padding-inline: max(var(--margine), calc((100vw - var(--larghezza)) / 2)); max-width: none; }

  .momento--aperitivo { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
  .momento--aperitivo .momento__testo { order: 2; }
  .momento__foto--tris { grid-template-columns: 1fr 1.2fr .9fr; }
  .momento__foto--tris img:nth-child(1) { margin-top: 0; }
  .momento__foto--tris img:nth-child(2) { grid-column: auto; grid-row: auto; aspect-ratio: 4 / 5; margin-top: 4rem; }
  .momento__foto--tris img:nth-child(3) { margin-top: -2rem; }

  .momento__testo { position: sticky; top: 8rem; align-self: start; }
  .momento--notte .momento__testo { align-self: center; position: static; }
}

/* ---------- Eventi ---------- */

.eventi {
  background: var(--notte); color: var(--chiaro);
  padding: clamp(4rem, 9vw, 7rem) var(--margine);
}
.eventi > * { max-width: var(--larghezza); margin-inline: auto; }

.titolo {
  font-weight: 600; font-size: clamp(2rem, 4.8vw, 3.6rem);
  line-height: 1.05; letter-spacing: -.02em; text-wrap: balance;
}
.eventi .titolo { max-width: 18ch; margin-left: max(0px, calc((100% - var(--larghezza)) / 2)); }

.prossimi {
  list-style: none; padding: 0; margin-top: 3rem;
  display: grid; gap: 1rem;
}
.prossimo {
  display: grid; gap: 1rem 1.5rem;
  grid-template-columns: auto 1fr;
  align-items: center;
  padding: 1.5rem; border-radius: 1.25rem;
  background: var(--notte-2);
  box-shadow: inset 0 0 0 1px rgb(246 239 230 / .08);
}
.prossimo[hidden] { display: none; }
.prossimo__data {
  font-weight: 200; font-size: 3.2rem; line-height: .9; text-align: center;
  min-width: 4.5rem;
}
.prossimo__data span { display: block; font-size: .85rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--spritz-chiaro); }
.prossimo__data span + span { display: block; }
.prossimo h3 { font-size: 1.35rem; font-weight: 600; line-height: 1.2; }
.prossimo p { color: var(--chiaro-2); margin-top: .35rem; }
.prossimo__nota { font-size: .95rem; }
.prossimo .bottone { grid-column: 1 / -1; justify-self: start; }

@media (min-width: 760px) {
  .prossimi { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1100px) {
  .prossimo { grid-template-columns: auto 1fr auto; padding: 1.75rem 2rem; }
  .prossimo .bottone { grid-column: auto; }
}

.eventi__sotto {
  margin-top: clamp(3.5rem, 7vw, 5rem);
  font-family: var(--mano); font-weight: 400; font-size: 2.2rem; line-height: 1;
  color: var(--neon); transform: rotate(-2deg); transform-origin: left;
}

.locandine {
  display: grid; grid-auto-flow: column;
  grid-auto-columns: minmax(16rem, 78%);
  gap: 1rem; margin-top: 1.5rem;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding-inline: var(--margine);
  padding: .25rem var(--margine) 1.25rem;
  margin-inline: calc(-1 * var(--margine));
  max-width: none;
  scrollbar-width: thin; scrollbar-color: var(--petrolio-2) transparent;
}
@media (min-width: 760px) { .locandine { grid-auto-columns: minmax(17rem, 40%); } }
@media (min-width: 1100px) {
  .locandine { grid-auto-columns: calc((min(100vw, var(--larghezza) + 2 * var(--margine)) - 2 * var(--margine) - 2rem) / 3.25); }
  .locandine { padding-inline: max(var(--margine), calc((100vw - var(--larghezza)) / 2)); scroll-padding-inline: max(var(--margine), calc((100vw - var(--larghezza)) / 2)); }
}

.locandina {
  scroll-snap-align: start;
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 25rem; padding: 1.5rem;
  border-radius: 1.25rem; isolation: isolate;
}
.locandina h4 {
  font-family: var(--mano); font-weight: 400; font-size: clamp(2rem, 7vw, 2.3rem); line-height: 1;
}
.locandina p { margin-top: .6rem; font-size: 1rem; line-height: 1.45; }

.locandina--foto { color: var(--chiaro); }
.locandina--foto img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2;
  transition: transform .6s var(--esce);
}
.locandina--foto::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgb(11 22 23 / .92) 0%, rgb(11 22 23 / .55) 42%, rgb(11 22 23 / 0) 70%);
}
.locandina--spritz { background: var(--spritz); color: var(--notte); }
.locandina--spritz h4 { font-size: 3.4rem; }
.locandina--latte { background: var(--latte); color: var(--inchiostro); }
.locandina--latte h4 { font-size: 3rem; color: var(--petrolio); }

@media (hover: hover) and (pointer: fine) {
  .locandina--foto:hover img { transform: scale(1.04); }
}

.eventi__social { margin-top: 1.5rem; color: var(--chiaro-2); }
.eventi__social a, .link-forte { font-weight: 600; text-underline-offset: .2em; }
.eventi__social a { color: var(--chiaro); }

/* ---------- Feste ---------- */

.feste {
  background: var(--petrolio); color: var(--chiaro);
  display: grid;
}
.feste__foto img { width: 100%; height: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.feste__testo { padding: clamp(3rem, 8vw, 6rem) var(--margine); position: relative; }
.feste__testo > p:not(.nota) { margin-top: 1.25rem; max-width: 42ch; font-size: 1.15rem; color: #d6e2df; }
.feste__elenco {
  list-style: none; padding: 0; margin: 1.75rem 0 2rem;
  display: grid; gap: .6rem; font-weight: 500;
}
.feste__elenco li { display: flex; gap: .75rem; align-items: baseline; }
.feste__elenco li::before { content: "+"; color: var(--spritz-chiaro); font-weight: 600; }

.nota--neon {
  margin-top: 2.5rem; font-size: 2.6rem; color: var(--neon);
  text-shadow: 0 0 .5rem rgb(255 109 176 / .55), 0 0 1.4rem rgb(255 109 176 / .35);
}

@media (min-width: 900px) {
  .feste { grid-template-columns: 1fr 1fr; align-items: stretch; }
  .feste__foto img { aspect-ratio: auto; min-height: 100%; }
  .feste__testo { align-self: center; padding-left: clamp(3rem, 6vw, 6rem); max-width: 40rem; }
}

/* ---------- JOS Family (il mattino dopo) ---------- */

.family {
  background: linear-gradient(var(--notte), #3d3a36 6rem, var(--latte-scuro) 16rem, var(--latte) 26rem);
  padding: clamp(14rem, 26vw, 20rem) var(--margine) clamp(4rem, 9vw, 7rem);
  display: grid; gap: 3rem;
}
.family > * { max-width: var(--larghezza); }
.family__testo p { margin-top: 1.25rem; max-width: 44ch; font-size: 1.15rem; }
.family__citazione {
  margin-top: 2rem; padding-left: 1.25rem; border-left: 3px solid var(--spritz);
}
.family__citazione p { margin: 0; font-size: 1.35rem; font-weight: 500; line-height: 1.35; max-width: 32ch; }
.family__citazione footer { margin-top: .6rem; font-size: .95rem; color: var(--inchiostro-2); }

.family__foto { display: grid; grid-template-columns: 1.3fr 1fr; gap: .75rem; align-items: end; }
.family__foto img { border-radius: 1rem; width: 100%; object-fit: cover; }
.family__foto img:first-child { aspect-ratio: 7 / 8; }
.family__foto img:last-child { aspect-ratio: 4 / 5; margin-bottom: -2.5rem; }

.voci {
  display: grid; gap: 1.5rem; margin-top: 2rem;
  padding-top: 2rem; border-top: 1px solid rgb(23 37 38 / .15);
}
.voci__voto { font-size: 1.05rem; }
.voci__voto strong { display: block; font-size: 4rem; font-weight: 200; line-height: .9; letter-spacing: -.02em; }
.voci__voto span { display: block; color: var(--inchiostro-2); }
.voci blockquote p { font-size: 1.2rem; font-weight: 500; line-height: 1.4; max-width: 34ch; }
.voci blockquote footer { margin-top: .4rem; font-size: .95rem; color: var(--inchiostro-2); }

@media (min-width: 900px) {
  .family {
    grid-template-columns: 1fr 1fr; column-gap: clamp(3rem, 6vw, 6rem);
    padding-inline: max(var(--margine), calc((100vw - var(--larghezza)) / 2));
  }
  .family__testo { align-self: center; }
  .voci { grid-column: 1 / -1; grid-template-columns: auto 1fr 1fr; gap: 3rem; align-items: start; margin-top: 3.5rem; }
}

/* ---------- Pepito's ---------- */

.pepitos {
  background: #121112; color: var(--chiaro);
  padding: clamp(4rem, 9vw, 6.5rem) var(--margine);
  display: grid; gap: 2rem; align-items: center;
}
.pepitos__cartello {
  font-family: var(--mano); font-size: clamp(3rem, 9vw, 5.5rem); line-height: .95;
  color: #5fd3b0; transform: rotate(-3deg); max-width: 8ch;
}
.pepitos h2 { display: flex; flex-direction: column; gap: .2rem; }
.pepitos__nome { font-weight: 700; font-size: clamp(2.4rem, 6vw, 3.6rem); letter-spacing: .04em; line-height: 1; }
.pepitos__sotto { font-weight: 400; font-size: 1.1rem; color: var(--neon); letter-spacing: .02em; }
.pepitos__testo p { margin: 1rem 0 1.75rem; max-width: 40ch; color: #cfc8c2; font-size: 1.1rem; }

@media (min-width: 900px) {
  .pepitos {
    grid-template-columns: 1fr 1fr;
    padding-inline: max(var(--margine), calc((100vw - var(--larghezza)) / 2));
  }
  .pepitos__cartello { justify-self: center; }
}

/* ---------- Dove e quando ---------- */

.dove {
  background: var(--latte);
  padding: clamp(4rem, 9vw, 7rem) var(--margine) clamp(3rem, 6vw, 5rem);
}
.dove > * { max-width: var(--larghezza); margin-inline: auto; }
.dove__griglia { display: grid; gap: 2.5rem; margin-top: 2.5rem; }
.dove h3 { font-size: 1rem; font-weight: 600; letter-spacing: .02em; color: var(--inchiostro-2); margin-bottom: .75rem; }

.dove table { border-collapse: collapse; width: 100%; max-width: 24rem; font-variant-numeric: tabular-nums; }
.dove th, .dove td { text-align: left; padding: .45rem .75rem; font-size: 1.05rem; }
.dove th { font-weight: 500; padding-left: 0; }
.dove td { text-align: right; }
.dove tr.is-oggi { background: var(--inchiostro); color: var(--chiaro); }
.dove tr.is-oggi th { padding-left: .75rem; font-weight: 600; }

.dove address { font-style: normal; font-size: 1.2rem; line-height: 1.45; }
.dove__contatti p { margin-top: .6rem; font-size: 1.15rem; }
.dove__contatti .bottone { margin-top: 1.25rem; }

.dove__mappa iframe {
  width: 100%; height: 100%; min-height: 20rem; border: 0; border-radius: 1.25rem;
  filter: grayscale(.35) contrast(1.05);
}

@media (min-width: 900px) {
  .dove__griglia { grid-template-columns: 1fr 1fr 1.4fr; gap: 3rem; }
}

/* ---------- Piede e barra ---------- */

.piede {
  background: var(--inchiostro); color: var(--chiaro-2);
  padding: 3rem var(--margine) calc(6.5rem + env(safe-area-inset-bottom, 0px));
  display: grid; gap: .5rem; font-size: .95rem;
}
.piede__marchio { color: var(--chiaro); font-weight: 300; font-size: 1.5rem; letter-spacing: .2em; }
.piede__marchio span { font-size: .75rem; font-weight: 500; letter-spacing: .38em; }
.piede a { color: var(--chiaro); margin-right: 1.25rem; font-weight: 500; }
@media (min-width: 900px) { .piede { padding-bottom: 3rem; } }

.barra {
  position: fixed; left: .75rem; right: .75rem; z-index: 25;
  bottom: calc(.75rem + env(safe-area-inset-bottom, 0px));
  display: grid; grid-template-columns: 1fr 1fr; gap: .5rem;
  padding: .4rem; border-radius: 999px;
  background: rgb(23 37 38 / .94);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgb(11 22 23 / .3);
  transform: translateY(calc(100% + 2rem));
  transition: transform .35s var(--esce);
}
.barra.is-visibile { transform: none; }
.barra a {
  display: flex; align-items: center; justify-content: center;
  min-height: 3rem; border-radius: 999px; text-decoration: none;
  font-weight: 600; color: var(--chiaro);
  user-select: none; -webkit-user-select: none;
  transition: transform .14s var(--esce), background-color .2s;
}
.barra a:first-child { background: var(--spritz); color: var(--notte); }
.barra a:active { transform: scale(.97); }
@media (min-width: 900px) { .barra { display: none; } }

/* ---------- Movimento ---------- */

@media (prefers-reduced-motion: no-preference) {
  /* Ingresso dell'apertura: una volta sola. */
  .logo__nome span {
    display: inline-block;
    animation: sale .9s var(--esce) both;
    animation-delay: calc(var(--i, 0) * 60ms + 80ms);
  }
  .logo__nome span:nth-child(2) { --i: 1; }
  .logo__nome span:nth-child(3) { --i: 2; }
  .logo__nome span:nth-child(4) { --i: 3; }
  .logo__nome span:nth-child(5) { --i: 4; }
  .logo__sotto { animation: appare .7s var(--esce) .45s both; }
  .logo__sotto::before { animation: traccia .8s var(--esce) .4s both; }
  .apertura__titolo, .apertura__sotto, .apertura .stato, .apertura .azioni {
    animation: sale .8s var(--esce) both;
  }
  .apertura__titolo { animation-delay: .35s; }
  .apertura__sotto { animation-delay: .45s; }
  .apertura .stato { animation-delay: .55s; }
  .apertura .azioni { animation-delay: .6s; }
  .apertura__foto img { animation: scopre 1.1s var(--esce) .2s both; }
  .apertura__foto .nota { animation: appare .6s var(--esce) 1s both; }

  /* Il punto verde respira solo quando il locale è aperto. */
  .is-aperto .stato__punto::after {
    content: ""; position: absolute; inset: 0; border-radius: 50%;
    background: var(--verde); animation: respira 2.4s ease-out infinite;
  }

  /* Titoli e blocchi che entrano: una volta, quando arrivano a metà schermo. */
  .js [data-entra] { opacity: 0; translate: 0 1.25rem; transition: opacity .7s var(--esce), translate .7s var(--esce); }
  .js [data-entra].is-dentro { opacity: 1; translate: none; }

  /* Neon che si accende quando arriva in vista. */
  .js .nota--neon { opacity: .15; text-shadow: none; }
  .js .nota--neon.is-acceso { animation: neon 1.1s steps(1, end) forwards; }

  /* Le foto della giornata scorrono un po' più piano della pagina. */
  @supports (animation-timeline: view()) {
    .sposta { animation: deriva linear both; animation-timeline: view(); animation-range: cover; }
    .sposta--lenta { animation-name: deriva-lenta; }
  }
}

@keyframes sale { from { opacity: 0; transform: translateY(.9rem); } to { opacity: 1; transform: none; } }
@keyframes appare { from { opacity: 0; } to { opacity: 1; } }
@keyframes traccia { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes scopre { from { clip-path: inset(100% 0 0 0 round 1.25rem); } to { clip-path: inset(0 0 0 0 round 1.25rem); } }
@keyframes respira { from { transform: scale(1); opacity: .6; } to { transform: scale(2.8); opacity: 0; } }
@keyframes deriva { from { transform: translateY(1.5rem); } to { transform: translateY(-1.5rem); } }
@keyframes deriva-lenta { from { transform: translateY(3.5rem); } to { transform: translateY(-3.5rem); } }
@keyframes neon {
  0%   { opacity: .15; text-shadow: none; }
  12%  { opacity: 1; text-shadow: 0 0 .5rem rgb(255 109 176 / .55), 0 0 1.4rem rgb(255 109 176 / .35); }
  20%  { opacity: .25; text-shadow: none; }
  34%  { opacity: 1; text-shadow: 0 0 .5rem rgb(255 109 176 / .55), 0 0 1.4rem rgb(255 109 176 / .35); }
  42%  { opacity: .4; text-shadow: none; }
  100% { opacity: 1; text-shadow: 0 0 .5rem rgb(255 109 176 / .55), 0 0 1.4rem rgb(255 109 176 / .35); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .barra { transition: opacity .2s; transform: none; opacity: 0; pointer-events: none; }
  .barra.is-visibile { opacity: 1; pointer-events: auto; }
}
