/* ==========================================================================
   Athena Assessoria Especializada — Páginas legais
   /politica-de-privacidade/ e /termos-de-uso/ · independente do main.css
   Paleta: docs/athena-brand.md · cabeçalho no mesmo padrão da /formulario/
   ========================================================================== */

@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/instrument-sans-latin-wght.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}

:root {
  /* Paleta aprovada */
  --navy-950: #020B1C;
  --navy-900: #05132D;
  --navy-800: #0B1F45;
  --navy-700: #1A2F5C;
  --gold-500: #E5C85A;
  --gold-ink: #7A5C17;
  --off-white: #F6F3EC;
  --white: #FFFFFF;
  --ink: #1A2233;
  --text-on-dark: #F3F1EA;
  --muted-on-dark: #A9B3C6;
  --slate: #4A5468;

  --gold-500-rgb: 229 200 90;
  --navy-700-rgb: 26 47 92;
  --ink-rgb: 26 34 51;
  --light-blue-rgb: 59 91 160;

  /* Semânticos */
  --border: rgb(var(--ink-rgb) / .12);
  --heading: var(--navy-900);
  --text: var(--ink);
  --text-soft: var(--slate);

  --font-sans: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgb(var(--ink-rgb) / .05), 0 12px 32px -20px rgb(var(--ink-rgb) / .28);
  --ease-out: cubic-bezier(.22, .61, .36, 1);
  --container: 1120px;
}

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

html {
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  background: var(--off-white);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

.icon {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

:focus-visible {
  outline: 2px solid var(--navy-800);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: .75rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--gold-500);
  color: var(--navy-950);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-160%);
}

.skip-link:focus-visible { transform: none; }

/* ==========================================================================
   Cabeçalho navy
   ========================================================================== */
.topbar {
  padding: 20px 16px 84px;
  background:
    radial-gradient(60% 90% at 85% 10%, rgb(var(--light-blue-rgb) / .22), transparent 70%),
    linear-gradient(135deg, var(--navy-950) 0%, var(--navy-900) 55%, var(--navy-800) 100%);
  color: var(--text-on-dark);
}

.topbar__inner {
  max-width: var(--container);
  margin: 0 auto;
}

.topbar__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-on-dark);
  text-decoration: none;
  border-radius: 12px;
}

.brand__emblem {
  width: 56px;
  height: 56px;
  border-radius: 13px;
  box-shadow: 0 0 0 1px rgb(var(--gold-500-rgb) / .35), 0 10px 24px -12px rgb(0 0 0 / .6);
}

.brand__text {
  display: flex;
  flex-direction: column;
  gap: .45rem;
  line-height: 1;
}

.brand__name {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--white);
}

.brand__tagline {
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold-500);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 44px;
  padding: 0 .25rem;
  border-radius: 8px;
  color: var(--muted-on-dark);
  font-size: .875rem;
  font-weight: 500;
  text-decoration: none;
  transition: color .2s var(--ease-out);
}

.back-link:hover { color: var(--gold-500); }
.back-link .icon { width: 16px; height: 16px; }
.topbar :focus-visible,
.legal-footer :focus-visible { outline-color: var(--gold-500); }

.topbar__heading {
  max-width: 44rem;
  margin: clamp(32px, 5vw, 52px) auto 0;
  text-align: center;
}

/* Sobretítulo: traço fino dourado + rótulo, na linguagem de line art do logo */
.topbar__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  margin: 0 0 .875rem;
  color: var(--gold-500);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.topbar__eyebrow::before,
.topbar__eyebrow::after {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
  opacity: .7;
}

.topbar__title {
  margin: 0;
  font-size: clamp(1.875rem, 1.4rem + 2vw, 2.75rem);
  font-weight: 560;
  line-height: 1.1;
  letter-spacing: -.025em;
  text-wrap: balance;
}

.topbar__meta {
  margin: 1rem 0 0;
  color: var(--muted-on-dark);
  font-size: .9375rem;
}

@media (max-width: 479.98px) {
  .brand { gap: .75rem; }
  .brand__emblem { width: 48px; height: 48px; border-radius: 11px; }
  .brand__text { gap: .35rem; }
  .brand__name { font-size: 1.25rem; }

  .brand__tagline {
    font-size: .6875rem;
    letter-spacing: .14em;
    line-height: 1.25;
  }

  .brand__tagline > span { display: block; }
}

/* ==========================================================================
   Corpo: índice + documento
   ========================================================================== */
.legal {
  max-width: calc(var(--container) + 32px);
  margin: -52px auto 0;
  padding: 0 16px clamp(48px, 7vw, 80px);
}

.legal__layout {
  display: grid;
  gap: 20px;
}

@media (min-width: 1024px) {
  .legal__layout {
    grid-template-columns: 248px minmax(0, 1fr);
    gap: 32px;
    align-items: start;
  }
}

/* ---------- Índice ---------- */
.toc {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

.toc__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 14px 18px;
  color: var(--heading);
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  border-radius: var(--radius);
}

.toc__summary::-webkit-details-marker { display: none; }

.toc__summary::after {
  content: "";
  width: 8px;
  height: 8px;
  margin-right: 4px;
  border-right: 1.8px solid var(--gold-ink);
  border-bottom: 1.8px solid var(--gold-ink);
  transform: translateY(-2px) rotate(45deg);
  transition: transform .2s var(--ease-out);
}

.toc[open] .toc__summary::after { transform: translateY(2px) rotate(-135deg); }

.toc__list {
  margin: 0;
  padding: 4px 10px 12px;
  list-style: none;
  counter-reset: toc;
}

