/* ============================================================
   Seventy · Construttore — camada de movimento
   Carregado por último: reativa e amplia as animações que o tema claro
   (light-theme.css) havia desligado. Tudo aqui respeita o
   prefers-reduced-motion global definido no fim de style.css.
   ============================================================ */

:root {
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-back: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ink: #173e43;
  --ink-2: #396457;
  --gold: #9b8967;
  --gold-soft: #e8b57a;
}

/* ============ TIPOGRAFIA SEM SERIFA ============ */
.question-title,
.conclusion-title,
.exit-title {
  font-weight: 700;
  letter-spacing: -0.03em;
}
.offer-value {
  font-family: 'Inter Tight', -apple-system, 'Segoe UI', Arial, sans-serif;
  font-weight: 800;
  letter-spacing: -0.04em;
}
.conclusion-message { font-style: normal; }

/* ============ CARTÃO E CABEÇALHO DA MARCA ============ */
.experience { animation: cardIn 0.9s var(--ease-out-expo) backwards; }
@keyframes cardIn {
  from { opacity: 0; transform: translateY(26px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.brand-header { overflow: hidden; }
.brand-photo {
  animation: kenBurns 16s ease-in-out infinite alternate;
  transform-origin: 60% 40%;
}
@keyframes kenBurns {
  from { transform: scale(1.02) translate(0, 0); }
  to { transform: scale(1.16) translate(-2%, 1.5%); }
}
/* Faixa de luz que cruza a foto de tempos em tempos */
.brand-header::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.28) 50%, transparent 65%);
  transform: translateX(-120%);
  animation: headerSweep 6s ease-in-out 1.2s infinite;
}
@keyframes headerSweep {
  0% { transform: translateX(-120%); }
  40%, 100% { transform: translateX(120%); }
}
.brand-logo {
  animation:
    logoDrop 1s var(--ease-out-expo) 0.25s backwards,
    logoFloat 5s ease-in-out 1.3s infinite;
}
@keyframes logoDrop {
  from { opacity: 0; transform: translateY(-18px) scale(0.92); filter: blur(8px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}
@keyframes logoFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
.project-location {
  overflow: hidden;
  animation:
    badgeUp 0.8s var(--ease-back) 0.6s backwards,
    badgeGlow 3s ease-in-out 1.6s infinite;
}
@keyframes badgeUp {
  from { opacity: 0; transform: translateY(18px) scale(0.9); }
  to { opacity: 1; transform: none; }
}
@keyframes badgeGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(232, 181, 122, 0); }
  50% { box-shadow: 0 0 0 5px rgba(232, 181, 122, 0.28); }
}

/* ============ HEADER DO FLUXO E PROGRESSO ============ */
.flow-header:not([hidden]) { animation: headerIn 0.6s var(--ease-out-expo) both; }
.progress-track { overflow: visible; }
.progress-fill {
  background: linear-gradient(90deg, var(--ink), var(--ink-2), var(--gold), var(--ink-2), var(--ink));
  background-size: 300% 100%;
  border-radius: 3px;
  transition: width 0.8s var(--ease-back);
  animation: progressFlow 3s linear infinite;
}
@keyframes progressFlow {
  from { background-position: 0% 0; }
  to { background-position: 300% 0; }
}
.progress-fill::after {
  display: block;
  right: -4px;
  width: 9px;
  height: 9px;
  background: var(--gold);
  box-shadow: 0 0 0 0 rgba(155, 137, 103, 0.6);
  animation: progressDot 1.6s ease-out infinite;
}
@keyframes progressDot {
  0% { box-shadow: 0 0 0 0 rgba(155, 137, 103, 0.6); }
  100% { box-shadow: 0 0 0 9px rgba(155, 137, 103, 0); }
}
.step-label.tick { animation: labelTick 0.55s var(--ease-back); }
@keyframes labelTick {
  0% { opacity: 0; transform: translateY(-10px) scale(0.8); }
  100% { opacity: 1; transform: none; }
}

