/*
 * Home de fernandomm.com.br. Mobile first: estilos base para telas
 * pequenas e ajustes progressivos em 640px e 960px.
 *
 * Contraste (WCAG 2.2 AA): texto --ink e --muted sobre --bg e --tint passam
 * de 7:1; texto branco sobre --brand-strong passa de 7:1. O verde da marca
 * (--brand) é usado só em elementos decorativos.
 */

:root {
	--bg: #f4fbee;
	--tint: #e8f6dc;
	--surface: #ffffff;
	--ink: #0f172a;
	--muted: #344249;
	--brand: #54b435;
	--brand-strong: #1d6b26;
	--brand-ink: #14501b;
	--line: #c9dcc0;
	--focus: #0b57d0;
	--radius: 14px;
	--wrap: 1120px;
	--header-h: 112px;
	--font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* Base ------------------------------------------------------------------ */

.fmm-page {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--font);
	font-size: 1rem;
	line-height: 1.6;
	-webkit-text-size-adjust: 100%;
	text-rendering: optimizeLegibility;
}

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

.fmm-page h1,
.fmm-page h2,
.fmm-page h3 {
	margin: 0;
	color: var(--ink);
	font-family: var(--font);
	line-height: 1.2;
	letter-spacing: -0.01em;
}

.fmm-page p,
.fmm-page ul,
.fmm-page ol,
.fmm-page dl,
.fmm-page figure {
	margin: 0;
}

.fmm-page ul,
.fmm-page ol {
	padding: 0;
	list-style: none;
}

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

.fmm-page a {
	color: var(--brand-ink);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

.fmm-page a:hover {
	text-decoration-thickness: 2px;
}

.fmm-page :focus-visible {
	outline: 3px solid var(--focus);
	outline-offset: 3px;
	border-radius: 4px;
}

#main:focus {
	outline: none;
}

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

.fmm-page [id] {
	scroll-margin-top: var(--header-h);
}

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

.fmm-skip {
	position: absolute;
	top: 8px;
	left: 8px;
	z-index: 100;
	padding: 12px 16px;
	background: var(--ink);
	color: #fff !important;
	font-weight: 600;
	border-radius: 8px;
	transform: translateY(-200%);
}

.fmm-skip:focus {
	transform: none;
}

.fmm-icon {
	flex: none;
	width: 1.25em;
	height: 1.25em;
}

.fmm-wrap {
	width: 100%;
	max-width: var(--wrap);
	margin: 0 auto;
	padding-left: 16px;
	padding-right: 16px;
}

.fmm-narrow {
	max-width: 820px;
}

/* Cabeçalho ------------------------------------------------------------- */

.fmm-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(244, 251, 238, 0.96);
	border-bottom: 1px solid var(--line);
}

@supports (backdrop-filter: blur(8px)) {
	.fmm-header {
		background: rgba(244, 251, 238, 0.85);
		backdrop-filter: blur(8px);
	}
}

.fmm-header__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-height: 56px;
}

.fmm-page .fmm-brand {
	color: var(--ink);
	font-weight: 700;
	font-size: 1rem;
	text-decoration: none;
	padding: 10px 0;
}

.fmm-langs ul {
	display: flex;
	gap: 4px;
}

.fmm-page .fmm-langs a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	padding: 0 8px;
	border-radius: 8px;
	color: var(--muted);
	font-weight: 600;
	font-size: 0.875rem;
	text-decoration: none;
}

.fmm-page .fmm-langs a[aria-current="page"] {
	background: var(--brand-strong);
	color: #fff;
}

.fmm-page .fmm-langs a:not([aria-current]):hover {
	background: var(--tint);
	color: var(--ink);
}

.fmm-nav ul {
	display: flex;
	gap: 4px;
	overflow-x: auto;
	scrollbar-width: none;
	padding-bottom: 6px;
}

.fmm-nav ul::-webkit-scrollbar {
	display: none;
}

.fmm-page .fmm-nav a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 12px;
	border-radius: 999px;
	color: var(--ink);
	font-size: 0.9375rem;
	font-weight: 500;
	text-decoration: none;
	white-space: nowrap;
}

.fmm-page .fmm-nav a:hover {
	background: var(--tint);
}

