/* ===== Font (locali) ===== */
@font-face { font-family: 'Barlow'; font-weight: 400; font-display: swap; src: url(../assets/fonts/barlow-400.ttf) format('truetype'); }
@font-face { font-family: 'Barlow'; font-weight: 500; font-display: swap; src: url(../assets/fonts/barlow-500.ttf) format('truetype'); }
@font-face { font-family: 'Instrument Serif'; font-weight: 400; font-display: swap; src: url(../assets/fonts/instrument-serif.ttf) format('truetype'); }

/* ===== Colori e misure ===== */
:root {
  --bg: #090909;
  --bg-2: #121211;
  --ink: #f2eee5;
  --ink-2: #d5cfc4;
  --muted: #aaa49a;
  --rule: #393631;
  --accent: #d5b785;
  --accent-ink: #15110c;
  --serif: 'Instrument Serif', Georgia, serif;
  --sans: 'Barlow', Arial, sans-serif;
  --gutter: 64px;
}

/* ===== Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 40px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.55 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: clip; }
h1, h2 { margin: 0; font-family: var(--serif); font-weight: 400; letter-spacing: -.025em; line-height: 1.05; text-wrap: balance; }
h1 { font-size: clamp(4.5rem, 9vw, 9rem); line-height: .94; }
h2 { font-size: clamp(3.2rem, 5.5vw, 5.5rem); }
p { margin: 0; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: .16em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid #f3cb86; outline-offset: 2px; }
.container { max-width: 1440px; margin-inline: auto; padding-inline: var(--gutter); }
.muted { color: var(--muted); }
.skip { position: absolute; z-index: 20; padding: 16px; background: var(--ink); color: var(--bg); transform: translateY(-150%); }
.skip:focus-visible { transform: none; }

/* ===== Bottoni ===== */
.btn { display: inline-flex; align-items: center; min-height: 48px; padding: 0 24px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); font: inherit; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn.quiet { background: var(--bg); border-color: #8d877e; color: var(--ink); }

/* ===== Header ===== */
.header { min-height: 100px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.wordmark { display: block; }
.wordmark img { height: 64px; width: auto; }
nav { display: flex; gap: 28px; }
nav a { font-size: .9375rem; text-decoration: none; }

/* ===== Hero ===== */
.hero { display: grid; grid-template-columns: 5fr 6fr; align-items: center; gap: 60px; min-height: calc(100svh - 100px); padding-block: 40px 72px; }
.hero h1 { max-width: 9ch; }
.lead { margin-top: 28px; max-width: 28ch; font-size: 1.25rem; color: var(--ink-2); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; margin-top: 36px; }

/* foto quadrata */
.hero-photo { position: relative; margin: 0; width: min(100%, 75svh); aspect-ratio: 1; justify-self: end; overflow: hidden; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 90%; filter: grayscale(.15) brightness(.8); }
.hero-photo::after { content: ''; position: absolute; inset: 0; box-shadow: inset 0 0 70px 20px var(--bg); pointer-events: none; }

/* ===== Vapore (canvas disegnato da js/main.js) ===== */
.steam { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; mix-blend-mode: screen; }

/* ===== Sezioni ===== */
.section { padding-block: 112px; }
.two-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; }

.menu { display: grid; grid-template-columns: 4fr 7fr; gap: 32px; }
.menu .muted { margin-top: 24px; max-width: 32ch; }
.menu-list { margin: 0; }
.menu-list div { display: grid; grid-template-columns: 1fr 1fr; align-items: baseline; gap: 32px; padding: 24px 0; border-top: 1px solid var(--rule); }
.menu-list dt { font-family: var(--serif); font-size: 2.5rem; }
.menu-list dd { margin: 0; color: var(--muted); }

.section-head { display: flex; align-items: end; justify-content: space-between; gap: 40px; margin-bottom: 48px; }
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.gallery figure { margin: 0; }
.gallery a { display: block; }
.gallery a:hover { outline: 1px solid var(--accent); outline-offset: 6px; }
.gallery img { width: 100%; aspect-ratio: 3/4; object-fit: cover; }
figcaption { margin-top: 16px; color: var(--muted); font-size: .9375rem; }

.hours { background: var(--bg-2); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 24px 0; border-bottom: 1px solid var(--rule); text-align: left; font-weight: 400; }
td { text-align: right; color: var(--ink-2); }

.contacts { border-top: 1px solid var(--rule); }
address { font-style: normal; font-size: 1.25rem; }
address p + p { margin-top: 20px; }

/* ===== Footer ===== */
.footer { padding-block: 32px; border-top: 1px solid var(--rule); }
.credits { max-width: 70ch; font-size: .9375rem; color: var(--muted); }

/* ===== Lightbox: solo l'immagine sul fondo scuro, X in alto a destra ===== */
.lightbox { width: 100vw; height: 100svh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; }
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: rgb(0 0 0 / .92); }
.lightbox img { max-width: 92vw; max-height: 88svh; width: auto; height: auto; object-fit: contain; }
.lightbox-close {
  position: fixed; top: 20px; right: 20px; z-index: 1;
  display: grid; place-items: center; width: 48px; height: 48px;
  border: 1px solid rgb(213 183 133 / .6); border-radius: 50%;
  background: rgb(9 9 9 / .6); color: var(--ink); cursor: pointer;
  transition: color .2s ease, border-color .2s ease;
}
.lightbox-close:hover { color: var(--accent); border-color: var(--accent); }

