:root {
	--bg: #0b0c0e;
	--fg: #f5f5f5;
	--muted: #a0a0a0;
	--accent: #ff2bd6;
	/* Magenta VSDigital */
	--accent-soft: rgba(255, 43, 214, 0.12);
	--panel: #141518;
}

* {
	box-sizing: border-box;
}

html,
body {
	margin: 0;
	padding: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Inter", sans-serif;
	background: var(--bg);
	color: var(--fg);
	scroll-behavior: smooth;
}

/* ====== NAV ====== */
nav {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	z-index: 50;
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 24px 48px;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0.4), transparent);
	backdrop-filter: blur(10px);
}

nav a {
	color: #fff;
	text-decoration: none;
	margin-left: 32px;
	font-size: 14px;
}

/* ====== HERO ====== */
section {
	padding: 120px 48px;
}

.hero {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.hero h1 {
	font-size: clamp(56px, 6vw, 140px);
	line-height: 0.8em;
	font-weight: 900;
	letter-spacing: -0.03em;
	margin: 0;
	/* overflow:hidden; */
}

.hero-typed {
	font-size: clamp(56px, 9vw, 140px);
	line-height: 0.95;
	font-weight: 900;
	letter-spacing: -0.03em;
	margin: 0;
	heigth: 4em;
}

.hero-typed span {
	padding-right: 8px;
}

.hero p {
	max-width: 560px;
	font-size: 20px;
	line-height: 1.5;
	color: var(--muted);
	margin-top: 40px;
	position: absolute;
	bottom: 50px;
}

/* ====== HORIZONTAL WORK ====== */
.work-wrapper {
	height: 300vh;
}

.work {
	position: sticky;
	top: 0;
	height: 100vh;
	display: flex;
	align-items: center;
	overflow: hidden;
}

.work-track {
	display: flex;
	gap: 80px;
	will-change: transform;
	padding-left: 50vw;
}

.work-item {
	min-width: 70vw;
	height: 68vh;
	border-radius: 28px;
	background: linear-gradient(180deg, var(--panel), #0e0f12);
	padding: 56px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
	border: 1px solid rgba(255, 255, 255, 0.04);
}

.work-item h3 {
	margin: 0;
	font-size: 40px;
}

.work-item span {
	color: var(--muted);
}

/* ====== SERVICES ====== */
.services {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 48px;
}

.service h3 {
	margin-bottom: 12px;
}

.service p {
	color: var(--muted);
}

.service img {
    width: 100%;
    border-radius: 10px;
}

.service {
	position: relative;
	padding-top: 32px;
	opacity: 0;
	transform: translateY(24px);
	transition: opacity 0.8s ease, transform 0.8s ease;
}

.service::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 0%;
	height: 1px;
	background: linear-gradient(90deg, var(--accent), transparent);
	transition: width 0.8s ease;
}

.service.visible {
	opacity: 1;
	transform: translateY(0);
}

.service.visible::before {
	width: 100%;
}

/* ====== CTA ====== */
.cta {
	text-align: center;
}

.cta h2 {
	font-size: clamp(40px, 6vw, 96px);
}

.cta a {
	display: inline-block;
	margin-top: 40px;
	padding: 18px 48px;
	border-radius: 999px;
	border: 1px solid var(--accent);
	color: #fff;
	text-decoration: none;
	font-size: 16px;
	background: linear-gradient(90deg, var(--accent), #ff5fe0);
}

footer {
	padding: 80px 48px;
	color: var(--muted);
	font-size: 14px;
}

/* ===== DOOR SCROLL EFFECT ===== */
.door-wrapper {
	height: 300vh;
}

.door {
	position: sticky;
	top: 0;
	height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.door-panel {
	position: absolute;
	top: 0;
	width: 50%;
	height: 100%;
	background: #e91e63;
	z-index: 1;
}

.door-panel.left {
	left: 0;
}

.door-panel.right {
	right: 0;
}

.door-texts {
	position: relative;
	z-index: 2;
	text-align: center;
	max-width: 900px;
}

.door-text {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%) scale(0.9);
	opacity: 0;
	font-size: clamp(32px, 5vw, 72px);
	transition: none;
}

h1,
h2,
h3 {
	line-height: 0.9em;
	letter-spacing: -1px;
	font-family: system-ui;
}

h3 {
	letter-spacing: -1px;
}

.chart-step h1 {
	font-size: 76px;
	margin: 0;
	padding: 0;
	/* height: 0; */
	width: 100%;
	animation: vibrate 0.3s infinite;
}

.chart-step.active h1 {}

.chart-step p {
	/* color: black; */
	/* background: magenta; */
	padding: 0;
	font-weight: bold;
	font-size: 2em;
}

@media (max-width: 768px) {
	nav {
		padding: 16px 24px;
	}

	section {
		padding: 96px 24px;
	}

	section.door-wrapper {
		padding: 0;
	}

	section.cube-section {
		width: 100%;
		display: flex;
		flex-flow: column;
		align-items: center;
	}

	section.cube-section .cube-scene {
		margin: 0 auto;
		transform: translate(0%, 0%);
		top: 20%;
	}

	.cube-text {
		position: sticky;
		bottom: 50px;
	}

	.cube {
		margin-top: 40vh;
		margin-top: 40vh;
		margin-top: 40v;
		margin-top: 40;
		margin-top: 40%;
		margin-top: 40;
		margin-top: 4;
		margin-top: 50%;
		transition: transform 0.1s linear;
		will-change: transform;
	}

	.chart-step p {
		font-size: 1em;
		width: 60%;
	}

	.chart-step h1 {
		font-size: 3em;
	}
}

.noise {
	pointer-events: none;
	position: absolute;
	inset: 0;

	background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHdpZHRoPScyMDAnIGhlaWdodD0nMjAwJz48ZmlsdGVyIGlkPSdub2lzZSc+PGZlVHVyYnVsZW5jZSB0eXBlPSdmcmFjdGFsTm9pc2UnIGJhc2VGcmVxdWVuY3k9JzAuOScgbnVtT2N0YXZlcz0nMycvPjwvZmlsdGVyPjxyZWN0IHdpZHRoPScyMDAnIGhlaWdodD0nMjAwJyBmaWxsPSd3aGl0ZScgZmlsdGVyPSd1cmwoI25vaXNlKScgb3BhY2l0eT0nMC4wNScvPjwvc3ZnPg==");
	background-size: 200px 200px;
}

/* ===== CHART STORYTELLING ===== */
.charts-wrapper {
	height: 500vh;
}

.charts-sticky {
	position: sticky;
	top: 0;
	height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	text-align: center;
}

.chart-step {
	position: absolute;
	/* max-width:720px; */
	opacity: 0;
	transform: scale(0.92);
	transition: opacity 0.8s ease, transform 0.8s ease;
	display: flex;
	flex-flow: column;
	justify-content: center;
	align-items: center;
}

.chart-step.active {
	opacity: 1;
	transform: scale(1);
}

.chart-box {
	height: 360px;
	/* margin-top: 24px; */
}

.cube-section {
	height: 200vh;
	display: flex;
	align-items: center;
	justify-content: space-around;
	gap: 120px;
}

.cube-scene {
	position: sticky;
	top: 50%;
	transform: translateY(-50%) translateX(50%);
	width: 320px;
	height: 320px;
	perspective: 1200px;
}

.cube-scene {
	/* width: 50%; */ /* aspect-ratio: 1; */
}

.cube {
	width: 100%;
	height: 100%;
	aspect-ratio: 1;
	position: relative;
	transform-style: preserve-3d;
	transition: transform 0.1s linear;
	margin-top: 0;
}

.cube-face {
	position: absolute;
	/* width: 100%; */
	height: 100%;
	backface-visibility: hidden;
	aspect-ratio: 1;
}

.cube-face img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 20px;
}

.cube-face.front {
	transform: rotateY(0deg) translateZ(160px);
}

.cube-face.right {
	transform: rotateY(90deg) translateZ(160px);
}

.cube-face.back {
	transform: rotateY(180deg) translateZ(160px);
}

.cube-face.left {
	transform: rotateY(-90deg) translateZ(160px);
}

.cube-text {
	max-width: 420px;
}

.cube-text h2 {
	font-size: clamp(32px, 4vw, 56px);
	margin-bottom: 24px;
}

.cube-text p {
	color: var(--muted);
	font-size: 18px;
}

.cube-text {
	z-index: 1000;
	/* width: 100%; */
	padding: 0;
	margin: 0;
	/* transform: translate(-100%, -50%); */
}

/* GLITCH */
.glitch-bg {
	position: relative;
	/* background: #0a0a0a; */
	overflow: hidden;
}

.glitch-bg::before,
.glitch-bg::after {
	content: "";
	position: absolute;
	inset: 0;
	background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.5) 0px, rgba(255, 255, 255, 0.5) 1px, transparent 1px, transparent 3px);
	mix-blend-mode: overlay;
	pointer-events: none;
}

