/* O Corre · Termos de uso e Política de privacidade
   Paleta oficial (Documento de Descoberta §2.6), a mesma da landing:
   só as seis cores e misturas delas.
   A página também abre dentro do app: respeita as áreas seguras (notch, barra de gestos)
   e mantém alvos de toque de pelo menos 44 px. */

:root {
  --hemp: #6A7F53;
  --hemp-dark: #5A6D46;
  --hemp-alt: #8FA26A;
  --lime: #C2E2AD;
  --moss: #3F4A32;
  --sand: #E5E2D3;
  --asphalt: #14170F;

  --elevated: #292B23;
  --paper: #FAF9F6;
  --paper-2: #F2F1E9;

  --ink: var(--asphalt);
  --ink-soft: #4E5345;
  --on-dark: #F2F1E9;
  --on-dark-soft: rgb(229 226 211 / 0.72);
  --line-dark: rgb(229 226 211 / 0.12);
  --line-light: rgb(20 23 15 / 0.12);

  --display: "Archivo", "Manrope", system-ui, sans-serif;
  --text: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --bar: 68px;
  --safe-top: env(safe-area-inset-top, 0px);
  --r-sm: 12px;
  --r-md: 18px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--bar) + var(--safe-top) + 24px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--text); font-size: 17px; line-height: 1.7;
  color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--hemp); outline-offset: 3px; border-radius: 6px; }
.bar :focus-visible, .help :focus-visible, .foot :focus-visible { outline-color: var(--lime); }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--lime); color: var(--asphalt); padding: 10px 16px;
  border-radius: var(--r-sm); font-weight: 700; text-decoration: none;
}
.skip:focus { top: calc(16px + var(--safe-top)); }
.wrap {
  width: 100%; max-width: var(--wrap); margin: 0 auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

/* ─────────── Barra fixa com o logo e o seletor ─────────── */
.bar {
  position: sticky; top: 0; z-index: 50; color: var(--on-dark);
  padding-top: var(--safe-top);
  background: rgb(20 23 15 / .94);
  backdrop-filter: saturate(140%) blur(14px); -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line-dark);
}
.bar__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: var(--bar); }
.bar__logo { flex: none; }
.bar__logo img { height: 32px; width: auto; }

.switch {
  position: relative; display: inline-grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 999px;
  background: var(--elevated); border: 1px solid var(--line-dark);
}
.switch a {
  position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center;
  padding: 8px 20px; min-height: 44px; border-radius: 999px; font-weight: 800; font-size: 15px;
  color: var(--on-dark-soft); text-decoration: none; transition: color .25s; white-space: nowrap;
}
.switch a:hover { color: var(--on-dark); }
/* A escolha vem do data-doc (definido antes da pintura), não do JS que roda depois. */
[data-doc="termos"] .switch [aria-controls="doc-termos"],
[data-doc="privacidade"] .switch [aria-controls="doc-privacidade"] { color: var(--asphalt); }
.switch__pill {
  position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 999px;
  background: var(--lime); transition: transform .35s var(--ease);
}
[data-doc="privacidade"] .switch__pill { transform: translateX(100%); }
.switch .short { display: none; }

/* ─────────── Header: o cenário verde com o mascote ───────────
   Parede verde iluminada pela direita, chão um tom abaixo, o mascote 3D em pé ou sentado
   e a silhueta dele projetada na parede como sombra. */
.hero {
  --cut: clamp(36px, 6vw, 88px);
  --floor: clamp(96px, 12vw, 150px);
  position: relative; overflow: hidden; color: var(--ink);
  background:
    radial-gradient(55% 85% at 82% 32%, rgb(194 226 173 / .62), transparent 72%),
    linear-gradient(0deg, rgb(63 74 50 / .34), rgb(63 74 50 / .14) var(--floor), transparent var(--floor)),
    var(--hemp-alt);
  padding: clamp(40px, 6vw, 80px) 0 calc(var(--cut) + 22px);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 calc(100% - var(--cut)));
}
.hero__stripes {
  position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(-22deg, rgb(20 23 15 / .035) 0 1px, transparent 1px 22px);
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.hero__grid {
  position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 40%);
  gap: clamp(24px, 4vw, 56px); align-items: end;
}
.hero__copy { min-width: 0; align-self: center; padding-bottom: 12px; }
.hero__title {
  font-family: var(--display); font-stretch: 72%; font-variation-settings: "wdth" 72;
  font-weight: 900; text-transform: uppercase; font-size: clamp(54px, 8.2vw, 128px); line-height: .86; letter-spacing: -0.01em;
  color: var(--asphalt);
}
.hero__title span { display: block; }
.hero__lead { margin-top: 24px; max-width: 520px; font-size: clamp(18px, 2vw, 21px); line-height: 1.5; color: rgb(20 23 15 / .88); }
.hero__meta {
  margin-top: 26px; padding-top: 16px; border-top: 1px solid rgb(20 23 15 / .2);
  display: flex; flex-wrap: wrap; gap: 6px 28px; font-size: 14px; color: rgb(20 23 15 / .72);
}
.hero__meta b { color: var(--asphalt); font-weight: 800; }

