/* ============================
   APEXWEB IMMERSIVE LEGAL PAGES
============================ */

body.apexweb-legal-page {
	margin: 0;
	background: #090b10;
	color: #f8fafc;
}

body.apexweb-legal-page header,
body.apexweb-legal-page #masthead,
body.apexweb-legal-page .site-header,
body.apexweb-legal-page .main-header-bar,
body.apexweb-legal-page .ast-primary-header-bar,
body.apexweb-legal-page .ast-mobile-header-wrap,
body.apexweb-legal-page footer.site-footer,
body.apexweb-legal-page .site-footer,
body.apexweb-legal-page .entry-header {
	display: none !important;
}

body.apexweb-legal-page .site-content,
body.apexweb-legal-page #content,
body.apexweb-legal-page .ast-container,
body.apexweb-legal-page .content-area,
body.apexweb-legal-page .site-main {
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 0;
}

.apex-legal,
.apex-legal * {
	box-sizing: border-box;
}

.apex-legal {
	--apex-ink: #f8fafc;
	--apex-muted: #aab3c2;
	--apex-dark: #090b10;
	--apex-cyan: #37d6ff;
	--apex-green: #b9ff66;
	--apex-coral: #ff6f61;
	position: relative;
	min-height: 100vh;
	overflow: hidden;
	background:
		linear-gradient(180deg, rgba(9, 11, 16, 0.7), rgba(9, 11, 16, 0.98) 54%, #f7f8fb 54%, #ffffff 100%),
		linear-gradient(120deg, #090b10 0%, #111827 40%, #061116 74%, #171012 100%);
	font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.apex-legal::before {
	content: "";
	position: fixed;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	background-image:
		linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
	background-size: 44px 44px;
	mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.95), transparent 76%);
}

.apex-legal::after {
	content: "";
	position: absolute;
	top: 118px;
	left: 24px;
	right: 24px;
	z-index: 0;
	height: 430px;
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 8px;
	background:
		linear-gradient(135deg, rgba(55, 214, 255, 0.14), transparent 30%),
		linear-gradient(315deg, rgba(255, 111, 97, 0.12), transparent 28%),
		rgba(255, 255, 255, 0.025);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
	pointer-events: none;
}

.apex-flow-canvas {
	position: fixed;
	inset: 0;
	z-index: 1;
	width: 100%;
	height: 100%;
	pointer-events: none;
	opacity: 0.72;
}

.apex-legal-container {
	position: relative;
	z-index: 2;
	width: min(1080px, calc(100% - 40px));
	margin: 0 auto;
}

.apex-legal-nav {
	position: relative;
	z-index: 5;
	display: grid;
	grid-template-columns: auto 1fr;
	align-items: center;
	gap: 24px;
	min-height: 108px;
	margin-top: 22px;
	padding: 0 14px 0 20px;
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 8px;
	background: rgba(9, 11, 16, 0.72);
	box-shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
	backdrop-filter: blur(18px);
}

.apex-legal-brand {
	display: inline-flex;
	align-items: center;
	min-width: 0;
}

.apex-legal-brand img {
	display: block;
	width: 584px;
	max-height: 96px;
	height: auto;
	object-fit: contain;
	filter: drop-shadow(0 8px 22px rgba(55, 214, 255, 0.22));
}

.apex-legal-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 8px;
}

.apex-legal-links a {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	padding: 0 15px;
	border: 1px solid rgba(185, 255, 102, 0.3);
	border-radius: 8px;
	background:
		linear-gradient(135deg, rgba(185, 255, 102, 0.16), rgba(55, 214, 255, 0.14));
	clip-path: polygon(0 0, calc(100% - 11px) 0, 100% 11px, 100% 100%, 11px 100%, 0 calc(100% - 11px));
	color: rgba(248, 250, 252, 0.9);
	font-size: 0.88rem;
	font-weight: 850;
	text-decoration: none;
	overflow: hidden;
	transition: color 180ms ease, border-color 180ms ease, transform 180ms ease, background 180ms ease;
}

.apex-legal-links a::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.42) 45%, transparent 70%);
	transform: translateX(-120%);
	transition: transform 420ms ease;
}

.apex-legal-links a:hover {
	color: #ffffff;
	border-color: rgba(185, 255, 102, 0.62);
	background:
		linear-gradient(135deg, rgba(185, 255, 102, 0.28), rgba(55, 214, 255, 0.24));
	transform: translateY(-2px);
}

.apex-legal-links a:hover::before {
	transform: translateX(120%);
}

