/* ================================================================
   NIVO HEALTH — style.css
   Animações, Design System, Componentes e Confetes
================================================================ */

/* ── Fontes & Reset base ────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

/* ================================================================
   1. ANIMAÇÕES DE ENTRADA (Landing Page)
================================================================ */

/* Fade + subida */
.fade-in-up {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.75s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.75s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.fade-in-up.visible,
.fade-in-up:not([class*="hidden"]) {
  opacity: 1;
  transform: translateY(0);
}

/* Fade + direita */
.fade-in-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.2s, transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.2s;
}
.fade-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Cards com delay escalonado e animações melhoradas */
.step-card { animation: stepFadeIn 0.7s ease both; }
.step-card:nth-child(1)       { animation-delay: 0s;    }
.step-card:nth-child(2)       { animation-delay: 0.15s; }
.step-card:nth-child(3)       { animation-delay: 0.3s;  }

.benefit-card { animation: stepFadeIn 0.7s ease both; }
.benefit-card:nth-child(1)    { animation-delay: 0s;    }
.benefit-card:nth-child(2)    { animation-delay: 0.15s; }
.benefit-card:nth-child(3)    { animation-delay: 0.3s;  }

.testimonial-card { animation: stepFadeIn 0.7s ease both; }
.testimonial-card:nth-child(1){ animation-delay: 0s;    }
.testimonial-card:nth-child(2){ animation-delay: 0.15s; }
.testimonial-card:nth-child(3){ animation-delay: 0.3s;  }

@keyframes stepFadeIn {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Animação de entrada do passo do funil (slide da direita) ── */
@keyframes stepSlideIn {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes stepSlideOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(-30px); }
}

.step-wrapper {
  animation: stepSlideIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.step-wrapper.leaving {
  animation: stepSlideOut 0.3s ease forwards;
}

/* ── Pulse lento para blobs ──────────────────────────────────── */
@keyframes pulse-slow {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50%      { opacity: 0.8; transform: scale(1.05); }
}

.animate-pulse-slow {
  animation: pulse-slow 6s ease-in-out infinite;
}

/* ── Step cards com melhor visibilidade ─────────────────────── */
.step-card {
  position: relative;
  box-shadow: 0 10px 30px rgba(92, 59, 181, 0.15);
  backdrop-filter: blur(10px);
}

.step-card:hover {
  box-shadow: 0 20px 50px rgba(92, 59, 181, 0.25);
}

.step-card .choice-icon { font-size: 2.5rem !important; margin-bottom: 0.5rem; }

/* ── Benefit cards com intensidade visual ────────────────────── */
.benefit-card {
  position: relative;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(8px);
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.benefit-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
}

/* ── Testimonial cards com melhor definição ──────────────────── */
.testimonial-card {
  position: relative;
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 32px rgba(92, 59, 181, 0.1);
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(92, 59, 181, 0.2);
}

/* Header dos passos */
.step-header { margin-bottom: 1.75rem; }

.step-eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #5C3BB5;
  margin-bottom: 0.5rem;
}

.step-title {
  font-size: 1.6rem;
  font-weight: 900;
  color: #2D1B4E;
  line-height: 1.25;
  margin-bottom: 0.5rem;
}

@media (max-width: 480px) {
  .step-title { font-size: 1.35rem; }
}

.step-sub {
  font-size: 0.875rem;
  color: #6B7280;
  line-height: 1.5;
}

