/* One cause or two? — landing page. The palette and type follow the film. */

@font-face {
	font-family: 'Nunito';
	src: url(../fonts/nunito-latin-wght-normal.woff2) format('woff2');
	font-weight: 200 1000;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: 'Nunito';
	src: url(../fonts/nunito-latin-wght-italic.woff2) format('woff2');
	font-weight: 200 1000;
	font-style: italic;
	font-display: swap;
}
@font-face {
	font-family: 'JetBrains Mono';
	src: url(../fonts/jetbrains-mono-latin-wght-normal.woff2) format('woff2');
	font-weight: 100 800;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: 'STIX Two Text';
	src: url(../fonts/stix-two-text-latin-wght-italic.woff2) format('woff2');
	font-weight: 400 700;
	font-style: italic;
	font-display: swap;
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: 'STIX Two Text';
	src: url(../fonts/stix-two-text-greek-wght-italic.woff2) format('woff2');
	font-weight: 400 700;
	font-style: italic;
	font-display: swap;
	unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}

:root {
	--night: #0b1026;
	--deep: #080c24;
	--band: #0e1433;
	--card: rgba(26, 35, 86, 0.42);
	--card-line: rgba(143, 150, 200, 0.22);
	--text: #f4f1ea;
	--dim: #a9b1d6;
	--faint: #7c86b8;
	--sight: #5cc8ff;
	--sound: #6ee7a0;
	--belief: #ffb547;
	--prior: #c39bff;
	--warm: #ff9a6b;
	--sans: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--mono: 'JetBrains Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
	--math: 'STIX Two Text', 'Times New Roman', serif;
	--wrap: 1080px;
	--gutter: clamp(16px, 4vw, 40px);
	color-scheme: dark;
}

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

html {
	scroll-behavior: smooth;
	-webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}

body {
	margin: 0;
	background: var(--night);
	color: var(--text);
	font-family: var(--sans);
	font-weight: 500;
	font-size: clamp(17px, 1.05rem + 0.2vw, 19px);
	line-height: 1.6;
	overflow-x: hidden;
}

a {
	color: var(--sight);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}
a:hover {
	color: #9fdcff;
}
:focus-visible {
	outline: 3px solid var(--belief);
	outline-offset: 3px;
	border-radius: 4px;
}

h1,
h2,
h3 {
	font-weight: 900;
	line-height: 1.12;
	margin: 0;
	text-wrap: balance;
}
p {
	margin: 0 0 1em;
}
cite {
	font-style: italic;
}
.small {
	font-size: 0.86em;
	color: var(--dim);
}
.c-sight { color: var(--sight); }
.c-sound { color: var(--sound); }
.c-belief { color: var(--belief); }
.c-prior { color: var(--prior); }

.wrap {
	max-width: var(--wrap);
	margin: 0 auto;
	padding: 0 var(--gutter);
	position: relative;
}

.skip {
	position: absolute;
	left: -9999px;
	top: 8px;
	z-index: 10;
	background: var(--belief);
	color: var(--night);
	padding: 8px 14px;
	border-radius: 8px;
	font-weight: 800;
}
.skip:focus {
	left: 8px;
}

/* ─── top bar ─── */
.topbar {
	position: absolute;
	inset: 0 0 auto 0;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 14px var(--gutter);
	font-size: 0.86rem;
	font-weight: 700;
}
.topbar a {
	color: var(--dim);
	text-decoration: none;
}
.topbar a:hover {
	color: var(--text);
}
.topbar .labs {
	margin: 0;
	color: var(--faint);
}
.topbar nav {
	display: flex;
	gap: clamp(12px, 2.5vw, 28px);
}
@media (max-width: 560px) {
	.topbar nav {
		display: none;
	}
}

