/* =========================================================
   HERO MASTER 6ENOUGH
   Un solo telaio per tutte le pagine.
   Desktop: stessa posizione, larghezza e altezza della HOME.
   Mobile: stesso ingombro verticale per tutte le hero.
   ========================================================= */
:root {
  --site-hero-width: var(--content-max);
  --site-hero-height: clamp(480px, 48vw, 760px);
  --site-hero-height-mobile: 720px;
}

/* Telaio unico. */
.hero--manifesto .hero__frame,
.format-hero,
.hero--protagonisti .hero__frame,
.bw-hero,
.event-page--federica .event-hero,
.stars-hero,
.contact-hero {
  box-sizing: border-box;
  width: min(100%, var(--site-hero-width));
  height: var(--site-hero-height);
  min-height: 0;
  max-height: none;
  margin: 0 auto;
  overflow: hidden;
}

.hero--manifesto .hero__frame,
.format-hero,
.hero--protagonisti .hero__frame,
.bw-hero,
.event-page--federica .event-hero,
.stars-hero {
  background: #000;
}

/* Le pagine chiare mantengono comunque la fascia nera della hero, come HOME. */
.format-hero,
.bw-hero {
  box-shadow: 0 0 0 100vmax #000;
  clip-path: inset(0 -100vmax);
}

/* Tutti i contenuti interni seguono l'altezza del telaio. */
.hero--manifesto .hero__media,
.format-hero__inner,
.hero--protagonisti .hero__art,
.bw-hero__content,
.event-hero__inner,
.stars-hero__inner,
.contact-hero__inner {
  min-height: 0;
  height: 100%;
}

/* HOME: il riferimento geometrico resta invariato. */
.hero--manifesto .hero__copy {
  min-height: 0;
}

/* IL FORMAT: elimina lo spazio nato dal vecchio header sovrapposto. */
.format-hero__copy {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: clamp(52px, 5vw, 78px);
  padding-bottom: clamp(52px, 5vw, 78px);
}

/* PROTAGONISTI: l'asset riempie il medesimo telaio senza deformazioni. */
.hero--protagonisti .hero__art {
  object-fit: cover;
  object-position: center;
}

/* BID & WEAR: contenuto verticale centrato nel telaio comune. */
.bw-hero__content {
  padding-top: clamp(52px, 5vw, 78px);
  padding-bottom: clamp(52px, 5vw, 78px);
}

/* FEDERICA E STARS: immagine leggibile, senza zoom artificiale. */
.event-hero__media img,
.stars-hero__media img {
  transform: none;
  transform-origin: center;
  object-fit: cover;
  object-position: center;
}

