/* =====================================================================
   Washington Machado · Arquitetura
   style.css — formulário de captação (quiz), mobile-first, premium
   ===================================================================== */

/* Fonte principal (títulos): Glacial Indifference — via cdnfonts (não está no Google Fonts) */
@import url('https://fonts.cdnfonts.com/css/glacial-indifference-2');
/* Subtítulos / textos: Pathway Gothic One — Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Pathway+Gothic+One&display=swap');
/* Inter mantida como fallback de corpo */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&display=swap');


/* ----------------------------- TOKENS ----------------------------- */
:root {
  --color-bg: #0D0D0D;
  --color-surface: #141414;
  --color-border: #1F1F1F;
  --color-text-primary: #F5F0E8;
  --color-text-secondary: #9A8F80;
  --color-accent: #C8A97E;
  --color-accent-light: #E2C9A0;
  --color-cta-bg: #C8A97E;
  --color-cta-text: #0D0D0D;

  --font-display: "Glacial Indifference", "Inter", system-ui, sans-serif;
  --font-body: "Pathway Gothic One", "Inter", system-ui, -apple-system, sans-serif;

  --pad-x: 24px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ----------------------------- RESET ------------------------------ */
*,
*::before,
*::after { box-sizing: border-box; }

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

html, body {
  height: 100%;
  overscroll-behavior-y: none;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 400; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: none; padding: 0; }

/* ----------------------------- SHARED ----------------------------- */
.eyebrow {
  margin: 0 0 18px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: lowercase;
  color: var(--color-accent);
}

/* ----------------------------- CTA -------------------------------- */
.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
  padding: 17px 26px;
  background: var(--color-cta-bg);
  color: var(--color-cta-text);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 2px;
  cursor: pointer;
  animation: pulse-cta 2.2s ease-in-out infinite;
  transition: transform 0.4s var(--ease-out), background-color 0.4s var(--ease-out);
  will-change: transform;
}
.btn-cta:hover {
  transform: scale(1.03);
  background: var(--color-accent-light);
}
.btn-cta:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  animation: none;
  transform: none;
}
.btn-wpp-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.btn-arrow {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: transform 0.3s var(--ease-out);
}
.btn-cta:hover .btn-arrow { transform: translateX(3px); }

@keyframes pulse-cta {
  0%, 100% { box-shadow: 0 0 0 0 rgba(200, 169, 126, 0.5); }
  50%       { box-shadow: 0 0 0 12px rgba(200, 169, 126, 0); }
}

/* --------------------------- MARCA FIXA ---------------------------- */
.quiz-brand {
  position: fixed;
  top: 20px;
  left: 20px;
  height: 20px;
  width: auto;
  object-fit: contain;
  opacity: 0.2;
  z-index: 60;
  pointer-events: none;
  transition: opacity 0.4s var(--ease-out);
}
.quiz-brand.is-hidden {
  opacity: 0;
}

/* ------------------------- PROGRESS BAR ---------------------------- */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--color-border);
  z-index: 61;
  opacity: 0;
  transition: opacity 0.4s var(--ease-out);
}
.progress-bar.is-visible { opacity: 1; }
.progress-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-light));
  transition: width 0.5s var(--ease-out);
}

/* ----------------------------- SHELL ------------------------------- */
.form-shell {
  position: relative;
  width: 100%;
  height: 100svh;
  height: 100dvh;
  overflow: hidden;
}

.step {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 90px var(--pad-x) 48px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(18px);
  transition: opacity 0.55s var(--ease-out), transform 0.55s var(--ease-out), visibility 0s linear 0.55s;
  overflow-y: auto;
}
.step.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition: opacity 0.55s var(--ease-out), transform 0.55s var(--ease-out), visibility 0s linear 0s;
  z-index: 2;
}

/* --------------------------- CAPA / QUIZ ---------------------------- */
.step-cover { padding: 0; text-align: center; }

.cover-carousel {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.cover-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1);
  transition: opacity 1.8s ease;
}
.cover-slide.is-active {
  opacity: 1;
  animation: kenburns 9s var(--ease-out) forwards;
}
@keyframes kenburns {
  from { transform: scale(1); }
  to   { transform: scale(1.08); }
}

.cover-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    to bottom,
    rgba(13, 13, 13, 0.55) 0%,
    rgba(13, 13, 13, 0.78) 65%,
    rgba(13, 13, 13, 0.96) 100%
  );
}

.cover-content {
  max-width: 560px;
  width: 100%;
  padding: 0 var(--pad-x);
}

.cover-logo {
  width: clamp(140px, 20vw, 220px);
  height: auto;
  margin: 0 auto 24px;
  opacity: 0;
  animation: fade-up 0.9s var(--ease-out) 0.1s forwards;
}
.cover-content .eyebrow {
  opacity: 0;
  animation: fade-up 0.9s var(--ease-out) 0.2s forwards;
}

.cover-title {
  font-family: var(--font-display);
  font-size: clamp(38px, 8vw, 68px);
  line-height: 1.08;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--color-text-primary);
  margin-bottom: 20px;
  opacity: 0;
  animation: fade-up 0.9s var(--ease-out) 0.35s forwards;
}