/* ===== Tablet ===== */
@media (max-width: 60rem) {
  :root { --gutter: 24px; }
  .header { flex-wrap: wrap; padding-block: 20px; }
  .hero { gap: 32px; min-height: 0; }
  .menu { grid-template-columns: 1fr; gap: 40px; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .section { padding-block: 80px; }
}

/* ===== Telefono ===== */
@media (max-width: 40rem) {
  :root { --gutter: 20px; }
  .wordmark img { height: 52px; }
  nav { width: 100%; justify-content: space-between; gap: 8px; }
  .hero { display: flex; flex-direction: column; align-items: stretch; padding-block: 24px 40px; }
  .hero h1 { font-size: 4.7rem; max-width: 10ch; }
  .hero-photo { width: 100%; }
  .section-head { display: block; }
  .section-head p { margin-top: 20px; }
  .two-cols { grid-template-columns: 1fr; gap: 40px; }
  .menu-list div { grid-template-columns: 1fr; gap: 8px; }
  .menu-list dt { font-size: 2rem; }
  .gallery { gap: 20px; }
}

/* chi ha "riduci movimento" attivo non vede animazioni */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .steam { display: none; }
}

/* ===== Link contatti con icona ===== */
address strong { font-weight: 500; }
.contact-link { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; text-decoration: none; }
.contact-link svg { flex: none; }
.contact-link:hover { color: var(--accent); }

/* ===== Mappa ===== */
.map { height: 480px; background: var(--bg-2); display: grid; place-items: center; }
.map.leaflet-container { display: block; font-family: var(--sans); }
.map .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) grayscale(.6) sepia(.25) brightness(.85) contrast(.9); } /* mappa chiara -> scura e calda */
.pin { background: none; border: 0; }
.pin svg { filter: drop-shadow(0 4px 6px rgb(0 0 0 / .6)); }
.map .leaflet-popup-content-wrapper, .map .leaflet-popup-tip { background: var(--bg); color: var(--ink); border: 1px solid var(--rule); border-radius: 0; }
.map .leaflet-popup-content { margin: 14px 18px; font-size: .9375rem; line-height: 1.5; }
.map .leaflet-popup-content a { color: var(--accent); }
.map .leaflet-control-attribution { background: rgb(9 9 9 / .7); color: var(--muted); }
.map .leaflet-control-attribution a { color: var(--ink-2); }

/* mappa e contatti affiancati in sezione aurea (≈ 62 / 38) */
.contacts-grid { display: grid; grid-template-columns: 1.618fr 1fr; gap: 64px; align-items: center; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 40rem) {
  .contacts-grid { grid-template-columns: 1fr; gap: 40px; }
  .contacts-grid address { order: -1; }   /* da telefono: prima i contatti, poi la mappa */
  .map { height: 340px; }
}
.map .leaflet-bar a { background: var(--bg); color: var(--ink); border-color: var(--rule); }
.map .leaflet-bar a:hover { background: var(--bg-2); color: var(--accent); }
.map .leaflet-bar { border: 1px solid var(--rule); border-radius: 0; }