/* Raccordo ai lati: stretto e coerente, non una vignettatura generale. */
.event-hero__media::before,
.stars-hero__media::before {
  width: 28px;
  background: linear-gradient(to right, #000 0%, rgba(0,0,0,.34) 42%, transparent 100%);
}

.event-hero__media::after,
.stars-hero__media::after {
  width: 28px;
  background: linear-gradient(to left, #000 0%, rgba(0,0,0,.34) 42%, transparent 100%);
}

/* Oscuramento esclusivamente nella zona testo. Nessuna sfumatura pesante
   sul bordo superiore, inferiore o destro della fotografia. */
.event-hero::before {
  background: linear-gradient(90deg,
    rgba(1,10,18,1) 0%,
    rgba(1,10,18,.98) 27%,
    rgba(1,10,18,.84) 40%,
    rgba(1,10,18,.36) 56%,
    rgba(1,10,18,.08) 72%,
    rgba(1,10,18,0) 100%);
}

.stars-hero::before {
  background: linear-gradient(90deg,
    rgba(3,5,6,1) 0%,
    rgba(3,5,6,.99) 29%,
    rgba(3,5,6,.86) 42%,
    rgba(3,5,6,.38) 57%,
    rgba(3,5,6,.08) 72%,
    rgba(3,5,6,0) 100%);
}

.event-hero::after,
.stars-hero::after {
  box-shadow: none;
  background: none;
}

/* La fotografia Stars resta fedele all'originale: niente ingrandimento e
   nessuna vignettatura sui quattro bordi. */
.stars-hero__media img {
  object-position: center 50%;
}

/* Contatti: stesso telaio, con il contenuto interno a piena altezza. */
.contact-hero__inner {
  min-height: 0;
}

@media (max-width: 900px) {
  .hero--manifesto .hero__frame,
  .format-hero,
  .hero--protagonisti .hero__frame,
  .bw-hero,
  .event-page--federica .event-hero,
  .stars-hero,
  .contact-hero {
    height: var(--site-hero-height-mobile);
    min-height: 0;
  }

  /* HOME: testo sopra e immagine sotto, entro lo stesso telaio. */
  .hero--manifesto .hero__frame {
    display: flex;
    flex-direction: column;
  }

  .hero--manifesto .hero__copy {
    flex: 1 1 auto;
    padding-top: 42px;
    padding-bottom: 38px;
  }

  .hero--manifesto .hero__media {
    position: relative;
    inset: auto;
    flex: 0 0 270px;
    order: 2;
  }

  .hero--manifesto .hero__video {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    object-fit: cover;
  }

  /* FORMAT: medesima ripartizione testo/immagine. */
  .format-hero__inner {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) 270px;
  }

  .format-hero__copy {
    min-height: 0;
    padding: 38px 28px 34px;
  }

  .format-hero__visual {
    min-height: 0;
    height: 270px;
  }

  .format-hero__copy .format-button {
    display: inline-flex;
  }

  .format-hero__mobile-action {
    display: none;
  }

  /* PROTAGONISTI: titolo sopra e mosaico sotto, senza miniaturizzare l'intera grafica. */
  .hero--protagonisti .hero__frame {
    position: relative;
  }

  .hero--protagonisti .hero__art {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 420px;
    object-fit: cover;
    object-position: 58% center;
    background: #000;
  }

  .hero--protagonisti .hero__copy--protagonisti {
    position: absolute;
    z-index: 6;
    top: 0;
    left: 0;
    width: 100%;
    height: 300px;
    padding: 38px 24px 34px;
    justify-content: center;
    background: #050505;
  }

  .hero--protagonisti .hero__copy--protagonisti h1 {
    font-size: clamp(1.65rem, 8vw, 2.25rem);
    line-height: 1.28;
  }

  .hero--protagonisti .hero__copy--protagonisti h1 span {
    white-space: normal;
  }

  .hero--protagonisti .hero__bottom-fade {
    display: none;
  }

  /* BID & WEAR: immagine sopra, testo sotto, altezza totale invariata. */
  .bw-hero {
    display: flex;
    flex-direction: column;
  }

  .bw-hero__media {
    position: relative;
    inset: auto;
    left: auto;
    order: 1;
    width: 100%;
    height: 270px;
    flex: 0 0 270px;
    margin: 0;
    transform: none;
  }

  .bw-hero__media img {
    object-fit: cover;
    object-position: center;
  }

  .bw-hero__content {
    order: 2;
    height: auto;
    flex: 1 1 auto;
    min-height: 0;
    padding-top: 34px;
    padding-bottom: 38px;
    justify-content: center;
  }

  /* Eventi: testo nella metà alta, immagine nella metà bassa. */
  .event-hero__media,
  .stars-hero__media {
    top: 58%;
    bottom: 0;
  }

  .event-hero__inner,
  .stars-hero__inner {
    align-items: flex-start;
    padding-top: 34px;
    padding-bottom: 300px;
  }

  .event-hero__copy,
  .stars-hero__copy {
    width: 100%;
  }

  .event-hero::before,
  .stars-hero::before {
    background: linear-gradient(180deg,
      #050709 0%,
      #050709 43%,
      rgba(5,7,9,.90) 50%,
      rgba(5,7,9,.16) 68%,
      rgba(5,7,9,.08) 100%);
  }

  .event-hero::after,
  .stars-hero::after {
    display: none;
  }

  /* CONTATTI: testo sopra e fotografia sotto. */
  .contact-hero__inner {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) 270px;
    padding-left: 0;
    padding-right: 0;
  }

  .contact-hero__copy {
    min-height: 0;
    padding: 38px 24px 34px;
  }

  .contact-hero__visual {
    min-height: 0;
    height: 270px;
  }
}

@media (max-width: 520px) {
  :root {
    --site-hero-height-mobile: 720px;
  }

  .event-hero__inner,
  .stars-hero__inner {
    width: calc(100% - 34px);
    padding-top: 30px;
    padding-bottom: 302px;
  }

  .stars-hero h1 {
    font-size: clamp(2.15rem, 10.8vw, 3rem);
  }

  .stars-hero__subtitle {
    font-size: clamp(.96rem, 4.5vw, 1.25rem);
  }

  .stars-hero__description {
    margin-top: 20px;
    font-size: .82rem;
  }

  .stars-hero__partners {
    margin-top: 20px;
  }

  .stars-hero__save-logo {
    width: min(150px, 45vw);
  }

  .stars-hero__michelin-logo {
    width: min(108px, 31vw);
  }
}
