/**
 * Base — reset leve, tipografia elementar e utilitários globais.
 *
 * @package ABDC
 */

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

html {
	scroll-behavior: smooth;
	scroll-padding-top: var(--header-offset);
}

@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;
	}
}

body {
	margin: 0;
	background: var(--color-bg);
	color: var(--color-text);
	font-family: var(--font-body);
	font-size: 15px;
	font-weight: 400;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0 0 var(--space-2);
	font-family: var(--font-heading);
	font-weight: var(--font-heading-weight);
	line-height: 1.12;
	letter-spacing: -0.015em;
}

h1 { font-size: 42px; }
h2 { font-size: 32px; }
h3 { font-size: 25px; }
h4 { font-size: 20px; }
h5 { font-size: 16px; }

h6 {
	font-size: 13px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

p {
	margin: 0 0 var(--space-3);
}

a {
	color: var(--color-accent-700);
	text-decoration: underline;
	text-underline-offset: 3px;
}

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

img {
	display: block;
	max-width: 100%;
	height: auto;
}

figure {
	margin: 0;
}

figcaption {
	margin-top: var(--space-1);
	color: var(--color-text-55);
	font-size: 11px;
}

svg {
	display: block;
}

:focus {
	outline: none;
}

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

::selection {
	background: color-mix(in srgb, var(--color-accent) 30%, transparent);
}

::-webkit-scrollbar {
	width: 10px;
}

/* — Régua — */
.hr {
	height: 2px;
	margin: var(--space-4) 0;
	border: 0;
	background: var(--color-divider);
}

/* — Utilitários — */
.grayscale {
	filter: grayscale(1) contrast(1.08);
}

.text-muted {
	color: var(--color-text-55);
}

/**
 * Assinatura da marca. O logotipo é sempre grafado em caixa baixa e recebe
 * dois pixels a mais que o texto ao redor, conforme o manual do designer.
 */
.brand {
	font-size: calc(1em + 2px);
	font-weight: 700;
}

/* — Acessibilidade — */
.screen-reader-text {
	position: absolute !important;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	border: 0;
	word-wrap: normal !important;
}

.skip-link {
	position: absolute;
	top: -100px;
	left: var(--space-2);
	z-index: 100;
	padding: var(--space-2) var(--space-4);
	background: var(--color-text);
	color: var(--color-bg);
	font-size: 14px;
	text-decoration: none;
}

.skip-link:focus {
	top: var(--space-2);
	color: var(--color-bg);
}
