/* ==========================================================================
   Arjun Sivasankar, arjun-sivasankar.github.io
   Dark paper, Schibsted Grotesk, one amber signal. No frameworks.
   The signal colour means one thing on this page: data moving.
   ========================================================================== */

@font-face {
	font-family: "Schibsted Grotesk";
	src: url("/assets/fonts/SchibstedGrotesk.ttf") format("truetype");
	font-weight: 400 900;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Schibsted Grotesk";
	src: url("/assets/fonts/SchibstedGrotesk-Italic.ttf") format("truetype");
	font-weight: 400 900;
	font-style: italic;
	font-display: swap;
}

:root {
	--paper: #0a0908;
	--surface: #12110f;
	--raise: #1a1815;
	--ink: #f4f2ed;
	--muted: rgba(244, 242, 237, 0.68);
	--soft: rgba(244, 242, 237, 0.56);
	--line: rgba(244, 242, 237, 0.16);
	--line-soft: rgba(244, 242, 237, 0.08);
	--amber: #e79b3c;
	--amber-wash: rgba(231, 155, 60, 0.12);
	--slate: #3c4749;
	--slate-deep: #15191a;

	--shell: 1200px;
	--gutter: clamp(1.25rem, 4vw, 3.5rem);
	--ease: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 1700px) {
	:root { --shell: 1420px; }
}

*, *::before, *::after { box-sizing: border-box; }

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: 6rem;
}

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: "Schibsted Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
	font-size: 1.05rem;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

body.intro-running { overflow: hidden; }

img, video { display: block; max-width: 100%; }
p { margin: 0 0 1rem; }
ol, ul, dl, dd { margin: 0; padding: 0; list-style: none; }
a { color: inherit; }
main:focus { outline: none; }

:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 4px; }

.skip {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 100;
	padding: 0.6rem 1rem;
	background: var(--ink);
	color: var(--paper);
	font-size: 0.85rem;
}
.skip:focus { left: 1rem; top: 1rem; }

.shell {
	width: 100%;
	max-width: var(--shell);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

/* ---------------------------------------------------------------- type */

h1 {
	margin: 0;
	font-size: clamp(2.5rem, 5.4vw, 4.5rem);
	font-weight: 500;
	line-height: 1.02;
	letter-spacing: -0.035em;
	text-wrap: balance;
}

h1 em { font-style: italic; font-weight: 400; }

h2 {
	margin: 0;
	font-size: clamp(1.8rem, 3.4vw, 2.9rem);
	font-weight: 500;
	line-height: 1.1;
	letter-spacing: -0.03em;
	max-width: 22ch;
	text-wrap: balance;
}

h3 {
	margin: 0;
	font-size: 1.08rem;
	font-weight: 600;
	line-height: 1.35;
	letter-spacing: -0.01em;
}

.label {
	margin: 0 0 1.1rem;
	font-size: 0.88rem;
	font-weight: 600;
	color: var(--amber);
}

.prose {
	max-width: 60ch;
	margin: 0;
	color: var(--muted);
	font-size: 1.04rem;
}

.lede {
	max-width: 46ch;
	margin: 1.6rem 0 0;
	font-size: clamp(1.02rem, 1.3vw, 1.14rem);
	color: var(--muted);
}

.dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--amber);
	flex: none;
}

/* ---------------------------------------------------------------- nav */

.nav {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(10, 9, 8, 0.82);
	-webkit-backdrop-filter: blur(12px) saturate(140%);
	backdrop-filter: blur(12px) saturate(140%);
	border-bottom: 1px solid var(--line-soft);
}

.nav-inner {
	display: flex;
	align-items: center;
	gap: 2rem;
	height: 4.5rem;
}

.brand {
	display: flex;
	align-items: center;
	gap: 0.7rem;
	text-decoration: none;
	flex: none;
}

.brand-mark {
	display: grid;
	place-items: center;
	width: 34px;
	height: 34px;
	border-radius: 10px;
	background: var(--ink);
	color: var(--paper);
	font-size: 0.72rem;
	font-weight: 700;
}

.brand-text {
	display: flex;
	flex-direction: column;
	margin: 0;
	font-size: 0.95rem;
	font-weight: 600;
	line-height: 1.15;
	letter-spacing: -0.01em;
}

.brand-text small {
	margin-top: 0.2rem;
	font-size: 0.74rem;
	font-weight: 400;
	letter-spacing: 0;
	color: var(--soft);
}

.nav-links {
	display: flex;
	gap: 1.6rem;
	margin-left: auto;
	font-size: 0.9rem;
}

