/* Over ons (templates/about.php, assets/js/about.js).
 *
 * Drie delen: de oprichters in de kop, het verhaal als tijdlijn die zich
 * tekent bij het scrollen, en "Zo werken we" als drie voorbeelden in de stijl
 * van het dashboard (zelfde kaart als .fx-card op de functiepagina).
 *
 * Regels van de site: alleen tokens (licht en donker), rood alleen als accent,
 * beweging is doorzichtig → zichtbaar met een stukje omhoog, nooit wazig en
 * niets herhaalt zich. ZONDER SCRIPT IS DIT BESTAND DE EINDSTAND: lijn
 * getekend, alle stappen zichtbaar, voorbeelden uitgeklapt. Het script zet
 * .is-armed en pas daarmee gelden de beginstanden hieronder. */

/* ================================================================ kop */
.ab-hero {
	padding-bottom: clamp(40px, calc(6vw / var(--vz, 1)), 80px);
}

.ab-team {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(10px, calc(2vw / var(--vz, 1)), 24px);
	margin: clamp(32px, calc(5vw / var(--vz, 1)), 56px) 0 0;
	padding: 0;
	list-style: none;
}

.ab-person {
	display: flex;
	flex-direction: column;
	min-width: 0;
	border: 1px solid var(--line);
	border-radius: var(--radius-card);
	background: var(--card);
	overflow: hidden;
}

/* De tegel: een getekend figuurtje zolang er geen foto is. Een foto
 * (img.ab-face) vult hetzelfde vlak. */
.ab-face {
	position: relative;
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: var(--paper-2);
	border-bottom: 1px solid var(--line);
	object-fit: cover;
	object-position: 50% 25%;
}

/* Breed: een lage tegel zolang er een figuurtje in staat. */
@media (min-width: 761px) {
	span.ab-face {
		aspect-ratio: 2 / 1;
	}
}

/* Het figuurtje (templates/about.php): lijnstijl van de iconen, zwart op de
 * tegel (wit in donker via --ink), rood alleen in één detail. Het bovenlijf
 * loopt door de onderrand van de tegel. */
.ab-fig {
	position: absolute;
	left: 50%;
	bottom: 0;
	height: 84%;
	width: auto;
	translate: -50% 0;
	overflow: visible;
	fill: none;
	stroke: var(--ink);
	stroke-width: 2.4;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.ab-fig-dot {
	fill: var(--ink);
	stroke: none;
}

/* Wat vóór het lijf staat (hand, pakket, laptop) dekt de lijnen erachter af. */
.ab-fig-solid {
	fill: var(--paper-2);
}

.ab-fig-red {
	stroke: var(--red);
}

.ab-fig-reddot {
	fill: var(--red);
	stroke: none;
}

.ab-fig-arm,
.ab-fig-head,
.ab-fig-eyes {
	transform-box: view-box;
}

/* Eén keer, kort na het laden (about.js zet .is-live): zwaaien, knikken,
 * knipogen. Daarna staan ze stil. */
@media (prefers-reduced-motion: no-preference) {
	.ab-team.is-live .ab-fig-1 .ab-fig-arm {
		transform-origin: 87px 66px;
		animation: ab-wave 1.5s ease-in-out 0.7s 1 both;
	}

	.ab-team.is-live .ab-fig-1 .ab-fig-red {
		animation: ab-ticks 1.5s ease-in-out 0.7s 1 both;
	}

	.ab-team.is-live .ab-fig-2 .ab-fig-head {
		animation: ab-nod 1.1s ease-in-out 1.5s 1 both;
	}

	.ab-team.is-live .ab-fig-3 .ab-fig-eyes {
		transform-origin: 60px 33px;
		animation: ab-blink 1.3s ease-in-out 2.1s 1 both;
	}

	@keyframes ab-wave {
		0%, 100% { rotate: 0deg; }
		18% { rotate: 13deg; }
		38% { rotate: -9deg; }
		58% { rotate: 11deg; }
		78% { rotate: -6deg; }
	}

	@keyframes ab-ticks {
		0% { opacity: 0; }
		20%, 100% { opacity: 1; }
	}

	@keyframes ab-nod {
		0%, 100% { translate: 0 0; }
		28% { translate: 0 3.5px; }
		52% { translate: 0 0; }
		76% { translate: 0 2.5px; }
	}

	@keyframes ab-blink {
		0%, 22%, 44%, 66%, 100% { scale: 1 1; }
		33%, 55% { scale: 1 0.1; }
	}
}

.ab-who {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 2px 12px;
	padding: clamp(10px, calc(1.6vw / var(--vz, 1)), 16px) clamp(12px, calc(2vw / var(--vz, 1)), 24px);
}

.ab-name {
	font-size: clamp(0.9rem, 0.8rem + calc(0.5vw / var(--vz, 1)), 1.15rem);
	font-weight: 700;
	letter-spacing: -0.01em;
	line-height: 1.25;
}

.ab-role {
	flex-basis: 100%;
	font-size: 0.9rem;
	color: var(--graphite);
}

.ab-in {
	margin-left: auto;
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--ink);
}

