/* =====================================================================
   PUTZ! MENTORIA — FORMULÁRIO DE PREPARAÇÃO DE REUNIÃO
   Identidade visual: preto, branco e amarelo (#FFD400)
   Estilo: minimalista, muito espaço em branco, cantos arredondados,
   sombras suaves, transições suaves entre telas.
   ===================================================================== */

/* ---------------------------------------------------------------------
   1. TOKENS (variáveis de design)
   --------------------------------------------------------------------- */
:root {
  /* Cores */
  --color-black: #0D0D0D;
  --color-black-soft: #1A1A1A;
  --color-white: #FFFFFF;
  --color-yellow: #FFD400;
  --color-yellow-dark: #E6BF00;
  --color-bg: #FAFAF8;
  --color-surface: #FFFFFF;
  --color-border: #E7E6E1;
  --color-text: #0D0D0D;
  --color-text-muted: #6B6B68;
  --color-danger: #D6402C;

  /* Tipografia */
  --font-display: 'Space Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;

  /* Espaçamento */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 40px;
  --space-5: 64px;

  /* Formas */
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --radius-pill: 999px;

  /* Sombras suaves */
  --shadow-sm: 0 2px 8px rgba(13, 13, 13, 0.05);
  --shadow-md: 0 12px 32px rgba(13, 13, 13, 0.08);
  --shadow-yellow: 0 10px 24px rgba(255, 212, 0, 0.35);

  /* Transições */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --transition-fast: 180ms var(--ease);
  --transition-med: 420ms var(--ease);
}

/* ---------------------------------------------------------------------
   2. RESET BÁSICO
   --------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: var(--font-display); margin: 0; }
p { margin: 0; }
button { font-family: inherit; }

/* Foco visível para acessibilidade */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--color-yellow-dark);
  outline-offset: 2px;
}

/* Respeita preferência por menos animação */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---------------------------------------------------------------------
   3. LAYOUT GERAL
   --------------------------------------------------------------------- */
.app-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.stage {
  flex: 1;
  display: flex;
  align-items: stretch;
  justify-content: center;
  position: relative;
}

/* ---------------------------------------------------------------------
   4. CABEÇALHO / BARRA DE PROGRESSO
   --------------------------------------------------------------------- */
.topbar {
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar__inner {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--space-2) var(--space-3);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.logo-slot {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
}

.logo-fallback {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.02em;
  color: var(--color-black);
}

.logo-fallback__dot { color: var(--color-yellow-dark); }

.progress-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.progress-track {
  position: relative;
  flex: 1;
  height: 8px;
  background: var(--color-border);
  border-radius: var(--radius-pill);
  overflow: visible;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--color-yellow);
  border-radius: var(--radius-pill);
  transition: width var(--transition-med);
}

/* Marcador em formato de foguete que acompanha o preenchimento —
   elemento de assinatura visual, ligado ao tema "reunião decola" */
.progress-marker {
  position: absolute;
  top: 50%;
  left: 0%;
  transform: translate(-50%, -50%);
  font-size: 16px;
  transition: left var(--transition-med);
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.25));
}

.progress-label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-muted);
  white-space: nowrap;
}

/* ---------------------------------------------------------------------
   5. TELAS (SCREENS) — cada bloco ocupa a tela inteira
   --------------------------------------------------------------------- */
.mentoria-form {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  position: relative;
}

.screen {
  display: none;
  min-height: calc(100vh - 72px);
  min-height: calc(100dvh - 72px);
  padding: var(--space-4) var(--space-3) var(--space-4);
  align-items: center;
}

.screen.is-active {
  display: flex;
  animation: screen-in var(--transition-med);
}

@keyframes screen-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.screen__inner {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.screen__inner--intro {
  text-align: left;
  max-width: 560px;
  margin: 0 auto;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-yellow-dark);
  background: rgba(255, 212, 0, 0.12);
  display: inline-block;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  width: fit-content;
}

.screen__title {
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--color-black);
}

.screen__subtitle {
  font-size: 16px;
  color: var(--color-text-muted);
  max-width: 52ch;
}

.screen__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  font-size: 17px;
  color: var(--color-black-soft);
  max-width: 56ch;
}

.screen__body .lead-question {
  font-weight: 600;
  color: var(--color-black);
  font-size: 19px;
  margin-top: var(--space-1);
}

.emoji { display: inline-block; }

