/* StaggeredMenu (React Bits) — struttura e timing originali, ripallettati
   sulla nostra identità: --ink/--ivory/--terracotta, font-display editoriale,
   niente maiuscolo urlato (il resto del sito parla in modo colloquiale). */

.staggered-menu-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  z-index: 90;
  pointer-events: none;
}

.staggered-menu-wrapper.fixed-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 90;
  overflow: hidden;
}

/* l'header interno resta smontato (showHeader:false) — il nostro sito ha già
   il suo; le regole restano solo perché condividono la stessa foglia CSS */
.staggered-menu-header {
  position: absolute; top: 0; left: 0; width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  padding: 2em; background: transparent; pointer-events: none; z-index: 20;
}
.staggered-menu-header > * { pointer-events: auto; }
.sm-logo { display: flex; align-items: center; user-select: none; }
.sm-logo-img { display: block; height: 32px; width: auto; object-fit: contain; }

.sm-toggle {
  position: relative; display: inline-flex; align-items: center; gap: .3rem;
  background: transparent; border: none; cursor: pointer;
  color: #e9e9ef; font-weight: 500; line-height: 1; overflow: visible;
}
.sm-toggle:focus-visible { outline: 2px solid var(--terracotta); outline-offset: 4px; border-radius: 4px; }
.sm-toggle-textWrap {
  position: relative; display: inline-block; height: 1em; overflow: hidden; white-space: nowrap;
  width: var(--sm-toggle-width, auto); min-width: var(--sm-toggle-width, auto);
}
.sm-toggle-textInner { display: flex; flex-direction: column; line-height: 1; }
.sm-toggle-line { display: block; height: 1em; line-height: 1; }
.sm-icon { position: relative; width: 14px; height: 14px; flex: 0 0 14px; display: inline-flex; align-items: center; justify-content: center; will-change: transform; }
.sm-icon-line { position: absolute; left: 50%; top: 50%; width: 100%; height: 2px; background: currentColor; border-radius: 2px; transform: translate(-50%, -50%); will-change: transform; }

/* ---- pannello: vetro caldo sull'--ivory, non il bianco/blur generico originale ---- */
.staggered-menu-panel {
  position: absolute; top: 0; right: 0;
  width: clamp(320px, 34vw, 480px); height: 100%;
  background: var(--ivory);
  -webkit-backdrop-filter: blur(20px) saturate(1.4); backdrop-filter: blur(20px) saturate(1.4);
  display: flex; flex-direction: column;
  padding: 8.5em 3em 3em; overflow-y: auto;
  z-index: 10; pointer-events: auto; opacity: 0;
  box-shadow: -24px 0 60px -20px rgba(42,46,40,.22);
}
[data-position='left'] .staggered-menu-panel { right: auto; left: 0; box-shadow: 24px 0 60px -20px rgba(42,46,40,.22); }

.sm-prelayers { position: absolute; top: 0; right: 0; bottom: 0; width: clamp(320px, 34vw, 480px); pointer-events: none; z-index: 5; opacity: 0; }
[data-position='left'] .sm-prelayers { right: auto; left: 0; }
.sm-prelayer { position: absolute; top: 0; right: 0; height: 100%; width: 100%; transform: translateX(0); opacity: 0; }

.sm-panel-inner { flex: 1; display: flex; flex-direction: column; gap: 1.25rem; }
.sm-panel-itemWrap { position: relative; overflow: hidden; line-height: 1; }

.sm-panel-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .35rem; }
/* voce grande in stile editoriale (stesso font-display del titolo hero),
   sentence case invece del maiuscolo urlato del componente originale */
.sm-panel-item {
  position: relative; color: var(--ink);
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2.4rem, 5vw, 3.4rem); line-height: 1; letter-spacing: -.03em;
  cursor: pointer; text-decoration: none; display: inline-block;
  padding: .18em 1.5em .18em 0;
  transition: color .25s ease;
}
.sm-panel-item:hover, .sm-panel-item:focus-visible { color: var(--terracotta); }
.sm-panel-itemLabel { display: inline-block; will-change: transform; transform-origin: 50% 100%; }

.sm-panel-list[data-numbering] { counter-reset: smItem; }
.sm-panel-list[data-numbering] .sm-panel-item::after {
  counter-increment: smItem; content: counter(smItem, decimal-leading-zero);
  position: absolute; top: .32em; right: 1.1em;
  font-family: var(--font-body); font-size: 13px; font-weight: 500;
  color: var(--terracotta); letter-spacing: .04em;
  pointer-events: none; user-select: none;
  opacity: var(--sm-num-opacity, 0);
}

.sm-panel-title { margin: 0; font-size: 1rem; font-weight: 600; color: var(--ink); }

.sm-socials { margin-top: auto; padding-top: 2rem; display: flex; flex-direction: column; gap: .75rem; border-top: 1px solid rgba(42,46,40,.1); }
.sm-socials-title { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: rgba(42,46,40,.5); }
.sm-socials-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: row; align-items: center; gap: 1rem; flex-wrap: wrap; }
.sm-socials-link {
  font-family: var(--font-display); font-size: 1.1rem; font-weight: 600; color: var(--ink);
  text-decoration: none; position: relative; padding: 2px 0; display: inline-block;
  opacity: 1; transition: color .3s ease, opacity .3s ease;
}
.sm-socials-link:hover, .sm-socials-link:focus-visible { color: var(--terracotta); }
.sm-socials-list:hover .sm-socials-link:not(:hover) { opacity: .4; }
.sm-socials-list:focus-within .sm-socials-link:not(:focus-visible) { opacity: .4; }
.sm-socials-link:focus-visible { outline: 2px solid var(--terracotta); outline-offset: 3px; }

@media (max-width: 640px) {
  .staggered-menu-panel { width: 100%; left: 0; right: 0; padding: 7em 1.6em 2em; }
  .sm-prelayers { width: 100%; left: 0; right: 0; }
  .sm-panel-item { font-size: clamp(2rem, 9vw, 2.6rem); }
}