.nav-links a {
	position: relative;
	padding-block: 0.3rem;
	text-decoration: none;
	color: var(--muted);
	transition: color 0.2s var(--ease);
}
.nav-links a:hover { color: var(--ink); }

.nav-links a::after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: -0.35rem;
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background: var(--amber);
	transform: translateX(-50%) scale(0);
	transition: transform 0.3s var(--ease);
}
.nav-links a.is-current { color: var(--ink); }
.nav-links a.is-current::after { transform: translateX(-50%) scale(1); }

.btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.8rem 1.35rem;
	border-radius: 999px;
	font-size: 0.9rem;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
	transition: transform 0.2s var(--ease), background-color 0.2s var(--ease);
}

.btn-light { background: var(--ink); color: var(--paper); }
.btn-light:hover { transform: translateY(-1px); background: #fff; }

.btn-line { border: 1px solid var(--line); color: var(--ink); }
.btn-line:hover { transform: translateY(-1px); border-color: var(--ink); }

.link-arrow {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	font-size: 0.95rem;
	font-weight: 500;
	text-decoration: none;
	color: var(--ink);
}
.link-arrow span { transition: transform 0.25s var(--ease); }
.link-arrow:hover span { transform: translateY(2px); }
.link-arrow[href^="http"]:hover span { transform: translate(2px, -2px); }

@media (max-width: 880px) {
	.nav-inner { height: auto; flex-wrap: wrap; padding-block: 0.7rem; gap: 0.6rem 1rem; }
	.nav .btn { margin-left: auto; padding: 0.68rem 1.1rem; font-size: 0.86rem; }
	.nav-links { order: 3; width: 100%; gap: 1.1rem; margin: 0; font-size: 0.84rem; overflow-x: auto; scrollbar-width: none; }
	.nav-links a::after { bottom: -0.1rem; }
	.brand-text small { display: none; }
}

/* ---------------------------------------------------------------- hero */

.hero {
	position: relative;
	overflow: hidden;
	padding-block: clamp(3rem, 6vw, 6rem) clamp(3.5rem, 7vw, 7rem);
	background: var(--paper);
}

/* the backdrop is the studio grey of the portrait itself (sampled: rgb 58 67 70),
   so the clip's feathered edge dissolves into the same colour and never shows a box */
.hero::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	background:
		radial-gradient(42% 70% at 70% 52%, rgba(58, 67, 70, 0.62) 0%, rgba(44, 51, 54, 0.38) 45%, rgba(10, 9, 8, 0) 100%);
}

/* a scrim so the headline keeps its contrast */
.hero::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	background: linear-gradient(90deg,
		var(--paper) 0%, rgba(10, 9, 8, 0.95) 24%, rgba(10, 9, 8, 0.7) 42%,
		rgba(10, 9, 8, 0.3) 58%, rgba(10, 9, 8, 0) 78%);
}

.hero-grid {
	position: relative;
	z-index: 2;
	display: grid;
	grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
	gap: clamp(2rem, 5vw, 5rem);
	align-items: center;
}

.hero-tag {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	margin: 0 0 1.4rem;
	font-size: 0.88rem;
	font-weight: 600;
	color: var(--muted);
}

.hero-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1.5rem;
	margin-top: 2rem;
}

.trust {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem 0;
	margin: 2.4rem 0 0;
	font-size: 0.82rem;
	color: var(--soft);
}
.trust li { display: inline-flex; align-items: center; }
.trust li + li::before {
	content: "";
	width: 1px;
	height: 11px;
	margin-inline: 0.8rem;
	background: var(--line);
}

/* on narrow screens the items wrap, so spacing replaces the separators */
@media (max-width: 600px) {
	.trust { gap: 0.35rem 1.1rem; }
	.trust li + li::before { display: none; }
}

.hero-media {
	position: relative;
	isolation: isolate;
	justify-self: end;
	width: min(100%, 33rem);
}

/* a halo of the studio grey just behind the clip, wider than it */
.hero-media::before {
	content: "";
	position: absolute;
	inset: -12% -30%;
	z-index: -1;
	pointer-events: none;
	background: radial-gradient(closest-side,
		rgb(64, 73, 76) 0%, rgb(58, 67, 70) 50%, rgba(52, 60, 63, 0.88) 64%,
		rgba(38, 44, 46, 0.5) 80%, rgba(20, 22, 22, 0.18) 91%, rgba(10, 9, 8, 0) 100%);
}

