

:root {
	/* -- CORES -- */
	--color-accent: #00ffcc;
	--color-accent-rgb: 0, 255, 204;
	--color-bg: #050505;
	--color-text-primary: white;
	--color-text-secondary: #888;

	/* -- VIDRO E BORDAS -- */
	--bg-glass: rgba(20, 20, 20, 0.9);
	--bg-glass-gradient: linear-gradient(135deg, rgba(20, 20, 20, 0.9), rgba(20, 20, 20, 0.7));
	--bg-glass-selected: linear-gradient(135deg, rgba(30, 30, 30, 0.85), rgba(30, 30, 30, 0.6));
	--border-glass: rgba(255, 255, 255, 0.15);
	--border-radius-card: 20px;
	--border-radius-btn: 30px;

	/* -- TIPOGRAFIA -- */
	--font-main: 'Poppins', sans-serif;

	/* -- DIMENSÕES -- */
	--card-width: 260px;
	--card-height: 340px;
	--nav-btn-size: 60px;

	--scene-width: 280px;
	--scene-height: 360px;
	--scene-width-mobile: 240px;
	--scene-height-mobile: 300px;
	--card-width-mobile: 220px;
	--card-height-mobile: 280px;

	/* -- Z-INDEX -- */
	--z-back: -1;
	--z-base: 1;
	--z-mid: 10;
	--z-high: 20;

	/* -- ANIMAÇÕES -- */
	--transition-smooth: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
	--transition-elastic: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
	--transition-hover: 0.3s ease;
	--anim-duration-base: 1s;
	--anim-duration-slow: 1.5s;
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	font-family: var(--font-main);
	user-select: none;
	-webkit-user-drag: none;
}

body {
	background-color: transparent;
	/* Deixar transparente para o canvas aparecer */
	height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	color: var(--color-text-primary);
}

#canvas {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	z-index: -1;
	pointer-events: none;
}



/* -- CENA 3D -- */
.scene {
	position: relative;
	width: var(--scene-width);
	height: var(--scene-height);
	perspective: 1000px;
	/* Animação inicial de Fade In */
	opacity: 0;
	animation: fadeInScene var(--anim-duration-base) ease forwards 0.2s;
	z-index: var(--z-mid);
	/* Garantir que fique à frente do canvas */
}

@keyframes fadeInScene {
	to {
		opacity: 1;
	}
}



.carousel {
	width: 100%;
	height: 60%;
	top: 10%;
	transform-style: preserve-3d;
	/* Transição nativa do DOM removida para ceder terreno liso ao motor do GSAP */
	will-change: transform;
	/* UX: Evita que o gesto de voltar do navegador atrapalhe o carrossel */
	touch-action: pan-y;
}

/* -- CARD DESIGN -- */
.carousel__cell {
	position: absolute;
	width: var(--card-width);
	height: var(--card-height);
	left: 10px;
	top: 10px;
	/* Removemos estilos visuais daqui, agora é só container */
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;

	/* Sem transição física CSS. Opacidade e position frame-a-frame agora via física GSAP! */
	cursor: grab;
	will-change: transform, opacity;
	/* Permitir que o botão saia do card */
	overflow: visible;
	/* Garante que o shape base tenha o raio, mesmo com overflow visible */
	border-radius: var(--border-radius-card);
}

.carousel__cell:active {
	cursor: grabbing;
}

/* O Vidro agora é o .content */
.carousel__cell .content {
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	padding: 20px;

	/* Vidro Fosco Restabelecido - Transparência Colorida Opaca */
	/* Usa a cor específica do card definada no JS (--item-rgb), mas mais escura */
	background: rgba(10, 10, 10, 0.6); 
	/* Efeito de Vidro Jateado OBRIGATÓRIO para isolar as linhas do fundo */
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);


	border: 1px solid var(--border-glass);
	border-radius: var(--border-radius-card);

	/* Forçar filhos a respeitarem o arredondamento se tiverem fundo */
	/* Mas cuidado com o botão se ele estiver dentro (ele está fora do content no HTML? Não, está dentro) */
	/* O botão tem position absolute bottom -60px, então ele sai do fluxo. */
	/* Se usarmos overflow hidden aqui, cortamos o botão. */
	/* Então vamos forçar border-radius nos filhos que precisam */

	/* Profundidade e Volume */
	box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5),
		0 20px 40px rgba(0, 0, 0, 0.9);

	/* Sombra no texto para garantir leitura */
	text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);

	transition: all 0.5s ease;
}

/* Forçar arredondamento em tudo que possa ter fundo dentro do content */
.carousel__cell .content>* {
	border-radius: inherit;
}

