/* Landing ESTÁTICA temporária (Cloudflare Pages, ver docs/adr/0008-landing-estatica-cloudflare-pages.md).
   Copiada de app/assets/stylesheets/landing.css; mantenha as duas em sincronia até o Rails ser publicado.
   Referência: docs/design/landing-referencia.html. Tokens: docs/10-design.md. */

:root {
  /* Tokens principais */
  --ink: #121314;
  --paper: #F6F5F1;
  --accent: #FFD23F;
  --muted: #D6D4CE;
  --stamp-fulfilled: #1A6B3F;
  --stamp-progress: #9A5B00;
  --stamp-broken: #B42318;
  --stamp-nodata: #4A4945;

  /* Tokens derivados (neutros da referência) */
  --surface: #FFFFFF;
  --band: #ECEAE4;           /* fundo da seção de votações, divisórias */
  --text-2: #3D3C39;         /* texto secundário sobre claro */
  --text-3: #5A5853;         /* rótulos sobre claro */
  --text-dim: #9C9A94;       /* texto terciário sobre escuro */
  --receipt-dim: #555555;
  --line: #E2E0DA;           /* borda de cartões */
  --line-card: #D9D6CF;
  --line-dash: #C9C6BF;
  --receipt-dash: #9A9A9A;
  --nodata-line: #8A8883;
  --bar-no: #B9B6AE;
  --bar-abstention: #E0DDD6;
  --field-bg: #1C1D20;
  --field-line: #3A3B3E;
  --footer-line: #2E2F33;

  --font-display: "Bricolage Grotesque", Georgia, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --gutter: clamp(16px, 5vw, 80px);
  --section-y: clamp(64px, 9vw, 128px);
  --touch: 44px;
  --touch-bleed: calc((1lh - var(--touch)) / 2); /* alvo de 44px sem mudar a altura da linha de texto */
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-display);
  -webkit-font-smoothing: antialiased;
}

.landing { width: 100%; min-height: 100vh; display: flex; flex-direction: column; overflow-x: clip; }
.landing a { color: var(--ink); }
.landing a:hover { color: var(--receipt-dim); }
.landing :focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.landing ul, .landing ol, .landing dl, .landing dd { margin: 0; padding: 0; list-style: none; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 720px) { .hide-sm { display: none !important; } }

/* ---------- Layout ---------- */
.container { max-width: 1240px; margin: 0 auto; }
.section { padding: var(--section-y) var(--gutter); }
.section--flush-top { padding-top: 0; }
.section--band { background: var(--band); }
.section--white { background: var(--surface); border-top: 1.5px solid var(--line); border-bottom: 1.5px solid var(--line); }
.section__intro { display: flex; flex-direction: column; gap: 16px; max-width: 720px; }
.stack-48 { display: flex; flex-direction: column; gap: 48px; }
.stack-24 { display: flex; flex-direction: column; gap: 24px; }

/* ---------- Tipografia ---------- */
.eyebrow { margin: 0; font-family: var(--font-mono); font-size: 14px; font-weight: 400; letter-spacing: .12em; color: var(--text-3); }
.eyebrow--accent { color: var(--accent); }
.label { font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; color: var(--text-3); }
.label--spaced { margin-top: 6px; }
.h2 { margin: 0; font-size: clamp(32px, 4vw, 52px); line-height: 1.05; font-weight: 800; letter-spacing: -.025em; }
.h2--xl { font-size: clamp(36px, 4.5vw, 60px); line-height: 1.02; }
.h2--lg { font-size: clamp(34px, 4.2vw, 56px); line-height: 1.03; }
.h2--narrow { max-width: 760px; }
.body-lg { margin: 0; font-size: 18px; line-height: 1.55; color: var(--text-2); }

/* ---------- Carimbos ---------- */
.stamp {
  align-self: flex-start;
  font-family: var(--font-mono); font-weight: 700; font-size: 14px; letter-spacing: .06em;
  border: 2.5px solid currentColor; border-radius: 6px; padding: 4px 10px; white-space: nowrap;
}
.stamp--fulfilled { color: var(--stamp-fulfilled); }
.stamp--progress { color: var(--stamp-progress); }
.stamp--broken { color: var(--stamp-broken); }
.stamp--nodata { color: var(--stamp-nodata); border-style: dashed; }
.stamp--tilt { transform: rotate(-4deg); }

