/* Design system: limpo, leve e executivo. Branco e cinza, Inter self-hosted (sem CDN) com fonte do sistema de reserva, uma única cor de destaque. */
@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/ui/fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}

:root {
  --accent: #3b5b8c;
  --accent-contrast: #ffffff;
  --accent-soft: color-mix(in srgb, var(--accent) 8%, #ffffff);

  --bg: #ffffff;
  --surface: #f7f8fa;
  --surface-2: #eef0f3;
  --border: #e4e7eb;
  --border-strong: #cbd2d9;
  --text: #1f2933;
  --text-muted: #52606d;
  --text-faint: #7b8794;
  --danger: #b42318;
  --danger-soft: #fef3f2;
  --success: #067647;
  --success-soft: #ecfdf3;

  --radius: 10px;
  --radius-sm: 6px;
  --space: 16px;
  --shadow: 0 1px 2px rgba(31, 41, 51, 0.04);
  --font:
    "Inter Variable", system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  font-weight: 600;
}
h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}
h2 {
  font-size: 1.25rem;
}
h3 {
  font-size: 1.05rem;
}
p {
  margin: 0 0 1em;
}
a {
  color: var(--accent);
  text-underline-offset: 2px;
}
small,
.muted {
  color: var(--text-muted);
}
small {
  font-weight: 400;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

/* Estrutura */
.container {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
}
.narrow {
  max-width: 640px;
}
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space);
  min-height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}
.brand img {
  height: 28px;
  width: auto;
  display: block;
}
.lang {
  display: flex;
  gap: 8px;
  font-size: 0.875rem;
}
.lang a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}
.lang a[aria-current="true"] {
  color: var(--text);
  background: var(--surface-2);
}

.hero {
  padding: 56px 0 32px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.hero p.lead {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 60ch;
}
.hero-cta {
  margin: 24px 0 0;
}
.hero-cta .button {
  min-height: 44px;
  padding: 11px 24px;
}
html {
  scroll-behavior: smooth;
}
#start {
  scroll-margin-top: 16px;
}
.bullets {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: grid;
  gap: 12px;
}
.bullets li {
  padding-left: 28px;
  position: relative;
  color: var(--text);
}
.bullets li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.65em;
  width: 10px;
  height: 2px;
  background: var(--accent);
}
.section {
  padding: 40px 0 64px;
}
.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  color: var(--text-muted);
  font-size: 0.875rem;
}
.site-footer a {
  color: var(--text-muted);
}

/* Cartões e formulários */
label.inline {
  display: inline;
  font-weight: 400;
  margin: 0;
}
.todo {
  background: #fff4d6;
  padding: 2px 6px;
  border-radius: 4px;
}
.legal h2 {
  margin-top: 1.75em;
}
.legal ul {
  padding-left: 1.25em;
}
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
label {
  display: block;
  font-weight: 500;
  font-size: 0.9375rem;
  margin: 18px 0 6px;
}
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="search"],
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font: inherit;
}
textarea {
  min-height: 96px;
  resize: vertical;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-soft);
}
input[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px var(--danger-soft);
}
input[type="radio"],
input[type="checkbox"] {
  accent-color: var(--accent);
}
/* Opção única (canal): a linha toda é o alvo de toque */
.choice {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 12px;
  margin-top: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.choice:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.choice label {
  flex: 1;
  margin: 0;
  padding: 12px 0;
  cursor: pointer;
}
fieldset {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin: 18px 0 0;
  padding: 12px 16px;
}
legend {
  padding: 0 6px;
  font-size: 0.9375rem;
  font-weight: 500;
}
.row {
  display: flex;
  gap: 12px;
}
.row > * {
  flex: 1;
  min-width: 0;
}
.consent-note {
  margin: 12px 0 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--text-muted);
}
.consent-note a {
  color: inherit;
  text-decoration: underline;
}
.consent {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-top: 20px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.9375rem;
}
.consent input {
  margin-top: 4px;
}
.consent label {
  margin: 0;
  font-weight: 400;
  color: var(--text-muted);
}

/* Campos repetíveis (habilidades) e blocos de contato */
.multi .item {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.multi .item input {
  flex: 1;
  min-width: 0;
}
.multi .item button.remove {
  padding: 8px 14px;
  line-height: 1;
}
.multi > button.secondary {
  margin-top: 10px;
}
.fieldset-hint {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 0.875rem;
}
.contacts input {
  margin-bottom: 4px;
}

/* Mapa de interesses: chips de temas (o tamanho do texto indica a faixa de pessoas, nunca a contagem) */
.topics legend small {
  display: block;
  font-weight: 400;
  color: var(--text-muted);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.chips-loading {
  color: var(--text-faint);
  font-size: 0.875rem;
}
.chip {
  font: inherit;
  line-height: 1.2;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
}
.chip.band-1 {
  font-size: 0.875rem;
}
.chip.band-2 {
  font-size: 1rem;
}
.chip.band-3 {
  font-size: 1.125rem;
  font-weight: 500;
}
.chip.suggested {
  border-style: dashed;
  color: var(--text-muted);
}
.chip[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-contrast);
}
.chip:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
details.more {
  margin-top: 18px;
}
details.more > summary {
  cursor: pointer;
  font-weight: 500;
  color: var(--accent);
}

/* Atalho para o Telegram (botão + QR Code) acima do formulário */
.telegram-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: var(--accent-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.telegram-box h2 {
  margin: 0 0 6px;
  font-size: 1.125rem;
}
.telegram-box p {
  margin: 0 0 14px;
  color: var(--text-muted);
}
.telegram-qr {
  flex: none;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px;
}
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 0;
  color: var(--text-faint);
  font-size: 0.875rem;
}
.divider::before,
.divider::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--border);
}
/* No celular o QR não serve (a pessoa já está no aparelho): fica só o botão */
@media (max-width: 640px) {
  .telegram-qr {
    display: none;
  }
}

