/* ═══════════════════════════════════════════════════════════════
   COMPONENTES — peças reutilizáveis em qualquer seção.
   .btn / .card / .tag / .chips / .testimonial / .icon / .brand
   ═══════════════════════════════════════════════════════════════ */

/* ── Ícone ─────────────────────────────────────────────────── */
.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: none;
}

/* ── Botão ─────────────────────────────────────────────────── */
.btn {
  --btn-bg: var(--ink-900);
  --btn-fg: var(--paper);
  --btn-bg-hover: var(--ink-700);
  --btn-ring: rgba(11, 13, 16, 0.3);

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 0.75rem 1.25rem;
  border-radius: var(--r-full);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: var(--fs-sm);
  font-weight: 650;
  letter-spacing: -0.005em;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
  /* Nunca `transition: all` — só o que realmente muda. */
  transition:
    transform var(--dur-press) var(--ease-out),
    background-color var(--dur-fast) ease,
    box-shadow var(--dur-fast) ease,
    color var(--dur-fast) ease;
}

.btn .icon { width: 1.15em; height: 1.15em; }

/* Hover só em dispositivo com mouse de verdade: no touch, o hover
   dispara no toque e gera falso positivo. */
@media (hover: hover) and (pointer: fine) {
  .btn:hover {
    background: var(--btn-bg-hover);
    box-shadow: var(--shadow-md);
  }
}

/* Feedback de clique: a interface precisa responder ao toque. */
.btn:active { transform: scale(0.97); }

.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--btn-ring);
}

/* Variantes */
.btn--primary {
  --btn-bg: var(--accent);
  --btn-bg-hover: var(--accent-dark);
  --btn-ring: var(--accent-ring);
}

.btn--wa {
  --btn-bg: var(--wa);
  --btn-bg-hover: var(--wa-dark);
  --btn-ring: var(--wa-ring);
}

.btn--ghost {
  --btn-bg: var(--paper);
  --btn-fg: var(--ink-900);
  --btn-bg-hover: var(--gray-100);
  --btn-ring: rgba(11, 13, 16, 0.25);
  border: 1px solid var(--border);
}

.btn--outline {
  --btn-bg: transparent;
  --btn-fg: var(--paper);
  --btn-bg-hover: rgba(255, 255, 255, 0.1);
  --btn-ring: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: none;
}
.btn--outline:focus-visible {
  box-shadow: 0 0 0 3px var(--ink-900), 0 0 0 5px rgba(255, 255, 255, 0.6);
}

/* Tamanhos */
.btn--sm { padding: 0.5rem 0.9rem; font-size: var(--fs-xs); }
.btn--lg { padding: 0.95rem 1.6rem; font-size: var(--fs-base); }

/* ── Marca ─────────────────────────────────────────────────── */
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--r-md);
  background: var(--ink-900);
  color: var(--paper);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: transform var(--dur-press) var(--ease-out);
}
.brand:active .brand__mark { transform: scale(0.94); }

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  white-space: nowrap;
}
.brand__text strong {
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
}
.brand__text small {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

/* ── Eyebrow com pontinho ──────────────────────────────────── */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 0.4rem 0.85rem 0.4rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  background: var(--paper);
  box-shadow: var(--shadow-xs);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--text-muted);
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--wa);
  box-shadow: 0 0 0 3px rgba(14, 128, 116, 0.18);
  animation: pulse 2.4s var(--ease-in-out) infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(14, 128, 116, 0.18); }
  50%      { box-shadow: 0 0 0 6px rgba(14, 128, 116, 0.06); }
}

/* ── Tag ───────────────────────────────────────────────────── */
.tag {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  border-radius: var(--r-full);
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: var(--fs-xs);
  font-weight: 650;
  letter-spacing: 0.01em;
}

/* ── Chips (lista de elementos) ────────────────────────────── */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}
.chips li {
  padding: 0.3rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--gray-50);
  font-size: var(--fs-xs);
  color: var(--text-muted);
  line-height: 1.4;
}

/* ── Card ──────────────────────────────────────────────────── */
.card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-6);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  transition:
    transform var(--dur-base) var(--ease-out),
    box-shadow var(--dur-base) var(--ease-out),
    border-color var(--dur-base) ease;
}

@media (hover: hover) and (pointer: fine) {
  .card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--gray-300);
  }
}

.card__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: var(--sp-1);
}
.card__icon .icon { width: 22px; height: 22px; }

.card__title { font-size: var(--fs-lg); }

.card__text {
  color: var(--text-muted);
  font-size: var(--fs-sm);
}

.card__list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  margin-top: auto;
  padding-top: var(--sp-4);
  border-top: 1px solid var(--border-soft);
}
.card__list li {
  position: relative;
  padding-left: var(--sp-5);
  font-size: var(--fs-xs);
  color: var(--text-muted);
}
.card__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* Card de chamada para ação */
.card--cta {
  background: var(--ink-900);
  border-color: var(--ink-900);
  color: var(--text-invert);
  justify-content: center;
}
.card--cta .card__text { color: var(--gray-400); }
.card--cta .btn { align-self: flex-start; margin-top: var(--sp-2); }

/* ── Aviso flutuante (toast) ───────────────────────────────── */
/* Usado quando o e-mail é copiado. Transição e não @keyframes:
   se a pessoa clicar duas vezes seguidas, a transição se
   redireciona do ponto atual; keyframes reiniciariam do zero. */
.toast {
  position: fixed;
  left: 50%;
  bottom: clamp(1rem, 3vw, 1.75rem);
  z-index: 110; /* acima do botão flutuante */
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: min(26rem, calc(100vw - 2rem));
  padding: 0.8rem 1.1rem;
  border: 1px solid var(--ink-700);
  border-radius: var(--r-md);
  background: var(--ink-900);
  color: var(--text-invert);
  box-shadow: var(--shadow-xl);

  /* Estado escondido = estado de SAÍDA. Sai mais rápido do que
     entra: na saída o sistema já respondeu, não há o que esperar. */
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(10px) scale(0.97);
  pointer-events: none;
  transition:
    opacity var(--dur-press) var(--ease-out),
    transform var(--dur-press) var(--ease-out),
    visibility 0s linear var(--dur-press);
}

.toast.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0) scale(1);
  transition:
    opacity var(--dur-base) var(--ease-out),
    transform var(--dur-base) var(--ease-out),
    visibility 0s;
}

.toast strong {
  font-size: var(--fs-sm);
  font-weight: 650;
}
.toast span {
  font-size: var(--fs-xs);
  color: var(--gray-400);
  word-break: break-word;
}

/* ── Depoimento ────────────────────────────────────────────── */
.testimonial {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  padding: var(--sp-6);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}

.testimonial__quote {
  position: absolute;
  top: var(--sp-4);
  right: var(--sp-4);
  width: 44px;
  height: 44px;
  color: var(--gray-100);
}

.stars {
  display: flex;
  gap: 2px;
  color: #f5a524;
}
.stars .icon { width: 15px; height: 15px; }

.testimonial blockquote p {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  font-style: italic;
}

.testimonial__author {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-top: auto;
  padding-top: var(--sp-4);
  border-top: 1px solid var(--border-soft);
}
.testimonial__author > span:last-child {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}
.testimonial__author strong { font-size: var(--fs-sm); }
.testimonial__author small {
  font-size: var(--fs-xs);
  color: var(--gray-500);
}

.avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 50%;
  background: var(--gray-100);
  color: var(--gray-500);
  font-weight: 700;
  font-size: var(--fs-sm);
}