.apex-legal-hero {
	position: relative;
	z-index: 2;
	padding: 76px 0 56px;
	color: #ffffff;
}

.apex-legal-kicker {
	display: inline-flex;
	align-items: center;
	min-height: 34px;
	margin: 0 0 18px;
	padding: 0 12px;
	border: 1px solid rgba(185, 255, 102, 0.42);
	border-radius: 8px;
	background: rgba(185, 255, 102, 0.09);
	color: var(--apex-green);
	font-size: 0.84rem;
	font-weight: 950;
	text-transform: uppercase;
}

.apex-legal-hero h1 {
	max-width: 820px;
	margin: 0 0 18px;
	color: #ffffff;
	font-size: 4.15rem;
	line-height: 0.98;
	font-weight: 950;
	letter-spacing: 0;
	text-wrap: balance;
}

.apex-legal-hero p {
	max-width: 760px;
	margin: 0;
	color: rgba(248, 250, 252, 0.76);
	font-size: 1.16rem;
	line-height: 1.65;
	font-weight: 560;
}

.apex-legal-card {
	position: relative;
	z-index: 3;
	margin: 24px auto 84px;
	padding: 26px;
	border: 1px solid rgba(255, 255, 255, 0.28);
	border-radius: 8px;
	background:
		linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.98)),
		rgba(255, 255, 255, 0.88);
	box-shadow: 0 34px 110px rgba(0, 0, 0, 0.26);
	color: #11141b;
	backdrop-filter: blur(18px);
}

.apex-legal-card::before {
	content: "";
	position: absolute;
	inset: -1px;
	z-index: -1;
	border-radius: 8px;
	background: linear-gradient(135deg, rgba(55, 214, 255, 0.44), rgba(185, 255, 102, 0.22), rgba(255, 111, 97, 0.32));
	opacity: 0.62;
}

.apex-legal-meta {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1px;
	margin-bottom: 24px;
	overflow: hidden;
	border: 1px solid rgba(16, 19, 26, 0.1);
	border-radius: 8px;
	background: rgba(16, 19, 26, 0.1);
}

.apex-legal-meta div {
	position: relative;
	min-height: 132px;
	padding: 18px;
	background:
		linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(240, 248, 251, 0.92));
	transition: transform 180ms ease, background 180ms ease;
}

.apex-legal-meta div:hover {
	transform: translateY(-2px);
	background: #10131a;
}

.apex-legal-meta span {
	display: block;
	margin-bottom: 28px;
	color: #0e87a8;
	font-size: 0.74rem;
	font-weight: 950;
	text-transform: uppercase;
}

.apex-legal-meta strong {
	display: block;
	color: #11141b;
	font-size: 0.98rem;
	line-height: 1.35;
}

.apex-legal-meta div:hover span {
	color: var(--apex-green);
}

.apex-legal-meta div:hover strong,
.apex-legal-meta div:hover a {
	color: #ffffff;
}

.apex-legal-section {
	position: relative;
	padding: 26px;
	border: 1px solid rgba(16, 19, 26, 0.1);
	border-radius: 8px;
	background: #ffffff;
	box-shadow: 0 14px 42px rgba(16, 19, 26, 0.045);
}

.apex-legal-section + .apex-legal-section {
	margin-top: 14px;
}

.apex-legal-section::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 5px;
	height: 100%;
	border-radius: 8px 0 0 8px;
	background: linear-gradient(180deg, var(--apex-cyan), var(--apex-green), var(--apex-coral));
	opacity: 0;
	transition: opacity 180ms ease;
}

.apex-legal-section:hover::before {
	opacity: 1;
}

.apex-legal-section h2 {
	margin: 0 0 14px;
	color: #11141b;
	font-size: 1.5rem;
	line-height: 1.16;
	font-weight: 950;
	letter-spacing: 0;
}

.apex-legal-section h3 {
	margin: 24px 0 10px;
	color: #11141b;
	font-size: 1.1rem;
	line-height: 1.2;
	font-weight: 950;
}

.apex-legal-section p,
.apex-legal-section li {
	color: #4a5565;
	font-size: 1rem;
	line-height: 1.72;
	font-weight: 520;
}

.apex-legal-section p {
	margin: 0 0 14px;
}

.apex-legal-section p:last-child {
	margin-bottom: 0;
}

.apex-legal-section ul {
	margin: 0 0 14px;
	padding-left: 22px;
}

