/* studio matt-a — header v2: logo orizzontale + intro in home + menu a tendina trasparente
   Caricare DOPO main.css. Le immagini stanno in /assets/images/ */

/* ---------- Logo in alto a sinistra (tutte le pagine) ---------- */
.site-logo {
  position: fixed;
  top: 2.2rem;
  left: 2rem;
  z-index: 25;
  display: block;
  color: #171411;                       /* nero sulle pagine interne */
  transform-origin: center center;
  transition: transform 1.2s cubic-bezier(.65, 0, .35, 1), opacity .2s ease;
}
body.template-home .site-logo { color: #fff; }   /* bianco sulla foto della home */
.site-logo__mark {
  display: block;
  width: 11rem;                         /* larghezza del logo in alto a sinistra */
  height: auto;
  aspect-ratio: 417.33 / 68.867;
  overflow: visible;                    /* i pezzi possono uscire dal riquadro durante l'intro */
  fill: currentColor;
}
.site-logo__mark path { transform-origin: 0 0; }
.site-logo:hover { opacity: .75; }
.logo-intro .site-logo { pointer-events: none; }

/* il titolo testuale della home è sostituito dal logo (resta per Google e lettori di schermo) */
body.template-home .main-title {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* la vecchia colonna laterale non c'è più: il contenuto parte dall'alto */
body:not(.template-home) {
  padding-left: 0;
  padding-top: 6.5rem;
}

/* ---------- Pulsante a tre linee (in alto a destra) ---------- */
.menu-toggle {
  position: fixed;
  top: 1.75rem;
  right: 2rem;
  z-index: 30;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  background: none;
  color: #171411;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
}
body.template-home .menu-toggle { color: #fff; }
.menu-toggle__bar {
  display: block;
  width: 1.75rem;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform .3s ease, opacity .2s ease;
}
.menu-toggle:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.menu-is-open .menu-toggle__bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-is-open .menu-toggle__bar:nth-child(2) { opacity: 0; }
.menu-is-open .menu-toggle__bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Menu a tendina trasparente ---------- */
.site-menu {
  position: fixed;
  top: 4.75rem;
  right: 2rem;
  z-index: 30;
  background: transparent;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-.5rem);
  transition: opacity .25s ease, transform .25s ease, visibility 0s linear .25s;
}
.menu-is-open .site-menu {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity .25s ease, transform .25s ease, visibility 0s;
}
.site-menu__list {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: right;
}
.site-menu .site-menu__item {
  display: block;
  padding: .3rem 0;
  font-family: Manrope, sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.3;
  letter-spacing: .01em;
  color: #171411;
  text-decoration: none;
  text-shadow: 0 0 12px rgba(255, 255, 255, .9);   /* leggibile anche sopra le immagini */
  transition: color .2s ease;
}
body.template-home .site-menu .site-menu__item {
  color: #fff;
  text-shadow: 0 1px 10px rgba(0, 0, 0, .45);
}
.site-menu .site-menu__item:hover,
.site-menu .site-menu__item.is-active,
body.template-home .site-menu .site-menu__item:hover { color: #b27b3f; }

@media (prefers-reduced-motion: reduce) {
  .site-logo, .site-menu, .menu-toggle__bar { transition: none; }
}

/* ---------- Schermi stretti (stessa soglia di main.css) ---------- */
@media screen and (max-width: 55rem) {
  .site-logo { top: 1.7rem; left: 1rem; }
  .site-logo__mark { width: 8rem; }
  .menu-toggle { top: 1rem; right: 1rem; }
  .site-menu { top: 4rem; right: 1.25rem; }
  body:not(.template-home) { padding-top: 4.75rem; }
}


/* ---------- 2026-11-09: menu aperto senza scontrarsi con i titoli ---------- */
@media screen and (min-width: 55.01rem) {
  /* computer: le voci si aprono in riga, accanto alla X, all'altezza del logo */
  .site-menu { top: 1.75rem; right: 5.25rem; height: 2.75rem; display: flex; align-items: center; transform: translateX(.75rem); }
  .menu-is-open .site-menu { transform: none; }
  .site-menu__list { display: flex; align-items: center; gap: 1.9rem; }
  .site-menu .site-menu__item { padding: 0; font-size: 1.1rem; }
}
@media screen and (max-width: 55rem) {
  /* telefono: il menu aperto scende come un foglio bianco a tutta larghezza, sotto logo e X */
  body:not(.template-home):not(.over-carousel) .site-menu {
    top: 0; left: 0; right: 0;
    z-index: 24;
    padding: 5rem 1.25rem 1.6rem;
    background: #fff;
    box-shadow: 0 .75rem 1.5rem -1rem rgba(23, 20, 17, .18);
  }
  body:not(.template-home):not(.over-carousel) .site-menu .site-menu__item { font-size: 1.6rem; padding: .35rem 0; text-shadow: none; }
}