/* ============ TRANSIÇÃO ENTRE TELAS ============ */
.screen.exit-left,
.screen.exit-right { animation: screenOut 0.26s cubic-bezier(0.55, 0, 1, 0.45) both; }
.screen.exit-right { animation-name: screenOutBack; }
@keyframes screenOut {
  to { opacity: 0; transform: translateX(-42px) scale(0.97); filter: blur(4px); }
}
@keyframes screenOutBack {
  to { opacity: 0; transform: translateX(42px) scale(0.97); filter: blur(4px); }
}
.screen.enter-fwd,
.screen.enter-back { animation: screenIn 0.48s var(--ease-out-expo) both; }
.screen.enter-back { animation-name: screenInBack; }
@keyframes screenIn {
  from { opacity: 0; transform: translateX(48px); }
  to { opacity: 1; transform: none; }
}
@keyframes screenInBack {
  from { opacity: 0; transform: translateX(-48px); }
  to { opacity: 1; transform: none; }
}

/* Cascata: cada bloco da tela entra em sequência, com leve desfoque */
@keyframes riseIn {
  from { opacity: 0; transform: translateY(26px); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}
@keyframes titleIn {
  0% { opacity: 0; transform: translateY(30px) scale(0.96); filter: blur(10px); letter-spacing: 0.02em; }
  100% { opacity: 1; transform: none; filter: blur(0); }
}
@keyframes kickerIn {
  from { opacity: 0; letter-spacing: 0.4em; }
  to { opacity: 1; }
}
@keyframes cardIn3d {
  0% { opacity: 0; transform: translateX(46px) rotate(1.5deg) scale(0.96); }
  65% { opacity: 1; transform: translateX(-5px) rotate(0) scale(1.01); }
  100% { opacity: 1; transform: none; }
}

.screen.cascade-in .question-kicker { animation: kickerIn 0.7s var(--ease-out-expo) 0.05s backwards; }
.screen.cascade-in .question-title { animation: titleIn 0.75s var(--ease-out-expo) 0.12s backwards; }
.screen.cascade-in .question-hint { animation: riseIn 0.6s var(--ease-out-expo) 0.24s backwards; }
.screen.cascade-in .offer-panel { animation: offerIn 0.9s var(--ease-back) 0.26s backwards; }
.screen.cascade-in > .btn { animation: btnIn 0.75s var(--ease-back) 0.5s backwards; }
.screen.cascade-in .input-group > * { animation: riseIn 0.6s var(--ease-out-expo) backwards; }
.screen.cascade-in .input-group > *:nth-child(1) { animation-delay: 0.28s; }
.screen.cascade-in .input-group > *:nth-child(2) { animation-delay: 0.36s; }
.screen.cascade-in .input-group > *:nth-child(3) { animation-delay: 0.42s; }
.screen.cascade-in .input-group > *:nth-child(4) { animation-delay: 0.48s; }
.screen.cascade-in .input-group > .btn { animation: btnIn 0.75s var(--ease-back) 0.46s backwards; }
.screen.cascade-in .option-card { animation: cardIn3d 0.7s var(--ease-out-expo) backwards; }
.screen.cascade-in .option-card:nth-child(1) { animation-delay: 0.26s; }
.screen.cascade-in .option-card:nth-child(2) { animation-delay: 0.36s; }
.screen.cascade-in .option-card:nth-child(3) { animation-delay: 0.46s; }
.screen.cascade-in .option-card:nth-child(4) { animation-delay: 0.56s; }

/* Ao sair, os cards somem em sequência antes da tela */
.screen.cascade-out .option-card { animation: elemOut 0.18s ease-in both; }

/* ============ CONDIÇÃO ESPECIAL (tela de entrada) ============ */
@keyframes offerIn {
  0% { opacity: 0; transform: translateY(30px) scale(0.9); }
  70% { opacity: 1; transform: translateY(-3px) scale(1.015); }
  100% { opacity: 1; transform: none; }
}

/* Borda em gradiente girando ao redor do painel */
@property --offer-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
.offer-panel {
  border: 2px solid transparent;
  background:
    linear-gradient(#fff, #fff) padding-box,
    conic-gradient(from var(--offer-angle), #d8dfd7 0deg, var(--gold) 70deg, var(--ink) 140deg, #d8dfd7 220deg, var(--gold-soft) 300deg, #d8dfd7 360deg) border-box;
}
.screen.active .offer-panel { animation: offerIn 0.9s var(--ease-back) 0.26s backwards, offerSpin 5s linear infinite; }
@keyframes offerSpin { to { --offer-angle: 360deg; } }

/* Brilho atravessando o painel */
.offer-panel::after,
#lead-offer .offer-panel::after {
  display: block;
  z-index: 0;
  background: linear-gradient(100deg, transparent, rgba(232, 181, 122, 0.28), transparent);
  animation: offerSheen 3.6s ease-in-out 1.6s infinite;
}
.offer-panel > * { position: relative; z-index: 1; }

.offer-value {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  width: 100%;
}
.offer-count {
  display: inline-block;
  min-width: 1.15em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.offer-value small {
  display: inline-block;
  font-weight: 600;
  letter-spacing: -0.01em;
  animation: riseIn 0.6s var(--ease-back) 1.5s backwards;
}
/* Fim da contagem: um "pulo" e o brilho pulsando em seguida */
.offer-value.is-done {
  animation:
    valuePop 0.6s var(--ease-back),
    valueGlow 2.8s ease-in-out 0.6s infinite;
}
@keyframes valuePop {
  0% { transform: scale(1); }
  40% { transform: scale(1.12); }
  100% { transform: scale(1); }
}
@keyframes valueGlow {
  0%, 100% { text-shadow: 0 0 0 rgba(155, 137, 103, 0); }
  50% { text-shadow: 0 6px 26px rgba(155, 137, 103, 0.45); }
}
.offer-kicker { animation: kickerBlink 2.6s ease-in-out 1.2s infinite; }
@keyframes kickerBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

/* ============ BOTÕES ============ */
.btn {
  isolation: isolate;
  overflow: hidden;
  transition:
    transform 0.35s var(--ease-back),
    box-shadow 0.35s ease,
    background 0.25s ease,
    border-color 0.25s ease;
}
@keyframes btnIn {
  0% { opacity: 0; transform: translateY(24px) scale(0.92); }
  65% { opacity: 1; transform: translateY(-4px) scale(1.02); }
  100% { opacity: 1; transform: none; }
}
@media (hover: hover) {
  .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 28px -12px rgba(23, 62, 67, 0.55);
  }
  .btn:hover .btn-arrow { transform: translateX(6px); animation-play-state: paused; }
}
.btn:active,
.btn:hover:active {
  transform: translateY(1px) scale(0.96);
  box-shadow: 0 4px 10px -6px rgba(23, 62, 67, 0.5);
  transition-duration: 0.08s;
}

/* Brilho atravessando o botão primário em ciclos */
.btn-primary::after {
  display: block;
  z-index: 1;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.38), transparent);
  animation: btnSheen 3s ease-in-out 1s infinite;
}
.btn-primary.btn-checking::after,
.btn-whatsapp.btn-loading::after { display: none; }

