/* ============================================================
   ASCENT · Pitchs · páginas do site (índice e página de cada deck)
   Responsivo: funciona no celular, onde o link costuma ser aberto.
   ============================================================ */
@import url('./tokens.css');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--brand-navy-950); }
body {
  min-height: 100vh; color: #fff; font-family: var(--font-body, Inter, sans-serif); line-height: 1.5;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(249,213,146,.10), transparent 60%),
    linear-gradient(180deg, var(--brand-navy-800), var(--brand-navy-950));
}
a { color: inherit; }
.pagina { max-width: 1180px; margin: 0 auto; padding: 32px 24px 48px; display: flex; flex-direction: column; gap: 56px; min-height: 100vh; }

.topo { display: flex; align-items: center; }
.marca { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.marca img { height: 32px; width: auto; }
.marca span { font-family: var(--font-mono, monospace); font-size: 24px; font-weight: 500; }
.marca i { font-style: normal; color: var(--brand-cream); }

.eyebrow { font-family: var(--font-mono, monospace); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--brand-cream); margin-bottom: 16px; }
h1 { font-family: var(--font-display, sans-serif); font-weight: 700; font-size: clamp(30px, 3.6vw, 44px); line-height: 1.08; letter-spacing: -.02em; }
h2 { font-family: var(--font-display, sans-serif); font-size: 26px; margin-bottom: 20px; }
h3 { font-family: var(--font-mono, monospace); font-size: 13px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.6); margin: 36px 0 16px; }
.desc { font-size: 18px; color: rgba(255,255,255,.75); margin-top: 20px; max-width: 620px; }
.desc a { color: var(--brand-cream); }
.meta { font-family: var(--font-mono, monospace); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.5); margin-top: 20px; }

.deck-hero { display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: center; }
.acoes { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 14px 22px; border-radius: 10px; font-weight: 600; font-size: 16px; text-decoration: none; border: 1px solid rgba(249,213,146,.45); color: var(--brand-cream); transition: background .15s, transform .15s; }
.btn:hover { background: rgba(249,213,146,.08); transform: translateY(-1px); }
.btn--cheio { background: var(--brand-cream); color: var(--brand-navy-800); border-color: var(--brand-cream); }
.btn--cheio:hover { background: var(--brand-cream-100); }
.thumb { display: block; border-radius: 14px; overflow: hidden; border: 1px solid rgba(249,213,146,.3); box-shadow: 0 30px 80px rgba(0,0,0,.45); aspect-ratio: 16 / 9; background: var(--brand-navy-800); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.thumb:hover img { transform: scale(1.02); }
.thumb span { display: flex; height: 100%; align-items: center; justify-content: center; color: var(--brand-cream); }

.downloads { border-top: 1px solid rgba(255,255,255,.08); padding-top: 40px; }
.grade { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.baixar { display: flex; flex-direction: column; gap: 6px; padding: 22px 24px; border-radius: 12px; text-decoration: none; border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.03); transition: border-color .15s, background .15s; }
.baixar:hover { border-color: rgba(249,213,146,.5); background: rgba(249,213,146,.05); }
.baixar b { font-family: var(--font-display, sans-serif); font-size: 20px; }
.baixar b::after { content: " ↓"; color: var(--brand-cream); }
.baixar span { font-size: 14px; color: rgba(255,255,255,.6); }
.gifs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.gifs a { display: flex; flex-direction: column; gap: 8px; text-decoration: none; }
.gifs img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 10px; border: 1px solid rgba(255,255,255,.1); background: #fff; }
.gifs span { font-family: var(--font-mono, monospace); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.6); }
.so-toque { display: none; }
@media (pointer: coarse) { .so-teclado { display: none; } .so-toque { display: block; } }
.dica { margin-top: 32px; font-size: 14px; color: rgba(255,255,255,.5); }
kbd { font-family: var(--font-mono, monospace); font-size: 12px; padding: 2px 7px; border-radius: 5px; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.05); color: #fff; }

