/* Hero — estrutura própria, sem dependência de outras folhas de estilo. */

.hero {
  --hero-bg-1: #0d1424;
  --hero-bg-2: #0a0f1c;
  --hero-bg-3: #060910;
  --hero-accent: #3b82f6;
  --hero-accent-soft: #7dd3fc;
  --hero-ink: #f1f5f9;
  --hero-ink-soft: rgba(241, 245, 249, 0.7);
  --hero-line: rgba(148, 163, 184, 0.12);

  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: radial-gradient(120% 120% at 50% 0%, var(--hero-bg-1) 0%, var(--hero-bg-2) 45%, var(--hero-bg-3) 100%);
  isolation: isolate;
}

.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.55;
}

/* Grade tecnológica sutil */
.hero__grid {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image:
    linear-gradient(var(--hero-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--hero-line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 40%, transparent 100%);
  animation: hero-grid-drift 40s linear infinite;
}

@keyframes hero-grid-drift {
  from { background-position: 0 0, 0 0; }
  to { background-position: 96px 48px, 96px 48px; }
}

/* Spotlight que acompanha o cursor */
.hero__spotlight {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: var(--spotlight-opacity, 0);
  transition: opacity 0.5s ease;
  background:
    radial-gradient(480px circle at var(--mx, 50%) var(--my, 30%), rgba(125, 211, 252, 0.16), transparent 60%),
    radial-gradient(220px circle at var(--mx, 50%) var(--my, 30%), rgba(59, 130, 246, 0.14), transparent 70%);
}

/* Reforça a grade dentro do raio do spotlight */
.hero__grid::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(125, 211, 252, 0.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125, 211, 252, 0.5) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: inherit;
  -webkit-mask-image: radial-gradient(220px circle at var(--mx, 50%) var(--my, 30%), #000 0%, transparent 70%);
  mask-image: radial-gradient(220px circle at var(--mx, 50%) var(--my, 30%), #000 0%, transparent 70%);
  opacity: var(--spotlight-opacity, 0);
  transition: opacity 0.5s ease;
}

/* Orbs de luz (glow) */
.hero__glow {
  position: absolute;
  z-index: 1;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
}

.hero__glow--a {
  width: 46vw;
  height: 46vw;
  top: -12%;
  left: -8%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.45) 0%, rgba(59, 130, 246, 0) 70%);
  animation: hero-float-a 14s ease-in-out infinite;
}

.hero__glow--b {
  width: 38vw;
  height: 38vw;
  bottom: -14%;
  right: -6%;
  background: radial-gradient(circle, rgba(125, 211, 252, 0.3) 0%, rgba(125, 211, 252, 0) 70%);
  animation: hero-float-b 18s ease-in-out infinite;
}

@keyframes hero-float-a {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(4%, 6%) scale(1.08); }
}

@keyframes hero-float-b {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-5%, -4%) scale(1.1); }
}

/* Conteúdo */
.hero__content {
  position: relative;
  z-index: 2;
  max-width: 920px;
  padding: 0 24px;
  text-align: center;
}

.hero__title {
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-weight: 700;
  font-size: clamp(2.1rem, 5.2vw, 4rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 26px;
  color: var(--hero-ink);
  opacity: 0;
  transform: translateY(18px);
  animation: hero-rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards;
}

.hero__title span {
  background: linear-gradient(100deg, var(--hero-accent-soft) 0%, var(--hero-accent) 50%, var(--hero-accent-soft) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: hero-shine 6s linear infinite;
}

@keyframes hero-shine {
  to { background-position: 200% center; }
}

.hero__subtitle {
  font-family: "Inter", sans-serif;
  font-weight: 400;
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  line-height: 1.65;
  color: var(--hero-ink-soft);
  max-width: 640px;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(18px);
  animation: hero-rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.24s forwards;
}

@keyframes hero-rise {
  to { opacity: 1; transform: translateY(0); }
}

.hero__cta {
  font-family: "Inter", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--hero-ink);
  background: linear-gradient(100deg, rgba(59, 130, 246, 0.25), rgba(125, 211, 252, 0.25));
  border: 1px solid rgba(125, 211, 252, 0.4);
  border-radius: 999px;
  padding: 14px 32px;
  margin-top: 40px;
  cursor: pointer;
  opacity: 0;
  transform: translateY(18px);
  animation: hero-rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.38s forwards;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.hero__cta:hover,
.hero__cta:focus-visible {
  background: linear-gradient(100deg, rgba(59, 130, 246, 0.4), rgba(125, 211, 252, 0.4));
  border-color: rgba(125, 211, 252, 0.7);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(59, 130, 246, 0.25);
}

.hero__cta:focus-visible {
  outline: 2px solid var(--hero-accent-soft);
  outline-offset: 3px;
}

/* Indicador de scroll */
.hero__scroll {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 36px;
  transform: translateX(-50%);
  width: 22px;
  height: 36px;
  border: 1.5px solid rgba(241, 245, 249, 0.3);
  border-radius: 999px;
  pointer-events: none;
  opacity: 0;
  animation: hero-rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.5s forwards;
}

.hero__scroll::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 50%;
  width: 4px;
  height: 8px;
  border-radius: 2px;
  background: rgba(241, 245, 249, 0.7);
  transform: translateX(-50%);
  animation: hero-scroll-dot 1.8s ease-in-out infinite;
}

@keyframes hero-scroll-dot {
  0% { top: 7px; opacity: 1; }
  70% { top: 18px; opacity: 0; }
  100% { top: 18px; opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__grid,
  .hero__glow--a,
  .hero__glow--b,
  .hero__title span,
  .hero__scroll::before {
    animation: none;
  }
  .hero__title,
  .hero__subtitle,
  .hero__cta,
  .hero__scroll {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 560px) {
  .hero__content {
    padding: 0 20px;
  }
  .hero__scroll {
    bottom: 22px;
  }
}