/* ─── hero ─── */
.hero {
	position: relative;
	padding: clamp(84px, 12vw, 128px) 0 clamp(80px, 10vw, 128px);
	background: linear-gradient(180deg, var(--deep) 0%, #0d1433 45%, #1a2356 100%);
	text-align: center;
	isolation: isolate;
}
.sky {
	position: absolute;
	inset: 0;
	z-index: -1;
	background-image:
		radial-gradient(1.4px 1.4px at 12% 18%, rgba(255, 255, 255, 0.55), transparent 60%),
		radial-gradient(1px 1px at 27% 8%, rgba(255, 255, 255, 0.45), transparent 60%),
		radial-gradient(1.2px 1.2px at 41% 26%, rgba(255, 255, 255, 0.35), transparent 60%),
		radial-gradient(1px 1px at 58% 12%, rgba(255, 255, 255, 0.5), transparent 60%),
		radial-gradient(1.6px 1.6px at 73% 22%, rgba(255, 255, 255, 0.4), transparent 60%),
		radial-gradient(1px 1px at 86% 9%, rgba(255, 255, 255, 0.5), transparent 60%),
		radial-gradient(1.2px 1.2px at 93% 31%, rgba(255, 255, 255, 0.3), transparent 60%),
		radial-gradient(1px 1px at 6% 40%, rgba(255, 255, 255, 0.35), transparent 60%),
		radial-gradient(1.3px 1.3px at 34% 44%, rgba(255, 255, 255, 0.25), transparent 60%),
		radial-gradient(1px 1px at 66% 38%, rgba(255, 255, 255, 0.3), transparent 60%),
		radial-gradient(60% 45% at 50% 42%, rgba(42, 58, 140, 0.35), transparent 70%);
}
.ridge {
	position: absolute;
	left: 0;
	bottom: -1px;
	width: 100%;
	height: clamp(60px, 11vw, 150px);
	z-index: -1;
	fill: var(--band);
}
.hero h1 {
	font-size: clamp(44px, 8.5vw, 96px);
	letter-spacing: -0.01em;
	margin-bottom: 0.25em;
}
.pitch {
	max-width: 44em;
	margin: 0 auto 1.6em;
	color: var(--dim);
	font-size: clamp(1.02em, 0.9em + 0.5vw, 1.2em);
	text-wrap: pretty;
}
.pitch em {
	color: var(--text);
	font-style: normal;
	font-weight: 800;
}
.film {
	margin: 0 auto;
	max-width: 1000px;
	border-radius: clamp(10px, 1.6vw, 18px);
	overflow: hidden;
	background: #05081a;
	box-shadow: 0 0 0 1px rgba(143, 150, 200, 0.25), 0 24px 80px rgba(0, 0, 0, 0.5), 0 0 120px rgba(255, 181, 71, 0.08);
}
.film video {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	background: #05081a;
}
.film video::cue {
	font-family: var(--sans);
	font-weight: 700;
	background: rgba(8, 12, 34, 0.72);
}
.study {
	max-width: 1000px;
	margin: 1.4em auto 1.2em;
}
.study .based {
	margin-top: 0;
}
.study .actions {
	margin-bottom: 0;
}
.based {
	max-width: 46em;
	margin: 1.4em auto 1.2em;
	color: var(--dim);
	font-size: 0.95em;
	text-wrap: pretty;
}
.based strong {
	color: var(--text);
	font-weight: 800;
}
.based a {
	color: var(--text);
}
.based a.person {
	text-decoration: none;
}
.based a.person:hover,
.based a.person:focus-visible {
	text-decoration: underline;
}
.based sup {
	line-height: 0;
	font-weight: 800;
}
.based-note {
	display: block;
	margin-top: 0.5em;
	font-size: 0.84em;
}
.actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
	margin-bottom: 1.4em;
}

