/* ============================================================
   SWITCH HUB — TOKENS + FORM NOVO CLIENTE
   Standalone styles, no design-system runtime.
   ============================================================ */

:root {
  /* Surfaces */
  --bg-base:        #0A0A0F;
  --bg-elevated:    #0D0D12;
  --bg-panel:       #111118;

  /* Brand */
  --brand-purple:        #7B3AED;
  --brand-purple-glow:   rgba(123, 58, 237, 0.15);
  --brand-purple-hover:  rgba(123, 58, 237, 0.4);
  --brand-purple-tint:   rgba(123, 58, 237, 0.1);
  --brand-purple-deep:   #4C1D95;

  /* Foreground */
  --fg-1:           #FFFFFF;
  --fg-2:           #A1A1AA;
  --fg-3:           #71717A;
  --fg-inverse:     #0A0A0F;

  /* Glass */
  --glass-bg:       rgba(255, 255, 255, 0.03);
  --glass-bg-hover: rgba(255, 255, 255, 0.05);
  --glass-border:   rgba(255, 255, 255, 0.08);
  --glass-border-strong: rgba(255, 255, 255, 0.14);

  /* Semantic */
  --semantic-success: #34D399;
  --semantic-warning: #FBBF24;
  --semantic-danger:  #F87171;

  /* Type families — Thunder/PhonkSans fallbacks (fontes comerciais inexistentes localmente) */
  --font-display: "Bebas Neue", "Oswald", Impact, "Arial Narrow", system-ui, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, "Courier New", monospace;
  --font-body:    "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;

  /* Motion */
  --ease-spring: cubic-bezier(0.32, 0.72, 0, 1);
  --dur-fast: 0.2s;
  --dur-med: 0.3s;
  --dur-slow: 0.5s;
}

/* ============================================================
   RESET & GLOBAL
   ============================================================ */
* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--fg-1);
  font-family: var(--font-body);
}
input, select, textarea, button {
  font-family: var(--font-body);
}
input::placeholder, textarea::placeholder { color: #52525B; }
input:-webkit-autofill, input:-webkit-autofill:focus {
  -webkit-text-fill-color: #fff;
  -webkit-box-shadow: 0 0 0 40px #14101f inset;
  caret-color: #fff;
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(123, 58, 237, 0.35); border-radius: 10px; }
::-webkit-scrollbar-track { background: transparent; }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes stepIn   { 0% { transform: translateY(10px); } 100% { transform: translateY(0); } }
@keyframes glowPulse{ 0%, 100% { opacity: 0.55; } 50% { opacity: 0.9; } }
@keyframes spin     { to { transform: rotate(360deg); } }
@keyframes floaty   { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

/* ============================================================
   STAGE + AMBIENT BG
   ============================================================ */
.stage {
  min-height: 100vh;
  width: 100%;
  background: var(--bg-base);
  color: #fff;
  position: relative;
  overflow: hidden;
  padding: 42px 32px 72px;
  font-family: var(--font-body);
}
.stage__glow-tl {
  position: fixed;
  top: -16%;
  right: -10%;
  width: 55vw;
  height: 55vw;
  max-width: 720px;
  max-height: 720px;
  background: radial-gradient(circle, rgba(123, 58, 237, 0.22), transparent 64%);
  filter: blur(30px);
  pointer-events: none;
  z-index: 0;
  animation: glowPulse 9s ease-in-out infinite;
}
.stage__glow-bl {
  position: fixed;
  bottom: -22%;
  left: -14%;
  width: 52vw;
  height: 52vw;
  max-width: 680px;
  max-height: 680px;
  background: radial-gradient(circle, rgba(76, 29, 149, 0.28), transparent 64%);
  filter: blur(30px);
  pointer-events: none;
  z-index: 0;
}
.stage__noise {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

@media (max-width: 600px) {
  .stage { padding: 20px 14px 48px; }
}

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  position: relative;
  z-index: 2;
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  align-items: stretch;
}

.aside {
  flex: 1 1 320px;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.aside__smark {
  position: absolute;
  right: -60px;
  bottom: -50px;
  width: 260px;
  opacity: 0.05;
  pointer-events: none;
}
.aside__logo {
  height: 30px;
  width: auto;
  align-self: flex-start;
  margin-bottom: auto;
}
.aside__intro { margin-top: 40px; }
.aside__headline {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-weight: 800;
  line-height: 0.88;
  letter-spacing: -0.02em;
  font-size: clamp(2.6rem, 5.4vw, 4rem);
  margin: 8px 0 0;
  color: #fff;
}
.aside__lede {
  font-family: var(--font-body);
  color: var(--fg-2);
  font-size: 1.02rem;
  line-height: 1.6;
  margin: 22px 0 0;
  max-width: 380px;
}

.stepper {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 36px;
}
.stepper__item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 13px 16px;
  border-radius: 11px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: background var(--dur-med), border-color var(--dur-med);
}
.stepper__item.is-active {
  background: rgba(123, 58, 237, 0.10);
  border-color: rgba(123, 58, 237, 0.4);
}
.stepper__dot {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: transparent;
  transition: background var(--dur-med), border-color var(--dur-med);
}
.stepper__item.is-active .stepper__dot,
.stepper__item.is-done .stepper__dot {
  border-color: var(--brand-purple);
}
.stepper__item.is-active .stepper__dot {
  background: rgba(123, 58, 237, 0.18);
}
.stepper__item.is-done .stepper__dot {
  background: var(--brand-purple);
}
.stepper__num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: var(--fg-3);
}
.stepper__item.is-active .stepper__num,
.stepper__item.is-done .stepper__num {
  color: var(--brand-purple);
}
.stepper__title {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.96rem;
  color: var(--fg-3);
  transition: color var(--dur-med);
}
.stepper__item.is-active .stepper__title,
.stepper__item.is-done .stepper__title {
  color: #fff;
}

.aside__seals {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid var(--glass-border);
}
.aside__seal {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--fg-3);
  font-size: 0.78rem;
}