/* Seta que "chama" para frente */
.btn-arrow {
  display: inline-block;
  margin-left: 4px;
  transition: transform 0.3s var(--ease-back);
  animation: arrowNudge 1.6s ease-in-out infinite;
}
@keyframes arrowNudge {
  0%, 55%, 100% { transform: translateX(0); }
  25% { transform: translateX(5px); }
}

/* CTA principal da tela de entrada: respira e emite um anel */
.btn-cta {
  animation: ctaPulse 2.2s ease-in-out 1.6s infinite;
}
.screen.cascade-in > .btn-cta {
  animation:
    btnIn 0.75s var(--ease-back) 0.5s backwards,
    ctaPulse 2.2s ease-in-out 1.6s infinite;
}
@keyframes ctaPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(23, 62, 67, 0.45); }
  50% { box-shadow: 0 0 0 12px rgba(23, 62, 67, 0); }
}

/* Ripple do toque (criado em script.js) */
.ripple {
  position: absolute;
  z-index: 0;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.18) 40%, transparent 70%);
  transform: scale(0);
  animation: rippleOut 0.65s var(--ease-out-expo) forwards;
}
@keyframes rippleOut {
  to { transform: scale(1); opacity: 0; }
}
.btn > *:not(.ripple) { position: relative; z-index: 2; }

