/* =========================================================
   Tangram — Política de Pagamento e Cobrança
   Identidade visual baseada em tangrambr.com/termosecondicoes
   ---------------------------------------------------------
   ÍNDICE
   1. Fontes
   2. Variáveis (cores, medidas)
   3. Reset e base
   4. Cabeçalho / navegação
   5. Conteúdo (títulos, textos, listas, links)
   6. Caixas de destaque (callouts)
   7. Tabelas
   8. Rodapé
   9. Responsivo
   ========================================================= */

/* ---------- 1. Fontes ---------- */
@font-face {
  font-family: "Poppins";
  src: url("../assets/fonts/Poppins-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("../assets/fonts/Poppins-Medium.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("../assets/fonts/Poppins-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("../assets/fonts/Poppins-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

/* ---------- 2. Variáveis ---------- */
:root {
  --roxo: #7228f3;
  --roxo-escuro: #4c19b2;
  --roxo-profundo: #3a0663;
  --roxo-tint: #f3edfe;
  --verde: #aff22c;
  --grafite: #272725;
  --texto: #3b3b39;
  --linha: #e5e5e5;
  --branco: #ffffff;

  --largura: 1000px;
  --gutter: 24px;
  --header-h: 88px;

  --fonte: "Poppins", "Helvetica Neue", Arial, sans-serif;
}

/* ---------- 3. Reset e base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--branco);
  color: var(--texto);
  font-family: var(--fonte);
  font-size: 16px;
  line-height: 1.75;
  text-wrap: pretty;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; border: 0; }

.container {
  width: 100%;
  max-width: var(--largura);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip-link {
  position: absolute;
  left: -9999px;
}
.skip-link:focus {
  left: 12px; top: 12px; z-index: 100;
  background: var(--roxo); color: #fff;
  padding: 10px 16px; border-radius: 999px;
}

/* ---------- 4. Cabeçalho ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--branco);
  border-bottom: 1px solid var(--linha);
}

.site-header__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--gutter);
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-header__logo img { width: 167px; height: auto; }

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav__link {
  font-size: 15px;
  font-weight: 600;
  color: var(--grafite);
  text-decoration: none;
  white-space: nowrap;
  transition: color 160ms ease-out;
}
.nav__link:hover { color: var(--roxo); }

.btn {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--branco);
  background: var(--roxo);
  padding: 13px 24px;
  border-radius: 999px;
  white-space: nowrap;
  transition: background 160ms ease-out, transform 160ms ease-out;
}
.btn:hover {
  background: var(--roxo-escuro);
  transform: translateY(-1px);
  color: var(--branco);
}

/* Menu mobile — toggle CSS puro */
.nav-toggle { display: none; }

.nav-burger {
  display: none;
  width: 40px;
  height: 40px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  border-radius: 999px;
}
.nav-burger span {
  display: block;
  height: 2.5px;
  border-radius: 2px;
  background: var(--roxo);
  transition: transform 180ms ease-out, opacity 140ms ease-out;
}

.nav-mobile {
  display: none;
  flex-direction: column;
  padding: 8px var(--gutter) 20px;
  border-top: 1px solid var(--linha);
  background: var(--branco);
}
.nav-mobile .nav__link {
  padding: 12px 0;
  font-size: 16px;
  min-height: 44px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--linha);
}
.nav-mobile .nav__link:last-child { border-bottom: 0; }

/* ---------- 5. Conteúdo ---------- */
.doc {
  padding: 64px 0 96px;
}

.doc__eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--roxo);
  margin: 0 0 16px;
}

.doc__title {
  font-family: var(--fonte);
  font-size: clamp(28px, 4.2vw, 42px);
  line-height: 1.15;
  font-weight: 700;
  color: var(--roxo);
  margin: 0 0 8px;
}

.doc__org {
  font-size: 15px;
  font-weight: 500;
  color: var(--grafite);
  margin: 0;
}
.doc__org span { display: block; font-weight: 400; color: var(--texto); }

.doc__rule {
  border: 0;
  border-top: 1px solid var(--linha);
  margin: 40px 0;
}