.toc__list a {
  display: grid;
  grid-template-columns: 1.75rem 1fr;
  align-items: baseline;
  padding: .5rem .5rem;
  border-radius: 8px;
  color: var(--text-soft);
  font-size: .875rem;
  line-height: 1.4;
  text-decoration: none;
  transition: color .15s var(--ease-out), background-color .15s var(--ease-out);
}

.toc__list a::before {
  counter-increment: toc;
  content: counter(toc, decimal-leading-zero);
  color: var(--gold-ink);
  font-size: .75rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.toc__list a:hover { color: var(--heading); background: var(--off-white); }

.toc__list a[aria-current="location"] {
  color: var(--heading);
  background: var(--off-white);
  font-weight: 600;
}

@media (min-width: 1024px) {
  .toc {
    position: sticky;
    top: 24px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
  }

  /* No desktop o índice fica sempre aberto (legal.js abre o <details>) */
  .toc__summary {
    min-height: 0;
    padding: 18px 18px 8px;
    color: var(--text-soft);
    font-size: .75rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    pointer-events: none;
  }

  .toc__summary::after { display: none; }
}

/* ---------- Documento ---------- */
.doc {
  min-width: 0;
  padding: clamp(24px, 4vw, 56px) clamp(20px, 5vw, 64px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

.doc__intro {
  max-width: 68ch;
  margin: 0 0 1.25rem;
  color: var(--heading);
  font-size: clamp(1.0625rem, 1rem + .3vw, 1.1875rem);
  line-height: 1.6;
}

/* Identificação da empresa */
.doc__id {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 24px;
  max-width: 68ch;
  margin: 1.75rem 0 0;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-left: 2px solid var(--gold-500);
  border-radius: var(--radius-sm);
  background: #FBFAF6;
}

.doc__id div { min-width: 0; }

.doc__id dt {
  color: var(--text-soft);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.doc__id dd {
  margin: .25rem 0 0;
  color: var(--heading);
  font-size: .9375rem;
  font-weight: 500;
  overflow-wrap: anywhere;
}

@media (max-width: 559.98px) {
  .doc__id { grid-template-columns: 1fr; }
}

.doc__section {
  max-width: 68ch;
  margin-top: clamp(32px, 4vw, 44px);
  padding-top: clamp(28px, 3.5vw, 40px);
  border-top: 1px solid var(--border);
  counter-increment: doc;
}

.doc { counter-reset: doc; }

.doc h2 {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: .875rem;
  margin: 0 0 1rem;
  color: var(--heading);
  font-size: clamp(1.25rem, 1.1rem + .6vw, 1.5rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -.015em;
  text-wrap: balance;
}

.doc h2::before {
  content: counter(doc, decimal-leading-zero);
  color: var(--gold-ink);
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .06em;
  font-variant-numeric: tabular-nums;
}

.doc h3 {
  margin: 1.75rem 0 .5rem;
  color: var(--heading);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.35;
}

.doc p,
.doc li { color: var(--text); }

.doc p { margin: 0 0 1rem; }

.doc ul {
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}

.doc li {
  position: relative;
  margin: 0 0 .5rem;
  padding-left: 1.25rem;
}

.doc li::before {
  content: "";
  position: absolute;
  top: .68em;
  left: .1rem;
  width: 6px;
  height: 6px;
  border: 1.5px solid var(--gold-ink);
  border-radius: 50%;
}

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

.doc a {
  color: var(--navy-800);
  text-decoration: underline;
  text-decoration-color: rgb(var(--navy-700-rgb) / .35);
  text-underline-offset: .2em;
  overflow-wrap: anywhere;
  transition: color .15s var(--ease-out), text-decoration-color .15s var(--ease-out);
}

.doc a:hover { color: var(--gold-ink); text-decoration-color: currentColor; }

/* Destaque de leitura (ex.: o site não substitui a contratação formal) */
.doc__note {
  margin: 1.25rem 0;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  background: var(--off-white);
  color: var(--heading);
}

.doc__note p:last-child { margin-bottom: 0; }

/* Navegação entre documentos, no fim do texto */
.doc__related {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  max-width: 68ch;
  margin-top: clamp(32px, 4vw, 44px);
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.doc .doc__related a {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 44px;
  padding: 0 18px;
  border: 1.5px solid rgb(var(--ink-rgb) / .2);
  border-radius: 999px;
  color: var(--heading);
  font-size: .9375rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color .15s var(--ease-out), background-color .15s var(--ease-out);
}

.doc .doc__related a:hover { border-color: var(--gold-ink); background: var(--off-white); color: var(--heading); }
.doc__related .icon { width: 16px; height: 16px; }

/* ==========================================================================
   Rodapé
   ========================================================================== */
.legal-footer {
  padding: 32px 16px calc(32px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgb(var(--navy-700-rgb) / .6);
  background: var(--navy-950);
  color: var(--muted-on-dark);
  font-size: .8125rem;
}

.legal-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 32px;
  max-width: var(--container);
  margin: 0 auto;
}

.legal-footer__id {
  display: grid;
  gap: .25rem;
}

.legal-footer__id p { margin: 0; }
.legal-footer .nowrap { white-space: nowrap; }

.legal-footer a {
  display: inline-block;
  padding: .375rem 0;
  color: var(--muted-on-dark);
  text-decoration: underline;
  text-decoration-color: rgb(var(--navy-700-rgb));
  text-underline-offset: .25em;
  transition: color .15s var(--ease-out), text-decoration-color .15s var(--ease-out);
}

.legal-footer__id a { padding: 0; }

.legal-footer a:hover,
.legal-footer a[aria-current="page"] {
  color: var(--text-on-dark);
  text-decoration-color: var(--gold-500);
}

.legal-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5rem;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    transition-duration: .01ms !important;
  }
}