/* WhatsApp liberado: pulso de anel */
.btn-whatsapp.btn-unlocked {
  animation:
    btnUnlock 0.5s var(--ease-back),
    ctaPulse 2s ease-in-out 0.5s infinite;
}
.btn-spinner { animation: spin 0.7s linear infinite; }

/* ============ CARDS DE OPÇÃO ============ */
.option-card {
  overflow: hidden;
  transition:
    transform 0.35s var(--ease-back),
    background 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.35s ease;
}
.option-card > * { position: relative; z-index: 1; }
.option-card::after {
  position: relative;
  z-index: 1;
  transition: transform 0.35s var(--ease-back);
  animation: arrowNudge 1.8s ease-in-out infinite;
}
.option-card:nth-child(2)::after { animation-delay: 0.2s; }
.option-card:nth-child(3)::after { animation-delay: 0.4s; }
@media (hover: hover) {
  .option-card:hover {
    transform: translateX(4px);
    box-shadow: 0 14px 28px -14px rgba(23, 62, 67, 0.6);
  }
  .option-card:hover::after { transform: translateX(6px); animation-play-state: paused; }
}
.option-card:active { transform: scale(0.97); transition-duration: 0.08s; }
.option-card.selected {
  animation: cardSelect 0.5s var(--ease-back) both;
  box-shadow: 0 0 0 4px rgba(57, 100, 87, 0.22);
}
@keyframes cardSelect {
  0% { transform: scale(0.97); }
  50% { transform: scale(1.035); }
  100% { transform: scale(1); }
}
.screen.cascade-in .option-card.selected { animation: cardSelect 0.5s var(--ease-back) 0s both; }
.option-card.selected .check-icon { animation: checkPop 0.45s var(--ease-back); }

/* ============ CAMPOS ============ */
.text-input {
  transition: border-color 0.25s ease, box-shadow 0.35s var(--ease-out-expo), transform 0.35s var(--ease-back);
}
.text-input:focus {
  box-shadow: 0 0 0 4px rgba(23, 62, 67, 0.12);
  animation: focusRing 0.6s var(--ease-out-expo);
}
@keyframes focusRing {
  0% { box-shadow: 0 0 0 0 rgba(23, 62, 67, 0.35); }
  100% { box-shadow: 0 0 0 4px rgba(23, 62, 67, 0.12); }
}
.screen.cascade-in .text-input:focus { animation: focusRing 0.6s var(--ease-out-expo); }
.text-input.invalid,
.screen.cascade-in .text-input.invalid { animation: fieldShake 0.45s ease; }
.input-error:not([hidden]) { animation: errorIn 0.4s var(--ease-back) both; }
@keyframes errorIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

