/* Clubin: site estático. Cores, fonte e raio: site/theme.css, gerado de brand/theme.json (brand/make_theme.py);
   aqui só se usam as variáveis. Formas: docs/design.md. */
@import url("/theme.css");

@font-face {
  font-family: "Nunito Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/NunitoSans-400.ttf") format("truetype");
}
@font-face {
  font-family: "Nunito Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/NunitoSans-600.ttf") format("truetype");
}
@font-face {
  font-family: "Nunito Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/NunitoSans-700.ttf") format("truetype");
}

:root {
  color-scheme: dark;
  --radius-lg: 10px;
}

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

[hidden] {
  display: none !important;
}

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.4 "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent-text);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

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

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 48px 20px 32px;
}

.card {
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}
.brand svg {
  width: 44px;
  height: 44px;
  fill: #fff;
  flex: none;
}
.brand h1 {
  margin: 0;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1;
}
.brand a {
  color: inherit;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.brand a:hover {
  text-decoration: none;
}

h2 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
}

.lead {
  margin: 0;
  font-size: 17px;
  line-height: 1.45;
  max-width: 440px;
}
.sub {
  margin: 8px auto 0;
  color: var(--muted);
  font-size: 15px;
  max-width: 440px;
}

/* ---- botões de download ---- */

.downloads {
  width: 100%;
  margin-top: 32px;
}
/* Nas páginas auxiliares o bloco vem logo depois do título/dica/código. */
h2 + .downloads,
.sub + .downloads,
.code + .downloads {
  margin-top: 20px;
}
.buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  transition: background-color 120ms ease, border-color 120ms ease;
}
.btn:hover {
  text-decoration: none;
  background: var(--panel3);
}
.btn svg {
  width: 20px;
  height: 20px;
  flex: none;
  fill: currentColor;
}
.btn .meta {
  color: var(--muted);
  font-weight: 400;
  font-size: 13px;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  border-color: transparent;
  color: var(--on-accent);
}
.btn-primary:hover {
  background: var(--accent-hover);
}
.btn-primary .meta {
  color: var(--on-accent);
}

.btn.is-disabled,
.btn[aria-disabled="true"] {
  cursor: default;
  pointer-events: none;
  background: var(--panel);
  border-color: var(--line);
  color: var(--muted);
}
.btn.is-disabled .meta,
.btn[aria-disabled="true"] .meta {
  color: var(--muted);
}

.buttons .btn {
  flex: 1 1 150px;
  justify-content: center;
}
@media (max-width: 520px) {
  .buttons {
    flex-direction: column;
  }
  .buttons .btn {
    flex: none;
    width: 100%;
  }
}

.note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.note:empty {
  display: none;
}
.note .cmd {
  display: block;
  margin-top: 4px;
}
.note code {
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--panel);
  color: var(--text);
  font: 12px/1.5 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

/* ---- páginas auxiliares (convite, verificação) ---- */

.state {
  width: 100%;
}
.state[hidden] {
  display: none;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 600;
}
.status.is-ok {
  color: var(--ok);
}
.status.is-error {
  color: var(--danger);
}
.status svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
  flex: none;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%; /* o único círculo permitido: ponto de status */
  background: var(--accent);
  animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse {
  0%,
  100% {
    opacity: 0.35;
  }
  50% {
    opacity: 1;
  }
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.divider {
  width: 100%;
  height: 1px;
  background: var(--line);
  margin: 32px 0 24px;
}

.code {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 8px 10px 8px 14px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line);
  font: 600 15px/1 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  letter-spacing: 0.02em;
  color: var(--text);
}
.code button {
  font: 600 13px/1 "Nunito Sans", system-ui, sans-serif;
  color: var(--accent-text);
  background: none;
  border: 0;
  padding: 6px 8px;
  border-radius: var(--radius);
  cursor: pointer;
}
.code button:hover {
  background: var(--hover);
}

.steps {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
}

/* ---- formulários (criar conta, ativar; docs/site.md "Cadastro") ---- */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Indicador de etapa: dois traços, o da etapa atual em text. */
.stepper {
  display: flex;
  gap: 6px;
  margin: 0 0 20px;
}
.stepper .bar {
  width: 24px;
  height: 4px;
  border-radius: 2px;
  background: var(--panel3);
}
.stepper .bar.is-on {
  background: var(--text);
}