.scene { --h: clamp(300px, 34vw, 480px); position: relative; height: var(--h); }
.pose { position: absolute; inset: 0; transition: opacity .45s var(--ease), transform .55s var(--ease); }
.pose__fig { position: absolute; right: 0; bottom: 0; height: 100%; width: auto; max-width: none; }
.pose--sentado .pose__fig { height: 96%; right: -2%; }
.pose__shadow {
  position: absolute; bottom: 6%; background: var(--moss); opacity: .3; filter: blur(1.5px);
  -webkit-mask: var(--src) center bottom / contain no-repeat;
          mask: var(--src) center bottom / contain no-repeat;
  transform: skewX(-14deg); transform-origin: bottom;
}
.pose--pe .pose__shadow { --src: url("sombra-em-pe.png"); aspect-ratio: 246 / 720; height: 92%; right: calc(var(--h) * .3); }
.pose--sentado .pose__shadow { --src: url("sombra-sentado.png"); aspect-ratio: 478 / 720; height: 84%; right: calc(var(--h) * .26); }
[data-doc="termos"] .pose--sentado,
[data-doc="privacidade"] .pose--pe { opacity: 0; transform: translateY(16px); }

/* O balão fica à esquerda da cabeça, com a ponta (canto inferior direito) virada para ela.
   As distâncias acompanham a altura do mascote (--h). */
.hero__balloon {
  position: absolute; z-index: 2; width: max-content; max-width: 200px;
  padding: 10px 14px; border-radius: 16px 16px 4px 16px; background: var(--paper); color: var(--asphalt);
  font-weight: 800; font-size: 14px; line-height: 1.35; box-shadow: 0 16px 32px -14px rgb(20 23 15 / .55);
}
.hero__balloon[data-for="termos"] { top: calc(var(--h) * .02); right: calc(var(--h) * .27); }
.hero__balloon[data-for="privacidade"] { top: 0; right: calc(var(--h) * .4); }

/* Sem JS os dois documentos aparecem um depois do outro; com JS, só o escolhido. */
[data-doc="termos"] [data-for="privacidade"],
[data-doc="privacidade"] [data-for="termos"] { display: none !important; }

/* ─────────── Resumo ─────────── */
.summary { background: var(--sand); margin-top: calc(clamp(36px, 6vw, 88px) * -1); padding: calc(clamp(36px, 6vw, 88px) + 48px) 0 clamp(48px, 6vw, 72px); }
.summary__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; }
.summary h2 {
  font-family: var(--display); font-stretch: 72%; font-variation-settings: "wdth" 72; font-weight: 900; text-transform: uppercase;
  font-size: clamp(34px, 4.4vw, 54px); line-height: .95; letter-spacing: -0.01em;
}
.summary__note { font-size: 14px; color: var(--ink-soft); max-width: 420px; }
.summary__list { margin: 32px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 32px; }
.summary__list li { display: grid; grid-template-columns: 28px 1fr; gap: 14px; padding: 20px 0; border-top: 1px solid rgb(20 23 15 / .14); }
.summary__list li::before {
  content: ""; width: 28px; height: 28px; border-radius: 50%; margin-top: 2px;
  background: var(--moss) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C2E2AD' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4L18 8'/%3E%3C/svg%3E") center / 16px no-repeat;
}
.summary__list b { display: block; font-weight: 800; font-size: 17px; line-height: 1.35; letter-spacing: -0.01em; }
.summary__list span { display: block; margin-top: 4px; font-size: 15px; line-height: 1.55; color: var(--ink-soft); }

/* ─────────── Corpo: índice + texto ─────────── */
.body { padding: clamp(48px, 7vw, 88px) 0 clamp(64px, 8vw, 104px); }
.body__grid { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: start; }

