/* ============================================
   Personal Nathy — Animação de entrada (hero)
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&display=swap');

:root {
  --entrance-text: #ffffff;
  --entrance-gold: #c8a96a;
}

.js body.is-entering {
  overflow: hidden;
}

/* Oculta conteúdo do hero até a animação terminar */
.js #hero:not(.is-loaded) .hero__content h1,
.js #hero:not(.is-loaded) .hero__content p,
.js #hero:not(.is-loaded) .hero__content a {
  opacity: 0;
  transform: translateY(28px);
}

.hero-entrance {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(20, 1, 18, 0.82);
  opacity: 0;
  transition: opacity 0.55s ease, visibility 0.55s ease;
  pointer-events: none;
}

.js .hero-entrance.is-visible,
.js .hero-entrance.is-exiting {
  display: flex;
}

.js .hero-entrance.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.hero-entrance.is-exiting {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.hero-entrance__content {
  position: relative;
  z-index: 1;
  width: min(92vw, 560px);
  text-align: center;
  padding: 1.5rem;
}

.hero-entrance__quote-block {
  opacity: 0;
  transform: translateY(16px) scale(0.98);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.hero-entrance__quote-block.is-ready,
.hero-entrance__quote-block.is-active {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.hero-entrance__quote-block.is-fading {
  opacity: 0;
  transform: translateY(-12px) scale(0.98);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.hero-entrance__quote-line {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.35rem, 4.5vw, 1.85rem);
  font-weight: 600;
  line-height: 1.45;
  color: var(--entrance-text);
  padding: 0 0.5rem;
}

.hero-entrance__cursor {
  color: var(--entrance-gold);
  animation: entranceBlink 0.9s step-end infinite;
  opacity: 0;
}

.hero-entrance__cursor.is-active {
  opacity: 1;
}

.hero-entrance__cursor.is-hidden {
  opacity: 0;
  animation: none;
}

@keyframes entranceBlink {
  50% {
    opacity: 0;
  }
}

.hero-entrance__gold-line {
  height: 2px;
  width: 0;
  max-width: 320px;
  margin: 1.25rem auto 0;
  background: linear-gradient(90deg, transparent, var(--entrance-gold), transparent);
  border-radius: 2px;
  transition: width 0.08s linear;
}

/* ── Revelação do conteúdo do hero ── */

.js .hero.is-loaded .hero__content h1 {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.05s,
    transform 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.05s;
}

.js .hero.is-loaded .hero__content p {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.2s,
    transform 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.2s;
}

.js .hero.is-loaded .hero__content a {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.35s,
    transform 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.35s;
}

/* ── Desktop: frase maior e overlay mais cinematográfico ── */

@media (min-width: 769px) {
  .hero-entrance {
    background: rgba(20, 1, 18, 0.72);
  }

  .hero-entrance__content {
    width: min(80vw, 720px);
    padding: 2rem;
  }

  .hero-entrance__quote-line {
    font-size: clamp(1.75rem, 3.2vw, 2.5rem);
    line-height: 1.4;
    letter-spacing: 0.01em;
  }

  .hero-entrance__gold-line {
    max-width: 420px;
    margin-top: 1.75rem;
  }

  .js .hero.is-loaded .hero__content h1 {
    transition-delay: 0.1s;
  }

  .js .hero.is-loaded .hero__content p {
    transition-delay: 0.25s;
  }

  .js .hero.is-loaded .hero__content a {
    transition-delay: 0.4s;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-entrance,
  .hero-entrance__quote-block,
  .hero__content h1,
  .hero__content p,
  .hero__content a {
    transition: none !important;
  }

  .js .hero.is-loaded .hero__content h1,
  .js .hero.is-loaded .hero__content p,
  .js .hero.is-loaded .hero__content a {
    opacity: 1 !important;
    transform: none !important;
  }
}
