/* ---- FONT (ospitati sul sito, nessuna connessione a Google — licenza SIL OFL 1.1, vedi assets/fonts) ---- */
@font-face { font-family: 'Playfair Display'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/playfair-display-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Playfair Display'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/playfair-display-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Playfair Display'; font-style: italic; font-weight: 400; font-display: swap; src: url('../fonts/playfair-display-latin-400-italic.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 300; font-display: swap; src: url('../fonts/inter-latin-300-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/inter-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/inter-latin-500-normal.woff2') format('woff2'); }

:root {
  /* Palette calda, tendente al rosso — base: bordeaux del footer */
  --bg:          #fcf7f2;   /* crema caldo */
  --bg-alt:      #f5e8e2;   /* rosato chiaro */
  --bg-dark:     #5a1e1c;   /* bordeaux (ex verde scuro) */
  --bg-wine:     #5a1e1c;   /* bordeaux footer */
  --bg-wine-deep:#3d1211;   /* bordeaux profondo per sfumature */
  --text:        #2f1513;   /* bruno-bordeaux molto scuro */
  --text-muted:  #7a5550;   /* rosa antico spento */
  --accent:      #b8321f;   /* rosso pomodoro */
  --accent-light:#f0a982;   /* pesca */
  --accent-pale: rgba(184, 50, 31, 0.07);
  --border:      #e8d5cd;   /* bordo rosato */
  --shadow:      rgba(90, 30, 28, 0.18);
  --font-serif:  'Playfair Display', Georgia, serif;
  --font-sans:   'Inter', system-ui, sans-serif;
  --max-w:       1600px;
  --ease:        cubic-bezier(0.22, 0.61, 0.36, 1);   /* uscita morbida, usata ovunque */
  --skeleton:    rgba(140, 100, 95, 0.16);
  --heading:     #5a1e1c;   /* titoli bordeaux */
  --on-dark:     #fcf7f2;   /* testo chiaro su sfondi scuri: uguale in entrambi i temi */
  color-scheme: light dark;
}

/* Tema scuro automatico se il telefono/PC è in modalità scura */
@media (prefers-color-scheme: dark) {
  :root {
    /* Stessa logica del tema chiaro: fondo caldo, superfici un gradino più chiare,
       rosso pomodoro dello stesso tono ma più luminoso, contrasti simili al chiaro */
    --bg:          #1a1211;   /* bruno caldo quasi nero */
    --bg-alt:      #2a1c1a;   /* superfici (testate, card): un gradino sopra il fondo */
    --bg-dark:     #3a1614;   /* bordeaux scuro (home) */
    --bg-wine:     #2e1110;   /* bordeaux footer / striscia info */
    --bg-wine-deep:#1f0b0a;
    --text:        #f2e7e2;   /* panna */
    --text-muted:  #a8908a;
    --accent:      #e8664f;   /* pomodoro, contrasto 5.7 sul fondo come nel chiaro */
    --accent-light:#f3b08f;
    --accent-pale: rgba(232, 102, 79, 0.10);
    --border:      #3b2926;
    --shadow:      rgba(0, 0, 0, 0.55);
    --skeleton:    rgba(255, 240, 235, 0.07);
    --heading:     #efc9bb;   /* rosa cipria al posto del bordeaux */
  }

  /* La mappa di Google è sempre chiara: la attenuo perché non abbagli */
  .map-placeholder iframe { filter: brightness(0.82) contrast(1.05); }
}

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

html {
  scroll-behavior: smooth;
  /* Niente riquadro blu al tocco su telefono */
  -webkit-tap-highlight-color: transparent;
}

/* Niente contorno al click col mouse, ma resta visibile per chi naviga da tastiera */
:focus:not(:focus-visible) { outline: none; }

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

/* Elementi cliccabili: il doppio click non seleziona il testo */
a, button, .nav-toggle {
  -webkit-user-select: none;
  user-select: none;
}

::selection {
  background-color: rgba(184, 50, 31, 0.18);
  color: inherit;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

/* ---- HEADER ---- */

header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--bg);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 48px;
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 700;
  color: var(--heading);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.01em;
}

nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 44px;
}