/* ---------------------------------------------------------------------
   6. CAMPOS DE FORMULÁRIO
   --------------------------------------------------------------------- */
.fields {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: none;
  padding: 0;
  margin: 0;
}

.field__label {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-black);
  padding: 0;
}

.field__input {
  width: 100%;
  padding: 16px 18px;
  font-size: 16px;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.field__input::placeholder { color: #A9A9A5; }

.field__input:hover { border-color: #CFCFC8; }

.field__input:focus {
  outline: none;
  border-color: var(--color-yellow-dark);
  box-shadow: 0 0 0 4px rgba(255, 212, 0, 0.22);
}

.field__input--textarea { resize: vertical; min-height: 110px; }

/* Estado de erro */
.field.has-error .field__input {
  border-color: var(--color-danger);
}

.field__error {
  font-size: 13px;
  color: var(--color-danger);
  min-height: 16px;
  display: block;
}

.submit-error {
  margin-top: var(--space-2);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-danger);
  text-align: center;
}

/* Estado válido — leve indicação positiva */
.field.is-valid .field__input {
  border-color: #B7D9B0;
}

/* ---------------------------------------------------------------------
   7. DROPDOWNS (SELECT CUSTOMIZADO)
   --------------------------------------------------------------------- */
.select-wrap { position: relative; }

.field__select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 100%;
  padding-right: 46px;
  cursor: pointer;
  color: var(--color-text);
}

/* Enquanto a opção de placeholder (value="") estiver selecionada,
   o texto aparece esmaecido — igual a um campo vazio. */
.field__select:required:invalid { color: #A9A9A5; }
.field__select option { color: var(--color-text); }
.field__select option[value=""] { color: #A9A9A5; }

/* Seta customizada do dropdown, desenhada em CSS puro */
.select-wrap::after {
  content: "";
  position: absolute;
  right: 20px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--color-black);
  border-bottom: 2px solid var(--color-black);
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
}

/* Utilitário: esconde visualmente mantendo acessível a leitores de tela */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Bloco condicional — entra com uma transição suave */
.field--conditional {
  overflow: hidden;
  animation: reveal var(--transition-med);
  padding-left: var(--space-2);
  border-left: 3px solid var(--color-yellow);
}

.field--conditional[hidden] { display: none; }

@keyframes reveal {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------------------------------------------------------------------
   8. BOTÕES
   --------------------------------------------------------------------- */
.btn {
  --btn-height: 56px;
  height: var(--btn-height);
  padding: 0 32px;
  border: none;
  border-radius: var(--radius-pill);
  font-size: 16px;
  font-weight: 600;
  font-family: var(--font-display);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
  white-space: nowrap;
}

.btn:active { transform: scale(0.97); }

.btn--primary {
  background: var(--color-black);
  color: var(--color-white);
  box-shadow: var(--shadow-sm);
}

.btn--primary:hover {
  background: var(--color-yellow);
  color: var(--color-black);
  box-shadow: var(--shadow-yellow);
}

.btn--ghost {
  background: transparent;
  color: var(--color-text-muted);
  padding: 0 20px;
}

.btn--ghost:hover { color: var(--color-black); }

.btn--large {
  width: 100%;
  height: 64px;
  font-size: 17px;
}

.btn__arrow { transition: transform var(--transition-fast); }
.btn:hover .btn__arrow { transform: translateX(3px); }

.screen__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.screen__nav--single { justify-content: stretch; }

/* Estado de envio em progresso */
.btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* ---------------------------------------------------------------------
   9. RESPONSIVIDADE — MOBILE FIRST REFINEMENTS
   --------------------------------------------------------------------- */
@media (max-width: 600px) {
  .topbar__inner { padding: var(--space-1) var(--space-2); gap: var(--space-2); }
  .screen { padding: var(--space-3) var(--space-2) var(--space-3); }
  .screen__nav { flex-direction: column-reverse; }
  .screen__nav .btn { width: 100%; }
  .screen__nav--single .btn { width: 100%; }
  .btn--ghost { order: 2; }
}

@media (min-width: 601px) {
  .screen { justify-content: center; }
}

/* Telas muito baixas (celular em paisagem) — evita corte de conteúdo */
@media (max-height: 480px) {
  .screen { min-height: auto; padding-top: var(--space-3); padding-bottom: var(--space-3); }
}
