/*
  Plano de tokens — opção A, "editorial acadêmico claro"
  1. Fundo:        #FFFFFF (página) · #F6F8FB (só o cabeçalho de tabela e o bloco de sucesso)
  2. Tinta:        #1C2740 (texto) · #4B5670 (secundário) · #667089 (rótulos discretos)
  3. Acento único: #1F3FBF (azul-cobalto, links/botões) · #16308F (hover/foco)
  4. Filetes:      #1C2740 a 1px nas linhas principais · #D6DBE6 a 1px nas linhas de tabela
  5. Serifa:       Newsreader (títulos e corpo; opsz automático), pesos 400/500, itálico 400
  6. Sans:         IBM Plex Sans (tabelas, menu, rótulos de formulário, botões), pesos 400/500
  7. Corpo:        17px / 1.55 · medida máxima 68ch · parágrafos 0 0 1rem
  8. Escala:       h1 clamp(2.25rem, 1.4rem + 3vw, 3.5rem)/1.08 · h2 2rem/1.15 · h3 1.3rem/1.3 · sans 0.9375rem · small 0.875rem
  9. Espaços:      4/8/16/24/40/64/96px · seções 96px desktop, 64px celular · gutter 24px (16px em 360px)
 10. Movimento:    só transição de cor (120ms) e sem animação de entrada; tudo zerado em prefers-reduced-motion
*/

:root {
  --bg: #ffffff;
  --bg-soft: #f6f8fb;
  --ink: #1c2740;
  --ink-2: #4b5670;
  --ink-3: #667089;
  --accent: #1f3fbf;
  --accent-strong: #16308f;
  --rule: #1c2740;
  --rule-soft: #d6dbe6;
  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --measure: 68ch;
  --gutter: 24px;
  --section: 96px;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.55;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
  transition: color 120ms ease;
}

a:hover {
  color: var(--accent-strong);
}

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

p {
  margin: 0 0 1rem;
  max-width: var(--measure);
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 500;
  margin: 0;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.25rem, 1.4rem + 3vw, 3.5rem);
  line-height: 1.08;
  max-width: 20ch;
}

h2 {
  font-size: 2rem;
  line-height: 1.15;
}

h3 {
  font-size: 1.3rem;
  line-height: 1.3;
}

.wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip-link {
  position: absolute;
  left: 8px;
  top: -100px;
  background: var(--ink);
  color: #fff;
  padding: 8px 12px;
  font-family: var(--sans);
  z-index: 10;
}

.skip-link:focus {
  top: 8px;
}

/* Cabeçalho */

.site-header {
  border-bottom: 1px solid var(--rule);
}

.site-header .wrap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding-top: 20px;
  padding-bottom: 20px;
  flex-wrap: wrap;
}

.brand {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.5rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.brand:hover {
  color: var(--accent);
}

.nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.nav a {
  font-family: var(--sans);
  font-size: 0.9375rem;
  color: var(--ink);
  text-decoration: none;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.3em;
}

/* Botões */

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1;
  padding: 14px 20px;
  border: 1px solid var(--accent);
  border-radius: 2px;
  text-decoration: none;
  color: var(--accent);
  background: transparent;
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: #fff;
}

.btn-secondary:hover {
  color: var(--accent-strong);
  border-color: var(--accent-strong);
}

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}

/* Hero */

.hero {
  padding: 64px 0 var(--section);
  border-bottom: 1px solid var(--rule);
}

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 48px 64px;
  align-items: start;
}

.hero-text p {
  font-size: 1.125rem;
}

.hero-lead {
  margin-top: 24px;
}

.hero-place {
  color: var(--ink-2);
  font-style: italic;
  margin-bottom: 24px;
}

/* Tabela-ementa do hero */

.ementa {
  border-collapse: collapse;
  width: 100%;
  font-family: var(--sans);
  font-size: 0.9375rem;
  margin-top: 10px;
}

.ementa caption {
  text-align: left;
  font-family: var(--serif);
  font-size: 1.125rem;
  font-style: italic;
  color: var(--ink-2);
  padding: 0 0 10px;
  border-bottom: 1px solid var(--rule);
}

.ementa td {
  padding: 12px 0;
  border-bottom: 1px solid var(--rule-soft);
  vertical-align: baseline;
}

.ementa tr:last-child td {
  border-bottom: 1px solid var(--rule);
}

.ementa td:last-child {
  text-align: right;
  white-space: nowrap;
  padding-left: 16px;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
}

.ementa a {
  color: var(--ink);
  text-decoration: none;
}

.ementa a:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.3em;
}

.ementa-foot {
  font-family: var(--sans);
  font-size: 0.875rem;
  margin: 12px 0 0;
}

/* Seções */

.section {
  padding: var(--section) 0;
  border-bottom: 1px solid var(--rule);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: 24px 64px;
  align-items: start;
  margin-bottom: 40px;
}

.section-head p {
  margin: 6px 0 0;
  color: var(--ink-2);
  font-size: 1.0625rem;
}

/* O que fazemos */

.services {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 48px;
}

.services article h3 {
  padding-top: 12px;
  border-top: 1px solid var(--rule);
  margin-bottom: 12px;
}

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

/* Tabela de cursos */

.cursos {
  border-collapse: collapse;
  width: 100%;
  font-family: var(--sans);
  font-size: 0.9375rem;
  line-height: 1.45;
}

.cursos th,
.cursos td {
  text-align: left;
  vertical-align: top;
  padding: 14px 16px 14px 0;
  border-bottom: 1px solid var(--rule-soft);
}

