/* ===== Efeitos cinematográficos (ativos só com a classe .fx) ===== */

/* Evita "piscar" o conteúdo antes da animação de entrada começar. */
.fx-pending .hero-content, .fx-pending .quick-inner { visibility: hidden; }

/* ---------- Logo 3D ---------- */
.hero-3d { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 1.2s ease; touch-action: pan-y; }
.hero-3d.is-ready { opacity: 1; }
.hero-stage.is-3d .hero-logo-3d { opacity: 0; transition: opacity .8s ease; }
.fx .hero-stage { animation: none; }
.fx .hero-content > * { animation: none; }

/* ---------- Aurora animada no fundo do hero ---------- */
.hero-aurora { position: absolute; inset: -20% -10% -10%; z-index: -3; pointer-events: none; overflow: hidden; }
.hero-aurora i { position: absolute; display: block; border-radius: 50%; mix-blend-mode: screen; opacity: .55; will-change: transform; }
.hero-aurora i:nth-child(1) { width: 60vw; height: 60vw; right: -8vw; top: -12vw; background: radial-gradient(closest-side, #2a5cffcc, #2a5cff00); animation: aurora-a 18s ease-in-out infinite alternate; }
.hero-aurora i:nth-child(2) { width: 45vw; height: 45vw; right: 22vw; top: 18vw; background: radial-gradient(closest-side, #38c8ff80, #38c8ff00); animation: aurora-b 22s ease-in-out infinite alternate; }
.hero-aurora i:nth-child(3) { width: 40vw; height: 40vw; left: -10vw; bottom: -14vw; background: radial-gradient(closest-side, #7a5cff70, #7a5cff00); animation: aurora-c 26s ease-in-out infinite alternate; }
@keyframes aurora-a { to { transform: translate3d(-12vw, 8vw, 0) scale(1.2); } }
@keyframes aurora-b { to { transform: translate3d(14vw, -6vw, 0) scale(.8); } }
@keyframes aurora-c { to { transform: translate3d(16vw, -10vw, 0) scale(1.3); } }
/* Vinheta de cinema nas bordas do hero */
.hero::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(ellipse 120% 90% at 60% 40%, transparent 55%, #05070dcc 100%); }

/* ---------- Título: palavras sobem de dentro de uma "máscara" ---------- */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding: .12em .02em .1em; margin: -.12em -.02em -.1em; }
.wi { display: inline-block; will-change: transform; }
.fx .hero h1 em .wi {
  background: linear-gradient(100deg, #8fb4ff 0%, #5d8bff 25%, #85edbc 50%, #5d8bff 75%, #8fb4ff 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: fx-gradient 7s linear infinite;
}
@keyframes fx-gradient { to { background-position: -250% 0; } }

/* ---------- Granulado de filme ---------- */
.fx-grain { position: fixed; inset: -50%; z-index: 40; pointer-events: none; opacity: .055; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); animation: fx-grain 1s steps(6) infinite; }
@keyframes fx-grain {
  0% { transform: translate3d(0, 0, 0); } 20% { transform: translate3d(-5%, 3%, 0); } 40% { transform: translate3d(4%, -6%, 0); }
  60% { transform: translate3d(-3%, 7%, 0); } 80% { transform: translate3d(6%, 2%, 0); } 100% { transform: translate3d(-2%, -4%, 0); }
}

/* ---------- Luz que segue o cursor ---------- */
.fx-cursor { position: fixed; left: 0; top: 0; z-index: 3; width: 640px; height: 640px; margin: -320px 0 0 -320px; border-radius: 50%; pointer-events: none; background: radial-gradient(closest-side, #3d6fff2e, #3d6fff0d 50%, transparent); mix-blend-mode: screen; opacity: 0; transition: opacity .6s ease; will-change: transform; }
.fx-cursor.is-on { opacity: 1; }

/* ---------- Botões: magnético, brilho que corre, luz no ponteiro, ondulação ---------- */
.fx .button { position: relative; overflow: hidden; isolation: isolate; }
.fx .button, .fx .whatsapp-float {
  transition: background .22s ease, border-color .22s ease, box-shadow .3s ease, transform .22s ease, translate .45s cubic-bezier(.2, .8, .2, 1);
}
.fx .button::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(120px circle at var(--mx, 50%) var(--my, 50%), #ffffff38, transparent 70%);
}
.fx .button:hover::before { opacity: 1; }
.fx .button.primary::after {
  content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 45%; z-index: -1; pointer-events: none;
  background: linear-gradient(100deg, transparent, #ffffff55, transparent);
  transform: translateX(-160%) skewX(-20deg);
}
.fx .button.primary:hover::after { transform: translateX(330%) skewX(-20deg); transition: transform .9s cubic-bezier(.2, .7, .2, 1); }
.fx .button.primary:hover { box-shadow: 0 10px 34px #315cff70, 0 0 0 1px #9bb4ff inset; }
.fx .button-whatsapp:hover { box-shadow: 0 10px 34px #1f9d5c70, 0 0 0 1px #85edbc inset; }
.fx-ripple { position: absolute; z-index: -1; border-radius: 50%; pointer-events: none; background: radial-gradient(closest-side, #ffffff66, #ffffff00); transform: scale(0); animation: fx-ripple .7s cubic-bezier(.2, .7, .2, 1) forwards; }
@keyframes fx-ripple { to { transform: scale(1); opacity: 0; } }

/* Botão do WhatsApp "respira" para chamar atenção */
.fx .whatsapp-float::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: 0 0 0 0 #56b990aa; animation: fx-pulse 2.8s ease-out infinite; pointer-events: none; }
@keyframes fx-pulse { 0% { box-shadow: 0 0 0 0 #56b99099; } 70%, 100% { box-shadow: 0 0 0 14px #56b99000; } }

/* ---------- Cards: borda de luz girando no hover ---------- */
@property --fx-angle { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
.fx .service-card::before, .fx .plan-card::before, .fx .contact-card::before {
  content: ''; position: absolute; inset: 0; z-index: 2; border-radius: inherit; padding: 1.5px; pointer-events: none;
  background: conic-gradient(from var(--fx-angle), transparent 0 55%, #5b8cff, #85edbc, #5b8cff, transparent 90%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude;
  opacity: 0; transition: opacity .45s ease;
  animation: fx-spin 3.2s linear infinite paused;
}
.fx .plan-card, .fx .contact-card { position: relative; }
.fx .service-card:hover::before, .fx .plan-card:hover::before, .fx .contact-card:hover::before { opacity: 1; animation-play-state: running; }
@keyframes fx-spin { to { --fx-angle: 360deg; } }
.fx .service-card.fx-entering { transition: none; }
.fx .service-card { transform-style: preserve-3d; }
.fx .service-card h3 { transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.fx .service-card.is-tilted h3 { transform: translateZ(30px); }

/* Sombras mais realistas (várias camadas) */
.fx .service-card, .fx .plan-card, .fx .closing { box-shadow: 0 1px 0 #ffffff0d inset, 0 2px 4px #00000040, 0 12px 24px #00000040, 0 36px 60px #0000004d; }
.fx .is-tilted { box-shadow: 0 1px 0 #ffffff14 inset, 0 4px 8px #00000050, 0 24px 48px #00000060, 0 60px 90px #0b1d5a66, 0 0 40px #315cff30; }

/* Links da barra de preços com sublinhado animado */
.fx .quick-inner strong { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .45s cubic-bezier(.2, .7, .2, 1); width: fit-content; }
.fx .quick-inner > a:hover strong { background-size: 100% 1px; }

@media (max-width: 46rem) {
  .hero-aurora i { opacity: .4; }
  .hero-aurora i:nth-child(1) { width: 120vw; height: 120vw; top: 40vh; }
  .fx-grain { opacity: .04; }
}
/* ---------- Páginas internas ---------- */
.fx .enter > .subpage, .fx .enter > .quote-section { animation: none; }
.fx .fx-anim { transition: border-color .25s ease, box-shadow .3s ease !important; }
.fx .plan-card.recommended::before { opacity: 1; animation-play-state: running; }
.fx .faq-list details p { overflow: hidden; }
.fx .about-portrait { position: relative; }
.fx .about-portrait::after {
  content: ''; position: absolute; inset: 0; z-index: 2; border-radius: inherit; padding: 2px; pointer-events: none;
  background: conic-gradient(from var(--fx-angle), #1d4dff, #7fe0ff, transparent 40%, #1d4dff 70%, #85edbc, #1d4dff);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude;
  animation: fx-spin 6s linear infinite;
}

/* Barra de progresso de leitura */
.fx-progress { position: fixed; top: 0; left: 0; right: 0; z-index: 50; height: 3px; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, #1d4dff, #7fe0ff, #85edbc); box-shadow: 0 0 12px #3d7bff; pointer-events: none; }

/* Cortina de transição entre páginas */
.fx-curtain { position: fixed; inset: 0; z-index: 60; pointer-events: none; visibility: hidden; display: grid; place-items: center; }
.fx-curtain i { position: absolute; inset: 0; display: block; }
.fx-curtain i:nth-child(1) { background: #2b5cff; }
.fx-curtain i:nth-child(2) { background: radial-gradient(ellipse at 50% 40%, #111a3d, #060608 70%); }
.fx-curtain img { position: relative; width: 7rem; height: auto; border-radius: .5rem; filter: drop-shadow(0 0 2rem #3d7bff); }

/* Sem o modo .fx (quem pediu menos movimento), a aurora fica parada. */
html:not(.fx) .hero-aurora i { animation: none; }
