/*
Theme Name:  Made2Move
Theme URI:   https://made2move.com.br
Author:      Maré Studio
Author URI:  https://marestudio.art.br
Description: Tema do Made2Move. Traz a home completa (hero, trabalhos, quem somos, clientes, contato) com a paleta e a tipografia da marca, textos editáveis no Personalizar, e é compatível com Elementor para as demais páginas. Os efeitos de scroll entram em fase posterior.
Version:     0.6.0
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
License:     GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: made2move
Tags:        full-width-template, custom-colors, editor-style
*/

/* ---------------------------------------------------------------
   Tokens da marca. Valores vindos do site em Next; mudou lá, muda aqui.
   --------------------------------------------------------------- */

:root {
	--m2m-ground: #0a0a08;
	--m2m-ground-raised: #17160f;
	--m2m-accent: #b6ff00;
	--m2m-accent-dim: #8fce00;
	--m2m-ink: #f3f1e7;
	--m2m-muted: #9d998a;
	--m2m-hairline: rgba( 243, 241, 231, 0.14 );

	--m2m-font-display: "Anton", system-ui, sans-serif;
	--m2m-font-body: "Archivo", system-ui, sans-serif;

	color-scheme: dark;
}

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

html,
body {
	margin: 0;
	padding: 0;
}

body {
	background: var( --m2m-ground );
	/* Cor explícita: sem isto, texto em seção de fundo claro herda o tom
	   claro do body e some. */
	color: var( --m2m-ink );
	font-family: var( --m2m-font-body );
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
	/* `clip` e não `hidden`: quando um eixo deixa de ser `visible`, o outro
	   computa para `auto`, o body vira caixa de rolagem e `position: sticky`
	   para de funcionar nos descendentes. */
	overflow-x: clip;
}

h1, h2, h3, h4 {
	font-family: var( --m2m-font-display );
	font-weight: 400;
	text-transform: uppercase;
	line-height: 1.02;
	letter-spacing: 0.005em;
	margin: 0 0 0.4em;
}

h1 { font-size: clamp( 2.5rem, 7vw, 6rem ); }
h2 { font-size: clamp( 1.9rem, 4.5vw, 3.5rem ); }
h3 { font-size: clamp( 1.2rem, 2.2vw, 1.75rem ); }

a {
	color: var( --m2m-accent );
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

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

:focus-visible {
	outline: 2px solid var( --m2m-accent );
	outline-offset: 3px;
}

/* Acessível a leitor de tela, invisível na tela. */
.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect( 0, 0, 0, 0 );
	white-space: nowrap;
	border: 0;
}

.m2m-skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 999;
	background: var( --m2m-accent );
	color: var( --m2m-ground );
	padding: 12px 20px;
	font-weight: 600;
}

.m2m-skip-link:focus {
	left: 8px;
	top: 8px;
}

/* ---------------------------------------------------------------
   Página individual do trabalho
   --------------------------------------------------------------- */

.m2m-case {
	max-width: 1280px;
	margin: 0 auto;
}

.m2m-case__video {
	width: 100%;
	aspect-ratio: 16 / 9;
	background: var( --m2m-ground-raised );
	display: block;
}

.m2m-case__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 24px;
	margin: 20px 0 32px;
	color: var( --m2m-muted );
	font-size: 0.85rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.m2m-case__back {
	display: inline-block;
	margin-top: 40px;
	font-size: 0.85rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

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

/* ---------------------------------------------------------------
   Home — hero, seções, marquee e CTA.
   Escalas em clamp() e vw copiadas do site em Next para o ritmo
   tipográfico bater; os valores não são arbitrários.
   --------------------------------------------------------------- */

.m2m-hero {
	position: relative;
	background: var( --m2m-ground );
}

/* O palco é o que se vê. No hero simples ele é a própria seção; no percurso
   a seção fica alta (centenas de vh) e o palco gruda no topo, de modo que
   rolar percorre a seção sem tirar a cena da tela. */
.m2m-hero__stage {
	position: relative;
	height: 100svh;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	overflow: hidden;
}

.m2m-percurso .m2m-hero__stage {
	position: sticky;
	top: 0;
}

.m2m-hero__bg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	/* O frame é a peça: um respiro mínimo dá impressão de movimento sem
	   ler como zoom nem exigir vídeo. */
	animation: m2m-breathe 9s ease-in-out infinite;
}

/* Véu de baixo para cima: sem ele o texto claro cai sobre áreas claras do
   frame e o contraste não fecha. */