.cursos thead th {
  font-weight: 500;
  color: var(--ink-2);
  border-bottom: 1px solid var(--rule);
  padding-top: 0;
}

.cursos tbody th {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.125rem;
  line-height: 1.3;
  width: 30%;
}

.cursos tbody tr:last-child th,
.cursos tbody tr:last-child td {
  border-bottom: 1px solid var(--rule);
}

.cursos .carga {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  width: 8%;
}

.cursos-nota {
  margin-top: 20px;
  color: var(--ink-2);
}

/* Como funciona */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: passo;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 40px;
}

.steps li {
  counter-increment: passo;
  border-top: 1px solid var(--rule);
  padding-top: 12px;
}

.steps li::before {
  content: counter(passo, decimal-leading-zero);
  display: block;
  font-family: var(--sans);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  margin-bottom: 12px;
}

.steps h3 {
  margin-bottom: 8px;
}

.steps p {
  margin: 0;
}

/* Quem somos */

.people {
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
  gap: 48px 64px;
}

.people h3 {
  border-top: 1px solid var(--rule);
  padding-top: 12px;
  margin-bottom: 12px;
}

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

/* Chamada final */

.cta {
  padding: var(--section) 0;
  border-bottom: 1px solid var(--rule);
}

.cta h2 {
  max-width: 24ch;
}

.cta p {
  margin: 20px 0 28px;
  font-size: 1.125rem;
}

/* Rodapé */

.site-footer {
  padding: 40px 0 56px;
  font-family: var(--sans);
  font-size: 0.875rem;
  color: var(--ink-2);
}

.site-footer .wrap {
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
  gap: 24px 64px;
}

.site-footer p {
  margin: 0 0 6px;
}

.site-footer a {
  color: var(--ink-2);
}

.site-footer a:hover {
  color: var(--accent);
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li {
  margin-bottom: 6px;
}

/* Contato */

.contact {
  padding: 64px 0 var(--section);
}

.contact .wrap {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 48px 64px;
  align-items: start;
}

.contact-intro p {
  font-size: 1.125rem;
}

.contact-intro h1 {
  margin-bottom: 24px;
}

.form {
  font-family: var(--sans);
  border-top: 1px solid var(--rule);
  padding-top: 8px;
}

.field {
  display: block;
  padding: 16px 0;
  border-bottom: 1px solid var(--rule-soft);
}

.field span {
  display: block;
  font-size: 0.875rem;
  color: var(--ink-2);
  margin-bottom: 8px;
}

.field span small {
  font-size: inherit;
  color: var(--ink-3);
}

.field input,
.field select,
.field textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--rule-soft);
  border-radius: 2px;
  padding: 10px 12px;
  transition: border-color 120ms ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--accent);
  outline: 2px solid var(--accent);
  outline-offset: 0;
}

.field textarea {
  min-height: 160px;
  resize: vertical;
}

.form-actions {
  padding-top: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.form-status {
  font-family: var(--sans);
  font-size: 0.9375rem;
  color: var(--ink);
  margin: 0;
}

.form-status[data-state="error"] {
  color: #9b1c1c;
}

.form-done {
  font-size: 1.25rem;
  padding: 32px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Responsivo */

@media (max-width: 960px) {
  :root {
    --section: 72px;
  }

  .hero .wrap,
  .section-head,
  .people,
  .contact .wrap,
  .site-footer .wrap {
    grid-template-columns: minmax(0, 1fr);
  }

  .services,
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-head {
    margin-bottom: 32px;
  }
}

@media (max-width: 640px) {
  :root {
    --section: 64px;
  }

  body {
    font-size: 16px;
  }

  h2 {
    font-size: 1.7rem;
  }

  .site-header .wrap {
    padding-top: 16px;
    padding-bottom: 14px;
    gap: 12px 24px;
  }

  .nav ul {
    gap: 8px 16px;
  }

  .hero {
    padding-top: 40px;
  }

  .hero .wrap {
    gap: 40px;
  }

  .services,
  .steps {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  /* Tabela de cursos colapsa em linhas */
  .cursos thead {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
  }

  .cursos,
  .cursos tbody,
  .cursos tr,
  .cursos th,
  .cursos td {
    display: block;
    width: auto;
  }

  .cursos tr {
    padding: 16px 0;
    border-bottom: 1px solid var(--rule-soft);
  }

  .cursos tbody tr:first-child {
    border-top: 1px solid var(--rule);
  }

  .cursos tbody tr:last-child {
    border-bottom: 1px solid var(--rule);
  }

  .cursos th,
  .cursos td,
  .cursos tbody tr:last-child th,
  .cursos tbody tr:last-child td {
    padding: 0;
    border: 0;
  }

  .cursos tbody th {
    width: auto;
    margin-bottom: 8px;
  }

  .cursos td,
  .cursos tbody tr:last-child td {
    display: grid;
    grid-template-columns: 6.5rem minmax(0, 1fr);
    gap: 12px;
    padding: 4px 0;
  }

  .cursos td::before {
    content: attr(data-label);
    color: var(--ink-3);
    font-size: 0.875rem;
  }

  .cursos .carga {
    white-space: normal;
    width: auto;
  }
}

@media (max-width: 400px) {
  :root {
    --gutter: 16px;
  }

  .nav ul {
    gap: 6px 14px;
  }

  .actions .btn {
    width: 100%;
    text-align: center;
  }
}

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

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
