/* ═══════════════════════════════════════════════════════════════
   Osteria al Portone — Milano Bicocca
   Concept: «Dietro il portone». Il nome è il gesto: due battenti si
   scostano e mostrano la sala arancione che il vecchio sito non
   riusciva a far vedere («il sito web non rende assolutamente
   giustizia», scritto da un cliente).
   Palette dalle FOTO REALI della sala: arancione acceso delle pareti,
   mattone, legno scuro, tovagliolo verde, bianco della tovaglia.
   ═══════════════════════════════════════════════════════════════ */

/* ── plumbing (reset tecnico canonico) ─────────────────────────── */
[hidden] { display: none !important; }
img { max-width: 100%; height: auto; }

.js .reveal { opacity: 0; }
.js .reveal.in-view { opacity: 1; }
html:not(.js) .reveal { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
  .hero__testo > *, .hero__foto { opacity: 1 !important; transform: none !important; }
}

/* ── design system ─────────────────────────────────────────────── */
:root {
  --bruno:    #2A1A12;
  --bruno-2:  #3B271B;
  --mattone:  #8C4A2F;
  --ocra:     #F0A32B;
  --ocra-d:   #D2861A;
  --verde-t:  #40614A;
  --crema:    #FFF8EE;
  --crema-d:  #EFE2D0;
  --grigio:   #9A8A79;

  --serif: 'Brygada 1918', Georgia, serif;
  --sans:  'Red Hat Text', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --wrap: 1160px;
  --gut: clamp(20px, 5vw, 58px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--crema);
  color: var(--bruno);
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(16px, 1.05vw, 17.5px);
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.18; margin: 0; }
p { margin: 0 0 1.1em; }
a { color: inherit; }
::selection { background: var(--ocra); color: var(--bruno); }

.occhiello {
  font-size: .7rem; letter-spacing: .26em; text-transform: uppercase;
  color: var(--mattone); font-weight: 600; margin-bottom: .8rem;
}
.btn {
  display: inline-block; padding: .92em 1.9em; border-radius: 3px;
  font-size: .85rem; letter-spacing: .04em; font-weight: 600;
  text-decoration: none; transition: background .25s, color .25s, border-color .25s;
}
.btn--ocra { background: var(--ocra); color: var(--bruno); }
.btn--ocra:hover { background: var(--ocra-d); }
.btn--linea { border: 1.5px solid currentColor; }
.btn--linea:hover { background: var(--bruno); color: var(--crema); border-color: var(--bruno); }