.cover-subtitle {
  max-width: 440px;
  margin: 0 auto 34px;
  font-weight: 300;
  font-size: clamp(15px, 2vw, 18px);
  color: var(--color-text-secondary);
  opacity: 0;
  animation: fade-up 0.9s var(--ease-out) 0.55s forwards;
}

.cover-cta {
  opacity: 0;
  animation: fade-up 0.9s var(--ease-out) 0.75s forwards,
             pulse-cta 2.2s ease-in-out 1.6s infinite;
}

.cover-note {
  margin: 18px 0 0;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: lowercase;
  color: var(--color-text-secondary);
  opacity: 0;
  animation: fade-up 0.9s var(--ease-out) 0.9s forwards;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --------------------------- STEP INNER ----------------------------- */
.step-inner {
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 28px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: color 0.3s var(--ease-out);
}
.btn-back svg { width: 16px; height: 16px; }
.btn-back:hover { color: var(--color-accent); }

.step-count {
  margin: 0 0 10px;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.step-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 6vw, 42px);
  line-height: 1.15;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--color-text-primary);
  margin-bottom: 34px;
}

/* --------------------------- OPTION CARDS ---------------------------- */
.options-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.option-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 20px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: var(--color-surface);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.3s var(--ease-out), transform 0.3s var(--ease-out), background-color 0.3s var(--ease-out);
}
.option-card:hover {
  border-color: var(--color-accent);
  transform: translateX(4px);
}
.option-card.is-selected {
  border-color: var(--color-accent);
  background: rgba(200, 169, 126, 0.08);
}
.option-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(200, 169, 126, 0.1);
  color: var(--color-accent);
}
.option-icon svg { width: 22px; height: 22px; }
.option-label {
  font-size: 16px;
  letter-spacing: 0.02em;
  color: var(--color-text-primary);
}

/* ------------------------------ FIELD -------------------------------- */
.field { margin-bottom: 30px; }
.field-input {
  width: 100%;
  padding: 14px 2px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-primary);
  font-family: var(--font-display);
  font-size: clamp(22px, 5vw, 30px);
  letter-spacing: 0.01em;
  outline: none;
  transition: border-color 0.3s var(--ease-out);
}
.field-input::placeholder { color: var(--color-text-secondary); opacity: 0.5; }
.field-underline {
  display: block;
  height: 2px;
  width: 0;
  margin-top: -1px;
  background: var(--color-accent);
  transition: width 0.4s var(--ease-out);
}
.field-input:focus ~ .field-underline { width: 100%; }

/* ---------------------------- CONCLUSÃO ------------------------------ */
.step-conclusion { text-align: center; padding-bottom: 130px; }

.step-conclusion .step-title { margin-bottom: 12px; }

.conclusion-subtitle {
  max-width: 420px;
  margin: 0 auto 36px;
  font-weight: 300;
  font-size: clamp(14px, 2vw, 16px);
  color: var(--color-text-secondary);
}

.summary-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 22px;
  text-align: left;
}
.summary-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: var(--color-surface);
  opacity: 0;
  transform: translateY(10px);
  animation: fade-up 0.6s var(--ease-out) forwards;
}
.summary-list li:nth-child(1) { animation-delay: 0.1s; }
.summary-list li:nth-child(2) { animation-delay: 0.22s; }
.summary-list li:nth-child(3) { animation-delay: 0.34s; }
.summary-label {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  flex-shrink: 0;
}
.summary-value {
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: 0.01em;
  color: var(--color-text-primary);
  text-align: right;
  overflow-wrap: anywhere;
}

.btn-edit {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  color: var(--color-text-secondary);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  transition: color 0.3s var(--ease-out);
}
.btn-edit:hover { color: var(--color-accent); }

.conclusion-spacer { height: 8px; }

/* Botão flutuante — fixo na base da tela na etapa de conclusão */
.btn-whatsapp-final {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 70;
  width: calc(100% - 48px);
  max-width: 420px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s var(--ease-out);
}
.btn-whatsapp-final.is-visible {
  opacity: 1;
  pointer-events: auto;
  transition-delay: 0.5s;
}

/* --------------------------- CURSOR ------------------------------- */
.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-accent);
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.3s var(--ease-out), height 0.3s var(--ease-out),
              background-color 0.3s var(--ease-out);
  mix-blend-mode: difference;
  opacity: 0;
}
.cursor-dot.active { opacity: 1; }
.cursor-dot.grow {
  width: 32px;
  height: 32px;
  background: var(--color-accent-light);
}

/* =====================================================================
   MEDIA QUERIES — mobile-first (min-width)
   ===================================================================== */

@media (min-width: 720px) {
  :root { --pad-x: 32px; }
  .options-grid { flex-direction: row; }
  .option-card { flex-direction: column; text-align: center; padding: 32px 22px; flex: 1; }
  .option-label { font-size: 15px; }
}

@media (min-width: 920px) {
  .step-inner { max-width: 560px; }
}

/* Telas muito pequenas: CTA não estoura */
@media (max-width: 380px) {
  .btn-cta { font-size: 12px; padding: 15px 18px; }
}

/* Cursor só no desktop com ponteiro fino */
@media (hover: none), (pointer: coarse) {
  .cursor-dot { display: none; }
}

/* Acessibilidade: respeitar quem reduz movimento */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
