/* ================================================================
   VISIONI — style.css
   Struttura: Reset → Variabili → Globali → Nav → Hero →
              Storia → Galleria → Manifesto → Contatto →
              Cursore → Utility → Scrollbar → Responsive
================================================================ */


/* ────────────────────────────────────────────────────────────────
   VARIABILI DI DESIGN
──────────────────────────────────────────────────────────────── */
:root {
  /* Colori principali */
  --white:       #F5F2EE;        /* bianco caldo, mai puro */
  --off-white:   #EDE9E3;        /* grigio caldo per sezioni chiare */
  --black:       #0A0A0A;        /* nero profondo */
  --deep-navy:   #0C0F1A;        /* blu notte per la galleria */
  --accent:      #C9A96E;        /* oro antico — colore firma */
  --accent-dim:  rgba(201,169,110,.28);

  /* Testi */
  --text-dark:   #1A1A1A;
  --text-mid:    #5A5652;
  --text-light:  rgba(245,242,238,.72);

  /* Tipografia */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;

  /* Easing curves */
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-circ: cubic-bezier(0.85, 0, 0.15, 1);

  /* Spaziature */
  --pad-x:     60px;
  --pad-x-sm:  28px;
}


/* ────────────────────────────────────────────────────────────────
   RESET & BASE
──────────────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: auto; /* delegato interamente a GSAP */
}

body {
  font-family: var(--font-body);
  background: var(--black);
  color: var(--white);
  overflow-x: hidden;
  cursor: none;           /* rimpiazzato dal cursore custom */
  -webkit-font-smoothing: antialiased;
}

img, video {
  display: block;
  max-width: 100%;
}

a {
  text-decoration: none;
  color: inherit;
}

ul { list-style: none; }


/* ────────────────────────────────────────────────────────────────
   CURSORE PERSONALIZZATO
──────────────────────────────────────────────────────────────── */
#cursor-dot,
#cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  will-change: transform;
  transition-property: width, height, background, border-color;
  transition-timing-function: var(--ease-expo);
}

#cursor-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  transition-duration: .15s, .15s, .3s, .3s;
}

#cursor-ring {
  width: 36px;
  height: 36px;
  border: 1.5px solid rgba(201,169,110,.5);
  background: transparent;
  transition-duration: .45s, .45s, .3s, .3s;
}

/* Stato hover — il ring si espande, il dot scompare */
body.cursor-hover #cursor-ring {
  width: 66px;
  height: 66px;
  border-color: var(--accent);
  background: var(--accent-dim);
}

body.cursor-hover #cursor-dot {
  width: 0;
  height: 0;
}


/* ────────────────────────────────────────────────────────────────
   NAVIGAZIONE — fixed, blend-mode difference
──────────────────────────────────────────────────────────────── */
#nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 30px var(--pad-x);
  mix-blend-mode: difference;  /* si adatta allo sfondo automaticamente */
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 300;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--white);
}

.nav-links {
  display: flex;
  gap: 48px;
}

.nav-links a {
  font-size: .7rem;
  font-weight: 400;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--white);
  opacity: .65;
  transition: opacity .35s ease;
}

.nav-links a:hover { opacity: 1; }


/* ════════════════════════════════════════════════════════════════
   SEZIONE 01 — HERO
════════════════════════════════════════════════════════════════ */
#hero {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--black);
}

/* ── Media container (video) ─────────────────────────────────── */
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(.48) contrast(1.08) saturate(.9);
}

/* overlay gradiente dal basso verso l'alto */
.hero-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(10,10,10,.92) 0%,
    rgba(10,10,10,.25) 55%,
    transparent 100%
  );
}

/* ── Testo hero ──────────────────────────────────────────────── */
.hero-content {
  position: relative;
  z-index: 1;
  padding: 0 var(--pad-x) 88px;
  max-width: 940px;
}

.hero-eyebrow {
  font-size: .7rem;
  font-weight: 400;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 30px;
  opacity: 0;           /* animato via GSAP */
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(4.2rem, 8.5vw, 9.5rem);
  font-weight: 300;
  line-height: .9;
  letter-spacing: -.01em;
  color: var(--white);
  overflow: hidden;     /* nasconde le righe prima dell'animazione */
}