/* ── intro: il portone che si apre (gesto-firma) ───────────────── */
#intro {
  position: fixed; inset: 0; z-index: 200; background: var(--bruno);
  display: grid; place-items: center; overflow: hidden;
  transition: opacity .5s ease;
}
#intro.hide { opacity: 0; pointer-events: none; }
.battente {
  position: absolute; top: 0; bottom: 0; width: 50.5%;
  background: linear-gradient(180deg, var(--bruno-2), var(--bruno));
  border-inline: 2px solid rgba(240,163,43,.34);
  animation: apre 1.5s .85s cubic-bezier(.7,0,.25,1) forwards;
}
.battente--sx { left: 0; transform-origin: left center; }
.battente--dx { right: 0; transform-origin: right center; }
.battente--sx { animation-name: apreSx; }
.battente--dx { animation-name: apreDx; }
@keyframes apreSx { to { transform: translateX(-101%); } }
@keyframes apreDx { to { transform: translateX(101%); } }
.intro__insegna { position: relative; text-align: center; z-index: 2; }
.intro__nome {
  display: block; font-family: var(--serif); font-size: clamp(1.5rem, 5.4vw, 2.6rem);
  color: var(--crema); opacity: 0; animation: insegnaIn .7s .15s ease forwards;
}
.intro__sotto {
  display: block; font-size: .74rem; letter-spacing: .3em; text-transform: uppercase;
  color: var(--ocra); margin-top: .5rem; opacity: 0; animation: insegnaIn .7s .38s ease forwards;
}
@keyframes insegnaIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ── header ────────────────────────────────────────────────────── */
#site-header {
  position: sticky; top: 0; z-index: 90;
  display: flex; align-items: center; gap: 1.4rem;
  padding: .75rem var(--gut);
  /* niente backdrop-filter su header/nav */
  background: rgba(42,26,18,.97);
  color: var(--crema);
  border-bottom: 1px solid rgba(240,163,43,.28);
}
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; margin-right: auto; }
.brand__tondo {
  width: 22px; height: 22px; border-radius: 50%; background: var(--ocra); flex: none; position: relative;
}
.brand__tondo::after {
  content: ''; position: absolute; left: 50%; top: 5px; bottom: 5px; width: 1.5px;
  background: var(--crema); box-shadow: -4px 0 0 var(--crema), 4px 0 0 var(--crema);
}
.brand__nome { font-family: var(--serif); font-size: 1.1rem; }
.brand__nome em { font-style: italic; color: var(--ocra); }
#mainNav { display: flex; gap: 1.5rem; }
#mainNav a {
  text-decoration: none; font-size: .84rem; color: var(--crema-d); padding: .3rem 0;
  border-bottom: 2px solid transparent; transition: color .2s, border-color .2s;
}
#mainNav a:hover { color: var(--ocra); border-bottom-color: var(--ocra); }
.head-actions { display: flex; align-items: center; gap: .7rem; }
.lang {
  background: none; border: 1px solid rgba(255,248,238,.34); color: var(--crema-d);
  font-family: var(--sans); font-size: .72rem; font-weight: 600;
  padding: .42em .78em; border-radius: 3px; cursor: pointer; transition: border-color .2s, color .2s;
}
.lang:hover { border-color: var(--ocra); color: var(--ocra); }
.cta-head {
  background: var(--ocra); color: var(--bruno); text-decoration: none;
  padding: .56em 1.2em; border-radius: 3px; font-size: .8rem; font-weight: 600; transition: background .25s;
}
.cta-head:hover { background: var(--ocra-d); }
#burger { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 6px; position: relative; z-index: 96; }
#burger span { display: block; width: 24px; height: 2px; background: var(--crema); transition: transform .3s, opacity .3s; }
#burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
#burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
#burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── HERO ──────────────────────────────────────────────────────── */
.hero {
  max-width: var(--wrap); margin: 0 auto;
  padding: clamp(2rem, 5vw, 3.6rem) var(--gut) clamp(2.4rem, 6vw, 4rem);
}
.hero__foto { margin: 0 0 clamp(1.6rem, 4vw, 2.6rem); }
.hero__foto img { width: 100%; display: block; border-radius: 4px; }
.hero__testo { max-width: 760px; }
.hero__kicker { font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; color: var(--mattone); margin-bottom: .8rem; }
.hero__h { font-size: clamp(2.4rem, 8vw, 5rem); color: var(--bruno); margin-bottom: 1.1rem; }
.hero__lead { font-size: clamp(1rem, 1.5vw, 1.14rem); max-width: 58ch; }
.hero__voto { font-size: .9rem; color: var(--grigio); display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem; }
.hero__stelle { color: var(--ocra); letter-spacing: .08em; }
.hero__voto strong { color: var(--bruno); font-size: 1.1rem; font-weight: 600; }
.hero__sep { color: var(--crema-d); }
.hero__cta { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.6rem; }