/* ─── buttons ─── */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 44px;
	padding: 10px 20px;
	border-radius: 999px;
	border: 1.5px solid rgba(244, 241, 234, 0.35);
	background: rgba(244, 241, 234, 0.06);
	color: var(--text);
	font: 800 0.95rem/1.2 var(--sans);
	text-decoration: none;
	cursor: pointer;
	transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.btn:hover {
	color: var(--text);
	background: rgba(244, 241, 234, 0.12);
	border-color: rgba(244, 241, 234, 0.6);
}
.btn:active {
	transform: translateY(1px);
}
.btn.primary {
	background: var(--belief);
	border-color: var(--belief);
	color: #1b1405;
}
.btn.primary:hover {
	background: #ffc56e;
	border-color: #ffc56e;
	color: #1b1405;
}
.btn.ghost {
	background: transparent;
}
.btn.small {
	min-height: 36px;
	padding: 6px 14px;
	font-size: 0.85rem;
}

/* ─── transcript ─── */
.transcript {
	max-width: 46em;
	margin: 0 auto;
	text-align: left;
}
.transcript summary {
	width: max-content;
	margin: 0 auto;
	cursor: pointer;
	color: var(--dim);
	font-weight: 700;
	font-size: 0.92em;
	padding: 6px 10px;
	border-radius: 8px;
}
.transcript summary:hover {
	color: var(--text);
}
.transcript-body {
	margin-top: 12px;
	padding: 20px 24px;
	border-radius: 14px;
	background: rgba(8, 12, 34, 0.55);
	border: 1px solid var(--card-line);
	color: var(--dim);
}
.transcript-body p:last-child {
	margin-bottom: 0;
}

.film-bar {
	max-width: 1000px;
	margin: 12px auto 0;
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: baseline;
	gap: 6px 24px;
	color: var(--dim);
	font-size: 0.92em;
	text-align: left;
}
.film-bar .transcript {
	margin: 0;
	max-width: none;
}
.film-bar .transcript[open] {
	flex-basis: 100%;
}
.film-bar .transcript summary {
	margin: 0;
	padding: 0;
	font-size: 1em;
}
.film-links {
	margin: 0;
}
.film-links a,
.film-links button {
	color: var(--text);
	font-weight: 700;
}
.film-links button {
	padding: 0;
	border: 0;
	background: none;
	font: inherit;
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 0.15em;
	cursor: pointer;
}
.film-links .share[hidden] {
	display: none;
}
@media (max-width: 560px) {
	.film-bar {
		justify-content: center;
		text-align: center;
	}
}

/* ─── bands ─── */
.band {
	padding: clamp(64px, 9vw, 112px) 0;
	background: var(--band);
	position: relative;
}
.band:nth-of-type(odd) {
	background: var(--night);
}
.band + .band::before {
	/* a small belief hill between sections */
	content: '';
	position: absolute;
	top: -13px;
	left: 50%;
	width: 84px;
	height: 26px;
	margin-left: -42px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 84 26'%3E%3Cpath d='M2 24 C24 24 30 3 42 3 C54 3 60 24 82 24' fill='none' stroke='%23FFB547' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / contain;
	opacity: 0.8;
}
.eyebrow {
	margin: 0 0 0.5em;
	color: var(--belief);
	font-weight: 800;
	font-size: 0.82rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}
.band h2 {
	font-size: clamp(30px, 4.4vw, 46px);
	margin-bottom: 0.5em;
}
.lead {
	max-width: 44em;
	font-size: clamp(1.02em, 0.95em + 0.3vw, 1.12em);
	color: var(--dim);
	text-wrap: pretty;
}
.band p:not(.lead):not(.eyebrow):not(.kicker):not(.small):not(.ref) {
	max-width: 46em;
}
.sub {
	font-size: clamp(22px, 2.6vw, 28px);
	margin: 1.6em 0 0.7em;
}