/* ogni riga è una sporgenza animata */
.hero-title .line {
  display: block;
  transform: translateY(110%);  /* punto di partenza GSAP */
}

.hero-title .line.italic {
  font-style: italic;
  color: var(--accent);
}

/* ── Sottotitolo hero — visibile sotto al titolo, sopra la meta ── */
.hero-sub {
  position: relative;
  z-index: 1;
  margin-top: 32px;
  max-width: 540px;
  font-size: .88rem;
  font-weight: 300;
  line-height: 1.82;
  letter-spacing: .04em;
  color: rgba(245,242,238,.62);
  opacity: 0;                    /* animato da GSAP insieme a hero-meta */
}

.hero-meta {
  margin-top: 52px;
  display: flex;
  align-items: center;
  gap: 44px;
  opacity: 0;           /* animato via GSAP */
}

.scroll-cta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: .7rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(245,242,238,.55);
}

.scroll-line {
  display: block;
  width: 56px;
  height: 1px;
  background: var(--accent);
  transform-origin: left center;
  animation: scroll-pulse 2.6s var(--ease-expo) infinite;
}

@keyframes scroll-pulse {
  0%, 100% { transform: scaleX(1);  opacity: 1; }
  50%       { transform: scaleX(.28); opacity: .35; }
}

.hero-year {
  font-family: var(--font-display);
  font-size: .82rem;
  letter-spacing: .14em;
  color: rgba(245,242,238,.35);
}


/* ════════════════════════════════════════════════════════════════
   SEZIONE 02 — STORIA  (sfondo chiaro)
════════════════════════════════════════════════════════════════ */
#storia {
  background: var(--white);
  color: var(--text-dark);
  padding: 150px var(--pad-x);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px 130px;
  align-items: start;
}

.storia-label {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: .68rem;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--text-mid);
}

.storia-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(90,86,82,.18);
}

.storia-heading {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 4.2vw, 5.2rem);
  font-weight: 300;
  line-height: 1.06;
  letter-spacing: -.01em;
  color: var(--text-dark);
}

.storia-heading em {
  font-style: italic;
  color: var(--accent);
}

.storia-body {
  padding-top: 12px;
}

.storia-body p {
  font-size: .95rem;
  font-weight: 300;
  line-height: 1.9;
  color: var(--text-mid);
  margin-bottom: 22px;
}

.storia-body p:last-child { margin-bottom: 0; }

.storia-number {
  grid-column: 1 / -1;
  font-family: var(--font-display);
  font-size: clamp(6rem, 14vw, 13rem);
  font-weight: 300;
  color: rgba(90,86,82,.07);
  line-height: 1;
  letter-spacing: -.05em;
  user-select: none;
  text-align: right;
  padding-right: 8px;
}


/* ════════════════════════════════════════════════════════════════
   SEZIONE 03 — GALLERIA  (sfondo blu notte)
════════════════════════════════════════════════════════════════ */
#galleria {
  background: var(--deep-navy);
  padding: 130px 0 170px;
  overflow: hidden;
}

.galleria-header {
  padding: 0 var(--pad-x);
  margin-bottom: 80px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.galleria-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 5.5vw, 7rem);
  font-weight: 300;
  color: var(--white);
  line-height: .92;
}

.galleria-title span {
  display: block;
  font-style: italic;
  color: var(--accent);
}

.galleria-count {
  font-size: .7rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(245,242,238,.28);
  padding-bottom: 8px;
}

/* ── Gallery track (scorrimento orizzontale visivo) ──────────── */
.gallery-track {
  display: flex;
  gap: 28px;
  padding: 0 var(--pad-x);
  align-items: center;
}

/* Dimensioni alternate: pari portrait grande, dispari portrait medio */
.gallery-item:nth-child(odd)  {
  flex: 0 0 auto;
  width: min(42vw, 620px);
  height: min(58vw, 780px);
}

.gallery-item:nth-child(even) {
  flex: 0 0 auto;
  width: min(30vw, 430px);
  height: min(40vw, 550px);
  margin-top: 110px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  cursor: none;
}

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .9s var(--ease-expo);
  will-change: transform;
}

.gallery-item:hover .gallery-img {
  transform: scale(1.05);
}