.fmm-page .fmm-nav li:last-child a {
	background: var(--brand-strong);
	color: #fff;
}

/* Elementos comuns ------------------------------------------------------ */

.fmm-eyebrow {
	color: var(--brand-ink);
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.fmm-meta {
	color: var(--muted);
	font-size: 0.875rem;
	font-weight: 600;
}

.fmm-section {
	padding: 56px 0;
}

.fmm-section--tint {
	background: var(--tint);
}

.fmm-head {
	display: grid;
	gap: 8px;
	max-width: 720px;
	margin-bottom: 28px;
}

.fmm-head h2 {
	font-size: clamp(1.625rem, 4.5vw, 2.25rem);
}

.fmm-head p:not(.fmm-eyebrow) {
	color: var(--muted);
	font-size: 1.0625rem;
}

.fmm-subhead {
	margin: 32px 0 12px !important;
	font-size: 1.125rem;
}

.fmm-grid {
	display: grid;
	gap: 16px;
}

.fmm-card {
	display: grid;
	align-content: start;
	gap: 10px;
	padding: 20px;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
}

.fmm-card h3 {
	font-size: 1.125rem;
}

.fmm-card p {
	color: var(--muted);
}

/* Botões ---------------------------------------------------------------- */

.fmm-page .fmm-btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 48px;
	padding: 12px 20px;
	background: var(--brand-strong);
	color: #fff;
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
	border-radius: 10px;
}

.fmm-page .fmm-btn:hover {
	background: var(--brand-ink);
}

.fmm-btn__meta {
	font-weight: 400;
	opacity: 0.9;
}

/* Abertura -------------------------------------------------------------- */

.fmm-hero {
	padding: 32px 0 48px;
}

.fmm-hero__grid {
	display: grid;
	gap: 28px;
}

.fmm-hero__text {
	display: grid;
	gap: 18px;
}

.fmm-hero h1 {
	display: grid;
	gap: 10px;
}

.fmm-hero__name {
	font-size: clamp(1.125rem, 3vw, 1.375rem);
	font-weight: 600;
	color: var(--brand-ink);
}

.fmm-hero__headline {
	font-size: clamp(1.875rem, 7vw, 3.25rem);
	font-weight: 700;
	line-height: 1.12;
}

.fmm-lead {
	color: var(--muted);
	font-size: 1.0625rem;
	max-width: 62ch;
}

.fmm-resumes {
	display: grid;
	gap: 16px;
}

.fmm-resume {
	display: grid;
	gap: 6px;
	justify-items: start;
}

.fmm-resume__langs {
	color: var(--muted);
	font-size: 0.9375rem;
}

.fmm-page .fmm-resume__langs a {
	display: inline-block;
	padding: 10px 2px;
}

.fmm-facts {
	display: grid;
	gap: 12px;
	padding-top: 18px;
	border-top: 1px solid var(--line);
}

.fmm-facts dt {
	color: var(--muted);
	font-size: 0.8125rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.fmm-facts dd {
	margin: 0;
	font-weight: 500;
}

.fmm-hero__photo {
	order: -1;
	justify-self: center;
	width: min(280px, 70vw);
}

.fmm-hero__photo img {
	width: 100%;
	aspect-ratio: 1;
	object-fit: cover;
	border-radius: 24px;
	box-shadow: 0 18px 40px -20px rgba(15, 23, 42, 0.45);
}

/* Atuação --------------------------------------------------------------- */

.fmm-page .fmm-role__logo {
	height: 44px;
	width: auto !important;
	max-width: 180px;
	object-fit: contain;
	object-position: left center;
	margin-bottom: 6px;
}

.fmm-page .fmm-role__org a,
.fmm-page .fmm-profiles a,
.fmm-page .fmm-footer__links a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 44px;
	font-weight: 600;
}

.fmm-role__org .fmm-icon,
.fmm-profiles .fmm-icon,
.fmm-footer__links .fmm-icon {
	width: 1em;
	height: 1em;
}

/* Competências ---------------------------------------------------------- */

.fmm-checks {
	display: grid;
	gap: 10px;
}

.fmm-checks li {
	display: flex;
	gap: 10px;
	align-items: flex-start;
}

