/* Stratum — efeitos da home portados do site da Orbia (11/11/2026). Só carrega na página inicial.
   Comportamento em assets/js/home-efeitos.js. Sem JS ou com "reduzir movimento", tudo fica
   no estado final, legível e clicável (as regras de movimento dependem de classes .is-viva que o JS põe). */

/* ---------- 1. Abertura (1ª visita da sessão) ---------- */
.abertura { display: none; }
.stratum-abertura .abertura {
	position: fixed; inset: 0; z-index: 9999; display: grid; place-content: center; justify-items: center; gap: 28px;
	background: var(--preto); color: #fff; transition: opacity .6s var(--ease), visibility .6s;
}
.stratum-abertura body { overflow: hidden; }
.abertura__marca { position: relative; display: grid; place-items: center; width: 300px; height: 300px; }
.abertura__marca img { width: 210px; height: auto; position: relative; opacity: 0; transform: scale(.94); transition: opacity .6s var(--ease) .25s, transform 1.2s var(--ease) .25s; }
.abertura__anel { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.abertura__anel circle { fill: none; stroke: var(--vermelho); stroke-width: 1; stroke-dasharray: 340; stroke-dashoffset: 340; transition: stroke-dashoffset 1.25s cubic-bezier(.6, 0, .2, 1); }
.abertura__status { margin: 0; font-family: var(--fonte-display); font-size: .72rem; letter-spacing: .24em; text-transform: uppercase; color: var(--texto-suave); opacity: 0; transition: opacity .5s .7s; display: flex; align-items: center; gap: 10px; }
.abertura__status span { width: 7px; height: 7px; border-radius: 50%; background: var(--verde); box-shadow: 0 0 0 0 rgba(34, 211, 127, .6); animation: abertura-pulso 1.4s infinite; }
@keyframes abertura-pulso { to { box-shadow: 0 0 0 10px rgba(34, 211, 127, 0); } }
.abertura.is-on img { opacity: 1; transform: scale(1); }
.abertura.is-on .abertura__anel circle { stroke-dashoffset: 0; }
.abertura.is-on .abertura__status { opacity: 1; }
.abertura.is-saindo { opacity: 0; visibility: hidden; }
.abertura.is-saindo .abertura__marca { transform: scale(1.6); transition: transform .7s cubic-bezier(.7, 0, .3, 1); }
/* a home entra de dentro do anel */
.stratum-abertura--saindo main { animation: abertura-entra .9s var(--ease) both; }
@keyframes abertura-entra { from { opacity: 0; transform: scale(.97); } }

/* ---------- 2/3. Topo: grade cinética e afastamento ao rolar ---------- */
.imersivo { position: relative; --topo-p: 0; }
.imersivo__grade {
	position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none;
	/* atrás da coluna de texto a grade fica bem fraca; forte só no lado da foto */
	-webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, .22) 0%, rgba(0, 0, 0, .22) 48%, #000 72%);
	mask-image: linear-gradient(90deg, rgba(0, 0, 0, .22) 0%, rgba(0, 0, 0, .22) 48%, #000 72%);
}
@media (max-width: 899px) { .imersivo__grade { -webkit-mask-image: none; mask-image: none; opacity: .35; } }

/* Leitura sobre o fundo animado: botões do orçamento e campo "ligamos" quase opacos */
.imersivo .inicio-rapido__opcoes a {
	background: rgba(11, 14, 20, .92);
	-webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.imersivo .inicio-rapido__opcoes a:hover, .imersivo .inicio-rapido__opcoes a:focus-visible { background: #1d0b0d; }
.imersivo .ligamos__linha {
	background: rgba(11, 14, 20, .94);
	-webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.imersivo .ligamos__linha:focus-within { background: #0b0e14; }
.imersivo__media { transform: translate3d(0, calc(var(--topo-p) * 60px), 0) scale(calc(1 + var(--topo-p) * .1)); transform-origin: 70% 40%; will-change: transform; }
.imersivo__conteudo { transform: translate3d(0, calc(var(--topo-p) * -90px), 0); opacity: calc(1 - var(--topo-p) * 1.25); will-change: transform, opacity; }

/* ---------- 4. Números gigantes dos capítulos ---------- */
.tem-fantasma { position: relative; overflow: clip; }
.tem-fantasma > :not(.fantasma) { position: relative; z-index: 1; }
.fantasma {
	position: absolute; z-index: 0; right: -2vw; top: 50%; pointer-events: none; user-select: none;
	font-family: var(--fonte-display); font-weight: 600; font-size: clamp(11rem, 30vw, 28rem); line-height: .8; letter-spacing: -.02em;
	color: transparent; -webkit-text-stroke: 1px currentColor; opacity: .07;
	transform: translate3d(0, calc(-50% + var(--fy, 0%)), 0);
}
[data-tema="escuro"] .fantasma, .secao--escura .fantasma, .faixa .fantasma { color: #fff; opacity: .06; }
[data-tema="claro"] .fantasma, .secao--clara .fantasma { color: var(--texto-escuro); opacity: .06; }

/* ---------- 5. Soluções em faixa horizontal ---------- */
.faixa { background: var(--preto); color: #fff; position: relative; }
.faixa__palco { padding: clamp(72px, 10vw, 120px) 0 48px; }
.faixa__topo { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.faixa__topo .topo-secao { margin-bottom: 0; }
.faixa__contador { margin: 0 0 6px; font-family: var(--fonte-display); letter-spacing: .2em; font-size: .85rem; color: var(--texto-suave); white-space: nowrap; }
.faixa__contador span { color: #fff; }
.faixa__trilho { list-style: none; margin: 40px 0 0; padding: 0 max(var(--gutter), calc((100vw - var(--container)) / 2 + var(--gutter))); display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.faixa__painel a { display: grid; height: 100%; color: inherit; text-decoration: none; background: var(--superficie); border: 1px solid var(--linha); grid-template-rows: auto auto auto 1fr auto; transition: border-color .3s, background .3s; }
.faixa__painel a:hover, .faixa__painel a:focus-visible { border-color: var(--vermelho); background: var(--superficie-2); }
.faixa__media { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: #000; }
.faixa__media img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.55) contrast(1.05) brightness(.85); transform: scale(1.06); transition: filter .6s, transform 1.2s var(--ease); }
.faixa__painel a:hover .faixa__media img { filter: none; transform: scale(1); }
.faixa__mira { position: absolute; inset: 18% 22%; opacity: 0; transition: opacity .4s, inset .6s var(--ease); }
.faixa__mira i { position: absolute; width: 16px; height: 16px; border: 0 solid var(--verde); }
.faixa__mira i:nth-child(1) { top: 0; left: 0; border-width: 1px 0 0 1px; }
.faixa__mira i:nth-child(2) { top: 0; right: 0; border-width: 1px 1px 0 0; }
.faixa__mira i:nth-child(3) { bottom: 0; left: 0; border-width: 0 0 1px 1px; }
.faixa__mira i:nth-child(4) { bottom: 0; right: 0; border-width: 0 1px 1px 0; }
.faixa__painel a:hover .faixa__mira { opacity: 1; inset: 24% 30%; }
.faixa__num { padding: 24px 26px 0; font-family: var(--fonte-display); letter-spacing: .2em; font-size: .8rem; color: var(--vermelho); }
.faixa__titulo { padding: 10px 26px 0; font-family: var(--fonte-display); font-weight: 300; text-transform: uppercase; letter-spacing: .1em; font-size: clamp(1.25rem, 2vw, 1.6rem); line-height: 1.2; }
.faixa__texto { padding: 12px 26px 0; color: var(--texto-claro); font-size: .9375rem; }
.faixa__ver { padding: 22px 26px 26px; font-family: var(--fonte-display); font-size: .75rem; letter-spacing: .18em; text-transform: uppercase; color: #fff; }
.faixa__ver span { display: inline-block; transition: transform .3s var(--ease); }
.faixa__painel a:hover .faixa__ver span { transform: translateX(6px); }
.faixa__base { margin-top: 28px; }
.faixa__barra { display: none; height: 1px; background: var(--linha-forte); }
.faixa__barra i { display: block; height: 100%; background: var(--vermelho); transform: scaleX(0); transform-origin: left; }

/* com JS e movimento: presa à tela, painéis em linha */
.faixa.is-viva .faixa__palco { position: sticky; top: 0; height: 100vh; height: 100svh; box-sizing: border-box; display: flex; flex-direction: column; overflow: hidden; padding-top: calc(var(--cabecalho) + clamp(24px, 4vw, 48px)); }
.faixa.is-viva .faixa__trilho { display: flex; flex: 1; min-height: 0; align-items: stretch; margin-top: clamp(24px, 3vw, 40px); will-change: transform; width: max-content; }
.faixa.is-viva .faixa__painel { flex: 0 0 clamp(280px, 30vw, 420px); --entra: 0; opacity: calc(.35 + var(--entra) * .65); transform: translate3d(0, calc((1 - var(--entra)) * 26px), 0); transition: opacity .2s linear; }
.faixa.is-viva .faixa__painel a { grid-template-rows: minmax(0, 1fr) auto auto auto auto; }
.faixa.is-viva .faixa__media { aspect-ratio: auto; min-height: 140px; }
.faixa.is-viva .faixa__barra { display: block; }
@media (max-width: 700px) {
	.faixa.is-viva .faixa__painel { flex-basis: 82vw; }
	.faixa__contador { display: none; }
}

/* ---------- 6. Como funciona: linha que se desenha ---------- */
.passos-linha { position: relative; }
.passos__trilho { display: none; }
.passos-linha.is-viva .passos__trilho, .passos-linha.is-completo .passos__trilho {
	display: block; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: rgba(11, 14, 20, .1); z-index: 1;
}
.passos__trilho i { display: block; height: 100%; background: var(--vermelho); transform: scaleX(var(--linha, 1)); transform-origin: left; }
.passos-linha.is-viva .passos__item { transition: background .5s var(--ease), box-shadow .5s var(--ease); }
.passos-linha.is-viva .passos__item::before { transition: color .4s; color: var(--texto-escuro-suave); }
.passos-linha.is-viva .passos__item.is-on { box-shadow: inset 0 2px 0 var(--vermelho); }
.passos-linha.is-viva .passos__item.is-on::before { color: var(--vermelho); }
.passos-linha.is-viva .passos__item .passos__titulo, .passos-linha.is-viva .passos__item p { opacity: .45; transform: translateY(8px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.passos-linha.is-viva .passos__item.is-on .passos__titulo, .passos-linha.is-viva .passos__item.is-on p { opacity: 1; transform: none; }
@media (max-width: 760px) {
	.passos-linha.is-viva .passos__trilho { left: 0; right: auto; top: 0; bottom: 0; width: 2px; height: auto; }
	.passos-linha.is-viva .passos__trilho i { transform: scaleY(var(--linha, 1)); transform-origin: top; height: 100%; }
	.passos-linha.is-viva .passos__item.is-on { box-shadow: inset 2px 0 0 var(--vermelho); }
}

/* ---------- 7. Comparativo entrando "ampliando" ---------- */
[data-expandir].is-viva {
	--abre: 0;
	/* nas laterais só recorta a margem que sobra fora do conteúdo (nunca corta o texto) */
	--sobra: max(0px, (100vw - var(--container)) / 2 - 8px);
	clip-path: inset(calc((1 - var(--abre)) * 7%) calc((1 - var(--abre)) * min(5vw, var(--sobra))) round calc((1 - var(--abre)) * 32px));
}
[data-expandir].is-viva > .container { transform: translate3d(0, calc((1 - var(--abre)) * 40px), 0); opacity: calc(.4 + var(--abre) * .6); }

/* ---------- 8. Clientes em pilha ---------- */
.clientes--pilha { display: grid; gap: 0; grid-template-columns: 1fr; }
.clientes--pilha .cliente { position: relative; margin-bottom: 24px; overflow: hidden; background: var(--preto); color: #fff; }
.clientes--pilha .cliente__img { margin: 0; aspect-ratio: 21 / 9; filter: grayscale(.35) contrast(1.05) brightness(.8); display: block; }
.clientes--pilha .cliente:hover .cliente__img { filter: brightness(.9); }
.clientes--pilha .cliente__nome, .clientes--pilha .cliente__servicos { position: absolute; left: clamp(20px, 4vw, 48px); right: 20px; z-index: 1; }
.clientes--pilha .cliente::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(5, 7, 11, .9), rgba(5, 7, 11, 0) 55%); pointer-events: none; }
.clientes--pilha .cliente__nome { bottom: clamp(52px, 6vw, 76px); font-size: clamp(1.2rem, 2.4vw, 2rem); font-weight: 300; letter-spacing: .1em; }
.clientes--pilha .cliente__servicos { bottom: clamp(22px, 3vw, 40px); color: var(--texto-claro); font-family: var(--fonte-display); font-size: .8rem; letter-spacing: .18em; text-transform: uppercase; }
.cliente__indice { position: absolute; z-index: 1; top: 20px; right: 24px; font-family: var(--fonte-display); font-size: .75rem; letter-spacing: .2em; color: rgba(255, 255, 255, .8); }
.clientes--pilha.is-viva .cliente {
	position: sticky; top: calc(var(--cabecalho) + 20px + var(--n) * 16px); margin-bottom: 14vh;
	transform: scale(calc(1 - var(--recua, 0) * .06)); transform-origin: 50% 0; will-change: transform;
}
.clientes--pilha.is-viva .cliente:last-child { margin-bottom: 0; }
.clientes--pilha.is-viva .cliente__img { filter: grayscale(.35) contrast(1.05) brightness(calc(.8 - var(--recua, 0) * .35)); }
@media (max-width: 700px) {
	.clientes--pilha .cliente__img { aspect-ratio: 4 / 5; }
	.clientes--pilha.is-viva .cliente { margin-bottom: 10vh; }
}

/* ---------- 9. "Para quem" em cartões flutuantes ---------- */
/* o flutuar usa uma propriedade registrada para poder somar com o resto do transform */
@property --bob { syntax: "<length>"; inherits: false; initial-value: 0px; }
@keyframes flutuar { 0%, 100% { --bob: 0px; } 50% { --bob: -9px; } }

.publicos--flutua.is-viva {
	position: relative; gap: clamp(16px, 2vw, 28px); background: none; border: 0; perspective: 1400px;
	padding: 24px 0 36px; /* espaço para o flutuar e a sombra */
}
.publicos--flutua.is-viva .publico {
	--fx: 0px; --fy: 0px; --fr: 0deg; --px: 0px; --py: 0px; --rx: 0deg; --ry: 0deg;
	position: relative;
	border: 1px solid #e3e5ea;
	box-shadow: 0 2px 4px rgba(5, 7, 11, .04), 0 18px 40px -18px rgba(5, 7, 11, .22);
	transform:
		translate3d(calc(var(--fx) + var(--px)), calc(var(--fy) + var(--py) + var(--bob)), 0)
		rotate(var(--fr)) rotateX(var(--rx)) rotateY(var(--ry));
	transform-style: preserve-3d;
	/* mola: passa um pouco do ponto e volta */
	transition: transform 1.1s cubic-bezier(.34, 1.42, .5, 1), opacity .6s var(--ease), box-shadow .5s var(--ease);
	will-change: transform;
}
/* empilhados (antes de abrir) ficam um pouco menores, como um maço sobre a mesa */
.publicos--flutua.is-viva:not(.is-aberto) .publico { scale: .9; }
.publicos--flutua.is-viva .publico { transition-property: transform, scale, box-shadow; }
.publicos--flutua.is-pronto .publico { animation: flutuar var(--bob-tempo, 6s) ease-in-out var(--bob-atraso, 0s) infinite; }
/* acompanhar o mouse é rápido; voltar ao lugar é com mola */
.publicos--flutua.is-pronto .publico { transition: transform .9s cubic-bezier(.34, 1.3, .5, 1), box-shadow .5s var(--ease); }
.publicos--flutua.is-pronto .publico.is-sobre {
	z-index: 5; animation-play-state: paused;
	box-shadow: 0 4px 8px rgba(5, 7, 11, .06), 0 40px 80px -24px rgba(5, 7, 11, .38);
	transition: transform .25s var(--ease), box-shadow .4s var(--ease);
}
.publicos--flutua .publico.is-sobre .publico__media img { transform: scale(1.06); filter: none; }
/* faixa vermelha no topo do cartão em destaque, como a linha das soluções */
.publicos--flutua.is-viva .publico::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; z-index: 2; background: var(--vermelho); transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease); }
.publicos--flutua.is-viva .publico.is-sobre::before { transform: scaleX(1); }

/* ---------- 10. Botões com ímã ---------- */
[data-magnetico], .imersivo .btn, .ligamos button { transition: transform .35s var(--ease), background .2s, color .2s, border-color .2s; }

/* ---------- 11. Cursor próprio ---------- */
.cursor-ponto, .cursor-anel { position: fixed; top: 0; left: 0; z-index: 10000; pointer-events: none; border-radius: 50%; opacity: 0; transition: opacity .3s, width .3s var(--ease), height .3s var(--ease), background .3s, border-color .3s; }
.cursor-ponto { width: 6px; height: 6px; background: var(--vermelho); }
.cursor-anel { width: 34px; height: 34px; border: 1px solid rgba(255, 255, 255, .6); }
.cursor-visivel .cursor-ponto, .cursor-visivel .cursor-anel { opacity: 1; }
[data-cursor="claro"] .cursor-anel { border-color: rgba(11, 14, 20, .5); }
.cursor-anel.is-ativo { width: 58px; height: 58px; border-color: var(--vermelho) !important; background: rgba(236, 32, 39, .08); }
.cursor-anel.is-texto { width: 4px; height: 26px; border-radius: 2px; }
.tem-cursor, .tem-cursor a, .tem-cursor button, .tem-cursor label, .tem-cursor summary, .tem-cursor .publico { cursor: none; }
.tem-cursor input, .tem-cursor textarea, .tem-cursor select { cursor: auto; }

/* ---------- Movimento reduzido: tudo parado e completo ---------- */
@media (prefers-reduced-motion: reduce) {
	.imersivo__media, .imersivo__conteudo { transform: none !important; opacity: 1 !important; }
	.fantasma { transform: translate3d(0, -50%, 0); }
}