/* Caption che sale dal basso all'hover */
.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 48px 28px 28px;
  background: linear-gradient(transparent, rgba(10,10,10,.85));
  transform: translateY(100%);
  transition: transform .65s var(--ease-expo);
}

.gallery-item:hover .gallery-caption {
  transform: translateY(0);
}

.gallery-caption .gallery-num {
  font-family: var(--font-display);
  font-size: .68rem;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.gallery-caption h3 {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 300;
  color: var(--white);
  margin-bottom: 5px;
}

.gallery-caption p {
  font-size: .76rem;
  font-weight: 300;
  color: rgba(245,242,238,.55);
  letter-spacing: .07em;
}

/* ── Marquee testuale ──────────────────────────────────────────── */
.marquee-wrap {
  margin-top: 110px;
  overflow: hidden;
  border-top:    1px solid rgba(245,242,238,.07);
  border-bottom: 1px solid rgba(245,242,238,.07);
  padding: 26px 0;
}

.marquee-inner {
  display: flex;
  gap: 72px;
  white-space: nowrap;
  width: max-content;
  animation: marquee 22s linear infinite;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.marquee-inner span {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-style: italic;
  font-weight: 300;
  letter-spacing: .08em;
  color: rgba(245,242,238,.22);
}

.marquee-inner .dot {
  font-style: normal;
  color: var(--accent);
  margin-left: 4px;
}


/* ════════════════════════════════════════════════════════════════
   SEZIONE 04 — MANIFESTO / SERVIZI  (sfondo chiaro)
════════════════════════════════════════════════════════════════ */
#manifesto {
  background: var(--off-white);
  color: var(--text-dark);
  padding: 160px var(--pad-x);
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 0 130px;
  align-items: start;
}

/* ── Sidebar sinistra ─────────────────────────────────────────── */
.manifesto-sidebar .label {
  font-size: .68rem;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--text-mid);
  margin-bottom: 52px;
}

.manifesto-sidebar nav ul li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  border-top: 1px solid rgba(90,86,82,.14);
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-mid);
  cursor: none;
  transition: color .3s ease;
}

.manifesto-sidebar nav ul li:last-child {
  border-bottom: 1px solid rgba(90,86,82,.14);
}

.manifesto-sidebar nav ul li:hover { color: var(--text-dark); }

.arrow {
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity .3s ease, transform .35s var(--ease-expo);
  font-size: .95rem;
}

.manifesto-sidebar nav ul li:hover .arrow {
  opacity: 1;
  transform: translateX(0);
}

/* ── Contenuto destro ─────────────────────────────────────────── */
.manifesto-quote {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 3.4vw, 4.5rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -.01em;
  color: var(--text-dark);
  margin-bottom: 72px;
  font-style: normal;
  quotes: none;
}

.manifesto-quote em {
  font-style: italic;
  color: var(--accent);
}

.manifesto-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;             /* gap minimo: le card si sfiorano */
}

.manifesto-card {
  position: relative;
  overflow: hidden;
  padding: 44px 40px;
  background: var(--white);
  border: 1px solid rgba(90,86,82,.1);
  cursor: none;
  transition: border-color .4s ease;
}

/* Fill animato dal basso */
.manifesto-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: bottom center;
  transition: transform .55s var(--ease-expo);
  z-index: 0;
}

.manifesto-card:hover::before { transform: scaleY(1); }

.manifesto-card > * {
  position: relative;
  z-index: 1;
}

.card-num {
  font-family: var(--font-display);
  font-size: .7rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 22px;
  transition: color .25s ease;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 400;
  color: var(--text-dark);
  margin-bottom: 14px;
  line-height: 1.15;
  transition: color .25s ease;
}

.card-desc {
  font-size: .84rem;
  font-weight: 300;
  line-height: 1.8;
  color: var(--text-mid);
  transition: color .25s ease;
}

/* Inversione testo all'hover */
.manifesto-card:hover .card-num,
.manifesto-card:hover .card-title,
.manifesto-card:hover .card-desc {
  color: rgba(10,10,10,.85);
}


