/* ╔═══════════════════════════════════════════════════════════════════════╗
   ║  NOW Vida — Componentes canônicos (.nv-*)                             ║
   ║                                                                       ║
   ║  Importar SEMPRE depois de tokens.css:                                ║
   ║    <link rel="stylesheet" href="assets/css/tokens.css">              ║
   ║    <link rel="stylesheet" href="assets/css/components.css">          ║
   ║                                                                       ║
   ║  Mobile-first. CSS puro (sem frameworks). Usa SOMENTE variáveis de    ║
   ║  tokens.css — nenhuma cor/medida hard-coded fora de tokens.           ║
   ║                                                                       ║
   ║  Índice:                                                              ║
   ║   1. Layout      .nv-container .nv-section                            ║
   ║   2. Navegação   .nv-nav .nv-nav__links .nv-brand                     ║
   ║   3. Botões      .nv-btn (+ --primary --ghost --lg --block)           ║
   ║   4. Confiança   .nv-trustbar .nv-pill                                ║
   ║   5. Hero        .nv-hero                                             ║
   ║   6. Grid        .nv-grid (+ --2 --3 --4)                             ║
   ║   7. Cards       .nv-card (+ --feature --price) .nv-badge--soon       ║
   ║   8. Formulário  .nv-field .nv-label .nv-input .nv-select             ║
   ║                  .nv-checkcard (.is-selected)                         ║
   ║   9. Funil       .nv-progress .nv-progress__seg .nv-step (.is-active) ║
   ║  10. Rodapé      .nv-footer                                           ║
   ╚═══════════════════════════════════════════════════════════════════════╝ */


/* ════════════════════════════════════════════════════════════════════════
   1. LAYOUT — container + section
   ════════════════════════════════════════════════════════════════════════ */

.nv-container {
  width: 100%;
  max-width: var(--nv-container-max);
  margin-inline: auto;
  padding-inline: var(--nv-space-5);
}

.nv-section {
  padding-block: var(--nv-space-16);
}
.nv-section--tight { padding-block: var(--nv-space-10); }
.nv-section--alt   { background: var(--nv-surface); }
.nv-section--dark  {
  background: var(--nv-dark-section);
  color: var(--nv-on-dark);
}
.nv-section--dark h1,
.nv-section--dark h2,
.nv-section--dark h3 { color: var(--nv-on-dark); }

@media (min-width: 768px) {
  .nv-container { padding-inline: var(--nv-space-8); }
  .nv-section   { padding-block: var(--nv-space-24); }
}


/* ════════════════════════════════════════════════════════════════════════
   2. NAVEGAÇÃO — nav + links + wordmark
   ════════════════════════════════════════════════════════════════════════ */

.nv-nav {
  position: sticky;
  top: 0;
  z-index: var(--nv-z-nav);
  min-height: var(--nv-nav-height);
  display: flex;
  align-items: center;
  background: var(--nv-bg-translucent);
  -webkit-backdrop-filter: saturate(150%) blur(10px);
  backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--nv-line);
}
.nv-nav > .nv-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--nv-space-4);
}

.nv-nav__links {
  display: flex;
  align-items: center;
  gap: var(--nv-space-5);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nv-nav__links a {
  color: var(--nv-muted);
  font-size: var(--nv-text-sm);
  font-weight: var(--nv-weight-medium);
}
.nv-nav__links a:hover { color: var(--nv-primary); }

/* Em telas pequenas, escondemos os links de texto (deixando só marca + CTA).
   Quando houver menu mobile, basta adicionar .nv-nav__links--mobile. */
@media (max-width: 767px) {
  .nv-nav__links { display: none; }
}

/* ── Wordmark da marca ── */
.nv-brand {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  font-family: var(--nv-font-display);
  font-weight: var(--nv-weight-bold);
  font-size: var(--nv-text-xl);
  letter-spacing: var(--nv-tracking-tight);
  color: var(--nv-ink);
  text-decoration: none;
  line-height: 1;
}
.nv-brand:hover { color: var(--nv-ink); }
/* O nome vem de brand.js no .js-brand; o ponto de acento dá vitalidade. */
.nv-brand::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: var(--nv-radius-pill);
  background: var(--nv-accent);
  align-self: center;
  margin-left: 3px;
}