/* ── LA CUCINA ─────────────────────────────────────────────────── */
.cucina { background: var(--bruno); color: var(--crema); padding: clamp(3rem, 7vw, 5rem) var(--gut); }
.cucina__head { max-width: var(--wrap); margin: 0 auto clamp(1.8rem, 4vw, 2.6rem); }
.cucina__head .occhiello { color: var(--ocra); }
.cucina__head h2 { font-size: clamp(1.9rem, 4.6vw, 3rem); margin-bottom: .9rem; }
.cucina__head p { color: var(--crema-d); max-width: 66ch; }
.cucina__grid {
  max-width: var(--wrap); margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(262px, 1fr)); gap: clamp(1rem, 2.4vw, 1.8rem);
}
.piatto { background: rgba(255,248,238,.06); border-top: 2px solid var(--ocra); padding: 1.5rem; }
.piatto h3 { font-size: 1.2rem; color: var(--ocra); margin-bottom: .9rem; }
.piatto ul { list-style: none; padding: 0; margin: 0; }
.piatto li { padding: .45em 0; border-bottom: 1px dotted rgba(255,248,238,.18); font-size: .95rem; }
.piatto li:last-child { border-bottom: 0; }
.cucina__nota { max-width: var(--wrap); margin: 1.8rem auto 0; font-size: .84rem; color: rgba(255,248,238,.6); font-style: italic; }

/* ── IN TAVOLA ─────────────────────────────────────────────────── */
.tavola { max-width: var(--wrap); margin: 0 auto; padding: clamp(3rem, 7vw, 5rem) var(--gut); }
.tavola__head { margin-bottom: clamp(1.4rem, 3vw, 2.2rem); }
.tavola__head h2 { font-size: clamp(1.8rem, 4.2vw, 2.7rem); }
.tavola__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 2.4vw, 1.7rem); }
.scatto { margin: 0; }
.scatto button { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; line-height: 0; }
.scatto img { width: 100%; height: clamp(260px, 34vw, 420px); object-fit: cover; border-radius: 4px; }
.scatto figcaption { font-size: .8rem; color: var(--grigio); margin-top: .6rem; line-height: 1.5; }

/* ── OSTE ──────────────────────────────────────────────────────── */
.oste {
  max-width: var(--wrap); margin: 0 auto;
  padding: 0 var(--gut) clamp(3rem, 7vw, 5rem);
  display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(1.6rem, 4vw, 3.2rem); align-items: center;
}
.oste__testo h2 { font-size: clamp(1.8rem, 4.2vw, 2.7rem); margin-bottom: 1rem; }
.oste__foto { margin: 0; }
.oste__foto button { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; line-height: 0; }
.oste__foto img { width: 100%; border-radius: 4px; }
.oste__foto figcaption { font-size: .8rem; color: var(--grigio); margin-top: .6rem; }

/* ── RECENSIONI ────────────────────────────────────────────────── */
.voci { background: var(--crema-d); padding: clamp(3rem, 7vw, 5rem) var(--gut); }
.voci__head { max-width: var(--wrap); margin: 0 auto clamp(1.4rem, 3vw, 2.2rem); }
.voci__head h2 { font-size: clamp(1.8rem, 4.2vw, 2.7rem); }
.voci__grid { max-width: var(--wrap); margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(258px, 1fr)); gap: clamp(1rem, 2.2vw, 1.4rem); }
.voce { margin: 0; background: var(--crema); border-left: 3px solid var(--mattone); padding: 1.3rem; }
.voce p { font-family: var(--serif); font-size: 1rem; line-height: 1.55; }
.voce cite { font-style: normal; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--mattone); font-weight: 600; }

/* ── DOVE ──────────────────────────────────────────────────────── */
.dove {
  max-width: var(--wrap); margin: 0 auto;
  padding: clamp(3rem, 7vw, 5rem) var(--gut);
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.6rem, 4vw, 3.2rem); align-items: start;
}
.dove__info h2 { font-size: clamp(1.7rem, 4vw, 2.5rem); margin-bottom: .9rem; }
.stato { font-size: .9rem; font-weight: 600; color: var(--verde-t); }
.orari { list-style: none; padding: 0; margin: 1rem 0; }
.orari li { display: flex; justify-content: space-between; gap: 1rem; padding: .48em .55em; font-size: .88rem; border-bottom: 1px solid rgba(42,26,18,.12); }
.orari li span:first-child { text-transform: capitalize; }
.orari li.is-today { background: rgba(240,163,43,.24); border-radius: 4px; font-weight: 600; }
.dove__nota { font-size: .84rem; color: var(--grigio); }
.telefoni { display: flex; flex-wrap: wrap; gap: .7rem; }
.dove__mappa iframe { width: 100%; height: clamp(320px, 46vh, 450px); display: block; border-radius: 4px; border: 1px solid rgba(42,26,18,.18); }