/* ── FAQ items com melhor contraste ─────────────────────────────── */
.faq-item {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 8px 24px rgba(92, 59, 181, 0.12);
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.faq-item:hover {
  background: rgba(251, 191, 36, 0.08) !important;
  border: 1px solid rgba(251, 191, 36, 0.4) !important;
  box-shadow: 0 12px 32px rgba(251, 191, 36, 0.15);
  transform: translateY(-2px);
}

.faq-btn {
  font-weight: 500 !important;
  color: rgba(255, 255, 255, 0.9) !important;
}

.faq-content {
  background: rgba(92, 59, 181, 0.08);
  color: rgba(255, 255, 255, 0.75) !important;
}

/* ── Grid de escolhas ────────────────────────────────────────── */
.choices-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

/* ── Card de escolha (multiple choice) ───────────────────────── */
.choice-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: #ffffff;
  border: 2px solid #E5E7EB;
  border-radius: 1rem;
  padding: 1.1rem 0.75rem;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.15s ease,
    background 0.2s ease;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.choice-card:hover {
  border-color: #5C3BB5;
  box-shadow: 0 4px 16px rgba(92,59,181,0.15);
  transform: translateY(-2px);
}

.choice-card:active {
  transform: scale(0.96);
}

/* Estado selecionado */
.choice-card.selected {
  border-color: #10B981;
  background: #F0FDF4;
  box-shadow: 0 0 0 3px rgba(16,185,129,0.2), 0 4px 16px rgba(16,185,129,0.15);
  transform: translateY(-2px);
}

.choice-card.col-span-2 {
  grid-column: span 2;
  flex-direction: row;
  justify-content: flex-start;
  padding: 1rem 1.25rem;
  gap: 0.75rem;
}

/* ── Option card — Seções B e C do Passo 4 ──────────────────── */
/* Base — mesmos estilos que choice-card */
.option-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: #ffffff;
  border: 2px solid #E5E7EB;
  border-radius: 1rem;
  padding: 1.1rem 0.75rem;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.15s ease,
    background 0.2s ease;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.option-card:hover {
  border-color: #5C3BB5;
  box-shadow: 0 4px 16px rgba(92,59,181,0.15);
  transform: translateY(-2px);
}

.option-card:active {
  transform: scale(0.96);
}

/* Estado selecionado — cor roxa (Seções B e C) */
.option-card.selected {
  border-color: #5C3BB5;
  background: #F5F3FF;
  box-shadow: 0 0 0 3px rgba(92,59,181,0.15);
}

/* Ícone do card */
.choice-icon {
  font-size: 1.6rem;
  line-height: 1;
  flex-shrink: 0;
}

/* Label do card */
.choice-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  line-height: 1.3;
}

/* Card "Nenhuma das opções" */
.choice-none.selected {
  border-color: #5C3BB5;
  background: #F5F3FF;
  box-shadow: 0 0 0 3px rgba(92,59,181,0.2);
}

/* Cards de escolha única (col-span-1 mas row layout) */
.choices-grid.grid-cols-1 {
  grid-template-columns: 1fr;
}

.choices-grid.grid-cols-1 .choice-card {
  flex-direction: row;
  justify-content: flex-start;
  padding: 1rem 1.25rem;
  text-align: left;
  gap: 0.75rem;
}

/* ── Card de Bio (Sexo) ──────────────────────────────────────── */
.bio-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  background: #ffffff;
  border: 2px solid #E5E7EB;
  border-radius: 1rem;
  padding: 1.25rem 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.bio-card:hover {
  border-color: #5C3BB5;
  transform: translateY(-2px);
}

.bio-card:active {
  transform: scale(0.96);
}

.bio-card.selected {
  border-color: #10B981;
  background: #F0FDF4;
  box-shadow: 0 0 0 3px rgba(16,185,129,0.2);
}

/* ── Inputs do formulário ────────────────────────────────────── */
.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.4rem;
  letter-spacing: 0.01em;
}

.form-input {
  width: 100%;
  background: #ffffff;
  border: 2px solid #E5E7EB;
  border-radius: 0.875rem;
  padding: 0.85rem 1rem;
  font-size: 0.9rem;
  color: #111827;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}

.form-input:focus {
  border-color: #5C3BB5;
  box-shadow: 0 0 0 3px rgba(92,59,181,0.12);
}

.form-input::placeholder { color: #9CA3AF; }

/* ── Botão Próximo ───────────────────────────────────────────── */
.btn-next {
  display: block;
  width: 100%;
  background: #10B981;
  color: #ffffff;
  font-weight: 700;
  font-size: 1rem;
  padding: 1rem;
  border-radius: 0.875rem;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 20px rgba(16,185,129,0.3);
  font-family: inherit;
}

.btn-next:hover {
  background: #059669;
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(16,185,129,0.4);
}

.btn-next:active {
  transform: scale(0.97);
}

.btn-next:disabled {
  background: #9CA3AF;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ── Botão Auth (Passo 3) ──────────────────────────────────── */
#btn-auth {
  display: block;
  width: 100%;
  background: #10B981 !important;
  color: #ffffff !important;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.875rem 1rem;
  border-radius: 0.75rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 20px rgba(16,185,129,0.3);
  font-family: inherit;
}

#btn-auth:hover {
  background: #059669 !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(16,185,129,0.4);
}

#btn-auth:active {
  transform: scale(0.97);
}

