/*!
 * Mousas — Layout: header, footer, menu, WhatsApp flutuante
 *
 * @author   Dante Testa <https://dantetesta.com.br>
 * @version  1.0.0
 * @since    2026-04-17 15:46:00 UTC-03
 */

/* =============================================================================
 * Header
 * ========================================================================== */

.mousas-header {
	position: sticky;
	top: 0;
	z-index: var(--mousas-z-header);
	background: rgba(255, 255, 255, 0.86);
	backdrop-filter: saturate(180%) blur(12px);
	-webkit-backdrop-filter: saturate(180%) blur(12px);
	border-bottom: 1px solid transparent;
	transition: border-color var(--mousas-transition), box-shadow var(--mousas-transition);
}

.mousas-header.is-scrolled {
	border-bottom-color: var(--mousas-neutral-200);
	box-shadow: var(--mousas-shadow-sm);
}

.mousas-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--mousas-space-lg);
	min-height: var(--mousas-header-h);
}

/* Container do header: max-width ampliado para acomodar o menu
 * completo (8 itens + CTA) em uma única linha, mas ainda centralizado
 * no viewport — sem o "vazio" do full-width em telas 1440+. */
.mousas-header > .mousas-container {
	max-width: 1440px;
	padding-inline: clamp(1rem, 2.5vw, 2rem);
}

/* Brand */
.mousas-brand {
	display: inline-flex;
	align-items: center;
	gap: var(--mousas-space-sm);
	text-decoration: none;
	color: var(--mousas-primary);
	font-weight: 700;
	font-family: var(--mousas-font-display);
	letter-spacing: -0.02em;
}

.mousas-brand__mark { display: inline-flex; line-height: 0; }
.mousas-brand__name { font-size: var(--mousas-fs-xl); }

/* Logo customizada via Customizer (image upload). Constrain altura para
 * preservar a métrica do header/footer mesmo com imagens grandes. */
.mousas-brand__img {
	display: block;
	max-height: 48px;
	width: auto;
	height: auto;
	object-fit: contain;
}
.mousas-brand__img--footer { max-height: 56px; }

.mousas-brand--footer { color: var(--mousas-white); }
.mousas-brand--footer .mousas-brand__name { color: var(--mousas-white); }

/* Menu toggle (mobile) */
.mousas-menu-toggle {
	display: inline-flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	width: 44px; height: 44px;
	border-radius: var(--mousas-radius-md);
	gap: 5px;
	transition: background-color var(--mousas-transition);
}
.mousas-menu-toggle:hover { background: var(--mousas-neutral-100); }

.mousas-menu-toggle__bars { position: relative; display: block; width: 22px; height: 14px; }
.mousas-menu-toggle__bars span {
	position: absolute;
	left: 0; right: 0;
	height: 2px;
	background: var(--mousas-primary);
	border-radius: 2px;
	transition: transform var(--mousas-transition), opacity var(--mousas-transition), top var(--mousas-transition);
}
.mousas-menu-toggle__bars span:nth-child(1) { top: 0; }
.mousas-menu-toggle__bars span:nth-child(2) { top: 6px; }
.mousas-menu-toggle__bars span:nth-child(3) { top: 12px; }

.mousas-menu-toggle[aria-expanded="true"] .mousas-menu-toggle__bars span:nth-child(1) { top: 6px; transform: rotate(45deg); }
.mousas-menu-toggle[aria-expanded="true"] .mousas-menu-toggle__bars span:nth-child(2) { opacity: 0; }
.mousas-menu-toggle[aria-expanded="true"] .mousas-menu-toggle__bars span:nth-child(3) { top: 6px; transform: rotate(-45deg); }

/* Navegação */
.mousas-nav {
	display: none;
	position: fixed;
	top: var(--mousas-header-h);
	left: 0; right: 0;
	max-height: calc(100svh - var(--mousas-header-h));
	overflow-y: auto;
	padding: var(--mousas-space-lg);
	background: var(--mousas-white);
	border-top: 1px solid var(--mousas-neutral-200);
	box-shadow: var(--mousas-shadow-lg);
	z-index: var(--mousas-z-menu);
}

.mousas-nav.is-open { display: block; }

.mousas-menu {
	list-style: none;
	padding: 0; margin: 0;
	display: flex;
	flex-direction: column;
	gap: var(--mousas-space-xs);
}

.mousas-menu__item {
	list-style: none;
}

.mousas-menu__link {
	display: block;
	padding: var(--mousas-space-sm) var(--mousas-space-md);
	color: var(--mousas-secondary);
	font-weight: 500;
	text-decoration: none;
	border-radius: var(--mousas-radius-md);
	transition: color var(--mousas-transition), background-color var(--mousas-transition);
}

.mousas-menu__link:hover,
.mousas-menu__item.is-active > .mousas-menu__link {
	color: var(--mousas-primary);
	background: var(--mousas-neutral-100);
}

.mousas-nav__cta { margin-top: var(--mousas-space-md); }
.mousas-nav__cta .mousas-btn { width: 100%; }

