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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 20px);
}

body {
  min-width: 320px;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.menu-open {
  overflow: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

p { max-width: 68ch; }

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

button,
input,
textarea,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

::selection {
  background: var(--red);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--red-bright);
  outline-offset: 3px;
}

.container {
  width: min(calc(100% - var(--gutter) * 2), var(--container));
  margin-inline: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: var(--z-skip);
  padding: 10px 16px;
  color: var(--bg);
  background: var(--text);
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

/* ---------- botões ---------- */
.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 2px;
  padding: 0 26px;
  color: #fff;
  background: var(--red);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1;
  text-decoration: none;
  transition: background-color 180ms ease, border-color 180ms ease, transform 180ms var(--ease-out);
}

.button-primary:hover {
  background: var(--red-bright);
  transform: translateY(-1px);
}

.button-ghost {
  border-color: var(--line-strong);
  color: var(--text);
  background: transparent;
}

.button-ghost:hover {
  border-color: var(--text-muted);
  background: var(--surface-2);
}

/* ---------- eyebrow / cabeçalho de seção ---------- */
.eyebrow {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.section-head {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: clamp(20px, 4vw, 56px);
  align-items: start;
  margin-bottom: clamp(36px, 5vw, 60px);
}

.section-head .eyebrow {
  padding-top: 10px;
}

.section-head h2 {
  max-width: 22ch;
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
}

.lede {
  max-width: 58ch;
  margin-top: 14px;
  color: var(--text-muted);
}

/* ---------- link com seta (reutilizado entre seções e páginas) ---------- */
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--red);
  padding-bottom: 3px;
  width: fit-content;
}

.text-link:hover {
  color: var(--red-bright);
}

/* ---------- divisórias ---------- */
.rule {
  height: 1px;
  border: 0;
  background: var(--line);
}

/* ---------- lista com traço ---------- */
.dash-list {
  display: grid;
  gap: 10px;
  list-style: none;
}

.dash-list li {
  position: relative;
  padding-left: 20px;
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.55;
}

.dash-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 10px;
  height: 1px;
  background: var(--red);
}

.dash-list strong {
  display: block;
  color: var(--text);
  font-weight: 600;
}

/* ---------- tabela de obrigações legais (reutilizada na home, na página de obrigações e nas páginas de área) ---------- */
.table-obligations {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.table-obligations caption {
  padding-bottom: 14px;
  color: var(--text-muted);
  font-size: 0.82rem;
  text-align: left;
}

.table-obligations th {
  padding: 0 20px 12px 0;
  border-bottom: 1px solid var(--line-strong);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  text-align: left;
}

.table-obligations td {
  padding: 16px 20px 16px 0;
  border-bottom: 1px solid var(--line);
  color: var(--text-muted);
  vertical-align: top;
}

.table-obligations td:first-child {
  width: 28%;
  color: var(--text);
  font-weight: 600;
}

.table-obligations tr:hover td {
  background: var(--surface-2);
}

.table-obligations .who {
  display: inline-block;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  padding: 3px 9px;
  color: var(--text);
  font-size: 0.78rem;
  white-space: nowrap;
}

.table-scroll {
  overflow-x: auto;
}

.table-note {
  margin-top: 18px;
  max-width: 68ch;
  color: var(--text-faint);
  font-size: 0.82rem;
  line-height: 1.6;
}

@media (max-width: 720px) {
  .table-obligations,
  .table-obligations tbody,
  .table-obligations tr,
  .table-obligations td {
    display: block;
    width: 100%;
  }

  .table-obligations thead {
    display: none;
  }

  .table-obligations tr {
    padding: 18px 0;
    border-bottom: 1px solid var(--line-strong);
  }

  .table-obligations td {
    padding: 2px 0;
    border: 0;
  }

  .table-obligations td:first-child {
    width: auto;
    margin-bottom: 6px;
    font-size: 1.05rem;
  }

  .table-obligations td[data-label]::before {
    content: attr(data-label) ' — ';
    color: var(--text-faint);
    font-size: 0.78rem;
  }
}

/* ---------- tratamento de foto: alto contraste e dessaturada ---------- */
.photo-treated {
  filter: grayscale(0.85) contrast(1.12);
}

/* ---------- etapas numeradas (reutilizado em "como trabalhamos") ---------- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line-strong);
  border: 1px solid var(--line-strong);
}

.steps-grid.steps-grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.step {
  background: var(--bg);
  padding: 32px 28px 36px;
}

.step-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.step-icon {
  width: 26px;
  height: 26px;
  color: var(--red-bright);
}

.step .n {
  color: var(--red-bright);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.step h3 {
  margin-top: 18px;
  font-size: 1.2rem;
}

.step p {
  margin-top: 12px;
  color: var(--text-muted);
  font-size: 15.5px;
}

@media (max-width: 820px) {
  .steps-grid,
  .steps-grid.steps-grid--3 {
    grid-template-columns: 1fr;
  }
}

/* ---------- lista numerada de linhas (disciplinas, capacidades) ---------- */
.line-list {
  list-style: none;
  border-top: 1px solid var(--line);
}

.line-list li {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 20px;
  align-items: center;
  min-height: 80px;
  padding-block: 18px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 1.8vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.line-list span {
  color: var(--red-bright);
  font-size: 0.85rem;
}

.load-error {
  width: min(calc(100% - 48px), 560px);
  margin: 72px auto;
  padding: 28px;
  border-left: 4px solid var(--red);
  background: var(--surface);
}

.load-error strong {
  display: block;
  margin-bottom: 8px;
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.load-error p {
  color: var(--text-muted);
}

[data-reveal] {
  opacity: 1;
  transform: none;
}

.reveal-ready [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 680ms var(--ease-out), transform 680ms var(--ease-out);
}

.reveal-ready [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 760px) {
  .section-head {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .section-head .eyebrow {
    padding-top: 0;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .reveal-ready [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
