/*
 * Página inicial (front-page.php).
 * Carregado só na home, no lugar de style.css e custom.css.
 * Tudo cabe numa tela (100vh) no computador; no celular a página rola.
 */

:root {
	--ec-ink: #111111;
	--ec-ink-2: #333333;
	--ec-muted: #6b6b6b;
	--ec-soft: #f2f2f2;
	--ec-bg: #ffffff;
	--ec-green: #147443;
	--ec-green-soft: #e3f5ec;
}

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

html,
body.ec-home {
	margin: 0;
	background: var(--ec-bg);
}

body.ec-home {
	color: var(--ec-ink);
	font-family: "DM Sans", -apple-system, "Helvetica Neue", Arial, sans-serif;
	font-optical-sizing: auto;
	-webkit-font-smoothing: antialiased;
}

.ec-home a {
	color: var(--ec-ink);
}

.ec-home a:hover {
	color: var(--ec-muted);
}

.ec-home h1,
.ec-home h2,
.ec-home p {
	margin: 0;
}

/* Estrutura: coluna à esquerda, grade à direita */

.ec-root {
	height: 100vh;
	height: 100dvh;
	overflow: hidden;
	padding: clamp(20px, 3.2vh, 36px) clamp(20px, 2.6vw, 40px);
	display: flex;
	gap: clamp(28px, 3.4vw, 56px);
}

/* Coluna */

.ec-side {
	flex: 0 0 31%;
	max-width: 480px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 32px;
}

.ec-name {
	font-size: clamp(18px, 2.4vh, 22px);
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: -0.005em;
}

.ec-intro {
	margin-top: clamp(18px, 3vh, 32px) !important;
	font-size: clamp(34px, 5.6vh, 58px);
	font-weight: 400;
	line-height: 1.04;
	letter-spacing: -0.02em;
}

.ec-links {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 24px;
	margin-top: clamp(22px, 3.6vh, 40px);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.6px;
	text-transform: uppercase;
}

.ec-links a {
	text-decoration: none;
}

.ec-archive {
	padding-top: 14px;
	border-top: 3px solid var(--ec-ink);
}

.ec-archive h2 {
	margin-bottom: 10px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.6px;
	text-transform: uppercase;
	color: var(--ec-muted);
}

.ec-archive-links {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 20px;
	font-size: 15px;
}

.ec-email {
	display: inline-block;
	margin-top: clamp(16px, 2.6vh, 28px);
	font-size: clamp(17px, 2.3vh, 21px);
	letter-spacing: -0.005em;
}

/* Grade: duas fileiras, cada uma com o rótulo numa coluna estreita à esquerda */

.ec-grid {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: clamp(14px, 2.4vh, 28px);
}

.ec-row {
	min-height: 0;
	padding-top: clamp(10px, 1.4vh, 14px);
	border-top: 3px solid var(--ec-ink);
	display: grid;
	grid-template-columns: 64px repeat(6, minmax(0, 1fr));
	grid-template-rows: minmax(0, 1fr);
	gap: clamp(10px, 1.4vh, 16px);
}

.ec-row-work {
	flex: 1.45 1 0;
}

.ec-row-live {
	flex: 1 1 0;
}

.ec-label {
	padding-top: 2px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.6px;
	text-transform: uppercase;
	color: var(--ec-muted);
}

.ec-home h3 {
	margin: 0;
}

.ec-tile {
	min-height: 0;
	text-decoration: none;
}

.ec-tile:hover .ec-tname {
	text-decoration: underline;
	text-underline-offset: 4px;
	text-decoration-thickness: 1px;
}

.ec-tname {
	font-weight: 400;
	line-height: 1.05;
	letter-spacing: -0.015em;
}

.ec-line {
	font-size: clamp(13px, 1.7vh, 15px);
	line-height: 1.35;
	color: var(--ec-ink-2);
}

/* Cases */

.ec-case {
	grid-column: span 2;
	display: flex;
	flex-direction: column;
	background: var(--ec-soft);
}

.ec-shot {
	flex: 1 1 auto;
	min-height: 0;
	overflow: hidden;
}

.ec-shot img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

/* Ilustração em pixel: mantém os pixels nítidos quando a imagem encolhe */

.ec-shot img.ec-pixel {
	image-rendering: pixelated;
}

/* Case sem imagem: as frases do próprio case, grandes */

.ec-words {
	height: 100%;
	margin: 0;
	padding: clamp(14px, 2vh, 22px);
	list-style: none;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	gap: 2px;
	font-size: clamp(18px, 2.7vh, 26px);
	line-height: 1.1;
	letter-spacing: -0.015em;
	color: var(--ec-ink);
}

