/* Maleducato · mobile first.
   Colori e caratteri presi dall'identità del locale:
   nero pieno, bianco, rosso dei manifesti, titoli condensati in maiuscolo. */

:root {
  --nero: #000000;
  --carbone: #151515;
  --bianco: #FFFFFF;
  --rosso: #F5121B;
  --grigio: #A8A8A8;
  --titoli: "Anton", "Impact", "Arial Narrow", sans-serif;
  --testo: "Barlow", "Helvetica Neue", Arial, sans-serif;
  --tabbar: 4rem;
  --gutter: 1.125rem;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
}
*, *::before, *::after { box-sizing: inherit; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(3.5rem + env(safe-area-inset-top, 0px));
  -webkit-text-size-adjust: 100%;
  background: var(--nero);
}
body {
  margin: 0;
  background: var(--nero);
  color: var(--bianco);
  font-family: var(--testo);
  font-size: 1.0625rem;
  line-height: 1.5;
  padding-bottom: calc(var(--tabbar) + env(safe-area-inset-bottom, 0px));
  -webkit-tap-highlight-color: transparent;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--rosso); outline-offset: 3px; }
svg { width: 1.5rem; height: 1.5rem; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Titoli in stile manifesto */
h2 {
  font-family: var(--titoli);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(2.5rem, 12vw, 4.5rem);
  line-height: .95;
  letter-spacing: .005em;
  margin: 0 0 .75rem;
}

/* Intestazione */
.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10;
  display: flex; justify-content: space-between; align-items: center;
  height: 3.5rem; padding: 0 var(--gutter);
  background: rgba(0, 0, 0, .86);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.logo {
  font-family: var(--titoli); text-transform: uppercase;
  font-size: 1.5rem; line-height: 1; text-decoration: none; letter-spacing: .01em;
}
.logo-m { color: var(--rosso); }
.top-nav { display: none; }

/* Barra in basso (telefono) */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: repeat(3, 1fr);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: rgba(16, 16, 16, .94);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255, 255, 255, .1);
}
.tabbar a {
  position: relative; height: var(--tabbar);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem;
  text-decoration: none; font-size: .8rem; font-weight: 600; color: var(--grigio);
}
.tabbar a.attivo { color: var(--bianco); }
.tabbar a.attivo::before {
  content: ""; position: absolute; top: -1px; left: 30%; right: 30%;
  height: 3px; background: var(--rosso);
}
.tabbar a:active { transform: scale(.94); }

/* Hero: il logo originale */
.hero { padding: 1.75rem var(--gutter) 2rem; text-align: center; }
.hero h1 { margin: 0 auto; max-width: 900px; }
.hero h1 img { width: 100%; height: auto; }
.intro { margin: 1.5rem auto 0; max-width: 34ch; color: var(--grigio); font-size: 1.05rem; }
.azioni {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem;
  max-width: 30rem; margin: 1.5rem auto 0;
}
.azioni a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem;
  min-height: 4.5rem; border-radius: 10px;
  background: var(--carbone); border: 1px solid rgba(255, 255, 255, .1);
  text-decoration: none; font-weight: 600; font-size: .9rem;
}
.azioni a:first-child { background: var(--rosso); border-color: var(--rosso); }
.azioni a:active { transform: scale(.96); }

/* Sezioni */
.serate, .album-view, .menu, .contatti { padding: 2.25rem var(--gutter); }
.sotto { margin: 0 0 1.5rem; color: var(--grigio); }

/* Elenco album */
.albums { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem .75rem; }
.album-card { text-decoration: none; display: block; }
.album-card .cover { position: relative; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 6px; background: var(--carbone); }
.album-card img { width: 100%; height: 100%; object-fit: cover; }
.album-card:active img { opacity: .8; }
.album-card h3 {
  margin: .6rem 0 0;
  font-family: var(--titoli); font-weight: 400; text-transform: uppercase;
  font-size: 1.35rem; line-height: 1.05; letter-spacing: .01em;
}
.album-card p { margin: .2rem 0 0; color: var(--grigio); font-size: .875rem; }
.album-card:first-child { grid-column: 1 / -1; }
.album-card:first-child .cover { aspect-ratio: 4 / 3; }
.album-card:first-child h3 { font-size: 2rem; }
.nuovo {
  position: absolute; top: .6rem; left: .6rem;
  background: var(--rosso); color: var(--bianco);
  font-weight: 700; font-size: .8rem; padding: .25em .7em; border-radius: 4px;
}
.empty { color: var(--grigio); }

/* Vista album */
.album-view { padding-left: 0; padding-right: 0; }
.album-view > :not(.photos) { margin-left: var(--gutter); margin-right: var(--gutter); }
.back {
  display: inline-flex; align-items: center; min-height: 2.75rem;
  font-weight: 600; text-decoration: none;
}
.back::before { content: "‹"; color: var(--rosso); font-size: 1.7rem; line-height: 1; margin-right: .4rem; }
.album-view h2 { margin-top: .25rem; margin-bottom: .25rem; }
.album-data { color: var(--grigio); margin-top: 0; margin-bottom: 1.25rem; }
.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; }
.photos button {
  display: block; padding: 0; border: 0; aspect-ratio: 1;
  background: var(--carbone); cursor: zoom-in; overflow: hidden;
}
.photos img { width: 100%; height: 100%; object-fit: cover; }
.photos button:active img { opacity: .75; }