#btn-auth:disabled {
  background: #9CA3AF !important;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ── Card Antes/Depois (Passo 3) ──────────────────────────── */
.before-after-section {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.before-after-title {
  text-align: center;
  margin-bottom: 0.25rem;
  padding: 0 1rem;
}

.before-after-title h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #2D1B4E;
  margin: 0 0 0.1rem 0;
}

.before-after-title p {
  font-size: 0.875rem;
  color: #6B7280;
  margin: 0;
}

.before-after-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.before-after-card {
  position: relative;
  border-radius: 1.25rem;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.before-after-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.before-after-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  padding: 1.5rem 1rem 1rem;
  color: white;
  font-weight: 600;
  font-size: 1rem;
  text-align: center;
}

.result-highlight {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  border-radius: 1rem;
  padding: 0.75rem;
  text-align: center;
  color: white;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
  margin-bottom: 0.5rem;
}

.result-highlight-weight {
  font-size: 2.25rem;
  font-weight: 900;
  margin: 0 0 0.125rem 0;
}

.result-highlight-text {
  font-size: 0.875rem;
  opacity: 0.95;
  margin: 0;
}

/* Mobile Responsiveness */
@media (max-width: 640px) {
  .before-after-container {
    gap: 0.75rem;
  }
  
  .result-highlight-weight {
    font-size: 1.875rem;
  }
}

/* ================================================================
   3. CONFETES (Passo 10)
================================================================ */

#confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  top: -10px;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  opacity: 0;
  animation: confettiFall linear forwards;
}

@keyframes confettiFall {
  0% {
    opacity: 1;
    transform: translateY(0) rotate(0deg) scaleX(1);
  }
  80% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(100vh) rotate(720deg) scaleX(-1);
  }
}

/* ================================================================
   4. CARD DO PLANO (Passo 10)
================================================================ */

.plan-card {
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.plan-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 30px 60px rgba(45,27,78,0.4);
}

/* ================================================================
   5. SCROLLBAR CUSTOMIZADA
================================================================ */

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(92,59,181,0.3);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(92,59,181,0.5);
}

/* ================================================================
   6. RESPONSIVIDADE MOBILE
================================================================ */

@media (max-width: 480px) {
  .choices-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  .choice-card {
    padding: 0.875rem 0.5rem;
  }

  .choice-icon {
    font-size: 1.4rem;
  }

  .choice-label {
    font-size: 0.78rem;
  }
}

/* ================================================================
   7. UTILITÁRIOS EXTRAS
================================================================ */

/* Esconde elemento do DOM sem remover (usado pelo JS) */
.hidden { display: none !important; }

/* Transição suave de opacidade */
.fade-transition {
  transition: opacity 0.3s ease;
}

/* Pulse de loading */
@keyframes pulse-ring {
  0%   { transform: scale(0.95); opacity: 0.7; }
  70%  { transform: scale(1);    opacity: 0.3; }
  100% { transform: scale(0.95); opacity: 0.7; }
}

.pulse-ring {
  animation: pulse-ring 1.5s cubic-bezier(0.455, 0.03, 0.515, 0.955) infinite;
}

/* Badge de progresso */
.progress-ring {
  transition: stroke-dashoffset 0.5s ease;
}

/* ================================================================
   8. ESTILO DO TOPBAR FIXO (formulario.html)
================================================================ */

/* Garante que o conteúdo principal não fique atrás do header */
/* Já gerenciado via pt-32 no Tailwind, mas garantimos aqui */
body.funnel-page main {
  padding-top: 7.5rem;
}