.ec-words li:nth-child(even) {
	color: var(--ec-muted);
}

.ec-case-text {
	padding: clamp(14px, 2vh, 22px);
}

.ec-case-title {
	display: flex;
	align-items: center;
	gap: 10px;
}

.ec-case .ec-mark {
	flex: 0 0 auto;
	width: clamp(26px, 3.6vh, 34px);
	height: auto;
}

.ec-case .ec-tname {
	font-size: clamp(20px, 2.9vh, 28px);
}

.ec-case .ec-line {
	margin-top: 8px;
}

.ec-meta {
	margin-top: 12px !important;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.6px;
	text-transform: uppercase;
}

/* Apps */

.ec-app {
	padding: clamp(14px, 2vh, 20px);
	border: 2px solid var(--ec-ink);
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.ec-app .ec-mark {
	width: clamp(34px, 4.8vh, 46px);
	height: auto;
}

.ec-app .ec-tname {
	margin-top: auto;
	font-size: clamp(19px, 2.6vh, 24px);
	line-height: 1;
}

.ec-app .ec-line {
	font-size: 13px;
	line-height: 1.3;
}

/* Mandatas */

.ec-home a.ec-mandatas,
.ec-home a.ec-mandatas:hover {
	color: #ffffff;
}

.ec-mandatas {
	grid-column: span 2;
	padding: clamp(14px, 2vh, 20px);
	background: var(--ec-green);
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.ec-mandatas:hover .ec-mandatas-line {
	text-decoration: underline;
	text-underline-offset: 4px;
	text-decoration-thickness: 1px;
}

.ec-mandatas-logo {
	display: flex;
	align-items: center;
	gap: 12px;
}

.ec-mandatas .ec-mark {
	flex: 0 0 auto;
	width: clamp(34px, 4.8vh, 46px);
	height: auto;
}

.ec-wordmark {
	font-family: "Archivo", "DM Sans", sans-serif;
	font-size: clamp(26px, 3.8vh, 36px);
	line-height: 1;
}

.ec-wordmark .light {
	font-weight: 300;
}

.ec-wordmark .bold {
	font-weight: 800;
}

.ec-mandatas-line {
	margin-top: auto;
	font-size: clamp(15px, 2vh, 18px);
	line-height: 1.2;
	letter-spacing: -0.005em;
}

.ec-mandatas-en {
	font-size: 12px;
	line-height: 1.35;
	color: var(--ec-green-soft);
}

/* Foco visível para quem navega pelo teclado */

.ec-home a:focus-visible {
	outline: 2px solid var(--ec-ink);
	outline-offset: 3px;
}

.ec-home a.ec-mandatas:focus-visible {
	outline-color: var(--ec-green);
}

/* Barra do WordPress para quem está logada: desconta a altura dela */

body.admin-bar .ec-root {
	height: calc(100vh - 32px);
	height: calc(100dvh - 32px);
}

/* Celular e janelas estreitas: a página volta a rolar */

@media (max-width: 960px) {
	.ec-root {
		height: auto;
		overflow: visible;
		flex-direction: column;
	}

	/* A coluna se abre: nome e frase em cima, projetos no meio, arquivo e e-mail no fim */
	.ec-side {
		display: contents;
	}

	.ec-side-top {
		order: 1;
	}

	.ec-grid {
		order: 2;
	}

	.ec-row {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		grid-template-rows: none;
		grid-auto-rows: auto;
	}

	.ec-app,
	.ec-mandatas {
		min-height: 180px;
	}

	.ec-label {
		grid-column: 1 / -1;
		padding-top: 0;
	}

	.ec-row-work,
	.ec-row-live {
		flex: 0 0 auto;
	}

	.ec-side-bottom {
		order: 3;
		padding-bottom: 8px;
	}

	.ec-case,
	.ec-mandatas {
		grid-column: span 2;
	}

	.ec-case {
		min-height: 320px;
	}

	.ec-intro {
		font-size: clamp(32px, 9vw, 48px);
	}
}

/* Telas largas e baixas, como notebook com a barra de favoritos aberta */

@media (min-width: 961px) and (max-height: 640px) {
	.ec-root {
		height: auto;
		min-height: 100vh;
		overflow: visible;
	}

	.ec-row-work {
		flex: 0 0 360px;
	}

	.ec-row-live {
		flex: 0 0 240px;
	}
}
