/* Hero — split text + CTA primaria (tema oro Road Apulia) */

.hero-content .hero-sub {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-width: 440px;
  margin: 0.2rem 0 2.2rem;
  padding: 0.2rem 1.1rem 0.2rem 1rem;
  border-left: 1px solid rgba(200, 164, 92, 0.8);
  background: linear-gradient(90deg, rgba(5, 5, 5, 0.5) 0%, rgba(5, 5, 5, 0) 92%);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.55);
}

.hero-sub-lead {
  color: #f6f1e6;
  font-family: "Cinzel", serif;
  font-weight: 500;
  font-size: clamp(1rem, 1.45vw, 1.18rem);
  letter-spacing: 0.045em;
  line-height: 1.35;
}

.decrypted-text {
  display: inline-block;
  position: relative;
  min-height: 1.5em;
  font-family: "Cinzel", serif;
  font-weight: 500;
  font-size: clamp(1.05rem, 1.55vw, 1.28rem);
  letter-spacing: 0.06em;
  line-height: 1.35;
  cursor: default;
}

.decrypted-text__screen {
  display: inline-block;
}

.decrypted-char--revealed {
  color: var(--gold-light, #e0c078);
}

.decrypted-char--scramble {
  color: rgba(180, 200, 210, 0.75);
  text-shadow: 0 0 10px rgba(120, 200, 255, 0.25);
  font-variant-numeric: tabular-nums;
}

.decrypted-text--static .decrypted-char--scramble {
  color: var(--gold-light, #e0c078);
  text-shadow: none;
}

@media (max-width: 768px) {
  .hero-content .hero-sub {
    max-width: 100%;
    margin-bottom: 1.5rem;
  }
}

#heroTitle.hero-split-ready .hero-split-line {
  display: block;
  overflow: hidden;
  perspective: 700px;
}

#heroTitle .hero-split-char {
  display: inline-block;
  transform-origin: 50% 100%;
  will-change: transform, opacity;
}

#heroTitle .hero-split-char.is-space {
  width: 0.28em;
}

#heroTitle.hero-split-pending .hero-title-small,
#heroTitle.hero-split-pending .hero-title-huge,
#heroTitle.hero-split-pending .hero-title-subline {
  opacity: 0;
}

#heroTitle.hero-split-ready .hero-title-small,
#heroTitle.hero-split-ready .hero-title-huge,
#heroTitle.hero-split-ready .hero-title-subline {
  opacity: 1;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}

/* Secondaria: leggibile su foto scura (non solo testo grigio) */
.hero-actions .hero-link-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0.55rem 1.1rem;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #f6f1e6;
  background: rgba(5, 5, 5, 0.62);
  border: 1px solid rgba(200, 164, 92, 0.5);
  border-radius: 999px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35),
    0 6px 20px rgba(0, 0, 0, 0.45);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.75);
  transition:
    color 0.25s ease,
    border-color 0.25s ease,
    background 0.25s ease,
    transform 0.25s ease;
}

.hero-actions .hero-link-secondary .hero-link-icon {
  display: inline-block;
  font-size: 0.95em;
  color: var(--gold);
  transition: transform 0.25s ease;
}

.hero-actions .hero-link-secondary:hover,
.hero-actions .hero-link-secondary:focus-visible {
  color: var(--gold-light);
  border-color: rgba(224, 192, 120, 0.75);
  background: rgba(10, 10, 10, 0.78);
  transform: translateY(-1px);
}

.hero-actions .hero-link-secondary:hover .hero-link-icon,
.hero-actions .hero-link-secondary:focus-visible .hero-link-icon {
  transform: translateY(2px);
}

.hero-actions .hero-link-secondary:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 3px;
}

.hero-actions .btn-hero-cta.specular-button {
  text-decoration: none;
  overflow: visible;
  background: linear-gradient(145deg, rgba(92, 72, 32, 0.92), rgba(42, 32, 14, 0.88));
  box-shadow: 0 10px 28px -12px rgba(0, 0, 0, 0.55);
}

.hero-actions .btn-hero-cta.specular-button--active.btn-glow::after {
  display: none;
}

.hero-actions .btn-hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0.85rem 1.75rem;
  font-size: clamp(0.88rem, 1.2vw, 1rem);
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  max-width: 100%;
  white-space: nowrap;
  border-radius: 999px;
  border: 1px solid rgba(224, 192, 120, 0.55);
  box-shadow:
    0 0 0 1px rgba(200, 164, 92, 0.35),
    0 10px 36px rgba(0, 0, 0, 0.45),
    0 4px 28px rgba(200, 164, 92, 0.28);
  transition:
    transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    box-shadow 0.35s ease,
    filter 0.35s ease;
}

.hero-actions .btn-hero-cta .arrow {
  display: inline-block;
  margin-left: 0.35em;
  transition: transform 0.3s ease;
}

.hero-actions .btn-hero-cta:hover,
.hero-actions .btn-hero-cta:focus-visible {
  transform: translateY(-3px);
  filter: brightness(1.06);
  box-shadow:
    0 0 0 1px rgba(224, 192, 120, 0.65),
    0 14px 44px rgba(0, 0, 0, 0.5),
    0 8px 36px rgba(200, 164, 92, 0.42);
}

.hero-actions .btn-hero-cta:hover .arrow,
.hero-actions .btn-hero-cta:focus-visible .arrow {
  transform: translateX(4px);
}

.hero-actions .btn-hero-cta:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 4px;
}

@media (max-width: 768px) {
  .hero-actions {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    width: auto;
    max-width: 100%;
    gap: 0.55rem 0.65rem;
  }

  .hero-actions .hero-link-secondary {
    font-size: 0.82rem;
    padding: 0.5rem 0.95rem;
    min-height: 42px;
  }

  .hero-actions .btn-hero-cta {
    width: auto;
    min-height: 48px;
    padding: 0.7rem 1.2rem;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    text-transform: none;
    font-weight: 600;
    box-shadow:
      0 0 0 1px rgba(200, 164, 92, 0.3),
      0 6px 22px rgba(0, 0, 0, 0.4),
      0 2px 16px rgba(200, 164, 92, 0.22);
  }

  .hero-actions .btn-hero-cta .btn-hero-cta-long {
    display: none;
  }
}

@media (min-width: 769px) {
  .hero-actions .btn-hero-cta .btn-hero-cta-short {
    display: none;
  }
}

@media (max-width: 380px) {
  .hero-actions .btn-hero-cta {
    font-size: 0.76rem;
    padding: 0.62rem 1rem;
    white-space: normal;
    text-align: left;
    line-height: 1.3;
    max-width: min(100%, 17.5rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  #heroTitle.hero-split-pending .hero-title-small,
  #heroTitle.hero-split-pending .hero-title-huge,
  #heroTitle.hero-split-pending .hero-title-subline {
    opacity: 1;
  }

  .hero-actions .btn-hero-cta {
    transition: none;
  }
}
