/* ===== HERO SECTION ENHANCED - Modern & Professional ===== */

#hero_section {
  position: relative;
  width: 100%;
  min-height: calc(100dvh - max(var(--navbar-h), env(safe-area-inset-top)) - max(var(--footer-h), env(safe-area-inset-bottom)));
  overflow: hidden;
  background: #000;
  margin: 0;

  /* Scale tipografica */
  --hero-name-size: clamp(2.4rem, 6.5vw, 4.8rem);
  --hero-role-size: clamp(1.05rem, 2.8vw, 1.65rem);
  --hero-claim-size: clamp(1.05rem, 2.6vw, 1.45rem);
}

/* Immagine con parallax effect */
#hero_img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: 50% 20%;
  z-index: 1;
  user-select: none;
  pointer-events: none;

  /* Effetto zoom subtle al caricamento */
  animation: hero-zoom-in 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;

  /* Parallax sarà gestito con JS ma prepariamo il transform */
  will-change: transform;
  transition: transform 0.1s linear;
}

@keyframes hero-zoom-in {
  0% {
    transform: scale(1.08);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Overlay gradient per migliorare leggibilità */
#hero_section::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.2) 0%,
    rgba(0, 0, 0, 0.4) 40%,
    rgba(0, 0, 0, 0.65) 100%
  );
  z-index: 1;
  pointer-events: none;
}

/* Contenitore testi */
#hero_box {
  position: absolute;
  left: 50%;
  top: 60%;
  transform: translate(-50%, -50%);
  max-width: 680px;
  width: min(92vw, 680px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9em;
  z-index: 2;
  color: #fff;
  text-align: center;
  pointer-events: auto;

  /* Animazioni fade-in staggered */
  opacity: 0;
  animation: hero-fade-up 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.3s forwards;
}

@keyframes hero-fade-up {
  0% {
    opacity: 0;
    transform: translate(-50%, -45%);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

/* Nome - gradient text uniformato */
#hero_name {
  font-family: 'Cormorant Garamond', serif;
  font-size: var(--hero-name-size);
  letter-spacing: 0.12em;
  font-weight: 800;
  margin: 0;
  line-height: 1.15;

  /* Gradient text professionale (uniformato con altre pagine) */
  background: linear-gradient(135deg, #ffffff 0%, #d4af37 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;

  /* Animazione ritardata */
  opacity: 0;
  animation: hero-text-reveal 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.5s forwards;
}

/* Ruolo - uppercase elegante */
#hero_role {
  font-family: 'Montserrat', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  margin: 0.15em 0 0 0;
  font-size: var(--hero-role-size);
  font-weight: 300;
  line-height: 1.2;
  opacity: 0;

  text-shadow:
    0 2px 8px rgba(0, 0, 0, 0.8),
    0 4px 16px rgba(0, 0, 0, 0.5);

  animation: hero-text-reveal 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.7s forwards;
}

/* Claim - accent color con glow */
#hero_claim {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 600;
  color: var(--accent-color);
  font-size: var(--hero-claim-size);
  margin-top: 1.4em;
  letter-spacing: 0.13em;
  opacity: 0;

  /* Glow effect dorato */
  text-shadow:
    0 0 10px rgba(212, 175, 55, 0.5),
    0 2px 14px rgba(0, 0, 0, 0.8),
    0 4px 24px rgba(0, 0, 0, 0.5);

  animation: hero-text-reveal 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.9s forwards;
}

@keyframes hero-text-reveal {
  0% {
    opacity: 0;
    transform: translateY(12px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== RESPONSIVE ===== */

/* Telefoni verticali */
@media (max-aspect-ratio: 3/4) {
  #hero_section {
    min-height: calc(100dvh - max(var(--navbar-h), env(safe-area-inset-top)) - max(var(--footer-h), env(safe-area-inset-bottom)) - 6vh);
  }
  #hero_img { object-position: 50% 18%; }
  #hero_box { gap: 0.7em; }
}

@media (max-aspect-ratio: 2/3) {
  #hero_section {
    min-height: calc(100dvh - max(var(--navbar-h), env(safe-area-inset-top)) - max(var(--footer-h), env(safe-area-inset-bottom)) - 10vh);
  }
  #hero_img { object-position: 50% 20%; }
}

/* Wide desktop */
@media (min-aspect-ratio: 16/9) {
  #hero_img { object-position: 50% 50%; }
}

/* Landscape */
@media (orientation: landscape) {
  #hero_box {
    transform: translate(-50%, -40%);
    width: min(85vw, 640px);
  }
}

/* Landscape bassa altezza */
@media (orientation: landscape) and (max-height: 480px) {
  #hero_img { object-position: 50% 25%; }
  #hero_box { transform: translate(-50%, -10%); }
}

/* Mobile touch: riduci animazioni per performance */
@media (prefers-reduced-motion: reduce) {
  #hero_img,
  #hero_box,
  #hero_name,
  #hero_role,
  #hero_claim {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ===== HERO FOOTER - Status & Stats Discreti ===== */

.hero-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 3;
  padding: 1.5rem 2rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;

  /* Sfumatura sottile dal basso */
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.7) 0%,
    rgba(0, 0, 0, 0.4) 60%,
    transparent 100%
  );

  /* Animazione fade-in ritardata */
  opacity: 0;
  animation: hero-footer-fade 0.8s ease-out 1.1s forwards;
}

@keyframes hero-footer-fade {
  to { opacity: 1; }
}

/* Status (Award line) */
.hero-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.75);
  text-transform: uppercase;
}

.hero-status__award {
  color: var(--accent-color, #d4af37);
  font-weight: 500;
}

.hero-status__separator {
  opacity: 0.5;
}

.hero-status__org {
  opacity: 0.7;
}

/* Stats row */
.hero-stats {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.7rem;
  font-weight: 300;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.6);
}

.hero-stat strong {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  margin-right: 0.2em;
}

.hero-stats__dot {
  opacity: 0.4;
  margin: 0 0.3rem;
}

/* ===== HERO FOOTER RESPONSIVE ===== */

@media (max-width: 600px) {
  .hero-footer {
    padding: 1rem 1rem 1.5rem;
    gap: 0.5rem;
  }

  .hero-status {
    flex-direction: column;
    gap: 0.2rem;
    text-align: center;
    font-size: 0.65rem;
  }

  .hero-status__separator {
    display: none;
  }

  .hero-stats {
    font-size: 0.62rem;
    gap: 0.3rem;
  }

  .hero-stats__dot {
    margin: 0 0.2rem;
  }
}

@media (max-height: 500px) and (orientation: landscape) {
  .hero-footer {
    padding: 0.8rem 1rem;
    flex-direction: row;
    justify-content: center;
    gap: 2rem;
  }

  .hero-status,
  .hero-stats {
    font-size: 0.6rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-footer {
    animation: none !important;
    opacity: 1 !important;
  }
}