.ab-follow {
	margin-top: 20px;
}

@media (prefers-reduced-motion: no-preference) {
	.page-hero.ab-hero .wrap > .ab-team { animation-delay: 0.24s; }
	.page-hero.ab-hero .wrap > .ab-follow { animation-delay: 0.3s; }
}

/* ============================================================ verhaal */
@media (min-width: 901px) {
	.ab-story-head {
		position: sticky;
		top: calc(var(--header-h) + 40px);
	}
}

.ab-line {
	position: relative;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* De rail (grijs) en de getekende lijn (zwart) eroverheen. --p loopt van 0
 * naar 1 met het scrollen (about.js); zonder script staat hij op 1. Onder de
 * laatste punt dekt .ab-now::after de rail af, zodat de lijn bij "Vandaag"
 * ophoudt en niet doorloopt tot onder de getallen. */
.ab-line::before,
.ab-line::after {
	content: "";
	position: absolute;
	left: 7px;
	top: 10px;
	bottom: 0;
	width: 2px;
	background: var(--line);
}

.ab-line::after {
	background: var(--ink);
	transform-origin: 50% 0;
	transform: scaleY(var(--p, 1));
}

.ab-step {
	position: relative;
	padding: 0 0 clamp(28px, calc(4vw / var(--vz, 1)), 44px) 44px;
}

.ab-step:last-child {
	padding-bottom: 0;
}

.ab-step::before {
	content: "";
	position: absolute;
	z-index: 2;
	left: 0;
	top: 4px;
	width: 16px;
	height: 16px;
	border: 2px solid var(--ink);
	border-radius: 50%;
	background: var(--ink);
	box-shadow: 0 0 0 4px var(--paper);
}

.ab-now::before {
	border-color: var(--red);
	background: var(--red);
}

.ab-now::after {
	content: "";
	position: absolute;
	z-index: 1;
	left: 0;
	top: 12px;
	bottom: 0;
	width: 16px;
	background: var(--paper);
}

.ab-when {
	font-size: 0.9rem;
	font-weight: 700;
	line-height: 24px;
	color: var(--muted);
	font-variant-numeric: tabular-nums;
}

.ab-step h3 {
	margin-top: 2px;
	font-size: clamp(1.25rem, 1.1rem + calc(0.5vw / var(--vz, 1)), 1.5rem);
	line-height: 1.2;
	letter-spacing: -0.02em;
}

.ab-step h3 + p {
	margin-top: 8px;
	max-width: 34em;
	color: var(--graphite);
}

.ab-facts {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	margin: 18px 0 0;
	border-block: 1px solid var(--line);
}

.ab-facts > div {
	display: flex;
	flex-direction: column-reverse;
	justify-content: flex-end;
	gap: 4px;
	padding: 18px 12px 18px 18px;
	border-left: 1px solid var(--line);
}

.ab-facts > div:first-child {
	padding-left: 0;
	border-left: 0;
}

.ab-facts dt {
	font-size: 0.9rem;
	line-height: 1.3;
	color: var(--graphite);
}

.ab-facts dd {
	margin: 0;
	font-size: clamp(2.2rem, 1.6rem + calc(2vw / var(--vz, 1)), 3.25rem);
	font-weight: 800;
	line-height: 1;
	letter-spacing: -0.04em;
	font-variant-numeric: tabular-nums;
	color: var(--ink);
}

.ab-foot {
	margin-top: 12px;
	font-size: 0.85rem;
	color: var(--muted);
}

@media (max-width: 560px) {
	.ab-step {
		padding-left: 34px;
	}

	.ab-facts {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.ab-facts > div:nth-child(odd) {
		padding-left: 0;
		border-left: 0;
	}

	.ab-facts > div:nth-child(n+3) {
		border-top: 1px solid var(--line);
	}
}

/* Beginstand met script: stappen onzichtbaar tot de lijn er is. */
@media (prefers-reduced-motion: no-preference) {
	.ab-line.is-armed .ab-step > * {
		opacity: 0;
		translate: 0 16px;
	}

	.ab-line.is-armed .ab-step::before {
		border-color: var(--line);
		background: var(--paper);
		transition: background-color 0.3s ease, border-color 0.3s ease;
	}

	.ab-line.is-armed .ab-step.is-on > * {
		opacity: 1;
		translate: 0 0;
		transition:
			opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1) var(--d, 0s),
			translate 0.9s cubic-bezier(0.16, 1, 0.3, 1) var(--d, 0s);
	}

	.ab-line.is-armed .ab-step.is-on > :nth-child(2) { --d: 0.06s; }
	.ab-line.is-armed .ab-step.is-on > :nth-child(3) { --d: 0.12s; }
	.ab-line.is-armed .ab-step.is-on > :nth-child(4) { --d: 0.18s; }

	.ab-line.is-armed .ab-step.is-on::before {
		border-color: var(--ink);
		background: var(--ink);
	}

	.ab-line.is-armed .ab-now.is-on::before {
		border-color: var(--red);
		background: var(--red);
	}
}

/* ======================================================= zo werken we */
.ab-rules {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	grid-template-rows: auto auto 1fr;
	column-gap: 24px;
}

.ab-rule {
	display: grid;
	grid-row: span 3;
	grid-template-rows: subgrid;
	min-width: 0;
}

.ab-rule h3 {
	font-size: clamp(1.2rem, 1.1rem + calc(0.4vw / var(--vz, 1)), 1.4rem);
	line-height: 1.25;
}

.ab-cap {
	margin-top: 8px;
	color: var(--graphite);
}

@media (max-width: 1000px) {
	.ab-rules {
		grid-template-columns: minmax(0, 1fr);
		grid-template-rows: none;
		row-gap: clamp(36px, calc(6vw / var(--vz, 1)), 48px);
		max-width: 34rem;
	}

	.ab-rule {
		display: block;
	}
}

/* Het echte scherm onder elke regel: een uitsnede van de telefoonweergave
 * van het dashboard (scripts/productverhaal/features.mjs). Scherp; in beeld
 * (about.js, .is-lit) of onder de muis zakt de rest iets weg en blijft het
 * deel helder dat de regel bewijst (--fy, --fh: plek en hoogte als deel van
 * de uitsnede). Geen gekleurde rand, geen gloed. */
.ab-shot {
	margin: 20px 0 0;
	display: grid;
	align-content: start;
	gap: 10px;
}

.ab-frame {
	position: relative;
	aspect-ratio: 990 / 1100;
	overflow: hidden;
	border: 1px solid var(--line);
	border-radius: var(--radius-card);
	background: #ffffff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 14px 30px -20px rgba(0, 0, 0, 0.18);
	isolation: isolate;
}

.ab-frame img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: left top;
	border: 0;
	border-radius: 0;
}