.fmm-checks .fmm-icon {
	margin-top: 2px;
	color: var(--brand-strong);
}

.fmm-callout {
	margin-top: 20px !important;
	padding: 16px 20px;
	border-left: 4px solid var(--brand);
	background: var(--surface);
	border-radius: 0 var(--radius) var(--radius) 0;
	font-weight: 500;
}

/* Linha do tempo -------------------------------------------------------- */

.fmm-timeline {
	position: relative;
	display: grid;
	gap: 28px;
	padding-left: 24px !important;
}

.fmm-timeline::before {
	content: "";
	position: absolute;
	top: 6px;
	bottom: 6px;
	left: 5px;
	width: 2px;
	background: var(--line);
}

.fmm-timeline li {
	position: relative;
	display: grid;
	gap: 4px;
}

.fmm-timeline li::before {
	content: "";
	position: absolute;
	top: 6px;
	left: -24px;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: var(--brand);
	border: 2px solid var(--bg);
}

.fmm-section--tint .fmm-timeline li::before {
	border-color: var(--tint);
}

.fmm-timeline h3 {
	font-size: 1.125rem;
}

.fmm-timeline__org {
	font-weight: 600;
	color: var(--brand-ink);
}

.fmm-timeline p:last-child:not(.fmm-timeline__org) {
	color: var(--muted);
}

.fmm-timeline--compact {
	gap: 20px;
}

.fmm-timeline--compact h3 {
	font-size: 1rem;
}

/* Listas simples -------------------------------------------------------- */

.fmm-list {
	display: grid;
	gap: 12px;
}

.fmm-list li {
	display: grid;
	gap: 2px;
}

.fmm-list__title {
	font-weight: 600;
}

.fmm-list__meta {
	color: var(--muted);
	font-size: 0.9375rem;
}

/* Serviços -------------------------------------------------------------- */

.fmm-services {
	counter-reset: service;
}

.fmm-services li {
	counter-increment: service;
}

.fmm-services li::before {
	content: counter(service, decimal-leading-zero);
	color: var(--brand-strong);
	font-size: 1.5rem;
	font-weight: 700;
}

/* Organizações ---------------------------------------------------------- */

.fmm-orgs__title {
	font-size: 1.125rem;
	text-align: center;
	margin-bottom: 24px !important;
}

.fmm-orgs__list {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 24px 16px;
	align-items: center;
	justify-items: center;
}

.fmm-page .fmm-orgs__list img {
	height: 40px;
	width: auto !important;
	max-width: 150px;
	object-fit: contain;
}

.fmm-note {
	margin-top: 28px !important;
	color: var(--muted);
	font-size: 0.875rem;
	text-align: center;
	max-width: 70ch;
	margin-left: auto !important;
	margin-right: auto !important;
}

/* Contato --------------------------------------------------------------- */

.fmm-contact {
	display: grid;
	gap: 32px;
}

.fmm-contact__list {
	display: grid;
	gap: 16px;
}

.fmm-contact__list dt {
	display: flex;
	align-items: center;
	gap: 8px;
	color: var(--muted);
	font-size: 0.875rem;
	font-weight: 600;
}

.fmm-contact__list dd {
	margin: 2px 0 0;
	font-weight: 500;
	overflow-wrap: anywhere;
}

.fmm-page .fmm-contact__list a {
	display: inline-block;
	padding: 8px 0;
}

.fmm-profiles {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 20px;
}

.fmm-form h3 {
	font-size: 1.25rem;
}

/* WPForms dentro do cartão: cores pelas variáveis do próprio plugin */
.fmm-page .fmm-form {
	--wpforms-button-background-color: var(--brand-strong);
	--wpforms-button-background-color-alt: var(--brand-strong);
	--wpforms-button-text-color: #ffffff;
	--wpforms-button-text-color-alt: #ffffff;
	--wpforms-button-border-radius: 10px;
	--wpforms-field-border-color: #7d8f86;
	--wpforms-field-border-radius: 10px;
	--wpforms-label-color: var(--ink);
	--wpforms-label-error-color: #b42318;
}

.fmm-page .fmm-form .wpforms-container {
	margin: 0;
}

