/* BrazilAPI — landing
   Palette: mata (deep green), folha (brand green), ouro (yellow), anil (brand blue), papel (page), tinta (ink) */
:root {
  --mata: #0B3B2A;
  --mata-2: #0F4D37;
  --folha: #0B6B45;
  --ouro: #FFD23F;
  --ouro-2: #F2BC00;
  --anil: #0033CC;
  --papel: #F6F8F4;
  --tint: #EAF0E8;
  --tinta: #0F1B15;
  --muted: #4B5A51;
  --line: #D5DED6;
  --white: #fff;

  --f-display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --f-body: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  --r: 14px;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 32px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--papel);
  color: var(--tinta);
  font: 400 17px/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.05; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--anil); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ouro); padding: 8px 14px; z-index: 100; border-radius: 8px; }
.skip:focus { left: 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 24px; border-radius: 999px;
  font: 600 16px/1 var(--f-body); text-decoration: none; white-space: nowrap;
  border: 2px solid transparent; cursor: pointer;
  transition: transform .15s ease, background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--sm { min-height: 40px; padding: 0 16px; font-size: 15px; }
.btn--sun { background: var(--ouro); color: var(--mata); }
.btn--sun:hover { background: var(--ouro-2); }
.btn--line { border-color: var(--tinta); color: var(--tinta); }
.btn--line:hover { background: var(--tinta); color: var(--papel); }
.btn--ghost { color: var(--tinta); }
.btn--ghost:hover { background: var(--tint); }
.btn--onDark { border-color: rgba(255,255,255,.4); color: var(--white); }
.btn--onDark:hover { border-color: var(--white); background: rgba(255,255,255,.08); }

/* ---------- Header ---------- */
.top {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246, 248, 244, .88);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.top.is-scrolled { border-bottom-color: var(--line); }
.top__in { display: flex; align-items: center; gap: 24px; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand__mark { width: 36px; height: 36px; }
.brand__name { font: 800 26px/1 var(--f-display); letter-spacing: .01em; color: var(--tinta); }
.brand__name b { color: var(--folha); font-weight: 900; }

.nav { display: flex; gap: 28px; margin-left: 12px; }
.nav a { text-decoration: none; font-weight: 500; font-size: 15px; color: var(--muted); }
.nav a:hover { color: var(--tinta); }

.top__actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.burger { display: none; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; position: relative; }
.burger span { position: absolute; left: 11px; right: 11px; height: 2px; background: var(--tinta); border-radius: 2px; transition: transform .2s; }
.burger span:first-child { top: 17px; }
.burger span:last-child { top: 25px; }
.burger[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { padding: clamp(40px, 7vw, 88px) 0 clamp(56px, 8vw, 104px); overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font: 500 13px/1 var(--f-mono); color: var(--folha); text-transform: uppercase; letter-spacing: .06em;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--folha); }
.hero__title {
  margin-top: 20px;
  font: 900 clamp(50px, 6.4vw, 88px)/.92 var(--f-display);
  letter-spacing: -.005em; text-transform: uppercase;
}
.hero__title em {
  font-style: normal; display: block; color: var(--folha);
}
.hero__lead { margin-top: 24px; max-width: 34em; font-size: clamp(17px, 1.6vw, 19px); color: var(--muted); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero__facts {
  list-style: none; padding: 0; margin: 40px 0 0;
  display: flex; flex-wrap: wrap; gap: 12px 28px;
  font-size: 14px; color: var(--muted);
}
.hero__facts strong { font: 600 14px/1 var(--f-mono); color: var(--tinta); margin-right: 4px; }

/* ---------- Rate board (signature) ---------- */
.board {
  margin: 0; background: var(--mata); color: #E7F2EA;
  border-radius: 20px; padding: 22px 22px 18px;
  box-shadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 30px 60px -30px rgba(11,59,42,.55);
  position: relative;
}
.board::after { /* thin flag stripe */
  content: ""; position: absolute; left: 22px; right: 22px; top: 0; height: 4px;
  background: linear-gradient(90deg, var(--folha) 0 40%, var(--ouro) 40% 70%, var(--anil) 70%);
  border-radius: 0 0 4px 4px;
}
.board__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 6px 2px 14px; }
.board__title { font: 800 22px/1 var(--f-display); text-transform: uppercase; letter-spacing: .04em; color: var(--white); }
.board__live { display: inline-flex; align-items: center; gap: 8px; font: 400 12px/1 var(--f-mono); color: #9FC3AE; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: #3DDC84; box-shadow: 0 0 0 0 rgba(61,220,132,.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(61,220,132,0); } 100% { box-shadow: 0 0 0 0 rgba(61,220,132,0); } }

.board__table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.board__table th {
  font: 500 11px/1 var(--f-mono); text-transform: uppercase; letter-spacing: .08em; color: #86AB96;
  text-align: left; padding: 10px 8px; border-bottom: 1px solid rgba(255,255,255,.12);
}
.board__table td { padding: 11px 8px; white-space: nowrap; border-bottom: 1px dashed rgba(255,255,255,.1); }
.board__table tbody tr:last-child td { border-bottom: 0; }
.board__table tbody tr { transition: background-color .2s; }
.board__table tbody tr:hover { background: rgba(255,255,255,.04); }
.num { text-align: right !important; font-family: var(--f-mono); white-space: nowrap; }
td.num { color: #B8D3C3; font-size: 13px; }
td.rate { color: var(--ouro); font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tag {
  display: inline-block; font: 600 11px/1 var(--f-mono); text-transform: uppercase; letter-spacing: .04em;
  padding: 5px 7px; border-radius: 5px; margin-right: 6px; vertical-align: 1px;
  background: rgba(255,255,255,.08); color: var(--white);
}
.flag, .refill {
  display: inline-block; font: 600 10px/1 var(--f-mono); padding: 3px 5px; border-radius: 4px; margin-left: 4px; vertical-align: 2px;
}
.flag { background: var(--ouro); color: var(--mata); }
.refill { border: 1px solid #3DDC84; color: #3DDC84; }
.board__cap { margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.12); font-size: 12.5px; color: #86AB96; }

/* row-by-row arrival on load — desktop only, where the board is visible above the fold */
@media (min-width: 901px) {
  .js .board__table tbody tr { animation: rowIn .45s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--i, 0) * 70ms + 150ms); }
}
@keyframes rowIn { from { opacity: 0; transform: translateY(6px); } }

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section--tint { background: var(--tint); }
.sec-head { max-width: 720px; margin-bottom: clamp(32px, 5vw, 56px); }
.sec-title { font: 900 clamp(40px, 5.6vw, 68px)/.95 var(--f-display); text-transform: uppercase; }
.sec-lead { margin-top: 18px; color: var(--muted); font-size: clamp(16px, 1.5vw, 18px); max-width: 38em; }

/* Platforms */
.plats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.plat {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r);
  padding: 26px 22px 22px; display: flex; flex-direction: column; gap: 12px;
  border-top: 5px solid var(--c, var(--folha));
}
.plat--tt { --c: #111; }
.plat--kw { --c: #FF7A00; }
.plat--ks { --c: #FF4906; }
.plat--sv { --c: #FFC800; }
.plat h3 { font: 800 32px/1 var(--f-display); text-transform: uppercase; }
.plat p { color: var(--muted); font-size: 15px; flex: 1; }
.plat__rates { margin: 8px 0 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.plat__rates div { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--line); }
.plat__rates dt { font-size: 14px; color: var(--muted); }
.plat__rates dd { margin: 0; font: 600 15px/1 var(--f-mono); }
.plat__rates dd span { font: 400 12px/1 var(--f-body); color: var(--muted); margin-right: 4px; }
.note { margin-top: 24px; }
.note a { font-weight: 600; color: var(--folha); text-underline-offset: 4px; }

/* Why */
.why { display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.why__title { position: sticky; top: 110px; }
.why__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.why__list li { padding: 28px 28px 28px 0; border-top: 2px solid var(--tinta); }
.why__list li:nth-child(odd) { padding-right: 32px; }
.why__list h3 { font: 600 20px/1.25 var(--f-body); }
.why__list p { margin-top: 10px; color: var(--muted); font-size: 15.5px; }

/* API */
.api { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.ticks { list-style: none; padding: 0; margin: 28px 0 32px; display: grid; gap: 12px; }
.ticks li { position: relative; padding-left: 30px; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .35em; width: 18px; height: 18px; border-radius: 50%;
  background: var(--folha) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.4 6.8 11 12 5.4' stroke='white' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat;
}
.code { background: #0D1612; border-radius: 16px; overflow: hidden; box-shadow: 0 30px 60px -30px rgba(0,0,0,.45); min-width: 0; }
.code__bar { display: flex; align-items: center; gap: 6px; padding: 12px 16px; background: #15211B; }
.code__bar span { width: 10px; height: 10px; border-radius: 50%; background: #2C3B33; }
.code__bar em { margin-left: auto; font: 400 12px/1 var(--f-mono); font-style: normal; color: #7E9A8A; }
.code pre { margin: 0; padding: 22px 20px; overflow-x: auto; font: 400 13.5px/1.75 var(--f-mono); color: #D7E5DC; }
.c-k { color: var(--ouro); }
.c-s { color: #8FE3B0; }
.c-n { color: #9DB8FF; }
.c-c { color: #6C8578; }

/* Steps */
.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.steps li { counter-increment: s; background: var(--white); border-radius: var(--r); padding: 28px 24px; border: 1px solid var(--line); }
.steps li::before {
  content: counter(s); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--mata); color: var(--ouro); font: 800 22px/1 var(--f-display); margin-bottom: 20px;
}
.steps h3 { font: 600 20px/1.25 var(--f-body); }
.steps p { margin-top: 8px; color: var(--muted); font-size: 15.5px; }

/* FAQ */
.faq { display: grid; grid-template-columns: 1fr 2fr; gap: clamp(24px, 5vw, 72px); }
.faq__list { border-top: 2px solid var(--tinta); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 22px 44px 22px 0; position: relative;
  font: 600 18px/1.35 var(--f-body);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 12px; height: 12px; margin-top: -8px;
  border-right: 2px solid var(--tinta); border-bottom: 2px solid var(--tinta); transform: rotate(45deg); transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details p { padding: 0 0 24px; color: var(--muted); max-width: 40em; }

/* Final CTA */
.final { background: var(--mata); color: var(--white); padding: clamp(64px, 9vw, 112px) 0; position: relative; overflow: hidden; }
.final::before {
  content: ""; position: absolute; right: -120px; top: 50%; width: 420px; height: 420px; margin-top: -210px;
  background: var(--ouro); opacity: .1; transform: rotate(45deg); border-radius: 24px;
}
.final__in { position: relative; display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 32px; }
.final__title { font: 900 clamp(40px, 6vw, 76px)/.95 var(--f-display); text-transform: uppercase; max-width: 12em; }
.final__cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* Footer */
.foot { background: #072619; color: #A9C2B3; padding: 40px 0; font-size: 14.5px; }
.foot__in { display: flex; flex-wrap: wrap; gap: 24px 48px; align-items: center; justify-content: space-between; }
.foot .brand__name { color: var(--white); font-size: 24px; }
.foot .brand__name b { color: var(--ouro); }
.foot__brand p { margin-top: 6px; }
.foot__links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot__links a { text-decoration: none; }
.foot__links a:hover { color: var(--white); text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Responsive ---------- */
@media (max-width: 1040px) {
  .plats { grid-template-columns: repeat(2, 1fr); }
  .why { grid-template-columns: 1fr; }
  .why__title { position: static; }
}
@media (min-width: 901px) and (max-width: 1140px) {
  .board__table th:nth-child(2), .board__table td:nth-child(2) { display: none; }
}
@media (max-width: 900px) {
  .hero__grid, .api, .faq { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .burger { display: block; }
  .nav {
    position: absolute; left: 0; right: 0; top: 72px; margin: 0;
    flex-direction: column; gap: 0; background: var(--papel); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 16px; display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 14px 0; font-size: 17px; color: var(--tinta); border-bottom: 1px solid var(--line); }
  .nav a:last-child { border-bottom: 0; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .hide-sm { display: none; }
  .top__in { gap: 12px; }
  .brand__name { font-size: 22px; }
  .brand__mark { width: 32px; height: 32px; }
  .top__actions .btn--sun { padding: 0 12px; font-size: 14px; }
  .plats { grid-template-columns: 1fr; }
  .why__list { grid-template-columns: 1fr; }
  .why__list li, .why__list li:nth-child(odd) { padding-right: 0; }
  .board { padding: 18px 12px 14px; border-radius: 16px; }
  .board::after { left: 12px; right: 12px; }
  .board__table { font-size: 13.5px; }
  .board__table th:nth-child(2), .board__table td:nth-child(2) { display: none; }
  .board__table td, .board__table th { padding-left: 4px; padding-right: 4px; }
  .hero__cta .btn, .final__cta .btn { flex: 1 1 100%; }
  .code pre { font-size: 12px; padding: 18px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
