/* ============================================================
   PORTFÓLIO v2 "EMBER" — HERO CSS (secção 1)
   Tudo scoped a .s-hero / .hero__* — sem estilos globais.
   ============================================================ */

/* ---------- Bloco principal ---------- */
.s-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding-top: clamp(90px, 14vw, 120px);
  padding-bottom: 80px;
}

.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* Marca de água AC: entre o canvas (z-0, antes na ordem) e o conteúdo (z-1) */
.s-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url("../assets/logo-ac-neon.png");
  background-repeat: no-repeat;
  background-position: right clamp(16px, 6vw, 96px) center;
  background-size: auto min(66%, 620px);
  opacity: 0.05;
}

.hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
}

/* ---------- Label ---------- */
.hero__label {
  margin-bottom: 18px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  transition-delay: 0.1s;
}

#hero.is-ignited .hero__label {
  opacity: 1;
  transform: none;
}

/* ---------- Título ---------- */
.hero__title {
  font-family: var(--display);
  text-transform: uppercase;
  font-size: clamp(3.2rem, 11vw, 9rem);
  line-height: 0.95;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.hero__line {
  display: block;
  overflow: hidden;
}

.hero__char {
  display: inline-block;
  transform: translateY(110%);
  opacity: 0;
  transition:
    transform 0.6s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.4s ease;
  transition-delay: calc(var(--i) * 45ms);
}

#hero.is-ignited .hero__char {
  transform: none;
  opacity: 1;
}

.hero__char--ember {
  color: var(--ember);
  text-shadow: 0 0 24px rgba(124, 58, 237, 0.45);
}

/* ---------- Rotator ---------- */
.hero__rotator {
  display: flex;
  align-items: center;
  gap: 2px;
  font-family: var(--mono);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  color: var(--ink-dim);
  margin-block: 20px;
}

.hero__rotator-bracket {
  color: var(--ember);
}

.hero__rotator-viewport {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  min-width: 11ch;
}

.hero__rotator-word {
  display: inline-block;
  color: var(--amber);
  transform: translateY(0);
  opacity: 1;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.hero__rotator-word.is-out {
  transform: translateY(-100%);
  opacity: 0;
}

.hero__rotator-word.is-in {
  transform: translateY(100%);
  opacity: 0;
}

/* ---------- Statement / substatement ---------- */
.hero__statement {
  font-family: var(--body);
  font-weight: 600;
  font-size: clamp(1.15rem, 2.4vw, 1.7rem);
  line-height: 1.35;
  max-width: 34ch;
  color: var(--ink);
  margin-top: 28px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  transition-delay: 0.5s;
}

#hero.is-ignited .hero__statement {
  opacity: 1;
  transform: none;
}

.hero__substatement {
  font-family: var(--body);
  color: var(--ink-dim);
  font-size: clamp(0.9rem, 1.6vw, 1.05rem);
  max-width: 56ch;
  margin-top: 12px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  transition-delay: 0.65s;
}

#hero.is-ignited .hero__substatement {
  opacity: 1;
  transform: none;
}

/* ---------- Stats ---------- */
.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(24px, 5vw, 64px);
  margin-top: clamp(40px, 6vw, 64px);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.hero__stats.is-visible {
  opacity: 1;
  transform: none;
}

.hero__stat-num {
  font-family: var(--display);
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  line-height: 1;
  color: var(--ink);
}

.hero__stat-suffix {
  color: var(--ember);
}

.hero__stat-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-top: 6px;
  max-width: 16ch;
}

/* ---------- CTA ---------- */
.hero__cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 40px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  transition-delay: 0.8s;
}

#hero.is-ignited .hero__cta {
  opacity: 1;
  transform: none;
}

.hero__btn {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 16px 28px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition:
    transform 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.hero__btn--fill {
  background: var(--ember);
  color: var(--bg);
  border: 1px solid var(--ember);
}

.hero__btn--fill:hover {
  transform: translate(3px, -3px);
  box-shadow: -3px 3px 0 0 var(--amber);
}

.hero__btn--fill:hover .hero__btn-arrow {
  transform: translateX(4px);
}

.hero__btn--outline {
  border: 1px solid var(--border);
  color: var(--ink);
  background: transparent;
}

.hero__btn--outline:hover {
  border-color: var(--ember);
  color: var(--ember);
}

.hero__btn-arrow {
  transition: transform 0.2s ease;
}

/* ---------- Scroll indicator ---------- */
.hero__scroll {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--ink-dim);
  opacity: 0;
  transition: opacity 0.6s ease;
  transition-delay: 1s;
}

#hero.is-ignited .hero__scroll {
  opacity: 1;
}

.hero__scroll-label {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
}

.hero__scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--ember), transparent);
  transform-origin: top;
  animation: heroScrollPulse 1.8s infinite;
}

@keyframes heroScrollPulse {
  0% {
    transform: scaleY(0);
    opacity: 0;
  }
  40% {
    transform: scaleY(1);
    opacity: 1;
  }
  100% {
    transform: scaleY(1);
    opacity: 0;
  }
}

/* ---------- Responsivo ---------- */
@media (max-width: 768px) {
  .hero__stats {
    gap: clamp(20px, 6vw, 40px);
  }
}

@media (max-width: 480px) {
  .s-hero {
    padding-top: 110px;
  }

  .hero__statement,
  .hero__substatement {
    max-width: 100%;
  }

  .hero__stats {
    gap: 20px 32px;
  }

  .hero__cta {
    flex-direction: column;
    align-items: stretch;
  }

  .hero__btn {
    width: 100%;
    justify-content: center;
  }

  .hero__scroll-label {
    writing-mode: horizontal-tb;
    letter-spacing: 0.2em;
  }
}

/* ---------- Reduced motion (estados finais visíveis) ---------- */
@media (prefers-reduced-motion: reduce) {
  .hero__char,
  .hero__label,
  .hero__statement,
  .hero__substatement,
  .hero__cta,
  .hero__scroll,
  .hero__stats {
    opacity: 1;
    transform: none;
  }

  .hero__scroll-line {
    animation: none;
    transform: scaleY(1);
    opacity: 1;
  }
}