/* ---------- Hero ---------- */
.hero { background: var(--ink); color: var(--paper); padding: 0 var(--gutter) clamp(64px, 8vw, 120px); }

.nav { max-width: 1240px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 28px 0; }
.landing .nav__brand { display: flex; align-items: center; gap: 10px; min-height: var(--touch); color: var(--paper); text-decoration: none; }
.nav__wordmark { font-family: var(--font-mono); font-weight: 700; font-size: 20px; letter-spacing: .04em; }
.nav__links { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; font-size: 16px; }
.landing .nav__link { display: inline-flex; align-items: center; min-height: var(--touch); color: var(--muted); text-decoration: none; }
.landing .nav__link:hover { color: var(--paper); }
.landing .nav__cta {
  display: inline-flex; align-items: center; box-sizing: border-box; min-height: var(--touch);
  padding: 12px 20px; border-radius: 999px; background: var(--accent); color: var(--ink); font-weight: 600; text-decoration: none;
}

.hero__body { max-width: 1240px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: clamp(40px, 6vw, 96px); padding-top: clamp(32px, 6vw, 88px); }
.hero__copy { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.hero__title { margin: 0; font-size: clamp(48px, 7vw, 104px); line-height: .95; font-weight: 800; letter-spacing: -.03em; }
.hero__lead { margin: 0; font-size: clamp(18px, 1.6vw, 22px); line-height: 1.5; color: var(--muted); max-width: 560px; }
.hero__note { font-size: 14px; color: var(--text-dim); }

/* Recibo ilustrativo */
.hero__receipt-wrap { flex: 1 1 380px; min-width: 0; display: flex; justify-content: center; }
.receipt {
  width: 100%; max-width: 420px; box-sizing: border-box; padding: 32px 28px 40px;
  background: var(--surface); color: var(--ink); font-family: var(--font-mono); font-size: 14px; line-height: 1.55;
  transform: rotate(-1.5deg); box-shadow: 0 30px 60px rgba(0, 0, 0, .45);
}
.zig { position: relative; }
.zig::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -11px; height: 12px;
  background:
    linear-gradient(-45deg, transparent 8px, var(--surface) 0) 0 0 / 16px 12px repeat-x,
    linear-gradient(45deg, transparent 8px, var(--surface) 0) 0 0 / 16px 12px repeat-x;
}
.receipt__head { text-align: center; display: flex; flex-direction: column; gap: 4px; }
.receipt__title { font-weight: 700; font-size: 18px; letter-spacing: .08em; }
.receipt__dim { color: var(--receipt-dim); }
.receipt__strong { font-weight: 700; }
.receipt__rule { border-top: 1.5px dashed var(--receipt-dash); margin: 18px 0; }
.receipt__field { display: flex; flex-direction: column; gap: 2px; }
.receipt__field--spaced { margin-top: 12px; }
.landing .receipt__lines { display: flex; flex-direction: column; gap: 6px; }
.receipt__line { display: flex; justify-content: space-between; gap: 12px; }
.receipt__line dd { font-weight: 700; }
.receipt__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.receipt__sources { color: var(--receipt-dim); font-size: 12px; line-height: 1.5; }
.receipt__stamp {
  border: 3px solid var(--stamp-progress); color: var(--stamp-progress); font-weight: 700;
  padding: 6px 10px; border-radius: 6px; transform: rotate(-8deg); letter-spacing: .06em; white-space: nowrap;
}

