:root {
  --paper: #f6f7f4;
  --ink: #17221d;
  --muted: #56645c;
  --forest: #1f5a43;
  --sage: #dfe8e1;
  --line: #c9d5cc;
  --brasil: #a8372a;

  --measure: 42rem;
  --gutter: clamp(16px, 5vw, 48px);
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3125rem;
  --step-2: 1.75rem;
  --step-3: clamp(2.25rem, 1.4rem + 3.6vw, 3.75rem);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121a16;
    --ink: #e7ede9;
    --muted: #a3b2a9;
    --forest: #7cc3a3;
    --sage: #1c2923;
    --line: #2e3d35;
    --brasil: #e07a68;
    color-scheme: dark;
  }
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Schibsted Grotesk", system-ui, sans-serif;
  font-size: var(--step-0);
  line-height: 1.6;
  font-feature-settings: "kern", "liga";
}

a {
  color: var(--forest);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

.wrap {
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Cabeçalho */

.site-header {
  padding: 28px 0 0;
}

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

.wordmark {
  font-weight: 800;
  font-size: var(--step-1);
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: 20px;
  font-size: var(--step--1);
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
}

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

/* Conteúdo */

main.wrap {
  padding-top: clamp(56px, 10vw, 112px);
  padding-bottom: 80px;
}

h1 {
  font-size: var(--step-3);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 800;
  margin: 0 0 28px;
  max-width: 18ch;
  text-wrap: balance;
}

.lede {
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--muted);
  margin: 0;
  max-width: 44ch;
}

section {
  margin-top: clamp(64px, 9vw, 96px);
}

h2 {
  font-size: var(--step-2);
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin: 0 0 20px;
}

h3 {
  font-size: var(--step-0);
  font-weight: 700;
  margin: 0;
}

p {
  margin: 0 0 1em;
}

/* O que fazemos: lista de definição, não cartões */

.services {
  margin: 0;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.services > div {
  display: grid;
  grid-template-columns: 12rem 1fr;
  gap: 8px 32px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.services dt {
  font-weight: 700;
}

.services dd {
  margin: 0;
  color: var(--muted);
}

/* Software livre: o único bloco com peso visual */

.livre {
  background: var(--sage);
  border-left: 6px solid var(--brasil);
  border-radius: 0 6px 6px 0;
  padding: clamp(24px, 4vw, 40px);
}

.livre h2 {
  margin-bottom: 12px;
  text-wrap: balance;
}

.livre > p {
  font-size: var(--step-1);
  line-height: 1.5;
  margin-bottom: 28px;
  max-width: 40ch;
}

.livre dl {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 32px;
}

.livre dt {
  font-weight: 800;
  font-size: var(--step-1);
  color: var(--brasil);
  letter-spacing: -0.01em;
}

.livre dd {
  margin: 4px 0 0;
  color: var(--muted);
}

/* Texto longo (política) */

.prose h2 {
  font-size: var(--step-1);
  margin: 48px 0 12px;
}

.prose ul {
  padding-left: 1.2em;
  margin: 0 0 1em;
}

.prose li {
  margin-bottom: 0.4em;
}

.updated {
  color: var(--muted);
  font-size: var(--step--1);
}

/* Rodapé */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 40px;
  font-size: var(--step--1);
  color: var(--muted);
}

.site-footer p {
  margin: 0;
}

@media (max-width: 560px) {
  .livre dl {
    grid-template-columns: 1fr;
  }

  .services > div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}