/* ════════════════════════════════════════════════════════════════════════
   3. BOTÕES — base + variantes (--primary --ghost) + modifiers (--lg --block)
   ════════════════════════════════════════════════════════════════════════ */

.nv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--nv-space-2);
  font-family: var(--nv-font-body);
  font-size: var(--nv-text-base);
  font-weight: var(--nv-weight-semibold);
  line-height: 1;
  padding: 14px 24px;
  border: 1.5px solid transparent;
  border-radius: var(--nv-radius-pill);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  transition: background var(--nv-transition-base),
              color var(--nv-transition-base),
              border-color var(--nv-transition-base),
              box-shadow var(--nv-transition-base),
              transform var(--nv-transition-fast);
}
.nv-btn:disabled,
.nv-btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* Variante primária — CTA principal (verde sólido) */
.nv-btn--primary {
  background: var(--nv-primary);
  color: #fff;
  box-shadow: var(--nv-shadow-btn);
}
.nv-btn--primary:hover:not(:disabled) {
  background: var(--nv-primary-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--nv-shadow-btn-hover);
}

/* Variante ghost — ação secundária / voltar (contorno discreto) */
.nv-btn--ghost {
  background: transparent;
  color: var(--nv-primary);
  border-color: var(--nv-line);
}
.nv-btn--ghost:hover:not(:disabled) {
  border-color: var(--nv-primary);
  background: var(--nv-primary-soft);
  color: var(--nv-primary-dark);
}

/* Modifier de tamanho grande (hero, CTA final do funil) */
.nv-btn--lg {
  font-size: var(--nv-text-lg);
  padding: 17px 34px;
  gap: var(--nv-space-3);
}

/* Modifier largura total (mobile, formulários) */
.nv-btn--block {
  width: 100%;
}


/* ════════════════════════════════════════════════════════════════════════
   4. BARRA DE CONFIANÇA — trustbar + pills
   ════════════════════════════════════════════════════════════════════════ */

.nv-trustbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--nv-space-3);
}
.nv-trustbar--center { justify-content: center; }

.nv-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--nv-space-2);
  font-size: var(--nv-text-sm);
  font-weight: var(--nv-weight-medium);
  color: var(--nv-primary-dark);
  background: var(--nv-primary-soft);
  border: 1px solid transparent;
  padding: 7px 14px;
  border-radius: var(--nv-radius-pill);
  white-space: nowrap;
}
/* Ícone/marcador opcional dentro da pill (ex: check, escudo) */
.nv-pill svg,
.nv-pill .nv-pill__dot {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.nv-pill .nv-pill__dot {
  border-radius: var(--nv-radius-pill);
  background: var(--nv-primary);
}
/* Pill neutra (sobre fundo claro alternado) */
.nv-pill--outline {
  background: var(--nv-bg);
  border-color: var(--nv-line);
  color: var(--nv-muted);
}


/* ════════════════════════════════════════════════════════════════════════
   5. HERO
   ════════════════════════════════════════════════════════════════════════ */

.nv-hero {
  padding-block: var(--nv-space-16) var(--nv-space-12);
  text-align: center;
}
.nv-hero__eyebrow {
  display: inline-block;
  font-size: var(--nv-text-sm);
  font-weight: var(--nv-weight-semibold);
  letter-spacing: var(--nv-tracking-caps);
  text-transform: uppercase;
  color: var(--nv-primary);
  margin-bottom: var(--nv-space-4);
}
.nv-hero__title {
  font-size: var(--nv-text-3xl);
  margin-bottom: var(--nv-space-5);
  max-width: 18ch;
  margin-inline: auto;
}
.nv-hero__subtitle {
  font-size: var(--nv-text-lg);
  color: var(--nv-muted);
  line-height: var(--nv-leading-relaxed);
  max-width: 56ch;
  margin-inline: auto var(--nv-space-8);
}
.nv-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--nv-space-3);
  justify-content: center;
  margin-bottom: var(--nv-space-8);
}

