/* ============================================================= */
/*  DESIGN TOKENS — paleta oficial Inovamark                     */
/*  Edite as 6 variáveis --color-* abaixo para ajustar a marca.  */
/* ============================================================= */
:root {
  /* ---- BRAND PALETTE (Inovamark) ---- */
  --color-bg:          #0a0a0a;   /* fundo principal, quase preto */
  --color-bg-pure:     #000000;   /* preto puro, seções de maior contraste */
  --color-accent:      #7C00F2;   /* roxo vibrante — CTAs, ícones, glow, progresso */
  --color-accent-light:#C7C2F5;   /* lilás claro — textos secundários, hover suave, bordas */
  --color-surface:     #3C3B53;   /* slate escuro — cards, inputs, superfícies elevadas */
  --color-white:       #FFFFFF;   /* texto principal sobre fundo escuro */

  /* ---- Derived tokens (map palette to internal usage) ---- */
  /* Backgrounds */
  --bg:            var(--color-bg);
  --bg-2:          var(--color-bg-pure);
  --surface:       var(--color-surface);
  --surface-hover: #46455f;                       /* slate levemente mais claro p/ hover */
  --border:        rgba(124, 0, 242, 0.20);       /* borda sutil roxa nos cards */
  --border-soft:   rgba(199, 194, 245, 0.15);     /* borda glassmorphism (lilás) */
  --border-input:  rgba(199, 194, 245, 0.25);     /* borda padrão de inputs (lilás) */
  --border-active: var(--color-accent);

  /* Accent */
  --accent:        var(--color-accent);
  --accent-soft:   rgba(124, 0, 242, 0.16);
  --glow:          rgba(124, 0, 242, 0.45);

  /* WhatsApp */
  --whatsapp:      #25d366;
  --whatsapp-dark: #1da851;

  /* Text */
  --text:          var(--color-white);
  --text-dim:      var(--color-accent-light);

  /* Type */
  --font-display:  "Space Grotesk", system-ui, sans-serif;
  --font-body:     "Inter", system-ui, sans-serif;

  /* Spacing & shape */
  --space:         16px;
  --radius:        16px;
  --radius-sm:     12px;
  --maxw:          440px;

  /* Motion */
  --ease:          cubic-bezier(0.22, 1, 0.36, 1);
}

/* ============================================================= */
/*  RESET                                                        */
/* ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  min-height: 100dvh;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(124, 0, 242, 0.18), transparent 60%),
    radial-gradient(900px 500px at 50% 110%, rgba(124, 0, 242, 0.10), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 20px 16px calc(28px + env(safe-area-inset-bottom));
  line-height: 1.5;
}

img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
input { font-family: inherit; }

/* ============================================================= */
/*  SHELL                                                        */
/* ============================================================= */
.form-shell {
  width: 100%;
  max-width: var(--maxw);
}

/* ---- Progress bar ---- */
.progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}
.progress__track {
  flex: 1;
  height: 5px;
  border-radius: 99px;
  background: var(--color-surface);
  overflow: hidden;
}
.progress__fill {
  height: 100%;
  width: 25%;
  border-radius: 99px;
  background: var(--color-accent);
  box-shadow: 0 0 12px var(--glow);
  transition: width 0.5s var(--ease);
}
.progress__label {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-dim);
  white-space: nowrap;
}

/* ============================================================= */
/*  STEPS                                                        */
/* ============================================================= */
.steps { position: relative; }

.step {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.step[hidden] { display: none; }

/* enter animation: fade + slight horizontal slide */
.step.is-active {
  animation: stepIn 0.45s var(--ease) both;
}
.step.is-active.is-back {
  animation: stepInBack 0.45s var(--ease) both;
}
@keyframes stepIn {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes stepInBack {
  from { opacity: 0; transform: translateX(-24px); }
  to   { opacity: 1; transform: translateX(0); }
}

.step__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.6rem;
  line-height: 1.18;
  letter-spacing: -0.01em;
}
.step__title--sm { font-size: 1.35rem; }

.step__subtitle {
  color: var(--text-dim);
  font-size: 1rem;
  margin-top: -4px;
}
.step__subtitle strong { color: var(--text); }

/* ============================================================= */
/*  CAROUSEL (Step 1)                                            */
/* ============================================================= */
.carousel { width: 100%; }
.carousel__viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5; /* capas 1080x1350 (retrato) — mostra inteira sem corte */
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-2);
  box-shadow: 0 18px 50px -20px rgba(0, 0, 0, 0.8);
}
.carousel__track {
  display: flex;
  height: 100%;
  transition: transform 0.6s var(--ease);
}
.carousel__slide {
  flex: 0 0 100%;
  height: 100%;
}
.carousel__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.carousel__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}
.carousel__dot {
  width: 7px;
  height: 7px;
  border-radius: 99px;
  border: none;
  padding: 0;
  background: rgba(255, 255, 255, 0.22);
  transition: width 0.3s var(--ease), background 0.3s var(--ease);
}
.carousel__dot.is-active {
  width: 22px;
  background: var(--color-accent);
  box-shadow: 0 0 8px var(--glow);
}