/* Desktop */
@media (min-width: 960px) {
	.mousas-menu-toggle { display: none; }

	.mousas-nav {
		display: flex;
		position: static;
		align-items: center;
		gap: var(--mousas-space-lg);
		padding: 0;
		background: transparent;
		border: 0;
		box-shadow: none;
		overflow: visible;
		max-height: none;
	}

	.mousas-menu {
		flex-direction: row;
		align-items: center;
		gap: var(--mousas-space-2xs);
	}

	.mousas-menu__link {
		padding: var(--mousas-space-xs) var(--mousas-space-sm);
		font-size: var(--mousas-fs-sm);
		white-space: nowrap;
	}

	.mousas-menu__link:hover {
		background: transparent;
		color: var(--mousas-accent-700);
	}

	.mousas-menu__item.is-active > .mousas-menu__link {
		background: transparent;
		color: var(--mousas-accent-700);
	}

	.mousas-nav__cta { margin: 0; }
	.mousas-nav__cta .mousas-btn { width: auto; }
}

/* =============================================================================
 * Footer
 * ========================================================================== */

.mousas-footer {
	background: var(--mousas-primary);
	color: var(--mousas-text-inverse);
	padding-block: 0 var(--mousas-space-xl);
	position: relative;
}

.mousas-footer__cta {
	background: linear-gradient(135deg, var(--mousas-primary-500) 0%, var(--mousas-primary) 100%);
	padding-block: clamp(3rem, 6vw, 5rem);
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mousas-footer__cta-inner {
	display: grid;
	gap: var(--mousas-space-xl);
	align-items: center;
}

@media (min-width: 860px) {
	.mousas-footer__cta-inner { grid-template-columns: 1fr auto; }
}

.mousas-footer__cta-copy h2 { color: var(--mousas-white); max-width: 24ch; }
.mousas-footer__cta-copy .mousas-eyebrow { color: var(--mousas-accent); }

.mousas-footer__cta-actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--mousas-space-sm);
}

.mousas-footer__cta-actions .mousas-btn--ghost {
	--btn-color: var(--mousas-white);
	--btn-border: rgba(255, 255, 255, 0.25);
}
.mousas-footer__cta-actions .mousas-btn--ghost:hover {
	--btn-bg: rgba(255, 255, 255, 0.1);
	--btn-border: var(--mousas-white);
	color: var(--mousas-white);
}

.mousas-footer__grid {
	display: grid;
	gap: var(--mousas-space-2xl);
	padding-block: clamp(2.5rem, 5vw, 4rem);
}

@media (min-width: 640px) { .mousas-footer__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .mousas-footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: var(--mousas-space-xl); } }

.mousas-footer__tagline { color: rgba(255, 255, 255, 0.72); margin-top: var(--mousas-space-md); max-width: 32ch; }

.mousas-footer__col h3 {
	color: var(--mousas-accent);
	font-size: var(--mousas-fs-sm);
	font-family: var(--mousas-font-sans);
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	margin-bottom: var(--mousas-space-md);
}

.mousas-footer__menu {
	list-style: none;
	padding: 0; margin: 0;
	display: flex;
	flex-direction: column;
	gap: var(--mousas-space-xs);
}

.mousas-footer__menu a {
	color: rgba(255, 255, 255, 0.8);
	text-decoration: none;
	transition: color var(--mousas-transition);
	font-size: var(--mousas-fs-sm);
}

.mousas-footer__menu a:hover { color: var(--mousas-white); }

.mousas-footer__bottom {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: var(--mousas-space-sm);
	padding-top: var(--mousas-space-lg);
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	color: rgba(255, 255, 255, 0.6);
	font-size: var(--mousas-fs-xs);
}

.mousas-footer__credit a { color: var(--mousas-accent); text-decoration: none; }
.mousas-footer__credit a:hover { color: var(--mousas-white); text-decoration: underline; }

/* =============================================================================
 * WhatsApp flutuante
 * ========================================================================== */

.mousas-whatsapp-float {
	position: fixed;
	right: clamp(1rem, 3vw, 1.75rem);
	bottom: clamp(1rem, 3vw, 1.75rem);
	z-index: var(--mousas-z-float);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 56px; height: 56px;
	border-radius: 50%;
	background: #25D366;
	color: var(--mousas-white);
	text-decoration: none;
	box-shadow: 0 8px 24px rgba(37, 211, 102, 0.35), 0 0 0 0 rgba(37, 211, 102, 0.5);
	transition: transform var(--mousas-transition), box-shadow var(--mousas-transition);
	animation: mousas-pulse 2.4s var(--mousas-ease) infinite;
}

.mousas-whatsapp-float:hover {
	transform: scale(1.08);
	box-shadow: 0 12px 30px rgba(37, 211, 102, 0.45);
	color: var(--mousas-white);
}