@media (min-width: 768px) {
  .nv-hero { padding-block: var(--nv-space-24) var(--nv-space-16); }
  .nv-hero__title { font-size: var(--nv-text-4xl); }
}


/* ════════════════════════════════════════════════════════════════════════
   6. GRID — colunas responsivas (mobile = 1 coluna sempre)
   ════════════════════════════════════════════════════════════════════════ */

.nv-grid {
  display: grid;
  gap: var(--nv-space-6);
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .nv-grid--2 { grid-template-columns: repeat(2, 1fr); }
  .nv-grid--3 { grid-template-columns: repeat(2, 1fr); }
  .nv-grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .nv-grid--3 { grid-template-columns: repeat(3, 1fr); }
  .nv-grid--4 { grid-template-columns: repeat(4, 1fr); }
}


/* ════════════════════════════════════════════════════════════════════════
   7. CARDS — base + feature + price + selo "em breve"
   ════════════════════════════════════════════════════════════════════════ */

.nv-card {
  background: var(--nv-bg);
  border: 1.5px solid var(--nv-line);
  border-radius: var(--nv-radius-lg);
  padding: var(--nv-space-6);
  transition: border-color var(--nv-transition-base),
              box-shadow var(--nv-transition-base),
              transform var(--nv-transition-base);
}
.nv-card h3 { font-size: var(--nv-text-xl); }
.nv-card p:last-child { margin-bottom: 0; }

/* Card de feature — destaque visual com ícone e leve elevação no hover */
.nv-card--feature {
  position: relative;
  border-radius: var(--nv-radius-xl);
  padding: var(--nv-space-8);
  box-shadow: var(--nv-shadow-sm);
}
.nv-card--feature:hover {
  border-color: var(--nv-primary-soft);
  box-shadow: var(--nv-shadow-md);
  transform: translateY(-2px);
}
.nv-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--nv-radius-md);
  background: var(--nv-primary-soft);
  color: var(--nv-primary);
  margin-bottom: var(--nv-space-5);
}
.nv-card__icon svg { width: 24px; height: 24px; }

/* Card de preço — coluna de plano (preços indicativos, "a partir de") */
.nv-card--price {
  display: flex;
  flex-direction: column;
  border-radius: var(--nv-radius-xl);
  padding: var(--nv-space-8);
  box-shadow: var(--nv-shadow-sm);
}
.nv-card--price.is-featured {
  border-color: var(--nv-primary);
  box-shadow: var(--nv-shadow-lg);
}
.nv-card__plan {
  font-size: var(--nv-text-sm);
  font-weight: var(--nv-weight-semibold);
  letter-spacing: var(--nv-tracking-wide);
  text-transform: uppercase;
  color: var(--nv-primary);
  margin-bottom: var(--nv-space-2);
}
.nv-card__price {
  font-family: var(--nv-font-display);
  font-size: var(--nv-text-3xl);
  font-weight: var(--nv-weight-bold);
  color: var(--nv-ink);
  line-height: 1;
}
.nv-card__price-note {
  font-size: var(--nv-text-sm);
  color: var(--nv-muted);
  margin-bottom: var(--nv-space-5);
}
.nv-card__features {
  list-style: none;
  margin: 0 0 var(--nv-space-6);
  padding: 0;
  display: grid;
  gap: var(--nv-space-3);
  flex: 1;
}
.nv-card__features li {
  display: flex;
  gap: var(--nv-space-2);
  font-size: var(--nv-text-sm);
  color: var(--nv-ink);
}
.nv-card__features li::before {
  content: "";
  flex-shrink: 0;
  width: 18px; height: 18px;
  margin-top: 1px;
  border-radius: var(--nv-radius-pill);
  background: var(--nv-primary-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230E7A5F' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 11px no-repeat;
}

/* Selo "em breve" — mede demanda em cards de produtos futuros */
.nv-badge--soon {
  display: inline-flex;
  align-items: center;
  gap: var(--nv-space-1);
  font-size: var(--nv-text-xs);
  font-weight: var(--nv-weight-semibold);
  letter-spacing: var(--nv-tracking-wide);
  text-transform: uppercase;
  color: var(--nv-accent-dark);
  background: rgba(242, 166, 90, 0.16);
  border: 1px solid rgba(242, 166, 90, 0.4);
  padding: 3px 10px;
  border-radius: var(--nv-radius-pill);
}


/* ════════════════════════════════════════════════════════════════════════
   8. FORMULÁRIO — field / label / input / select / checkcard
   ════════════════════════════════════════════════════════════════════════ */

.nv-field {
  display: flex;
  flex-direction: column;
  gap: var(--nv-space-2);
  margin-bottom: var(--nv-space-5);
  text-align: left;
}

.nv-label {
  font-size: var(--nv-text-sm);
  font-weight: var(--nv-weight-semibold);
  color: var(--nv-ink);
}
.nv-label__hint {
  font-weight: var(--nv-weight-regular);
  color: var(--nv-muted);
}

.nv-input,
.nv-select {
  width: 100%;
  font-family: var(--nv-font-body);
  font-size: var(--nv-text-base);
  color: var(--nv-ink);
  background: var(--nv-bg);
  border: 1.5px solid var(--nv-line);
  border-radius: var(--nv-radius-md);
  padding: 13px 16px;
  outline: none;
  transition: border-color var(--nv-transition-base),
              box-shadow var(--nv-transition-base);
}
.nv-input::placeholder { color: var(--nv-muted); }
.nv-input:focus,
.nv-select:focus {
  border-color: var(--nv-primary);
  box-shadow: var(--nv-focus-ring);
}
.nv-input:disabled,
.nv-select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: var(--nv-surface);
}