/* ---- Credibility row ---- */
.credibility {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: -2px;
}
.credibility__avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--accent);
  box-shadow: 0 0 12px var(--glow);
  background: var(--bg-2);
}
.credibility__text {
  font-size: 0.9rem;
  color: var(--text-dim);
}
.credibility__text strong { color: var(--text); }

/* ============================================================= */
/*  BUTTONS                                                      */
/* ============================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 22px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-white);
  transition: transform 0.18s var(--ease), box-shadow 0.25s var(--ease), filter 0.2s var(--ease), opacity 0.2s;
}
.btn--block { width: 100%; }

.btn--primary {
  background: var(--color-accent);
  box-shadow: 0 8px 24px -8px var(--glow), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.btn--primary:hover { transform: translateY(-1px) scale(1.01); filter: brightness(1.12); box-shadow: 0 12px 32px -8px var(--glow); }
.btn--primary:active { transform: translateY(0) scale(0.99); }

.btn--whatsapp {
  background: linear-gradient(135deg, var(--whatsapp), var(--whatsapp-dark));
  color: #fff;
  box-shadow: 0 8px 24px -8px rgba(37, 211, 102, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.btn--whatsapp:hover { transform: translateY(-1px) scale(1.01); box-shadow: 0 12px 32px -8px rgba(37, 211, 102, 0.6); }
.btn--whatsapp:active { transform: translateY(0) scale(0.99); }

.btn:disabled {
  opacity: 0.4;
  filter: grayscale(0.4);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ---- Back button ---- */
.btn-back {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 6px 4px;
  margin-bottom: -4px;
  transition: color 0.2s;
}
.btn-back:hover { color: var(--text); }

/* ============================================================= */
/*  OPTIONS GRID (Step 2)                                        */
/* ============================================================= */
.options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.option {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  min-height: 92px;
  padding: 14px;
  text-align: left;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--text);
  transition: border-color 0.2s var(--ease), background 0.2s, transform 0.15s var(--ease), box-shadow 0.25s;
}
.option:hover { background: var(--surface-hover); transform: translateY(-1px); }
.option:active { transform: scale(0.985); }

.option__icon {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
}
.option__icon svg { width: 20px; height: 20px; }

.option__label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.98rem;
}

.option__check {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  transition: all 0.2s var(--ease);
}
.option__check::after {
  content: "";
  position: absolute;
  inset: 0;
  background: center / 12px no-repeat;
  opacity: 0;
  transition: opacity 0.2s;
}

/* selected state */
.option.is-selected {
  border-color: var(--border-active);
  background: var(--accent-soft);
  box-shadow: 0 0 0 1px var(--border-active), 0 8px 26px -12px var(--glow);
}
.option.is-selected .option__check {
  border-color: var(--accent);
  background: var(--accent);
}
.option.is-selected .option__check::after {
  opacity: 1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
}

/* ---- Other inline field ---- */
.other-field {
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: stepIn 0.3s var(--ease) both;
}
.other-field[hidden] { display: none; }

/* ============================================================= */
/*  TEXT FIELDS                                                  */
/* ============================================================= */
.field {
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  font-size: 1rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-input);
  border-radius: var(--radius-sm);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color 0.2s, box-shadow 0.25s, background 0.2s;
}
.field::placeholder { color: var(--text-dim); }
.field:focus {
  outline: none;
  border-color: var(--border-active);
  background: var(--surface-hover);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* ============================================================= */
/*  RESPONSIVE — scale up from mobile-first 375px base           */
/* ============================================================= */
@media (min-width: 480px) {
  :root { --maxw: 460px; }
  .step__title { font-size: 1.8rem; }
}

@media (min-width: 720px) {
  body { align-items: center; padding-top: 40px; padding-bottom: 40px; }
  .form-shell {
    background: rgba(60, 59, 83, 0.35);
    border: 1px solid var(--border-soft);
    border-radius: 24px;
    padding: 28px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.9);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .carousel__track { transition: none; }
}