/* ---------- Formulário da lista de espera ---------- */
.signup { display: flex; flex-wrap: wrap; gap: 12px; max-width: 560px; }
.signup__input {
  flex: 1 1 260px; min-width: 0; min-height: 52px; box-sizing: border-box; padding: 0 18px;
  border-radius: 12px; border: 1.5px solid var(--field-line); background: var(--field-bg);
  color: var(--paper); font-size: 17px; font-family: inherit;
}
/* A referência usava #6B6B6B (contraste 3.2:1 sobre o campo escuro); --text-dim dá 5.9:1. */
.signup__input::placeholder { color: var(--text-dim); opacity: 1; }
.signup__button {
  flex: 0 0 auto; min-height: 52px; padding: 0 24px; border-radius: 12px; border: 0;
  background: var(--accent); color: var(--ink); font-size: 17px; font-weight: 600; font-family: inherit; cursor: pointer;
}
.signup__flash { margin: 0; max-width: 560px; padding: 12px 16px; border-radius: 10px; border-left: 4px solid; background: var(--field-bg); font-size: 16px; line-height: 1.45; color: var(--paper); }
.signup__flash--notice { border-left-color: var(--accent); }
.signup__flash--alert { border-left-color: var(--stamp-broken); }

/* Mensagens: com JS ganham .is-visible; sem JS, o redirect para #<origem>-ok / -erro ativa :target. */
.signup__status .signup__flash { display: none; }
.signup__status .signup__flash:target,
.signup__status .signup__flash.is-visible { display: block; }
/* A região role=status fica sempre no DOM (para ser anunciada); vazia, anula o gap do container. */
.hero__copy { --stack-gap: 28px; }
.cta-final__form { --stack-gap: 12px; }
.signup__status:not(:has(.signup__flash:target, .signup__flash.is-visible)) { margin-top: calc(-1 * var(--stack-gap)); }
.signup__flash:target { scroll-margin-top: 30vh; }

/* Honeypot: fora da tela, fora da ordem de tabulação, escondido de leitores de tela. */
.signup__hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.signup__button:disabled { opacity: .7; cursor: progress; }

/* ---------- Faixa ---------- */
.strip { background: var(--accent); color: var(--ink); padding: clamp(28px, 4vw, 48px) var(--gutter); }
.strip__text { max-width: 1240px; margin: 0 auto; font-size: clamp(24px, 3vw, 40px); line-height: 1.15; font-weight: 800; letter-spacing: -.02em; }