.glitch-bg::after {
	animation: glitchShift 0.5s infinite steps(2);
}

@keyframes glitchShift {
	0% {
		font-variant: JIS83;
		transform: translate(0, 0);
		opacity: 0.2;
	}
	10% {
		transform: translate(-2px, 1px);
	}
	20% {
		transform: translate(2px, -1px);
	}
	30% {
		transform: translate(-1px, 2px);
	}
	40% {
		transform: translate(1px, -2px);
	}
	50% {
		transform: translate(0, 0);
		opacity: 0.5;
	}
	100% {
		transform: translate(0, 0);
		opacity: 0.3;
	}
}

.glitch-flash {
	background: #000;
	color: #fff;
	animation: bgFlash 1.2s infinite steps(1);
}

.glitch-flash-text {
	animation: bgFlashText 1.2s infinite steps(1);
}
.glitch-speed-up{
    animation-duration: 0.6s;
}
.glitch-speed-down{
    animation-duration: 6s;
}
@keyframes bgFlash {
	0% {
		background: #000;
		color: #fff;
	}
	10% {
		background: #050d1c;
		color: #000;
	}
	20% {
		background: #0a0a0a;
		color: #00ffe1;
	}
	30% {
		background: #1a001a;
		color: #ff3cff;
	}
	40% {
		background: #000;
		color: #fff;
	}
	55% {
		background: #001018;
		color: #00b3ff;
	}
	65% {
		background: #180000;
		color: #ff4d4d;
	}
	75% {
		background: #000;
		color: #fff;
	}
	100% {
		background: #000;
		color: #fff;
	}
}

