/* ─────────────────────────────────────────────────────────────
   Hero PHIA — linha cinética (órbita + aurora + rastro + parallax)
   Camadas: aurora WebGL (z0) · estrelas (z0) · rastro do mouse (z2) · conteúdo (z10)
   ───────────────────────────────────────────────────────────── */
.hero-v2 {
  --ph-azul: #4c8dff; --ph-violeta: #7c5cff; --ph-agua: #3cf0c8; --ph-fundo: #060b18;
  position: relative; isolation: isolate; overflow: hidden;
  max-width: none; margin: 0; padding: 0; text-align: left;
  min-height: min(880px, calc(100svh - 64px));
  display: flex; align-items: center;
  background:
    radial-gradient(60% 55% at 72% 45%, rgba(124, 92, 255, .16), transparent 70%),
    radial-gradient(50% 50% at 20% 30%, rgba(76, 141, 255, .10), transparent 70%),
    var(--ph-fundo);
  border-bottom: 1px solid rgba(124, 92, 255, .14);
}
.hero-v2 canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; display: block; }
.hero-aurora { z-index: 0; opacity: .42; mix-blend-mode: screen; }
.hero-estrelas { z-index: 0; }
.hero-rastro { z-index: 2; mix-blend-mode: screen; }
.hero-v2::after {                                     /* escurece a base pra emendar na página */
  content: ""; position: absolute; inset: auto 0 0 0; height: 140px; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, transparent, var(--ph-fundo));
}

.hero-grade {
  position: relative; z-index: 10; width: 100%; max-width: 1180px; margin: 0 auto;
  padding: 64px 28px 72px; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: 32px; align-items: center;
}
.hero-copy { will-change: transform, opacity; }
.hero-v2 .selo { margin: 0 0 22px; }
.hero-v2 h1 {
  font-size: clamp(38px, 5.4vw, 66px); line-height: 1.04; letter-spacing: -.025em; margin: 0 0 20px;
  text-wrap: balance;
}
.hero-v2 h1 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--ph-azul) 0%, var(--ph-violeta) 55%, var(--ph-agua) 100%);
  background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: ph-brilho 6s ease-in-out infinite;
  filter: drop-shadow(0 0 22px rgba(124, 92, 255, .35));
}
@keyframes ph-brilho { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.hero-v2 .hero-sub { margin: 0 0 30px; max-width: 560px; }
.hero-v2 .hero-acoes { justify-content: flex-start; gap: 16px; }
.hero-v2 .hero-nota { max-width: 520px; color: rgba(157, 176, 212, .85); }

/* CTA magnético com brilho que passa */
.hero-v2 .btn-primario { position: relative; overflow: hidden; box-shadow: 0 14px 40px rgba(92, 80, 255, .45), 0 0 0 1px rgba(255, 255, 255, .08) inset; }
.hero-v2 .btn-primario::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-120%);
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .45) 50%, transparent 70%);
  animation: ph-passa 3.8s ease-in-out infinite 1.2s;
}
@keyframes ph-passa { 0% { transform: translateX(-120%); } 38%, 100% { transform: translateX(120%); } }
.hero-v2 .btn-fraco { background: rgba(20, 30, 70, .45); border-color: rgba(124, 92, 255, .35); backdrop-filter: blur(10px); }
.ph-magnetico { transition: transform .25s cubic-bezier(.2, .8, .2, 1); will-change: transform; }

/* ── órbita (a logo viva) ── */
.hero-orbita { position: relative; aspect-ratio: 1; width: 100%; max-width: 520px; justify-self: center; will-change: transform; }
.hero-orbita svg { width: 100%; height: 100%; overflow: visible; display: block; }
.ph-halo { position: absolute; inset: 12%; border-radius: 50%; z-index: -1;
  background: radial-gradient(circle, rgba(124, 92, 255, .35), rgba(76, 141, 255, .12) 45%, transparent 70%);
  filter: blur(18px); animation: ph-respira 7s ease-in-out infinite; }
@keyframes ph-respira { 0%, 100% { transform: scale(.94); opacity: .8; } 50% { transform: scale(1.04); opacity: 1; } }
.ph-perola { animation: ph-flutua 8s ease-in-out infinite; transform-origin: 200px 200px; transform-box: view-box; }
@keyframes ph-flutua { 0%, 100% { transform: translateY(-4px); } 50% { transform: translateY(5px); } }
.ph-anel-giro { transform-origin: 200px 200px; transform-box: view-box; animation: ph-gira 38s linear infinite; }
@keyframes ph-gira { to { transform: rotate(360deg); } }
.ph-chip {
  position: absolute; z-index: 3; display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 12px; font-size: 12.5px; font-weight: 600; color: #eaf0ff; white-space: nowrap;
  background: linear-gradient(135deg, rgba(76, 141, 255, .18), rgba(124, 92, 255, .12));
  border: 1px solid rgba(124, 92, 255, .35); backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35); animation: ph-flutua 7s ease-in-out infinite;
}
.ph-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--ph-agua); box-shadow: 0 0 10px var(--ph-agua); flex: none; }
.ph-chip-1 { top: 10%; left: -2%; }
.ph-chip-2 { top: 46%; right: -6%; animation-delay: -2.4s; }
.ph-chip-3 { bottom: 9%; left: 8%; animation-delay: -4.6s; }