.m2m-hero__veil {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		to top,
		rgba( 10, 10, 8, 0.92 ) 0%,
		rgba( 10, 10, 8, 0.55 ) 38%,
		rgba( 10, 10, 8, 0.15 ) 70%,
		rgba( 10, 10, 8, 0.35 ) 100%
	);
}

.m2m-hero__copy {
	position: relative;
	padding: 0 5.5vw 14vh;
}

.m2m-hero__headline {
	font-family: var( --m2m-font-display );
	font-size: clamp( 30px, 6.4vw, 88px );
	line-height: 0.95;
	text-transform: uppercase;
	margin: 0;
}

.m2m-hero__line {
	display: block;
}

.m2m-hero__line--accent {
	color: var( --m2m-accent );
}

.m2m-hero__lead {
	max-width: 46ch;
	margin: 24px 0 0;
	color: var( --m2m-muted );
	font-size: 1rem;
}

.m2m-hero__hud {
	position: absolute;
	top: 24px;
	right: 5.5vw;
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 11px;
	letter-spacing: 0.18em;
	color: var( --m2m-muted );
	font-variant-numeric: tabular-nums;
}

.m2m-rec {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #ff3b30;
	display: inline-block;
	animation: m2m-rec-blink 1.4s steps( 1, end ) infinite;
}

@keyframes m2m-rec-blink {
	0%, 55%   { opacity: 1; }
	56%, 100% { opacity: 0.15; }
}

@keyframes m2m-breathe {
	0%, 100% { transform: scale( 1 ); }
	50%      { transform: scale( 1.025 ); }
}

/* --- seções genéricas --- */

.m2m-section {
	padding: 14vh 5.5vw;
}

.m2m-eyebrow {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.16em;
	color: var( --m2m-muted );
	margin: 0 0 32px;
}

.m2m-accent {
	color: var( --m2m-accent );
}

/* --- quem somos --- */

.m2m-about__title {
	max-width: 18ch;
	font-size: clamp( 32px, 6vw, 72px );
	line-height: 0.95;
	margin: 0;
}

.m2m-about__text {
	max-width: 55ch;
	margin: 32px 0 0;
	font-size: 1.125rem;
	line-height: 1.7;
	color: var( --m2m-muted );
}

.m2m-stats {
	display: grid;
	grid-template-columns: repeat( 3, minmax( 0, 1fr ) );
	gap: 40px 24px;
	margin-top: 10vh;
}

.m2m-stat__value {
	font-family: var( --m2m-font-display );
	font-size: clamp( 44px, 6vw, 88px );
	line-height: 0.9;
	font-variant-numeric: tabular-nums;
	margin: 0;
}

.m2m-stat__label {
	margin: 8px 0 0;
	font-size: 10px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.2em;
	color: var( --m2m-muted );
}

/* --- marquee de clientes --- */

.m2m-marquee-wrap {
	overflow: hidden;
	border-top: 1px solid var( --m2m-hairline );
	border-bottom: 1px solid var( --m2m-hairline );
	padding: 10vh 0;
}

.m2m-marquee__label {
	padding: 0 5.5vw;
}

.m2m-marquee {
	display: flex;
	width: max-content;
	margin-top: 40px;
	animation: m2m-marquee 38s linear infinite;
}

.m2m-marquee__list {
	display: flex;
	align-items: center;
	flex-shrink: 0;
	list-style: none;
	margin: 0;
	padding: 0;
}

.m2m-marquee__item {
	display: flex;
	align-items: center;
	white-space: nowrap;
	font-family: var( --m2m-font-display );
	font-size: clamp( 40px, 7vw, 104px );
	line-height: 1;
	text-transform: uppercase;
	color: rgba( 243, 241, 231, 0.85 );
}

.m2m-marquee__dot {
	display: inline-block;
	flex-shrink: 0;
	width: 0.14em;
	height: 0.14em;
	margin: 0 clamp( 24px, 4vw, 64px );
	border-radius: 50%;
	background: var( --m2m-accent );
}

/* Desloca exatamente metade: a segunda cópia assume o lugar da primeira e o
   laço fecha sem salto visível. */
@keyframes m2m-marquee {
	from { transform: translateX( 0 ); }
	to   { transform: translateX( -50% ); }
}

/* --- contato --- */

.m2m-cta {
	text-align: center;
	padding-top: 18vh;
	padding-bottom: 18vh;
}

.m2m-cta__title {
	max-width: 16ch;
	margin: 0 auto;
	font-size: clamp( 36px, 8vw, 104px );
	line-height: 0.92;
}

