/* ==========================================
   LANDING PAGE (High-Tech, 60fps Animations)
   ========================================== */

.landing-wrapper {
  position: relative;
  /* `dvh` (viewport dinâmico) com fallback em `vh` pra navegador antigo.
     `vh` puro é recalculado pelo Safari mobile toda vez que a barra de
     endereço colapsa/expande DURANTE o scroll — reflow contínuo, forte
     candidato ao travamento que só aparece no Safari real (nunca no
     Chrome, onde testei). `dvh` existe exatamente pra evitar isso. */
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  background: radial-gradient(circle at top right, #090b14, #030409 60%);
  color: #ffffff;
  /* `overflow: hidden` nos DOIS eixos (não só overflow-x) — os orbs
     decorativos (::before/::after logo abaixo) são posicionados de
     propósito PRA FORA dos limites da section (bottom:-20%, top:-20%)
     pra criar o brilho difuso. Sem conter isso, o orb de baixo vazava
     ~470px de área vazia depois do rodapé de verdade, esticando o
     scroll da página inteira (bug reportado pelo usuário). `hidden` nos
     dois eixos (em vez de só um) é o jeito certo de conter esse vazamento
     sem cair no problema anterior: por especificação de CSS, só travar
     UM eixo força o outro a virar `auto` (scroll container próprio,
     causou uma barra de rolagem duplicada — ver histórico). Travando os
     dois eixos igual, não tem essa borda ambígua, e `hidden` nunca cria
     scrollbar de qualquer forma. */
  overflow: hidden;
  font-family: 'Sora', sans-serif;
  z-index: 1;
}

/* Background animated elements */
.landing-wrapper::before {
  content: '';
  position: absolute;
  top: -20%;
  left: -10%;
  width: 60%;
  height: 60%;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.08) 0%, transparent 60%);
  filter: blur(80px);
  z-index: -1;
  animation: floatOrb 12s ease-in-out infinite alternate;
  will-change: transform;
}

.landing-wrapper::after {
  content: '';
  position: absolute;
  bottom: -20%;
  right: -10%;
  width: 50%;
  height: 50%;
  background: radial-gradient(circle, rgba(162, 0, 255, 0.06) 0%, transparent 60%);
  filter: blur(80px);
  z-index: -1;
  animation: floatOrb 15s ease-in-out infinite alternate-reverse;
  will-change: transform;
}

@keyframes floatOrb {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(100px, 100px, 0); }
}

/* Navbar */
.landing-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 1.5rem 4rem;
  /* Sem backdrop-filter de propósito: era `sticky` + blur recalculado a
     cada frame de scroll, ativo durante a rolagem inteira da página —
     causa clássica de travamento de scroll em Safari mobile (relatado
     pelo usuário, confirmado em vídeo). Fundo mais opaco compensa a
     perda do efeito "vidro fosco" sem o custo do blur ao vivo. */
  background: rgba(3, 4, 9, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  position: sticky;
  top: 0;
  z-index: 100;
}

.landing-nav .logo-group {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.landing-nav .logo-img {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 0 8px rgba(0, 240, 255, 0.4));
}

.landing-nav .brand {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 1px;
}

.landing-nav .brand span {
  color: #00F0FF;
}

.btn-glass {
  background: rgba(0, 240, 255, 0.1);
  color: #00F0FF;
  border: 1px solid rgba(0, 240, 255, 0.3);
  padding: 0.6rem 1.5rem;
  border-radius: 8px;
  font-weight: 500;
  font-family: 'Sora', sans-serif;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  box-shadow: 0 4px 15px rgba(0, 240, 255, 0.05);
}

.btn-glass:hover {
  background: rgba(0, 240, 255, 0.2);
  transform: translate3d(0, -2px, 0);
  box-shadow: 0 8px 25px rgba(0, 240, 255, 0.2);
}

/* Hero Section */
.hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8rem 2rem 6rem;
  /* Ver comentário em .landing-wrapper sobre dvh vs vh. */
  min-height: 80vh;
  min-height: 80dvh;
}

.hero-badge {
  background: rgba(162, 0, 255, 0.15);
  color: #d79eff;
  border: 1px solid rgba(162, 0, 255, 0.3);
  padding: 0.4rem 1rem;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 2rem;
  animation: fadeInDown 0.8s ease-out forwards;
}