nav a {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.03em;
  transition: color 0.25s var(--ease);
}

nav a:hover,
nav a.active {
  color: var(--accent);
}

/* Sottolineatura che si allunga da sinistra */
nav a { position: relative; }
nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 1px;
  background-color: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
nav a:hover::after,
nav a.active::after { transform: scaleX(1); }

/* ---- HAMBURGER ---- */

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--text);   /* panna in modalità scura, scuro in quella chiara (sul fondo crema) */
  transition: transform 0.3s var(--ease), opacity 0.2s var(--ease);
}

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---- HERO ---- */

#hero {
  background-color: var(--bg-dark);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  height: 75vh;
  height: 75svh;
  min-height: 480px;
}

.hero-content {
  max-width: var(--max-w);
  margin: 0 auto;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  min-height: 0;
  padding: 0 48px 48px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  z-index: 2;
}

#hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(42px, 9vw, 84px);
  font-weight: 700;
  line-height: 1.05;
  color: var(--on-dark);
  max-width: 600px;
  letter-spacing: 0;
  margin-bottom: 28px;
}

#hero h1 em {
  font-style: italic;
  font-weight: 400;
  color: var(--accent-light);
}

.hero-photo {
  position: absolute;
  inset: 0;
  display: block;
}

.hero-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  display: block;
}

#hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    to top,
    rgba(45, 12, 11, 0.92) 0%,
    rgba(45, 12, 11, 0.45) 40%,
    rgba(45, 12, 11, 0) 70%
  );
}

@media (min-width: 861px) {
  #hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    height: auto;
    min-height: 75vh;
  }

  #hero h1 {
    font-size: clamp(42px, 4.5vw, 64px);
  }

  #hero::after { display: none; }

  .hero-photo {
    position: relative;
    inset: auto;
    order: 2;
    min-height: 420px;
  }

  .hero-content {
    position: relative;
    order: 1;
    max-width: none;
    margin: 0;
    padding: 64px 48px 64px max(48px, calc((100vw - var(--max-w)) / 2 + 48px));
    justify-content: center;
  }
}

/* ---- BUTTONS ---- */

.btn {
  display: inline-block;
  background-color: transparent;
  color: #fff;
  padding: 13px 30px;
  border: 1px solid currentColor;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease), transform 0.2s var(--ease);
}

.btn:hover {
  background-color: rgba(255, 255, 255, 0.12);
}

.btn:active,
.scelta-btn:active {
  transform: scale(0.98);
}

/* ---- PAGE HERO (sottopagine) ---- */

/* Solo titolo, più bassa (pagina Immagini) */
.page-hero.page-hero-compatta { min-height: 0; padding: 36px 0 32px; }

.page-hero {
  background-color: var(--bg-alt);
  padding: 56px 0 52px;
  min-height: 258px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.page-hero-content {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 48px;
  position: relative;
  z-index: 1;
}

.page-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(36px, 8vw, 68px);
  font-weight: 700;
  line-height: 1.1;
  color: var(--heading);
  letter-spacing: 0;
}

.photo-page-hero h1 {
  color: #fff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.28);
}

.page-hero-deco {
  position: absolute;
  right: -72px;
  top: 50%;
  transform: translateY(-50%);
  width: 230px;
  aspect-ratio: 1;
  opacity: 0.65;
  pointer-events: none;
}

.page-hero-deco img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-page-hero {
  min-height: 340px;
}

.page-hero-deco.page-hero-background {
  inset: 0;
  width: auto;
  height: auto;
  aspect-ratio: auto;
  opacity: 1;
  transform: none;
  z-index: 0;
}