/* ============================================================
   MAIN CARD
   ============================================================ */
.main { flex: 1.35 1 460px; min-width: 300px; }

.card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  overflow: hidden;
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.7);
}
.card__progress {
  height: 3px;
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
}
.card__progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #7B3AED, #A855F7);
  box-shadow: 0 0 14px rgba(123, 58, 237, 0.7);
  width: 33%;
  transition: width 0.55s var(--ease-spring);
}
.card__body { padding: clamp(22px, 4vw, 40px); }

.step-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 26px;
}
.step-header__title {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.02em;
  font-size: clamp(1.9rem, 4.2vw, 2.7rem);
  margin: 8px 0 0;
  color: #fff;
}
.step-header__counter {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--fg-3);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ============================================================
   TYPOGRAPHY UTILITIES
   ============================================================ */
.eyebrow {
  font-family: var(--font-mono);
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.875rem;
  color: var(--brand-purple);
  display: inline-block;
}

/* ============================================================
   FORM GRID + FIELDS
   ============================================================ */
.step { animation: stepIn 0.5s var(--ease-spring) both; }
.step.hidden { display: none; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.field.full { grid-column: 1 / -1; }

.field__label {
  font-family: var(--font-mono);
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-size: 0.7rem;
  color: var(--fg-2);
}
.field__required { color: var(--brand-purple); }
.field__hint {
  color: var(--fg-3);
  font-size: 0.72rem;
}
.field__error {
  color: var(--semantic-danger);
  font-size: 0.74rem;
  display: flex;
  gap: 5px;
  align-items: center;
}
.field__error.hidden { display: none; }
.field__error-slash {
  font-family: var(--font-mono);
}

.field input {
  width: 100%;
  padding: 13px 15px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: 9px;
  color: #fff;
  font-size: 0.98rem;
  outline: none;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast), background var(--dur-fast);
}
.field input:focus {
  border-color: var(--brand-purple);
  box-shadow: 0 0 0 3px rgba(123, 58, 237, 0.16), 0 0 18px rgba(123, 58, 237, 0.18);
  background: rgba(123, 58, 237, 0.05);
}
.field.uf input { text-transform: uppercase; }

.field[data-invalid="true"] input {
  border-color: rgba(248, 113, 113, 0.55) !important;
  background: rgba(248, 113, 113, 0.05) !important;
}

/* ============================================================
   FINANCEIRO — TOGGLE
   ============================================================ */
.toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 13px;
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s;
  margin-bottom: 22px;
  width: 100%;
  text-align: left;
  font-family: inherit;
  color: inherit;
}
.toggle:focus-visible {
  outline: 2px solid var(--brand-purple);
  outline-offset: 2px;
}
.toggle[aria-checked="true"] {
  border-color: rgba(123, 58, 237, 0.4);
  background: rgba(123, 58, 237, 0.08);
}
.toggle__title {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.02rem;
  color: #fff;
}
.toggle__sub {
  font-size: 0.84rem;
  color: var(--fg-2);
  margin-top: 3px;
}
.toggle__track {
  position: relative;
  width: 50px;
  height: 28px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  transition: background 0.25s;
  flex-shrink: 0;
}
.toggle[aria-checked="true"] .toggle__track {
  background: var(--brand-purple);
}
.toggle__knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  transform: translateX(0);
  transition: transform 0.25s var(--ease-spring);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}
.toggle[aria-checked="true"] .toggle__knob {
  transform: translateX(22px);
}

.finance-notice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  border: 1px dashed rgba(123, 58, 237, 0.4);
  background: rgba(123, 58, 237, 0.05);
  border-radius: 13px;
}
.finance-notice.hidden { display: none; }
.finance-notice span {
  color: var(--fg-2);
  font-size: 0.92rem;
}
.finance-notice strong { color: #fff; }

.finance-fields.hidden { display: none; }

/* ============================================================
   NAV (FOOTER BUTTONS)
   ============================================================ */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 30px;
}
.nav.hidden { display: none; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 20px;
  background: transparent;
  color: var(--fg-2);
  border: 1px solid var(--glass-border);
  border-radius: 11px;
  font-weight: 500;
  font-size: 0.92rem;
  cursor: pointer;
  transition: color 0.25s, border-color 0.25s;
  font-family: inherit;
}
.btn-ghost:hover {
  color: #fff;
  border-color: rgba(123, 58, 237, 0.5);
}
.btn-ghost.hidden { display: none; }

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 13px 13px 13px 26px;
  background: #fff;
  color: #0A0A0F;
  border: none;
  border-radius: 11px;
  font-weight: 600;
  font-size: 0.98rem;
  cursor: pointer;
  transition: box-shadow var(--dur-med), transform 0.15s, opacity var(--dur-fast);
  opacity: 1;
  font-family: inherit;
}
.btn-primary:hover { box-shadow: 0 0 24px rgba(255, 255, 255, 0.2); }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.7; cursor: not-allowed; }

.btn-primary__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #0A0A0F;
  color: #fff;
}
.btn-primary__spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: block;
}
.btn-primary__spinner.hidden,
.btn-primary__arrow.hidden { display: none; }

.nav__spacer { display: inline-block; }

/* ============================================================
   SUCCESS SCREEN
   ============================================================ */
.success {
  animation: stepIn 0.6s var(--ease-spring) both;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 0 8px;
}
.success.hidden { display: none; }
.success__mascot-wrap { position: relative; margin-bottom: 6px; }
.success__glow {
  position: absolute;
  left: 50%;
  top: 54%;
  transform: translate(-50%, -50%);
  width: 230px;
  height: 230px;
  background: radial-gradient(circle, rgba(123, 58, 237, 0.45), transparent 62%);
  filter: blur(18px);
}
.success__mascot {
  position: relative;
  width: 170px;
  height: auto;
  animation: floaty 4.2s ease-in-out infinite;
  filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.5));
}
.success__title {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.02em;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  margin: 10px 0 14px;
  color: #fff;
}
.success__lede {
  max-width: 440px;
  color: var(--fg-2);
  font-size: 1.04rem;
  line-height: 1.6;
  margin: 0 0 22px;
}
.success__lede strong { color: #fff; }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 30px;
}
.chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  font-size: 0.86rem;
  color: var(--fg-2);
}

/* ============================================================
   GENERIC ERROR (production: surface real submit failure)
   ============================================================ */
.submit-error {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(248, 113, 113, 0.4);
  background: rgba(248, 113, 113, 0.08);
  border-radius: 11px;
  color: var(--semantic-danger);
  font-size: 0.9rem;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.submit-error.hidden { display: none; }
.submit-error__slash { font-family: var(--font-mono); }