/* ── entrada (fade + sobe + desfoca), escalonada ── */
/* só esconde quando o hero.js está rodando: sem JS, o texto aparece normal */
.ph-anima .ph-entra { opacity: 0; transform: translateY(18px); filter: blur(8px);
  transition: opacity .9s cubic-bezier(.2, .8, .2, 1), transform .9s cubic-bezier(.2, .8, .2, 1), filter .9s ease; }
.ph-anima .ph-entra.ph-visivel { opacity: 1; transform: none; filter: none; }

/* barra de progresso de leitura no topo */
.ph-progresso { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, var(--ph-azul, #4c8dff), #7c5cff, #3cf0c8); pointer-events: none; }

@media (max-width: 900px) {
  .hero-v2 { min-height: 0; }
  .hero-grade { grid-template-columns: 1fr; padding: 28px 18px 56px; gap: 8px; text-align: center; }
  .hero-orbita { order: -1; max-width: 230px; margin-bottom: 4px; }
  .hero-v2 .selo { margin-bottom: 14px; }
  .hero-v2 h1 { font-size: clamp(32px, 9vw, 44px); margin-bottom: 14px; }
  .hero-v2 .hero-sub { font-size: 16px; margin-bottom: 20px; }
  .hero-v2 .hero-acoes { justify-content: center; }
  .hero-v2 .hero-sub, .hero-v2 .hero-nota { margin-left: auto; margin-right: auto; }
  .ph-chip { font-size: 11px; padding: 6px 9px; }
  .ph-chip-2 { right: -2%; }
}
@media (max-width: 600px) { .ph-chip { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .hero-v2 h1 em, .hero-v2 .btn-primario::after, .ph-halo, .ph-perola, .ph-anel-giro, .ph-chip { animation: none; }
  .ph-anima .ph-entra { opacity: 1; transform: none; filter: none; transition: none; }
  .hero-aurora, .hero-rastro { display: none; }
}

/* ── fundo com a arte da PHIA (símbolo à direita, espaço pro texto à esquerda) ── */
.hero-fundo { position: absolute; inset: 0; z-index: 0; overflow: hidden; will-change: transform; }
.hero-fundo picture { position: absolute; inset: -24px; display: block; will-change: transform; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.hero-fundo img { width: 100%; height: 100%; object-fit: cover; object-position: 72% 50%; display: block;
  animation: ph-zoom 22s ease-in-out infinite alternate; transform-origin: 76% 50%; }
@keyframes ph-zoom { from { transform: scale(1.02); } to { transform: scale(1.08); } }
.hero-fundo::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(6, 11, 24, .94) 0%, rgba(6, 11, 24, .78) 30%, rgba(6, 11, 24, .25) 52%, transparent 66%); }
.hero-fundo-brilho { position: absolute; left: 60%; top: 14%; width: 36%; aspect-ratio: 1; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(124, 92, 255, .30), rgba(76, 141, 255, .12) 45%, transparent 70%);
  mix-blend-mode: screen; animation: ph-respira 7s ease-in-out infinite; }
.hero-v2:has(.hero-fundo) .hero-aurora { opacity: .16; }
.hero-v2:has(.hero-fundo) .hero-grade { grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); }
@media (max-width: 900px) {
  .hero-fundo { inset: 0 0 auto 0; height: 380px; -webkit-mask-image: linear-gradient(180deg, #000 62%, transparent 100%); mask-image: linear-gradient(180deg, #000 62%, transparent 100%); }
  .hero-fundo picture { inset: -12px; }
  .hero-fundo img { object-position: 97% 42%; transform-origin: 90% 45%; }
  .hero-fundo::after { background: linear-gradient(180deg, rgba(6, 11, 24, .15) 0%, transparent 50%, rgba(6, 11, 24, .55) 100%); }
  .hero-fundo-brilho { left: 20%; top: 8%; width: 60%; }
  .hero-v2:has(.hero-fundo) .hero-grade { grid-template-columns: 1fr; padding-top: 300px; }
}
@media (prefers-reduced-motion: reduce) { .hero-fundo img, .hero-fundo-brilho { animation: none; } }

/* ── vídeo da arte (anima a própria imagem; a imagem fica por baixo como reserva) ── */
.hero-arte { position: absolute; inset: -24px; will-change: transform; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.hero-arte picture { inset: 0; }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 72% 50%;
  opacity: 0; transition: opacity 1.2s ease; transform-origin: 76% 50%; animation: ph-zoom 22s ease-in-out infinite alternate; }
.hero-video.ph-tocando { opacity: 1; }
@media (max-width: 900px) { .hero-arte { inset: -12px; } .hero-video { object-position: 97% 42%; transform-origin: 90% 45%; } }
@media (prefers-reduced-motion: reduce) { .hero-video { display: none; } }

/* logo completa (símbolo + PHIA em branco) no topo */
.marca .logo-completa { height: 34px; width: auto; display: block; filter: drop-shadow(0 4px 14px rgba(92, 80, 255, .35)); }
@media (max-width: 520px) { .marca .logo-completa { height: 30px; } }
