/* ═══════════════════════════════════════════════
   Atomo Tecnologia — Multi-step Form
   ════════════════════════════════════════════ */

/* ── Clash Display (local) ─────────────────── */
@font-face {
  font-family: "Clash";
  src: url("../assets/fonts/ClashDisplay-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Clash";
  src: url("../assets/fonts/ClashDisplay-Medium.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Clash";
  src: url("../assets/fonts/ClashDisplay-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

/* ── Reset & Base ──────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --black: #000000;
  --dark: #1b1b1b;
  --dark-hover: #222222;
  --white-90: rgba(255, 255, 255, 0.9);
  --white-80: rgba(255, 255, 255, 0.8);
  --white-50: rgba(255, 255, 255, 0.5);
  --white-30: rgba(255, 255, 255, 0.3);
  --white-16: rgba(255, 255, 255, 0.16);
  --white-08: rgba(255, 255, 255, 0.08);
  --marca: #6c57a2;
  --marca-light: #8b73c9;
  --marca-dark: #4d6eb5;
  --marca-grad: linear-gradient(90deg, #4d6eb5, #6c57a2);
  --radius-card: 42px;
  --radius-step: 22px;
  --radius-in: 12px;
  --radius-btn: 12px;
  --transition: 0.22s ease;
  --font-clash: "Clash", sans-serif;
  --font-inter: "Inter", sans-serif;
}

html,
body {
  height: 100%;
  background: var(--black);
  color: var(--white-90);
  font-family: var(--font-inter);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

/* ── Layout wrapper ────────────────────────── */
.app-wrapper {
  display: grid;
  grid-template-columns: 46% 54%;
  min-height: 100vh;
  min-height: 100dvh;
}

/* ════════════════════════════════════════════
   LEFT PANEL
   ═══════════════════════════════════════════ */
.left-panel {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  display: flex;
  align-items: stretch;
  padding: clamp(20px, 3vw, 44px);
}

/* Gradient card */
.left-panel::before {
  content: "";
  position: absolute;
  inset: clamp(12px, 2vw, 40px);
  border-radius: var(--radius-card);
  background: #000;
  z-index: 0;
}

/* Background blur & glow */
.lp-bg {
  position: absolute;
  inset: clamp(12px, 2vw, 40px);
  border-radius: var(--radius-card);
  overflow: hidden;
  z-index: 0;
}

.lp-glow {
  position: absolute;
  top: -40%;
  left: -30%;
  width: 160%;
  height: 160%;
  background: radial-gradient(
    ellipse 65% 55% at 52% 38%,
    rgba(108, 87, 162, 1) 0%,
    rgba(92, 73, 142, 0.92) 14%,
    rgba(70, 57, 112, 0.78) 30%,
    rgba(46, 37, 76, 0.55) 50%,
    rgba(24, 16, 44, 0.28) 68%,
    rgba(0, 0, 0, 0) 85%
  );
  filter: blur(52px);
  pointer-events: none;
}

.lp-glow--secondary {
  top: auto;
  bottom: -30%;
  left: 20%;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    ellipse 50% 40% at 40% 70%,
    rgba(77, 110, 181, 0.3) 0%,
    rgba(0, 0, 0, 0) 65%
  );
  filter: blur(40px);
}

/* Content inside card */
.lp-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  padding: 2vw;
  gap: clamp(16px, 2vw, 40px);
}

/* Logo */
.lp-logo {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  mix-blend-mode: color-dodge;
}
.lp-logo img {
  width: clamp(48px, 6vw, 84px);
  height: auto;
  display: block;
}

/* Title */
.lp-title {
  font-family: var(--font-clash);
  font-weight: 400;
  font-size: clamp(26px, 4vw, 72px);
  line-height: 1.1;
  text-align: center;
  color: #cbb9ffd6;
  mix-blend-mode: color-dodge;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Step cards */
.lp-steps {
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 1.2vw, 14px);
}

@media (min-width: 1100px) {
  .lp-steps {
    flex-direction: row;
  }
}

.step-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 2vw, 28px);
  padding: clamp(14px, 1.8vw, 20px);
  border-radius: var(--radius-step);
  background: var(--white-16);
  transition:
    background var(--transition),
    transform var(--transition);
}

