/**
 * HeroHome — banner da Home (reutilizável).
 * Dependências: fonte Nunito (Google Fonts ou self-host) para o título.
 */

.hero-home {
  --hero-navy: #1b1f6b;
  --hero-coral: #ff6b4a;
  --hero-orange: #ff8c1a;
  --hero-blue: #1d44a2;
  --hero-blue-soft: #e8f0fb;
  --hero-cream: #fff8ef;
  --hero-ink-muted: #3d4578;
  --hero-font-display: "Nunito", "Outfit", system-ui, sans-serif;
  --hero-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --hero-duration: 220ms;

  position: relative;
  display: grid;
  align-items: center;
  min-height: clamp(30rem, 42vw, 40rem); /* ~480–640px */
  overflow: clip;
  isolation: isolate;
  color: var(--hero-navy);
  background: linear-gradient(135deg, var(--hero-cream) 0%, #eef5ff 55%, #e4eefc 100%);
}

.hero-home__media {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero-home__media picture,
.hero-home__media img {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-home__media img {
  object-fit: cover;
  object-position: right center;
}

/* Véu claro à esquerda: garante contraste AA sem cobrir os aparelhos */
.hero-home__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(255, 248, 239, 0.92) 0%,
    rgba(255, 248, 239, 0.72) 28%,
    rgba(238, 245, 255, 0.28) 48%,
    rgba(238, 245, 255, 0) 62%
  );
  pointer-events: none;
}

.hero-home__inner {
  position: relative;
  z-index: 1;
  width: min(100% - 2 * var(--page-padding, 1.25rem), var(--container-max, 90rem));
  margin-inline: auto;
  padding: clamp(1.75rem, 4vw, 2.75rem) 0;
}

.hero-home__copy {
  max-width: min(36rem, 58%);
  display: grid;
  gap: 0.75rem;
}

.hero-home__title {
  margin: 0;
  font-family: var(--hero-font-display);
  font-size: clamp(2rem, 1.55rem + 1.8vw, 3.5rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--hero-navy);
  text-wrap: pretty;
  overflow-wrap: normal;
  word-break: normal;
}

.hero-home__subtitle {
  margin: 0;
  font-family: var(--hero-font-display);
  font-size: clamp(1.2rem, 1.05rem + 0.55vw, 1.55rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--hero-coral);
}

.hero-home__support {
  margin: 0 0 0.35rem;
  max-width: none;
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  font-weight: 500;
  line-height: 1.45;
  color: var(--hero-ink-muted);
}

.hero-home__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.35rem;
}

.hero-home__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  padding: 0.8rem 1.45rem;
  border-radius: 999px;
  border: 2px solid transparent;
  font-family: var(--hero-font-display);
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.1;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition:
    transform var(--hero-duration) var(--hero-ease),
    box-shadow var(--hero-duration) var(--hero-ease),
    background-color var(--hero-duration) var(--hero-ease),
    border-color var(--hero-duration) var(--hero-ease),
    color var(--hero-duration) var(--hero-ease);
}

.hero-home__btn:focus-visible {
  outline: 3px solid rgba(6, 186, 185, 0.55);
  outline-offset: 3px;
}

.hero-home__btn--primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--hero-orange) 0%, var(--hero-coral) 100%);
  border-color: transparent;
  box-shadow: 0 0.65rem 1.35rem rgba(255, 107, 74, 0.32);
}

.hero-home__btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.95rem 1.85rem rgba(255, 107, 74, 0.42);
}

.hero-home__btn--primary:active {
  transform: translateY(0);
}

.hero-home__btn--secondary {
  color: var(--hero-blue);
  background: transparent;
  border-color: var(--hero-blue);
}

.hero-home__btn--secondary:hover {
  background: var(--hero-blue-soft);
  border-color: var(--hero-blue);
  color: var(--hero-blue);
}

/* Entrada sutil */
.hero-home__copy > * {
  animation: hero-home-enter 620ms var(--hero-ease) both;
}

.hero-home__copy > *:nth-child(1) { animation-delay: 40ms; }
.hero-home__copy > *:nth-child(2) { animation-delay: 120ms; }
.hero-home__copy > *:nth-child(3) { animation-delay: 200ms; }
.hero-home__copy > *:nth-child(4) { animation-delay: 280ms; }

@keyframes hero-home-enter {
  from {
    opacity: 0;
    transform: translateY(0.7rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Tablet / celular: texto acima, imagem abaixo */
@media (max-width: 47.9375rem) {
  .hero-home {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
    background: linear-gradient(180deg, var(--hero-cream) 0%, #eef5ff 62%, #e4eefc 100%);
  }

  .hero-home__media {
    position: relative;
    order: 2;
    height: 16.25rem; /* ~260px */
    flex-shrink: 0;
  }

  .hero-home__media::after {
    display: none;
  }

  .hero-home__inner {
    order: 1;
    width: 100%;
    max-width: none;
    padding: clamp(1.35rem, 4vw, 1.85rem) var(--page-padding, 1.25rem) 1.1rem;
  }

  .hero-home__copy {
    max-width: 40rem;
    margin-inline: auto;
    text-align: left;
  }

  .hero-home__support {
    max-width: none;
  }

  .hero-home__actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero-home__btn {
    width: 100%;
  }
}

@media (max-width: 22.5rem) {
  .hero-home__title {
    font-size: clamp(1.75rem, 8.2vw, 2rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-home__copy > * {
    animation: none;
  }

  .hero-home__btn,
  .hero-home__btn--primary:hover,
  .hero-home__btn--primary:active {
    transition: none;
    transform: none;
  }
}