/* ===== Footer legale e pagina privacy ===== */
.legal-line { margin-bottom: 12px; font-size: .9375rem; color: var(--ink-2); }
.legal { max-width: 760px; padding-block: 40px 96px; }
.legal h1 { font-size: clamp(3rem, 6vw, 5rem); margin-bottom: 12px; }
.legal h2 { font-size: 2rem; margin: 48px 0 12px; }
.legal p + p { margin-top: 12px; }
.legal a { color: var(--accent); }

/* ===== Striscia offerte ===== */
.offers { background: var(--accent); color: var(--accent-ink); overflow: hidden; }
.offers-track { display: flex; width: max-content; }
.offers-list { display: flex; margin: 0; padding: 0; list-style: none; }
.offers-list li { padding: 18px 0; font-family: var(--serif); font-size: 1.75rem; line-height: 1.2; white-space: nowrap; }
.offers-list li strong { font-weight: 400; font-style: italic; }
.offers-list li::after { content: '✦'; margin-inline: 40px; font-size: 1rem; vertical-align: middle; }
.offers.is-moving .offers-track { animation: offers-scroll var(--offers-time, 30s) linear infinite; }
.offers:hover .offers-track { animation-play-state: paused; }
@keyframes offers-scroll { to { transform: translateX(-50%); } }
/* senza JS o con "riduci movimento": striscia ferma, testo che va a capo */
.offers:not(.is-moving) .offers-track { width: auto; }
.offers:not(.is-moving) .offers-list { flex-wrap: wrap; justify-content: center; padding-inline: var(--gutter); }
@media (max-width: 40rem) { .offers-list li { font-size: 1.375rem; padding: 14px 0; } .offers-list li::after { margin-inline: 28px; } }
/* stesso spazio sopra e sotto la striscia (sopra = fondo dell'hero) */
.offers + .section { padding-top: 72px; }
@media (max-width: 40rem) { .offers + .section { padding-top: 40px; } }

/* bordi sfumati delle immagini della gallery (poco, solo per non averle "a blocco") */
.gallery img {
  --fade: 5%;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 var(--fade), #000 calc(100% - var(--fade)), transparent),
                      linear-gradient(to bottom, transparent, #000 var(--fade), #000 calc(100% - var(--fade)), transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent, #000 var(--fade), #000 calc(100% - var(--fade)), transparent),
              linear-gradient(to bottom, transparent, #000 var(--fade), #000 calc(100% - var(--fade)), transparent);
  mask-composite: intersect;
  transition: transform .4s var(--ease, ease), filter .4s ease;
}
/* con i bordi sfumati il contorno al passaggio stona: meglio un leggero zoom */
.gallery a:hover { outline: none; }
.gallery a:hover img { transform: scale(1.02); filter: brightness(1.08); }

/* lente "ingrandisci" sulle immagini della gallery */
.gallery a { position: relative; }
.gallery a::after {
  content: '';
  position: absolute; left: 50%; top: 50%;
  width: 76px; height: 76px; margin: -38px 0 0 -38px;
  border-radius: 50%;
  border: 1px solid rgb(213 183 133 / .8);
  background: rgb(9 9 9 / .7) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d5b785' stroke-width='1.6' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5 21 21M10.5 7.8v5.4M7.8 10.5h5.4'/%3E%3C/svg%3E") center / 34px no-repeat;
  backdrop-filter: blur(2px);
  opacity: 0; transform: scale(.85);
  transition: opacity .3s ease, transform .3s ease;
  pointer-events: none;
}
.gallery a:hover::after, .gallery a:focus-visible::after { opacity: 1; transform: none; }
/* schermi touch (niente hover): lente piccola sempre visibile nell'angolo */
@media (hover: none) {
  .gallery a::after { left: auto; top: auto; right: 10px; bottom: 10px; margin: 0; width: 38px; height: 38px; background-size: 18px; opacity: 1; transform: none; }
}