/* Estado de erro / validação */
.nv-input.is-invalid,
.nv-select.is-invalid {
  border-color: var(--nv-danger);
}
.nv-field__error {
  font-size: var(--nv-text-sm);
  color: var(--nv-danger);
}

/* Select com seta personalizada */
.nv-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235B6B64' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
  padding-right: 42px;
}

/* ── Checkcard — card selecionável (estilo MEDVI), uma opção por vez ou
   múltiplas. O input real fica oculto; o card inteiro é a área de clique. ── */
.nv-checkcard {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--nv-space-3);
  padding: var(--nv-space-4) var(--nv-space-5);
  border: 1.5px solid var(--nv-line);
  border-radius: var(--nv-radius-md);
  background: var(--nv-bg);
  cursor: pointer;
  text-align: left;
  transition: border-color var(--nv-transition-base),
              background var(--nv-transition-base),
              box-shadow var(--nv-transition-base);
}
.nv-checkcard:hover {
  border-color: var(--nv-primary);
  background: var(--nv-primary-soft);
}
/* O input nativo fica acessível mas visualmente escondido */
.nv-checkcard input {
  position: absolute;
  opacity: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
/* Indicador visual (bolinha/check) à esquerda */
.nv-checkcard__mark {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border: 2px solid var(--nv-line);
  border-radius: var(--nv-radius-pill);
  display: grid;
  place-items: center;
  transition: border-color var(--nv-transition-base),
              background var(--nv-transition-base);
}
.nv-checkcard__mark::after {
  content: "";
  width: 10px; height: 10px;
  border-radius: var(--nv-radius-pill);
  background: #fff;
  transform: scale(0);
  transition: transform var(--nv-transition-base);
}
.nv-checkcard__body { flex: 1; }
.nv-checkcard__title {
  font-weight: var(--nv-weight-semibold);
  color: var(--nv-ink);
  display: block;
}
.nv-checkcard__desc {
  font-size: var(--nv-text-sm);
  color: var(--nv-muted);
}

/* Estado selecionado — controlado por JS (funnel.js adiciona .is-selected)
   ou via :has() quando o input está marcado (fallback nativo moderno). */
.nv-checkcard.is-selected,
.nv-checkcard:has(input:checked) {
  border-color: var(--nv-primary);
  background: var(--nv-primary-soft);
  box-shadow: var(--nv-shadow-xs);
}
.nv-checkcard.is-selected .nv-checkcard__mark,
.nv-checkcard:has(input:checked) .nv-checkcard__mark {
  border-color: var(--nv-primary);
  background: var(--nv-primary);
}
.nv-checkcard.is-selected .nv-checkcard__mark::after,
.nv-checkcard:has(input:checked) .nv-checkcard__mark::after {
  transform: scale(1);
}
/* Foco por teclado no input reflete no card */
.nv-checkcard:has(input:focus-visible) {
  box-shadow: var(--nv-focus-ring);
}


/* ════════════════════════════════════════════════════════════════════════
   9. FUNIL — barra de progresso segmentada + passos
   ════════════════════════════════════════════════════════════════════════ */

/* Wrapper opcional para a coluna do funil (~560px centralizada) */
.nv-funnel {
  width: 100%;
  max-width: var(--nv-funnel-max);
  margin-inline: auto;
  padding-inline: var(--nv-space-5);
}

/* Barra de progresso — N segmentos lado a lado */
.nv-progress {
  display: flex;
  gap: var(--nv-space-2);
  margin-bottom: var(--nv-space-8);
}
.nv-progress__seg {
  flex: 1;
  height: 6px;
  border-radius: var(--nv-radius-pill);
  background: var(--nv-line);
  transition: background var(--nv-transition-base);
}
/* Segmentos já cumpridos / atual — JS adiciona .is-done */
.nv-progress__seg.is-done {
  background: var(--nv-primary);
}

/* Passo do funil — oculto por padrão, .is-active mostra (um por vez) */
.nv-step {
  display: none;
  animation: nv-step-in var(--nv-transition-slow);
}
.nv-step.is-active {
  display: block;
}
@keyframes nv-step-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.nv-step__title {
  font-size: var(--nv-text-2xl);
  margin-bottom: var(--nv-space-2);
}
.nv-step__lead {
  color: var(--nv-muted);
  font-size: var(--nv-text-base);
  margin-bottom: var(--nv-space-6);
}
/* Linha de navegação avançar/voltar do funil */
.nv-step__nav {
  display: flex;
  gap: var(--nv-space-3);
  margin-top: var(--nv-space-6);
}
.nv-step__nav .nv-btn--primary { flex: 1; }

/* Caixa de resultado factual (IMC, elegibilidade) — sem promessa */
.nv-result {
  border: 1.5px solid var(--nv-line);
  border-radius: var(--nv-radius-lg);
  padding: var(--nv-space-6);
  background: var(--nv-surface);
  margin-bottom: var(--nv-space-6);
}
.nv-result--ok    { border-color: var(--nv-primary); background: var(--nv-primary-soft); }
.nv-result--alt   { border-color: var(--nv-warn); background: rgba(199, 122, 30, 0.08); }


/* ════════════════════════════════════════════════════════════════════════
   10. RODAPÉ
   ════════════════════════════════════════════════════════════════════════ */

.nv-footer {
  background: var(--nv-dark-section);
  color: var(--nv-on-dark-muted);
  padding-block: var(--nv-space-16) var(--nv-space-10);
  font-size: var(--nv-text-sm);
  line-height: var(--nv-leading-relaxed);
}
.nv-footer a {
  color: var(--nv-on-dark);
}
.nv-footer a:hover { color: #fff; }
.nv-footer .nv-brand,
.nv-footer .nv-brand:hover { color: var(--nv-on-dark); }

.nv-footer__grid {
  display: grid;
  gap: var(--nv-space-8);
  grid-template-columns: 1fr;
  margin-bottom: var(--nv-space-10);
}
@media (min-width: 768px) {
  .nv-footer__grid {
    grid-template-columns: 1.4fr repeat(3, 1fr);
  }
}
.nv-footer__col h4 {
  color: var(--nv-on-dark);
  font-size: var(--nv-text-sm);
  letter-spacing: var(--nv-tracking-wide);
  text-transform: uppercase;
  margin-bottom: var(--nv-space-4);
}
.nv-footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--nv-space-2);
}

/* Aviso legal / compliance (transparência CFM) — texto pequeno e claro */
.nv-footer__legal {
  border-top: 1px solid rgba(245, 248, 246, 0.14);
  padding-top: var(--nv-space-6);
  font-size: var(--nv-text-xs);
  color: var(--nv-on-dark-muted);
}
.nv-footer__legal p { margin-bottom: var(--nv-space-3); }
.nv-footer__legal p:last-child { margin-bottom: 0; }
