/* Kit do Leitor — o mundo do funil do Portal (docs/funil-portal/DESIGN.md): lousa navy, papel, um acento coral. */
:root {
  --navy: #000321;
  --paper: #F4F6FA;
  --white: #FFFFFF;
  --coral: #FF6240;
  --coral-hover: #EB5A3B;
  --coral-soft: rgba(255, 98, 64, 0.14);
  --muted-dark: rgba(255, 255, 255, 0.72);
  --muted-light: rgba(0, 3, 33, 0.68);
  --line-dark: rgba(255, 255, 255, 0.16);
  --line-light: rgba(0, 3, 33, 0.12);
  --erro: #A3220A;
  --sombra: 0 1px 2px rgba(0, 3, 33, .06), 0 12px 32px rgba(0, 3, 33, .08);
  --sans: Montserrat, "Segoe UI", Arial, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--navy);
  font: 500 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
::selection { background: rgba(255, 98, 64, .28); color: var(--navy); }
a, button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--coral); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }
h1 em, h2 em, h3 em, .lede em, .serif {
  font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 1.12em; letter-spacing: 0;
}

/* ---------- Lousa (navy com pontos) ---------- */
.lousa {
  background-color: var(--navy);
  background-image: radial-gradient(rgba(255, 255, 255, 0.06) 0.75px, transparent 0.75px);
  background-size: 32px 32px;
  color: var(--white);
}
/* Faixa branca do logo oficial (assets/brand/logo.png): o slogan cinza não lê sobre o navy. */
.marca {
  background: var(--white);
  border-bottom: 1px solid var(--line-light);
  padding: 14px max(20px, calc((100% - 1120px) / 2 + 20px));
}
.logo { display: inline-block; line-height: 0; border-radius: 4px; }
.logo img { display: block; width: 175px; height: auto; }

.faixa { max-width: 1120px; margin: 0 auto; padding: 48px 20px 72px; }
.abertura { display: grid; gap: 40px; }
.tese h1 {
  margin: 0;
  font-size: 34px; line-height: 1.08; font-weight: 800; letter-spacing: -0.02em;
  text-wrap: balance; max-width: 15ch;
}
.lede { margin: 20px 0 0; color: var(--muted-dark); max-width: 34rem; text-wrap: pretty; }
.lede em { color: var(--white); }

/* ---------- A porta (o cartão do porteiro) ---------- */
.porta {
  background: var(--white);
  color: var(--navy);
  border-radius: 12px;
  padding: 28px 24px 24px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 20px 48px rgba(0, 0, 0, .28);
  align-self: start;
}
.passo { display: grid; gap: 16px; }
.passo.entrando { animation: entra 320ms var(--ease) both; }
@keyframes entra { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.porta h2 { margin: 0; font-size: 22px; line-height: 1.3; font-weight: 700; letter-spacing: -0.01em; }
.porta h2:focus { outline: none; }
.apoio { margin: -8px 0 4px; color: var(--muted-light); font-size: 16px; text-wrap: pretty; }
.apoio strong { color: var(--navy); font-weight: 700; word-break: break-all; }

.campo { display: grid; gap: 6px; }
.campo span { font-size: 15px; font-weight: 700; }
.campo input {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border: 1.5px solid rgba(0, 3, 33, 0.28);
  border-radius: 8px;
  background: var(--white);
  font-size: 17px;
  caret-color: var(--coral);
  transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease);
}
.campo input::placeholder { color: rgba(0, 3, 33, 0.62); }
.campo input:hover { border-color: rgba(0, 3, 33, 0.48); }
.campo input:focus, .campo input:focus-visible { outline: none; border-color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy); }
.campo input[aria-invalid="true"] { border-color: var(--erro); }

