/* th.aipim.org — o site de marketing do tradehappen.
 *
 * Docroot SEPARADO do aipim.org: outro host, outro vhost. O que é compartilhado é a tipografia
 * e a régua do brand guide; o que muda é a cor comprometida.
 *
 * COR: azul petróleo #3C6C84 — a cor do thaipim (th-aipim/identity/README.md: core pair
 * petroleum+cream). Esta página mora no host do thaipim e leva ao app dele, então veste a cor
 * dele. O `tradehappen` NÃO tem identidade no brand guide, e inventar uma de passagem contraria
 * o guide; a metáfora da casa já cobre o caso — a inteligência é invisível, a aplicação carrega
 * a voz. Identidade própria, se vier, é um Anexo 02 (decisão do dono, 25/out: fica para depois).
 *
 * GRAFIA: `tradehappen` em MINÚSCULA para fora — cravado pelo dono em 25/out. "TradeHappen"
 * segue só em código e doc interna.
 *
 * TEMA: claro apenas, como o aipim.org. O tema escuro é item de roadmap da casa inteira e entra
 * nos dois sites de uma vez, não só aqui.
 *
 * ZERO JAVASCRIPT. Inclusive o bloco de loja: as opções indisponíveis são <span aria-disabled>,
 * nunca <a> — link que não leva a lugar nenhum é defeito de acessibilidade.
 */

:root {
  /* rampa do brand guide, 2ª edição */
  --graphite: #1A1A1A;
  --cream: #FAFAFA;
  --ink: #333333;
  --slate: #666666;
  --mute: #888888;
  --line: #D0D0D0;
  --fog: #EBEBEB;
  --white: #FFFFFF;
  --banda: #F4F4F4;
  /* a cor comprometida do thaipim */
  --petroleo: #3C6C84;
  --petroleo-fundo: #335C70;
  --petroleo-veu: #EDF3F6;
  --petroleo-noite: #1A2530;

  --fonte: 'Satoshi', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

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

body {
  margin: 0;
  font-family: var(--fonte);
  font-size: 16px;
  line-height: 1.5;
  color: var(--graphite);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }

a { color: var(--petroleo); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, span[aria-disabled]:focus-visible {
  outline: 2px solid var(--petroleo); outline-offset: 3px; border-radius: 2px;
}

.wrap {
  max-width: 1080px; margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}

.kicker {
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--mute); margin: 0 0 14px;
}

/* ─── cabeçalho ───────────────────────────────────────────────────────────── */
.topo { border-bottom: .5px solid var(--line); background: var(--cream); }
.topo .wrap { display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding-block: 18px; }
.topo img { display: block; width: 170px; height: auto; }
.idioma { font-size: 13px; color: var(--mute); display: flex; gap: 8px; align-items: center; }
.idioma .on { color: var(--graphite); }

/* ─── hero ────────────────────────────────────────────────────────────────── */
.hero { padding-block: 60px 54px; }
.hero .wrap { display: grid; gap: 36px; align-items: center; }
@media (min-width: 900px) { .hero .wrap { grid-template-columns: 1.02fr .98fr; } }
.selo {
  display: inline-block; font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--petroleo); border: 1px solid var(--petroleo); border-radius: 100px;
  padding: 5px 13px; margin: 0 0 20px;
}
.hero h1 {
  font-size: clamp(28px, 4.6vw, 42px); font-weight: 500; line-height: 1.14;
  letter-spacing: -.02em; margin: 0 0 18px; text-wrap: balance;
}
.hero .tese { font-size: 16px; color: var(--ink); line-height: 1.65; max-width: 54ch; margin: 0; }
.hero .tese b { font-weight: 500; }