/* ════════════════════════════════════════════════════════════════
   SEZIONE 05 — CONTATTO  (sfondo nero)
════════════════════════════════════════════════════════════════ */
#contatto {
  position: relative;
  background: var(--black);
  color: var(--white);
  padding: 190px var(--pad-x) 120px;
  text-align: center;
  overflow: hidden;
}

/* Testo decorativo di sfondo */
.contact-bg-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-size: clamp(8rem, 20vw, 26rem);
  font-weight: 700;
  color: rgba(255,255,255,.025);
  white-space: nowrap;
  user-select: none;
  pointer-events: none;
  letter-spacing: -.04em;
  line-height: 1;
}

.contact-content { position: relative; z-index: 1; }

.contact-label {
  font-size: .7rem;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 44px;
}

.contact-title {
  font-family: var(--font-display);
  font-size: clamp(3.8rem, 7.5vw, 9.5rem);
  font-weight: 300;
  line-height: .9;
  margin-bottom: 72px;
}

.contact-title em {
  font-style: italic;
  color: var(--accent);
}

/* ── CTA Button ──────────────────────────────────────────────── */
.contact-cta {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  padding: 20px 52px;
  border: 1px solid rgba(245,242,238,.18);
  font-size: .76rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--white);
  position: relative;
  overflow: hidden;
  cursor: none;
  transition: border-color .4s ease;
}

.contact-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .5s var(--ease-expo);
}

.contact-cta:hover::before     { transform: scaleX(1); }
.contact-cta:hover             { border-color: var(--accent); }

.contact-cta span {
  position: relative;
  z-index: 1;
  transition: color .3s ease;
}

.contact-cta:hover span        { color: var(--black); }

.cta-arrow {
  transition: transform .35s var(--ease-expo);
}

.contact-cta:hover .cta-arrow  { transform: translateX(8px); }

/* ── Footer bar ──────────────────────────────────────────────── */
.footer-bar {
  margin-top: 160px;
  padding-top: 40px;
  border-top: 1px solid rgba(245,242,238,.07);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(245,242,238,.22);
}


/* ────────────────────────────────────────────────────────────────
   UTILITY — classi usate da GSAP come punto di partenza
──────────────────────────────────────────────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(44px);
  /* GSAP anima → opacity:1, translateY:0 */
}


/* ════════════════════════════════════════════════════════════════
   SEZIONE 05 — NAVIGATION HUB  (sfondo off-white)
   Stessa grammatica visiva del Manifesto: fill scaleY dal basso,
   bordo sottile, testo che si inverte al passaggio del mouse.
════════════════════════════════════════════════════════════════ */
#navigation-hub {
  background: var(--off-white);
  color: var(--text-dark);
  padding: 120px var(--pad-x) 160px;
}

.hub-header {
  margin-bottom: 72px;
}

.hub-label {
  display: block;
  font-size: .68rem;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--text-mid);
  margin-bottom: 20px;
}

.hub-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 5.5vw, 6.5rem);
  font-weight: 300;
  line-height: .92;
  letter-spacing: -.02em;
  color: var(--text-dark);
}

.hub-title em {
  font-style: italic;
  color: var(--accent);
}

/* ── Griglia ─────────────────────────────────────────────────── */
.hub-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 2px;
}

/* Fila superiore: quadrati perfetti */
.hub-box--radio,
.hub-box--vinili {
  grid-row: 1;
  aspect-ratio: 1 / 1;
}

/* Fila inferiore: rettangolo largo tutta la griglia */
.hub-box--famiglia {
  grid-column: 1 / -1;
  grid-row: 2;
  aspect-ratio: auto;
  min-height: 260px;
}

/* ── Box base ─────────────────────────────────────────────────── */
.hub-box {
  position: relative;
  overflow: hidden;
  padding: 48px 44px;
  background: var(--white);
  border: 1px solid rgba(90,86,82,.1);
  cursor: none;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  text-decoration: none;
  color: var(--text-dark);
  transition: border-color .4s ease;
  font-family: inherit;
  text-align: left;
  -webkit-appearance: none;
  appearance: none;
}

/* Fill animato dal basso — colore specifico per ogni box */
.hub-box__bg {
  position: absolute;
  inset: 0;
  transform: scaleY(0);
  transform-origin: bottom center;
  transition: transform .6s var(--ease-expo);
  z-index: 0;
}