.form {
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
}
.form h2 {
  margin: 0;
  text-align: center;
}
.form > .sub {
  margin: -8px 0 0;
  text-align: center;
}
.form-inline {
  margin: 24px auto 0;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.field input {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-size: 16px; /* 16 px: o Safari do iPhone não amplia a página ao focar */
}
.field input:focus {
  outline: none;
  border-color: var(--accent);
}
.field input[aria-invalid="true"] {
  border-color: var(--danger);
}
.field-msg {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.field-msg:empty {
  display: none;
}
.field-msg.is-ok {
  color: var(--ok);
}
.field-msg.is-error,
.form-error {
  color: var(--danger);
}
.form-error {
  margin: -4px 0 0;
  font-size: 14px;
}
/* Turnstile (docs/cadastro-antifraude.md): só aparece quando pede interação; vazio não ocupa espaço. */
.turnstile:empty {
  display: none;
}
.btn-block {
  width: 100%;
  justify-content: center;
}
.btn[disabled] {
  cursor: default;
  opacity: 0.6;
}
.btn-primary[disabled]:hover {
  background: var(--accent);
}
.form-alt {
  margin: -4px 0 0;
  text-align: center;
  font-size: 14px;
}
.link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent-text);
  font: inherit;
  cursor: pointer;
}
.link:hover {
  text-decoration: underline;
}

/* ---- rodapé ---- */

footer {
  padding: 20px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
footer .sep {
  margin: 0 8px;
  opacity: 0.5;
}

/* ---- página inicial (body.home): hero escuro com a janela do app, seções, downloads ----
 * Só usa Nunito Sans 400 e 700 (a 600 não é baixada aqui). Peso e verificação: docs/site.md. */

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

.home {
  display: block;
}
.home main {
  display: block;
  padding: 0;
}
.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.top .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 20px;
  font-weight: 700;
}
.logo:hover {
  text-decoration: none;
}
.logo svg {
  width: 30px;
  height: 30px;
  fill: currentColor;
  flex: none;
}
.top nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.top nav a {
  color: var(--text);
  font-weight: 700;
  padding: 8px 12px;
  border-radius: var(--radius);
}
.top nav .nav-btn {
  border: 1px solid var(--panel3);
  padding: 7px 14px;
  margin-left: 4px;
}
.top nav .nav-btn:hover {
  background: var(--panel);
  text-decoration: none;
}

/* Texto à esquerda, janela do app inclinada à direita e cortada pela borda da tela; no celular, reta abaixo. */
.hero {
  overflow: hidden;
  padding: 40px 0 72px;
  background: radial-gradient(900px 620px at 80% 50%, rgba(var(--accent-rgb), 0.18), transparent 70%);
}
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 520px) minmax(0, 1fr);
  align-items: center;
  min-height: 680px;
}
.hero-text {
  position: relative;
  z-index: 1;
}
.hero h1 {
  margin: 0;
  font-size: clamp(36px, 4.6vw, 58px);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.015em;
}
.hero-sub {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: clamp(17px, 1.6vw, 19px);
  line-height: 1.5;
}
.hero-sub span {
  display: block;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}
.hbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 22px;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--on-accent);
  font-size: 16px;
  font-weight: 700;
  transition: background-color 120ms ease;
}
.hbtn:hover {
  text-decoration: none;
  background: var(--accent-hover);
}
.hbtn-2 {
  background: var(--panel);
  border: 1px solid var(--panel3);
  color: var(--text);
}
.hbtn-2:hover {
  background: var(--panel3);
}
.hbtn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  flex: none;
}
.hero-beta {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 14px;
}
.hero-art {
  position: relative;
  align-self: stretch;
  min-height: 680px;
}