@keyframes bgFlashText {
	0% {
		color: #fff;
	}
	10% {
		color: #1aff00;
	}
	20% {
		color: #00ffe1;
	}
	30% {
		color: #ff3cff;
	}
	40% {
		color: #fff;
	}
	55% {
		color: #00b3ff;
	}
	65% {
		color: #ff4d4d;
	}
	75% {
		color: #fff;
	}
	100% {
		color: #ff00dd;
	}
}

.glitch {
  position: relative;
  font-size: 3rem;
}

strong.glitch {
    font-size: inherit;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  pointer-events: none;
}

.glitch::before {
  transform: translate(2px, -2px);
  color: #ffffff45;
  mix-blend-mode: screen;
  animation: glitch1 0.3s infinite;
}

.glitch::after {
  transform: translate(-2px, 2px);
  color:#ffffff45;
  mix-blend-mode: screen;
  animation: glitch2 0.3s infinite;
}

@keyframes glitch1 {
  0% { clip-path: inset(0 0 80% 0); }
  50% {clip-path: inset(40% 0 20% 0);transform: translateX(4px);}
  51% {clip-path: inset(40% 0 20% 0);transform: translateX(-4px);}
  61% {clip-path: inset(40% 0 20% 0);transform: translateY(-4px);}
  64% {clip-path: inset(0 0 20% 0);transform: translateX(0px);}
  100% { clip-path: inset(100% 0 60% 0); }
}

@keyframes glitch2 {
  0% { clip-path: inset(60% 0 10% 0);
	  transform: translateY(0px);
	 }
  30% { clip-path: inset(20% 0 40% 0);
	   transform: translateY(-6px);
	  }
  31% { clip-path: inset(20% 0 40% 0);
	  	   transform: translateY(10px) translateX(-30px);
} 
	50% { clip-path: inset(20% 0 40% 0);
	  	   transform: translateY(0px) translateX(-0px);
} 
  33% { clip-path: inset(20% 0 40% 0); }
  34% { clip-path: inset(80% 0 0 0); }
  100% { clip-path: inset(80% 0 0 0); }
}
@keyframes vibrate
{
	0%{transform:translate(1px,2px)}
	10%{transform:translate(-1px,1px)}
	20%{transform:translate(-2px,-3px)}
	30%{transform:translate(0px,0px)}
	80%{transform:translate(0px,0px)}
	81%{transform:translate(-4px,0px)}
	90%{transform:translate(0px,3px)}
}