.doc h2 {
  font-size: clamp(20px, 2.4vw, 26px);
  line-height: 1.25;
  font-weight: 700;
  color: var(--roxo);
  margin: 56px 0 16px;
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.doc h3 {
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.35;
  font-weight: 600;
  color: var(--roxo-escuro);
  margin: 36px 0 12px;
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.doc p { margin: 0 0 18px; }

.doc ul {
  margin: 0 0 20px;
  padding-left: 22px;
}
.doc li { margin-bottom: 10px; }
.doc li::marker { color: var(--roxo); }

.doc strong { font-weight: 600; color: var(--grafite); }

.doc a,
.footer-legal a {
  color: var(--roxo);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.doc a:hover { color: var(--roxo-escuro); }

/* ---------- 6. Caixas de destaque ---------- */
.callout {
  background: var(--roxo-tint);
  border-radius: 16px;
  padding: 24px 28px;
  margin: 0 0 24px;
}
.callout p { margin: 0; }
.callout p + p { margin-top: 12px; }

.callout--lista ul { margin: 0; padding-left: 20px; }
.callout--lista li:last-child { margin-bottom: 0; }

.callout--aviso {
  background: #fff;
  border: 1.5px solid var(--linha);
  border-left: 4px solid var(--roxo);
}

/* ---------- 7. Tabelas ---------- */
.tabela-wrap {
  margin: 0 0 28px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 16px;
  border: 1px solid var(--linha);
}

table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 15px;
}

caption {
  caption-side: top;
  text-align: left;
  padding: 16px 18px 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--roxo);
}

thead th {
  background: var(--roxo);
  color: var(--branco);
  font-weight: 600;
  font-size: 14px;
  text-align: left;
  padding: 14px 18px;
}

tbody th {
  text-align: left;
  font-weight: 600;
  color: var(--grafite);
}

tbody td,
tbody th {
  padding: 14px 18px;
  border-top: 1px solid var(--linha);
  vertical-align: top;
  line-height: 1.55;
}

tbody tr:nth-child(even) { background: #faf8ff; }

/* ---------- 8. Rodapé ---------- */
.site-footer {
  background: var(--roxo);
  color: var(--branco);
}

.footer-cta {
  max-width: 1200px;
  margin: 0 auto;
  padding: 56px var(--gutter) 0;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 32px;
  align-items: center;
}

.footer-cta__title {
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.15;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--branco);
  margin: 0 0 24px;
  max-width: 12em;
}
.footer-cta__title a { color: inherit; text-decoration: none; }

.btn--verde {
  background: var(--verde);
  color: var(--grafite);
  box-shadow: 0 5px 0 0 #8fc71f;
}
.btn--verde:hover { background: #c2ff45; color: var(--grafite); }

.footer-cta__art { justify-self: end; }
.footer-cta__art img { width: min(340px, 100%); height: auto; }

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px var(--gutter) 40px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
}

.footer-legal {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
}
.footer-legal a { color: var(--branco); text-decoration: underline; }
.footer-legal a:hover { color: var(--verde); }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 4px;
}

.footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 18px;
}

.social {
  display: flex;
  gap: 14px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.social a {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  transition: background 160ms ease-out;
}
.social a:hover { background: var(--verde); }
.social svg { width: 17px; height: 17px; fill: var(--branco); }
.social a:hover svg { fill: var(--grafite); }

.footer-right__logo img { width: 200px; height: auto; }

/* ---------- 9. Responsivo ---------- */
@media (max-width: 900px) {
  .nav { display: none; }
  .nav-burger { display: flex; order: 3; }
  .site-header__inner { flex-wrap: wrap; }
  .nav-toggle:checked ~ .nav-burger span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  .nav-toggle:checked ~ .nav-burger span:nth-child(2) { opacity: 0; }
  .nav-toggle:checked ~ .nav-burger span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
  .nav-burger:focus-visible,
  .nav-toggle:focus-visible ~ .nav-burger { outline: 3px solid rgba(114, 40, 243, 0.35); }
  .site-header:has(.nav-toggle:checked) .nav-mobile { display: flex; }
  .footer-cta {
    grid-template-columns: 1fr;
    padding-top: 44px;
  }
  .footer-cta__art { justify-self: center; }
  .footer-cta__title { max-width: none; }
}

@media (max-width: 640px) {
  :root { --gutter: 20px; --header-h: 72px; }
  body { font-size: 15.5px; }
  .site-header__logo img { width: 138px; }
  .btn { font-size: 12px; padding: 11px 18px; }
  .doc { padding: 40px 0 64px; }
  .doc h2 { margin-top: 44px; }
  .callout { padding: 20px; border-radius: 14px; }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
  .footer-right { align-items: flex-start; }
  .footer-right__logo img { width: 168px; }
}

@media print {
  .site-header, .site-footer, .skip-link { display: none; }
  .doc { padding: 0; }
  body { font-size: 11pt; }
}