.hub-box--radio    .hub-box__bg { background: #2b1d0c; }
.hub-box--vinili   .hub-box__bg { background: #0f0f11; }
.hub-box--famiglia .hub-box__bg { background: #e6dfd3; }

.hub-box:hover .hub-box__bg,
.hub-box:focus-visible .hub-box__bg { transform: scaleY(1); }

/* Contenuto */
.hub-box__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hub-num {
  font-size: .65rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--accent);
  transition: color .25s ease;
}

.hub-name {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 2.8vw, 3rem);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -.01em;
  color: var(--text-dark);
  transition: color .3s ease;
}

.hub-desc {
  font-size: .84rem;
  font-weight: 300;
  line-height: 1.75;
  color: var(--text-mid);
  max-width: 36ch;
  transition: color .3s ease;
}

.hub-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: .7rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--text-mid);
  margin-top: 6px;
  transition: color .3s ease;
}

.hub-arrow {
  display: inline-block;
  transition: transform .4s var(--ease-expo);
}

.hub-box:hover .hub-arrow,
.hub-box:focus-visible .hub-arrow { transform: translateX(8px); }

/* Box scuri → testo bianco all'hover */
.hub-box--radio:hover  .hub-name,
.hub-box--radio:hover  .hub-cta,
.hub-box--vinili:hover .hub-name,
.hub-box--vinili:hover .hub-cta  { color: var(--white); }

.hub-box--radio:hover  .hub-num,
.hub-box--vinili:hover .hub-num  { color: rgba(201,169,110,.75); }

.hub-box--radio:hover  .hub-desc,
.hub-box--vinili:hover .hub-desc { color: rgba(245,242,238,.55); }

/* Box famiglia (seppia chiaro) → testo rimane scuro */
.hub-box--famiglia:hover .hub-name { color: var(--text-dark); }
.hub-box--famiglia:hover .hub-desc { color: var(--text-mid); }
.hub-box--famiglia:hover .hub-cta  { color: var(--text-dark); }
.hub-box--famiglia:hover .hub-num  { color: var(--accent); }

/* Icona lucchetto decorativa */
.hub-lock {
  position: absolute;
  top: 44px;
  right: 44px;
  font-size: 1.9rem;
  color: rgba(90,86,82,.15);
  z-index: 1;
  pointer-events: none;
  transition: color .3s ease, transform .45s var(--ease-expo);
}

.hub-box--famiglia:hover .hub-lock {
  color: rgba(90,86,82,.32);
  transform: rotate(14deg) scale(1.12);
}


/* ════════════════════════════════════════════════════════════════
   OVERLAY PASSWORD — Archivio di Famiglia
════════════════════════════════════════════════════════════════ */
.pw-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10,10,10,.68);
  backdrop-filter: blur(20px) saturate(.75);
  -webkit-backdrop-filter: blur(20px) saturate(.75);
  opacity: 0;
  pointer-events: none;
  transition: opacity .5s var(--ease-expo);
}

/* [hidden] sovrapposto: manteniamo display:flex, gestiamo con opacity */
.pw-overlay[hidden] {
  display: flex !important;
  pointer-events: none;
  opacity: 0;
}

.pw-overlay.is-open {
  opacity: 1;
  pointer-events: all;
}

.pw-panel {
  position: relative;
  background: var(--white);
  color: var(--text-dark);
  padding: 72px 64px 64px;
  max-width: 500px;
  width: calc(100% - 40px);
  transform: translateY(30px);
  transition: transform .6s var(--ease-expo);
}

.pw-overlay.is-open .pw-panel { transform: translateY(0); }

/* Bordo accent in alto che si rivela */
.pw-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 64px;
  right: 64px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .8s var(--ease-expo) .3s;
}

.pw-overlay.is-open .pw-panel::before { transform: scaleX(1); }

.pw-close {
  position: absolute;
  top: 24px;
  right: 28px;
  background: none;
  border: none;
  font-size: 1.7rem;
  color: var(--text-mid);
  cursor: none;
  line-height: 1;
  padding: 4px 8px;
  font-family: inherit;
  transition: color .25s ease, transform .35s var(--ease-expo);
}

