/* ── Reset & tokens (mesmo padrão da landing) ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #fafafa;
  --bg-elevated: #ffffff;
  --bg-subtle: #f4f4f5;
  --border: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(0, 0, 0, 0.14);
  --text: #18181b;
  --text-muted: #71717a;
  --text-dim: #a1a1aa;
  --accent: #2563eb;
  --accent-green: #16a34a;
  --accent-whatsapp: #25d366;
  --accent-offer: #059669;
  --brand-navy: #116e9f;
  --brand-orange: #fbae29;
  --danger: #dc2626;
  --radius: 20px;
  --radius-sm: 12px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.04);
  --max-width: 820px;
  --header-height: 72px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

img { display: block; }

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  background: none;
  border: none;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 1100;
  padding: 0.65rem 1.1rem;
  border-radius: 10px;
  background: var(--text);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-150%);
  transition: transform 0.3s var(--ease);
}

.skip-link:focus { transform: translateY(0); }

/* ── Header ── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: var(--header-height);
  padding: 0 clamp(1.25rem, 4vw, 3rem);
  background: rgba(250, 250, 250, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.header__brand {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  text-decoration: none;
  color: inherit;
}

.header__logo-mark {
  display: flex;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.header__logo-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.header__logo-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.header__logo-name {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.header__logo-tag {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.header__status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header__status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 8px rgba(22, 163, 74, 0.35);
  animation: pulse 2.4s var(--ease) infinite;
}

.header__status-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.85); }
}

/* ── Barra de progresso ── */
.progress {
  position: sticky;
  top: var(--header-height);
  z-index: 90;
  background: rgba(250, 250, 250, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.progress__inner {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.7rem clamp(1.25rem, 4vw, 2rem);
}

.progress__track {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: #e7e7ea;
  overflow: hidden;
}

.progress__fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand-navy), var(--accent-offer));
  transition: width 0.45s var(--ease);
}

.progress__label {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.progress__label strong {
  color: var(--text);
  font-weight: 700;
}

.progress__save {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent-offer);
  background: rgba(5, 150, 105, 0.08);
  border: 1px solid rgba(5, 150, 105, 0.16);
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  white-space: nowrap;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}

.progress__save i { font-size: 0.7rem; }

.progress__save.is-saved {
  color: var(--accent-offer);
}

/* ── Página ── */
.page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 3.5rem) clamp(1.25rem, 4vw, 2rem) clamp(3rem, 6vw, 5rem);
}

.intro {
  margin-bottom: clamp(2rem, 4vw, 2.75rem);
}

.intro__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand-orange);
  margin-bottom: 1rem;
}

.intro__eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-orange);
  box-shadow: 0 0 8px rgba(251, 174, 41, 0.5);
  animation: pulse 2.4s var(--ease) infinite;
}

.intro__title {
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.intro__text {
  font-size: clamp(0.98rem, 2vw, 1.05rem);
  color: var(--text-muted);
  max-width: 60ch;
  margin-bottom: 1.5rem;
}

.intro__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
  list-style: none;
}

.intro__meta li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.intro__meta i {
  color: var(--brand-navy);
  font-size: 0.8rem;
}

/* Banner de fechamento, abaixo dos botões */
.page__banner {
  width: 100%;
  height: auto;
  margin-top: clamp(2rem, 5vw, 3rem);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}



/* ── Cards de seção ── */
.form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(1.25rem, 3vw, 1.75rem);
  transition: border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.card:focus-within {
  border-color: rgba(37, 99, 235, 0.28);
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.07);
}

.card__head {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-bottom: 1.35rem;
}

.card__num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 10px;
  background: rgba(17, 110, 159, 0.07);
  color: var(--brand-navy);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.card__title {
  font-size: 1.08rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.card__hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* ── Campos ── */
.grid {
  display: grid;
  gap: 1rem;
}

.grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

/* espaçamento apenas entre blocos soltos do card.
   Dentro do grid quem cuida do espaço é o gap, senão as colunas saem desalinhadas. */
.card > .field + .field,
.card > .grid + .field,
.card > .field + .grid,
.card > .grid + .grid,
.card > .checks + .field {
  margin-top: 1rem;
}

.field--full {
  grid-column: 1 / -1;
}

.field label,
.field__label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 24px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text);
}

.field label i,
.field__label i {
  color: var(--text-dim);
  font-size: 0.85rem;
}

.req {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-orange);
  background: rgba(251, 174, 41, 0.14);
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
}

