.cp-hero {
	display: grid;
	grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.3fr);
	gap: 2.5rem;
	align-items: center;
	max-width: var(--container-page, 80rem);
	margin-inline: auto;
	padding: clamp(0.5rem, 2vw, 1.25rem) 1rem clamp(1.25rem, 4vw, 3rem);
	color: var(--color-ink);
}

.cp-hero__eyebrow {
	margin: 0 0 0.75rem;
	font-size: 0.95rem;
	font-weight: 700;
	color: var(--color-brand);
}

.cp-hero .cp-hero__title {
	margin: 0 0 1rem;
	font-size: var(--text-3xl);
	line-height: 1.3;
}

.cp-hero__line {
	display: block;
}

.cp-hero__glitch {
	position: relative;
	width: fit-content;
}

.cp-hero__glitch::before,
.cp-hero__glitch::after {
	content: attr(data-text);
	position: absolute;
	top: 0;
	width: 100%;
	height: 100%;
	opacity: 0.8;
	pointer-events: none;
}

.cp-hero__glitch::before {
	left: 2px;
	text-shadow: -1px 0 #ff00c1;
	animation: cp-glitch-a 4s infinite linear alternate-reverse;
}

.cp-hero__glitch::after {
	left: -2px;
	text-shadow: -1px 0 #00fff9;
	animation: cp-glitch-b 10s infinite linear alternate-reverse;
}

.cp-hero__lead {
	margin: 0 0 1.5rem;
	max-width: 34rem;
	font-size: 1.05rem;
	line-height: 1.9;
	color: var(--color-ink-muted);
}

.cp-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.cp-frame {
	position: relative;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	isolation: isolate;
	background:
		radial-gradient(120% 80% at 85% 0%, color-mix(in srgb, var(--color-brand) 14%, transparent), transparent 60%),
		radial-gradient(90% 70% at 0% 100%, color-mix(in srgb, var(--color-gold) 9%, transparent), transparent 65%),
		var(--color-surface);
	box-shadow:
		inset 0 0 0 1px color-mix(in srgb, var(--color-brand) 35%, var(--color-line)),
		0 30px 80px -30px color-mix(in srgb, var(--color-brand) 45%, transparent);
	clip-path: polygon(18px 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%, 0 18px);
	direction: ltr;
}

.cp-frame::before,
.cp-frame::after {
	content: '';
	position: absolute;
	z-index: 5;
	width: 18px;
	height: 18px;
	pointer-events: none;
	border: 0 solid var(--color-brand);
	filter: drop-shadow(0 0 6px var(--color-brand));
}

.cp-frame::before {
	top: 7px;
	right: 7px;
	border-width: 2px 2px 0 0;
}

.cp-frame::after {
	bottom: 7px;
	left: 7px;
	border-width: 0 0 2px 2px;
}

.cp-frame__glow {
	position: absolute;
	inset: -30%;
	z-index: -1;
	background: conic-gradient(from 0deg, transparent 0 70%, color-mix(in srgb, var(--color-brand) 22%, transparent) 80%, transparent 90%);
	animation: cp-spin 14s linear infinite;
	opacity: 0.6;
}

