/*
 * mosten-ui — Design system compartilhado da migração (Home, Empresas, próximas páginas)
 *
 * TOKENS (--ms-*): definidos em .mosten-ui no body. Cores #0a0a0a, #612cb5, #cb6bf3;
 *   tipografia Inter Tight + JetBrains Mono (--ms-mono).
 *
 * SHELL: utilitários reutilizáveis — .ms-shell, .ms-eyebrow*, .ms-section-*,
 *   .ms-button*, .ms-header*, .ms-footer*, .ms-scroll-reveal.
 *
 * PÁGINA: cada rota adiciona classe própria no body (ex.: mosten-home, mosten-empresas)
 *   e CSS prefixado em pages/{pagina}/styles/ (ex.: .home-*, .emp-*).
 *
 * LEGADO: style.css mantém --primary-color, --secondary-color, .botao-laranja, .container
 *   para páginas ainda não migradas. Os dois sistemas coexistem durante a migração.
 */

@font-face {
	font-display: swap;
	font-family: "JetBrains Mono";
	font-style: normal;
	font-weight: 500;
	src: url("../webfonts/jetbrains-mono-500.ttf") format("truetype");
}
.mosten-ui {
	--ms-black: #0a0a0a;
	--ms-black-soft: #1a1a1a;
	--ms-purple: #612cb5;
	--ms-purple-light: #b79be8;
	--ms-purple-bright: #cb6bf3;
	--ms-purple-pale: #faecff;
	--ms-surface: #f3f1ec;
	--ms-white: #f4f3ef;
	--ms-muted: #a5a5a5;
	--ms-copy: #68675f;
	--ms-mono: "JetBrains Mono", "Courier New", monospace;
	background: var(--ms-black);
	color: var(--ms-white);
	font-family: "Inter Tight", sans-serif;
	margin: 0;
	overflow-x: clip;
}

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

/* Oculta o badge do reCAPTCHA v3 em todas as páginas do design system
   (body recebe .mosten-ui e o badge é injetado como filho do body).
   A atribuição exigida pelo Google fica no texto de privacidade do
   formulário compartilhado (template-parts/lps/lp-form). */
.mosten-ui .grecaptcha-badge {
	visibility: hidden;
}

.mosten-ui a,
.mosten-ui button {
	font: inherit;
}

.mosten-ui a:focus-visible,
.mosten-ui button:focus-visible {
	outline: 3px solid var(--ms-purple-bright);
	outline-offset: 4px;
}
.ms-shell {
	margin: 0 auto;
	max-width: 1240px;
	width: calc(100% - 200px);
}
.ms-eyebrow {
	color: var(--ms-purple-light);
	font-family: var(--ms-mono);
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 1.04px;
	line-height: 1.35;
	margin: 0 0 24px;
	text-transform: uppercase;
}

.ms-eyebrow--center {
	color: #d4bbff;
	text-align: center;
}

.ms-eyebrow--light {
	color: #e8b0ff;
}

.ms-eyebrow--purple {
	color: var(--ms-purple);
}

.ms-section-title {
	color: var(--ms-white);
	font-size: 56px;
	font-weight: 400;
	letter-spacing: -1.96px;
	line-height: 1.02;
	margin: 0;
	max-width: 900px;
}

.ms-section-title--dark {
	color: var(--ms-black);
	max-width: 820px;
}

.ms-section-title--insights {
	color: #37146f;
	max-width: 820px;
}

.ms-section-description {
	color: #a8a8aa;
	font-size: 18px;
	line-height: 1.55;
	margin: 20px 0 0;
	max-width: 620px;
}

.ms-section-description--dark {
	color: var(--ms-copy);
	max-width: 560px;
}

.ms-section-description--insights {
	color: #4d2290;
	font-size: 17px;
	max-width: 560px;
}

.ms-section-action {
	display: flex;
	justify-content: center;
	margin-top: 80px;
}
.ms-button {
	align-items: center;
	border: 1px solid transparent;
	border-radius: 100px;
	cursor: pointer;
	display: inline-flex;
	font-size: 17px;
	justify-content: center;
	line-height: 1.25;
	min-height: 49px;
	padding: 13px 22px;
	text-align: center;
	transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
	width: 100%;
}

