/* Do Papel para o Mundo — base
   Crazy Diamond Soluções Digitais
   Paleta extraída do logo da marca; contrastes medidos em wordpress/plano.md §2.4 */

/* ---------- fontes ---------- */

@font-face {
	font-family: 'Lora';
	src: url('../fonts/lora-var.woff2') format('woff2');
	font-weight: 400 700;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: 'Lora';
	src: url('../fonts/lora-var-italic.woff2') format('woff2');
	font-weight: 400 700;
	font-style: italic;
	font-display: swap;
}

@font-face {
	font-family: 'Poppins';
	src: url('../fonts/poppins-600.woff2') format('woff2');
	font-weight: 600;
	font-style: normal;
	font-display: swap;
}

/* ---------- tokens ---------- */

:root {
	/* base — do contorno do mascote */
	--tinta: #132f3b;
	--tinta-media: #1e3f4e;

	/* fundo — branco quente de papel, nunca #fff puro */
	--papel: #fbf9f5;
	--papel-faixa: #f2ebe1;

	/* quente — do lápis do mascote */
	--caramelo: #b1611a;
	--caramelo-escuro: #91500f;
	--caramelo-luz: #eac398;

	/* acentos — do globo, escurecidos para uso seguro com texto */
	--verde: #358558;
	--verde-escuro: #2b6d47;
	--azul: #337ea4;

	/* originais da marca — SÓ decorativos, reprovam em contraste com texto */
	--marca-azul: #45aade;
	--marca-verde: #48b679;

	--fonte-titulo: 'Lora', Georgia, 'Times New Roman', serif;
	--fonte-marca: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;

	--largura: 1140px;
	--respiro: clamp(3.5rem, 8vw, 7rem);
	--raio: 4px;

	/*
	 * Distância entre a borda do conteúdo e a borda da janela.
	 * Serve para um elemento "sangrar" até o fim da tela com margem negativa,
	 * sem precisar de truque com 50vw dentro de grid (onde a porcentagem da margem
	 * resolve contra a área do grid, não contra a página, e o cálculo sai errado).
	 */
	--sangria: max(1.25rem, (100vw - var(--largura)) / 2);
}

/* ---------- reset enxuto ---------- */

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

body,
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
ul,
ol,
dl,
dd {
	margin: 0;
}

ul[class],
ol[class] {
	list-style: none;
	padding: 0;
}

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

button,
input,
textarea,
select {
	font: inherit;
	color: inherit;
}

/* ---------- tipografia ---------- */

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

body {
	font-family: var(--fonte-titulo);
	font-size: clamp(1rem, 0.97rem + 0.15vw, 1.0625rem);
	line-height: 1.7;
	color: var(--tinta);
	background: var(--papel);
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

h1,
h2 {
	font-family: var(--fonte-titulo);
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: -0.01em;
	text-wrap: balance;
}

h1 {
	font-size: clamp(1.75rem, 1.2rem + 2.6vw, 2.75rem);
}

h2 {
	font-size: clamp(1.375rem, 1.05rem + 1.5vw, 2rem);
}

h3 {
	font-family: var(--fonte-marca);
	font-weight: 600;
	font-size: clamp(1.125rem, 1.05rem + 0.35vw, 1.375rem);
	line-height: 1.35;
	letter-spacing: -0.005em;
}

p {
	max-width: 68ch;
}

a {
	color: var(--azul);
	text-underline-offset: 0.2em;
}

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

strong {
	font-weight: 600;
}

/* ---------- estrutura ---------- */

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

.secao--papel {
	background: var(--papel);
}

.secao--faixa {
	background: var(--papel-faixa);
}

.secao--escura {
	background: var(--tinta);
	color: var(--papel);
}

.secao--escura h1,
.secao--escura h2,
.secao--escura h3 {
	color: var(--papel);
}

.envolve {
	width: min(100% - 2.5rem, var(--largura));
	margin-inline: auto;
}

.rotulo {
	font-family: var(--fonte-marca);
	font-weight: 600;
	font-size: 0.8125rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--caramelo);
}

.secao--escura .rotulo {
	color: var(--caramelo-luz);
}

/* ---------- botões ---------- */

.botao {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	font-family: var(--fonte-marca);
	font-weight: 600;
	font-size: 1rem;
	line-height: 1;
	padding: 1.05rem 1.9rem;
	border: 0;
	border-radius: var(--raio);
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.18s ease, transform 0.18s ease;
}

.botao--principal {
	background: var(--caramelo);
	color: #fff;
}

.botao--principal:hover {
	background: var(--caramelo-escuro);
	color: #fff;
	transform: translateY(-2px);
}

.botao--contorno {
	background: transparent;
	color: var(--tinta);
	box-shadow: inset 0 0 0 2px var(--tinta);
}

.botao--contorno:hover {
	background: var(--tinta);
	color: var(--papel);
}

/* ---------- acessibilidade ---------- */

:focus-visible {
	outline: 3px solid var(--caramelo);
	outline-offset: 3px;
}

.pular-para-conteudo {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 100;
	background: var(--tinta);
	color: var(--papel);
	padding: 1rem 1.5rem;
	font-family: var(--fonte-marca);
	text-decoration: none;
}

.pular-para-conteudo:focus {
	left: 0;
	color: var(--papel);
}

.so-leitor-de-tela {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

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