.page-hero-deco.page-hero-background::after {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(61, 18, 17, 0.8), rgba(61, 18, 17, 0.42) 42%, rgba(61, 18, 17, 0.08) 78%),
    linear-gradient(0deg, rgba(61, 18, 17, 0.2), transparent 55%);
  content: "";
}

@media (max-width: 480px) {
  .photo-page-hero {
    min-height: 258px;
  }
}

/* ---- UTILITY ---- */

.section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 80px 48px;
}

.section-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.link-arrow {
  display: inline-block;
  margin-top: 24px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  padding-bottom: 2px;
  transition: border-color 0.15s, color 0.15s;
}

.link-arrow:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.link-arrow::after {
  content: "→";
  display: inline-block;
  margin-left: 6px;
  transition: transform 0.25s var(--ease);
}
.link-arrow:hover::after { transform: translateX(4px); }

.link-arrow.light {
  color: var(--on-dark);
  border-color: rgba(251, 248, 240, 0.45);
}

.link-arrow.light:hover {
  color: #fff;
  border-color: #fff;
}

/* ---- HOMEPAGE: PREVIEW MENU ---- */

.preview-menu {
  background-color: var(--bg);
  border-bottom: 1px solid var(--border);
}

.about-section {
  background-color: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}

.about-section h2 {
  font-family: var(--font-serif);
  font-size: clamp(26px, 3.5vw, 40px);
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 16px;
}

.about-section p {
  max-width: 680px;
  font-size: 16px;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.75;
}

.preview-menu .section-inner > h2 {
  font-family: var(--font-serif);
  font-size: clamp(26px, 3.5vw, 40px);
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 36px;
}

/* ---- HOMEPAGE: INFO STRIP ---- */

.info-strip {
  background-color: var(--bg-wine);
}

.info-strip .section-inner {
  padding-top: 56px;
  padding-bottom: 56px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
}

.info-item h4 {
  font-size: 15px;
  font-weight: 500;
  color: var(--on-dark);
  margin-bottom: 12px;
}

.info-item p {
  font-size: 16px;
  font-weight: 300;
  color: var(--on-dark);
  line-height: 1.75;
  margin-bottom: 8px;
}

.info-item a {
  color: var(--on-dark);
  text-decoration: none;
  border-bottom: 1px solid rgba(251, 248, 240, 0.45);
  transition: color 0.15s, border-color 0.15s;
}

.info-item a:hover {
  color: #fff;
  border-color: var(--accent);
}

/* ---- MENU LIST (condiviso) ---- */

.menu-list {
  list-style: none;
}

.menu-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 10px;
  border-bottom: 1px solid var(--border);
  transition: background-color 0.3s var(--ease);
}

.menu-list li:hover {
  background-color: var(--accent-pale);
}

.menu-item-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.menu-item-info strong {
  font-size: 17px;
  font-weight: 500;
  color: var(--text);
}

.menu-item-info span {
  font-size: 15px;
  font-weight: 300;
  color: var(--text-muted);
}

.price {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: auto;
}


/* ---- ACCESSIBILITÀ ---- */

/* Link "Vai al contenuto": nascosto finché non ci arrivi col tasto Tab */
.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 400;
  padding: 10px 18px;
  background-color: var(--accent);
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  transition: top 0.2s var(--ease);
}

.skip-link:focus { top: 12px; }

/* ---- IMPASTI (pagina menu) ---- */

.impasti-ingredienti {
  padding: 14px 10px 0;
  font-size: 15px;
  font-weight: 300;
  color: var(--text-muted);
}

/* ---- GALLERIA IMMAGINI ---- */

.galleria-section {
  background-color: var(--bg);
}

/* Galleria a mosaico: riquadri piccoli, alti (.alta), larghi (.larga) e grandi (.grande)
   alternati; "dense" riempie i buchi così non restano spazi vuoti */
.galleria {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 230px;
  grid-auto-flow: dense;
  gap: 14px;
}