input[type="text"],
input[type="tel"],
input[type="email"],
input[type="url"],
textarea {
  width: 100%;
  font: inherit;
  font-size: 0.94rem;
  color: var(--text);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.85rem;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

textarea {
  resize: vertical;
  min-height: 72px;
  line-height: 1.55;
}

input::placeholder,
textarea::placeholder {
  color: var(--text-dim);
}

input:hover,
textarea:hover {
  border-color: var(--border-hover);
}

input:focus,
textarea:focus {
  outline: none;
  background: var(--bg-elevated);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

input.is-invalid,
textarea.is-invalid {
  border-color: var(--danger);
  background: rgba(220, 38, 38, 0.03);
}

.field__error {
  font-size: 0.76rem;
  color: var(--danger);
  display: none;
}

.field__error.is-visible {
  display: block;
}

/* ── Escolhas (radio) e checkboxes ── */
.choices {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.choice {
  position: relative;
  cursor: pointer;
}

.choice input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.choice span {
  display: inline-flex;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.5rem 0.95rem;
  transition: all 0.25s var(--ease);
}

.choice:hover span {
  border-color: var(--border-hover);
  color: var(--text);
}

.choice input:checked + span {
  background: rgba(28, 78, 110, 0.08);
  border-color: rgba(28, 78, 110, 0.35);
  color: var(--brand-navy);
  font-weight: 650;
}

.choice input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.checks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.6rem;
}

.check {
  position: relative;
  cursor: pointer;
}

.check input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.check span {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  transition: all 0.25s var(--ease);
}

.check span::before {
  content: "";
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  border-radius: 5px;
  border: 1.5px solid #cfcfd4;
  background: var(--bg-elevated);
  transition: all 0.25s var(--ease);
}

.check:hover span {
  border-color: var(--border-hover);
  color: var(--text);
}

.check input:checked + span {
  background: rgba(5, 150, 105, 0.06);
  border-color: rgba(5, 150, 105, 0.3);
  color: var(--text);
  font-weight: 600;
}

.check input:checked + span::before {
  background: var(--accent-offer);
  border-color: var(--accent-offer);
  box-shadow: inset 0 0 0 2px #fff;
}

.check input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* campos condicionais */
[data-show-when] {
  display: none;
}

[data-show-when].is-visible {
  display: flex;
  animation: fadeIn 0.35s var(--ease) both;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Nota final ── */
.note {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.86rem;
  line-height: 1.6;
  color: var(--text-muted);
  background: rgba(28, 78, 110, 0.04);
  border: 1px dashed rgba(28, 78, 110, 0.2);
  border-radius: var(--radius-sm);
  padding: 1rem 1.15rem;
}

.note i {
  color: var(--brand-navy);
  margin-top: 0.15rem;
}

.note strong {
  color: var(--text);
  display: block;
  margin-bottom: 0.15rem;
}

/* ── Ações ── */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-size: 0.92rem;
  font-weight: 650;
  text-decoration: none;
  border-radius: 14px;
  padding: 0.85rem 1.35rem;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease);
}

.btn--primary {
  flex: 1 1 260px;
  background: linear-gradient(135deg, #1c4e6e 0%, #0f3550 100%);
  color: #fff;
  box-shadow: 0 8px 24px rgba(28, 78, 110, 0.25);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(28, 78, 110, 0.32);
}

.btn--primary[disabled] {
  opacity: 0.7;
  cursor: progress;
  transform: none;
}

.btn--whatsapp {
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  color: #fff;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.28);
}

.btn--whatsapp:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(37, 211, 102, 0.38);
}

.btn--ghost {
  color: var(--text-muted);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}

.btn--ghost:hover {
  color: var(--text);
  border-color: var(--border-hover);
}

.actions__hint {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 0.9rem;
}

.actions__hint.is-error {
  color: var(--danger);
  font-weight: 600;
}

.actions__hint.is-success {
  color: var(--accent-offer);
  font-weight: 600;
}

/* ── Rodapé ── */
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.75rem clamp(1.25rem, 4vw, 2rem);
  border-top: 1px solid var(--border);
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.footer__logo {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.footer__meta {
  font-size: 0.78rem;
  color: var(--text-dim);
}

/* ── Responsivo ── */
@media (max-width: 640px) {
  .grid--2 {
    grid-template-columns: 1fr;
  }

  .header__status-label {
    display: none;
  }

  .progress__label {
    display: none;
  }

  .checks {
    grid-template-columns: 1fr 1fr;
  }

  .btn {
    flex: 1 1 100%;
  }
}

@media (max-width: 380px) {
  .checks {
    grid-template-columns: 1fr;
  }
}

/* ── Movimento reduzido ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html { scroll-behavior: auto; }
}