.isca { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.botao {
  min-height: 56px;
  padding: 16px 28px;
  border: 0;
  border-radius: 8px;
  background: var(--coral);
  color: var(--navy);
  font-size: 17px; font-weight: 700;
  cursor: pointer;
  transition: background-color 160ms var(--ease), transform 160ms var(--ease);
}
.botao:hover { background: var(--coral-hover); }
.botao:active { transform: translateY(1px); }
.botao[aria-busy="true"] { cursor: progress; background: var(--coral-soft); }
.botao:disabled { cursor: progress; }

.link {
  justify-self: start;
  padding: 4px 0;
  border: 0; background: none; cursor: pointer;
  font-size: 15px; font-weight: 700;
  text-decoration: underline; text-decoration-color: var(--coral);
  text-decoration-thickness: 2px; text-underline-offset: 5px;
}
.nota { margin: 0; font-size: 15px; line-height: 1.5; color: var(--muted-light); text-wrap: pretty; }
.erro { margin: 0; font-size: 15px; line-height: 1.5; color: var(--erro); font-weight: 700; }
.carregando { margin: 0; font-size: 15px; color: var(--muted-light); min-height: 0; }
.carregando:empty { display: none; }

/* ---------- Papel: a lista do kit ---------- */
.papel { padding: 72px 20px 88px; }
.papel:focus { outline: none; }
.coluna { max-width: 760px; margin: 0 auto; }
.papel > .coluna > h2 {
  margin: 0; font-size: 28px; line-height: 1.15; font-weight: 800; letter-spacing: -0.015em;
}
.lede-papel { margin: 12px 0 0; color: var(--muted-light); }

.grupo { margin-top: 48px; }
.grupo h3 { margin: 0 0 4px; font-size: 19px; line-height: 1.3; font-weight: 700; }
.lista { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-light); }
.lista li {
  display: grid;
  grid-template-columns: 8px 1fr auto;
  align-items: start;
  column-gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line-light);
}
.lista li::before {
  content: ""; width: 8px; height: 8px; margin-top: 10px; border-radius: 50%; background: var(--navy);
}
.item { display: grid; gap: 2px; min-width: 0; }
.nome { font-weight: 700; line-height: 1.4; }
.linha { color: var(--muted-light); font-size: 16px; line-height: 1.5; }
.tipo {
  font-size: 13px; font-weight: 700; letter-spacing: 0.02em;
  color: var(--muted-light); padding-top: 3px; white-space: nowrap;
}

/* Depois de aberto: cada linha ganha o seu botão. */
.baixar {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-width: 140px;
  min-height: 44px; padding: 10px 16px;
  border: 1.5px solid var(--navy); border-radius: 8px;
  background: var(--white);
  font-size: 15px; font-weight: 700; text-decoration: none; white-space: nowrap;
  transition: background-color 160ms var(--ease), color 160ms var(--ease);
}
.baixar svg { width: 16px; height: 16px; flex: none; }
.baixar:hover { background: var(--navy); color: var(--white); }
.baixar .tipo-mini { font-weight: 500; opacity: 0.72; }
.aberto .lista li { grid-template-columns: 8px 1fr; row-gap: 12px; }
.aberto .lista li .tipo { display: none; }
.aberto .lista li .baixar { grid-column: 2; justify-self: start; }
.aberto .lista li::before { background: var(--coral); }

/* O momento autoral: o kit destranca linha a linha. */
.aberto .baixar { animation: destranca 420ms var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms); }
@keyframes destranca {
  from { opacity: 0; transform: translateY(4px); filter: blur(2px); }
  to { opacity: 1; transform: none; filter: none; }
}
@media (prefers-reduced-motion: reduce) {
  .aberto .baixar, .passo.entrando { animation: none; }
}

.assinatura { margin-top: 64px; padding-top: 28px; border-top: 1px solid var(--line-light); }
.nome-autor { margin: 0; font-family: var(--serif); font-style: italic; font-size: 28px; line-height: 1.2; }
.credencial { margin: 8px 0 0; font-size: 15px; color: var(--muted-light); max-width: 34rem; }

.rodape {
  padding: 28px 20px 36px; text-align: center;
  font-size: 13px; line-height: 1.6; color: var(--muted-light);
  border-top: 1px solid var(--line-light);
}
.rodape a { text-decoration-color: var(--coral); text-underline-offset: 3px; }

/* ---------- Desktop ---------- */
@media (min-width: 900px) {
  .faixa { padding: 96px 32px 112px; }
  .marca { padding: 16px max(32px, calc((100% - 1120px) / 2 + 32px)); }
  .logo img { width: 200px; }
  .abertura { grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr); gap: 72px; align-items: start; }
  .tese { padding-top: 8px; }
  .tese h1 { font-size: 56px; }
  .lede { font-size: 18px; margin-top: 28px; }
  .porta { padding: 36px 32px 32px; }
  .papel { padding: 112px 32px 120px; }
  .papel > .coluna > h2 { font-size: 38px; }
  .lede-papel { font-size: 18px; }
  .aberto .lista li { grid-template-columns: 8px 1fr auto; }
  .aberto .lista li .baixar { grid-column: 3; grid-row: 1; align-self: center; }
}