.galleria .alta   { grid-row: span 2; }
.galleria .larga  { grid-column: span 2; }
.galleria .grande { grid-column: span 2; grid-row: span 2; }

@media (max-width: 1100px) {
  .galleria { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 200px; }
}

@media (max-width: 700px) {
  .galleria { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 150px; gap: 10px; }
  .galleria .larga { grid-column: span 2; }
}

.galleria > div {
  border-radius: 14px;
  overflow: hidden;
}

.galleria img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Video nel mosaico: senza audio, in loop, partono quando entrano nello schermo */
.galleria-video {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background-color: var(--skeleton);
}

.galleria-video video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Piccola etichetta "video" nell'angolo */
.galleria-video::after {
  content: "";
  position: absolute;
  top: 10px;
  right: 10px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 7px 0 7px 11px;
  border-color: transparent transparent transparent rgba(255, 255, 255, 0.9);
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.5));
  pointer-events: none;
}

/* ---- COSA DICONO DI NOI ---- */

.reviews-section {
  background-color: var(--bg);
  border-bottom: 1px solid var(--border);
}

.reviews-section h2 {
  font-family: var(--font-serif);
  font-size: clamp(26px, 3.5vw, 40px);
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 36px;
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.reviews-rating {
  font-size: 15px;
  color: var(--text-muted);
  margin: -24px 0 32px;
}

.reviews-rating a {
  color: var(--accent);
}

.review-card {
  background-color: var(--bg-alt);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  padding: 28px;
}

.review-stars {
  color: var(--accent);
  font-size: 16px;
  letter-spacing: 0.15em;
  margin-bottom: 12px;
}

.review-card p {
  font-size: 15px;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 16px;
}

.review-author {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 700;
  font-style: italic;
  color: var(--text);
}

/* ---- SCELTA PIZZERIA ---- */

html.scelta-aperta,
html.scelta-aperta body {
  overflow: hidden;
}

.scelta-pizzeria {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100svh;
  z-index: 200;
  background: var(--bg-wine);
  display: grid;
  grid-template-columns: minmax(0, 460px);
  align-content: center;
  justify-content: center;
  gap: 20px;
  /* Margini che rispettano Dynamic Island / notch e barra home dell'iPhone,
     con un po' di respiro in più: a filo dell'area sicura il testo finiva sotto l'isola */
  padding:
    max(28px, calc(env(safe-area-inset-top) + 16px))
    max(20px, calc(env(safe-area-inset-right) + 12px))
    max(28px, calc(env(safe-area-inset-bottom) + 12px))
    max(20px, calc(env(safe-area-inset-left) + 12px));
  text-align: center;
}

.scelta-pizzeria .section-label {
  color: var(--accent-light);
  margin: 0 0 4px;
}

.scelta-btn {
  display: block;
  width: 100%;
  padding: 26px 24px;
  border: 1px solid rgba(251, 248, 240, 0.5);
  border-radius: 18px;
  color: var(--on-dark);
  text-decoration: none;
  font-family: var(--font-serif);
  font-size: clamp(22px, 2.4vw, 32px);
  font-weight: 700;
  line-height: 1.2;
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.2s var(--ease);
}

.scelta-btn:hover {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: #fff;
}

.scelta-btn-foto {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 14px;
  overflow: hidden;
  min-height: 0;
}

.scelta-btn-foto img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
}

/* Punto focale delle foto delle vetrine: quando il riquadro taglia la foto
   (es. telefono), l'insegna resta sempre visibile */
.scelta-btn-foto img.foto-urago { object-position: 50% 28%; }
.scelta-btn-foto img.foto-borgo { object-position: 62% 22%; }

.scelta-btn-foto span {
  display: block;
  flex-shrink: 0;
  padding: 2px 8px 4px;
}

