/* Página de vendas do Condy. Tokens com os valores do app (Tailwind padrão em frontend/src). */
:root {
  --brand: #0f766e;
  --brand-strong: #115e59;
  --brand-soft: #f0fdfa;
  --ink: #0f172a;
  --ink-soft: #475569;
  --line: #e2e8f0;
  --surface: #ffffff;
  --page: #f8fafc;
  --paper: #fbf8f1;
  --note: #fffbeb;
  --note-ink: #78350f;
  --shadow: 0 1px 2px rgb(15 23 42 / 0.06);

  --font-text: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --font-title: "Source Serif 4", "Source Serif fallback", Georgia, serif;

  --radius: 8px;
  --radius-sheet: 4px;
  --gutter: 16px;
  --section-space: 64px;
  --content: 1120px;
  --measure: 64ch;
}

@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-display: swap;
  font-weight: 200 900;
  src: url("/fonts/source-serif-4-v1.woff2") format("woff2");
  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;
}

/* Georgia ajustada às medidas da Source Serif 4, para a troca de fonte não mexer no layout. */
@font-face {
  font-family: "Source Serif fallback";
  src: local("Georgia");
  size-adjust: 96%;
  ascent-override: 106%;
  descent-override: 34%;
  line-gap-override: 0%;
}

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

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

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.6;
}

h1,
h2,
h3 {
  font-family: var(--font-title);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: 2.25rem;
}

h2 {
  font-size: 1.75rem;
}

h3 {
  font-size: 1.1875rem;
  line-height: 1.3;
}

p,
ul,
ol {
  margin: 0;
}

p {
  max-width: var(--measure);
  text-wrap: pretty;
}

a {
  color: var(--brand-strong);
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--ink);
}

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

.tabular {
  font-variant-numeric: tabular-nums;
}

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

/* Pular para o conteúdo: primeiro foco da página. */
.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 10;
  padding: 10px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.skip:focus {
  top: 8px;
}

.wrap {
  width: 100%;
  max-width: var(--content);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Botão principal, como o Button primary do app. */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 2.75rem;
  padding: 0 20px;
  border-radius: var(--radius);
  background: var(--brand);
  color: var(--surface);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
}

.button:hover {
  background: var(--brand-strong);
  color: var(--surface);
}

@media (min-width: 640px) {
  .button {
    width: auto;
  }
}

@media (min-width: 1024px) {
  :root {
    --section-space: 96px;
  }

  h1 {
    font-size: 3.5rem;
  }

  h2 {
    font-size: 2.25rem;
  }
}

/* Topo */
.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--brand-strong);
  font-weight: 700;
  font-size: 1.125rem;
  text-decoration: none;
}

.brand img {
  border-radius: 6px;
}

.topbar-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 4px;
  font-weight: 600;
  text-decoration: none;
}

.topbar-link:hover {
  text-decoration: underline;
}

/* Acima da dobra */
.hero {
  padding: 28px 0 var(--section-space);
}

.hero-grid {
  display: grid;
  gap: 40px;
}

.lead {
  margin-top: 16px;
  font-size: 1.125rem;
  color: var(--ink-soft);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
  margin-top: 24px;
}

.secondary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
}

.support {
  margin-top: 8px;
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

/* A cédula: o item com votação aberta, como o app mostra. */
.ballot {
  max-width: 420px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sheet);
  box-shadow: var(--shadow);
}

.badge {
  display: inline-block;
  padding: 2px 10px;
  border: 1px solid var(--brand);
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 0.875rem;
  font-weight: 600;
}

.ballot-title {
  margin-top: 12px;
  font-weight: 600;
}

.choices {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 0;
  list-style: none;
}