.m2m-cta__button {
	display: inline-block;
	margin-top: 40px;
	padding: 16px 36px;
	border: 1px solid var( --m2m-hairline );
	color: var( --m2m-ink );
	font-size: 0.875rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	transition: background-color 200ms ease, color 200ms ease, border-color 200ms ease;
}

.m2m-cta__button:hover {
	background: var( --m2m-accent );
	border-color: var( --m2m-accent );
	color: var( --m2m-ground );
	text-decoration: none;
}

/* A home usa o próprio espaçamento das seções, então o container do tema não
   pode acrescentar o dele. */
.m2m-home .m2m-content {
	padding: 0;
}

@media ( max-width: 700px ) {
	.m2m-stats {
		grid-template-columns: 1fr;
		gap: 32px;
	}
}

/* Quem pediu menos movimento não recebe respiro nem faixa correndo. */
@media ( prefers-reduced-motion: reduce ) {
	.m2m-hero__bg,
	.m2m-marquee,
	.m2m-rec {
		animation: none;
	}
}

/* --- seção de trabalhos ---
   Medidas do componente WorksGallery: 5.5vw nas laterais, 12vh em cima e
   embaixo, e 8vh entre o título e a grade. */

.m2m-works {
	overflow: hidden;
	padding: 12vh 5.5vw;
}

.m2m-works__title {
	font-size: clamp( 32px, 6vw, 72px );
	line-height: 1;
	margin: 0 0 8vh;
}

/* ---------------------------------------------------------------
   Cabeçalho fixo e menu em tela cheia.
   Tempos e curvas vindos do SiteMenu: faixas 700ms cubic-bezier(.76,0,.24,1)
   com 60ms de atraso entre elas, links 800ms cubic-bezier(.16,1,.3,1)
   começando em 340ms.
   --------------------------------------------------------------- */

.m2m-header {
	position: fixed;
	inset: 0 0 auto;
	z-index: 50;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 3vh 5.5vw;
	/* O cabeçalho não intercepta cliques; só a marca e o botão o fazem. */
	pointer-events: none;
}

.m2m-header__veil {
	position: absolute;
	inset: 0 0 auto;
	height: 16vh;
	z-index: -1;
	background: linear-gradient(
		to bottom,
		#000 0%,
		rgba( 0, 0, 0, 0.8 ) 45%,
		transparent 100%
	);
}

.m2m-header__brand,
.m2m-menu-toggle {
	pointer-events: auto;
}

.m2m-header__brand {
	font-family: var( --m2m-font-display );
	font-size: 1.25rem;
	letter-spacing: -0.01em;
	color: var( --m2m-ink );
	text-transform: uppercase;
}

.m2m-header__brand:hover {
	text-decoration: none;
}

@media ( min-width: 768px ) {
	.m2m-header__brand {
		font-size: 1.5rem;
	}
}

/* --- botão MENU / FECHAR --- */

.m2m-menu-toggle {
	display: flex;
	align-items: center;
	gap: 12px;
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
	color: var( --m2m-ink );
	font-family: inherit;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.22em;
}

.m2m-menu-toggle__icon {
	position: relative;
	display: block;
	width: 24px;
	height: 12px;
}

.m2m-menu-toggle__bar {
	position: absolute;
	left: 0;
	display: block;
	width: 100%;
	height: 1px;
	background: var( --m2m-accent );
	transition: top 400ms cubic-bezier( 0.76, 0, 0.24, 1 ),
	            transform 400ms cubic-bezier( 0.76, 0, 0.24, 1 );
}

.m2m-menu-toggle__bar:nth-child( 1 ) { top: 2px; }
.m2m-menu-toggle__bar:nth-child( 2 ) { top: 10px; }

/* As duas barras se encontram no meio e cruzam. */
.menu-open .m2m-menu-toggle__bar:nth-child( 1 ) {
	top: 6px;
	transform: rotate( 45deg );
}

.menu-open .m2m-menu-toggle__bar:nth-child( 2 ) {
	top: 6px;
	transform: rotate( -45deg );
}

/* --- painel --- */

.m2m-menu {
	position: fixed;
	inset: 0;
	z-index: 40;
}

.m2m-menu[hidden] {
	display: none;
}

.m2m-menu__strips {
	position: absolute;
	inset: 0;
	display: flex;
}

.m2m-menu__strip {
	flex: 1;
	height: 100%;
	background: var( --m2m-ground-raised );
	transform: scaleY( 0 );
	transition: transform 700ms cubic-bezier( 0.76, 0, 0.24, 1 );
	transition-delay: calc( var( --i ) * 60ms );
}