.step-card--active {
  background: var(--white-90);
}

.step-card p {
  font-family: var(--font-inter);
  font-size: clamp(13px, 1.2vw, 18px);
  font-weight: 400;
  line-height: 1.35;
  color: var(--white-80);
}

.step-card--active p {
  color: rgba(0, 0, 0, 0.8);
}

.step-badge {
  width: clamp(28px, 3vw, 40px);
  height: clamp(28px, 3vw, 40px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-inter);
  font-size: clamp(12px, 1.2vw, 16px);
  font-weight: 600;
  background: var(--white-16);
  color: var(--white-90);
  transition: background var(--transition);
}

.step-card--active .step-badge {
  background: var(--black);
  color: var(--white-90);
}

.step-card--done .step-badge {
  background: var(--marca-dark);
  color: #fff;
}

/* ════════════════════════════════════════════
   RIGHT PANEL
   ═══════════════════════════════════════════ */
.right-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100vh;
  height: 100dvh;
  overflow-y: auto;
  padding: clamp(28px, 4vw, 60px) clamp(20px, 5vw, 80px);
  gap: clamp(40px, 7vh, 100px);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.right-panel::-webkit-scrollbar {
  width: 4px;
}
.right-panel::-webkit-scrollbar-track {
  background: transparent;
}
.right-panel::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
}

/* ── Progress Bar ──────────────────────────── */
.progress-wrap {
  display: flex;
  gap: clamp(6px, 1vw, 10px);
  width: 100%;
  max-width: 660px;
  flex-shrink: 0;
}

.prog-seg {
  flex: 1;
  height: 3px;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 99px;
  overflow: hidden;
}