.hero-media video {
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	object-position: 50% 12%;
	filter: saturate(0.95) contrast(1.01);
	-webkit-mask-image:
		linear-gradient(90deg, transparent 0, #000 16%, #000 88%, transparent 100%),
		linear-gradient(180deg, transparent 0, #000 12%, #000 84%, transparent 100%);
	-webkit-mask-composite: source-in;
	mask-image:
		linear-gradient(90deg, transparent 0, #000 16%, #000 88%, transparent 100%),
		linear-gradient(180deg, transparent 0, #000 12%, #000 84%, transparent 100%);
	mask-composite: intersect;
}

.hero.no-video .hero-media video { visibility: hidden; }

@media (min-width: 1700px) {
	h1 { font-size: clamp(4rem, 4.4vw, 5.2rem); }
	.hero { padding-block: 7rem 8rem; }
	.hero-grid { gap: 4rem; }
	.hero-media { width: min(100%, 38rem); }
}

@media (max-width: 900px) {
	.hero-grid { grid-template-columns: 1fr; }
	.hero-media { justify-self: start; width: min(100%, 24rem); }
	.hero::before { background: radial-gradient(80% 45% at 40% 78%, rgba(58, 67, 70, 0.5) 0%, rgba(10, 9, 8, 0) 100%); }
}

/* stalled video: never leave a frozen frame without a way out */
.reel-play-btn {
	position: absolute;
	left: 50%;
	top: 50%;
	z-index: 6;
	transform: translate(-50%, -50%);
	padding: 0.7rem 1.3rem;
	border: 1px solid rgba(244, 242, 237, 0.5);
	border-radius: 999px;
	background: rgba(10, 9, 8, 0.6);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	color: var(--ink);
	font: 600 0.85rem/1 inherit;
	font-family: inherit;
	cursor: pointer;
}

/* ---------------------------------------------------------------- sections */

.section {
	padding-block: clamp(4rem, 8vw, 7rem);
	border-top: 1px solid var(--line-soft);
}

@media (min-width: 1700px) {
	.section { padding-block: 8rem; }
	.prose { max-width: 66ch; font-size: 1.12rem; }
}

.section--statement { background: var(--surface); }

.section-head { margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head .prose { margin-top: 1.2rem; }

/* heading on the left, content on the right */
.split {
	display: grid;
	grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
	gap: clamp(2rem, 6vw, 6rem);
	align-items: start;
}

.section--statement .split { align-items: end; }

.statement {
	max-width: 20ch;
	font-size: clamp(1.7rem, 3.2vw, 2.6rem);
}

.split--head .section-head { margin-bottom: 0; }

@media (min-width: 901px) {
	.section-head--sticky { position: sticky; top: 7rem; }
}

@media (max-width: 900px) {
	.split { grid-template-columns: 1fr; gap: 1.6rem; }
	.split--head { gap: 2.5rem; }
}

/* ---------------------------------------------------------------- case studies */

.case {
	display: grid;
	grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
	gap: clamp(2rem, 5vw, 4.5rem);
	align-items: center;
	padding-block: clamp(2.5rem, 5vw, 4rem);
	border-top: 1px solid var(--line-soft);
}

.case-meta {
	margin: 0 0 0.7rem;
	font-size: 0.86rem;
	color: var(--soft);
}

.case h3 {
	font-size: clamp(1.35rem, 2.1vw, 1.7rem);
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: -0.02em;
	text-wrap: balance;
}

.case-copy > p:not(.case-meta) {
	margin: 1rem 0 0;
	color: var(--muted);
	max-width: 56ch;
}

.case-points {
	display: grid;
	gap: 0.6rem;
	margin: 1.3rem 0 0;
	font-size: 0.95rem;
	color: var(--muted);
	max-width: 56ch;
}

.case-points li {
	position: relative;
	padding-left: 1.2rem;
}

.case-points li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.72em;
	width: 6px;
	height: 1px;
	background: var(--amber);
}

.case .tags { margin-top: 1.4rem; }
.case .link-arrow { margin-top: 1.4rem; }

.tags {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
}

.tags li {
	padding: 0.28rem 0.7rem;
	border: 1px solid var(--line);
	border-radius: 999px;
	font-size: 0.78rem;
	line-height: 1.4;
	color: var(--muted);
}

@media (max-width: 960px) {
	.case { grid-template-columns: 1fr; }
}

/* on phones the diagram gets the full width and slightly larger labels */
@media (max-width: 600px) {
	.case .sys { margin-inline: calc(var(--gutter) * -0.6); padding: 0.7rem 0.5rem 1rem; border-radius: 18px; }
	.case .sys-caption { padding-inline: 0.5rem; }
	.case .node text { font-size: 14px; }
	.case .sys-row, .case .sys-note, .case .bar-label, .case .bar-value { font-size: 13px; }
}

/* ---------------------------------------------------------------- system diagrams */

.sys {
	margin: 0;
	padding: clamp(1rem, 2.4vw, 1.6rem);
	border: 1px solid var(--line-soft);
	border-radius: 22px;
	background:
		radial-gradient(120% 90% at 70% 0%, rgba(60, 71, 73, 0.32), transparent 60%),
		var(--surface);
}

.sys svg {
	display: block;
	width: 100%;
	height: auto;
	overflow: visible;
	font-family: inherit;
}

.sys-path {
	fill: none;
	stroke: rgba(244, 242, 237, 0.2);
	stroke-width: 1.5;
	stroke-dasharray: 3 7;
	stroke-linecap: round;
}

.sys.is-live .sys-path { animation: flow 1.6s linear infinite; }

@keyframes flow { to { stroke-dashoffset: -20; } }

.node rect {
	fill: var(--slate-deep);
	stroke: var(--slate);
	stroke-width: 1.2;
	transition: fill 0.35s var(--ease), stroke 0.35s var(--ease);
}

.node text {
	fill: var(--muted);
	font-size: 13px;
	font-weight: 500;
	text-anchor: middle;
	transition: fill 0.35s var(--ease);
}

.node--guard rect { stroke-dasharray: 4 3; }

.node.on rect { fill: rgba(231, 155, 60, 0.14); stroke: var(--amber); stroke-dasharray: none; }
.node.on text { fill: var(--ink); }

.packet { fill: var(--amber); opacity: 0; }
.packet-glow { fill: var(--amber); opacity: 0; }
.sys.is-live .packet { opacity: 1; }
.sys.is-live .packet-glow { opacity: 0.22; }

.sys-note {
	fill: var(--soft);
	font-size: 12px;
	text-anchor: middle;
}

.sys-row {
	fill: var(--soft);
	font-size: 11.5px;
	font-weight: 500;
}
.sys-row--mid { text-anchor: middle; }

.sys-zone {
	fill: none;
	stroke: var(--line);
	stroke-dasharray: 5 6;
}

.sys-bracket { fill: none; stroke: var(--amber); stroke-opacity: 0.6; }

.sys-metric {
	fill: var(--amber);
	font-size: 13px;
	font-weight: 600;
	text-anchor: middle;
}

.wave rect {
	fill: var(--amber);
	opacity: 0.85;
	transform-box: fill-box;
	transform-origin: center;
}
.sys.is-live .wave rect { animation: talk 1.1s var(--ease) infinite alternate; }
.wave rect:nth-child(2n) { animation-delay: -0.35s; }
.wave rect:nth-child(3n) { animation-delay: -0.7s; }
.wave rect:nth-child(4n) { animation-delay: -0.15s; }

@keyframes talk {
	from { transform: scaleY(0.35); }
	to { transform: scaleY(1); }
}

/* a side resource (MCP tools) that lights up while the agents are working */
.sys-link { fill: none; stroke: var(--line); stroke-dasharray: 2 4; transition: stroke 0.35s var(--ease); }
.tool rect { fill: var(--slate-deep); stroke: var(--line); transition: fill 0.35s var(--ease), stroke 0.35s var(--ease); }
.tool text { fill: var(--soft); font-size: 12px; font-weight: 500; text-anchor: middle; transition: fill 0.35s var(--ease); }
.sys:has(.node--agents.on) .sys-link { stroke: var(--amber); }
.sys:has(.node--agents.on) .tool rect { fill: rgba(231, 155, 60, 0.1); stroke: var(--amber); }
.sys:has(.node--agents.on) .tool text { fill: var(--ink); }

.graph line { stroke: var(--line); stroke-width: 1.2; transition: stroke 0.35s var(--ease); }
.graph circle { fill: var(--slate); transition: fill 0.35s var(--ease); }
.sys:has(.node--graph.on) .graph .hop { stroke: var(--amber); stroke-width: 1.8; }
.sys:has(.node--graph.on) .graph circle { fill: #8a7a62; }

.bar-track { fill: rgba(244, 242, 237, 0.05); }
.bar {
	fill: var(--slate);
	transform-box: fill-box;
	transform-origin: left center;
	transform: scaleX(0);
	transition: transform 1.4s var(--ease);
}
.bar--hot { fill: var(--amber); transition-delay: 0.25s; }
.sys.is-seen .bar { transform: scaleX(1); }

.bar-label { fill: var(--muted); font-size: 12px; }
.bar-value { fill: var(--muted); font-size: 12px; font-weight: 600; }
.bar-value--hot { fill: var(--amber); }

.sys-caption {
	display: flex;
	align-items: flex-start;
	gap: 0.65rem;
	min-height: 3.2em;
	margin-top: 1rem;
	padding-top: 0.9rem;
	border-top: 1px solid var(--line-soft);
	font-size: 0.9rem;
	line-height: 1.5;
	color: var(--muted);
}

.live {
	flex: none;
	width: 7px;
	height: 7px;
	margin-top: 0.5em;
	border-radius: 50%;
	background: var(--soft);
}
.sys.is-live .live { background: var(--amber); animation: blink 1.6s ease-in-out infinite; }

@keyframes blink { 50% { opacity: 0.3; } }

/* ---------------------------------------------------------------- also shipped */

.shipped {
	padding-top: clamp(2.5rem, 5vw, 4rem);
	border-top: 1px solid var(--line-soft);
}

.shipped-title {
	margin-bottom: 1.6rem;
	font-size: clamp(1.35rem, 2.1vw, 1.7rem);
	font-weight: 500;
	letter-spacing: -0.02em;
}

.shipped-list {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
	gap: 1.8rem 2.5rem;
}

.shipped-list div { padding-top: 1rem; border-top: 1px solid var(--line-soft); }
.shipped-list dt { font-weight: 600; }
.shipped-list dt span { margin-left: 0.4rem; font-size: 0.8rem; font-weight: 400; color: var(--soft); }
.shipped-list dd { margin-top: 0.4rem; font-size: 0.92rem; color: var(--muted); }

/* ---------------------------------------------------------------- timeline */

.timeline {
	position: relative;
	display: grid;
	gap: 2.4rem;
	padding-left: 2rem;
}

.timeline::before,
.timeline::after {
	content: "";
	position: absolute;
	left: 4px;
	top: 0.5rem;
	bottom: 0.5rem;
	width: 1px;
	background: var(--line);
}

/* the rail fills in amber as you read down it */
.timeline::after {
	background: var(--amber);
	transform-origin: top;
	transform: scaleY(var(--progress, 1));
}

.timeline li { position: relative; }

.timeline li::before {
	content: "";
	position: absolute;
	left: calc(-2rem + 0.5px);
	top: 0.45rem;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--paper);
	border: 1px solid var(--line);
	transition: background-color 0.4s var(--ease), border-color 0.4s var(--ease);
}
.timeline li.is-past::before { background: var(--amber); border-color: var(--amber); }

.when {
	margin: 0 0 0.35rem;
	font-size: 0.84rem;
	font-variant-numeric: tabular-nums;
	color: var(--soft);
}

.timeline h3 span,
.record h3 span {
	display: block;
	margin-top: 0.15rem;
	font-size: 0.92rem;
	font-weight: 400;
	color: var(--soft);
}

.timeline li > p:last-child {
	margin: 0.6rem 0 0;
	font-size: 0.95rem;
	color: var(--muted);
	max-width: 58ch;
}

/* ---------------------------------------------------------------- records */

.records { display: grid; }

.record {
	padding-block: 1.5rem;
	border-top: 1px solid var(--line-soft);
}
.record:first-child { border-top: 0; padding-top: 0; }

.record-meta {
	margin: 0 0 0.45rem;
	font-size: 0.84rem;
	color: var(--soft);
}

.record h3 { font-size: 1.05rem; line-height: 1.4; }
.record h3 a { text-decoration: none; background: linear-gradient(var(--line), var(--line)) 0 100% / 100% 1px no-repeat; transition: background-size 0.3s var(--ease); }
.record h3 a:hover { background-image: linear-gradient(var(--amber), var(--amber)); }
.record h3 a span { display: inline; margin: 0; font-size: inherit; color: var(--amber); }
.record > p:last-child { margin: 0.45rem 0 0; font-size: 0.94rem; color: var(--muted); max-width: 64ch; }

.repo-list { display: grid; gap: 0.55rem; margin-top: 0.8rem; font-size: 0.94rem; color: var(--muted); max-width: 64ch; }
.repo-list a { margin-right: 0.45rem; font-weight: 600; color: var(--ink); text-decoration: none; background: linear-gradient(var(--line), var(--line)) 0 100% / 100% 1px no-repeat; }
.repo-list a:hover { background-image: linear-gradient(var(--amber), var(--amber)); }

/* ---------------------------------------------------------------- stack
   A cross-section of one system. The amber rail fills as you scroll, the
   packet is a request travelling down, and each layer lights as it arrives. */

.strata {
	--p: 1;
	position: relative;
	display: grid;
	grid-template-columns: 2.25rem minmax(0, 1fr) minmax(15rem, 17rem);
	column-gap: clamp(1.5rem, 3vw, 3rem);
	align-items: start;
}

.strata-rail {
	position: relative;
	align-self: stretch;
	margin-block: 1.9rem 2.2rem;
}
.strata-rail::before,
.strata-rail::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 0;
	bottom: 0;
	width: 2px;
	margin-left: -1px;
	border-radius: 2px;
	background: var(--line);
}
.strata-rail::after {
	background: linear-gradient(var(--amber-wash), var(--amber));
	transform-origin: top;
	transform: scaleY(var(--p));
}

.strata-packet {
	position: absolute;
	left: 50%;
	top: calc(var(--p) * 100%);
	z-index: 1;
	width: 12px;
	height: 12px;
	margin: -6px 0 0 -6px;
	border-radius: 50%;
	background: var(--amber);
	box-shadow: 0 0 0 6px var(--amber-wash), 0 0 22px 4px rgba(231, 155, 60, 0.45);
}

.strata-list { display: grid; }

.stratum {
	position: relative;
	display: grid;
	grid-template-columns: minmax(11rem, 0.8fr) minmax(0, 1.25fr) minmax(10rem, 0.75fr);
	gap: 0.6rem 2rem;
	padding-block: 1.7rem;
	border-top: 1px solid var(--line-soft);
}
.stratum:first-child { border-top: 0; }

/* the layer's notch on the rail */
.stratum::before {
	content: "";
	position: absolute;
	top: 2.15rem;
	left: calc(-1 * clamp(1.5rem, 3vw, 3rem) - 1.125rem - 5px);
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--paper);
	border: 2px solid var(--line);
	transition: border-color 0.4s var(--ease), background-color 0.4s var(--ease);
}

.stratum-head h3 {
	font-size: clamp(1.25rem, 1.9vw, 1.6rem);
	font-weight: 500;
	letter-spacing: -0.025em;
	line-height: 1.15;
	transition: color 0.4s var(--ease);
}
.stratum-head p { margin: 0.4rem 0 0; font-size: 0.92rem; color: var(--soft); }

.stratum-tools {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	align-content: start;
	padding-top: 0.3rem;
}
.stratum-tools li {
	padding: 0.2rem 0.6rem;
	border: 1px solid var(--line-soft);
	border-radius: 6px;
	font-size: 0.86rem;
	color: var(--muted);
	transition: border-color 0.4s var(--ease), color 0.4s var(--ease);
}

.stratum-proof { padding-top: 0.3rem; font-size: 0.9rem; color: var(--muted); }
.stratum-proof p { margin: 0; }
.stratum-proof .where { margin-bottom: 0.3rem; font-size: 0.8rem; color: var(--soft); }
.stratum-proof strong {
	display: block;
	margin-bottom: 0.1rem;
	font-size: 1.5rem;
	font-weight: 500;
	letter-spacing: -0.02em;
	line-height: 1.15;
	color: var(--ink);
}

/* with the script running, a layer stays quiet until the request reaches it */
.js .stratum:not(.is-lit) .stratum-head h3 { color: var(--soft); }
.js .stratum:not(.is-lit) .stratum-tools li { color: var(--soft); }
.stratum.is-lit::before,
html:not(.js) .stratum::before { background: var(--amber); border-color: var(--amber); }
.stratum.is-lit .stratum-tools li { border-color: var(--line); }

.spine {
	position: sticky;
	top: 7rem;
	padding: 1.5rem 1.4rem 1.4rem;
	border: 1px solid var(--line);
	border-radius: 18px;
	background:
		repeating-linear-gradient(-45deg, transparent 0 9px, rgba(244, 242, 237, 0.025) 9px 10px),
		var(--surface);
}
.spine h3 { margin-bottom: 1rem; font-size: 1.05rem; line-height: 1.3; }
.spine .stratum-tools { padding: 0; }
.spine .stratum-tools + .stratum-tools { margin-top: 0.9rem; padding-top: 0.9rem; border-top: 1px dashed var(--line); }
.spine .stratum-tools li { color: var(--ink); border-color: var(--line); }
.spine > p { margin: 1rem 0 0; font-size: 0.88rem; color: var(--soft); }

.also-daily {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.5rem 3rem;
	margin-top: clamp(2.5rem, 5vw, 3.5rem);
	padding-top: 1.6rem;
	border-top: 1px solid var(--line-soft);
}
.also-daily dt { font-size: 0.92rem; font-weight: 600; }
.also-daily dd { margin-top: 0.35rem; font-size: 0.9rem; color: var(--muted); }

@media (max-width: 1100px) {
	.strata { grid-template-columns: 2.25rem minmax(0, 1fr); }
	.spine { position: static; grid-column: 2; margin-top: 1.5rem; }
	.stratum { grid-template-columns: minmax(10rem, 0.8fr) minmax(0, 1.4fr); }
	.stratum-proof { grid-column: 2; padding-top: 0.4rem; }
}

@media (max-width: 700px) {
	.strata { grid-template-columns: 1.25rem minmax(0, 1fr); column-gap: 1rem; }
	.stratum { grid-template-columns: minmax(0, 1fr); padding-block: 1.4rem; }
	.stratum::before { left: calc(-1rem - 0.625rem - 5px); top: 1.85rem; }
	.stratum-proof { grid-column: 1; }
	.also-daily { grid-template-columns: minmax(0, 1fr); gap: 1.1rem; }
}

/* ---------------------------------------------------------------- cta */

.section--cta { background: var(--surface); }

.cta-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
	gap: 2.5rem;
	align-items: end;
}

.section--cta h2 { max-width: 18ch; }
.section--cta .prose { margin-top: 1.2rem; }

.cta-actions { justify-self: end; }

.cta-links {
	display: flex;
	gap: 1.5rem;
	margin: 1.2rem 0 0;
	font-size: 0.9rem;
}
.cta-links a { color: var(--muted); text-decoration: none; }
.cta-links a:hover { color: var(--ink); }

@media (max-width: 820px) {
	.cta-grid { grid-template-columns: 1fr; align-items: start; }
	.cta-actions { justify-self: start; }
}

@media (max-width: 420px) {
	.section--cta .btn { white-space: normal; word-break: break-all; }
}

/* ---------------------------------------------------------------- foot */

.foot {
	padding-block: 2.5rem;
	border-top: 1px solid var(--line-soft);
}

.foot-grid {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 1.5rem 3rem;
}

.foot-note { margin: 0.8rem 0 0; font-size: 0.8rem; color: var(--soft); }

.foot-links { display: flex; flex-wrap: wrap; gap: 1.2rem; font-size: 0.88rem; }
.foot-links a { color: var(--muted); text-decoration: none; }
.foot-links a:hover { color: var(--ink); }

/* ---------------------------------------------------------------- intro */

.intro {
	position: fixed;
	inset: 0;
	z-index: 90;
	display: grid;
	place-items: center;
	background: var(--paper);
	transition: opacity 0.8s var(--ease);
}

.intro[hidden] { display: none; }

/* the clip is portrait (9:16): show all of it, and let its studio grey
   spread into the rest of a wide screen instead of cropping the face */
.intro {
	background: radial-gradient(60% 95% at 50% 42%, rgb(60, 69, 72) 0%, rgb(55, 63, 66) 20%, rgb(38, 44, 46) 42%, rgb(18, 20, 21) 72%, var(--paper) 100%);
}

.intro video {
	width: auto;
	max-width: 100%;
	height: 100svh;
	object-fit: contain;
	opacity: 0;
	animation: fade 0.7s 0.05s var(--ease) forwards;
	-webkit-mask-image: linear-gradient(90deg, transparent 0, #000 22%, #000 78%, transparent 100%);
	mask-image: linear-gradient(90deg, transparent 0, #000 22%, #000 78%, transparent 100%);
}

@media (max-aspect-ratio: 9/16) {
	.intro video { -webkit-mask-image: none; mask-image: none; }
}

.intro.is-out { opacity: 0; pointer-events: none; }

.intro-skip {
	position: absolute;
	right: clamp(1rem, 3vw, 2rem);
	bottom: clamp(1rem, 3vw, 2rem);
	padding: 0.5rem 1rem;
	border: 1px solid rgba(244, 242, 237, 0.28);
	border-radius: 999px;
	background: transparent;
	color: rgba(244, 242, 237, 0.75);
	font-family: inherit;
	font-size: 0.8rem;
	cursor: pointer;
	transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.intro-skip:hover { border-color: rgba(244, 242, 237, 0.7); color: var(--ink); }

/* ---------------------------------------------------------------- film */

.film-btn {
	display: inline-flex;
	align-items: center;
	gap: 1rem;
	margin-top: 1.6rem;
	padding: 0.5rem 1.2rem 0.5rem 0.5rem;
	border: 1px solid var(--line);
	border-radius: 14px;
	background: var(--surface);
	color: var(--ink);
	font: inherit;
	text-align: left;
	cursor: pointer;
	transition: border-color 0.25s var(--ease), background-color 0.25s var(--ease);
}
.film-btn:hover { border-color: var(--amber); background: var(--raise); }

.film-btn-thumb { position: relative; display: block; width: 132px; aspect-ratio: 16 / 9; border-radius: 9px; overflow: hidden; flex: none; }
.film-btn-thumb img { width: 100%; height: 100%; object-fit: cover; }
.film-btn-thumb::after {
	content: "";
	position: absolute; left: 50%; top: 50%;
	width: 0; height: 0; margin: -9px 0 0 -6px;
	border-style: solid; border-width: 9px 0 9px 15px;
	border-color: transparent transparent transparent #fff;
	filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.6));
}

.film-btn-text { display: flex; flex-direction: column; font-weight: 600; font-size: 0.98rem; }
.film-btn-text small { margin-top: 0.15rem; font-weight: 400; font-size: 0.82rem; color: var(--soft); }

.film {
	width: min(92vw, 1280px);
	max-width: none;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--ink);
	overflow: visible;
}
.film::backdrop { background: rgba(6, 5, 4, 0.88); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.film-frame video { display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 14px; background: #000; box-shadow: 0 40px 90px rgba(0, 0, 0, 0.6); }
.film-note { margin: 0.8rem 0 0; font-size: 0.82rem; color: var(--soft); text-align: center; }
.film-close {
	position: absolute; right: 0; top: -3rem;
	padding: 0.45rem 1rem;
	border: 1px solid var(--line); border-radius: 999px;
	background: transparent; color: var(--muted);
	font: inherit; font-size: 0.85rem; cursor: pointer;
}
.film-close:hover { color: var(--ink); border-color: var(--ink); }

/* ---------------------------------------------------------------- motion */

/* one orchestrated entrance: the hero, nothing else fades in on scroll */
@media (prefers-reduced-motion: no-preference) {
	.js .hero-copy > * { animation: rise 0.8s var(--ease) both; }
	.js .hero-copy > :nth-child(2) { animation-delay: 0.06s; }
	.js .hero-copy > :nth-child(3) { animation-delay: 0.12s; }
	.js .hero-copy > :nth-child(4) { animation-delay: 0.18s; }
	.js .hero-copy > :nth-child(5) { animation-delay: 0.24s; }
	.js .hero-media { animation: fade 1s var(--ease) 0.1s both; }
}

@keyframes rise {
	from { opacity: 0; transform: translateY(14px); }
	to { opacity: 1; transform: none; }
}

@keyframes fade {
	from { opacity: 0; }
	to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.intro { display: none !important; }
	*, *::before, *::after {
		animation-duration: 0.001ms !important;
		animation-delay: 0ms !important;
		transition-duration: 0.001ms !important;
	}

	/* the system diagrams are the work itself, so they keep moving */
	.sys.is-live .sys-path { animation-duration: 1.6s !important; }
	.sys.is-live .wave rect { animation-duration: 1.1s !important; }
	.sys .wave rect:nth-child(2n) { animation-delay: -0.35s !important; }
	.sys .wave rect:nth-child(3n) { animation-delay: -0.7s !important; }
	.sys .wave rect:nth-child(4n) { animation-delay: -0.15s !important; }
	.sys.is-live .live { animation-duration: 1.6s !important; }
	.sys .node rect, .sys .node text, .sys .graph line, .sys .graph circle { transition-duration: 0.35s !important; }
	.sys .bar { transition-duration: 1.4s !important; }
	.sys .bar--hot { transition-delay: 0.25s !important; }
}

/* ---------------------------------------------------------------- print */

@media print {
	body { background: #fff; color: #000; }
	.nav, .foot-links, .hero-media, .skip, .intro, .hero::before, .hero::after { display: none; }
	.section, .case, .record { break-inside: avoid; }
	.section--statement, .section--cta, .sys { background: #fff; }
	.prose, .case-copy p, .case-points, .record p, .timeline p, .stratum-tools li, .stratum-proof, .also-daily dd { color: #222; }
	.strata-rail, .stratum::before { display: none; }
	.spine { position: static; background: #fff; }
	.bar { transform: none; }
}