.hero-title {
  font-size: 4.5rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  background: linear-gradient(to right, #ffffff, #00F0FF, #a200ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: fadeInUp 1s ease-out forwards;
  max-width: 900px;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: #a0a5b8;
  max-width: 600px;
  margin-bottom: 3rem;
  line-height: 1.6;
  animation: fadeInUp 1.2s ease-out forwards;
}

.btn-glow {
  background: linear-gradient(135deg, #00F0FF, #0080ff);
  color: #030409;
  border: none;
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.4);
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  display: flex;
  align-items: center;
  gap: 0.8rem;
  animation: scaleIn 1.4s ease-out forwards;
}

.btn-glow:hover {
  transform: translate3d(0, -4px, 0) scale(1.02);
  box-shadow: 0 0 40px rgba(0, 240, 255, 0.6);
}

/* Features Section */
.features-section {
  padding: 4rem 2rem 8rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.feature-card {
  /* Sem backdrop-filter (ver comentário em .landing-nav) — esses 3 cards
     são exatamente onde o scroll travava no vídeo do usuário. */
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(to right, transparent, #00F0FF, transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.feature-card:hover {
  transform: translate3d(0, -10px, 0);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  font-size: 2.5rem;
  color: #00F0FF;
  margin-bottom: 1.5rem;
  display: inline-block;
  padding: 1rem;
  background: rgba(0, 240, 255, 0.1);
  border-radius: 12px;
}

.feature-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.feature-card p {
  color: #8b92a5;
  line-height: 1.6;
}

/* Auth Modal (Glassmorphism) */
.auth-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(3, 4, 9, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.auth-modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.auth-modal {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 3rem 2.5rem;
  width: 100%;
  max-width: 420px;
  transform: translate3d(0, 40px, 0) scale(0.95);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
  position: relative;
}

.auth-modal-overlay.active .auth-modal {
  transform: translate3d(0, 0, 0) scale(1);
}

.btn-close-modal {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  color: #a0a5b8;
  font-size: 1.2rem;
  cursor: pointer;
  transition: color 0.2s;
}

.btn-close-modal:hover {
  color: #fff;
}

/* Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translate3d(0, 40px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translate3d(0, -20px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

/* Simulation Cascade Section (Dopamine Generator) */
.how-it-works-section {
  padding: 6rem 2rem 10rem;
  text-align: center;
  position: relative;
}

.section-title {
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
  background: linear-gradient(to right, #ffffff, #00F0FF);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-subtitle {
  color: #a0a5b8;
  font-size: 1.1rem;
  margin-bottom: 5rem;
}

.cascade-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  max-width: 600px;
  margin: 0 auto;
}

.cascade-step {
  display: flex;
  align-items: center;
  gap: 2rem;
  /* Sem backdrop-filter (ver comentário em .landing-nav). */
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 2rem;
  border-radius: 24px;
  width: 100%;
  text-align: left;
  position: relative;
  z-index: 2;
  transition: transform 0.3s;
}

.cascade-step:hover {
  transform: scale(1.02);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(0, 240, 255, 0.2);
}

.step-hologram {
  width: 90px;
  height: 90px;
  min-width: 90px;
  border-radius: 20px;
  background: rgba(0, 240, 255, 0.05);
  border: 1px solid rgba(0, 240, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.1) inset;
}

.hologram-icon {
  font-size: 2rem;
  color: #00F0FF;
  filter: drop-shadow(0 0 8px rgba(0, 240, 255, 0.6));
}

.sonar-wave {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 20px;
  border: 2px solid #00F0FF;
  opacity: 0;
  animation: sonarPulse 2s cubic-bezier(0.1, 0.5, 0.1, 1) infinite;
}

@keyframes sonarPulse {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.4); opacity: 0; }
}

.animate-pulse-fast {
  animation: iconPulse 1s ease-in-out infinite alternate;
}
@keyframes iconPulse {
  from { transform: scale(1); opacity: 0.7; }
  to { transform: scale(1.15); opacity: 1; }
}

.ai-brain .hologram-icon {
  color: #d79eff;
  filter: drop-shadow(0 0 10px rgba(162, 0, 255, 0.8));
}

.floating-data {
  position: absolute;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  color: #00F0FF;
  background: rgba(0, 240, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  animation: floatData 3s ease-in-out infinite;
}

.floating-data:nth-child(2) { top: -15px; left: -20px; }
.floating-data.delay { bottom: -15px; right: -20px; animation-delay: 1.5s; }

@keyframes floatData {
  0% { transform: translateY(10px); opacity: 0; }
  20% { transform: translateY(0); opacity: 1; }
  80% { transform: translateY(-10px); opacity: 1; }
  100% { transform: translateY(-20px); opacity: 0; }
}

.success-state {
  background: rgba(0, 255, 136, 0.05);
  border-color: rgba(0, 255, 136, 0.2);
}
.success-state .hologram-icon {
  color: #00ff88;
  filter: drop-shadow(0 0 10px rgba(0, 255, 136, 0.6));
}
.success-badge {
  position: absolute;
  bottom: -10px;
  right: -10px;
  background: #00ff88;
  color: #030409;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  box-shadow: 0 0 15px #00ff88;
}

.step-info h4 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #fff;
}

.step-info p {
  color: #8b92a5;
  font-size: 0.95rem;
  line-height: 1.5;
}

.cascade-connector {
  width: 2px;
  height: 60px;
  background: rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
}

.neon-line {
  /* `top` fica FIXO aqui como posição de base — quem anima é o
     `transform` abaixo. Animar `top` força o navegador a recalcular
     layout a cada frame; `transform` é só compositor. */
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, transparent, #00F0FF, transparent);
  animation: lineFlow 2s linear infinite;
  will-change: transform;
}

@keyframes lineFlow {
  0% { transform: translateY(0); }
  100% { transform: translateY(200%); }
}

.btn-glow-small {
  background: rgba(0, 255, 136, 0.1);
  color: #00ff88;
  border: 1px solid rgba(0, 255, 136, 0.3);
  padding: 0.6rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-family: 'Sora', sans-serif;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-glow-small:hover {
  background: rgba(0, 255, 136, 0.2);
  transform: translate3d(0, -2px, 0);
  box-shadow: 0 8px 25px rgba(0, 255, 136, 0.2);
}

.nav-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

/* Responsiveness */
@media (max-width: 768px) {
  .hero-title { font-size: 3rem; }
  .landing-nav { padding: 1rem 1.5rem; }
}

@media (max-width: 480px) {
  .landing-nav { padding: 0.85rem 1rem; gap: 0.5rem; }
  .landing-nav .brand { font-size: 1rem; }
  .landing-nav .logo-img { width: 30px; height: 30px; }
  .nav-actions { gap: 0.5rem; }
  .btn-glass, .btn-glow-small { padding: 0.5rem 0.9rem; font-size: 0.78rem; }
  .hero-title { font-size: 2.1rem; }
  .hero-subtitle { font-size: 1.05rem; }
}