/* ─── cards ─── */
.card {
	background: var(--card);
	border: 1px solid var(--card-line);
	border-radius: 18px;
	padding: clamp(18px, 2.4vw, 28px);
}
.card h3 {
	font-size: clamp(20px, 2vw, 24px);
	margin-bottom: 0.55em;
}
.card h3 span {
	color: var(--faint);
	font-weight: 800;
}
.card p:last-child {
	margin-bottom: 0;
}
.cards {
	display: grid;
	gap: clamp(14px, 2vw, 22px);
	margin: 1.6em 0;
}
.cards.two {
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
}
.cards.three {
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr));
}
.kicker {
	margin: 0 0 0.3em;
	font-size: 0.8rem;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}
.ref {
	margin-top: 0.9em;
	font-size: 0.85em;
	color: var(--faint);
}
.ref a {
	color: var(--dim);
}

/* ─── demo ─── */
.demo {
	margin: 1.8em 0 0;
	padding: clamp(10px, 2vw, 24px);
	border-radius: 22px;
	background: linear-gradient(180deg, #080c24, #111842);
	border: 1px solid var(--card-line);
	position: relative;
}
.demo .fs {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 1;
	min-height: 36px;
	padding: 0 9px;
}
.demo .fs[hidden] {
	display: none;
}
.demo .fs .exit,
.demo .fs.on .enter {
	display: none;
}
.demo .fs.on .exit {
	display: inline;
}
/* full screen: the balance as large as the height allows, the sliders below it */
.demo:fullscreen {
	margin: 0;
	border: 0;
	border-radius: 0;
	display: flex;
	flex-direction: column;
	overflow: auto;
	padding: 24px clamp(16px, 4vw, 64px);
}
.demo:fullscreen > svg {
	width: min(100%, calc((100vh - 210px) * 1000 / 572));
	margin: auto auto 0;
}
.demo:fullscreen .controls {
	width: min(100%, 1100px);
	margin: 0 auto auto;
}
.demo:fullscreen figcaption {
	display: none;
}
.demo svg {
	display: block;
	width: 100%;
	height: auto;
	touch-action: pan-y;
	user-select: none;
	-webkit-user-select: none;
}
.demo svg text {
	font-family: var(--sans);
}
#demo .handle {
	cursor: grab;
	touch-action: none;
}
#demo .handle:active {
	cursor: grabbing;
}
#demo .handle:focus {
	outline: none;
}
#demo .handle:focus-visible .ring {
	stroke: var(--belief);
	stroke-width: 4;
}
.verdict {
	margin: 0.2em 0 0.6em;
	text-align: center;
	font-weight: 800;
	font-size: clamp(1em, 0.9em + 0.5vw, 1.25em);
	min-height: 1.6em;
}
.controls {
	display: grid;
	grid-template-columns: repeat(3, 1fr) auto;
	gap: 14px 24px;
	align-items: end;
	padding: 4px clamp(4px, 1.5vw, 16px) 8px;
}
.controls label {
	display: grid;
	gap: 6px;
	font-size: 0.9em;
	font-weight: 700;
	color: var(--dim);
}
.controls .ends {
	display: flex;
	justify-content: space-between;
	margin-top: -4px;
	font-size: 0.82em;
	font-weight: 600;
}
@media (max-width: 760px) {
	.controls {
		grid-template-columns: 1fr;
	}
	.controls .btn {
		justify-self: start;
	}
}
input[type='range'] {
	width: 100%;
	height: 28px;
	margin: 0;
	background: transparent;
	accent-color: var(--belief);
	cursor: pointer;
}
.demo figcaption {
	margin: 1em clamp(4px, 1.5vw, 16px) 4px;
	font-size: 0.88em;
	color: var(--dim);
	max-width: 52em;
}