.apex-legal-section a,
.apex-legal-meta a {
	color: #087f9f;
	font-weight: 850;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.apex-legal-table {
	width: 100%;
	margin: 16px 0;
	border-collapse: collapse;
	overflow: hidden;
	border-radius: 8px;
}

.apex-legal-table th,
.apex-legal-table td {
	padding: 14px;
	border: 1px solid rgba(16, 19, 26, 0.11);
	text-align: left;
	vertical-align: top;
	color: #4a5565;
	font-size: 0.95rem;
	line-height: 1.5;
}

.apex-legal-table th {
	color: #11141b;
	background: #f0f4f7;
	font-weight: 950;
}

.apex-legal-footer {
	position: relative;
	z-index: 2;
	padding: 28px 0;
	color: rgba(248, 250, 252, 0.68);
	background: #090b10;
	font-size: 0.92rem;
	font-weight: 700;
}

.apex-legal-footer .apex-legal-container {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
}

.apex-legal-footer-link {
	color: rgba(248, 250, 252, 0.68);
	font-weight: 850;
	text-decoration: none;
	transition: color 180ms ease;
}

.apex-legal-footer-link:hover,
.apex-legal-footer-link:focus-visible {
	color: #ffffff;
}

.apex-reveal {
	opacity: 0;
	transform: translateY(28px);
	transition: opacity 720ms ease, transform 720ms ease;
}

.apex-reveal.is-visible {
	opacity: 1;
	transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
	.apex-reveal {
		transition: none;
	}
}

@media (max-width: 900px) {
	.apex-legal-hero h1 {
		font-size: 3.2rem;
	}

	.apex-legal-meta {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 700px) {
	.apex-legal {
		background:
			linear-gradient(180deg, rgba(9, 11, 16, 0.82), rgba(9, 11, 16, 0.98) 46%, #f7f8fb 46%, #ffffff 100%),
			linear-gradient(145deg, #090b10 0%, #101822 54%, #14100f 100%);
	}

	.apex-legal::before {
		background-size: 34px 34px;
		opacity: 0.58;
	}

	.apex-legal::after {
		top: 82px;
		left: 10px;
		right: 10px;
		height: 350px;
	}

	.apex-flow-canvas {
		opacity: 0.42;
	}

	.apex-legal-container {
		width: min(100% - 28px, 1080px);
	}

	.apex-legal-nav {
		display: flex;
		align-items: center;
		justify-content: space-between;
		min-height: 94px;
		margin-top: 14px;
		padding: 9px 10px 9px 12px;
		gap: 10px;
		background: rgba(9, 11, 16, 0.86);
		overflow: hidden;
	}

	.apex-legal-brand {
		flex: 0 1 42%;
		max-width: 42%;
		height: 76px;
		overflow: hidden;
	}

	.apex-legal-brand img {
		width: auto;
		max-width: 410px;
		height: 76px;
		max-height: 76px;
	}

	.apex-legal-links {
		flex: 1 1 auto;
		min-width: 0;
		justify-content: flex-start;
		flex-wrap: nowrap;
		gap: 6px;
		overflow-x: auto;
		scrollbar-width: none;
	}

	.apex-legal-links::-webkit-scrollbar {
		display: none;
	}

	.apex-legal-links a {
		min-height: 34px;
		padding: 0 10px;
		font-size: 12px;
		white-space: nowrap;
		background: rgba(255, 255, 255, 0.06);
	}

	.apex-legal-hero {
		padding: 54px 0 34px;
	}

	.apex-legal-kicker {
		min-height: 31px;
		margin-bottom: 14px;
		font-size: 0.72rem;
	}

	.apex-legal-hero h1 {
		font-size: 2.28rem;
		line-height: 1.04;
	}

	.apex-legal-hero p {
		font-size: 0.98rem;
		line-height: 1.56;
	}

	.apex-legal-card {
		margin: 14px auto 54px;
		padding: 14px;
	}

	.apex-legal-meta {
		grid-template-columns: 1fr;
		margin-bottom: 14px;
	}

	.apex-legal-meta div {
		min-height: 96px;
		padding: 16px;
	}

	.apex-legal-meta span {
		margin-bottom: 16px;
	}

	.apex-legal-section {
		padding: 20px;
	}

	.apex-legal-section h2 {
		font-size: 1.24rem;
	}

	.apex-legal-section p,
	.apex-legal-section li {
		font-size: 0.96rem;
		line-height: 1.64;
	}

	.apex-legal-table {
		display: block;
		overflow-x: auto;
	}

	.apex-legal-footer .apex-legal-container {
		align-items: flex-start;
		flex-direction: column;
	}
}
