/* Visual components for the marketing pages: flowcharts, frames, heatmaps, marquee, icon clusters,
   pinned horizontal panels. Animated by assets/js/motion.js (GSAP); everything is readable without it. */

/* ------------------------------------------------------------ split headlines (masked words) */
[data-split] .word-mask,
[data-split] > div {
	overflow: hidden;
	padding-bottom: 0.06em;
	margin-bottom: -0.06em;
}

/* ------------------------------------------------------------ framed panel (corner brackets) */
.frame {
	position: relative;
	padding: 34px;
}

.frame::before,
.frame::after,
.frame > .fc::before,
.frame > .fc::after {
	content: '';
	position: absolute;
	width: 18px;
	height: 18px;
	border-color: rgba(255, 255, 255, 0.45);
	border-style: solid;
	pointer-events: none;
}

.frame::before {
	top: 0;
	left: 0;
	border-width: 1px 0 0 1px;
}

.frame::after {
	top: 0;
	right: 0;
	border-width: 1px 1px 0 0;
}

.frame > .fc::before {
	bottom: 0;
	left: 0;
	border-width: 0 0 1px 1px;
}

.frame > .fc::after {
	bottom: 0;
	right: 0;
	border-width: 0 1px 1px 0;
}

.meta-strip {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 28px;
	font-family: var(--mono);
	font-size: 11.5px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--muted);
}

.meta-strip b {
	color: var(--text);
	font-weight: 400;
}

.meta-strip .on {
	color: var(--green);
}

/* ------------------------------------------------------------ backed-by badge */
.backed {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	padding: 8px 16px 8px 8px;
	border: 1px solid var(--line);
	border-radius: 999px;
	font-size: 13.5px;
	color: var(--muted);
	transition: border-color 0.2s, color 0.2s;
}

.backed:hover {
	border-color: var(--line-2);
	color: var(--text);
}

.backed .pm {
	display: inline-grid;
	place-items: center;
	height: 26px;
	padding: 0 10px;
	border-radius: 999px;
	background: var(--text);
	color: #0a0a0a;
	font-weight: 700;
	font-size: 12px;
	letter-spacing: 0.02em;
}

.backed b {
	color: var(--text);
	font-weight: 600;
}