/* PC e tablet orizzontale: le due pizzerie affiancate, foto sopra */
@media (min-width: 900px) {
  .scelta-pizzeria {
    grid-template-columns: repeat(2, minmax(0, 600px));
    gap: 28px 32px;
    padding-left: 48px;
    padding-right: 48px;
  }

  .scelta-pizzeria .section-label {
    grid-column: 1 / -1;
    margin-bottom: 8px;
  }

  .scelta-btn-foto {
    padding: 16px;
    gap: 20px;
  }

  .scelta-btn-foto img {
    order: -1;
    aspect-ratio: 4 / 3;
    max-height: calc(100svh - 260px);
  }
}

/* Telefono verticale: due riquadri che riempiono lo schermo */
@media (max-width: 600px) and (orientation: portrait) {
  .scelta-pizzeria {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) minmax(0, 1fr);
    align-content: stretch;
    gap: 14px;
    padding-top: max(20px, calc(env(safe-area-inset-top) + 16px));
    padding-bottom: max(20px, calc(env(safe-area-inset-bottom) + 12px));
    padding-left: max(16px, calc(env(safe-area-inset-left) + 12px));
    padding-right: max(16px, calc(env(safe-area-inset-right) + 12px));
  }

  .scelta-pizzeria .section-label {
    font-size: 11px;
    margin: 2px 0 0;
  }

  .scelta-btn-foto {
    gap: 10px;
    padding: 10px;
  }

  .scelta-btn-foto img {
    flex: 1 1 0;
    min-height: 0;
    aspect-ratio: auto;
  }

  .scelta-btn-foto span {
    font-size: 22px;
  }
}

/* Telefono orizzontale: affiancate e compatte */
@media (orientation: landscape) and (max-height: 520px) {
  .scelta-pizzeria {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto minmax(0, 1fr);
    align-content: stretch;
    gap: 10px 16px;
    padding-top: max(14px, calc(env(safe-area-inset-top) + 12px));
    padding-bottom: max(14px, calc(env(safe-area-inset-bottom) + 12px));
  }

  .scelta-pizzeria .section-label {
    grid-column: 1 / -1;
    font-size: 11px;
    margin: 0;
  }

  .scelta-btn-foto {
    gap: 8px;
    padding: 10px;
  }

  .scelta-btn-foto img {
    order: -1;
    flex: 1 1 0;
    min-height: 0;
    aspect-ratio: auto;
    max-height: none;
  }

  .scelta-btn-foto span {
    font-size: 20px;
    padding: 0 6px;
  }
}

/* ---- MENU PAGE ---- */

.menu-page {
  background-color: var(--bg);
}

.menu-inner {
  padding-top: 64px;
  padding-bottom: 80px;
}

.menu-format-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-top: 56px;
  padding-top: 56px;
  border-top: 1px solid var(--border);
}

.menu-category {
  margin-bottom: 52px;
}

.menu-category:last-child {
  margin-bottom: 0;
}

.menu-category h3 {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 400;
  font-style: italic;
  color: var(--heading);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}

/* ---- CONTATTI PAGE ---- */

.contatti-page {
  background-color: var(--bg);
  border-bottom: 1px solid var(--border);
}

.contatti-top {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 48px;
}

.contatto-block h4 {
  font-size: 15px;
  font-weight: 500;
  color: var(--heading);
  margin-bottom: 14px;
}

.contatto-block p {
  font-size: 17px;
  font-weight: 300;
  color: var(--text);
  line-height: 1.65;
  margin-bottom: 10px;
}

.contatto-block p.muted {
  font-size: 15px;
  color: var(--text-muted);
  margin-top: 6px;
}

.contatto-block a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  transition: color 0.15s;
}

.contatto-block a:hover {
  color: var(--accent);
}

.orari-section {
  background-color: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}

.orari-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.orari-grid h2 {
  font-family: var(--font-serif);
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 12px;
}

.orari-note {
  font-size: 15px;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.7;
}

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

.orari-table td {
  padding: 13px 0;
  font-size: 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-weight: 300;
}