.prog-fill {
  height: 100%;
  width: 0;
  background: var(--marca-grad);
  border-radius: 99px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Form wrapper ──────────────────────────── */
.form-wrap {
  width: 100%;
  max-width: 660px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ── Form steps ────────────────────────────── */
.form-step {
  display: flex;
  flex-direction: column;
  gap: clamp(22px, 3vh, 38px);
  animation: fadeSlideIn 0.35s ease forwards;
}

.form-step--hidden {
  display: none;
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateX(24px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeSlideBack {
  from {
    opacity: 0;
    transform: translateX(-24px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.form-step.slide-back {
  animation: fadeSlideBack 0.35s ease forwards;
}

/* ── Field group ───────────────────────────── */
.field-group {
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.2vh, 16px);
}

.field-label {
  font-family: var(--font-inter);
  font-size: clamp(16px, 1.8vw, 28px);
  font-weight: 400;
  color: var(--white-90);
  line-height: 1.2;
}

#formStep1 .field-group:first-child .field-label {
  font-size: clamp(18px, 2.2vw, 32px);
}

.label-hint {
  display: inline-block;
  font-size: clamp(11px, 1vw, 14px);
  font-weight: 400;
  color: var(--white-50);
  margin-left: 6px;
}
.label-hint::before {
  content: "(";
}
.label-hint::after {
  content: ")";
}

/* ── Text inputs & textarea ────────────────── */
.field-input {
  width: 100%;
  background: var(--dark);
  border: 1.5px solid transparent;
  border-radius: var(--radius-in);
  padding: clamp(14px, 1.6vh, 20px) clamp(16px, 2vw, 24px);
  font-family: var(--font-inter);
  font-size: clamp(15px, 1.4vw, 18px);
  font-weight: 400;
  color: var(--white-90);
  outline: none;
  transition:
    border-color var(--transition),
    box-shadow var(--transition),
    background var(--transition);
  caret-color: var(--marca);
}

#phone {
  padding-left: 108px !important;
}

.field-input::placeholder {
  color: rgba(255, 255, 255, 0.32);
}

.field-input:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

.field-input:focus {
  border-color: rgba(108, 87, 162, 0.55);
  box-shadow: 0 0 0 3px rgba(108, 87, 162, 0.1);
  background: #202020;
}

.field-input.field-input--error {
  border-color: rgba(255, 80, 80, 0.7);
  box-shadow: 0 0 0 3px rgba(255, 80, 80, 0.1);
}

.field-textarea {
  resize: vertical;
  min-height: clamp(90px, 12vh, 130px);
  line-height: 1.55;
}

/* ── Field error ───────────────────────────── */
.field-error {
  font-size: clamp(12px, 1vw, 13px);
  color: #ff7070;
  min-height: 16px;
  line-height: 1.3;
  display: none;
}

.field-error.visible {
  display: block;
}

/* ── Global error ──────────────────────────── */
.global-error {
  padding: 14px 18px;
  background: rgba(255, 60, 60, 0.1);
  border: 1px solid rgba(255, 80, 80, 0.3);
  border-radius: var(--radius-in);
  font-size: 14px;
  color: #ff9090;
  text-align: center;
}

/* ── Phone field (intl-tel-input overrides) ── */
.phone-wrap {
  position: relative;
}

.iti {
  width: 100%;
}

.iti__tel-input {
  background: var(--dark) !important;
  border: 1.5px solid transparent !important;
  border-radius: var(--radius-in) !important;
  padding: clamp(14px, 1.6vh, 20px) clamp(16px, 2vw, 24px) !important;
  font-family: var(--font-inter) !important;
  font-size: clamp(15px, 1.4vw, 18px) !important;
  color: var(--white-90) !important;
  width: 100% !important;
  outline: none !important;
  transition:
    border-color var(--transition),
    box-shadow var(--transition) !important;
  caret-color: var(--marca) !important;
}

.iti__tel-input::placeholder {
  color: rgba(255, 255, 255, 0.32) !important;
}
.iti__tel-input:hover {
  border-color: rgba(255, 255, 255, 0.12) !important;
}
.iti__tel-input:focus {
  border-color: rgba(108, 87, 162, 0.55) !important;
  box-shadow: 0 0 0 3px rgba(108, 87, 162, 0.1) !important;
  background: #202020 !important;
}

.iti__tel-input.iti__tel-input--error {
  border-color: rgba(255, 80, 80, 0.7) !important;
}

/* Flag button */
.iti__selected-country {
  background: transparent !important;
  border-right: 1px solid rgba(255, 255, 255, 0.1) !important;
  padding: 0px 10px !important;
  gap: 0px !important;
}

.iti__selected-country:hover {
  background: rgba(255, 255, 255, 0.05) !important;
}

.iti__selected-dial-code {
  color: rgba(255, 255, 255, 0.65) !important;
  font-family: var(--font-inter) !important;
  font-size: 14px !important;
}

/* Dropdown */
.iti__dropdown-content {
  background: #1e1e1e !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 14px !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5) !important;
  overflow: hidden !important;
}

.iti__search-input {
  background: #252525 !important;
  border: none !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: var(--white-90) !important;
  font-family: var(--font-inter) !important;
  padding: 12px 14px !important;
}

.iti__country-name,
.iti__dial-code {
  color: rgba(255, 255, 255, 0.8) !important;
}

.iti__country:hover,
.iti__country.iti__highlight {
  background: rgba(108, 87, 162, 0.1) !important;
}

/* ── Option cards (radio/checkbox) ─────────── */
.options-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.options-grid--2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.option-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: clamp(13px, 1.5vh, 17px) clamp(14px, 1.6vw, 18px);
  background: var(--dark);
  border: 1.5px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-in);
  cursor: pointer;
  transition:
    border-color var(--transition),
    background var(--transition),
    transform 0.15s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.option-card:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: var(--dark-hover);
}

.option-card:active {
  transform: scale(0.993);
}

/* Hide native input */
.option-card input[type="radio"],
.option-card input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

/* Custom indicator */
.opt-indicator {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  position: relative;
  transition:
    border-color var(--transition),
    background var(--transition);
}

/* Checkbox = square */
.option-card--check .opt-indicator {
  border-radius: 5px;
}

/* Selected state — label with checked input */
.option-card:has(input:checked) {
  border-color: rgba(108, 87, 162, 0.65);
  background: rgba(108, 87, 162, 0.07);
}

.option-card:has(input:checked) .opt-indicator {
  border-color: var(--marca);
  background: var(--marca);
}

/* Radio dot */
.option-card:has(input[type="radio"]:checked) .opt-indicator::after {
  content: "";
  position: absolute;
  inset: 3px;
  background: #000;
  border-radius: 50%;
}

/* Checkbox checkmark */
.option-card--check:has(input:checked) .opt-indicator::after {
  content: "";
  position: absolute;
  top: 1px;
  left: 2px;
  width: 10px;
  height: 6px;
  border-left: 2px solid #000;
  border-bottom: 2px solid #000;
  transform: rotate(-45deg);
}

.opt-text {
  font-family: var(--font-inter);
  font-size: clamp(14px, 1.2vw, 16px);
  font-weight: 400;
  color: var(--white-80);
  line-height: 1.35;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.opt-sub {
  font-size: clamp(11px, 0.9vw, 12px);
  color: var(--white-50);
}

/* ── Buttons ───────────────────────────────── */
.btn-primary {
  width: 100%;
  padding: clamp(14px, 1.8vh, 20px) clamp(16px, 2vw, 24px);
  background: var(--white-90);
  border: none;
  border-radius: var(--radius-btn);
  font-family: var(--font-inter);
  font-size: clamp(15px, 1.4vw, 18px);
  font-weight: 500;
  color: rgba(0, 0, 0, 0.9);
  cursor: pointer;
  transition:
    background var(--transition),
    transform var(--transition),
    box-shadow var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary:hover {
  background: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(108, 87, 162, 0.18);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  flex: 0 0 auto;
  width: auto;
  min-width: 110px;
  padding: clamp(14px, 1.8vh, 20px) clamp(16px, 2vw, 24px);
  background: rgba(255, 255, 255, 0.07);
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-btn);
  font-family: var(--font-inter);
  font-size: clamp(15px, 1.4vw, 18px);
  font-weight: 500;
  color: var(--white-80);
  cursor: pointer;
  transition:
    background var(--transition),
    border-color var(--transition);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  color: var(--white-90);
}

/* Navigation row */
.form-nav {
  margin-top: clamp(14px, 2vh, 28px);
}
.form-nav--split {
  display: flex;
  gap: 12px;
}
.form-nav--split .btn-primary {
  flex: 1;
}

/* Submit loading spinner */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(0, 0, 0, 0.25);
  border-top-color: rgba(0, 0, 0, 0.8);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

/* ── Honeypot (hidden from humans) ─────────── */
.hp-trap {
  position: absolute;
  left: -99999px;
  top: -99999px;
  width: 0;
  height: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  tab-index: -1;
}

/* ════════════════════════════════════════════
   SUCCESS POPUP
   ═══════════════════════════════════════════ */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.popup-overlay[hidden] {
  display: none;
}

.popup-overlay.popup--visible {
  opacity: 1;
}

.popup-card {
  background: #111111;
  border: 1px solid rgba(108, 87, 162, 0.22);
  border-radius: 28px;
  padding: clamp(32px, 5vw, 56px);
  max-width: 480px;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  transform: translateY(28px) scale(0.96);
  transition:
    transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 0.3s ease;
  opacity: 0;
}

.popup--visible .popup-card {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.popup-check {
  width: 52px;
  height: 52px;
}
.popup-check svg {
  width: 100%;
  height: 100%;
  display: block;
}

.popup-title {
  font-family: var(--font-clash);
  font-weight: 500;
  font-size: clamp(20px, 2.5vw, 28px);
  color: var(--white-90);
  line-height: 1.2;
}

.popup-body {
  font-family: var(--font-inter);
  font-size: clamp(14px, 1.2vw, 16px);
  font-weight: 400;
  color: var(--white-50);
  line-height: 1.6;
  max-width: 340px;
}

.popup-close-btn {
  margin-top: 8px;
  max-width: 260px;
}

/* ════════════════════════════════════════════
   RESPONSIVE — Tablet (900px↓)
   ═══════════════════════════════════════════ */
@media (max-width: 900px) {
  .app-wrapper {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    min-height: 100dvh;
  }

  /* ─ Left panel becomes top strip ─ */
  .left-panel {
    position: relative;
    height: auto;
    padding: 12px;
  }

  .left-panel::before {
    inset: 10px;
    border-radius: 24px;
  }
  .lp-bg {
    inset: 10px;
    border-radius: 24px;
  }

  .lp-content {
    padding: clamp(18px, 4vw, 28px);
    gap: 16px;
    min-height: 0;
  }

  .lp-title {
    font-size: clamp(18px, 4.5vw, 28px);
    text-align: center;
    flex: none;
    padding: 0 8px;
  }

  .lp-steps {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .step-card {
    flex: 1 1 140px;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
  }

  .lp-logo img {
    width: 36px;
  }

  .step-card p {
    font-size: clamp(14px, 2.5vw, 14px);
  }

  .step-badge {
    width: 28px;
    height: 28px;
    font-size: 12px;
    flex-shrink: 0;
  }

  /* ─ Right panel becomes main area ─ */
  .right-panel {
    height: auto;
    overflow-y: visible;
    padding: clamp(20px, 4vw, 36px) clamp(16px, 4vw, 28px);
    gap: 32px;
    align-items: stretch;
  }

  .form-wrap {
    max-width: 100%;
    padding-bottom: 32px;
  }
  .progress-wrap {
    max-width: 100%;
  }

  .options-grid--2col {
    grid-template-columns: 1fr 1fr;
  }
}

/* ════════════════════════════════════════════
   RESPONSIVE — Mobile (480px↓)
   ═══════════════════════════════════════════ */
@media (max-width: 480px) {
  .lp-steps {
    gap: 8px;
  }

  .step-card {
    flex: 1 1 100%;
    padding: 10px 12px;
  }

  .options-grid--2col {
    grid-template-columns: 1fr;
  }

  .form-nav--split {
    flex-direction: column-reverse;
  }

  .btn-secondary {
    width: 100%;
  }

  .popup-card {
    padding: 32px 24px;
    border-radius: 20px;
  }
}

/* ── Reduced motion ────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------------------------------------------------------------
   CANCELAR — sair do formulario e voltar ao site
   Fica discreto de proposito: e uma saida, nao uma accao principal.
--------------------------------------------------------------- */
.form-cancelar {
  margin-top: clamp(12px, 1.6vh, 20px);
  text-align: center;
}

.btn-cancelar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-btn);
  font-family: var(--font-inter);
  font-size: 13px;
  color: var(--white-50);
  text-decoration: none;
  background: transparent;
  border: 1px solid transparent;
  transition: color var(--transition), border-color var(--transition),
    background-color var(--transition);
}

.btn-cancelar::before {
  content: "\2190"; /* seta para a esquerda */
  font-size: 15px;
  line-height: 1;
}

.btn-cancelar:hover,
.btn-cancelar:focus-visible {
  color: var(--white-90);
  border-color: var(--white-16);
  background-color: rgba(255, 255, 255, 0.04);
}

.btn-cancelar:focus-visible {
  outline: 2px solid var(--marca);
  outline-offset: 2px;
}
