/* Base: fontes, tokens, reset e tipografia. Mobile first. */

@font-face {
  font-family: 'Archivo';
  src: url('../fonts/archivo-latin-400-750-78-100.woff2') format('woff2-variations'); /* eixos recortados para o que o site usa (Tarefa 12) */
  font-weight: 400 750;
  font-stretch: 78% 100%;
  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;
}
@font-face {
  font-family: 'Archivo';
  src: url('../fonts/archivo-latin-ext-wdth-normal.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF,
    U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('../fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('../fonts/ibm-plex-mono-latin-500-normal.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212;
}

:root {
  color-scheme: dark;

  /* Cores tiradas das fotos: o navy das versões geradas, a luz de recorte azul do estúdio e o brilho da luminária. */
  --cor-fundo: #0a1424;
  --cor-fundo-profundo: #07101d;
  --cor-superficie: #102038;
  --cor-superficie-alta: #16294a;
  --cor-borda: #1e3352;
  --cor-texto: #e6eef8;
  --cor-texto-suave: #93a6c0;
  --cor-primaria: #3d8bff;
  --cor-primaria-suave: rgb(61 139 255 / 0.14);
  --cor-acento: #ff9a4d;
  --cor-acento-forte: #ffb37d;
  --cor-sobre-acento: #1b0e04;
  --cor-ativo: #46d39a;

  /* Categorias dos chips (bordas discretas). */
  --cor-cat-dados: #3d8bff;
  --cor-cat-midia: #34c3b1;
  --cor-cat-dev: #93a6c0;
  --cor-cat-ia: #8ec5ff;

  --fonte-titulo: 'Archivo', 'Arial Narrow', system-ui, sans-serif;
  --fonte-texto: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --fonte-mono: 'IBM Plex Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;

  /* Escala tipográfica: 13 · 15 · 17 · 21 · 28→48 · 44→76 */
  --texto-1: 0.8125rem;
  --texto-2: 0.9375rem;
  --texto-3: 1.0625rem;
  --texto-4: 1.3125rem;
  --texto-5: clamp(1.75rem, 1.2rem + 2.4vw, 3rem);
  --texto-6: clamp(2.75rem, 1.55rem + 5.4vw, 4.75rem);

  --espaco-1: 0.25rem;
  --espaco-2: 0.5rem;
  --espaco-3: 0.75rem;
  --espaco-4: 1rem;
  --espaco-5: 1.5rem;
  --espaco-6: 2rem;
  --espaco-7: 3rem;
  --espaco-8: clamp(4rem, 2.8rem + 5vw, 7.5rem);

  --raio-1: 6px;
  --raio-2: 12px;
  --raio-3: 20px;

  --largura-conteudo: 72rem;
  --largura-texto: 38rem;
  --margem-lateral: 1.25rem;
  --altura-cabecalho: 4rem;
  --altura-barra: 4.5rem;

  --duracao: 220ms;
  --curva: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--altura-cabecalho) + var(--espaco-4));
}

body {
  margin: 0;
  background: var(--cor-fundo);
  color: var(--cor-texto);
  font-family: var(--fonte-texto);
  font-size: var(--texto-3);
  font-stretch: 100%;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--fonte-titulo);
  font-weight: 700;
  text-wrap: balance;
}
h1 { font-size: var(--texto-6); font-stretch: 78%; line-height: 1; letter-spacing: -0.02em; }
h2 { font-size: var(--texto-5); font-stretch: 82%; line-height: 1.08; letter-spacing: -0.015em; }
h3 { font-size: var(--texto-4); font-stretch: 92%; line-height: 1.25; letter-spacing: -0.005em; }

p { margin: 0; text-wrap: pretty; }
a { color: inherit; }
strong { font-weight: 650; }

:focus-visible {
  outline: 2px solid var(--cor-acento);
  outline-offset: 3px;
  border-radius: var(--raio-1);
}

::selection { background: var(--cor-acento); color: var(--cor-sobre-acento); }

.conteudo {
  width: min(100% - 2 * var(--margem-lateral), var(--largura-conteudo));
  margin-inline: auto;
}

/* O trecho do título que leva a cor de acento. */
.destaque { color: var(--cor-acento); white-space: nowrap; }

.visualmente-oculto {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.icone { width: 1.25em; height: 1.25em; flex: none; }

@media (min-width: 56rem) {
  :root { --margem-lateral: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
