/* css/style.css */
@tailwind base;
@tailwind components;
@tailwind utilities;

@layer utilities {
  .text-balance {
    text-wrap: balance;
  }
}

/* Base resets that Tailwind doesn't do perfectly or custom styles */
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: 'Inter', sans-serif;
  color: #1E293B; /* text-dark */
  overflow-x: hidden;
}

/* Animations for Dynamic Tags */
@keyframes tag-exit {
  from { opacity: 1; transform: translateY(0) scale(1); filter: blur(0px); }
  to   { opacity: 0; transform: translateY(-14px) scale(0.96); filter: blur(5px); }
}

@keyframes tag-enter {
  from { opacity: 0; transform: translateY(14px) scale(0.96); filter: blur(5px); }
  to   { opacity: 1; transform: translateY(0) scale(1); filter: blur(0px); }
}

/* Hero entrance animations */
@keyframes hero-fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-animate {
  opacity: 0;
  animation: hero-fade-up 0.7s ease forwards;
}
.hero-delay-1 { animation-delay: 0.1s; }
.hero-delay-2 { animation-delay: 0.3s; }
.hero-delay-3 { animation-delay: 0.5s; }
.hero-delay-4 { animation-delay: 0.7s; }

/* Fundo Interativo (Simulador) */
@keyframes glow-slow {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(30px, -50px) scale(1.1); }
  66%  { transform: translate(-20px, 20px) scale(0.9); }
  100% { transform: translate(0, 0) scale(1); }
}
.animate-glow-slow {
  animation: glow-slow 10s ease-in-out infinite;
}
@keyframes move-bg {
  0%   { transform: translateY(0); }
  100% { transform: translateY(-40px); }
}
.parallax-bg {
  animation: move-bg 30s linear infinite;
}

/* Card Scroll Reveal */
.card-reveal {
  opacity: 0;
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.card-reveal.from-right { transform: translateX(60px); }
.card-reveal.from-left  { transform: translateX(-60px); }
.card-reveal.revealed   { opacity: 1; transform: translateX(0); }

/* Tabela: reveal das métricas */
.tabela-reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.tabela-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Service Cards Scroll Reveal */
.service-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.service-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ── Simulador: Progressive Disclosure ── */
.sim-step-hidden {
  opacity: 0;
  transform: translateY(10px);
  max-height: 0;
  overflow: hidden;
  pointer-events: none;
  transition: opacity 0.42s ease, transform 0.42s ease, max-height 0.42s ease, margin 0.35s ease;
  margin-bottom: 0;
}
.sim-step-visible {
  opacity: 1;
  transform: translateY(0);
  max-height: 260px;
  pointer-events: auto;
  margin-bottom: 1.5rem;
}

/* Toggle states */
.sim-toggle {
  background: #fff;
  border-color: #e2e8f0;
  color: #94a3b8;
}
.sim-toggle:hover {
  border-color: #cbd5e1;
  color: #64748b;
}
.sim-toggle-active {
  border-color: #2D318F !important;
  background: rgba(45,49,143,0.06) !important;
  color: #2D318F !important;
}

/* Simulador: fundo e moldura visual */
.simulador-section {
  isolation: isolate;
  overflow: hidden;
  overflow-x: clip;
}

.sim-bg-base {
  background:
    radial-gradient(120% 95% at 12% 0%, rgba(45, 49, 143, 0.55) 0%, rgba(45, 49, 143, 0) 58%),
    radial-gradient(95% 88% at 100% 100%, rgba(0, 168, 112, 0.24) 0%, rgba(0, 168, 112, 0) 64%),
    linear-gradient(136deg, #04091f 0%, #0e1a4f 46%, #1d2f7f 100%);
}

.sim-bg-wave {
  opacity: 0.5;
  transform: scale(1.12);
  filter: blur(42px);
  background:
    conic-gradient(
      from 190deg at 50% 115%,
      rgba(0, 196, 255, 0.26) 0deg,
      rgba(45, 49, 143, 0.03) 110deg,
      rgba(0, 168, 112, 0.23) 220deg,
      rgba(45, 49, 143, 0.03) 300deg,
      rgba(0, 196, 255, 0.26) 360deg
    );
  animation: sim-wave-shift 22s ease-in-out infinite alternate;
}

.sim-bg-grid {
  opacity: 0.2;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, transparent 0%, black 18%, black 82%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 18%, black 82%, transparent 100%);
}

.sim-bg-glow {
  position: absolute;
  width: clamp(220px, 28vw, 360px);
  aspect-ratio: 1 / 1;
  border-radius: 9999px;
  filter: blur(4px);
  opacity: 0.72;
}

.sim-bg-glow-left {
  top: 10%;
  left: 4%;
  background: radial-gradient(circle, rgba(0, 196, 255, 0.34) 0%, rgba(0, 196, 255, 0.12) 45%, transparent 72%);
  animation: sim-glow-left-float 16s ease-in-out infinite alternate;
}

.sim-bg-glow-right {
  right: 2%;
  bottom: 8%;
  background: radial-gradient(circle, rgba(0, 168, 112, 0.30) 0%, rgba(0, 168, 112, 0.12) 42%, transparent 70%);
  animation: sim-glow-right-float 19s ease-in-out infinite alternate;
}

.sim-bg-vignette {
  background: radial-gradient(130% 95% at 50% 45%, transparent 30%, rgba(2, 6, 20, 0.38) 100%);
}

.sim-bg-beam {
  background: linear-gradient(90deg, transparent, rgba(0, 196, 255, 0.22), transparent);
}

.sim-card-frame {
  position: relative;
  padding: 1.5px;
  border-radius: 1.75rem;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(0, 196, 255, 0.56), rgba(45, 49, 143, 0.62), rgba(0, 168, 112, 0.58));
  box-shadow:
    0 40px 100px rgba(0, 0, 0, 0.35),
    0 0 40px rgba(0, 196, 255, 0.15);
}