.fmm-page .fmm-form .wpforms-field {
	padding: 8px 0;
}

.fmm-page .fmm-form .wpforms-field-label {
	color: var(--ink);
	font-weight: 600;
	font-size: 0.9375rem;
	margin-bottom: 6px;
}

.fmm-page .fmm-form input[type="text"],
.fmm-page .fmm-form input[type="email"],
.fmm-page .fmm-form input[type="tel"],
.fmm-page .fmm-form textarea {
	width: 100% !important;
	max-width: 100% !important;
	min-height: 48px;
	padding: 10px 14px;
	border: 1px solid #7d8f86;
	border-radius: 10px;
	background: #fff;
	color: var(--ink);
	font: inherit;
}

.fmm-page .fmm-form textarea {
	min-height: 140px;
}

.fmm-page .fmm-form input:focus-visible,
.fmm-page .fmm-form textarea:focus-visible {
	outline: 3px solid var(--focus);
	outline-offset: 1px;
	border-color: var(--focus);
}

.fmm-page .fmm-form .wpforms-required-label {
	color: #b42318;
}

.fmm-page .fmm-form label.wpforms-error,
.fmm-page .fmm-form em.wpforms-error {
	color: #b42318;
	font-weight: 600;
}

.fmm-page .fmm-form .wpforms-container .wpforms-form button[type="submit"] {
	min-height: 48px;
	padding: 12px 24px;
	background: var(--brand-strong);
	color: #fff;
	border: 0;
	border-radius: 10px;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.fmm-page .fmm-form .wpforms-container .wpforms-form button[type="submit"]:hover {
	background: var(--brand-ink);
}

/* Rodapé ---------------------------------------------------------------- */

.fmm-footer {
	padding: 32px 0 40px;
	border-top: 1px solid var(--line);
	color: var(--muted);
	font-size: 0.9375rem;
}

.fmm-footer__grid {
	display: grid;
	gap: 12px;
}

.fmm-footer__links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0 16px;
}

.fmm-footer__label {
	font-weight: 600;
}

/* Tablet ---------------------------------------------------------------- */

@media (min-width: 640px) {
	.fmm-wrap {
		padding-left: 24px;
		padding-right: 24px;
	}

	.fmm-section {
		padding: 72px 0;
	}

	.fmm-grid--2,
	.fmm-grid--4 {
		grid-template-columns: repeat(2, 1fr);
	}

	.fmm-resumes {
		grid-template-columns: repeat(2, max-content);
		gap: 16px 24px;
	}

	.fmm-facts {
		grid-template-columns: repeat(3, 1fr);
	}

	.fmm-orgs__list {
		grid-template-columns: repeat(5, 1fr);
	}

	.fmm-card {
		padding: 24px;
	}
}

/* Desktop --------------------------------------------------------------- */

@media (min-width: 960px) {
	:root {
		--header-h: 120px;
	}

	.fmm-hero {
		padding: 64px 0 80px;
	}

	.fmm-hero__grid {
		grid-template-columns: 1fr 400px;
		gap: 56px;
		align-items: center;
	}

	.fmm-hero__photo {
		order: 0;
		width: 100%;
	}

	.fmm-grid--3 {
		grid-template-columns: repeat(3, 1fr);
	}

	.fmm-grid--4 {
		grid-template-columns: repeat(4, 1fr);
	}

	.fmm-contact {
		grid-template-columns: 1fr 1fr;
		gap: 48px;
		align-items: start;
	}

	.fmm-footer__grid {
		grid-template-columns: 1fr auto auto;
		align-items: center;
		gap: 24px;
	}
}

/* Alto contraste do sistema --------------------------------------------- */

@media (forced-colors: active) {
	.fmm-page .fmm-btn,
	.fmm-page .fmm-langs a[aria-current="page"],
	.fmm-page .fmm-nav li:last-child a {
		border: 2px solid ButtonText;
	}
}

/* Impressão ------------------------------------------------------------- */

@media print {
	.fmm-header,
	.fmm-form,
	.fmm-skip {
		display: none;
	}

	.fmm-section,
	.fmm-section--tint {
		background: none;
		padding: 16px 0;
	}
}