.ab-frame .ab-dark {
	display: none;
}

.ab-dim {
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.6s ease;
}

.ab-dim i {
	position: absolute;
	left: 0;
	right: 0;
	background: rgba(23, 23, 23, 0.1);
	-webkit-backdrop-filter: blur(0.6px) saturate(0.8);
	backdrop-filter: blur(0.6px) saturate(0.8);
}

/* boven en onder het deel */
.ab-dim i:first-child {
	top: 0;
	height: calc(var(--fy) * 100%);
}

.ab-dim i:last-child {
	top: calc((var(--fy) + var(--fh)) * 100%);
	bottom: 0;
}

.ab-shot.is-lit .ab-dim {
	opacity: 1;
}

@media (hover: hover) {
	.ab-frame:hover .ab-dim {
		opacity: 1;
	}
}

.ab-shot figcaption {
	color: var(--muted);
	font-size: 0.85rem;
}

@media (prefers-reduced-motion: reduce) {
	.ab-dim {
		transition: none;
	}
}

@media screen {
	html[data-theme="dark"] .ab-frame {
		background: #171717;
		box-shadow: none;
	}

	html[data-theme="dark"] .ab-frame .ab-light {
		display: none;
	}

	html[data-theme="dark"] .ab-frame .ab-dark {
		display: block;
	}

	html[data-theme="dark"] .ab-dim i {
		background: rgba(0, 0, 0, 0.36);
	}
}

/* ============================================================ contact */
.ab-contact-section {
	padding-bottom: 0;
}

.ab-contact {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 8px 24px;
	padding: 20px 24px;
	border: 1px solid var(--line);
	border-radius: var(--radius-card);
	background: var(--card);
}

.ab-contact p {
	font-size: 1.05rem;
	color: var(--graphite);
}

.ab-contact p a {
	font-weight: 700;
	color: var(--ink);
}

.ab-contact .link-arrow {
	margin-left: auto;
}

@media (max-width: 600px) {
	.ab-contact {
		padding: 16px 18px;
	}

	.ab-contact .link-arrow {
		margin-left: 0;
	}
}