.sim-card-frame::before {
  content: "";
  position: absolute;
  inset: -62%;
  background: conic-gradient(
    from 220deg,
    transparent 0%,
    transparent 50%,
    rgba(0, 196, 255, 0.90) 62%,
    rgba(45, 49, 143, 0.88) 73%,
    rgba(0, 168, 112, 0.90) 85%,
    transparent 97%,
    transparent 100%
  );
  animation: sim-border-spin 8s linear infinite;
}

.simulador-card {
  position: relative;
  z-index: 1;
  border-radius: calc(1.75rem - 1.5px);
  background: linear-gradient(160deg, #ffffff 0%, #f9fbff 100%);
}

@keyframes sim-border-spin {
  to { transform: rotate(360deg); }
}

@keyframes sim-wave-shift {
  from { transform: scale(1.12) translate3d(-1.5%, 0, 0) rotate(-3deg); }
  to   { transform: scale(1.12) translate3d(1.5%, -1.2%, 0) rotate(3deg); }
}

@media (max-width: 768px) {
  .sim-bg-grid {
    background-size: 32px 32px;
    opacity: 0.16;
  }
}

@keyframes sim-glow-left-float {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(12px, -10px, 0); }
}

@keyframes sim-glow-right-float {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-16px, 12px, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .sim-bg-wave,
  .sim-bg-glow-left,
  .sim-bg-glow-right,
  .sim-card-frame::before {
    animation: none !important;
  }
}

/* Resultado: animação de entrada */
.result-hidden {
  display: none;
}
.result-visible {
  display: block;
  animation: result-in 0.5s ease forwards;
}
@keyframes result-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Glass Tag */
.tag-glass {
  background: linear-gradient(135deg, rgba(255,255,255,0.10) 0%, rgba(0,196,255,0.05) 100%);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(0, 196, 255, 0.28);
  box-shadow:
    0 4px 28px rgba(0, 196, 255, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 -1px 0 rgba(0, 0, 0, 0.12);
}

/* Neon Rotating Border */
.neon-ring-wrapper {
  position: relative;
  border-radius: 9999px;
  padding: 2.5px;
  overflow: hidden;
  box-shadow:
    0 0 18px rgba(0, 168, 112, 0.45),
    0 0 40px rgba(0, 168, 112, 0.18);
}

.neon-ring-wrapper::before {
  content: '';
  position: absolute;
  /* Oversized so rotation never reveals gaps at corners */
  inset: -120%;
  background: conic-gradient(
    from 0deg,
    transparent 0%,
    transparent 55%,
    #00ff99 74%,
    #00ffbb 80%,
    #00A870 86%,
    transparent 92%,
    transparent 100%
  );
  animation: neon-border-spin 2.8s linear infinite;
}

@keyframes neon-border-spin {
  to { transform: rotate(360deg); }
}

/* Accordion transition */
.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease-in-out, padding 0.35s ease-in-out;
}
.accordion-content.open {
  max-height: 500px;
}

/* Accordion item — open state */
.accordion-item {
  border-left: 3px solid transparent;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.accordion-item.accordion-open {
  border-left-color: #2D318F;
  box-shadow: 0 4px 20px rgba(45,49,143,0.07);
}

/* Custom Scrollbar for a premium feel */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #F8FAFC;
}

::-webkit-scrollbar-thumb {
  background: #2D318F;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #1e2270;
}

/* Aurora Background Effect - Dark Mode Tech */
.bg-aurora-wrapper {
  position: relative;
  overflow: hidden;
  background-color: #0B1F3A; /* Fundo base bem escuro (Navy) */
  color: #FFFFFF;
}

.aurora-effect {
  --dark-gradient: repeating-linear-gradient(100deg, rgba(11,31,58,0.85) 0%, rgba(11,31,58,0.85) 7%, transparent 10%, transparent 12%, rgba(11,31,58,0.85) 16%);
  --aurora: repeating-linear-gradient(100deg, #0B1F3A 10%, #2D318F 15%, #00C4FF 20%, #00A870 25%, #2D318F 30%);
  
  position: absolute;
  inset: -10px;
  opacity: 0.5; /* Opacidade levemente aumentada para destacar as 3 cores */
  background-image: var(--dark-gradient), var(--aurora);
  background-size: 300% 200%;
  background-position: 50% 50%, 50% 50%;
  filter: blur(15px);
  mask-image: radial-gradient(ellipse at 100% 0%, black 10%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 100% 0%, black 10%, transparent 70%);
  pointer-events: none;
}

.aurora-effect::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--dark-gradient), var(--aurora);
  background-size: 200% 100%;
  animation: aurora-anim 60s linear infinite;
  background-attachment: fixed;
  mix-blend-mode: difference;
  will-change: transform;
}

@keyframes aurora-anim {
  from { background-position: 50% 50%, 50% 50%; }
  to { background-position: 350% 50%, 350% 50%; }
}