/* ─── findings ─── */
.facts {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	padding: 0;
	margin: 1.4em 0 1.8em;
}
.facts li {
	padding: 8px 16px;
	border-radius: 999px;
	background: rgba(244, 241, 234, 0.06);
	border: 1px solid var(--card-line);
	color: var(--dim);
	font-weight: 700;
	font-size: 0.92em;
}
.facts b {
	font-family: var(--mono);
	color: var(--text);
	font-weight: 600;
}
.facts i {
	color: var(--text);
}
.figs {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr));
	gap: clamp(14px, 2vw, 22px);
	margin: 0 0 0.6em;
}
.fig {
	margin: 0;
	display: flex;
	flex-direction: column;
}
.fig svg {
	width: 100%;
	height: auto;
	margin: 0.2em 0 0.8em;
}
.fig figcaption {
	font-size: 0.9em;
	color: var(--dim);
}
.dash {
	border-bottom: 2px dashed currentColor;
}
.formula {
	font-family: var(--math);
	font-style: italic;
	white-space: nowrap;
	color: var(--text);
	font-size: 1.08em;
}
.formula i {
	font-style: italic;
}
.formula sub,
.formula sup {
	font-size: 0.68em;
}
.more {
	padding-left: 1.2em;
	max-width: 48em;
}
.more li {
	margin-bottom: 0.8em;
	color: var(--dim);
}
.more li::marker {
	color: var(--belief);
}
.more b {
	color: var(--text);
}
.backstory {
	margin-top: 2em;
	max-width: 48em;
}
.backstory summary {
	cursor: pointer;
}
.backstory summary::marker {
	color: var(--belief);
}
.backstory summary h3 {
	display: inline;
	margin: 0;
}
.backstory .hint {
	margin-left: 0.5em;
	color: var(--faint);
	font-size: 0.92em;
}
.backstory[open] summary {
	margin-bottom: 0.8em;
}
.backstory[open] .hint {
	display: none;
}
@media (max-width: 560px) {
	.backstory .hint {
		display: block;
		margin: 0.3em 0 0;
	}
}

/* ─── methods ─── */
.start {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 18px 32px;
	margin: 1.8em 0 0;
	border-color: rgba(255, 181, 71, 0.45);
	background: linear-gradient(120deg, rgba(255, 181, 71, 0.1), rgba(26, 35, 86, 0.42) 60%);
}
.start > div:first-child {
	flex: 1 1 420px;
}
.start .kicker {
	color: var(--belief);
}
.hub {
	border-color: rgba(195, 155, 255, 0.5);
	background: linear-gradient(120deg, rgba(195, 155, 255, 0.13), rgba(26, 35, 86, 0.42) 60%);
}
.hub .kicker {
	color: var(--prior);
}
.start-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}
.tool {
	display: flex;
	flex-direction: column;
}
.tool > p:nth-of-type(2) {
	flex: 1;
}
.tool p {
	font-size: 0.95em;
}
.install {
	display: block;
	margin: 0.4em 0 0;
	padding: 8px 12px;
	border-radius: 10px;
	background: rgba(5, 8, 26, 0.7);
	border: 1px solid var(--card-line);
	font-family: var(--mono);
	font-size: 0.84em;
	color: var(--text);
	overflow-x: auto;
	white-space: nowrap;
}
.research {
	color: var(--dim);
	font-size: 0.92em;
	margin-top: 1.4em;
}

/* ─── cite ─── */
.citation {
	color: var(--dim);
}
.bibtex {
	position: relative;
	margin: 1em 0 2em;
	max-width: 52em;
}
.bibtex pre {
	margin: 0;
	padding: 20px 22px;
	padding-top: 52px;
	border-radius: 14px;
	background: rgba(5, 8, 26, 0.8);
	border: 1px solid var(--card-line);
	font: 400 0.8rem/1.6 var(--mono);
	color: var(--text);
	overflow-x: auto;
}
.bibtex .copy {
	position: absolute;
	top: 10px;
	right: 10px;
}
.acks {
	color: var(--dim);
	font-size: 0.95em;
}

.follow {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 1.4em;
}

/* ─── footer ─── */
.foot {
	padding: 36px 0 44px;
	background: var(--deep);
	color: var(--dim);
	font-size: 0.92em;
	text-align: center;
}
.foot p {
	margin: 0.3em 0;
}
.foot a {
	color: var(--text);
}

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}