.orari-table td:first-child {
  font-weight: 500;
  width: 130px;
}

.orari-table .closed-day { color: var(--text-muted); }

.map-placeholder {
  background-color: var(--bg-alt);
  border-top: 1px solid var(--border);
}

.map-placeholder iframe {
  display: block;
  width: 100%;
  height: 380px;
  border: 0;
}

/* Skeleton anche per la mappa finché Google Maps non ha caricato */
.map-placeholder iframe.is-loading {
  background-color: var(--skeleton);
  animation: skeleton 1.1s ease-in-out infinite alternate;
}

/* Mappa caricata solo dopo il consenso (GDPR): finché non si clicca, nessuna connessione a Google */
.map-consenso {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 380px;
  padding: 32px 24px;
  text-align: center;
  background-color: var(--bg-alt);
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

.map-consenso p { max-width: 520px; }

.map-consenso a { color: var(--accent); }

.map-consenso .btn {
  color: var(--accent);
  cursor: pointer;
  font-family: inherit;
}

.map-consenso .btn:hover { background-color: var(--accent-pale); }

/* ---- ALLERGENI: icone sotto gli ingredienti e legenda nel footer ---- */
.sprite-allergeni { position: absolute; width: 0; height: 0; overflow: hidden; }

/* Icone accanto al nome della pizza */
.menu-item-info strong .allergeni {
  display: inline-flex;
  gap: 4px;
  margin-left: 8px;
  vertical-align: -2px;
  color: var(--accent);
  opacity: 0.8;
  font-size: inherit;
}

.menu-item-info strong .allergeni svg { width: 16px; height: 16px; }

.allergeni svg,
.legenda-allergeni svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.footer-legenda {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 26px 48px 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--on-dark);
  opacity: 0.8;
}

.footer-legenda p { margin-top: 6px; }

.legenda-titolo { font-weight: 500; }

/* Contatti nel footer: telefono e Instagram */
.footer-contatti {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 22px;
}

.footer-contatti a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-light);   /* stesso colore delle icone allergeni */
  text-decoration: none;
  font-size: 14px;
}