/* ------------------------------------------------------------ marquee */
.marquee {
	position: relative;
	overflow: hidden;
	border-block: 1px solid var(--line);
	padding: 22px 0;
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
	mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.marquee .track {
	display: flex;
	gap: 56px;
	width: max-content;
	animation: marquee 38s linear infinite;
}

.marquee:hover .track {
	animation-play-state: paused;
}

.marquee .it {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	font-family: var(--mono);
	font-size: 13px;
	letter-spacing: 0.06em;
	color: var(--muted);
	white-space: nowrap;
}

.marquee .it img,
.brand-ico {
	width: 20px;
	height: 20px;
	filter: invert(1);
	opacity: 0.85;
}

@keyframes marquee {
	to {
		transform: translateX(-50%);
	}
}

/* ------------------------------------------------------------ flowchart */
.flow {
	position: relative;
	display: grid;
	gap: 56px 40px;
	align-items: center;
	padding: 10px 0;
}

.flow > svg.edges {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	overflow: visible;
	pointer-events: none;
	z-index: 0;
}

.flow .edge-base {
	fill: none;
	stroke: rgba(255, 255, 255, 0.16);
	stroke-width: 1.2;
	stroke-dasharray: 4 6;
}

.flow .edge-live {
	fill: none;
	stroke: rgba(255, 255, 255, 0.75);
	stroke-width: 1.4;
}

.flow .packet {
	fill: var(--text);
}

.flow .packet.g {
	fill: var(--green);
}

.node {
	position: relative;
	z-index: 1;
	padding: 16px 18px;
	border: 1px solid var(--line);
	border-radius: 16px;
	background: linear-gradient(180deg, #121212, #0b0b0b);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 20px 40px rgba(0, 0, 0, 0.45);
	display: grid;
	gap: 8px;
	min-width: 0;
}

.node .nh {
	display: flex;
	align-items: center;
	gap: 10px;
	font-weight: 600;
	font-size: 15px;
	letter-spacing: -0.01em;
}

.node .nh .tile {
	width: 32px;
	height: 32px;
	border-radius: 9px;
	font-size: 11px;
	flex: none;
}

.node .nh .tile svg,
.node .nh .tile img {
	width: 16px;
	height: 16px;
}

.node p {
	margin: 0;
	font-size: 13px;
	color: var(--muted);
}

.node .row-tags {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
}

.node.hub {
	border-color: rgba(255, 255, 255, 0.4);
	background: linear-gradient(180deg, #1a1a1a, #0d0d0d);
}

.node.dashed {
	border-style: dashed;
	background: transparent;
	box-shadow: none;
}

.node.tilted {
	transform: rotate(-4deg);
}

/* common flow layouts */
.flow.lr-6 {
	grid-template-columns: repeat(6, 1fr);
}

.flow.fan {
	grid-template-columns: 1fr 0.9fr 1fr;
	grid-auto-rows: auto;
	grid-auto-flow: row dense;
}

.flow.fan .src {
	grid-column: 1;
}

.flow.fan .mid {
	grid-column: 2;
	grid-row: 1 / span 5;
}

.flow.fan .dst {
	grid-column: 3;
}

@media (max-width: 1000px) {
	.flow.lr-6 {
		grid-template-columns: 1fr 1fr;
		gap: 44px 28px;
	}
}

@media (max-width: 720px) {
	.flow.lr-6,
	.flow.fan {
		grid-template-columns: 1fr;
		gap: 34px;
	}
	.flow.fan .src,
	.flow.fan .mid,
	.flow.fan .dst {
		grid-column: 1;
		grid-row: auto;
	}
	.node.tilted {
		transform: none;
	}
}

/* ------------------------------------------------------------ heatmap (contribution grid) */
.heat {
	display: grid;
	gap: 4px;
}

.heat i {
	aspect-ratio: 1;
	border-radius: 2.5px;
	background: #1b1b1b;
}

/* ------------------------------------------------------------ feature tiles (Raycast-style) */
.tiles-2 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}

@media (max-width: 860px) {
	.tiles-2 {
		grid-template-columns: 1fr;
	}
}

.ftile {
	position: relative;
	overflow: hidden;
	padding: 26px;
	min-height: 330px;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	gap: 14px;
	border: 1px solid var(--line);
	border-radius: var(--r);
	background: radial-gradient(ellipse 80% 60% at 50% 30%, #121212, #090909 70%);
}

.ftile .art {
	position: absolute;
	inset: 0 0 92px;
	display: grid;
	place-items: center;
}

.ftile p {
	margin: 0;
	position: relative;
	font-size: 14.5px;
	color: var(--muted);
	max-width: 440px;
}

.ftile p b {
	color: var(--text);
	font-weight: 600;
}

/* window outlines stack ("hello world") */
.stackwin {
	position: relative;
	width: 260px;
	height: 150px;
}

.stackwin i {
	position: absolute;
	inset: 0;
	border: 1px solid rgba(255, 255, 255, 0.28);
	border-radius: 8px;
	background: rgba(8, 8, 8, 0.9);
}

.stackwin span {
	position: absolute;
	left: 16px;
	bottom: 14px;
	font-family: var(--mono);
	font-size: 12px;
	color: var(--text);
}

/* sync diagram */
.syncart {
	display: grid;
	grid-template-columns: auto 90px auto;
	align-items: center;
	gap: 0;
}

.mini-win {
	width: 120px;
	border: 1px solid rgba(255, 255, 255, 0.25);
	border-radius: 8px;
	padding: 10px;
	display: grid;
	gap: 5px;
	background: #0b0b0b;
}

.mini-win i {
	height: 6px;
	border-radius: 2px;
	background: #2a2a2a;
}

.mini-win i.on {
	background: var(--text);
}

/* ------------------------------------------------------------ icon clusters */
.cluster {
	position: relative;
	height: 420px;
}

.mtile {
	position: absolute;
	display: grid;
	place-items: center;
	width: 120px;
	height: 120px;
	border-radius: 30px;
	background: linear-gradient(150deg, #2b2b2b 0%, #121212 45%, #070707 100%);
	box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.14), inset 0 -6px 14px rgba(0, 0, 0, 0.7), 0 30px 60px rgba(0, 0, 0, 0.65);
	color: #d9d9d6;
}

.mtile svg,
.mtile img {
	width: 46px;
	height: 46px;
}

.mtile::after {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: inherit;
	background: url('../img/grain.png');
	opacity: 0.16;
	mix-blend-mode: screen;
}

.gtile {
	position: absolute;
	display: grid;
	place-items: center;
	border-radius: 40px;
	background: linear-gradient(140deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.04) 55%, rgba(255, 255, 255, 0.12));
	border: 1.5px solid rgba(255, 255, 255, 0.35);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 30px 70px rgba(0, 0, 0, 0.55);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	color: #f0f0ee;
	font-family: var(--mono);
	font-weight: 600;
}

/* ------------------------------------------------------------ pinned horizontal panels */
.hscroll {
	overflow: hidden;
}

.hscroll .rail {
	display: flex;
	gap: 18px;
	width: max-content;
	padding: 0 max(24px, calc((100vw - 1200px) / 2));
}

.hpanel {
	width: min(560px, 82vw);
	min-height: 440px;
	padding: 30px;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.hpanel h3 {
	margin: 0;
	font-size: 26px;
	font-weight: 600;
	letter-spacing: -0.035em;
}

.hpanel p {
	margin: 0;
	color: var(--muted);
}

.hpanel .viz {
	margin-top: auto;
}

@media (max-width: 860px) {
	.hscroll .rail {
		width: auto;
		flex-direction: column;
	}
	.hpanel {
		width: 100%;
		min-height: 0;
	}
}

/* ------------------------------------------------------------ deploy log / typed terminal */
.typed-log {
	min-height: 260px;
	white-space: pre-wrap;
	font-size: 13px;
}

.typed-log .ok {
	color: var(--green);
}

.typed-log .dim {
	color: var(--dim);
}

/* ------------------------------------------------------------ counters */
.counters {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	border: 1px solid var(--line);
	border-radius: var(--r);
	overflow: hidden;
}

.counters > div {
	padding: 26px 24px;
	border-left: 1px solid var(--line);
	display: grid;
	gap: 8px;
}

.counters > div:first-child {
	border-left: 0;
}

.counters .n {
	font-size: clamp(34px, 4vw, 52px);
	font-weight: 600;
	letter-spacing: -0.05em;
	line-height: 1;
}

@media (max-width: 760px) {
	.counters {
		grid-template-columns: 1fr 1fr;
	}
	.counters > div:nth-child(3) {
		border-left: 0;
	}
	.counters > div:nth-child(n + 3) {
		border-top: 1px solid var(--line);
	}
}

/* ------------------------------------------------------------ provider cards */
.providers {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	gap: 12px;
}

.provider {
	padding: 22px;
	display: grid;
	gap: 14px;
	align-content: start;
}

.provider .ph {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.provider h3 {
	margin: 0;
	font-size: 18px;
	font-weight: 600;
	letter-spacing: -0.02em;
}

.provider p {
	margin: 0;
	font-size: 14px;
	color: var(--muted);
}

/* timeline */
.timeline {
	position: relative;
	display: grid;
	gap: 28px;
	padding-left: 34px;
}

.timeline::before {
	content: '';
	position: absolute;
	left: 6px;
	top: 6px;
	bottom: 6px;
	width: 1px;
	background: var(--line-2);
}

.timeline .ev {
	position: relative;
	display: grid;
	gap: 6px;
}

.timeline .ev::before {
	content: '';
	position: absolute;
	left: -32px;
	top: 6px;
	width: 11px;
	height: 11px;
	border-radius: 3px;
	background: var(--bg);
	border: 1px solid var(--text);
}

.timeline .ev.now::before {
	background: var(--green);
	border-color: var(--green);
}

.timeline h3 {
	margin: 0;
	font-size: 18px;
	font-weight: 600;
	letter-spacing: -0.02em;
}

.timeline p {
	margin: 0;
	color: var(--muted);
	max-width: 680px;
}

/* ------------------------------------------------------------ inner page hero */
.page-hero {
	position: relative;
	padding: 110px 0 80px;
	overflow: hidden;
}

.page-hero .wrap {
	display: grid;
	gap: 24px;
	position: relative;
}

.page-hero .h-hero {
	font-size: clamp(44px, 6.4vw, 88px);
	max-width: 980px;
}

.page-hero::before {
	content: '';
	position: absolute;
	inset: 0;
	background: radial-gradient(ellipse 55% 70% at 72% 20%, rgba(255, 255, 255, 0.035), transparent 72%);
	pointer-events: none;
}

.two {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}

.three {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 14px;
}

@media (max-width: 900px) {
	.two,
	.three {
		grid-template-columns: 1fr;
	}
}

.quest {
	padding: 30px;
	display: grid;
	gap: 18px;
	min-height: 300px;
	align-content: start;
}

.quest h3 {
	margin: 0;
	font-size: 24px;
	font-weight: 600;
	letter-spacing: -0.03em;
}

.quest p {
	margin: 0;
	color: var(--muted);
	font-size: 14.5px;
}

.pixels {
	display: grid;
	grid-template-columns: repeat(24, 1fr);
	gap: 3px;
}

.pixels i {
	aspect-ratio: 1;
	background: #1d1d1d;
}

.status-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 18px 4px;
	border-top: 1px solid var(--line);
}

.status-row:first-child {
	border-top: 0;
}

@media (max-width: 720px) {
	.flow[style*='grid-template-columns'] {
		grid-template-columns: 1fr !important;
	}
	.flow > [style*='grid-column'] {
		grid-column: auto !important;
	}
}
