/* ================================================================
   HERO.CSS — Sezione Hero, layout editoriale full-viewport
   ================================================================ */

.hero {
  position: relative;
  width: 100%;
  min-height: 100svh;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  background: var(--bg);
}

/* ---- Sfondi decorativi ---- */
.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 40%, black 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 40%, black 40%, transparent 100%);
  pointer-events: none;
  opacity: 0.6;
}

.hero-bg-grain {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  opacity: 0.04;
  pointer-events: none;
}

/* Orbs luminosi */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  will-change: transform;
}

.hero-orb--1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(232,168,112,0.12) 0%, transparent 70%);
  top: -100px;
  right: -100px;
  animation: orbFloat1 12s ease-in-out infinite;
}

.hero-orb--2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(138,180,200,0.08) 0%, transparent 70%);
  bottom: 0;
  left: 20%;
  animation: orbFloat2 15s ease-in-out infinite;
}

@keyframes orbFloat1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-40px, 30px) scale(1.05); }
}

@keyframes orbFloat2 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(30px, -20px); }
}

/* ---- Numero sezione decorativo ---- */
.hero-section-num {
  position: absolute;
  left: var(--pad-x);
  bottom: 2rem;
  font-family: var(--ff-mono);
  font-size: 0.65rem;
  letter-spacing: 3px;
  color: var(--text-tertiary);
}

/* ---- Layout interno ---- */
.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-top: 9rem;
  padding-bottom: 5rem;
  width: 100%;
  gap: 3rem;
}

/* Top bar */
.hero-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  opacity: 0;
  animation: fadeSlideIn 0.8s var(--ease-out) 0.2s forwards;
}

.hero-available {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--ff-mono);
  font-size: 0.68rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  padding: 0.4rem 0.9rem;
  border-radius: var(--r-full);
  background: rgba(255,255,255,0.03);
}

.hero-available-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.6);
  animation: pulse 2.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 8px rgba(74, 222, 128, 0.6); }
  50% { box-shadow: 0 0 16px rgba(74, 222, 128, 0.9), 0 0 4px rgba(74, 222, 128, 0.4); }
}

.hero-year {
  font-family: var(--ff-mono);
  font-size: 0.68rem;
  letter-spacing: 2px;
  color: var(--text-tertiary);
}

/* ---- Titolo hero massiccio ---- */
.hero-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.hero-role {
  font-family: var(--ff-mono);
  font-size: clamp(0.7rem, 1.2vw, 0.9rem);
  font-weight: 400;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.hero-role .hero-line-inner {
  transition-delay: 0.3s;
}

.hero-name {
  font-family: var(--ff-display);
  font-size: clamp(5rem, 10.5vw, 12rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -5px;
  color: var(--text-primary);
  display: block;
}

.hero-name-line {
  display: block;
  overflow: hidden;
}

.hero-name-line .hero-line-inner {
  transition-delay: 0.4s;
}

.hero-name-line--italic {
  display: block;
}

.hero-name-line--italic .hero-line-inner {
  font-family: var(--ff-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
  transition-delay: 0.52s;
}

/* ---- Bottom bar ---- */
.hero-bottom {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 3rem;
}

/* Descrizione */
.hero-description {
  font-family: var(--ff-display);
  font-size: clamp(0.9rem, 1.1vw, 1.05rem);
  font-weight: 400;
  line-height: 1.85;
  color: var(--text-secondary);
  max-width: 320px;
}

.hero-description .hero-line-inner {
  transition-delay: 0.7s;
}

/* Foto */
.hero-photo-wrap {
  position: relative;
}

.hero-photo-frame {
  position: relative;
  width: clamp(180px, 18vw, 280px);
  border-radius: var(--r-lg);
  overflow: visible;
}

.hero-photo {
  width: 100%;
  height: auto;
  aspect-ratio: 4/5;
  object-fit: cover;
  object-position: top center;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  filter: grayscale(15%) contrast(1.05);
  transition: filter 0.5s ease;
}

.hero-photo:hover {
  filter: grayscale(0%) contrast(1.05);
}

/* Badge flottante sulla foto */
.hero-photo-badge {
  position: absolute;
  bottom: -16px;
  right: -20px;
  background: var(--surface-2);
  border: 1px solid var(--border-light);
  border-radius: var(--r-md);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  box-shadow: var(--shadow-lg);
  animation: badgeFloat 4s ease-in-out infinite;
  white-space: nowrap;
}

@keyframes badgeFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.badge-icon {
  font-size: 1rem;
  color: var(--accent);
  line-height: 1;
}

.badge-text strong {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  font-family: var(--ff-display);
  color: var(--text-primary);
  line-height: 1.3;
}

.badge-text em {
  font-style: normal;
  font-family: var(--ff-mono);
  font-size: 0.62rem;
  color: var(--text-tertiary);
  letter-spacing: 0.5px;
}

/* CTA Group */
.hero-cta-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-end;
  opacity: 0;
  animation: fadeSlideIn 0.8s var(--ease-out) 1s forwards;
}

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- Scroll indicator ---- */
.hero-scroll {
  position: absolute;
  bottom: 2rem;
  right: var(--pad-x);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--ff-mono);
  font-size: 0.62rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-tertiary);
  opacity: 0;
  animation: fadeSlideIn 0.8s var(--ease-out) 1.3s forwards;
}

.hero-scroll-track {
  width: 30px;
  height: 1px;
  background: var(--border);
  position: relative;
  overflow: hidden;
}

.hero-scroll-thumb {
  position: absolute;
  top: 0; left: -100%;
  width: 100%;
  height: 100%;
  background: var(--accent);
  animation: scrollSlide 2s ease-in-out infinite;
}

@keyframes scrollSlide {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .hero-inner {
    padding-top: 8rem;
  }

  .hero-name {
    letter-spacing: -4px;
  }

  .hero-bottom {
    grid-template-columns: 1fr auto;
    gap: 2rem;
    flex-wrap: wrap;
  }

  .hero-cta-group {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
  }
}

@media (max-width: 768px) {
  .hero-inner {
    padding-top: 7rem;
    gap: 2rem;
  }

  .hero-name {
    font-size: clamp(3.5rem, 13vw, 6rem);
    letter-spacing: -3px;
  }

  .hero-bottom {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hero-photo-wrap {
    display: none;
  }

  .hero-cta-group {
    flex-direction: row;
    align-items: center;
  }

  .hero-scroll {
    display: none;
  }
}