/* ---------- Como funciona ---------- */
.landing .steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.step { background: var(--surface); border: 1.5px solid var(--line); border-radius: 16px; padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.step__number { font-family: var(--font-mono); font-weight: 700; font-size: 15px; color: var(--text-3); }
.step__title { margin: 0; font-size: 24px; font-weight: 700; }
.step__text { margin: 0; font-size: 17px; line-height: 1.5; color: var(--text-2); }
.step--dark { background: var(--ink); color: var(--paper); border: 0; }
.step--dark .step__number { color: var(--accent); }
.step--dark .step__text { color: var(--muted); }

/* ---------- Carimbos (legenda) ---------- */
.split { display: flex; flex-wrap: wrap; gap: clamp(32px, 5vw, 80px); align-items: flex-start; }
.split__text { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.landing .legend { flex: 1 1 480px; min-width: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.legend__item { background: var(--surface); border-radius: 14px; padding: 22px; display: flex; flex-direction: column; gap: 12px; border: 1.5px solid var(--line); }
.legend__item--nodata { border: 1.5px dashed var(--nodata-line); }
.legend__text { font-size: 16px; line-height: 1.45; color: var(--text-2); }

/* ---------- Votações ---------- */
.votes { display: flex; flex-wrap: wrap; gap: clamp(40px, 6vw, 88px); align-items: flex-start; }
.votes__text { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.votes__note { margin: 32px auto 0; font-size: 15px; line-height: 1.5; color: var(--text-3); }
.landing .checks { display: flex; flex-direction: column; gap: 16px; margin-top: 8px; }
.checks__item { display: flex; gap: 14px; align-items: flex-start; font-size: 17px; line-height: 1.5; }
.checks__icon { flex: 0 0 auto; margin-top: 2px; color: var(--ink); }

.vote-card {
  flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 22px;
  background: var(--surface); border-radius: 18px; border: 1.5px solid var(--line-card);
  box-shadow: 0 20px 50px rgba(18, 19, 20, .10); padding: clamp(20px, 3vw, 32px);
}
.vote-card__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 12px; }
.vote-card__heading { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1 1 260px; }
.vote-card__title { font-size: 22px; font-weight: 700; line-height: 1.25; }
.vote-card__block { display: flex; flex-direction: column; gap: 10px; border-top: 1.5px dashed var(--line-dash); padding-top: 20px; }
.vote-card__block--tight { gap: 0; padding-top: 16px; }
.vote-card__p { margin: 0; font-size: 16px; line-height: 1.55; }
.vote-card__foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 20px; font-size: 13px; color: var(--text-3); }
.vote-card__links { display: flex; gap: 16px; }
.landing .vote-card__links a { display: inline-flex; align-items: center; min-height: var(--touch); margin-block: var(--touch-bleed); color: var(--ink); }

.tally { display: flex; flex-direction: column; gap: 10px; }
.tally__bar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: var(--band); }
.tally__seg--yes { width: 58%; background: var(--ink); }
.tally__seg--no { width: 28%; background: var(--bar-no); }
.tally__seg--abstention { width: 4%; background: var(--bar-abstention); }
.tally__legend { display: flex; flex-wrap: wrap; gap: 8px 20px; font-family: var(--font-mono); font-size: 13px; color: var(--text-2); }
.tally__key { display: inline-flex; align-items: center; gap: 6px; }
.tally__swatch { width: 10px; height: 10px; border-radius: 2px; box-sizing: border-box; }
.tally__swatch--yes { background: var(--ink); }
.tally__swatch--no { background: var(--bar-no); }
.tally__swatch--abstention { background: var(--bar-abstention); }
.tally__swatch--absent { border: 1.5px dashed var(--nodata-line); }

.sides { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.sides__item { background: var(--paper); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.sides__title { font-size: 14px; font-weight: 700; }
.sides__text { font-size: 15px; line-height: 1.5; color: var(--text-2); }

.roster__label { padding-bottom: 8px; }
.roster__row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--band); font-size: 15px; }
.roster__row:last-child { border-bottom: 0; }
.roster__vote { font-family: var(--font-mono); font-size: 13px; font-weight: 700; }
.roster__vote--dim { color: var(--text-3); }

/* ---------- Públicos ---------- */
.audiences { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 40px; }
.audience { display: flex; flex-direction: column; gap: 12px; border-top: 3px solid var(--ink); padding-top: 20px; }
.audience__title { margin: 0; font-size: 22px; font-weight: 700; }
.audience__text { margin: 0; font-size: 17px; line-height: 1.55; color: var(--text-2); }

/* ---------- Princípios ---------- */
.principles { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.principle { display: flex; gap: 16px; align-items: flex-start; }
.principle__icon { flex: 0 0 auto; color: var(--ink); }
.principle__body { display: flex; flex-direction: column; gap: 8px; }
.principle__title { margin: 0; font-size: 20px; font-weight: 700; }
.principle__text { margin: 0; font-size: 16px; line-height: 1.55; color: var(--text-2); }

/* ---------- Fontes ---------- */
.landing .chips { display: flex; flex-wrap: wrap; gap: 12px; }
.chip { font-family: var(--font-mono); font-size: 15px; padding: 12px 18px; border: 1.5px solid var(--ink); border-radius: 999px; }

/* ---------- CTA final + rodapé ---------- */
.cta-final { background: var(--ink); color: var(--paper); padding: var(--section-y) var(--gutter); }
.cta-final__body { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 40px; }
.cta-final__copy { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.cta-final__title { margin: 0; font-size: clamp(40px, 6vw, 84px); line-height: .98; font-weight: 800; letter-spacing: -.03em; }
.cta-final__lead { margin: 0; font-size: 19px; line-height: 1.5; color: var(--muted); max-width: 520px; }
.cta-final__form { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.cta-final__form .signup { max-width: none; }
.cta-final__form .signup__input { flex-basis: 240px; }

.site-footer {
  margin-top: clamp(64px, 8vw, 112px); padding-top: 28px; border-top: 1px solid var(--footer-line);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; font-size: 14px; color: var(--text-dim);
}
.site-footer__brand { font-family: var(--font-mono); }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 24px; }
.landing .site-footer__links a { display: inline-flex; align-items: center; min-height: var(--touch); margin-block: var(--touch-bleed); color: var(--muted); }
.landing .site-footer__links a:hover { color: var(--paper); }