/* Menu: fondo bianco, come un foglio sul tavolo */
.menu { background: var(--bianco); color: var(--nero); }
.menu h2 { border-bottom: 4px solid var(--rosso); padding-bottom: .5rem; display: inline-block; margin-bottom: 1.5rem; }
.menu-testo { margin: 0 0 1.25rem; color: #555; }
.btn svg { margin-right: .5rem; }
.btn {
  display: flex; align-items: center; justify-content: center;
  min-height: 3.75rem; width: 100%; font-size: 1.1rem;
  background: var(--nero); color: var(--bianco);
  font-weight: 700; padding: 0 1.5em; border-radius: 10px; text-decoration: none;
}
.btn:active { background: var(--rosso); }

/* Dove siamo */
.info { list-style: none; margin: 1.25rem 0 0; padding: 0; border-top: 1px solid rgba(255,255,255,.12); }
.info li { border-bottom: 1px solid rgba(255,255,255,.12); }
.info a {
  display: flex; align-items: center; gap: 1rem;
  min-height: 4rem; padding: .75rem 0;
  text-decoration: none; font-weight: 500; font-size: 1.05rem; line-height: 1.35;
}
.info svg { color: var(--rosso); }
.info small { display: block; color: var(--grigio); font-size: .875rem; font-weight: 400; }
.info a:active { opacity: .7; }

/* Piè di pagina */
.foot { padding: 2rem var(--gutter) 2.5rem; color: var(--grigio); font-size: .9rem; text-align: center; }
.foot p { margin: 0; }
.foot-claim {
  font-family: var(--titoli); text-transform: uppercase; color: var(--bianco);
  font-size: 1.4rem; letter-spacing: .02em; margin-bottom: .3rem !important;
}

/* Foto a schermo intero */
.lightbox {
  position: fixed; inset: 0;
  width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: #000; color: var(--bianco);
  overscroll-behavior: contain;
  touch-action: pan-y pinch-zoom;
}
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox::backdrop { background: #000; }
.lightbox img {
  width: 100%; height: 100%; object-fit: contain;
  transition: transform .2s ease, opacity .2s ease;
  user-select: none; -webkit-user-drag: none;
}
.lb-bar {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(.25rem + env(safe-area-inset-top, 0px)) .25rem .25rem;
  background: linear-gradient(rgba(0,0,0,.6), transparent);
}
.lb-bar button, .lb-prev, .lb-next {
  background: none; border: 0; color: var(--bianco); cursor: pointer;
  width: 3rem; height: 3rem; display: grid; place-items: center;
}
.lb-count { margin: 0; font-size: .95rem; font-variant-numeric: tabular-nums; }
.lb-prev, .lb-next { display: none; position: absolute; top: 50%; transform: translateY(-50%); font-size: 2.6rem; font-weight: 700; }
.lb-prev { left: .5rem; }
.lb-next { right: .5rem; }
.lb-share[hidden] { visibility: hidden; display: grid; }

/* Tablet e computer */
@media (min-width: 760px) {
  :root { --gutter: clamp(1.5rem, 4vw, 3rem); }
  body { padding-bottom: 0; }
  .tabbar { display: none; }
  .top { height: 4rem; }
  .top-nav { display: flex; gap: 2rem; }
  .top-nav a { text-decoration: none; font-weight: 600; padding: .5rem 0; border-bottom: 2px solid transparent; }
  .top-nav a:hover { border-color: var(--rosso); }

  .hero { padding: 4rem var(--gutter) 4.5rem; }
  .intro { font-size: 1.2rem; }
  .azioni a:hover { border-color: var(--bianco); }
  .azioni a:first-child:hover { border-color: var(--rosso); filter: brightness(1.1); }

  .serate, .menu, .contatti { padding: 4rem var(--gutter); }
  .albums { grid-template-columns: repeat(3, 1fr); gap: 2rem; }
  .album-card:first-child { grid-column: auto; }
  .album-card:first-child .cover { aspect-ratio: 4 / 5; }
  .album-card h3, .album-card:first-child h3 { font-size: 1.75rem; }
  .album-card img { transition: transform .4s ease; }
  .album-card:hover img { transform: scale(1.04); }

  .album-view { padding: 3rem var(--gutter); }
  .album-view > :not(.photos) { margin-left: 0; margin-right: 0; }
  .photos { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .75rem; }
  .photos button { border-radius: 4px; }

  .btn { width: auto; display: inline-flex; }
  .btn:hover { background: var(--rosso); }

  .info { max-width: 34rem; }
  .info a:hover span { text-decoration: underline; text-decoration-color: var(--rosso); text-underline-offset: 4px; }

  .lightbox img { width: auto; height: auto; max-width: calc(100% - 9rem); max-height: 88vh; }
  .lb-prev, .lb-next { display: grid; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .album-card img, .lightbox img { transition: none; }
}