.ms-button:hover {
	transform: translateY(-2px);
}

.ms-button:active {
	transform: translateY(0) scale(0.98);
}

.ms-button[aria-disabled="true"],
.ms-button:disabled {
	cursor: not-allowed;
	opacity: 0.45;
	pointer-events: none;
}

.ms-button--primary {
	background: var(--ms-purple);
	color: #ffffff;
}

.ms-button--primary:hover {
	background: #7544c3;
	color: #ffffff;
}

.ms-button--outline {
	border-color: rgba(255, 255, 255, 0.35);
	color: #ffffff;
}

.ms-button--outline:hover {
	background: rgba(255, 255, 255, 0.1);
	border-color: rgba(255, 255, 255, 0.65);
	color: #ffffff;
}

.ms-button--dark {
	background: var(--ms-black);
	color: var(--ms-white);
}

.ms-button--dark:hover {
	background: #242424;
	color: #ffffff;
}

.ms-button--light-outline {
	border-color: #f1d1ff;
	color: #efc9ff;
}

.ms-button--light-outline:hover {
	background: rgba(255, 255, 255, 0.1);
	color: #ffffff;
}

.ms-button--auto {
	font-size: 18px;
	min-height: 48px;
	padding-inline: 24px;
	width: auto;
}
/* Header
   O pill é fixo, então o topo de cada página precisa reservar o espaço que ele
   ocupa. Em vez de cada rota recalcular isso, o componente publica os tokens
   abaixo e o valor já pronto em --ms-header-offset:

     .minha-hero  { padding: var(--ms-header-offset) 0 80px; }
     .minha-ancora { scroll-margin-top: var(--ms-header-scroll-offset); }

   Ao criar uma página nova é só usar essas duas variáveis — nenhuma rota deve
   redefinir o `top` do .ms-header, remontar a conta com tokens próprios nem
   sobrescrever --ms-header-gap (o respiro entre o pill e o primeiro elemento do
   conteúdo). Inclusive a compressão para telas baixas é feita aqui, logo abaixo:
   quando cada página tinha o próprio corte, o mesmo notebook via de 24 a 56px de
   respiro dependendo da rota. Se um hero específico não couber na primeira dobra,
   comprima os tokens dele (gaps internos, tamanho de título), não o do header.

   A barra do admin desloca só o header: o conteúdo já é empurrado pelo padding
   que o WP aplica no <html>, por isso --ms-admin-bar entra no `top` e fica de
   fora do --ms-header-offset. */
.mosten-ui {
	--ms-admin-bar: 0px;
	--ms-header-top: 36px;
	--ms-header-height: 68px;
	--ms-header-gap: 56px;
	--ms-header-space: calc(var(--ms-header-top) + var(--ms-header-height));
	--ms-header-offset: calc(var(--ms-header-space) + var(--ms-header-gap));
	--ms-header-scroll-offset: calc(var(--ms-header-space) + 24px);
}

.mosten-ui.admin-bar {
	--ms-admin-bar: 32px;
}

/* Mesmo ponto de corte em que o WP troca a altura da barra do admin. */
@media screen and (max-width: 782px) {
	.mosten-ui.admin-bar {
		--ms-admin-bar: 46px;
	}
}

/* Notebook: em desktop com pouca altura útil o respiro cheio empurra o CTA do
   hero para fora da primeira dobra. A compressão vive aqui, e não em cada
   página, para todas encolherem igual — antes cada rota tinha o próprio corte
   (Aerium por altura, ViSia por largura) e o resultado variava de 24 a 56px
   na mesma tela. O `top` do pill não muda: só o respiro abaixo dele.

   O corte é 1025px porque abaixo disso o header já vira menu hambúrguer e o
   respiro passa a ser o do bloco Tablet (40px). Descer este corte não adianta:
   o bloco Tablet vem depois no arquivo e vence a faixa em que os dois casam. */