/* Artes vetoriais (SVG inline, aria-hidden). Cores do tema escuro do app (classe C). */
.art {
  display: block;
  font-family: inherit;
}
.art .bg { fill: var(--bg); }
.art .p { fill: var(--panel); }
.art .p2 { fill: var(--panel2); }
.art .p3 { fill: var(--panel3); }
.art .t { fill: var(--text); }
.art .c { fill: #dbdee1; }
.art .m { fill: var(--muted); }
.art .s {
  fill: none;
  stroke: var(--muted);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.art .ini {
  fill: #fff;
  font-weight: 700;
  text-anchor: middle;
}
/* Textos das artes em pares: .l-pt e .l-en; o app.js troca o lang do html. */
.art .l-en,
html[lang="en"] .art .l-pt {
  display: none;
}
html[lang="en"] .art .l-en {
  display: inline;
}
.art-hero {
  position: absolute;
  left: 40px;
  top: 50%;
  width: 1000px;
  max-width: none;
  height: auto;
  aspect-ratio: 1200 / 750;
  border-radius: 10px;
  box-shadow: 0 0 0 1px var(--panel3), 0 40px 90px rgba(0, 0, 0, 0.55);
  transform: translateY(-50%) perspective(2200px) rotateY(-16deg) rotateX(5deg) rotate(-1.5deg);
  transform-origin: left center;
}
@media (max-width: 900px) {
  .hero {
    padding: 32px 0 56px;
  }
  .hero .wrap {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .hero-art {
    min-height: 0;
    margin-top: 40px;
  }
  .art-hero {
    position: static;
    width: 100%;
    transform: none;
    border-radius: var(--radius);
  }
}
@media (max-width: 520px) {
  .hbtn {
    width: 100%;
  }
}

.features {
  padding: 96px 0 16px;
}
.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 64px;
  margin-bottom: 72px;
  padding: 16px 0;
  /* Abaixo da dobra: o navegador só desenha o bloco quando ele se aproxima da tela (as artes são SVG inline,
     sem arquivo para o loading="lazy"). O padding dá espaço à sombra da arte, que a contenção cortaria. */
  content-visibility: auto;
  contain-intrinsic-size: auto 420px;
}
.feature:nth-child(odd) .feature-text {
  order: 2; /* alterna: arte à esquerda nas seções pares (o h2 escondido é o primeiro filho) */
}
.feature h3 {
  margin: 0 0 12px;
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 700;
  line-height: 1.2;
}
.feature p {
  margin: 0;
  max-width: 28em;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
}
.feature-art {
  width: 100%;
  max-width: 544px;
  justify-self: center;
  padding: clamp(16px, 3vw, 32px);
  border-radius: var(--radius);
  background: rgba(var(--accent-rgb), 0.16); /* accentSoft sobre o fundo: eco do hero */
}
.art-feature {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  border-radius: var(--radius);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.4);
}
@media (max-width: 760px) {
  .features {
    padding-top: 64px;
  }
  .feature {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 64px;
  }
  .feature:nth-child(odd) .feature-text {
    order: 0;
  }
}

.get {
  padding: 72px 0 88px;
  text-align: center;
  border-top: 1px solid var(--line);
}
.get h2 {
  margin: 0 0 10px;
  font-size: clamp(26px, 3.2vw, 34px);
}
.get-sub {
  margin: 0 auto 32px;
  max-width: 34em;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.5;
}
.home .downloads {
  max-width: 640px;
  margin: 0 auto;
}
.home .btn {
  min-height: 56px;
  font-size: 16px;
  font-weight: 700;
}
.first-open {
  max-width: 880px;
  margin: 48px auto 0;
  text-align: left;
}
.first-open-title {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
}
.first-open-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.first-open-grid > div {
  padding: 16px;
  border-radius: var(--radius);
  background: var(--panel);
}
.first-open h4 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
}
.first-open-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}
.first-open > .note {
  margin-top: 16px;
  text-align: center;
}
@media (max-width: 760px) {
  .first-open-grid {
    grid-template-columns: 1fr;
  }
}

.foot {
  border-top: 1px solid var(--line);
  padding: 24px 0;
  text-align: left;
}
.foot .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.foot p {
  margin: 0;
}
.logo-sm {
  font-size: 15px;
  color: var(--text);
  gap: 8px;
}
.logo-sm svg {
  width: 22px;
  height: 22px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

noscript p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