/* Origens alternadas: ímpares crescem do topo, pares da base — é o que dá o
   leque em vez de uma cortina só. */
.m2m-menu__strip:nth-child( odd )  { transform-origin: top; }
.m2m-menu__strip:nth-child( even ) { transform-origin: bottom; }

.menu-open .m2m-menu__strip {
	transform: scaleY( 1 );
}

.m2m-menu__nav {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: center;
	height: 100%;
	padding: 0 5.5vw;
}

.m2m-menu__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

/* O `overflow: hidden` no item é o que faz o link surgir de dentro da linha
   em vez de simplesmente deslizar sobre o fundo. */
.m2m-menu__list li {
	overflow: hidden;
}

.m2m-menu__list a {
	display: block;
	padding: clamp( 6px, 1.2vh, 16px ) 0;
	font-family: var( --m2m-font-display );
	font-size: clamp( 40px, 8vw, 110px );
	line-height: 1.02;
	text-transform: uppercase;
	color: var( --m2m-ink );
	transform: translateY( 115% ) rotate( 4deg );
	opacity: 0;
	transition: transform 800ms cubic-bezier( 0.16, 1, 0.3, 1 ),
	            opacity 800ms cubic-bezier( 0.16, 1, 0.3, 1 ),
	            color 200ms ease;
}

.m2m-menu__list a:hover {
	color: var( --m2m-accent );
	text-decoration: none;
}

.menu-open .m2m-menu__list a {
	transform: translateY( 0 ) rotate( 0 );
	opacity: 1;
}

/* Escalonamento: cada link entra 70ms depois do anterior, a partir de 340ms
   — tempo de as faixas cobrirem a tela. */
.menu-open .m2m-menu__list li:nth-child( 1 ) a { transition-delay: 340ms; }
.menu-open .m2m-menu__list li:nth-child( 2 ) a { transition-delay: 410ms; }
.menu-open .m2m-menu__list li:nth-child( 3 ) a { transition-delay: 480ms; }
.menu-open .m2m-menu__list li:nth-child( 4 ) a { transition-delay: 550ms; }
.menu-open .m2m-menu__list li:nth-child( 5 ) a { transition-delay: 620ms; }
.menu-open .m2m-menu__list li:nth-child( 6 ) a { transition-delay: 690ms; }

.m2m-menu__lead {
	max-width: 38ch;
	margin: 6vh 0 0;
	color: var( --m2m-muted );
	transform: translateY( 18px );
	opacity: 0;
	transition: transform 600ms ease, opacity 600ms ease;
}

.menu-open .m2m-menu__lead {
	transform: translateY( 0 );
	opacity: 1;
	transition-delay: 720ms;
}

/* A página recua e desfoca atrás do menu. */
body.menu-open {
	overflow: hidden;
}

body.menu-open .m2m-content {
	transform: scale( 0.94 );
	filter: blur( 8px );
}

.m2m-content {
	transition: transform 700ms cubic-bezier( 0.76, 0, 0.24, 1 ),
	            filter 700ms cubic-bezier( 0.76, 0, 0.24, 1 );
}

/* Sem movimento: o menu aparece e some, sem leque nem deslize. */
@media ( prefers-reduced-motion: reduce ) {
	.m2m-menu__strip,
	.m2m-menu__list a,
	.m2m-menu__lead,
	.m2m-content,
	.m2m-menu-toggle__bar {
		transition: none;
	}
}

/* ---------------------------------------------------------------
   Container e rodapé
   --------------------------------------------------------------- */

/* O cabeçalho é fixo e flutua sobre o conteúdo, então as páginas internas
   precisam de espaço no topo para não nascer por baixo dele. A home não usa
   este padding (classe .m2m-home): o hero ocupa a tela inteira de propósito. */
.m2m-content {
	padding: 18vh clamp( 16px, 5.5vw, 96px ) clamp( 24px, 5vw, 72px );
}

.m2m-home .m2m-content,
.elementor-page .m2m-content {
	padding: 0;
}

.m2m-footer {
	padding: 48px clamp( 16px, 5.5vw, 96px );
	border-top: 1px solid var( --m2m-hairline );
	color: var( --m2m-muted );
	font-size: 0.85rem;
}

/* ---------------------------------------------------------------
   Percurso: vídeo arrastado pelo scroll
   --------------------------------------------------------------- */

.m2m-percurso__video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	/* Sem respiro aqui: o movimento vem do arrasto dos quadros, e uma
	   escala por cima leria como tremor. */
}

