/* KYC Integration — the public landing page (/home), in the service's own
 * "Organic" clay look.
 *
 * Same palette, type and shapes as the desk theme (public/css/kyc_theme.css):
 * a cream canvas, terracotta accent, sage for the healthy moments, pressed-clay
 * surfaces with a light lip along the top edge. The desk restates Frappe's CSS
 * variables to get there; a website page has no such framework to reason with,
 * so this file declares its own tokens under .kyc-home and owns every rule.
 *
 * SCOPING. Everything lives under .kyc-home (the page's own wrapper) so nothing
 * here can reach another website page — this stylesheet is linked from
 * www/home.html alone, but the /verify flow wears tenant branding and must stay
 * out of reach even if that ever changes.
 *
 * Dark mode follows the visitor's system setting: the same warm family, fired
 * dark, rather than a neutral gray inversion.
 */

.kyc-home {
	--brand: #c67139;
	--brand-strong: color-mix(in srgb, var(--brand) 60%, #402310);
	--brand-soft: color-mix(in srgb, var(--brand) 9%, #fdf6ea);
	--brand-tint: color-mix(in srgb, var(--brand) 17%, #fdf6ea);
	--sage: #7a8a5e;
	--sage-soft: color-mix(in srgb, var(--sage) 14%, #fdf6ea);

	--canvas: #f5ead8;
	--card: #faf5ec;
	--card-2: #f1e8d7;
	--line: #e6dac2;
	--line-strong: #d6c6a6;

	--ink: #201e1d;
	--ink-2: #474238;
	--ink-3: #645c50;
	--ink-4: #6f6759;

	--rail: min(1560px, 100% - clamp(2rem, 5vw, 5rem));

	--radius: 16px;
	--radius-lg: 26px;
	--radius-xl: 34px;

	/* Clay elevation: a soft drop, plus a light inner lip on the top edge. */
	--clay: 0 1px 2px rgba(46, 43, 37, 0.05), 0 10px 26px rgba(46, 43, 37, 0.08),
		inset 0 1px 0 rgba(255, 255, 255, 0.75);
	--clay-lifted: 0 2px 6px rgba(46, 43, 37, 0.07), 0 26px 60px rgba(46, 43, 37, 0.14),
		inset 0 1px 0 rgba(255, 255, 255, 0.85);

	--font: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	/* The display face follows KYC Settings → Appearance: api/appearance.py
	 * states --kyc-font-display and its cut on the body for this route, and
	 * Caprasimo is what the page falls back to when nothing has been chosen. */
	--font-display: var(--kyc-font-display, "Caprasimo", "Figtree", Georgia, serif);
	--font-display-weight: var(--kyc-font-display-weight, 400);
	--font-display-vars: var(--kyc-font-display-vars, normal);
	--font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

	position: relative;
	/* A stacking context of its own, so the fixed wash layer below can sit at
	 * z-index: -1 and still paint above this element's own canvas colour — with
	 * no stacking context here, a negative child would fall behind it and the two
	 * washes would simply never be seen. */
	isolation: isolate;
	min-height: 100vh;
	color: var(--ink-2);
	font-family: var(--font);
	font-size: 17px;
	line-height: 1.6;
	background: var(--canvas);
	/* NOT `hidden`: that computes overflow-y to auto, which makes this element
	 * the page's scrollport — the document stops scrolling, the sticky header
	 * has nothing to stick to, and anchor jumps move an inner box instead of
	 * the page. `clip` trims the rotated hero card's overhang without creating
	 * a scroll container. */
	overflow-x: clip;
}

/* Two low, wide washes of light — the sun on a cream wall, not a gradient bar.
 *
 * On their own fixed layer rather than on this element with
 * background-attachment: fixed. The gradients have to be measured against the
 * viewport (against .kyc-home they would be measured against a page several
 * thousand pixels tall, and disappear), and a viewport-attached background on a
 * scrolling element is one of the few things that can still take a page off the
 * compositor and repaint the whole window on every scrolled frame. */
.kyc-home::before {
	content: "";
	position: fixed;
	inset: 0;
	z-index: -1;
	pointer-events: none;
	background-image: radial-gradient(
			120% 70% at 82% -10%,
			color-mix(in srgb, var(--brand) 16%, transparent) 0%,
			transparent 62%
		),
		radial-gradient(90% 60% at 4% 8%, color-mix(in srgb, var(--sage) 13%, transparent) 0%, transparent 58%);
}

/* Frappe's website bundle sets `html, body { height: 100% }` and lays the body
 * out as a flex column. That leaves this page a flex item inside a
 * viewport-height box: it shrinks to one screen, its content overflows visibly
 * (so the page still reads and the document still scrolls) — but the sticky
 * header's containing block ends 100vh down, so the header slides away with it.
 * Let the body grow with the page, and stop the page shrinking to fit. */
body:has(.kyc-home) {
	margin: 0;
	height: auto;
	min-height: 100%;
	background: #f5ead8;
}

body:has(.kyc-home) > .kyc-home {
	flex: 1 0 auto;
}

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

.kyc-home h1,
.kyc-home h2,
.kyc-home h3 {
	color: var(--ink);
	margin: 0;
	line-height: 1.15;
	letter-spacing: -0.01em;
}

.kyc-home p {
	margin: 0;
}

.kyc-home a {
	color: var(--brand-strong);
	text-decoration: none;
}

.kyc-home a:hover {
	text-decoration: underline;
}

.kyc-home :focus-visible {
	outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent);
	outline-offset: 3px;
	border-radius: 6px;
}

.kyc-home__wrap {
	width: var(--rail);
	margin-inline: auto;
}

/* The header is sticky, so a jump to #how would otherwise put the heading
 * underneath it. */
.kyc-home [id] {
	scroll-margin-top: 96px;
}

/* Inline code in prose. Bootstrap (which the website bundle carries) paints
 * <code> magenta; on this page it is part of the sentence, not an alarm. */
.kyc-home code {
	font-family: var(--font-mono);
	font-size: 0.88em;
	padding: 0.1em 0.35em;
	border-radius: 6px;
	background: var(--card-2);
	border: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
	color: var(--ink-2);
}

/* ------------------------------------------------------------- top bar -- */

.kyc-home__nav {
	position: sticky;
	top: 0;
	z-index: 30;
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	background: color-mix(in srgb, var(--card) 78%, transparent);
	border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
	transition: background-color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

/* Off the top of the page the bar is over content rather than beside it, so it
 * takes an edge and a shadow to sit above what it is covering. */
.kyc-home__nav.is-stuck {
	background: color-mix(in srgb, var(--card) 92%, transparent);
	border-bottom-color: var(--line);
	box-shadow: 0 10px 26px rgba(46, 43, 37, 0.09);
}

.kyc-home__nav.is-stuck .kyc-home__nav-inner {
	min-height: 58px;
}

.kyc-home__nav-inner {
	transition: min-height 0.25s ease;
}

.kyc-home__nav.is-stuck .kyc-home__brand img {
	transform: scale(0.88);
}

.kyc-home__brand img {
	transition: transform 0.25s ease;
}

.kyc-home__nav-inner {
	display: flex;
	align-items: center;
	gap: 1.5rem;
	min-height: 68px;
	padding-block: 0.6rem;
}

.kyc-home .kyc-home__brand {
	display: flex;
	align-items: center;
	gap: 0.7rem;
	color: var(--ink);
	text-decoration: none;
	margin-right: auto;
}

.kyc-home .kyc-home__brand:hover {
	text-decoration: none;
}

.kyc-home__brand img {
	width: 38px;
	height: 38px;
	border-radius: 12px;
	box-shadow: 0 4px 12px rgba(46, 43, 37, 0.16);
}

.kyc-home__brand-name {
	font-family: var(--font-display);
	font-weight: var(--font-display-weight);
	font-variation-settings: var(--font-display-vars);
	font-size: 1.15rem;
	line-height: 1;
}

.kyc-home__nav-links {
	display: flex;
	align-items: center;
	gap: 1.6rem;
}

.kyc-home__nav-links a {
	color: var(--ink-3);
	font-weight: 600;
	font-size: 0.95rem;
}

.kyc-home__nav-links a {
	position: relative;
	padding-block: 0.35rem;
	transition: color 0.2s ease;
}

.kyc-home__nav-links a:hover {
	color: var(--brand-strong);
	text-decoration: none;
}

/* The section under the reader keeps its link lit, with a rule that grows out
 * from the middle rather than appearing whole. */
.kyc-home__nav-links a::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 2px;
	border-radius: 2px;
	background: var(--brand);
	transform: scaleX(0);
	transition: transform 0.3s cubic-bezier(0.3, 0.9, 0.25, 1);
}

.kyc-home__nav-links a:hover::after,
.kyc-home__nav-links a.is-here::after {
	transform: scaleX(1);
}

.kyc-home__nav-links a.is-here {
	color: var(--brand-strong);
}

/* ------------------------------------------------------------- buttons -- */

.kyc-home .kyc-home__btn {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	padding: 0.72rem 1.5rem;
	border-radius: 999px;
	font-weight: 700;
	font-size: 0.98rem;
	border: 1px solid transparent;
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
	white-space: nowrap;
}

.kyc-home .kyc-home__btn:hover {
	text-decoration: none;
	transform: translateY(-1px);
}

.kyc-home .kyc-home__btn--primary {
	background: linear-gradient(
		180deg,
		color-mix(in srgb, var(--brand) 62%, #7a3a13) 0%,
		color-mix(in srgb, var(--brand) 44%, #7a3a13) 100%
	);
	color: #fff9f1;
	box-shadow: 0 1px 2px rgba(70, 38, 15, 0.2), 0 10px 22px rgba(198, 113, 57, 0.32),
		inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.kyc-home .kyc-home__btn--primary:hover {
	box-shadow: 0 2px 4px rgba(70, 38, 15, 0.22), 0 16px 30px rgba(198, 113, 57, 0.38),
		inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.kyc-home .kyc-home__btn--ghost {
	background: var(--card);
	color: var(--ink-2);
	border-color: var(--line);
	box-shadow: var(--clay);
}

.kyc-home .kyc-home__btn--ghost:hover {
	background: var(--card-2);
}

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

.kyc-home__hero {
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
	gap: clamp(2.5rem, 5vw, 5rem);
	align-items: center;
	padding: clamp(3rem, 7vw, 6rem) 0 clamp(2.5rem, 5vw, 4rem);
}

.kyc-home__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.4rem 0.95rem;
	border-radius: 999px;
	background: var(--brand-tint);
	color: var(--brand-strong);
	border: 1px solid color-mix(in srgb, var(--brand) 28%, transparent);
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.kyc-home__eyebrow::before {
	content: "";
	width: 7px;
	height: 7px;
	border-radius: 999px;
	background: var(--sage);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--sage) 25%, transparent);
}

.kyc-home__hero h1 {
	font-family: var(--font-display);
	font-weight: var(--font-display-weight);
	font-variation-settings: var(--font-display-vars);
	font-size: clamp(2.1rem, 4.7vw, 4rem);
	line-height: 1.05;
	margin: 1.4rem 0 0;
}

.kyc-home__hero h1 em {
	font-style: normal;
	color: var(--brand);
}

.kyc-home__lede {
	font-size: clamp(1.05rem, 1.5vw, 1.2rem);
	color: var(--ink-3);
	margin-top: 1.25rem;
	max-width: 34em;
}

.kyc-home__cta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.85rem;
	margin-top: 2rem;
}

.kyc-home__note {
	margin-top: 3rem;
	font-size: 0.9rem;
	color: var(--ink-4);
}

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

.kyc-home__art {
	position: relative;
	display: grid;
	place-items: center;
	min-height: clamp(280px, 38vw, 560px);
}

.kyc-home__art-plate {
	position: absolute;
	inset: 8% 4%;
	border-radius: 44% 56% 52% 48% / 52% 44% 56% 48%;
	background: linear-gradient(150deg, var(--brand-tint), var(--sage-soft));
	filter: blur(2px);
	opacity: 0.85;
}

.kyc-home__card {
	position: relative;
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	box-shadow: var(--clay-lifted);
}

.kyc-home__id {
	width: min(440px, 88%);
	padding: 1.3rem 1.45rem 1.5rem;
	transform: rotate(-3deg);
	overflow: hidden;
}

.kyc-home__id-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 0.7rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--ink-4);
	font-weight: 700;
}

.kyc-home__chip {
	width: 34px;
	height: 24px;
	border-radius: 6px;
	background: linear-gradient(140deg, #e8c98d, #c99a4e);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.kyc-home__id-body {
	display: grid;
	grid-template-columns: 78px 1fr;
	gap: 1rem;
	margin-top: 1rem;
	align-items: start;
}

.kyc-home__portrait {
	aspect-ratio: 3 / 4;
	border-radius: 14px;
	background: linear-gradient(160deg, var(--card-2), color-mix(in srgb, var(--brand) 14%, var(--card-2)));
	border: 1px solid var(--line);
	display: grid;
	place-items: end center;
	overflow: hidden;
}

.kyc-home__portrait span {
	width: 62%;
	height: 46%;
	border-radius: 40% 40% 0 0;
	background: color-mix(in srgb, var(--brand) 38%, #ffffff);
	position: relative;
}

.kyc-home__portrait span::before {
	content: "";
	position: absolute;
	top: -52%;
	left: 50%;
	translate: -50% 0;
	width: 58%;
	aspect-ratio: 1;
	border-radius: 999px;
	background: color-mix(in srgb, var(--brand) 38%, #ffffff);
}

.kyc-home__lines {
	display: grid;
	gap: 0.55rem;
}

.kyc-home__lines i {
	display: block;
	height: 9px;
	border-radius: 999px;
	background: var(--card-2);
	border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}

.kyc-home__lines i:nth-child(1) {
	width: 72%;
	background: color-mix(in srgb, var(--brand) 22%, var(--card-2));
}

.kyc-home__lines i:nth-child(2) {
	width: 92%;
}

.kyc-home__lines i:nth-child(3) {
	width: 60%;
}

.kyc-home__lines i:nth-child(4) {
	width: 80%;
}

.kyc-home__mrz {
	margin-top: 1.1rem;
	font-family: var(--font-mono);
	font-size: 0.62rem;
	letter-spacing: 0.06em;
	color: var(--ink-4);
	background: var(--card-2);
	border-radius: 10px;
	padding: 0.5rem 0.6rem;
	overflow: hidden;
	white-space: nowrap;
}

/* The read sweep: a band of light crossing the card, once every few seconds. */
.kyc-home__scan {
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: linear-gradient(
		180deg,
		transparent 0%,
		color-mix(in srgb, var(--sage) 26%, transparent) 45%,
		color-mix(in srgb, var(--sage) 40%, transparent) 50%,
		transparent 100%
	);
	height: 34%;
	animation: kyc-home-scan 4.6s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

@keyframes kyc-home-scan {
	0%,
	12% {
		transform: translateY(-120%);
		opacity: 0;
	}
	20% {
		opacity: 1;
	}
	80% {
		opacity: 1;
	}
	100% {
		transform: translateY(320%);
		opacity: 0;
	}
}

.kyc-home__selfie {
	position: absolute;
	right: 2%;
	top: 6%;
	width: 132px;
	padding: 0.75rem;
	transform: rotate(5deg);
	animation: kyc-home-float 7s ease-in-out infinite;
}

.kyc-home__selfie-face {
	aspect-ratio: 1;
	border-radius: 18px;
	background: radial-gradient(70% 70% at 50% 30%, color-mix(in srgb, var(--sage) 30%, var(--card-2)), var(--card-2));
	display: grid;
	place-items: center;
	border: 1px solid var(--line);
}

.kyc-home__selfie-face svg {
	width: 54%;
	height: 54%;
	color: var(--sage);
}

.kyc-home__selfie small {
	display: block;
	text-align: center;
	margin-top: 0.5rem;
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--ink-4);
}

.kyc-home__verdict {
	position: absolute;
	left: 0;
	bottom: 5%;
	display: flex;
	align-items: center;
	gap: 0.7rem;
	padding: 0.8rem 1.15rem 0.8rem 0.85rem;
	transform: rotate(-1.5deg);
	animation: kyc-home-float 8.5s ease-in-out 0.6s infinite;
}

.kyc-home__verdict-mark {
	width: 34px;
	height: 34px;
	border-radius: 999px;
	background: var(--sage);
	color: #fdf9f0;
	display: grid;
	place-items: center;
	box-shadow: 0 6px 14px color-mix(in srgb, var(--sage) 40%, transparent);
}

.kyc-home__verdict-mark svg {
	width: 18px;
	height: 18px;
}

.kyc-home__verdict b {
	display: block;
	color: var(--ink);
	font-size: 0.95rem;
}

.kyc-home__verdict small {
	color: var(--ink-4);
	font-size: 0.78rem;
	font-family: var(--font-mono);
}

@keyframes kyc-home-float {
	0%,
	100% {
		translate: var(--art-px, 0px) var(--art-py, 0px);
	}
	50% {
		translate: var(--art-px, 0px) calc(var(--art-py, 0px) - 9px);
	}
}

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

.kyc-home__section {
	padding: clamp(3rem, 6vw, 5.5rem) 0;
}

.kyc-home__section--sunk {
	background: color-mix(in srgb, var(--card) 55%, transparent);
	border-block: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
}

.kyc-home__head {
	max-width: 46rem;
	margin-bottom: 2.75rem;
}

.kyc-home__kicker {
	font-size: 0.78rem;
	font-weight: 800;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--brand-strong);
}

.kyc-home__head h2 {
	font-family: var(--font-display);
	font-weight: var(--font-display-weight);
	font-variation-settings: var(--font-display-vars);
	font-size: clamp(1.9rem, 3.6vw, 2.7rem);
	margin-top: 0.7rem;
}

.kyc-home__head p {
	margin-top: 0.9rem;
	color: var(--ink-3);
	font-size: 1.05rem;
}

/* ------------------------------------------------------ how it works -- */

.kyc-home__steps {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 1.25rem;
	counter-reset: step;
}

.kyc-home__step {
	position: relative;
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	box-shadow: var(--clay);
	padding: 1.75rem 1.5rem 1.6rem;
}

.kyc-home__step::before {
	counter-increment: step;
	content: counter(step);
	position: absolute;
	top: -18px;
	left: 1.5rem;
	width: 38px;
	height: 38px;
	border-radius: 999px;
	display: grid;
	place-items: center;
	font-family: var(--font-display);
	font-weight: var(--font-display-weight);
	font-variation-settings: var(--font-display-vars);
	font-size: 1.05rem;
	/* The digit reads on the badge in both themes, which the two ends of the ramp
	 * have to be chosen for: light mode darkens the clay under a cream numeral
	 * (5.7:1 / 5.8:1, where the old white-tinted top stop gave 2.8:1), and dark
	 * mode — where --brand-strong inverts to a pale peach — keeps the badge bright
	 * and puts dark ink on it instead (6.5:1 / 7.7:1). */
	color: var(--step-num-ink, #fff8ee);
	background: linear-gradient(
		160deg,
		var(--step-num-from, color-mix(in srgb, var(--brand) 62%, #402310)),
		var(--step-num-to, var(--brand-strong))
	);
	box-shadow: 0 8px 18px rgba(198, 113, 57, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.kyc-home__step h3 {
	font-size: 1.08rem;
	margin-top: 0.9rem;
}

.kyc-home__step p {
	margin-top: 0.55rem;
	font-size: 0.95rem;
	color: var(--ink-3);
}

/* -------------------------------------------------------- capabilities -- */

.kyc-home__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 1.25rem;
}

.kyc-home__feature {
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	box-shadow: var(--clay);
	padding: 1.6rem 1.5rem;
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.kyc-home__feature:hover {
	transform: translateY(-3px);
	box-shadow: var(--clay-lifted);
}

.kyc-home__icon {
	width: 46px;
	height: 46px;
	border-radius: 15px;
	display: grid;
	place-items: center;
	background: var(--brand-tint);
	color: var(--brand-strong);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.kyc-home__icon svg {
	width: 24px;
	height: 24px;
}

.kyc-home__feature--sage .kyc-home__icon {
	background: var(--sage-soft);
	color: color-mix(in srgb, var(--sage) 78%, #2b3018);
}

.kyc-home__feature h3 {
	font-size: 1.05rem;
	margin-top: 1.1rem;
}

.kyc-home__feature p {
	margin-top: 0.5rem;
	font-size: 0.93rem;
	color: var(--ink-3);
}

/* ------------------------------------------------------------- footer -- */

.kyc-home__footer {
	padding: clamp(2.5rem, 5vw, 4rem) 0 2.5rem;
}

.kyc-home__footer-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1.75rem;
	padding-top: 2rem;
	border-top: 1px solid var(--line);
}

.kyc-home__footer-links {
	display: flex;
	flex-wrap: wrap;
	gap: 1.4rem;
	font-size: 0.92rem;
}

.kyc-home__footer-links a {
	color: var(--ink-3);
	font-weight: 600;
}

.kyc-home__colophon {
	font-size: 0.86rem;
	color: var(--ink-4);
	margin-top: 1.5rem;
}

/* The OPM/NDMA lockup sits on its own light plaque: the artwork is dark ink on
 * transparency, so it needs a bright ground to stay legible when the page is
 * fired dark. */
.kyc-home__powered {
	display: inline-flex;
	align-items: center;
	min-width: 0;
	max-width: 100%;
	padding: 0.9rem 1.5rem;
	border-radius: var(--radius-lg);
	background: #fffaf1;
	border: 1px solid var(--line);
	box-shadow: var(--clay);
}

.kyc-home__powered img {
	height: clamp(52px, 4.5vw, 84px);
	width: auto;
	display: block;
}

/* On the narrowest phones the plate is wider than the rail, and the page clips
 * its overflow — so the seal loses its right-hand edge. Below that width it
 * takes the width it is given and finds its own height. */
@media (max-width: 420px) {
	.kyc-home__powered {
		padding: 0.6rem 0.8rem;
	}

	.kyc-home__powered img {
		width: 100%;
		height: auto;
	}
}

/* ------------------------------------------------- the walkthrough film -- */

/* A verification, played end to end, in CSS alone.
 *
 * One master clock: every animation below runs 16s and repeats forever, and a
 * scene's parts share that scene's animation-delay, so nothing can drift out of
 * step the way four independent timers would. The cycle is four 4s acts —
 *
 *   0-4s   read the document      delay 0s
 *   4-8s   prove the person       delay 4s
 *   8-12s  match the two faces    delay 8s
 *   12-16s deliver the result     delay 12s
 *
 * — and each act's keyframes therefore do all their work inside the first 25%
 * of the cycle and sit still for the rest. No JavaScript, no video file: it
 * stays crisp at any size, recolours with the theme, and costs one repaint.
 */

.kyc-film {
	margin-top: 3.25rem;
}

.kyc-film__stage {
	position: relative;
	max-width: min(1180px, 100%);
	margin-inline: auto;
	/* The scenes inside are absolutely positioned and centred in a clipped box,
	 * so nothing in them can push it taller. Expressed only as a ratio, the box
	 * is a function of width alone and a reader whose default font is large —
	 * or who has zoomed — loses the bottom of the caption. The rem floor is the
	 * same box measured in the units its contents are actually set in. */
	aspect-ratio: 16 / 8.4;
	min-height: 30rem;
	border-radius: var(--radius-xl);
	background: var(--canvas);
	border: 1px solid var(--line);
	box-shadow: var(--clay-lifted);
	overflow: hidden;
	isolation: isolate;
}

.kyc-film__stage::before {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(80% 90% at 50% 0%, var(--brand-tint) 0%, transparent 62%),
		radial-gradient(70% 80% at 10% 100%, var(--sage-soft) 0%, transparent 60%);
	z-index: -1;
}

.kyc-film__scene {
	position: absolute;
	inset: 0;
	display: grid;
	place-content: center;
	justify-items: center;
	gap: 1.1rem;
	padding: clamp(1rem, 3vw, 2.25rem);
	max-width: 100%;
	opacity: 0;
	animation: kyc-film-scene 16s linear infinite;
}

.kyc-film__scene:nth-child(1) { animation-delay: calc(0s + var(--film-t, 0s)); }
.kyc-film__scene:nth-child(2) { animation-delay: calc(4s + var(--film-t, 0s)); }
.kyc-film__scene:nth-child(3) { animation-delay: calc(8s + var(--film-t, 0s)); }
.kyc-film__scene:nth-child(4) { animation-delay: calc(12s + var(--film-t, 0s)); }

@keyframes kyc-film-scene {
	0% { opacity: 0; transform: translateY(10px) scale(0.985); }
	3% { opacity: 1; transform: none; }
	22% { opacity: 1; transform: none; }
	25.5% { opacity: 0; transform: translateY(-8px) scale(0.99); }
	100% { opacity: 0; transform: translateY(10px) scale(0.985); }
}

.kyc-film__caption {
	max-width: 100%;
	text-align: center;
	font-weight: 700;
	color: var(--ink);
	font-size: clamp(0.95rem, 1.6vw, 1.15rem);
}

.kyc-film__caption small {
	display: block;
	margin-top: 0.3rem;
	font-weight: 500;
	font-size: 0.82em;
	color: var(--ink-3);
}

/* -- act one: the document ------------------------------------------------ */

.kyc-film__doc {
	position: relative;
	width: clamp(260px, 28vw, 500px);
	padding: 1.1rem 1.25rem 1.3rem;
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--clay);
	overflow: hidden;
}

.kyc-film__doc-top {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 0.9rem;
	font-size: 0.62rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--ink-4);
	font-weight: 700;
}

.kyc-film__doc-body {
	display: grid;
	grid-template-columns: 74px 1fr;
	gap: 1rem;
	margin-top: 0.85rem;
}

.kyc-film__face {
	aspect-ratio: 3 / 4;
	border-radius: 10px;
	background: linear-gradient(160deg, var(--card-2), color-mix(in srgb, var(--brand) 16%, var(--card-2)));
	border: 1px solid var(--line);
	display: grid;
	place-items: end center;
	overflow: hidden;
}

.kyc-film__face span {
	width: 60%;
	height: 44%;
	border-radius: 40% 40% 0 0;
	background: color-mix(in srgb, var(--brand) 36%, #ffffff);
	position: relative;
}

.kyc-film__face span::before {
	content: "";
	position: absolute;
	top: -50%;
	left: 50%;
	translate: -50% 0;
	width: 56%;
	aspect-ratio: 1;
	border-radius: 999px;
	background: color-mix(in srgb, var(--brand) 36%, #ffffff);
}

.kyc-film__rows {
	display: grid;
	gap: 0.45rem;
	align-content: center;
}

/* The read: each field lights up in turn as the decoder reaches it. */
.kyc-film__rows i {
	display: block;
	height: 8px;
	border-radius: 999px;
	background: var(--card-2);
	border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
	animation: kyc-film-read 16s linear infinite;
}

.kyc-film__rows i:nth-child(1) { width: 74%; animation-delay: calc(0.9s + var(--film-t, 0s)); }
.kyc-film__rows i:nth-child(2) { width: 92%; animation-delay: calc(1.3s + var(--film-t, 0s)); }
.kyc-film__rows i:nth-child(3) { width: 58%; animation-delay: calc(1.7s + var(--film-t, 0s)); }
.kyc-film__rows i:nth-child(4) { width: 80%; animation-delay: calc(2.1s + var(--film-t, 0s)); }

@keyframes kyc-film-read {
	0%, 100% { background: var(--card-2); }
	4%, 22% { background: color-mix(in srgb, var(--sage) 42%, var(--card-2)); }
}

.kyc-film__sweep {
	position: absolute;
	inset-inline: 0;
	top: 0;
	height: 30%;
	background: linear-gradient(
		180deg,
		transparent,
		color-mix(in srgb, var(--sage) 34%, transparent) 55%,
		transparent
	);
	animation: kyc-film-sweep 16s cubic-bezier(0.45, 0, 0.55, 1) infinite;
	animation-delay: var(--film-t, 0s);
}

@keyframes kyc-film-sweep {
	0% { transform: translateY(-110%); opacity: 0; }
	2% { opacity: 1; }
	16% { transform: translateY(340%); opacity: 1; }
	18%, 100% { transform: translateY(340%); opacity: 0; }
}

.kyc-film__mrz {
	margin-top: 0.9rem;
	padding: 0.45rem 0.55rem;
	border-radius: 8px;
	background: var(--card-2);
	font-family: var(--font-mono);
	font-size: 0.58rem;
	letter-spacing: 0.05em;
	color: var(--ink-3);
	white-space: nowrap;
	overflow: hidden;
}

/* -- act two: the person -------------------------------------------------- */

.kyc-film__selfie {
	position: relative;
	width: clamp(150px, 15vw, 250px);
	aspect-ratio: 1;
	border-radius: 999px;
	display: grid;
	place-items: center;
	background: radial-gradient(70% 70% at 50% 32%, color-mix(in srgb, var(--sage) 24%, var(--card)), var(--card));
	border: 1px solid var(--line);
	box-shadow: var(--clay);
	color: var(--sage);
}

.kyc-film__selfie svg {
	width: 46%;
	height: 46%;
}

/* Two rings leaving the face — the liveness check looking, not a loading spinner. */
.kyc-film__ring {
	position: absolute;
	inset: -6%;
	border-radius: 999px;
	border: 2px solid color-mix(in srgb, var(--sage) 55%, transparent);
	animation: kyc-film-ring 16s ease-out infinite;
	/* Act two opens at 4s; the rings leave the face in turn from there. */
	animation-delay: calc(4s + var(--film-t, 0s));
}

.kyc-film__ring:nth-of-type(2) { animation-delay: calc(4.7s + var(--film-t, 0s)); }
.kyc-film__ring:nth-of-type(3) { animation-delay: calc(5.4s + var(--film-t, 0s)); }

@keyframes kyc-film-ring {
	0% { transform: scale(0.86); opacity: 0; }
	3% { opacity: 0.9; }
	14% { transform: scale(1.16); opacity: 0; }
	100% { transform: scale(1.16); opacity: 0; }
}

.kyc-film__score {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.45rem 0.95rem;
	border-radius: 999px;
	background: var(--sage-soft);
	color: color-mix(in srgb, var(--sage) 72%, #2b3018);
	border: 1px solid color-mix(in srgb, var(--sage) 35%, transparent);
	font-family: var(--font-mono);
	font-size: 0.82rem;
	font-weight: 600;
}

/* -- act three: the match ------------------------------------------------- */

.kyc-film__match {
	display: grid;
	grid-template-columns: auto minmax(80px, 150px) auto;
	align-items: center;
	gap: clamp(0.5rem, 2vw, 1.25rem);
}

.kyc-film__thumb {
	width: clamp(84px, 9vw, 156px);
	aspect-ratio: 3 / 4;
	border-radius: 14px;
	background: linear-gradient(160deg, var(--card-2), color-mix(in srgb, var(--brand) 14%, var(--card-2)));
	border: 1px solid var(--line);
	box-shadow: var(--clay);
	display: grid;
	place-items: end center;
	overflow: hidden;
	position: relative;
}

.kyc-film__thumb--live {
	border-radius: 999px;
	aspect-ratio: 1;
	background: radial-gradient(70% 70% at 50% 32%, color-mix(in srgb, var(--sage) 22%, var(--card)), var(--card));
	place-items: center;
	color: var(--sage);
}

.kyc-film__thumb--live svg {
	width: 46%;
	height: 46%;
}

.kyc-film__thumb span {
	width: 58%;
	height: 44%;
	border-radius: 40% 40% 0 0;
	background: color-mix(in srgb, var(--brand) 36%, #ffffff);
	position: relative;
}

.kyc-film__thumb span::before {
	content: "";
	position: absolute;
	top: -50%;
	left: 50%;
	translate: -50% 0;
	width: 56%;
	aspect-ratio: 1;
	border-radius: 999px;
	background: color-mix(in srgb, var(--brand) 36%, #ffffff);
}

/* The measurement being taken: a dashed line drawn between the two faces. */
.kyc-film__tie {
	position: relative;
	height: 2px;
	background: repeating-linear-gradient(
		90deg,
		var(--line-strong) 0 6px,
		transparent 6px 12px
	);
	transform-origin: left center;
	animation: kyc-film-tie 16s ease-out infinite;
	/* Act three opens at 8s — without this the line finished drawing in act one,
	 * off screen, and arrived already complete. */
	animation-delay: calc(8s + var(--film-t, 0s));
}

@keyframes kyc-film-tie {
	0% { transform: scaleX(0); }
	6% { transform: scaleX(0); }
	13% { transform: scaleX(1); }
	100% { transform: scaleX(1); }
}

/* -- act four: the delivery ----------------------------------------------- */

.kyc-film__verdict {
	display: inline-flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.85rem 1.4rem;
	border-radius: 999px;
	background: var(--card);
	border: 1px solid color-mix(in srgb, var(--sage) 40%, transparent);
	box-shadow: var(--clay);
	animation: kyc-film-stamp 16s cubic-bezier(0.2, 1.4, 0.4, 1) infinite;
	animation-delay: calc(12s + var(--film-t, 0s));
}

@keyframes kyc-film-stamp {
	0% { transform: scale(1.35); opacity: 0; }
	4% { transform: scale(1); opacity: 1; }
	100% { transform: scale(1); opacity: 1; }
}

.kyc-film__verdict-mark {
	width: 30px;
	height: 30px;
	border-radius: 999px;
	display: grid;
	place-items: center;
	background: var(--sage);
	color: #fdf9f0;
}

.kyc-film__verdict-mark svg { width: 16px; height: 16px; }

.kyc-film__verdict b { color: var(--ink); }

.kyc-film__wire {
	position: relative;
	display: grid;
	grid-template-columns: auto minmax(190px, 330px) auto;
	align-items: center;
	gap: 0.75rem;
	font-size: 0.78rem;
	font-weight: 700;
	color: var(--ink-3);
}

.kyc-film__endpoint {
	padding: 0.5rem 0.85rem;
	border-radius: 12px;
	background: var(--card);
	border: 1px solid var(--line);
	box-shadow: var(--clay);
	white-space: nowrap;
}

.kyc-film__track {
	position: relative;
	height: 2px;
	background: repeating-linear-gradient(90deg, var(--line-strong) 0 6px, transparent 6px 12px);
}

/* The signed event itself, crossing the wire to the consumer. */
.kyc-film__packet {
	position: absolute;
	top: 50%;
	left: 0;
	translate: 0 -50%;
	padding: 0.2rem 0.5rem;
	border-radius: 999px;
	/* --brand-strong in light mode (5.8:1 under the cream label); in dark it
	 * inverts to a pale tone, so the pairing flips in the dark block below. */
	background: var(--packet-bg, var(--brand-strong));
	color: var(--packet-ink, #fff8ef);
	font-family: var(--font-mono);
	font-size: 0.58rem;
	font-weight: 700;
	white-space: nowrap;
	box-shadow: 0 6px 14px color-mix(in srgb, var(--brand) 45%, transparent);
	animation: kyc-film-packet 16s cubic-bezier(0.5, 0, 0.3, 1) infinite;
	animation-delay: calc(12s + var(--film-t, 0s));
}

@keyframes kyc-film-packet {
	0%, 5% { left: 0; opacity: 0; }
	7% { opacity: 1; }
	17% { left: 100%; translate: -100% -50%; opacity: 1; }
	20%, 100% { left: 100%; translate: -100% -50%; opacity: 0; }
}

.kyc-film__ok {
	font-family: var(--font-mono);
	font-size: 0.72rem;
	color: color-mix(in srgb, var(--sage) 72%, #2b3018);
	animation: kyc-film-ok 16s ease-out infinite;
	animation-delay: calc(12s + var(--film-t, 0s));
	opacity: 0;
}

@keyframes kyc-film-ok {
	0%, 17% { opacity: 0; }
	19%, 100% { opacity: 1; }
}

/* -- the timeline under the stage ----------------------------------------- */

.kyc-film__chips {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.6rem;
	margin-top: 1.5rem;
}

.kyc-film__chip {
	padding: 0.45rem 1rem;
	border-radius: 999px;
	font-size: 0.85rem;
	font-weight: 700;
	font-family: inherit;
	color: var(--ink-4);
	background: var(--card);
	border: 1px solid var(--line);
	animation: kyc-film-chip 16s linear infinite;
}

/* With the script in, each chip is the control for its own scene: pressing one
 * moves the whole stage to it. Without it they stay what they were — four
 * labels lighting up in turn. */
/* Disabled is the state the template ships them in — it lasts until the script
 * enables them, and forever without it — so it must not read as broken. */
.kyc-film__chip:disabled {
	opacity: 1;
	cursor: default;
}

.kyc-live .kyc-film__chip {
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.kyc-live .kyc-film__chip:hover {
	transform: translateY(-2px);
	box-shadow: var(--clay);
}

.kyc-live .kyc-film__chip:active {
	transform: translateY(1px);
}

.kyc-film__chip:focus-visible {
	outline: 2px solid var(--brand);
	outline-offset: 3px;
}

/* -- taking hold of the film ---------------------------------------------- */

/* One clock runs the whole stage, so one rule stops it — under the pointer,
 * under a keyboard, or once the film has scrolled away and nobody is watching
 * the frames being drawn. */
.kyc-film.is-held .kyc-film__stage *,
.kyc-film.is-held .kyc-film__chip,
.kyc-film.is-away .kyc-film__stage *,
.kyc-film.is-away .kyc-film__chip {
	animation-play-state: paused;
}

/* Cueing: the clock is shifted by --film-t, and the animations have to be taken
 * away and given back for the new delay to count. The class is removed in the
 * same frame it is added — it exists for one reflow. */
/* The hero's three infinite animations, once it has scrolled away. */
.kyc-home__art.is-away * {
	animation-play-state: paused;
}

.kyc-film.is-cueing .kyc-film__stage *,
.kyc-film.is-cueing .kyc-film__chip {
	animation-name: none !important;
}

/* The stage says which scene is up, for a reader who is not watching it move. */
.kyc-film.is-held .kyc-film__stage::after {
	content: "Paused";
	position: absolute;
	right: 12px;
	bottom: 10px;
	padding: 0.2rem 0.6rem;
	border-radius: 999px;
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--ink-4);
	background: color-mix(in srgb, var(--card) 80%, transparent);
	border: 1px solid var(--line);
}

.kyc-film__chip:nth-child(1) { animation-delay: calc(0s + var(--film-t, 0s)); }
.kyc-film__chip:nth-child(2) { animation-delay: calc(4s + var(--film-t, 0s)); }
.kyc-film__chip:nth-child(3) { animation-delay: calc(8s + var(--film-t, 0s)); }
.kyc-film__chip:nth-child(4) { animation-delay: calc(12s + var(--film-t, 0s)); }

@keyframes kyc-film-chip {
	0%, 25%, 100% {
		color: var(--ink-4);
		background: var(--card);
		border-color: var(--line);
	}
	2%, 23% {
		color: var(--brand-strong);
		background: var(--brand-tint);
		border-color: color-mix(in srgb, var(--brand) 30%, transparent);
	}
}

/* --------------------------------------------------------- keyboard --- */

/* The way past a header and two nav lists, for anyone arriving by keyboard.
 * Off-screen rather than display:none, so it is reachable by tab and only
 * visible once it has been reached. */
.kyc-home__skip {
	position: absolute;
	left: 12px;
	top: -60px;
	z-index: 60;
	padding: 0.6rem 1.1rem;
	border-radius: 999px;
	font-weight: 700;
	color: var(--brand-strong);
	background: var(--card);
	border: 1px solid var(--line);
	box-shadow: var(--clay-lifted);
	transition: top 0.18s ease;
}

.kyc-home__skip:focus {
	top: 12px;
	text-decoration: none;
}

/* The section links move the page rather than jump it, and everything that can
 * be reached by tab says so in the page's own colour. */
html:has(.kyc-home) {
	scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
	html:has(.kyc-home) {
		scroll-behavior: auto;
	}
}

.kyc-home a:focus-visible,
.kyc-home button:focus-visible {
	outline: 2px solid var(--brand);
	outline-offset: 3px;
	border-radius: 8px;
}

/* ----------------------------------------------------------- arriving -- */

/* Sections come in as they are reached. kyc_home.js only marks what is still
 * below the fold when it runs, so nothing already on screen is hidden and shown
 * again — the class exists on an element for as long as it takes to scroll to
 * it, and never on one the reader has already looked at. */
.kyc-reveal {
	opacity: 0;
	translate: 0 18px;
	transition: opacity 0.6s ease, translate 0.7s cubic-bezier(0.2, 0.85, 0.3, 1);
	transition-delay: var(--reveal-delay, 0ms);
}

.kyc-reveal.is-in {
	opacity: 1;
	translate: 0 0;
}

/* ---------------------------------------------------------- the light -- */

/* A warm light under the pointer. The card carries it; the script only says
 * where the cursor is, in the card's own coordinates.
 *
 * On ::after, deliberately. It was written on ::before, which is where the step
 * cards keep their number — same pseudo-element, higher specificity, later in
 * the file — so turning the light on quietly deleted "1 2 3 4" from the four
 * steps on every load. Nothing else in this file uses ::after on either card.
 * The badge overhangs its card by 18px, so this cannot clip, and it takes the
 * card's own radius rather than showing square corners over the rounding. */
.kyc-live .kyc-home__feature,
.kyc-live .kyc-home__step {
	position: relative;
	isolation: isolate;
}

.kyc-live .kyc-home__feature::after,
.kyc-live .kyc-home__step::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	border-radius: inherit;
	background: radial-gradient(
		220px 180px at var(--mx, 50%) var(--my, 0%),
		color-mix(in srgb, var(--brand) 13%, transparent),
		transparent 70%
	);
	opacity: 0;
	transition: opacity 0.3s ease;
	pointer-events: none;
}

.kyc-live .kyc-home__feature:hover::after,
.kyc-live .kyc-home__step:hover::after {
	opacity: 1;
}

.kyc-live .kyc-home__feature--sage::after {
	background: radial-gradient(
		220px 180px at var(--mx, 50%) var(--my, 0%),
		color-mix(in srgb, var(--sage) 16%, transparent),
		transparent 70%
	);
}

/* ------------------------------------------------------------- depth --- */

/* The artwork answers the pointer, each piece by its own amount — the plate
 * furthest back barely moves, the selfie clipped to the front moves most. The
 * two cards that float do it inside their own keyframes, below, so the drift
 * and the float never have to know about each other. */
.kyc-home__art {
	--px: 0px;
	--py: 0px;
}

.kyc-home__art-plate {
	translate: calc(var(--px) * 0.12) calc(var(--py) * 0.12);
	transition: translate 0.6s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.kyc-home__id {
	translate: calc(var(--px) * 0.3) calc(var(--py) * 0.3);
	transition: translate 0.5s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.kyc-home__selfie {
	--art-px: calc(var(--px) * 0.7);
	--art-py: calc(var(--py) * 0.7);
}

.kyc-home__verdict {
	--art-px: calc(var(--px) * 0.5);
	--art-py: calc(var(--py) * 0.5);
}

/* --------------------------------------------------------- responsive -- */

@media (max-width: 1080px) {
	.kyc-home__steps,
	.kyc-home__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* Tablet: the two-column hero and developer split stop paying their way well
 * before the section links stop fitting, so they part company at their own
 * widths rather than at one catch-all breakpoint. */
@media (max-width: 1100px) {
	.kyc-home__nav-links {
		gap: 1.1rem;
	}

	.kyc-home__nav-links a {
		font-size: 0.9rem;
	}
}

@media (max-width: 900px) {
	.kyc-home__hero {
		grid-template-columns: minmax(0, 1fr);
	}

	.kyc-home__art {
		order: -1;
	}

	.kyc-home__wrap {
		width: min(1560px, 100% - 2rem);
	}

	.kyc-home__nav-inner {
		gap: 1rem;
	}
}

/* Narrower still and the wordmark is what has to give: it is 125px of a rail
 * that is 288px wide at 320px, and without it the mark and the button fit. */
@media (max-width: 400px) {
	.kyc-home__brand-name {
		display: none;
	}

	.kyc-home .kyc-home__btn {
		padding: 0.6rem 1rem;
		font-size: 0.9rem;
	}
}

/* Below this the brand, the links and the button stop sharing a line; the
 * links live on in the footer, which is where a phone reader looks for them. */
@media (max-width: 720px) {
	.kyc-home__nav-links {
		display: none;
	}
}

@media (max-width: 760px) {
	/* The acts are laid out absolutely, so the stage needs a height of its own —
	 * a 16:8.4 letterbox is shorter than the props at phone widths and would
	 * crop the caption clean off. */
	.kyc-film__stage {
		aspect-ratio: auto;
		/* In rem as well as px, for the same reason as the floor above: the acts
		 * are set in rem and a large default font grows them past 380px. */
		min-height: max(380px, 26rem);
	}

	/* The delivery wire is the widest thing on the stage: two endpoint chips and
	 * a track long enough for the event to travel. Let the track collapse to
	 * whatever is left rather than push the act past the screen. */
	.kyc-film__wire {
		grid-template-columns: auto minmax(50px, 1fr) auto;
		gap: 0.5rem;
		font-size: 0.72rem;
		max-width: 100%;
	}

	.kyc-film__endpoint {
		padding: 0.4rem 0.6rem;
	}

	.kyc-film__packet {
		font-size: 0.5rem;
		padding: 0.15rem 0.4rem;
	}

	.kyc-film__ok {
		font-size: 0.66rem;
	}
}

/* Phone: side by side, the event chip is wider than the track it travels along
 * and ends up sitting on top of the endpoints. Stand the wire up instead — the
 * journey reads the same going down. */
@media (max-width: 560px) {
	.kyc-film__wire {
		grid-template-columns: minmax(0, 1fr);
		justify-items: center;
		gap: 0.45rem;
	}

	.kyc-film__track {
		width: 2px;
		height: 58px;
		background: repeating-linear-gradient(180deg, var(--line-strong) 0 6px, transparent 6px 12px);
	}

	.kyc-film__packet {
		top: 0;
		left: 50%;
		translate: -50% 0;
		animation-name: kyc-film-packet-down;
	}
}

@keyframes kyc-film-packet-down {
	0%,
	5% {
		top: 0;
		opacity: 0;
	}
	7% {
		opacity: 1;
	}
	17% {
		top: 100%;
		opacity: 1;
	}
	20%,
	100% {
		top: 100%;
		opacity: 0;
	}
}

@media (max-width: 560px) {
	.kyc-home {
		font-size: 16px;
	}

	.kyc-home__section {
		padding: clamp(2.5rem, 9vw, 3.5rem) 0;
	}

	.kyc-home__head {
		margin-bottom: 2rem;
	}

	/* Full-width buttons beat two half-width ones a thumb has to aim between. */
	.kyc-home__cta {
		gap: 0.7rem;
	}

	.kyc-home .kyc-home__cta .kyc-home__btn {
		flex: 1 1 100%;
		justify-content: center;
	}

	/* The document card is rotated, so a width that fits upright does not: pull
	 * it in until the corner clears the viewport. */
	.kyc-home__id {
		width: min(316px, 84%);
		transform: rotate(-2deg);
	}

	.kyc-home__selfie {
		right: 5%;
	}

	.kyc-home__steps,
	.kyc-home__grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.kyc-home__selfie {
		width: 108px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.kyc-home *,
	.kyc-home *::before,
	.kyc-home *::after {
		animation: none !important;
		transition: none !important;
	}

	/* Every scene fades in from opacity 0, so with the clock stopped the stage
	 * would be blank. Hold the last act — the result, delivered — as a still. */
	.kyc-film__scene {
		opacity: 0;
	}

	.kyc-film__scene:nth-child(4) {
		opacity: 1;
	}

	.kyc-film__ok {
		opacity: 1;
	}

	.kyc-film__chip:nth-child(4) {
		color: var(--brand-strong);
		background: var(--brand-tint);
		border-color: color-mix(in srgb, var(--brand) 30%, transparent);
	}

	/* The chips still work: with the clock stopped they choose which still is on
	 * the stage, which is the whole of the film that is left to look at. The
	 * attribute only exists once kyc_home.js is running, so the four rules above
	 * remain the answer when it is not. */
	.kyc-film[data-scene] .kyc-film__scene,
	.kyc-film[data-scene] .kyc-film__chip {
		opacity: 0;
		color: var(--ink-4);
		background: var(--card);
		border-color: var(--line);
	}

	.kyc-film[data-scene] .kyc-film__chip {
		opacity: 1;
	}

	.kyc-film[data-scene="0"] .kyc-film__scene:nth-child(1) {
		opacity: 1;
	}

	.kyc-film[data-scene="0"] .kyc-film__chip:nth-child(1) {
		color: var(--brand-strong);
		background: var(--brand-tint);
		border-color: color-mix(in srgb, var(--brand) 30%, transparent);
	}

	.kyc-film[data-scene="1"] .kyc-film__scene:nth-child(2) {
		opacity: 1;
	}

	.kyc-film[data-scene="1"] .kyc-film__chip:nth-child(2) {
		color: var(--brand-strong);
		background: var(--brand-tint);
		border-color: color-mix(in srgb, var(--brand) 30%, transparent);
	}

	.kyc-film[data-scene="2"] .kyc-film__scene:nth-child(3) {
		opacity: 1;
	}

	.kyc-film[data-scene="2"] .kyc-film__chip:nth-child(3) {
		color: var(--brand-strong);
		background: var(--brand-tint);
		border-color: color-mix(in srgb, var(--brand) 30%, transparent);
	}

	.kyc-film[data-scene="3"] .kyc-film__scene:nth-child(4) {
		opacity: 1;
	}

	.kyc-film[data-scene="3"] .kyc-film__chip:nth-child(4) {
		color: var(--brand-strong);
		background: var(--brand-tint);
		border-color: color-mix(in srgb, var(--brand) 30%, transparent);
	}
}

/* ----------------------------------------------------------- dark mode -- */

@media (prefers-color-scheme: dark) {
	.kyc-home {
		--brand: #dd8b4e;
		--brand-strong: color-mix(in srgb, var(--brand) 76%, #ffd7b4);
		--brand-soft: color-mix(in srgb, var(--brand) 16%, #1b1713);
		--brand-tint: color-mix(in srgb, var(--brand) 26%, #1b1713);
		--sage: #9fb07c;
		--sage-soft: color-mix(in srgb, var(--sage) 18%, #1b1713);

		--canvas: #17130f;
		--card: #221c17;
		--card-2: #2b241d;
		--line: #3a3129;
		--line-strong: #4a3f34;

		--ink: #f6ece0;
		--ink-2: #e2d5c6;
		--ink-3: #bcae9d;
		--ink-4: #97897a;

		/* The step badge, the other way up: bright clay, dark ink. */
		--step-num-ink: #2a1608;
		--step-num-from: var(--brand);
		--step-num-to: var(--brand-strong);

		--clay: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 26px rgba(0, 0, 0, 0.45),
			inset 0 1px 0 rgba(255, 255, 255, 0.05);
		--clay-lifted: 0 2px 6px rgba(0, 0, 0, 0.45), 0 26px 60px rgba(0, 0, 0, 0.55),
			inset 0 1px 0 rgba(255, 255, 255, 0.07);
	}

	body:has(.kyc-home) {
		background: #17130f;
	}

	/* The call to action, which inherits a lighter clay at night than the light
	 * palette's and carried a near-black label at 3.5:1. Its own ramp, its own
	 * ink: 8.0:1 at the top of the gradient, 6.4:1 at the foot. */
	.kyc-home .kyc-home__btn--primary {
		background: linear-gradient(180deg, #e79a5f, #d9853f);
		color: #231104;
	}

	/* Dark ink on bright clay, the other way up from the light palette. */
	.kyc-home {
		--packet-bg: var(--brand);
		--packet-ink: #2a1508;
	}

}
