/* ==========================================================================
   Base: reset, tipografia, layout e acessibilidade
   ========================================================================== */

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-padding-top: calc(var(--altura-cabecalho) + var(--esp-4));
}

body {
	margin: 0;
	background: var(--cor-creme);
	color: var(--cor-cafe);
	font-family: var(--fonte-texto);
	font-size: var(--fs-corpo);
	font-weight: 400;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;

	/* Rodapé sempre no fim da tela, mesmo em páginas curtas */
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	min-height: 100dvh;
}

.site-main {
	flex: 1 0 auto;
}

@media (min-width: 900px) {
	body {
		line-height: 1.65;
	}
}

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

/* Tratamento quente das fotos de seção; desativar com .sem-filtro */
.secao img:not(.sem-filtro),
.img-tratada {
	filter: saturate(0.85) sepia(0.08);
}

h1,
h2,
h3,
h4 {
	margin: 0 0 var(--esp-4);
	font-family: var(--fonte-titulo);
	font-weight: 500;
	font-optical-sizing: auto;
	text-wrap: balance;
	letter-spacing: -0.01em;
}

/* <em> nos títulos = destaque em terracota (sem itálico: a fonte não tem itálico) */
h1 em,
h2 em,
h3 em {
	font-style: normal;
	color: var(--cor-terracota);
}

h1 {
	font-size: var(--fs-h1);
	line-height: 1.1;
}

h2 {
	font-size: var(--fs-h2);
	line-height: 1.15;
}

h3 {
	font-size: var(--fs-h3);
	line-height: 1.25;
}

h4 {
	font-size: 1.125rem;
	line-height: 1.3;
}

@media (min-width: 900px) {
	h1 {
		line-height: 1.05;
	}

	h2 {
		line-height: 1.1;
	}
}

p,
ul,
ol {
	margin: 0 0 var(--esp-4);
}

p {
	text-wrap: pretty;
}

a {
	color: var(--cor-terracota);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	transition: color var(--transicao);
}

a:hover {
	color: var(--cor-terracota-escuro);
}

strong {
	font-weight: 600;
}

small,
.texto-pequeno {
	font-size: var(--fs-pequeno);
}

.sobretitulo {
	display: block;
	margin-bottom: var(--esp-3);
	font-family: var(--fonte-texto);
	font-size: var(--fs-sobretitulo);
	font-weight: 600;
	letter-spacing: 2px;
	line-height: 1.4;
	text-transform: uppercase;
	color: var(--cor-salvia-texto);
}

.sobretitulo--terracota {
	color: var(--cor-terracota);
}

/* Layout */
.container {
	width: 100%;
	max-width: calc(var(--container) + 2 * var(--gutter));
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.container--texto {
	max-width: calc(var(--container-texto) + 2 * var(--gutter));
}

.secao {
	padding-block: var(--secao-y);
}

.site-main:focus {
	outline: none;
}

.titulo-pagina {
	margin-bottom: var(--esp-6);
}

/* Conteúdo do editor (páginas simples, Política, Termos) */
.conteudo > * + h2,
.conteudo > * + h3 {
	margin-top: var(--esp-7);
}

.conteudo ul,
.conteudo ol {
	padding-left: 1.25em;
}

.conteudo li + li {
	margin-top: var(--esp-2);
}

/* Acessibilidade */
:focus-visible {
	outline: 2px solid var(--cor-terracota);
	outline-offset: 2px;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.pular-link {
	position: absolute;
	top: var(--esp-2);
	left: var(--esp-2);
	z-index: 1000;
	padding: var(--esp-3) var(--esp-4);
	background: var(--cor-cafe);
	color: var(--cor-creme);
	font-weight: 600;
	border-radius: var(--raio-botao);
	transform: translateY(-200%);
}

.pular-link:focus {
	color: var(--cor-creme);
	transform: none;
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
}