.pw-close:hover {
  color: var(--text-dark);
  transform: rotate(90deg);
}

.pw-eyebrow {
  font-size: .65rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}

.pw-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 300;
  line-height: 1.05;
  color: var(--text-dark);
  margin-bottom: 20px;
}

.pw-hint {
  font-size: .84rem;
  font-weight: 300;
  color: var(--text-mid);
  line-height: 1.7;
  margin-bottom: 40px;
}

.pw-field-wrap {
  display: flex;
  border: 1px solid rgba(90,86,82,.22);
  transition: border-color .35s ease;
}

.pw-field-wrap:focus-within { border-color: var(--accent); }

.pw-input {
  flex: 1;
  padding: 18px 20px;
  background: none;
  border: none;
  outline: none;
  font-family: var(--font-body);
  font-size: .9rem;
  font-weight: 300;
  color: var(--text-dark);
  letter-spacing: .08em;
}

.pw-input::placeholder {
  color: rgba(90,86,82,.4);
  letter-spacing: .1em;
}

.pw-submit {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 26px;
  background: var(--text-dark);
  border: none;
  color: var(--white);
  font-family: var(--font-body);
  font-size: .68rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  cursor: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.pw-submit::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .45s var(--ease-expo);
}

.pw-submit:hover::before { transform: scaleX(1); }

.pw-submit span { position: relative; z-index: 1; }

.pw-submit-arrow { transition: transform .35s var(--ease-expo); }
.pw-submit:hover .pw-submit-arrow { transform: translateX(5px); }

.pw-error {
  margin-top: 18px;
  font-size: .76rem;
  letter-spacing: .06em;
  color: #8b3a2a;
  min-height: 1.4em;
}

.pw-error.is-success { color: #2a6b3a; }


/* ────────────────────────────────────────────────────────────────
   SCROLLBAR
──────────────────────────────────────────────────────────────── */
::-webkit-scrollbar       { width: 4px; }
::-webkit-scrollbar-track { background: var(--black); }
::-webkit-scrollbar-thumb {
  background: var(--accent-dim);
  border-radius: 2px;
}


/* ════════════════════════════════════════════════════════════════
   RESPONSIVE — breakpoint 900px
════════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {

  :root {
    --pad-x: var(--pad-x-sm);   /* riduce padding globale */
  }

  /* Nav */
  #nav { padding: 24px var(--pad-x-sm); }
  .nav-links { gap: 24px; }

  /* Hero */
  .hero-content { padding: 0 var(--pad-x-sm) 64px; }

  /* Storia */
  #storia {
    grid-template-columns: 1fr;
    padding: 90px var(--pad-x-sm);
    gap: 40px;
  }
  .storia-label::after { display: none; }
  .storia-number { text-align: left; }

  /* Galleria — scorrimento touch orizzontale */
  .gallery-track {
    padding: 0 var(--pad-x-sm);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .gallery-track::-webkit-scrollbar { display: none; }

  .gallery-item:nth-child(odd)  { width: 72vw; height: 90vw; }
  .gallery-item:nth-child(even) { width: 55vw; height: 70vw; margin-top: 60px; }

  /* Manifesto */
  #manifesto {
    grid-template-columns: 1fr;
    padding: 100px var(--pad-x-sm);
    gap: 64px;
  }

  .manifesto-grid { grid-template-columns: 1fr; gap: 2px; }

  /* Contatto */
  #contatto { padding: 140px var(--pad-x-sm) 80px; }

  .footer-bar {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  /* Navigation Hub */
  #navigation-hub { padding: 80px var(--pad-x-sm) 100px; }

  .hub-grid { grid-template-columns: 1fr; }

  .hub-box--radio,
  .hub-box--vinili {
    grid-row: auto;
    aspect-ratio: auto;
    min-height: 240px;
  }

  .hub-box--famiglia {
    grid-column: auto;
    grid-row: auto;
    min-height: 220px;
  }

  /* Overlay password */
  .pw-panel {
    padding: 56px 32px 48px;
  }

  .pw-panel::before {
    left: 32px;
    right: 32px;
  }
}

@media (max-width: 560px) {
  .nav-links { display: none; } /* menu hamburger opzionale — da implementare */
}