/* Botões */
button,
.button {
  display: inline-block;
  padding: 10px 20px;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--accent-contrast);
  font: inherit;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: filter 0.15s;
}
button:hover,
.button:hover {
  filter: brightness(0.94);
}
button:disabled {
  opacity: 0.6;
  cursor: wait;
}
button.secondary,
.button.secondary {
  background: var(--bg);
  color: var(--text);
  border-color: var(--border-strong);
}
button.danger {
  background: var(--danger);
  border-color: var(--danger);
}
button.link {
  background: none;
  border: 0;
  padding: 0;
  color: var(--accent);
  text-decoration: underline;
}
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 24px;
}

/* Mensagens */
.alert {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin: 16px 0 0;
  background: var(--surface);
}
.alert.error {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: #fecdca;
}
.alert.success {
  color: var(--success);
  background: var(--success-soft);
  border-color: #abefc6;
}

/* Campo-armadilha para robôs: invisível para pessoas */
.hp {
  position: absolute;
  left: -10000px;
  height: 0;
  overflow: hidden;
}

/* Tabelas e etiquetas (admin) */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}
th,
td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}
th {
  font-weight: 500;
  color: var(--text-muted);
  background: var(--surface);
}
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  background: var(--surface-2);
  color: var(--text-muted);
}
.badge.active {
  background: var(--success-soft);
  color: var(--success);
}
.badge.disabled {
  background: var(--danger-soft);
  color: var(--danger);
}
code,
.mono {
  font-family: var(--mono);
  font-size: 0.875em;
}

/* Shell do painel */
.admin-shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100vh;
}
.admin-nav {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 24px 16px;
}
.admin-nav a {
  display: block;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none;
}
.admin-nav a[aria-current="page"] {
  background: var(--surface-2);
  color: var(--text);
}
.admin-main {
  padding: 32px;
  max-width: 960px;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.stat {
  font-size: 1.75rem;
  font-weight: 600;
}

@media (max-width: 720px) {
  .row,
  .grid-2 {
    flex-direction: column;
    grid-template-columns: 1fr;
  }
  .admin-shell {
    grid-template-columns: 1fr;
  }
  .admin-nav {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .hero {
    padding: 36px 0 24px;
  }
  .admin-main {
    padding: 20px;
  }
  .hero-cta .button,
  #submit {
    width: 100%;
    text-align: center;
  }
}

/* Hero com o mecanismo: duas pessoas anônimas, cruzamento nos dois sentidos, aceite dos dois lados */
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
  align-items: center;
}
@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 56px;
  }
}
.mechanism {
  margin: 0;
  display: grid;
  justify-items: stretch;
}
.mech-person {
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.mech-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1px solid var(--border-strong);
  color: var(--accent);
  font-weight: 600;
  font-size: 1.125rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mech-person strong {
  display: block;
  font-size: 1rem;
}
.mech-role {
  display: block;
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 8px;
}
.mech-quote {
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
}
.mech-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 24px;
  min-height: 72px;
}
.mech-line {
  flex: none;
  align-self: stretch;
  width: 2px;
  margin: 6px 0;
  background: var(--accent);
  transform-origin: top;
}
.mech-note {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
}
.mech-note strong {
  display: block;
  color: var(--text);
  font-weight: 600;
}
.mech-caption {
  margin-top: 12px;
  text-align: center;
}
@media (prefers-reduced-motion: no-preference) {
  .mech-line {
    animation: mech-draw 0.9s ease-out 0.2s both;
  }
  .mech-note {
    animation: mech-fade 0.5s ease-out 0.9s both;
  }
}
@keyframes mech-draw {
  from {
    transform: scaleY(0);
  }
}
@keyframes mech-fade {
  from {
    opacity: 0;
  }
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  padding: 10px 14px;
  background: var(--accent);
  color: var(--accent-contrast);
  border-radius: var(--radius-sm);
  z-index: 10;
}
.skip-link:focus {
  top: 12px;
}

/* Seções da landing: como funciona, privacidade e perguntas frequentes */
.band {
  padding: 48px 0;
  border-bottom: 1px solid var(--border);
}
.band h2 {
  font-size: 1.5rem;
  margin-bottom: 20px;
}
.steps-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 24px;
}
@media (min-width: 760px) {
  .steps-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
  }
}
.steps-list li {
  border-top: 2px solid var(--accent);
  padding-top: 14px;
}
.steps-list .step-n {
  display: block;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 4px;
}
.steps-list strong {
  display: block;
  margin-bottom: 4px;
}
.steps-list span.step-text {
  color: var(--text-muted);
}
.privacy-list {
  margin-top: 0;
}
.faq details {
  border-bottom: 1px solid var(--border);
  padding: 4px 0;
}
.faq summary {
  cursor: pointer;
  font-weight: 500;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.faq details p {
  color: var(--text-muted);
  margin: 0 0 14px;
  max-width: 62ch;
}
.after-submit {
  margin: 10px 0 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}
.next-steps {
  margin: 12px 0 0;
  padding-left: 1.25em;
  color: var(--text-muted);
}
#done h3 {
  margin-top: 28px;
}

/* Telas de toque: alvos de pelo menos 44px nos chips e botões do formulário */
@media (pointer: coarse) {
  .lang a {
    padding: 12px 10px;
  }
  .chip {
    min-height: 44px;
    padding: 10px 16px;
  }
  #signup button,
  #signup .button {
    min-height: 44px;
  }
  .multi .item button.remove {
    min-width: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