/* ── FAQ ───────────────────────────────────────────────────────── */
.faq { max-width: 840px; margin: 0 auto; padding: 0 var(--gut) clamp(3rem, 7vw, 5rem); }
.faq h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin-bottom: 1.3rem; }
.faq details { border-bottom: 1px solid rgba(42,26,18,.14); }
.faq summary { cursor: pointer; padding: 1em 2em 1em 0; font-weight: 500; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+'; position: absolute; right: .2em; top: 50%; transform: translateY(-50%);
  font-family: var(--serif); font-size: 1.4rem; color: var(--mattone); transition: transform .25s;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { padding: 0 1.5rem 1.2em 0; color: var(--grigio); font-size: .93rem; margin: 0; }

/* ── footer ────────────────────────────────────────────────────── */
footer { background: var(--bruno); color: var(--crema-d); text-align: center; padding: clamp(2.4rem, 6vw, 3.6rem) var(--gut) 5.5rem; }
/* il logo originale è nero su bianco: su fondo scuro non si può rendere
   trasparente (sparirebbe il nero), quindi diventa una targa chiara */
.foot__logo {
  width: min(300px, 72vw); height: auto; margin-bottom: 1.3rem;
  background: var(--crema); padding: .9rem 1.3rem; border-radius: 3px;
}
.foot__riga { font-size: .88rem; margin: 0 0 .3rem; }
.foot__riga a { color: var(--ocra); }
.foot__nota { font-size: .74rem; color: rgba(255,248,238,.45); margin-top: 1.3rem; }

/* ── action bar ────────────────────────────────────────────────── */
#actionBar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; display: none;
  background: rgba(42,26,18,.98); transform: translateY(102%); transition: transform .3s;
}
#actionBar.is-visible { transform: translateY(0); }
#actionBar a { flex: 1; text-align: center; padding: .95rem .4rem; text-decoration: none; color: var(--crema); font-size: .78rem; font-weight: 600; }
#actionBar a + a { border-left: 1px solid rgba(255,248,238,.18); }

/* ── lightbox ──────────────────────────────────────────────────── */
#lightbox {
  position: fixed; inset: 0; z-index: 300; background: rgba(42,26,18,.95);
  display: flex; align-items: center; justify-content: center; padding: 4vw;
}
#lightbox img { max-width: 100%; max-height: 88vh; border-radius: 4px; }
#lightboxClose { position: absolute; top: 1.1rem; right: 1.5rem; background: none; border: 0; color: var(--crema); font-size: 2.4rem; line-height: 1; cursor: pointer; }

/* ── responsive ────────────────────────────────────────────────── */
@media (max-width: 960px) {
  #burger { display: flex; }
  #mainNav {
    position: fixed; inset: 0 0 0 auto; width: min(76vw, 310px);
    background: rgba(42,26,18,.995);
    flex-direction: column; justify-content: center; gap: 1.5rem; padding: 2rem;
    transform: translateX(100%); transition: transform .32s ease;
    border-left: 1px solid rgba(240,163,43,.3);
  }
  #mainNav.nav-open { transform: translateX(0); }
  #mainNav a { font-size: 1.05rem; }
  .cta-head { display: none; }
  .tavola__grid { grid-template-columns: 1fr; }
  .scatto img { height: auto; }
  .oste, .dove { grid-template-columns: 1fr; }
  #actionBar { display: flex; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero__cta, .telefoni { flex-direction: column; }
  .hero__cta .btn, .telefoni .btn { width: 100%; text-align: center; }
  .orari li { font-size: .82rem; }
}