@keyframes mousas-pulse {
	0%   { box-shadow: 0 8px 24px rgba(37, 211, 102, 0.35), 0 0 0 0 rgba(37, 211, 102, 0.5); }
	70%  { box-shadow: 0 8px 24px rgba(37, 211, 102, 0.35), 0 0 0 18px rgba(37, 211, 102, 0); }
	100% { box-shadow: 0 8px 24px rgba(37, 211, 102, 0.35), 0 0 0 0 rgba(37, 211, 102, 0); }
}

@media (prefers-reduced-motion: reduce) {
	.mousas-whatsapp-float { animation: none; }
}

/* =============================================================================
 * Skip link (acessibilidade)
 * ========================================================================== */

.mousas-skip-link {
	position: absolute;
	top: -100px;
	left: var(--mousas-space-md);
	z-index: var(--mousas-z-toast);
	padding: 0.75rem 1.25rem;
	background: var(--mousas-primary);
	color: var(--mousas-white);
	text-decoration: none;
	border-radius: var(--mousas-radius-md);
	box-shadow: var(--mousas-shadow-lg);
	transition: top var(--mousas-transition);
}

.mousas-skip-link:focus {
	top: var(--mousas-space-md);
	color: var(--mousas-white);
}

/* =============================================================================
 * Hero geral
 * ========================================================================== */

.mousas-hero {
	padding-block: clamp(4rem, 10vw, 7rem) clamp(3rem, 8vw, 5rem);
	background:
		radial-gradient(ellipse at top right, color-mix(in oklab, var(--mousas-accent) 12%, transparent) 0%, transparent 55%),
		linear-gradient(180deg, var(--mousas-neutral-100) 0%, var(--mousas-white) 100%);
	border-bottom: 1px solid var(--mousas-neutral-200);
	position: relative;
	overflow: hidden;
}

/*
 * Hero "simples" (Painel, Consultor, genérico). Flex column apenas — o
 * max-width é aplicado aos FILHOS, não ao próprio elemento, para não
 * colidir com .mousas-container quando ambos estão no mesmo nó.
 */
.mousas-hero__inner {
	display: flex;
	flex-direction: column;
	gap: var(--mousas-space-md);
}

.mousas-hero__inner > * { max-width: 68ch; }
.mousas-hero__inner > .mousas-cta-row,
.mousas-hero__inner > .mousas-hero__trust { max-width: none; }

/* =============================================================================
 * Hero da página Consultor — variante DARK editorial com imagem ao fundo
 * (banner com escritório noturno + laptop + infográficos dourados).
 * ========================================================================== */
.mousas-hero--consultor {
	--mousas-consultor-bg: url("../img/hero-consultor.webp");

	position: relative;
	overflow: hidden;
	isolation: isolate;
	padding-block: clamp(5rem, 11vw, 9rem) clamp(4rem, 9vw, 7rem);
	background-color: var(--mousas-primary);
	background-image: var(--mousas-consultor-bg);
	background-repeat: no-repeat;
	background-size: cover;
	background-position: right center;
	color: var(--mousas-white);
}

/* Overlay vertical: navy denso à esquerda, transparente sobre o painel/dashboard. */
.mousas-hero--consultor::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(
		90deg,
		rgba(10, 30, 63, 0.94) 0%,
		rgba(10, 30, 63, 0.78) 30%,
		rgba(10, 30, 63, 0.30) 56%,
		rgba(10, 30, 63, 0.00) 75%
	);
	pointer-events: none;
	z-index: 0;
}
.mousas-hero--consultor::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(10,30,63,0.20) 0%, transparent 18%, transparent 82%, rgba(10,30,63,0.32) 100%);
	pointer-events: none;
	z-index: 0;
}

.mousas-hero--consultor .mousas-hero__inner {
	position: relative;
	z-index: 1;
}

.mousas-hero--consultor h1,
.mousas-hero--consultor .mousas-lead { color: var(--mousas-white); }
.mousas-hero--consultor .mousas-eyebrow { color: var(--mousas-accent); text-shadow: 0 1px 2px rgba(0,0,0,0.2); }

/* H1 escala sensata — não pode overflow no display-1 default em pt-BR longa. */
.mousas-hero--consultor h1.mousas-display-1 {
	font-size: clamp(2rem, 4.2vw, 3.5rem);
	line-height: 1.04;
	letter-spacing: -0.03em;
	max-width: 22ch;
	text-shadow: 0 2px 24px rgba(0, 0, 0, 0.28);
}

.mousas-hero--consultor .mousas-lead {
	max-width: 50ch;
	color: rgba(255, 255, 255, 0.86) !important;
}

@media (min-width: 960px) {
	.mousas-hero--consultor .mousas-hero__inner > * { max-width: 56ch; }
	.mousas-hero--consultor .mousas-hero__inner > .mousas-cta-row { max-width: none; }
}

@media (max-width: 768px) {
	.mousas-hero--consultor {
		background-position: 70% center;
		min-height: 86svh;
	}
	.mousas-hero--consultor::before {
		background: linear-gradient(180deg, rgba(10,30,63,0.92) 0%, rgba(10,30,63,0.78) 50%, rgba(10,30,63,0.55) 100%);
	}
	.mousas-hero--consultor h1.mousas-display-1 { max-width: 100%; }
}