.indice { flex: 1; }
.lista { display: flex; flex-direction: column; gap: 12px; margin-top: 32px; }
.item { display: grid; grid-template-columns: 1fr auto; gap: 4px 24px; padding: 22px 24px; border-radius: 12px; text-decoration: none; border: 1px solid rgba(255,255,255,.1); }
.item:hover { border-color: rgba(249,213,146,.5); }
.item b { font-family: var(--font-display, sans-serif); font-size: 20px; }
.item span { grid-column: 1; color: rgba(255,255,255,.65); }
.item small { grid-row: 1 / 3; grid-column: 2; align-self: center; font-family: var(--font-mono, monospace); color: rgba(255,255,255,.5); }

.rodape { margin-top: auto; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-family: var(--font-mono, monospace); font-size: 12px; letter-spacing: .08em; color: rgba(255,255,255,.4); border-top: 1px solid rgba(255,255,255,.06); padding-top: 24px; }
.rodape a { text-decoration: none; }
.rodape a:hover { color: var(--brand-cream); }

@media (max-width: 860px) {
  .pagina { gap: 40px; padding: 24px 18px 36px; }
  .deck-hero { grid-template-columns: 1fr; gap: 28px; }
  .thumb { order: -1; }
  .grade, .gifs { grid-template-columns: 1fr; }
  .acoes .btn { flex: 1 1 100%; justify-content: center; }
}

/* ============================================================
   Versão em texto do pitch (decks/<slug>/texto.md)
   ============================================================ */
.pagina--texto { max-width: 820px; gap: 40px; }
.topo--texto { justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.voltar { font-family: var(--font-mono, monospace); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-cream); text-decoration: none; }
.acoes--texto { margin-top: 0; }
.acoes--texto .btn { padding: 10px 16px; font-size: 14px; }
.texto { font-size: 18px; line-height: 1.7; color: rgba(255,255,255,.86); }
.texto > * + * { margin-top: 1em; }
.texto h1 { font-size: clamp(30px, 4.4vw, 44px); color: #fff; margin-bottom: .4em; }
.texto h2 { font-size: 28px; color: #fff; margin: 2.2em 0 .6em; padding-top: 1.2em; border-top: 1px solid rgba(255,255,255,.08); }
.texto h3 { font-family: var(--font-display, sans-serif); font-size: 21px; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--brand-cream); margin: 1.8em 0 .4em; }
.texto strong { color: #fff; }
.texto a { color: var(--brand-cream); }
.texto ul, .texto ol { padding-left: 1.3em; }
.texto li + li { margin-top: .4em; }
.texto blockquote { border-left: 3px solid var(--brand-cream); padding: 6px 0 6px 18px; color: rgba(255,255,255,.7); font-style: italic; }
.texto img { display: block; width: 100%; border-radius: 10px; border: 1px solid rgba(249,213,146,.25); background: #fff; }
.texto table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.45; display: block; overflow-x: auto; }
.texto th, .texto td { text-align: left; padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,.1); vertical-align: top; }
.texto th { font-family: var(--font-mono, monospace); font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-cream); }
.texto hr { border: 0; border-top: 1px solid rgba(255,255,255,.12); margin: 2.5em 0; }
@media (max-width: 860px) { .texto { font-size: 17px; } .texto h2 { font-size: 24px; } .acoes--texto .btn { flex: 1 1 auto; justify-content: center; } }