.ctas { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.btn {
  display: inline-block; font-size: 14px; padding: 11px 20px; border-radius: 4px;
  border: 1px solid var(--line); background: var(--white); color: var(--graphite);
}
.btn:hover { border-color: var(--graphite); text-decoration: none; }
.btn--p { background: var(--petroleo); border-color: var(--petroleo); color: var(--white); }
.btn--p:hover { background: var(--petroleo-fundo); border-color: var(--petroleo-fundo); }

/* ─── seções ──────────────────────────────────────────────────────────────── */
.secao { padding-block: 56px; }
.secao--banda { background: var(--banda); }
.secao h2 {
  font-size: clamp(21px, 2.6vw, 27px); font-weight: 500; margin: 8px 0 12px;
  letter-spacing: -.01em; text-wrap: balance;
}
.secao .lead { font-size: 15px; color: var(--ink); line-height: 1.7; max-width: 66ch; margin: 0; }
.secao .lead + .lead { margin-top: 14px; }
.secao .ressalva { font-size: 14px; color: var(--slate); }

/* ─── o filme ─────────────────────────────────────────────────────────────── */
.filme { margin: 0; }
.filme video {
  width: 100%; height: auto; display: block; border-radius: 6px;
  border: .5px solid var(--line); background: var(--petroleo-noite);
}
.filme figcaption { font-size: 12.5px; color: var(--mute); margin-top: 10px; }

/* ─── a espinha da rota ───────────────────────────────────────────────────── */
.rota { display: grid; margin: 26px 0 0; }
.rota__etapa {
  display: grid; grid-template-columns: 26px 1fr; gap: 0 18px;
  padding-bottom: 26px; position: relative;
}
.rota__etapa:last-child { padding-bottom: 0; }
.rota__etapa:not(:last-child)::before {
  content: ""; position: absolute; left: 12.5px; top: 22px; bottom: 4px;
  width: 1px; background: var(--line);
}
.rota__no {
  width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--petroleo);
  background: var(--white); color: var(--petroleo); position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-variant-numeric: tabular-nums;
}
.rota__no--cofre { background: var(--petroleo); color: var(--white); }
.rota__t { font-size: 17px; font-weight: 500; margin: 2px 0 6px; }
.rota__d { font-size: 14px; color: var(--ink); line-height: 1.6; margin: 0; max-width: 62ch; }
.rota__d code, .secao code, .loja__nota code {
  font-size: 12.5px; background: var(--fog); padding: 1px 5px; border-radius: 3px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ─── os quatro papéis ────────────────────────────────────────────────────── */
.papeis {
  display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line);
  border-radius: 4px; overflow: hidden; margin: 24px 0 0;
}
@media (min-width: 760px) { .papeis { grid-template-columns: repeat(2, 1fr); } }
.papeis > div { background: var(--white); padding: 20px 22px; min-width: 0; }
.papeis dt { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--petroleo); }
.papeis dd { margin: 8px 0 0; font-size: 14px; line-height: 1.6; color: var(--ink); }
.papeis dd b { font-weight: 500; color: var(--graphite); }

/* ─── diagramas ──────────────────────────────────────────────────────────── */
.diag { margin: 0; min-width: 0; }
.diag svg { width: 100%; height: auto; display: block; }
.diag figcaption { font-size: 12.5px; color: var(--slate); line-height: 1.55; margin-top: 10px; max-width: 64ch; }
.diag-faixa { display: grid; gap: 32px; margin-top: 28px; }
@media (min-width: 860px) { .diag-faixa { grid-template-columns: 1fr 1fr; gap: 38px; } }

/* ─── a porta do app ─────────────────────────────────────────────────────── */
.porta { padding-block: 58px 66px; }
.porta .wrap { display: grid; gap: 34px; align-items: center; }
@media (min-width: 820px) { .porta .wrap { grid-template-columns: auto 1fr; } }

.aparelho {
  width: 240px; max-width: 100%; margin: 0; border-radius: 26px;
  border: 1px solid var(--line); overflow: hidden; background: var(--petroleo-noite); flex: none;
}
.aparelho img { width: 100%; height: auto; display: block; }
.aparelho figcaption {
  font-size: 11px; color: var(--mute); line-height: 1.5; padding: 10px 14px;
  background: var(--white); border-top: .5px solid var(--line);
}

.loja { display: flex; flex-direction: column; gap: 10px; }
@media (min-width: 620px) { .loja { flex-direction: row; flex-wrap: wrap; } }
.loja__op {
  display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-radius: 6px;
  border: 1px solid var(--line); font-size: 14.5px; line-height: 1.2;
  background: var(--white); color: var(--graphite);
}
.loja__op b { font-weight: 500; }
.loja__op small {
  display: block; font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--mute); margin-bottom: 2px; font-weight: 400;
}
.loja__op--web { background: var(--petroleo); border-color: var(--petroleo); color: var(--white); }
.loja__op--web small { color: rgba(255, 255, 255, .72); }
.loja__op--web:hover { background: var(--petroleo-fundo); text-decoration: none; }
.loja__op--breve { background: var(--fog); border-style: dashed; color: var(--mute); cursor: default; }
.loja__op--breve b { color: var(--slate); }
.loja__breve {
  margin-left: auto; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase;
  padding: 4px 9px; border: 1px solid var(--line); border-radius: 100px;
  color: var(--slate); background: var(--white); white-space: nowrap;
}
.loja__nota { font-size: 12.5px; color: var(--slate); margin: 14px 0 0; max-width: 62ch; }

/* ─── apoio: UMA LINHA na v1 ──────────────────────────────────────────────────
 * Cravado pelo dono em 25/out: a seção completa (cota, percentual, resgate) fica FORA da v1
 * até ele cravar o mecanismo e haver parecer. Aqui vai só a linha.
 */
.apoio {
  border-top: .5px solid var(--line); padding-block: 26px;
  font-size: 14.5px; color: var(--slate);
}
.apoio b { font-weight: 500; color: var(--graphite); }

/* ─── rodapé ─────────────────────────────────────────────────────────────── */
.pe { border-top: .5px solid var(--line); background: var(--cream); }
.pe .wrap {
  display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between;
  padding-block: 26px 34px; font-size: 12.5px; color: var(--mute);
}
.pe .lema { font-style: italic; }
