/* ResumeAe — legal pages
   Self-contained. No external fonts, no CDN, no trackers. */

:root {
  --paper:      #faf9f6;
  --surface:    #ffffff;
  --ink:        #1a1918;
  --ink-soft:   #4d4a46;
  --ink-faint:  #7a7570;
  --rule:       #e5e1da;
  --accent:     #c2410c;
  --accent-soft:#fdf1e9;
  --focus:      #0f62d6;
  --radius:     10px;
  --measure:    44rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:      #14130f;
    --surface:    #1c1b17;
    --ink:        #f0ede7;
    --ink-soft:   #bab5ac;
    --ink-faint:  #8d877e;
    --rule:       #2f2d27;
    --accent:     #f97316;
    --accent-soft:#2a1d13;
    --focus:      #78a9ff;
  }
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ---------- language switching ---------- */
[data-lang] { display: none; }
html[data-active-lang="pt"] [data-lang="pt"],
html[data-active-lang="en"] [data-lang="en"] { display: revert; }
html:not([data-active-lang]) [data-lang="pt"] { display: revert; }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem clamp(1rem, 5vw, 2rem);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--rule);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 650;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-decoration: none;
  font-size: 1.02rem;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.lang-switch {
  margin-left: auto;
  display: inline-flex;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 2px;
  background: var(--surface);
}

.lang-switch button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-faint);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  cursor: pointer;
}

.lang-switch button[aria-pressed="true"] {
  background: var(--accent-soft);
  color: var(--accent);
}

.lang-switch button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* ---------- layout ---------- */
main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 3.5rem) clamp(1rem, 5vw, 2rem) 4rem;
}

.eyebrow {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.6rem;
}

h1 {
  font-size: clamp(1.85rem, 5vw, 2.4rem);
  line-height: 1.18;
  letter-spacing: -0.025em;
  margin: 0 0 0.5rem;
}

h2 {
  font-size: 1.16rem;
  letter-spacing: -0.012em;
  margin: 2.75rem 0 0.6rem;
  padding-top: 0.4rem;
  scroll-margin-top: 5rem;
}

h3 {
  font-size: 1rem;
  margin: 1.6rem 0 0.4rem;
}

p, li { color: var(--ink-soft); }
p { margin: 0 0 1rem; }

ul, ol { padding-left: 1.25rem; margin: 0 0 1rem; }
li { margin-bottom: 0.4rem; }

strong { color: var(--ink); font-weight: 620; }

a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5rem 0; }

.updated {
  font-size: 0.85rem;
  color: var(--ink-faint);
  margin: 0 0 2rem;
}

.lede {
  font-size: 1.05rem;
  color: var(--ink-soft);
  margin-bottom: 2rem;
}

/* ---------- table of contents ---------- */
.toc {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.1rem 1.35rem;
  margin: 0 0 2.5rem;
}
.toc-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 0.6rem;
}
.toc ol {
  margin: 0;
  padding-left: 1.15rem;
  columns: 2;
  column-gap: 1.75rem;
  font-size: 0.9rem;
}
.toc li { margin-bottom: 0.25rem; break-inside: avoid; }
.toc a { color: var(--ink-soft); text-decoration: none; }
.toc a:hover { color: var(--accent); text-decoration: underline; }

@media (max-width: 34rem) {
  .toc ol { columns: 1; }
}

/* ---------- callout ---------- */
.callout {
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 0.9rem 1.2rem;
  margin: 0 0 1.5rem;
}
.callout p:last-child { margin-bottom: 0; }
.callout p { font-size: 0.94rem; }

/* ---------- definition rows ---------- */
.rows {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 0 0 1.5rem;
  background: var(--surface);
}
.rows div {
  display: grid;
  grid-template-columns: 13rem 1fr;
  gap: 1rem;
  padding: 0.8rem 1.2rem;
  border-bottom: 1px solid var(--rule);
  font-size: 0.94rem;
}
.rows div:last-child { border-bottom: 0; }
.rows dt { color: var(--ink); font-weight: 600; margin: 0; }
.rows dd { color: var(--ink-soft); margin: 0; }

@media (max-width: 34rem) {
  .rows div { grid-template-columns: 1fr; gap: 0.15rem; }
}

/* ---------- doc cards (index) ---------- */
.cards {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  margin: 2rem 0;
}
.card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.35rem 1.45rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card h2 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  color: var(--ink);
  padding-top: 0;
}
.card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-faint);
}

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--rule);
  padding: 2rem clamp(1rem, 5vw, 2rem);
  font-size: 0.85rem;
  color: var(--ink-faint);
}
.site-footer .inner {
  max-width: var(--measure);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  align-items: center;
}
.site-footer a { color: var(--ink-soft); text-decoration: none; }
.site-footer a:hover { color: var(--accent); text-decoration: underline; }
.site-footer .spacer { margin-left: auto; }

@media print {
  .site-header, .lang-switch, .toc { display: none; }
  body { background: #fff; color: #000; font-size: 11pt; }
}