/* Exceção para texto e botão que tem seu próprio radius */
.carousel__cell .content span,
.carousel__cell .content h2,
.carousel__cell .content a {
	border-radius: var(--border-radius-btn);
	/* Ou 0 se não precisar */
}

/* Correção específica para a imagem do logo */
.card-logo {
	border-radius: inherit;
	/* Herda o arredondamento do card se tocar a borda */
}

.card-footer-text {
	margin-top: auto;
	/* Empurra para o fundo */
	font-size: 0.75rem;
	color: rgba(255, 255, 255, 0.8);
	text-transform: none;
	letter-spacing: 0.5px;
	font-weight: 300;
	line-height: 1.4;
	padding: 0 10px;
	margin-bottom: 10px;

	/* Estado Inicial (Oculto) */
	opacity: 0;
	transform: translateY(10px);
	transition: all 0.5s ease;
}

/* Estado Ativo (Visível) - Apenas no card selecionado */
.carousel__cell.is-selected .card-footer-text {
	opacity: 1;
	transform: translateY(0);
	transition-delay: 0.2s;
	/* Pequeno delay para efeito cascata */
}

/* Card da Frente - Estilos aplicados ao .content */
.carousel__cell.is-selected .content {
	border-color: rgba(var(--color-accent-rgb), 0.8);
	/* Mais opaco e colorido quando selecionado para saltar da tela */
	background: rgba(var(--item-rgb), 0.35);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);



	/* Brilho intenso e reflexo */
	box-shadow:
		inset 0 0 30px rgba(255, 255, 255, 0.05),
		0 0 60px rgba(var(--color-accent-rgb), 0.25);
}

.carousel__cell.is-selected {
	opacity: 1;
	transform: scale(1.05);
	z-index: var(--z-mid);
}

/* Opacidade para cards inativos */
.carousel__cell:not(.is-selected) {
	opacity: 1;
	/* Aumentado para bloquear o fundo */
	filter: brightness(0.7);
	/* Escurecer levemente, mas manter cor */
	/* Aumentado de 0.2 para evitar que o fundo pareça estar na frente */
}

/* Durante a animação de entrada, todos os cards ficam brilhantes */
.carousel.is-animating .carousel__cell {
	filter: brightness(1) !important;
	opacity: 1 !important;
	/* Substitui a sombra preta por um glow colorido suave */
	box-shadow: 0 0 30px rgba(var(--color-accent-rgb), 0.5) !important;

	/* Remove sombra do texto e clareia o fundo para evitar "manchas" escuras */
	text-shadow: none !important;
	background: rgba(20, 20, 20, 0.4) !important;
}

.card-btn {
	position: absolute;
	bottom: -60px;
	/* Fora do card */
	left: 50%;

	padding: 10px 25px;
	border: 1px solid var(--color-accent);
	border-radius: var(--border-radius-btn);
	color: var(--color-accent);
	text-decoration: none;
	font-size: 0.8rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 1px;
	overflow: hidden;
	z-index: var(--z-base);

	/* Fundo semi-transparente */
	background: rgba(0, 0, 0, 0.5);
	backdrop-filter: blur(5px);

	/* Estado Inicial (Oculto) */
	opacity: 0;
	pointer-events: none;
	transform: translateX(-50%) translateY(20px) rotateX(90deg);
	transition: var(--transition-elastic);
	/* Efeito elástico */
}

/* Estado Ativo (Visível) - Apenas no card selecionado */
.carousel__cell.is-selected .card-btn {
	opacity: 1;
	pointer-events: auto;
	transform: translateX(-50%) translateY(0) rotateX(0deg);
	transition-delay: 0.3s;
	/* Espera o card chegar para aparecer */
}

.card-btn::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 0%;
	height: 100%;
	background: var(--color-accent);
	transition: width 0.3s ease;
	z-index: var(--z-back);
}

.card-btn:hover {
	color: #000;
	box-shadow: 0 0 20px rgba(var(--color-accent-rgb), 0.6);
	/* Manter centralizado e subir levemente */
	transform: translateX(-50%) translateY(-5px);
}

.card-btn:hover::before {
	width: 100%;
}

/* -- GRUPO DE LINKS (Mony Boonkie) -- */
.link-group {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	width: 100%;
	margin-top: 10px;

	/* Estado Inicial (Oculto) */
	opacity: 0;
	transform: translateY(20px);
	transition: var(--transition-elastic);
	pointer-events: none;
}

/* Estado Ativo */
.carousel__cell.is-selected .link-group {
	opacity: 1;
	transform: translateY(0);
	transition-delay: 0.3s;
	pointer-events: auto;
}