@media screen and (min-width: 1025px) and (max-height: 820px) {
	.mosten-ui {
		--ms-header-gap: 36px;
	}
}

.ms-header {
	left: 0;
	pointer-events: none;
	position: fixed;
	right: 0;
	top: calc(var(--ms-admin-bar) + var(--ms-header-top));
	z-index: 1000;
}

.ms-header__pill {
	align-items: center;
	backdrop-filter: blur(18px);
	background: rgba(28, 28, 30, 0.15);
	border: 1px solid rgba(244, 243, 239, 0.07);
	border-radius: 100px;
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
	display: flex;
	height: var(--ms-header-height);
	justify-content: space-between;
	margin: 0 auto;
	max-width: 1119px;
	overflow: visible;
	padding: 0 16px 0 32px;
	pointer-events: auto;
	width: calc(100% - 64px);
}

.ms-header__logo {
	display: block;
	height: 19px;
	width: 100px;
}

.ms-header__logo img {
	display: block;
	height: 100%;
	object-fit: contain;
	width: 100%;
}

.ms-header__nav {
	align-items: center;
	display: flex;
	gap: clamp(18px, 2.1vw, 36px);
}

.ms-header__menu-container {
	display: flex;
}

.ms-header__menu {
	align-items: center;
	display: flex;
	gap: clamp(18px, 2.1vw, 36px);
	list-style: none;
	margin: 0;
	padding: 0;
}

.ms-header__menu li {
	list-style: none;
	position: relative;
}

.ms-header__menu > li > a {
	color: #e4e4e4;
	font-size: clamp(15px, 1.18vw, 17px);
	white-space: nowrap;
	position: relative;
}

.ms-header__menu > li > a::after {
	background: var(--ms-purple-bright);
	bottom: -7px;
	content: "";
	height: 1px;
	left: 0;
	position: absolute;
	transform: scaleX(0);
	transform-origin: right;
	transition: transform 180ms ease;
	width: 100%;
}

.ms-header__menu > li:hover > a::after,
.ms-header__menu > li:focus-within > a::after {
	transform: scaleX(1);
	transform-origin: left;
}

.ms-header__menu .sub-menu {
	background: rgba(10, 10, 10, 0.96);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 16px;
	box-shadow: 0 18px 38px rgba(0, 0, 0, 0.28);
	display: flex;
	flex-direction: column;
	gap: 3px;
	left: -16px;
	list-style: none;
	margin: 0;
	min-width: 230px;
	opacity: 0;
	padding: 10px;
	pointer-events: none;
	position: absolute;
	top: calc(100% + 22px);
	transform: translateY(8px);
	transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
	visibility: hidden;
}

.ms-header__menu .sub-menu .sub-menu {
	left: calc(100% + 8px);
	top: -10px;
	/*
	 * Sub-menus de nível 3 (filhos de Serviços/Soluções/Plataformas) escondem na
	 * hora em que o pai perde hover, evitando sobreposição visual quando o usuário
	 * passa de um item irmão para outro (ex.: Serviços → Soluções). Sem isso, os
	 * 160ms de fade-out do antigo se sobrepõem aos 160ms de fade-in do novo e
	 * ambas as listas aparecem ao mesmo tempo na mesma faixa da tela — bug
	 * reportado pela Bianca em 21/09/2026. A transição de 160ms continua valendo
	 * no show (regra :hover abaixo) e para o nível 2 (entrada/saída do "O que
	 * fazemos").
	 */
	transition: none;
}

/*
 * Ponte invisível à esquerda do sub-menu nível 3, fechando o gap de 8px entre o
 * <a> pai e o sub-menu. Sem isso, ao mover o mouse do <a> "Plataformas" pra um
 * item filho (ex.: TrackOne), o cursor atravessa os 8px sem nada sob ele e o
 * sub-menu fecha instantaneamente (transition: none acima) antes do item
 * filho receber hover — navegação Plataformas → TrackOne vira armadilha.
 * Espelha o ::before de 22px que já existe acima do nível 2 (linha 401).
 */