.toc {
  position: sticky; top: calc(var(--bar) + var(--safe-top) + 24px);
  max-height: calc(100vh - var(--bar) - var(--safe-top) - 48px); overflow: auto; font-size: 14px;
}
.toc__toggle { display: none; }
.toc__title { font-weight: 800; font-size: 14px; color: var(--ink); margin-bottom: 10px; }
.toc ol { margin: 0; padding: 0; list-style: none; border-left: 2px solid var(--line-light); }
.toc a {
  display: grid; grid-template-columns: 26px 1fr; gap: 4px; align-items: center; padding: 6px 0 6px 14px; margin-left: -2px;
  border-left: 2px solid transparent; color: var(--ink-soft); text-decoration: none; line-height: 1.4;
  transition: color .2s, border-color .2s;
}
.toc a span { font-variant-numeric: tabular-nums; color: var(--hemp); font-weight: 700; }
.toc a:hover { color: var(--ink); }
.toc a[aria-current] { color: var(--ink); font-weight: 700; border-left-color: var(--hemp); }

.doc { max-width: 72ch; }
.clause { padding-top: 40px; margin-top: 40px; border-top: 1px solid var(--line-light); }
.clause:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.clause__head {
  display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: baseline; margin-bottom: 18px;
  font-size: clamp(22px, 2.4vw, 27px); line-height: 1.2; font-weight: 800; letter-spacing: -0.02em;
}
.clause__n {
  font-family: var(--display); font-stretch: 72%; font-variation-settings: "wdth" 72; font-weight: 900;
  font-size: 44px; line-height: .8; color: var(--hemp); font-variant-numeric: tabular-nums; min-width: 1.4ch;
}
.clause h3 { margin: 26px 0 8px; font-size: 18px; font-weight: 800; letter-spacing: -0.01em; }
.clause > :is(p, ul, ol, .box, .table) + :is(p, ul, ol, .box, .table) { margin-top: 14px; }
.clause ul, .clause ol { margin: 0; padding-left: 22px; }
.clause li { padding-left: 4px; }
.clause li + li { margin-top: 8px; }
.clause ul li::marker { color: var(--hemp); }
.clause ol li::marker { color: var(--hemp); font-weight: 700; }
.clause strong { font-weight: 800; }
.clause a { color: var(--hemp-dark); font-weight: 700; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.clause a:hover { color: var(--moss); }
.clause, .summary__list span, .table td { overflow-wrap: anywhere; }

.box {
  padding: 16px 20px; border-left: 3px solid var(--hemp); border-radius: 0 var(--r-sm) var(--r-sm) 0;
  background: rgb(229 226 211 / .55); color: var(--ink); font-size: 16px;
}
.box strong { color: var(--moss); }

.table { overflow-x: auto; border-radius: var(--r-sm); border: 1px solid var(--line-light); background: #fff; }
.table table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.table th, .table td { text-align: left; vertical-align: top; padding: 12px 16px; border-bottom: 1px solid var(--line-light); }
.table tr:last-child td { border-bottom: 0; }
.table thead th { background: var(--paper-2); font-size: 14px; font-weight: 800; color: var(--moss); }
.table td:first-child { font-weight: 700; min-width: 150px; }

.doc__next { margin-top: 56px; padding-top: 28px; border-top: 2px solid var(--asphalt); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.doc__next p { font-weight: 800; font-size: 18px; letter-spacing: -0.01em; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 24px; border-radius: 999px; border: 2px solid transparent;
  font-weight: 800; font-size: 15px; text-decoration: none; cursor: pointer;
  transition: transform .2s var(--ease), background-color .2s, color .2s, border-color .2s;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.btn--dark { background: var(--moss); color: var(--paper); }
.btn--dark:hover { background: var(--hemp-dark); }
.btn--light { background: var(--lime); color: var(--asphalt); }
.btn--light:hover { background: #d2ebc1; }
.btn--ghost { border-color: rgb(229 226 211 / .35); color: var(--on-dark); }
.btn--ghost:hover { border-color: var(--lime); color: var(--lime); }

/* ─────────── Ajuda ─────────── */
.help { position: relative; overflow: hidden; background: var(--moss); color: var(--on-dark); padding: clamp(56px, 7vw, 88px) 0; }
.help__grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: center; }
.help h2 {
  font-family: var(--display); font-stretch: 72%; font-variation-settings: "wdth" 72; font-weight: 900; text-transform: uppercase;
  font-size: clamp(36px, 5vw, 64px); line-height: 1.02;
}
.help p { margin-top: 14px; max-width: 520px; color: var(--on-dark-soft); }
.help__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.help dl { margin: 28px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 20px; font-size: 15px; }
.help dt { color: var(--on-dark-soft); }
.help dd { margin: 0; font-weight: 700; }

.foot {
  background: #0D0F0A; color: var(--on-dark-soft); font-size: 14px;
  padding: 20px 0 calc(20px + env(safe-area-inset-bottom, 0px));
}
.foot__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; }
.foot img { height: 28px; width: auto; }
.foot nav { display: flex; flex-wrap: wrap; gap: 0 20px; }
.foot a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.foot a:hover { color: var(--lime); }

/* ─────────── Responsivo ─────────── */
@media (max-width: 960px) {
  .body__grid { grid-template-columns: 1fr; }
  .toc { position: static; max-height: none; overflow: visible; border: 1px solid var(--line-light); border-radius: var(--r-md); background: #fff; }
  .js .toc__toggle {
    display: flex; width: 100%; min-height: 52px; align-items: center; justify-content: space-between; gap: 12px;
    padding: 12px 18px; border: 0; background: none; cursor: pointer; font-weight: 800; font-size: 15px; text-align: left;
  }
  .toc__toggle svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; transition: transform .25s var(--ease); }
  .toc.is-open .toc__toggle svg { transform: rotate(180deg); }
  .toc__body { padding: 4px 18px 12px; }
  .toc a { min-height: 44px; font-size: 15px; }
  .js .toc__body { display: none; padding-top: 0; }
  .js .toc.is-open .toc__body { display: block; }
  .js .toc__title { display: none; }
  .summary__list { grid-template-columns: 1fr 1fr; }
  .help__grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  :root { --bar: 60px; }
  body { font-size: 16px; }
  .bar__logo img { height: 26px; }
  .switch a { padding: 8px 14px; font-size: 14px; }
  .switch .long { display: none; }
  .switch .short { display: inline; }
  .hero { --floor: 92px; padding-top: 36px; padding-bottom: calc(var(--cut) + 12px); }
  .hero__grid { grid-template-columns: 1fr; gap: 20px; }
  .hero__copy { padding-bottom: 0; }
  .hero__title { font-size: 15vw; }
  .scene { --h: 250px; }
  .hero__balloon { font-size: 13px; max-width: 210px; padding: 8px 12px; }
  .summary__list { grid-template-columns: 1fr; }
  .clause__head { gap: 12px; }
  .clause__n { font-size: 36px; }
  .doc__next .btn { width: 100%; }
  .help__actions .btn { flex: 1 1 100%; }
  .help dl { grid-template-columns: 1fr; gap: 0; }
  .help dd + dt { margin-top: 10px; }
  .foot__inner { flex-direction: column; align-items: flex-start; }
}

/* Celular deitado ou janela baixa: o cenário encolhe para o texto continuar perto do topo. */
@media (max-height: 520px) and (orientation: landscape) {
  .scene { --h: 230px; }
  .hero { padding-top: 28px; }
}

/* Tabelas viram cartões empilhados em telas estreitas: cada linha é um cartão com o rótulo em cima. */
@media (max-width: 560px) {
  .table { overflow: visible; border: 0; border-radius: 0; background: none; }
  .table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .table table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { padding: 14px 16px; background: #fff; border: 1px solid var(--line-light); border-radius: var(--r-sm); }
  .table tr + tr { margin-top: 10px; }
  .table td, .table tr:last-child td { padding: 0; border: 0; }
  .table td:first-child { min-width: 0; margin-bottom: 4px; color: var(--moss); }
}

@media (max-width: 380px) {
  .bar__inner { gap: 10px; }
  .bar__logo img { height: 21px; }
  .switch a { padding: 8px 10px; font-size: 13px; }
}

/* Tablet deitado usa o índice lateral, mas é tela de toque: links com 44 px de altura. */
@media (pointer: coarse) {
  .toc a { min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ─────────── Impressão: só o documento escolhido, em preto no branco ─────────── */
@media print {
  .bar, .skip, .scene, .hero__stripes, .toc, .help, .foot, .doc__next, .summary { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .hero { clip-path: none; background: none; color: #000; padding: 0 0 16pt; }
  .hero::after { display: none; }
  .hero__grid { display: block; }
  .hero__title { font-size: 40pt; }
  .hero__lead, .hero__meta, .hero__meta b { color: #000; }
  .body { padding: 0; }
  .body__grid { display: block; }
  .doc { max-width: none; }
  .clause { break-inside: avoid-page; }
}