.choice {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.choice .mark {
  width: 18px;
  height: 18px;
  border: 2px solid var(--ink-soft);
  border-radius: 50%;
  flex: none;
}

.choice.is-picked {
  border-color: var(--brand);
  background: var(--brand-soft);
  font-weight: 600;
}

.choice.is-picked .mark {
  border: 5px solid var(--brand);
}

.ballot-note {
  margin-top: 12px;
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

.progress {
  height: 6px;
  margin-top: 16px;
  border-radius: 3px;
  background: var(--line);
}

/* 31 de 51 casas. */
.progress-bar {
  display: block;
  width: 61%;
  height: 100%;
  border-radius: 3px;
  background: var(--brand);
}

.ballot-foot {
  margin-top: 8px;
  font-size: 0.875rem;
  color: var(--ink-soft);
}

/* Seções */
.section {
  padding: var(--section-space) 0;
}

.section-paper {
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-lead {
  margin-top: 16px;
  color: var(--ink-soft);
}

.dash-list {
  display: grid;
  gap: 12px;
  margin-top: 24px;
  padding: 0;
  list-style: none;
}

.dash-list li {
  position: relative;
  padding-left: 28px;
  max-width: var(--measure);
}

.dash-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.8em;
  width: 16px;
  height: 2px;
  background: var(--brand);
}

/* Passos: o número é o marcador. */
.steps {
  display: grid;
  gap: 32px;
  margin-top: 32px;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.step {
  position: relative;
  padding-left: 52px;
  counter-increment: step;
}

.step::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -0.1em;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 2.25rem;
  line-height: 1;
  color: var(--brand);
}

.step p {
  margin-top: 6px;
  color: var(--ink-soft);
}

/* A folha da ata. */
.sheet-block {
  margin-top: 20px;
  max-width: 460px;
}

.sheet {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sheet);
  box-shadow: var(--shadow);
}

.sheet-kicker {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.tally {
  width: 100%;
  margin-top: 12px;
  border-collapse: collapse;
}

.tally th,
.tally td {
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-weight: 400;
}

.tally td {
  text-align: right;
  font-weight: 600;
}

.tally-total th,
.tally-total td {
  border-bottom: 0;
  font-weight: 700;
}

.sheet-text {
  margin-top: 12px;
  font-family: var(--font-title);
  font-size: 1rem;
  color: var(--ink);
}

.step .sheet-caption {
  margin-top: 8px;
  font-size: 0.9375rem;
}

@media (min-width: 1024px) {
  .hero {
    padding-top: 72px;
  }

  .hero-grid {
    grid-template-columns: 7fr 5fr;
    align-items: center;
    gap: 64px;
  }

  .ballot {
    margin-left: auto;
  }

  .steps {
    grid-template-columns: 1fr 1fr;
    gap: 48px 64px;
  }
}

/* Listas de regras: título curto e uma frase. */
.facts {
  display: grid;
  gap: 24px;
  margin-top: 32px;
  padding: 0;
  list-style: none;
}

.facts li {
  padding-top: 16px;
  border-top: 2px solid var(--brand);
}

.facts p {
  margin-top: 6px;
  color: var(--ink-soft);
}

.section-rule {
  border-top: 1px solid var(--line);
}

/* O que fica fora. */
.section-note {
  background: var(--note);
  color: var(--note-ink);
}

.section-note h2,
.section-note h3,
.section-note p {
  color: var(--note-ink);
}

.facts-note li {
  border-top-color: var(--note-ink);
}

.price-soon {
  margin-top: 16px;
  font-weight: 600;
}

/* Perguntas frequentes. */
.faq {
  margin-top: 24px;
  max-width: 760px;
  border-top: 1px solid var(--line);
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 8px 0;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  flex: none;
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1;
  color: var(--brand);
}

.faq details[open] summary::after {
  content: "−";
}

.faq details p {
  padding-bottom: 20px;
  color: var(--ink-soft);
}

.final {
  border-top: 1px solid var(--line);
  background: var(--surface);
}

/* Rodapé */
.footer {
  padding: 32px 0 40px;
  border-top: 1px solid var(--line);
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

.footer-inner {
  display: grid;
  gap: 12px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 24px;
  padding: 0;
  list-style: none;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

@media (min-width: 640px) {
  .facts {
    grid-template-columns: 1fr 1fr;
    gap: 32px 40px;
  }
}

@media (min-width: 1024px) {
  .facts {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-inner {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
}