/* PDF / impressão: papel branco, tinta escura, sem botões */
@media print {
  html, body.pg-texto { background: #fff !important; }
  .pg-texto .topo--texto, .pg-texto .rodape { display: none; }
  .pagina--texto { max-width: none; padding: 0; gap: 0; min-height: 0; }
  .texto { color: #1d2433; font-size: 11pt; line-height: 1.55; }
  .texto h1 { color: #0D1628; font-size: 24pt; }
  .texto h2 { color: #0D1628; font-size: 16pt; border-top-color: #e3e6ec; break-after: avoid; }
  .texto h3 { color: #A87828; font-size: 13pt; break-after: avoid; }
  .texto strong { color: #0D1628; }
  .texto a { color: #A87828; }
  .texto blockquote { color: #4a5263; border-left-color: #D19A42; }
  .texto img { max-height: 95mm; width: auto; max-width: 100%; margin: 0 auto; border-color: #e3e6ec; break-inside: avoid; }
  .texto table { display: table; font-size: 9.5pt; break-inside: avoid; }
  .texto th { color: #A87828; border-bottom-color: #d9dde4; }
  .texto td { border-bottom-color: #e3e6ec; }
  .texto hr { border-top-color: #e3e6ec; }
}

/* versão em texto no celular */
.tabela { overflow-x: auto; }
.texto .tabela table { display: table; }
@media (max-width: 640px) {
  .pagina--texto { padding: 18px 16px 32px; gap: 28px; }
  .topo--texto { flex-direction: column; align-items: stretch; gap: 14px; }
  .voltar { font-size: 11px; }
  .acoes--texto { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 8px; }
  .acoes--texto .btn { padding: 10px 6px; font-size: 13px; justify-content: center; white-space: nowrap; }
  .texto { font-size: 16px; line-height: 1.65; }
  .texto h1 { font-size: 27px; line-height: 1.15; }
  .texto h2 { font-size: 21px; line-height: 1.25; margin-top: 1.8em; padding-top: 1em; }
  .texto h3 { font-size: 17px; line-height: 1.3; }
  .texto ul, .texto ol { padding-left: 1.15em; }
  .texto blockquote { padding-left: 14px; }
  .texto img { border-radius: 8px; }
  /* tabelas viram cartões: cada linha um bloco, cada célula "coluna  valor" */
  .texto .tabela table, .texto .tabela tbody, .texto .tabela tr, .texto .tabela td { display: block; width: 100%; }
  .texto .tabela thead { display: none; }
  .texto .tabela tr { border: 1px solid rgba(255,255,255,.1); border-radius: 10px; padding: 6px 14px; background: rgba(255,255,255,.02); }
  .texto .tabela tr + tr { margin-top: 10px; }
  .texto .tabela td { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; font-size: 15px; text-align: right; }
  .texto .tabela td + td { border-top: 1px solid rgba(255,255,255,.06); }
  .texto .tabela tr td { border-bottom: 0; }
  .texto .tabela td::before { content: attr(data-label); flex: 0 0 auto; max-width: 45%; text-align: left; font-family: var(--font-mono, monospace); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-cream); padding-top: 3px; }
  .texto .tabela td:first-child { font-weight: 600; color: #fff; }
  /* tabela larga (ex.: contas por mês): cartão em duas colunas */
  .texto .tabela--larga tr { display: grid; grid-template-columns: 1fr 1fr; column-gap: 20px; }
  .texto .tabela--larga td { width: auto; }
  .texto .tabela--larga td + td { border-top: 0; }
  .texto .tabela--larga td:first-child { font-weight: 400; color: inherit; }
}

/* respiro entre blocos do texto */
.texto > * + * { margin-top: 1.25em; }
.texto > h2 + *, .texto > h3 + * { margin-top: .75em; }
.texto > * + .tabela, .texto > .tabela + *, .texto > * + p:has(> img), .texto > p:has(> img) + * { margin-top: 1.6em; }
.texto li + li { margin-top: .7em; }
.texto li > p + p { margin-top: .6em; }
@media (max-width: 640px) {
  .texto { line-height: 1.72; }
  .texto > * + * { margin-top: 1.35em; }
  .texto > h2 + *, .texto > h3 + * { margin-top: .8em; }
  .texto > * + .tabela, .texto > .tabela + *, .texto > * + p:has(> img), .texto > p:has(> img) + * { margin-top: 1.75em; }
  .texto h2 { margin-top: 2.4em; padding-top: 1.4em; }
  .texto h3 { margin-top: 2.2em; }
  .texto li + li { margin-top: .85em; }
  .texto blockquote { margin: 1.6em 0; }
}
@media print {
  .texto > * + * { margin-top: .9em; }
  .texto li + li { margin-top: .35em; }
}