.footer-contatti svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.footer-contatti a:hover { color: #fff; }
/* più specifiche di ".footer-inner a" (che le faceva ereditare il bianco) */
.footer-inner .footer-contatti a { color: var(--accent-light); }
.footer-inner .footer-contatti a:hover { color: #fff; }

.legenda-allergeni {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: 8px;
}

.legenda-allergeni li {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legenda-allergeni svg { width: 16px; height: 16px; color: var(--accent-light); }

@media (max-width: 600px) {
  .footer-legenda { padding: 24px 20px 0; }
}

/* Pagina privacy */
.privacy-testo { max-width: 820px; line-height: 1.75; }
.privacy-testo h2 { font-family: var(--font-serif); color: var(--heading); font-size: 22px; margin: 36px 0 12px; }
.privacy-testo p, .privacy-testo ul { margin-bottom: 14px; }
.privacy-testo ul { padding-left: 22px; }
.privacy-testo a { color: var(--accent); }

/* Link privacy nella pagina di scelta (sta nel margine in basso, sopra lo sfondo fisso) */
.scelta-privacy {
  position: fixed;
  z-index: 201;
  right: max(14px, env(safe-area-inset-right));
  bottom: max(2px, env(safe-area-inset-bottom));
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--on-dark);
  opacity: 0.7;
  text-decoration: none;
}
.scelta-privacy:hover { opacity: 1; text-decoration: underline; }

.footer-inner a { color: inherit; }
.footer-inner a:hover { color: var(--accent-light); }

.map-address {
  padding: 16px 24px;
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
}

.map-address a {
  color: inherit;
  text-decoration: none;
}

.map-address a:hover {
  color: var(--accent);
}

/* ---- FOOTER ---- */

footer {
  background-color: var(--bg-wine);
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 36px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-logo {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.footer-inner p:last-child {
  font-size: 14px;
  color: var(--on-dark);
}

/* Skeleton mentre la foto si carica, poi dissolvenza */
img.img-loading {
  background-color: var(--skeleton);
  animation: skeleton 1.1s ease-in-out infinite alternate;
  color: transparent;            /* nasconde il testo alt durante il caricamento */
}

/* Da sfocata a nitida. "backwards": finita l'animazione il filtro torna libero (serve all'effetto hover) */
img.img-loaded {
  animation: fotoIn 0.7s var(--ease) backwards;
}

@keyframes fotoIn {
  from { opacity: 0; filter: blur(10px); }
  to   { opacity: 1; filter: blur(0); }
}

/* Ingresso pagina: solo dissolvenza, su main (un transform sul body romperebbe gli elementi fissi) */
main { animation: imgIn 0.35s var(--ease) both; }

/* Passaggio tra pagine fluido (Chrome, Edge, Safari recenti): il browser sfuma dalla vecchia alla nuova.
   Dove c'è, la dissolvenza di main non serve (sommate davano uno scatto) */
@view-transition { navigation: auto; }
::view-transition-old(root),
::view-transition-new(root) { animation-duration: 0.35s; animation-timing-function: ease-out; }
@supports (view-transition-name: none) {
  main { animation: none; }
}

/* Titoli che salgono appena; il secondo elemento (pulsante) arriva dopo */
.hero-content > *,
.page-hero-content > * { animation: sali 0.7s var(--ease) both; }
.hero-content > *:nth-child(2),
.page-hero-content > *:nth-child(2) { animation-delay: 0.12s; }

@keyframes sali {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

/* Foto grandi in cima alle pagine: si "assestano" una volta all'apertura */
/* Senza skeleton né dissolvenza (vedi skeleton() nel JS): cambiare animazione al caricamento la faceva ripartire con uno scatto */
.hero-photo img,
.page-hero-background img { animation: assesta 1.8s var(--ease) both; }

@keyframes assesta {
  from { transform: scale(1.06); }
  to   { transform: none; }
}

/* Pagina di scelta: scritta e pizzerie entrano in sequenza; al passaggio la scheda si solleva appena */
/* "backwards": finita l'entrata, il transform torna libero per il sollevamento al passaggio */
.scelta-pizzeria > * { animation: sali 0.6s var(--ease) backwards; }
.scelta-pizzeria > *:nth-child(2) { animation-delay: 0.1s; }
.scelta-pizzeria > *:nth-child(3) { animation-delay: 0.2s; }
.scelta-btn:hover { transform: translateY(-3px); }

/* Menu a tendina su telefono: voci in sequenza */
nav.open li { animation: sali 0.35s var(--ease) both; }
nav.open li:nth-child(2) { animation-delay: 0.04s; }
nav.open li:nth-child(3) { animation-delay: 0.08s; }
nav.open li:nth-child(4) { animation-delay: 0.12s; }
nav.open li:nth-child(5) { animation-delay: 0.16s; }

/* Telefoni e tablet (touch): animazioni più lente e leggere.
   Niente sfocatura (pesante per il telefono), solo dissolvenze e spostamenti piccoli */
@keyframes saliPiano {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}
@keyframes assestaPiano {
  from { transform: scale(1.03); }
  to   { transform: none; }
}

@media (hover: none) and (pointer: coarse) {
  main { animation-duration: 0.5s; }
  img.img-loaded { animation: imgIn 0.8s ease-out backwards; }
  .hero-photo img,
  .page-hero-background img { animation: assestaPiano 2.4s ease-out both; }
  .hero-content > *,
  .page-hero-content > * { animation: saliPiano 0.9s ease-out both; }
  .hero-content > *:nth-child(2),
  .page-hero-content > *:nth-child(2) { animation-delay: 0.18s; }
  .scelta-pizzeria > * { animation: saliPiano 0.8s ease-out backwards; }
  .scelta-pizzeria > *:nth-child(2) { animation-delay: 0.15s; }
  .scelta-pizzeria > *:nth-child(3) { animation-delay: 0.3s; }
  nav.open li { animation: saliPiano 0.45s ease-out both; }
  .galleria-video video { transition-duration: 0.8s; }
}

/* Righe del menu: il prezzo si scurisce insieme allo sfondo */
.price { transition: color 0.3s var(--ease); }
.menu-list li:hover .price { color: var(--heading); }

/* Passaggio del mouse sulle foto: leggera luce, niente zoom */
.galleria img,
.scelta-btn-foto img { transition: filter 0.3s var(--ease); }
.galleria > div:hover img,
.scelta-btn-foto:hover img { filter: brightness(1.07); }

/* Skeleton sui video finché la copertina non è pronta */
.galleria-video.is-loading {
  animation: skeleton 1.1s ease-in-out infinite alternate;
}
.galleria-video video { transition: opacity 0.5s var(--ease); }
.galleria-video.is-loading video { opacity: 0; }

/* Pulsazione morbida avanti e indietro (alternate): nessuna ripartenza, quindi nessuno scatto */
@keyframes skeleton {
  from { opacity: 1; }
  to   { opacity: 0.45; }
}

@keyframes imgIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  img.img-loading,
  img.img-loaded,
  main,
  .galleria-video.is-loading,
  .hero-content > *,
  .page-hero-content > *,
  .hero-photo img,
  .page-hero-background img,
  .hero-photo img.img-loaded,
  .page-hero-background img.img-loaded,
  .scelta-pizzeria > *,
  nav.open li {
    animation: none;
  }

  .scelta-btn:hover { transform: none; }

  nav a::after,
  .link-arrow::after { transition: none; }

  .map-placeholder iframe.is-loading {
    transition: none;
    animation: none;
  }
}

/* ---- RESPONSIVE ---- */

@media (max-width: 860px) {
  .section-inner { padding-top: 56px; padding-bottom: 56px; }

  .menu-inner { padding-top: 48px; padding-bottom: 64px; }

  .orari-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .menu-format-grid {
    grid-template-columns: 1fr;
    gap: 0;
    border-top: none;
    padding-top: 0;
  }

  .contatti-top,
  .info-grid,
  .reviews-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .info-strip .section-inner {
    padding-top: 48px;
    padding-bottom: 48px;
  }
}

@media (max-width: 600px) {
  .header-inner { padding: 0 20px; height: 64px; }

  .nav-toggle { display: flex; }

  nav {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background-color: var(--bg-alt);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease;
  }

  nav.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  nav ul {
    flex-direction: column;
    gap: 0;
    padding: 0 0 8px;
    align-items: flex-start;
  }

  nav li {
    width: 100%;
    border-bottom: 1px solid var(--border);
  }

  nav li:last-child {
    border-bottom: 0;
  }

  nav a {
    display: block;
    padding: 13px 24px;
    font-size: 16px;
    letter-spacing: 0;
    color: var(--text);
  }

  .section-inner,
  .page-hero-content,
  .hero-content,
  .footer-inner {
    padding-left: 20px;
    padding-right: 20px;
  }

  .hero-content { padding-top: 0; padding-bottom: 32px; }

  .btn { padding: 14px 26px; width: 100%; text-align: center; }

  .preview-menu .section-inner > h2 { margin-bottom: 24px; }

  .menu-list li { padding: 14px 10px; }

  .menu-item-info strong { font-size: 16px; }

  .menu-item-info span { font-size: 14px; }

  .price { font-size: 17px; }

  .contatto-block p { font-size: 16px; }

  .orari-table td { font-size: 15px; padding: 11px 0; }

  .orari-table td:first-child { width: 110px; }

  .footer-inner {
    flex-direction: column;
    gap: 6px;
    text-align: center;
    padding: 28px 20px;
  }
}