.micro-link {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 8px 5px;
	background: rgba(0, 0, 0, 0.6);
	border: 1px solid var(--color-accent);
	border-radius: 8px;
	color: var(--color-accent);
	text-decoration: none;
	font-size: 0.7rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	transition: all 0.3s ease;
	backdrop-filter: blur(4px);
	position: relative;
	overflow: hidden;
}

.micro-link:hover {
	background: var(--color-accent);
	color: #000;
	box-shadow: 0 0 10px rgba(var(--color-accent-rgb), 0.5);
	transform: translateY(-2px);
}

/* -- CONTEÚDO -- */
.content h2 {
	font-size: 1.5rem;
	margin-bottom: 15px;
	font-weight: 600;
	color: var(--color-accent);
}

.content p {
	font-size: 0.9rem;
	color: var(--color-text-secondary);
	line-height: 1.4;
}

/* -- BOTÕES LATERAIS (UI) -- */
.ui-layer {
	position: absolute;
	width: 100%;
	height: 100%;
	pointer-events: none;
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0 5%;
	z-index: var(--z-high);
}

.nav-btn {
	pointer-events: auto;
	background: transparent;
	/* Moderno e sem bordas */
	border: none;
	color: var(--color-accent);
	width: var(--nav-btn-size);
	height: var(--nav-btn-size);
	font-size: 2.5rem;
	/* Ícone maior */
	cursor: pointer;
	transition: transform 0.3s ease, color 0.3s ease, filter 0.3s ease;

	/* Inicialmente invisível para a animação */
	opacity: 0;

	display: flex;
	align-items: center;
	justify-content: center;
	filter: drop-shadow(0 0 5px rgba(var(--color-accent-rgb), 0.3));
}

.nav-btn:hover {
	color: #fff;
	transform: scale(1.2);
	filter: drop-shadow(0 0 15px rgba(var(--color-accent-rgb), 0.8));
}

/* Animações de Entrada das Setas */
@keyframes slideInLeft {
	from {
		transform: translateX(-50px);
		opacity: 0;
	}

	to {
		transform: translateX(0);
		opacity: 1;
	}
}

@keyframes slideInRight {
	from {
		transform: translateX(50px);
		opacity: 0;
	}

	to {
		transform: translateX(0);
		opacity: 1;
	}
}

.nav-btn.left {
	animation: slideInLeft var(--anim-duration-base) cubic-bezier(0.2, 0.8, 0.2, 1) forwards 2s;
	/* Delay de 2s */
}

.nav-btn.right {
	animation: slideInRight var(--anim-duration-base) cubic-bezier(0.2, 0.8, 0.2, 1) forwards 2s;
	/* Delay de 2s */
}

.footer-hint {
	position: absolute;
	bottom: 30px;
	left: 50%;
	transform: translateX(-50%);
	color: rgba(255, 255, 255, 0.3);
	font-size: 0.8rem;
	letter-spacing: 2px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 5px;

	/* Também anima o texto do rodapé */
	opacity: 0;
	animation: fadeInHint var(--anim-duration-base) ease forwards 2.5s;
}

@keyframes fadeInHint {
	to {
		opacity: 1;
	}
}

/* -- RESPONSIVO (CELULAR) -- */
@media (max-width: 768px) {
	.ui-layer {
		align-items: flex-end;
		padding-bottom: 120px;
		/* Subir setas */
		/* Mais espaço para o dedo */
		justify-content: space-between;
		/* Espalhar botões */
		padding-left: 30px;
		padding-right: 30px;
		pointer-events: none;
		/* Deixar clicar no carrossel no meio */
	}

	.nav-btn {
		pointer-events: auto;
		background: rgba(0, 0, 0, 0.5);
		/* Fundo para melhor visualização */
		border-radius: 50%;
		width: 50px;
		height: 50px;
		font-size: 1.5rem;
		backdrop-filter: blur(4px);
		/* Blur leve apenas nos botões */
	}

	.footer-hint {
		display: none;
	}

	/* Aumentar tamanho dos cards no mobile */
	:root {
		--scene-width-mobile: 280px;
		/* Mais largo */
		--scene-height-mobile: 400px;
		/* Mais alto */
		--card-width-mobile: 260px;
		--card-height-mobile: 360px;
	}

	.scene {
		width: var(--scene-width-mobile);
		height: var(--scene-height-mobile);
	}

	.carousel__cell {
		width: var(--card-width-mobile);
		height: var(--card-height-mobile);
	}


}

#canvas {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: var(--z-back);
	/* Fundo absoluto */
	pointer-events: none;
}

/* -- LOGO NO CARD -- */
.card-logo {
	width: 100px;
	height: 100px;
	object-fit: contain;
	margin-bottom: 15px;

	/* Brilho suave */
	transition: var(--transition-hover);
}

.carousel__cell:hover .card-logo {
	transform: scale(1.1);
}