/* ============================================================
   METALMEC — Layout: header, shell sezioni, footer shell
   ============================================================ */

/* --- Sentinella header --- */
#top-sentinel {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 60px;
  pointer-events: none;
}

/* --- Header --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-header);
  height: var(--header-h);
  color: var(--white);
  transition:
    background-color 0.3s var(--ease-out),
    color 0.3s var(--ease-out),
    box-shadow 0.3s var(--ease-out);
}

/* 3 colonne: logo a sinistra · menu CENTRATO sulla pagina · azioni a destra.
   Le due colonne 1fr laterali sono simmetriche → il menu (colonna auto) resta
   centrato a prescindere dalla larghezza di logo/azioni. */
.site-header__inner {
  height: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 32px;
}

.site-header__logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  grid-column: 1;
  justify-self: start;
}

.site-header__nav {
  display: flex;
  align-items: center;
  grid-column: 2;
  justify-self: center;
  gap: 28px;
}

.site-header__nav a {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  opacity: 0.95;
  transition: opacity var(--dur-fast);
}

.site-header__nav a:hover {
  opacity: 0.7;
}

.site-header__actions {
  display: flex;
  align-items: center;
  grid-column: 3;
  justify-self: end;
  gap: 24px;
}

.site-header__login {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  transition: opacity var(--dur-fast);
}

.site-header__login:hover {
  opacity: 0.7;
}

/* Stato solido dopo lo scroll (toggle da main.js) */
.site-header.is-solid {
  background-color: var(--white);
  color: var(--ink);
  box-shadow: 0 1px 0 var(--line);
}

.site-header.is-solid .btn--light {
  background: var(--ink);
  color: var(--white);
}

/* --- Menu mobile --- */
.site-header__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 40px;
  height: 40px;
  padding: 8px;
}

.site-header__burger span {
  display: block;
  height: 2px;
  width: 100%;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.25s var(--ease-out);
}

.site-header.menu-open .site-header__burger span:first-child {
  transform: translateY(4px) rotate(45deg);
}

.site-header.menu-open .site-header__burger span:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

.site-header__mobile {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px var(--gutter);
  background: var(--white);
  color: var(--ink);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition:
    opacity 0.25s var(--ease-out),
    transform 0.25s var(--ease-out),
    visibility 0.25s;
}

.site-header.menu-open .site-header__mobile {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.site-header__mobile a {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 500;
  padding-block: 12px;
  border-bottom: 1px solid var(--line);
}

/* --- Shell sezioni --- */
section {
  position: relative;
}

.section-block {
  margin-block: var(--space-section);
}