.ms-header__menu .sub-menu .sub-menu::before {
	content: "";
	position: absolute;
	top: 0;
	bottom: -10px;
	left: -12px;
	width: 12px;
}

.ms-header__menu > li > .sub-menu::before {
	content: "";
	height: 22px;
	left: 0;
	position: absolute;
	right: 0;
	top: -22px;
}

.ms-header__menu li:hover > .sub-menu,
.ms-header__menu li:focus-within > .sub-menu {
	opacity: 1;
	pointer-events: auto;
	transform: translateY(0);
	visibility: visible;
	transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
}

.ms-header__menu .sub-menu a {
	border-radius: 9px;
	color: #e4e4e4;
	display: block;
	font-size: 15px;
	line-height: 1.25;
	padding: 10px 12px;
	transition: background-color 160ms ease, color 160ms ease;
	white-space: nowrap;
}

.ms-header__menu .sub-menu a:hover,
.ms-header__menu .sub-menu a:focus-visible {
	background: rgba(203, 107, 243, 0.16);
	color: #ffffff;
}

.ms-header__cta {
	background: var(--ms-purple-bright);
	border: 1px solid var(--ms-purple-bright);
	border-radius: 100px;
	color: var(--ms-black);
	font-size: 20px;
	padding: 10px 20px;
	transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.ms-header__cta:hover {
	background: #dc9af8;
	color: var(--ms-black);
	transform: translateY(-1px);
}

.ms-header__cta:active {
	transform: scale(0.98);
}

.ms-header__toggle {
	background: transparent;
	border: 1px solid rgba(255, 255, 255, 0.35);
	border-radius: 999px;
	color: #ffffff;
	cursor: pointer;
	display: none;
	padding: 8px 14px;
}
/* Footer */
.ms-footer {
	background: var(--ms-black);
	border-top: 1px solid rgba(244, 243, 239, 0.1);
	color: #b0b0b4;
	min-height: 299px;
	padding: 64px 20px 32px;
}

.ms-footer__inner {
	margin: 0 auto;
	max-width: 1400px;
}

.ms-footer__grid {
	border-bottom: 1px solid rgba(244, 243, 239, 0.1);
	display: grid;
	gap: 48px;
	grid-template-columns: 2fr repeat(3, 1fr);
	padding-bottom: 48px;
}

.ms-footer__brand img {
	display: block;
	height: auto;
	width: 120px;
}

.ms-footer__brand p {
	color: #9c9ca0;
	font-size: 15px;
	margin: 20px 0 0;
}

.ms-footer__column {
	display: flex;
	flex-direction: column;
	font-style: normal;
	gap: 12px;
}

.ms-footer__column h2 {
	color: #848488;
	font-family: var(--ms-mono);
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.96px;
	margin: 0;
	text-transform: uppercase;
}

.ms-footer__column a {
	color: #b0b0b4;
	font-size: 16px;
	line-height: 1.25;
	transition: color 180ms ease;
}

.ms-footer__column a:hover {
	color: #ffffff;
}

.ms-footer__legal {
	color: #848488;
	display: flex;
	font-size: 13px;
	justify-content: space-between;
	padding-top: 24px;
}

.ms-footer__legal p {
	margin: 0;
}

/* Scroll reveals */
.mosten-motion-enabled .ms-scroll-reveal {
	opacity: 0;
	transform: translate3d(0, 22px, 0);
	transition: opacity 720ms cubic-bezier(0.22, 1, 0.36, 1), transform 720ms cubic-bezier(0.22, 1, 0.36, 1);
	transition-delay: var(--ms-reveal-delay, 0ms);
	will-change: opacity, transform;
}

.mosten-motion-enabled .ms-scroll-reveal.is-visible,
.mosten-motion-enabled .mosten-sem-animacao .ms-scroll-reveal {
	opacity: 1;
	transform: translate3d(0, 0, 0);
	will-change: auto;
}

/* Notebook */
@media screen and (max-width: 1280px) {
	.ms-shell {
		width: calc(100% - 120px);
	}
	.ms-header__pill {
		max-width: 1000px;
	}
}

/* Tablet */
@media screen and (max-width: 1024px) {
	.mosten-ui {
		--ms-header-gap: 40px;
	}
	.ms-shell {
		width: calc(100% - 64px);
	}

	.ms-header__pill {
		overflow: visible;
		width: calc(100% - 64px);
	}

	.ms-header__toggle {
		display: inline-flex;
	}

	.ms-header__nav {
		align-items: stretch;
		backdrop-filter: blur(18px);
		background: rgba(10, 10, 10, 0.96);
		border: 1px solid rgba(255, 255, 255, 0.12);
		border-radius: 20px;
		display: none;
		flex-direction: column;
		gap: 18px;
		padding: 24px;
		position: absolute;
		right: 0;
		top: calc(var(--ms-header-height) + 10px);
		width: 280px;
	}

	.ms-header__pill.is-open .ms-header__nav {
		display: flex;
	}

	.ms-header__menu-container,
	.ms-header__menu {
		width: 100%;
	}

	.ms-header__menu {
		align-items: stretch;
		flex-direction: column;
		gap: 4px;
	}

	.ms-header__menu > li > a {
		display: block;
		font-size: 18px;
		padding: 9px 0;
		width: 100%;
	}

	.ms-header__menu > li > a::after {
		bottom: 3px;
	}

	.ms-header__menu .sub-menu,
	.ms-header__menu .sub-menu .sub-menu {
		background: rgba(255, 255, 255, 0.05);
		border: 0;
		border-left: 1px solid rgba(203, 107, 243, 0.5);
		border-radius: 0 10px 10px 0;
		box-shadow: none;
		display: none;
		gap: 2px;
		left: auto;
		margin: 5px 0 7px 4px;
		min-width: 0;
		opacity: 1;
		padding: 5px 0 5px 12px;
		pointer-events: auto;
		position: static;
		top: auto;
		transform: none;
		visibility: visible;
		width: calc(100% - 4px);
	}

	.ms-header__menu li.is-submenu-open > .sub-menu {
		display: flex;
	}

	.ms-header__menu .sub-menu a {
		font-size: 15px;
		padding: 9px 10px;
		white-space: normal;
	}

	.ms-header__cta {
		font-size: 18px;
		text-align: center;
		width: 100%;
	}
	.ms-section-title {
		font-size: 48px;
	}

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

/* Mobile */
@media screen and (max-width: 768px) {
	.mosten-ui {
		--ms-header-top: 30px;
		--ms-header-height: 56px;
		--ms-header-gap: 28px;
	}
	.ms-shell {
		width: calc(100% - 40px);
	}

	.ms-eyebrow {
		font-size: 12px;
		margin-bottom: 18px;
	}
	.ms-section-description {
		font-size: 17px;
	}
	.ms-header__pill {
		padding-left: 20px;
		width: calc(100% - 40px);
	}

	.ms-header__logo {
		width: 92px;
	}

	.ms-header__nav {
		left: 0;
		right: 0;
		width: 100%;
	}
	.ms-section-title,
	.ms-section-title--dark,
	.ms-section-title--insights {
		font-size: clamp(34px, 10vw, 44px);
		letter-spacing: -1.1px;
	}

	.ms-section-action {
		margin-top: 56px;
	}

	.ms-footer {
		padding-inline: 20px;
	}

	.ms-footer__grid {
		grid-template-columns: 1fr 1fr;
	}

	.ms-footer__brand {
		grid-column: 1 / -1;
	}

	.ms-footer__legal {
		align-items: flex-start;
		flex-direction: column;
		gap: 10px;
	}
}

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

	html.mosten-motion-enabled .ms-scroll-reveal {
		opacity: 0 !important;
		transform: none !important;
		transition: opacity 420ms ease-out !important;
		transition-delay: var(--ms-reveal-delay, 0ms) !important;
	}

	html.mosten-motion-enabled .ms-scroll-reveal.is-visible,
	html.mosten-motion-enabled .mosten-sem-animacao .ms-scroll-reveal {
		opacity: 1 !important;
	}
}
