/* ============================================================
   HERO LAB — scoped styles for the experimental hero test page.
   Everything is namespaced under .hlab / .hl-* / .hlab-switch so it
   never touches the live landing. Loaded only on /hero-lab.
   ============================================================ */

/* ---- dev variant switcher ---- */
.hlab-switch {
	position: fixed;
	left: 50%;
	bottom: 22px;
	transform: translateX(-50%);
	z-index: 90;
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 7px 8px 7px 14px;
	border-radius: 100px;
	border: 1px solid rgba(255, 255, 255, .14);
	background: rgba(10, 12, 26, .72);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	box-shadow: 0 18px 44px -18px rgba(0, 0, 0, .8);
}
.hlab-switch-label {
	font-family: var(--font-display, sans-serif);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--text-2, #a8aec8);
	margin-right: 4px;
	white-space: nowrap;
}
.hlab-switch-pill {
	font-family: var(--font-display, sans-serif);
	font-size: 12.5px;
	font-weight: 600;
	color: var(--text-2, #a8aec8);
	text-decoration: none;
	padding: 7px 13px;
	border-radius: 100px;
	border: 1px solid transparent;
	white-space: nowrap;
	transition: color .25s ease, background .25s ease, border-color .25s ease;
}
.hlab-switch-pill:hover { color: #fff; border-color: rgba(255, 255, 255, .18); }
.hlab-switch-pill.is-active {
	color: #fff;
	background: linear-gradient(120deg, rgba(124, 92, 255, .95), rgba(255, 78, 205, .9));
	border-color: transparent;
	box-shadow: 0 8px 22px -8px rgba(124, 92, 255, .8);
}
@media (max-width: 560px) {
	.hlab-switch { gap: 4px; padding: 6px 6px 6px 10px; bottom: 14px; }
	.hlab-switch-label { display: none; }
	.hlab-switch-pill { font-size: 11.5px; padding: 6px 10px; }
}

/* ---- shared hero shell ---- */
.hlab {
	position: relative;
	overflow: hidden;
	min-height: 100svh;
	display: flex;
	align-items: center;
	padding: 120px 0 90px;
}
.hl-h1 {
	font-family: var(--font-display, sans-serif);
	font-weight: 700;
	line-height: 1.02;
	letter-spacing: -.02em;
	color: var(--text-1, #fff);
	font-size: clamp(2.4rem, 6vw, 4.6rem);
}

/* Variant-specific styles are appended below by the build step. */

/* shared bits reused by variants */
.hl-eyebrow {
	display: inline-flex; align-items: center; gap: 8px;
	font-family: var(--font-display); font-size: 12.5px; font-weight: 600;
	letter-spacing: .14em; text-transform: uppercase; color: var(--text-2);
	padding: 8px 16px; border-radius: 100px;
	border: 1px solid rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .03);
	backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.hl-eyebrow svg { width: 13px; height: 13px; fill: var(--amber); }
.hl-eyebrow-star { animation: eyebrowSpark 2.6s ease-in-out infinite; }

/* "The magic AI image studio" pill — animated aurora border that runs down BOTH
   sides at once (two symmetric conic arcs sitting left & right), matching the old
   hero eyebrow's treatment. Reuses --eb-ring-angle / eyebrowRingSpin / eyebrowShimmer
   defined in style.css (loaded before this file). */
.hl-eyebrow { position: relative; isolation: isolate; border-color: transparent; }
.hl-eyebrow::before {
	content: "";
	position: absolute; inset: 0; z-index: -1;
	border-radius: inherit; padding: 1px;
	--eb-ring-angle: 0deg;   /* static fallback where @property is unsupported */
	background: conic-gradient(from var(--eb-ring-angle, 0deg),
		transparent 4%, #7c5cff 12%, #22d3ee 25%, #ff4ecd 38%, transparent 46%,
		transparent 54%, #7c5cff 62%, #22d3ee 75%, #ff4ecd 88%, transparent 96%);
	-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
	        mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
	-webkit-mask-composite: xor;
	        mask-composite: exclude;
	opacity: .9;
	animation: eyebrowRingSpin 6.5s linear infinite;
}
.hl-eyebrow > span {
	background-image: linear-gradient(100deg, #b7b2d6 0%, #b7b2d6 40%, #eafaff 48%, #ffffff 50%, #eafaff 52%, #b7b2d6 60%, #b7b2d6 100%);
	background-size: 220% 100%;
	background-position: 200% 0;
	-webkit-background-clip: text;
	        background-clip: text;
	color: transparent;
	-webkit-text-fill-color: transparent;
	animation: eyebrowShimmer 4.8s cubic-bezier(.5, 0, .35, 1) infinite;
}
@media (prefers-reduced-motion: reduce) {
	.hl-eyebrow::before { animation: none; --eb-ring-angle: 210deg; opacity: .7; }
	.hl-eyebrow > span { animation: none; background: none; -webkit-text-fill-color: currentColor; color: var(--text-2); }
}
.hl-grad {
	background: linear-gradient(100deg, var(--cyan), var(--violet) 45%, var(--magenta));
	-webkit-background-clip: text; background-clip: text;
	color: transparent; -webkit-text-fill-color: transparent;
}
.hl-sub { margin: 18px 0 0; max-width: 46ch; color: var(--text-2); font-size: clamp(1rem, 1.15vw, 1.12rem); line-height: 1.6; }
.hl-cta { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 14px; }
.hl-btn {
	display: inline-flex; align-items: center; justify-content: center;
	min-height: 48px; padding: 0 26px; border-radius: 100px;
	font-family: var(--font-display); font-weight: 600; font-size: 15px; text-decoration: none;
	transition: transform .3s cubic-bezier(.34, 1.56, .64, 1), box-shadow .3s ease, border-color .3s ease;
}
.hl-btn-primary { color: #fff; background: linear-gradient(120deg, var(--violet), var(--magenta)); box-shadow: 0 16px 40px -14px rgba(124, 92, 255, .75); }
.hl-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 22px 50px -14px rgba(124, 92, 255, .9); }
.hl-btn-ghost { color: var(--text-1); border: 1px solid rgba(255, 255, 255, .16); }
.hl-btn-ghost:hover { border-color: rgba(255, 255, 255, .4); }
.hl-trust { margin-top: 18px; font-size: 13px; color: var(--text-3); }

/* reused Prism Spark-Burst image layers, scoped for lab heroes (keyframes are global in style.css) */
.hlab .hc-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: translateZ(0); backface-visibility: hidden; }
.hlab .hc-img.is-front { opacity: 1; z-index: 2; }
.hlab .hc-img.is-back { opacity: 0; z-index: 1; }
.hlab .is-swapping .hc-img { will-change: transform, opacity, filter; }
.hlab .is-swapping .hc-img.is-back { opacity: 1; z-index: 3; animation: hcImgIn var(--hc-dur, 1.15s) cubic-bezier(.2, .7, .2, 1) both; }
.hlab .is-swapping .hc-img.is-front { z-index: 2; animation: hcImgOut var(--hc-dur, 1.15s) cubic-bezier(.4, 0, .6, 1) both; }
.hlab .hc-flash { position: absolute; inset: -12%; z-index: 6; pointer-events: none; border-radius: 50%; background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, .9) 0%, rgba(124, 92, 255, .45) 32%, rgba(34, 211, 238, .18) 54%, rgba(255, 78, 205, 0) 72%); mix-blend-mode: screen; opacity: 0; }
.hlab .is-swapping .hc-flash { will-change: transform, opacity; animation: hcFlash var(--hc-dur, 1.15s) ease-out both; }
.hlab .hc-sparks { position: absolute; inset: 0; z-index: 8; pointer-events: none; overflow: hidden; border-radius: inherit; }
.hlab .hc-spark { position: absolute; margin: -.5em 0 0 -.5em; font-family: var(--font-display); font-size: 22px; line-height: 1; font-style: normal; opacity: 0; transform: scale(0); text-shadow: 0 0 8px currentColor, 0 0 16px currentColor; }
.hlab .is-swapping .hc-spark { will-change: transform, opacity; animation: hcSpark 1s cubic-bezier(.2, .8, .2, 1) both; }
.hlab .is-swapping .hc-spark:nth-child(1) { animation-delay: 0s; }
.hlab .is-swapping .hc-spark:nth-child(2) { animation-delay: .05s; }
.hlab .is-swapping .hc-spark:nth-child(3) { animation-delay: .1s; }
.hlab .is-swapping .hc-spark:nth-child(4) { animation-delay: .06s; }
.hlab .is-swapping .hc-spark:nth-child(5) { animation-delay: .12s; }
.hlab .is-swapping .hc-spark:nth-child(6) { animation-delay: .03s; }
.hlab .is-swapping .hc-spark:nth-child(7) { animation-delay: .08s; }
.hlab .is-swapping .hc-spark:nth-child(8) { animation-delay: .14s; }
/* rectangular prism ring / edge / scan for the rounded-rect frames (Stream, Mosaic) */
.hlab .hc-prism { position: absolute; inset: 0; z-index: 7; pointer-events: none; border-radius: inherit; opacity: 0; mix-blend-mode: screen; }
.hlab .hc-prism::before, .hlab .hc-prism::after { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 2px; background: conic-gradient(from 0deg, #22d3ee, #7c5cff, #ff4ecd, #ffb648, #22d3ee); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.hlab .hc-prism::before { transform: translate(1.6px, -.6px); }
.hlab .hc-prism::after { transform: translate(-1.6px, .6px); filter: hue-rotate(150deg); }
.hlab .is-swapping .hc-prism { will-change: opacity, filter; animation: hcPrism var(--hc-dur, 1.15s) ease-in-out both; }
.hlab .hc-edge { position: absolute; inset: 0; z-index: 5; pointer-events: none; opacity: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px var(--hc-glow, #7c5cff), inset 0 0 22px -4px var(--hc-glow, #7c5cff), inset 0 0 60px -22px var(--hc-glow, #7c5cff); }
.hlab .is-swapping .hc-edge { will-change: opacity; animation: hcEdge var(--hc-dur, 1.15s) ease-in-out both; }
.hlab .hc-scan { position: absolute; inset: 0; z-index: 4; pointer-events: none; opacity: 0; background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .06) 0 1px, transparent 1px 3px); mix-blend-mode: screen; }
.hlab .is-swapping .hc-scan { animation: hcScan var(--hc-dur, 1.15s) ease-in-out both; }

/* ============================================================
   Variant 1 — APERTURE (Living Generative Portal)
   ============================================================ */
.hlab-portal { --hl-accent: var(--violet); }
.hlab-portal .hl-portal-grid { display: grid; grid-template-columns: 44% 56%; align-items: center; gap: clamp(24px, 4vw, 64px); }
.hlab-portal .hl-copy { position: relative; z-index: 3; max-width: 560px; }
.hlab-portal .hl-h1 { margin: 22px 0 0; font-size: clamp(2.4rem, 5.2vw, 4.4rem); }

/* prompt bar */
.hl-prompt { margin-top: 26px; display: flex; align-items: center; gap: 10px; padding: 11px 11px 11px 15px; border-radius: 16px; border: 1px solid rgba(255, 255, 255, .12); background: rgba(10, 12, 24, .55); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 20px 50px -24px rgba(0, 0, 0, .7); max-width: 460px; }
.hl-prompt-star { width: 16px; height: 16px; flex-shrink: 0; fill: var(--amber); }
.hl-prompt-text { flex: 1; min-width: 0; font-size: 14.5px; color: var(--text-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hl-caret { width: 2px; height: 18px; flex-shrink: 0; background: var(--cyan); border-radius: 2px; box-shadow: 0 0 8px var(--cyan); animation: hlCaret 1s steps(1) infinite; }
@keyframes hlCaret { 50% { opacity: 0; } }
.hl-gen { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-display); font-weight: 600; font-size: 13px; color: #fff; padding: 9px 16px; border: none; border-radius: 11px; cursor: default; background: linear-gradient(120deg, var(--violet), var(--magenta)); box-shadow: 0 8px 20px -8px rgba(124, 92, 255, .8); transition: filter .2s ease, transform .2s ease; }

/* stage + portal */
.hlab-portal .hl-stage { position: relative; z-index: 2; display: flex; align-items: center; justify-content: center; }
.hl-portal { position: relative; width: min(56vh, 540px); aspect-ratio: 1; margin-inline: auto; }

.hl-aura { position: absolute; inset: -20%; z-index: 0; border-radius: 50%; opacity: .7; filter: blur(34px);
	background: radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--hl-accent) 60%, transparent) 0%, color-mix(in srgb, var(--hl-accent) 12%, transparent) 42%, transparent 66%);
	animation: hlAura 7s ease-in-out infinite; transition: opacity .5s ease; }
@keyframes hlAura { 0%, 100% { transform: scale(1); opacity: .62; } 50% { transform: scale(1.06); opacity: .82; } }

.hl-iris { position: absolute; inset: 0; z-index: 3; border-radius: 50%; overflow: hidden;
	border: 1px solid rgba(255, 255, 255, .1);
	box-shadow: 0 44px 120px -30px rgba(0, 0, 0, .85), inset 0 0 0 1px rgba(255, 255, 255, .06), inset 0 0 60px -10px rgba(0, 0, 0, .6);
	transform: translate3d(calc(var(--hl-px, 0) * 10px), calc(var(--hl-py, 0) * 10px), 0);
	transition: transform .35s ease; will-change: transform; }
.hl-iris::after { content: ""; position: absolute; inset: 0; z-index: 9; pointer-events: none; border-radius: 50%; box-shadow: inset 0 0 70px -20px rgba(0, 0, 0, .9); }
.hl-portal.is-breathing .hl-iris { animation: hlBreathe 6s ease-in-out infinite; }
@keyframes hlBreathe { 0%, 100% { scale: 1; } 50% { scale: 1.015; } }

/* rotating prism ring hugging the iris edge */
.hl-ring { position: absolute; inset: -3%; z-index: 4; pointer-events: none; border-radius: 50%; opacity: .9; mix-blend-mode: screen;
	background: conic-gradient(from var(--hl-ring-angle, 0deg), var(--cyan), var(--violet), var(--magenta), var(--amber), var(--cyan));
	-webkit-mask: radial-gradient(closest-side, transparent 69%, #000 73%, #000 90%, transparent 95%);
	        mask: radial-gradient(closest-side, transparent 69%, #000 73%, #000 90%, transparent 95%);
	animation: hlRingSpin 26s linear infinite; }
.hl-portal.is-inhaling .hl-ring { animation-duration: 6s; opacity: 1; }
.hl-portal.is-inhaling .hl-aura { opacity: 1; filter: blur(30px); }
@property --hl-ring-angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes hlRingSpin { to { --hl-ring-angle: 360deg; } }

/* light-motes that get inhaled to the core */
.hl-motes { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.hl-mote { position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px; border-radius: 50%;
	background: var(--m-color, var(--hl-accent)); box-shadow: 0 0 11px var(--m-color, var(--hl-accent)), 0 0 4px var(--m-color, var(--hl-accent)); opacity: 0;
	transform: translate(var(--mx, 0), var(--my, 0)); }
.hl-portal.is-inhaling .hl-mote { animation: hlMoteIn .95s cubic-bezier(.5, 0, .7, 1) both; animation-delay: var(--d, 0s); }
@keyframes hlMoteIn {
	0% { opacity: 0; transform: translate(var(--mx), var(--my)) scale(.6); }
	25% { opacity: 1; }
	100% { opacity: 0; transform: translate(0, 0) scale(1.4); }
}

/* docked satellite thumbnails around the iris (gentle float) */
.hl-satellites { position: absolute; inset: 0; z-index: 1; list-style: none; margin: 0; padding: 0; }
.hl-sat { position: absolute; width: 84px; height: 84px; border-radius: 16px; overflow: hidden;
	border: 1px solid rgba(255, 255, 255, .16); box-shadow: 0 18px 44px -16px rgba(0, 0, 0, .85);
	animation: hlFloat 7s ease-in-out infinite; }
.hl-sat img { width: 100%; height: 100%; object-fit: cover; }
.hl-sat:nth-child(1) { top: -3%; right: 8%; animation-delay: 0s; }
.hl-sat:nth-child(2) { bottom: 2%; left: -4%; width: 72px; height: 72px; animation-delay: -2.4s; }
.hl-sat:nth-child(3) { top: 46%; right: -6%; width: 66px; height: 66px; animation-delay: -4.6s; }
@keyframes hlFloat { 0%, 100% { transform: translateY(-6px); } 50% { transform: translateY(8px); } }
.hlab-portal.is-beat .hl-sat { filter: brightness(1.25); }
.hl-sat { transition: filter .25s ease; }

/* orchestrated heartbeat on each bloom */
.hlab-portal.is-beat .hl-grad { animation: hlGlint .35s ease-out; }
.hlab-portal.is-beat .hl-gen { filter: brightness(1.5); }
.hlab-portal.is-beat .hl-aura { opacity: 1; }
@keyframes hlGlint {
	0% { text-shadow: none; }
	40% { text-shadow: -2px 0 rgba(34, 211, 238, .8), 2px 0 rgba(255, 78, 205, .8); filter: brightness(1.4); }
	100% { text-shadow: none; }
}

/* reduced motion — static, legible, no loops */
@media (prefers-reduced-motion: reduce) {
	.hl-eyebrow-star, .hl-aura, .hl-ring, .hl-satellites, .hl-sat, .hl-caret,
	.hl-portal.is-breathing .hl-iris, .hl-portal.is-inhaling .hl-mote { animation: none !important; }
	.hl-mote { opacity: 0 !important; }
	.hl-ring { opacity: .5; }
}

/* responsive */
@media (max-width: 1023px) {
	.hlab-portal .hl-portal-grid { grid-template-columns: 1fr; gap: 40px; text-align: center; justify-items: center; }
	.hlab-portal .hl-copy { max-width: 620px; }
	.hl-prompt, .hl-cta { margin-inline: auto; }
	.hl-cta { justify-content: center; }
	.hl-portal { width: min(62vw, 420px); }
	.hl-sat { width: 64px; height: 64px; margin: -32px; }
	.hl-sat:nth-child(1) { transform: rotate(0deg) translateX(66%); }
	.hl-sat:nth-child(2) { transform: rotate(120deg) translateX(66%); }
	.hl-sat:nth-child(3) { transform: rotate(240deg) translateX(66%); }
}
@media (max-width: 560px) {
	.hlab { padding: 104px 0 72px; }
	.hl-prompt { max-width: 100%; }
	.hl-portal { width: min(78vw, 300px); }
	.hl-satellites { display: none; }
}

/* ============================================================
   Variant 2 — LATENT STREAM (words become worlds)
   ============================================================ */
.hlab-stream { --hl-hue: var(--violet); }
.hl-stream-canvas { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; pointer-events: none; }
.hlab-stream .hl-stream-grid { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(340px, 46%) 1fr; align-items: center; gap: clamp(24px, 4vw, 64px); }
.hlab-stream .hl-copy { position: relative; max-width: 560px; }
.hlab-stream .hl-copy::before { content: ""; position: absolute; inset: -20px -30px; z-index: -1; border-radius: 26px; background: radial-gradient(120% 100% at 20% 40%, rgba(5, 6, 14, .82), rgba(5, 6, 14, .3) 70%, transparent); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.hlab-stream .hl-h1 { margin: 22px 0 0; font-size: clamp(2.4rem, 5.2vw, 4.4rem); }

/* console */
.hl-console { margin-top: 26px; display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 14px; font-family: var(--font-display); font-size: 14px; border: 1px solid rgba(124, 92, 255, .3); background: rgba(10, 12, 24, .62); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .03); max-width: 480px; }
.hl-console-caret { color: var(--amber); flex-shrink: 0; }
.hl-console-line { flex: 1; min-width: 0; color: var(--text-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hl-console-tag { flex-shrink: 0; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--cyan); opacity: .85; }
.hlab-stream .hl-caret { width: 2px; height: 17px; flex-shrink: 0; background: var(--cyan); border-radius: 2px; box-shadow: 0 0 8px var(--cyan); animation: hlCaret 1s steps(1) infinite; }

/* frame */
.hl-frame { position: relative; z-index: 2; width: 100%; max-width: 440px; aspect-ratio: 4 / 5; margin-inline: auto; border-radius: 26px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .12); box-shadow: 0 50px 130px -40px var(--hl-hue), inset 0 0 0 1px rgba(255, 255, 255, .05); background: var(--bg-2, #0b0d18); }

@media (prefers-reduced-motion: reduce) {
	.hlab-stream .hl-caret { animation: none !important; }
}
@media (max-width: 1023px) {
	.hlab-stream .hl-stream-grid { grid-template-columns: 1fr; gap: 40px; text-align: center; justify-items: center; }
	.hlab-stream .hl-copy { max-width: 620px; }
	.hl-cta, .hl-console { margin-inline: auto; }
	.hl-cta { justify-content: center; }
	.hl-frame { max-width: 360px; }
}
@media (max-width: 560px) {
	.hl-console { max-width: 100%; }
	.hl-frame { max-width: 280px; }
}

/* ============================================================
   Variant 3 — LIVING MOSAIC WALL (the dreaming wall)
   ============================================================ */
.hlab-mosaic { --hc-dur: .9s; }
.hl-perspective {
	position: absolute; inset: 0; z-index: 0; overflow: hidden; perspective: 1600px;
	-webkit-mask-image: radial-gradient(135% 120% at 64% 42%, #000 50%, transparent 92%);
	        mask-image: radial-gradient(135% 120% at 64% 42%, #000 50%, transparent 92%);
}
.hl-wall {
	position: absolute; top: 50%; left: 50%; width: 130vw;
	transform: translate(-50%, -50%) rotateX(9deg) rotateY(calc(-13deg + var(--wy, 0deg))) rotateX(var(--wx, 0deg)) rotateZ(.4deg) scale(1.08);
	transform-style: preserve-3d;
	display: grid; grid-template-columns: repeat(6, 1fr); gap: clamp(8px, 1vw, 16px);
	transition: transform .3s ease;
}
.hl-tile {
	position: relative; margin: 0; aspect-ratio: 1; border-radius: 14px; overflow: hidden;
	border: 1px solid rgba(255, 255, 255, .08); background: var(--bg-2, #0b0d18);
	box-shadow: 0 20px 50px -30px rgba(0, 0, 0, .8);
}
/* fake aerial depth per row */
.hl-tile[data-row="0"] { filter: brightness(.62) saturate(.85); }
.hl-tile[data-row="1"] { filter: brightness(.74) saturate(.9); }
.hl-tile[data-row="2"] { filter: brightness(.86); }
.hl-tile[data-row="3"] { filter: brightness(.97); }
.hl-tile[data-row="4"] { filter: brightness(1.05); }

.hl-scrim {
	position: absolute; inset: 0; z-index: 1; pointer-events: none;
	background:
		linear-gradient(104deg, #05060e 0%, rgba(5, 6, 14, .88) 28%, rgba(5, 6, 14, .4) 52%, rgba(5, 6, 14, 0) 72%),
		radial-gradient(70% 90% at 24% 46%, rgba(124, 92, 255, .16), transparent 66%),
		linear-gradient(0deg, rgba(5, 6, 14, .7), transparent 24%);
}

.hlab-mosaic .hl-copy { position: relative; z-index: 2; max-width: 600px; }
.hlab-mosaic .hl-copy::before { content: ""; position: absolute; inset: -24px -34px; z-index: -1; border-radius: 28px; background: radial-gradient(120% 100% at 18% 40%, rgba(5, 6, 14, .7), transparent 72%); }
.hlab-mosaic .hl-h1 { font-size: clamp(2.3rem, 5vw, 4.2rem); }
.hlab-mosaic .hl-prompt { max-width: 440px; }

.hl-stats { margin-top: 30px; display: flex; gap: clamp(22px, 3vw, 44px); }
.hl-stat b { display: block; font-family: var(--font-display); font-size: clamp(1.4rem, 2.4vw, 2rem); font-weight: 700; color: var(--text-1); line-height: 1.1; }
.hl-stat span { font-size: 12.5px; color: var(--text-3); }

@media (prefers-reduced-motion: reduce) {
	.hlab-mosaic .hl-caret { animation: none !important; }
	.hl-wall { transform: translate(-50%, -50%) rotateX(5deg) rotateY(-8deg) scale(1.06); }
}
@media (max-width: 1023px) {
	.hl-wall { width: 150vw; grid-template-columns: repeat(5, 1fr); transform: translate(-50%, -50%) rotateX(7deg) rotateY(calc(-9deg + var(--wy, 0deg))) scale(1.06); }
	.hl-tile[data-col="5"] { display: none; }
	.hlab-mosaic .hl-copy { max-width: 560px; }
}
@media (max-width: 640px) {
	.hl-wall { width: 168vw; grid-template-columns: repeat(3, 1fr); transform: translate(-50%, -50%) rotateX(6deg) rotateY(-6deg) scale(1.04); }
	.hl-tile[data-col="3"], .hl-tile[data-col="4"], .hl-tile[data-col="5"] { display: none; }
	.hl-scrim { background: linear-gradient(0deg, #05060e 8%, rgba(5, 6, 14, .84) 42%, rgba(5, 6, 14, .5) 72%, rgba(5, 6, 14, .3)); }
	.hlab-mosaic .hl-copy { text-align: center; margin-inline: auto; }
	.hlab-mosaic .hl-prompt, .hl-stats { margin-inline: auto; }
	.hl-stats { justify-content: center; }
}

/* ============================================================
   Variant 4 — NEXUS (living wall background + centered GeniusAI reveal)
   ============================================================ */
.hlab-nexus { --hl-accent: var(--violet); --hc-dur: .85s; text-align: center; }
/* the wall is a frontal, oversized backdrop with a fixed pleasing tilt (no mouse follow) */
.hlab-nexus .hl-wall {
	width: 152vw;
	--wx: 2.2deg;
	--wy: -3.4deg;
	transform: translate(-50%, -50%) rotateX(10deg) rotateY(var(--wy, 0deg)) rotateX(var(--wx, 0deg)) scale(1.2);
}
.hlab-nexus .hl-perspective { -webkit-mask-image: radial-gradient(140% 130% at 50% 46%, #000 46%, transparent 90%); mask-image: radial-gradient(140% 130% at 50% 46%, #000 46%, transparent 90%); }

/* assemble intro: tiles fly into place once (only when JS is on, so no-JS shows them settled) */
html.js .hlab-nexus .hl-wall:not(.is-in) .hl-tile { opacity: 0; transform: translate3d(var(--fx, 0), var(--fy, 0), 0) scale(.7) rotate(var(--fr, 0deg)); }
.hlab-nexus .hl-tile { transition: opacity .8s ease, transform .9s cubic-bezier(.2, .8, .25, 1); transition-delay: calc(var(--ti, 0) * 45ms); }

/* darkening veil — light during the assemble, darkens at the burst when text appears */
.hl-nexus-veil {
	position: absolute; inset: 0; z-index: 1; pointer-events: none;
	background:
		radial-gradient(58% 62% at 50% 45%, rgba(5, 6, 14, .92), rgba(5, 6, 14, .58) 54%, rgba(5, 6, 14, .22) 78%, transparent),
		linear-gradient(0deg, rgba(5, 6, 14, .72), transparent 32%),
		rgba(5, 6, 14, .34);
	opacity: .5;
	transition: opacity .9s ease;
}
.hlab-nexus.is-burst .hl-nexus-veil { opacity: 1; }
/* soften the hero's bottom edge into the page so it never cuts off hard (the marquee
   ribbon then simply decorates this boundary). z-index 1 = above the wall, below the copy. */
.hlab-nexus::after {
	content: "";
	position: absolute;
	left: 0; right: 0; bottom: 0;
	height: 130px;
	z-index: 1;
	pointer-events: none;
	background: linear-gradient(to bottom, transparent, var(--bg-0, #05060e) 92%);
}

/* centred presentation — uses the FULL standard container width */
.hlab-nexus .hl-nexus-copy { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; }
.hlab-nexus .hl-eyebrow { }
.hl-nexus-title { margin: 6px 0 0; font-family: var(--font-display); font-weight: 700; line-height: .98; letter-spacing: -.035em; font-size: clamp(3rem, 9vw, 7rem); }
.hlab-nexus .hl-sub { max-width: 56ch; margin: 20px auto 0; font-size: clamp(1.02rem, 1.3vw, 1.22rem); }
.hlab-nexus .hl-prompt { margin: 30px auto 0; width: 100%; max-width: 520px; }
.hlab-nexus .hl-cta { margin-top: 26px; justify-content: center; }

/* brand core emblem — the portal's ring + inhaled motes, powering on */
.hl-core { position: relative; width: clamp(124px, 17vh, 172px); aspect-ratio: 1; margin: 30px auto 6px; }
.hl-core .hl-ring { inset: -4%; }
.hl-core .hl-aura { inset: -26%; }

/* the prism ring is hidden until the burst, then scales in (logo inside) */
.hlab-nexus .hl-ring { opacity: 0; transform: scale(.2); }
.hlab-nexus.is-burst .hl-ring { opacity: 1; transform: scale(1); transition: opacity .5s ease .05s, transform .8s cubic-bezier(.34, 1.56, .64, 1) .05s; }

/* the aura is dark, glows softly while the dots gather, then blazes at the burst */
.hlab-nexus .hl-aura { animation: none; opacity: 0; transition: opacity .8s ease; }
.hl-core.is-manifest .hl-aura { opacity: .5; }
.hlab-nexus.is-burst .hl-aura { opacity: 1; animation: hlAura 7s ease-in-out infinite; }

/* "проявление" — dots stream in from across the whole hero to the centre (slow) */
.hl-core.is-manifest .hl-mote { animation: hlMoteIn 1.55s cubic-bezier(.4, 0, .55, 1) both; animation-delay: var(--d, 0s); }
/* ambient backdrop — after the reveal the dots keep drifting inward forever, each desynced.
   Bigger + brighter than the initial gather dots so they read as an ambient field. */
.hl-core.is-ambient .hl-mote {
	width: 10px; height: 10px; margin: -5px;
	box-shadow: 0 0 16px var(--m-color, var(--hl-accent)), 0 0 6px var(--m-color, var(--hl-accent));
	animation: hlMoteIn var(--adur, 3.4s) linear infinite; animation-delay: var(--ad, 0s);
}
.hlab-nexus.is-anim-paused .hl-mote { animation-play-state: paused; }

/* the logo mark is born from the burst */
.hl-core-mark { position: absolute; inset: 0; z-index: 6; display: grid; place-items: center; }
.hl-core-mark svg { width: 48%; height: 48%; filter: drop-shadow(0 0 18px rgba(124, 92, 255, .7)); transition: filter .25s ease; }
html.js .hlab-nexus .hl-core-mark { opacity: 0; transform: scale(.3) rotate(-45deg); }
html.js .hlab-nexus.is-burst .hl-core-mark { opacity: 1; transform: none; transition: opacity .5s ease .14s, transform .85s cubic-bezier(.34, 1.56, .64, 1) .14s; }
/* animated emblem — ONLY the ring breathes; the logo star shifts its gradient (hue cycle),
   and the mini-star twinkles */
.hlab-nexus.is-burst .hl-core.is-breathing .hl-ring { animation: hlRingSpin 26s linear infinite, hlRingBreathe 4.5s ease-in-out infinite; }
.hlab-nexus.is-burst .hl-core.is-breathing .nexus-star { animation: hlStarHue 6s ease-in-out infinite; }
.hlab-nexus.is-burst .hl-core.is-breathing .nexus-mini { transform-box: fill-box; transform-origin: center; animation: hlMiniTwinkle 3.1s ease-in-out infinite; }
@keyframes hlRingBreathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
/* gentle hue shimmer within the brand palette (blue <-> pink), not a full off-brand rainbow */
@keyframes hlStarHue { 0%, 100% { filter: hue-rotate(-24deg); } 50% { filter: hue-rotate(30deg); } }
@keyframes hlMiniTwinkle { 0%, 100% { opacity: 1; transform: scale(1); } 45% { opacity: .35; transform: scale(.45); } }

/* "взрыв" — central flash + radiating spark burst at the moment the dots meet */
.hl-core-flash { position: absolute; inset: -45%; z-index: 4; pointer-events: none; border-radius: 50%; opacity: 0; mix-blend-mode: screen;
	background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, .95) 0%, rgba(124, 92, 255, .55) 26%, rgba(34, 211, 238, .2) 46%, transparent 64%); }
.hlab-nexus.is-burst .hl-core-flash { animation: hlBurstFlash .85s ease-out; }
@keyframes hlBurstFlash { 0% { opacity: 0; transform: scale(.2); } 24% { opacity: 1; } 100% { opacity: 0; transform: scale(1.9); } }

.hl-core-sparks { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.hl-core-spark { position: absolute; left: 50%; top: 50%; margin: -.5em 0 0 -.5em; font-family: var(--font-display); font-size: 16px; line-height: 1; font-style: normal; opacity: 0; transform: scale(0); text-shadow: 0 0 8px currentColor, 0 0 16px currentColor; }
.hlab-nexus.is-burst .hl-core-spark { animation: hlBurstSpark .95s cubic-bezier(.2, .8, .2, 1) both; animation-delay: var(--sd, 0s); }
@keyframes hlBurstSpark {
	0% { opacity: 0; transform: translate(0, 0) scale(0) rotate(0deg); }
	28% { opacity: 1; transform: translate(calc(var(--bx) * .5), calc(var(--by) * .5)) scale(1.3) rotate(40deg); }
	100% { opacity: 0; transform: translate(var(--bx), var(--by)) scale(.3) rotate(90deg); }
}

/* "GeniusAI" — per-letter materialise (blur + rise + scale, staggered cascade) */
.hl-nexus-title { perspective: 700px; position: relative; }
/* the letters gently float in a travelling wave with a light shimmer running through them
   (per-letter, so it stays clipped to the glyphs — no overlay stripe). Higher specificity than
   the reveal rule, and opacity:1 so the letters never fall back to the hidden base state. */
html.js .hlab-nexus.is-live .hl-nexus-title .hl-ch {
	opacity: 1;
	animation: hlChFloat 3.4s ease-in-out infinite, hlChGlint 5s ease-in-out infinite;
	animation-delay: calc(var(--li, 0) * .13s), calc(var(--li, 0) * .07s);
}
/* gentle continuous bob (transform/opacity only) */
@keyframes hlChFloat { 0%, 100% { transform: translateY(0); opacity: 1; } 50% { transform: translateY(-6px); opacity: 1; } }
/* a light runs across the letters once per cycle — each glyph briefly flashes bright,
   staggered by position, so the shine sweeps through "GeniusAI" (filter only, no overlay) */
@keyframes hlChGlint {
	0%, 10%, 100% { filter: brightness(1); }
	5% { filter: brightness(1.95) drop-shadow(0 0 16px rgba(210, 200, 255, .95)); }
}
html.js .hlab-nexus .hl-ch { display: inline-block; opacity: 0; will-change: transform, opacity, filter; }
html.js .hlab-nexus.is-burst .hl-ch { animation: hlChIn .7s cubic-bezier(.2, .8, .25, 1) both; animation-delay: calc(.16s + var(--li, 0) * .06s); }
@keyframes hlChIn {
	0% { opacity: 0; transform: translateY(.55em) scale(.72); filter: blur(9px); }
	55% { opacity: 1; filter: blur(0); }
	100% { opacity: 1; transform: none; filter: blur(0); }
}

/* the rest of the copy reveals after the burst; the tagline rises up after the heading */
html.js .hlab-nexus .hl-rise { opacity: 0; transform: translateY(22px); }
html.js .hlab-nexus .hl-sub.hl-rise { transform: translateY(36px); }   /* tagline floats up further */
html.js .hlab-nexus.is-burst .hl-rise { opacity: 1; transform: none; transition: opacity .8s ease, transform .9s cubic-bezier(.2, .8, .25, 1); }
.hlab-nexus.is-burst .hl-eyebrow { transition-delay: 0s; }
.hlab-nexus.is-burst .hl-sub { transition-delay: .66s; }
.hlab-nexus.is-burst .hl-prompt { transition-delay: .86s; }
.hlab-nexus.is-burst .hl-cta { transition-delay: 1s; }

/* heartbeat on each generation pulse */
.hlab-nexus.is-beat .hl-grad { animation: hlGlint .35s ease-out; }
.hlab-nexus.is-beat .hl-core-mark svg { filter: drop-shadow(0 0 28px rgba(124, 92, 255, 1)) brightness(1.3); }
.hlab-nexus.is-beat .hl-aura { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
	html.js .hlab-nexus .hl-wall:not(.is-in) .hl-tile { opacity: 1; transform: none; }
	.hlab-nexus .hl-tile { transition: none; }
	html.js .hlab-nexus .hl-rise { opacity: 1; transform: none; }
	.hlab-nexus.is-burst .hl-rise { transition: none; }
	html.js .hlab-nexus .hl-core-mark { opacity: 1; transform: none; }
	html.js .hlab-nexus .hl-ring { opacity: .5; transform: none; }
	html.js .hlab-nexus .hl-ch { opacity: 1 !important; }
	html.js .hlab-nexus .hl-aura { opacity: .45; }
	.hlab-nexus .hl-caret, .hl-core-flash, .hl-core-spark, .hl-ch, .hl-core.is-manifest .hl-mote, .hl-core.is-ambient .hl-mote { animation: none !important; }
	.hl-core.is-breathing .hl-ring, .hl-core.is-breathing .nexus-star, .hl-core.is-breathing .nexus-mini, .hlab-nexus.is-live .hl-nexus-title .hl-ch { animation: none !important; }
	.hl-core-flash, .hl-core-spark, .hl-mote { opacity: 0 !important; }
}
@media (max-width: 640px) {
	.hlab-nexus .hl-wall { width: 200vw; transform: translate(-50%, -50%) rotateX(8deg) scale(1.15); }
	.hl-nexus-veil { background: radial-gradient(80% 60% at 50% 42%, rgba(5, 6, 14, .9), rgba(5, 6, 14, .6) 60%, rgba(5, 6, 14, .35)), rgba(5, 6, 14, .4); }
	.hlab-nexus .hl-prompt { max-width: 100%; }
	.hl-core { margin-top: 18px; }
}