/* Valor da entrada: prefixo R$ fixo, número grande e check ao passar do mínimo */
.money-field { position: relative; }
.money-prefix {
  position: absolute;
  left: 18px;
  top: 50%;
  z-index: 1;
  transform: translateY(-50%);
  color: #66736e;
  font: 600 20px/1 'Inter Tight', -apple-system, 'Segoe UI', Arial, sans-serif;
  pointer-events: none;
  transition: color 0.25s ease;
}
.text-input.money-input {
  min-height: 72px;
  padding-left: 56px;
  padding-right: 56px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.text-input.money-input::placeholder { color: #a3aea8; font-weight: 500; }
.money-field:focus-within .money-prefix { color: var(--ink); }
.money-check {
  position: absolute;
  right: 16px;
  top: 50%;
  width: 30px;
  height: 30px;
  padding: 6px;
  border-radius: 50%;
  background: var(--ink-2);
  color: #fff;
  opacity: 0;
  transform: translateY(-50%) scale(0) rotate(-90deg);
  transition: opacity 0.2s ease, transform 0.45s var(--ease-back);
  pointer-events: none;
}
.money-check svg { display: block; width: 100%; height: 100%; }
.money-field.is-valid .money-check { opacity: 1; transform: translateY(-50%) scale(1) rotate(0); }
.money-field.is-valid .money-input { border-color: var(--ink-2); }
.money-field.is-valid .money-input:not(:focus) { box-shadow: 0 0 0 3px rgba(57, 100, 87, 0.12); }
.entrada-hint {
  margin-top: -6px;
  text-align: center;
  color: #66736e;
  font: 400 13px/1.4 'Inter Tight', -apple-system, 'Segoe UI', Arial, sans-serif;
}

/* ============ CONCLUSÃO ============ */
.screen-conclusion.cascade-in .conclusion-title { animation: titleIn 0.8s var(--ease-out-expo) 0.1s backwards; }
.screen-conclusion.cascade-in .conclusion-label { animation: riseIn 0.6s var(--ease-out-expo) 0.25s backwards; }
.screen-conclusion.cascade-in .summary-item { animation: summaryIn 0.6s var(--ease-back) backwards; }
.screen-conclusion.cascade-in .summary-item:nth-child(1) { animation-delay: 0.35s; }
.screen-conclusion.cascade-in .summary-item:nth-child(2) { animation-delay: 0.47s; }
.screen-conclusion.cascade-in .summary-item:nth-child(3) { animation-delay: 0.59s; }
.screen-conclusion.cascade-in .conclusion-message { animation: riseIn 0.6s var(--ease-out-expo) 0.7s backwards; }
.screen-conclusion.cascade-in .btn-whatsapp:not(.btn-unlocked) { animation: btnIn 0.75s var(--ease-back) 0.8s backwards; }
.screen-conclusion.cascade-in .auto-redirect { animation: riseIn 0.6s var(--ease-out-expo) 0.9s backwards; }
@keyframes summaryIn {
  from { opacity: 0; transform: translateX(-24px); }
  to { opacity: 1; transform: none; }
}
.summary-emoji { display: inline-block; animation: emojiBob 2.4s ease-in-out 1.4s infinite; }
.summary-item:nth-child(2) .summary-emoji { animation-delay: 1.6s; }
.summary-item:nth-child(3) .summary-emoji { animation-delay: 1.8s; }
@keyframes emojiBob {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-3px) rotate(-8deg); }
}
.auto-progress-bar {
  background: linear-gradient(90deg, var(--ink), var(--ink-2), var(--gold), var(--ink));
  background-size: 300% 100%;
  animation: progressFlow 2s linear infinite;
}
.screen-exit.cascade-in .exit-content > * { animation: riseIn 0.6s var(--ease-out-expo) backwards; }
.screen-exit.cascade-in .exit-content > *:nth-child(2) { animation-delay: 0.1s; }
.screen-exit.cascade-in .exit-content > *:nth-child(3) { animation-delay: 0.2s; }
.screen-exit.cascade-in .exit-content > *:nth-child(4) { animation-delay: 0.3s; }
.screen-exit.cascade-in .exit-content > *:nth-child(5) { animation-delay: 0.4s; }