/* Ficha do plano.
   Ocupa o mesmo canto que a headline de abertura: o texto que abre o site
   sai e a marca do trabalho assume o lugar dele. Opacidade e deslocamento
   são escritos pelo JavaScript a cada quadro; aqui fica só o repouso. */
.m2m-percurso__card {
	position: absolute;
	bottom: 12vmin;
	left: 6vmin;
	right: 6vmin;
	z-index: 40;
	opacity: 0;
	pointer-events: none;
	will-change: opacity, transform;
}

@media ( min-width: 768px ) {
	.m2m-percurso__card {
		right: auto;
		max-width: 52ch;
	}
}

.m2m-percurso__body {
	display: block;
	outline: none;
	color: inherit;
}

.m2m-percurso__body:hover {
	text-decoration: none;
}

.m2m-percurso__cat {
	margin: 0;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.22em;
	color: var( --m2m-accent );
}

/* A marca é o assunto do congelamento, então tem tamanho de manchete — não
   de legenda de rodapé. */
.m2m-percurso__client {
	margin: 8px 0 0;
	font-family: var( --m2m-font-display );
	font-size: clamp( 52px, 9vw, 132px );
	line-height: 0.86;
	text-transform: uppercase;
	color: var( --m2m-ink );
}

.m2m-percurso__headline {
	margin: 16px 0 0;
	max-width: 38ch;
	padding-left: 16px;
	border-left: 2px solid var( --m2m-accent );
	font-size: clamp( 15px, 1.5vw, 22px );
	line-height: 1.375;
	color: var( --m2m-ink );
}

/* `--m2m-muted` mede 2,2:1 sobre o plano claro do vídeo. Marfim a 75% fica
   acima do mínimo sem virar outra manchete. */
.m2m-percurso__lens {
	margin: 16px 0 0;
	font-size: 10px;
	letter-spacing: 0.2em;
	color: rgba( 243, 241, 231, 0.75 );
}

/* Botão explícito em vez de contar com a ficha inteira parecer clicável:
   avisa que existe um caminho antes de o visitante descobrir clicando.
   Mesma linguagem do botão do CTA final. */
.m2m-percurso__link {
	display: inline-block;
	margin-top: 20px;
	padding: 10px 20px;
	border: 1px solid var( --m2m-accent );
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.16em;
	color: var( --m2m-accent );
	transition: background-color 200ms ease, color 200ms ease;
}

.m2m-percurso__body:hover .m2m-percurso__link,
.m2m-percurso__body:focus-visible .m2m-percurso__link {
	background: var( --m2m-accent );
	color: var( --m2m-ground );
}

@media ( min-width: 768px ) {
	.m2m-percurso__cat,
	.m2m-percurso__link { font-size: 12px; }
	.m2m-percurso__lens { font-size: 11px; }
}

/* A headline do hero perde opacidade conforme os quadros começam a passar; o
   valor vem do JavaScript. */
.m2m-percurso .m2m-hero__copy {
	will-change: opacity;
}

/* Sem movimento: a seção alta não faz sentido — encolhe para uma tela e a
   primeira ficha fica visível. */
.m2m-percurso.is-static {
	height: 100svh !important;
}

/* ---------------------------------------------------------------
   Revelações
   --------------------------------------------------------------- */

.m2m-reveal {
	opacity: 0;
	transform: translateY( 24px );
	transition: opacity 700ms cubic-bezier( 0.16, 1, 0.3, 1 ),
	            transform 700ms cubic-bezier( 0.16, 1, 0.3, 1 );
}

.m2m-reveal.is-in {
	opacity: 1;
	transform: translateY( 0 );
}

/* A galeria que se junta: o estado inicial só é aplicado quando o script
   assume. Sem a classe, os cards ficam no lugar — assim a grade continua
   legível se o JavaScript falhar ao carregar. */
.m2m-works.is-scattered .m2m-card {
	will-change: transform, opacity;
}

@media ( prefers-reduced-motion: reduce ) {
	.m2m-reveal {
		opacity: 1;
		transform: none;
		transition: none;
	}
}

/* Caminho para o arquivo completo, quando a home mostra só uma parte. */
.m2m-works__more {
	margin: 6vh 0 0;
	text-align: center;
}

.m2m-works__more a {
	display: inline-block;
	padding: 14px 32px;
	border: 1px solid var( --m2m-hairline );
	color: var( --m2m-ink );
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.16em;
	transition: background-color 200ms ease, color 200ms ease, border-color 200ms ease;
}

.m2m-works__more a:hover {
	background: var( --m2m-accent );
	border-color: var( --m2m-accent );
	color: var( --m2m-ground );
	text-decoration: none;
}