.cp-frame__grid {
	position: absolute;
	inset: 0;
	background-image: radial-gradient(color-mix(in srgb, var(--color-ink-muted) 45%, transparent) 1px, transparent 1.5px);
	background-size: 26px 26px;
	opacity: 0.22;
	mask-image: radial-gradient(ellipse at center, #000 40%, transparent 85%);
}

.cp-canvas {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

.cp-frame__scan {
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background: repeating-linear-gradient(0deg, transparent 0 3px, color-mix(in srgb, var(--color-ink) 3%, transparent) 3px 4px);
	mix-blend-mode: overlay;
}

.cp-frame__hud {
	position: absolute;
	inset-inline: 0;
	top: 0;
	z-index: 4;
	display: flex;
	align-items: center;
	gap: 0.6rem;
	padding: 0.85rem 1.5rem 0;
	direction: ltr;
}

.cp-frame__brand,
.cp-frame__symbol,
.cp-frame__sim {
	white-space: nowrap;
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	animation: cp-type 1.1s steps(16, end) 0.2s both;
}

.cp-frame__brand {
	order: 4;
	margin-left: auto;
	color: var(--color-brand);
	text-shadow: 0 0 12px color-mix(in srgb, var(--color-brand) 70%, transparent);
}

.cp-frame__symbol {
	order: 2;
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	color: var(--color-ink);
}

.cp-frame__hud .gc-badge {
	order: 3;
}

.cp-frame__sim {
	order: 1;
	letter-spacing: 0;
	font-weight: 600;
	color: var(--color-ink-muted);
	direction: rtl;
}

.cp-live {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--color-success);
	box-shadow: 0 0 0 0 color-mix(in srgb, var(--color-success) 60%, transparent);
	animation: cp-ping 1.6s ease-out infinite;
}

.cp-pressure {
	position: absolute;
	inset-inline: 0;
	bottom: 0;
	z-index: 4;
	display: flex;
	align-items: center;
	gap: 0.6rem;
	padding: 0 1.5rem 0.9rem;
	font-size: 0.72rem;
	font-weight: 600;
	color: var(--color-ink-muted);
	direction: ltr;
}

.cp-pressure__label {
	white-space: nowrap;
	direction: rtl;
}

.cp-pressure__label b {
	display: inline-block;
	min-width: 2.6em;
	font-variant-numeric: tabular-nums;
	direction: ltr;
}

.cp-pressure__label--buy b {
	color: var(--color-success);
}

.cp-pressure__label--sell b {
	color: var(--color-danger);
}

.cp-pressure__bar {
	position: relative;
	flex: 1;
	height: 4px;
	overflow: hidden;
	border-radius: 999px;
	background: color-mix(in srgb, var(--color-danger) 75%, transparent);
	box-shadow: 0 0 12px color-mix(in srgb, var(--color-danger) 40%, transparent);
}

.cp-pressure__bar i {
	position: absolute;
	inset-block: 0;
	left: 0;
	width: 50%;
	border-radius: 999px;
	background: var(--color-success);
	box-shadow: 0 0 12px var(--color-success);
	transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes cp-spin {
	to {
		transform: rotate(1turn);
	}
}

@keyframes cp-ping {
	0% {
		box-shadow: 0 0 0 0 color-mix(in srgb, var(--color-success) 60%, transparent);
	}
	100% {
		box-shadow: 0 0 0 8px transparent;
	}
}

@keyframes cp-type {
	from {
		clip-path: inset(0 100% 0 0);
	}
	to {
		clip-path: inset(0 0 0 0);
	}
}

@keyframes cp-glitch-a {
	0% {
		clip-path: inset(30% 0 55% 0);
	}
	10% {
		clip-path: inset(78% 0 12% 0);
	}
	20% {
		clip-path: inset(10% 0 45% 0);
	}
	30% {
		clip-path: inset(40% 0 35% 0);
	}
	40% {
		clip-path: inset(20% 0 65% 0);
	}
	50% {
		clip-path: inset(68% 0 20% 0);
	}
	60% {
		clip-path: inset(15% 0 50% 0);
	}
	70% {
		clip-path: inset(55% 0 25% 0);
	}
	80% {
		clip-path: inset(25% 0 62% 0);
	}
	90% {
		clip-path: inset(62% 0 22% 0);
	}
	100% {
		clip-path: inset(5% 0 72% 0);
	}
}

@keyframes cp-glitch-b {
	0% {
		clip-path: inset(62% 0 28% 0);
	}
	10% {
		clip-path: inset(22% 0 68% 0);
	}
	20% {
		clip-path: inset(52% 0 38% 0);
	}
	30% {
		clip-path: inset(4% 0 86% 0);
	}
	40% {
		clip-path: inset(44% 0 46% 0);
	}
	50% {
		clip-path: inset(14% 0 76% 0);
	}
	60% {
		clip-path: inset(70% 0 8% 0);
	}
	70% {
		clip-path: inset(34% 0 46% 0);
	}
	80% {
		clip-path: inset(8% 0 60% 0);
	}
	90% {
		clip-path: inset(48% 0 30% 0);
	}
	100% {
		clip-path: inset(20% 0 52% 0);
	}
}

@media (max-width: 1199px) {
	.cp-hero {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
	}
}

@media (max-width: 900px) {
	.cp-hero {
		grid-template-columns: minmax(0, 1fr);
		gap: 1.5rem;
		padding-top: 1rem;
	}

	.cp-frame {
		aspect-ratio: 4 / 5;
	}

	.cp-hero__actions .gc-btn {
		flex: 1 1 100%;
	}

	.cp-frame__hud {
		flex-wrap: wrap;
		row-gap: 0.35rem;
		padding-inline: 1.1rem;
	}

	.cp-frame__sim {
		order: 5;
		flex-basis: 100%;
		text-align: left;
	}

	.cp-pressure {
		padding-inline: 1.1rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.cp-hero__glitch::before,
	.cp-hero__glitch::after {
		display: none;
	}

	.cp-frame__brand,
	.cp-frame__symbol,
	.cp-frame__sim,
	.cp-frame__glow,
	.cp-live {
		animation: none;
	}
}
