/*
 * ANPS Agency: base.css (global, handle `anps-base`, also loaded as editor style)
 * =============================================================================
 * Everything shared by two or more design pages. Page sections live in
 * assets/css/<context>.css (home, service, work, blog, post, contact), header /
 * menu / footer / loader in assets/css/chrome.css. Port page CSS from
 * design/design/html/*.html using the design's short variables below.
 *
 * GLOBAL DECISIONS
 * - theme.json `styles.spacing.blockGap` is 0. Core layouts (flow, flex,
 *   constrained, the site-blocks root) add NO margins or gaps by themselves:
 *   every space comes from the design classes in context CSS, exactly like
 *   the static design. Where a core container needs a gap (core/buttons,
 *   flex groups), set it on the block (`"style":{"spacing":{"blockGap":"16px"}}`)
 *   or in context CSS. `.prose` (post body) owns its own vertical rhythm.
 * - Body text is 16px / line-height normal / -0.01em (the design's `.page`
 *   has no font-size or line-height), so unclassed text matches the design.
 * - Design sections: `core/group` tagName section + align full, inner group
 *   className `wrap` (+ `g12`), `"layout":{"type":"default"}`. Never use the
 *   constrained layout for design sections (it caps children at 760px).
 * - Breakpoints (the design's): 1200 (nav collapses, .wrap 40px), 900
 *   (tablet: context grids go 2 columns), 600 (mobile layout = 390 designs).
 *   Mobile type/button/label sizes below follow design/html/*-mobile.html.
 *
 * CLASS INVENTORY
 * Tokens      --paper --py --y --yh --yfill --yline --olive --g1 --g2 --ink
 *             --ink2 --dark --dark2 --dark3 --black --cream --cream2 --line
 *             --lined --ease --out  (+ --up = reveal distance, --ld-base = load-in offset)
 * Layout      .wrap (max 1920 incl. padding 60/40/20) .g12 (12 cols, 24 gap)
 *             .dk (dark band: links + tags + focus in cream)
 *             .only-d (hidden at <=600) / .only-m (hidden above 600): desktop-only /
 *             mobile-only content where the 390 design has other copy or art
 * Type        .d1 .d2 .d3 .t32 .t28 .t24 .p36 .p28 .p20 .p18 .p16 .label
 *             .mono .vh / .screen-reader-text
 * Components  .btn + .btn-y .btn-d .btn-l .btn-o  (fill wipe ::before)
 *             .arw (arrow swap; markup = \AnpsAgency\arrow_icon())
 *             .tl (text link, underline redraw)  .flink (accent underline)
 *             .tag  .opts/.opt/.cnt (chips, a.opt or button.opt, .on = active)
 *             .fbar (sticky filter bar under the header)  .av (initials avatar)
 *             .gridbg .gridbg-l  .svc (card fill on hover, .zoom, .pkh)  .zoom
 * SVG art     .ic .art .artf .arty .artyd .nodey .nodec .olive .mid .stc .stw
 *             .stl .lk .lkf .lky .pk (moving packet) .pkh (packet on card hover)
 *             .blink  -- all colours come from the tokens (no hex).
 * Motion      load:   .ld (fade up) .ldl (line mask) + .ld1-.ld5 stagger
 *             scroll: .rv .rv2 .rv3 .rvl .clip .px .pxs .grow .cnt-n/.cnt-s
 *             keyframes: upIn lineIn clipIn px pxs grow count ul pk blinkOl
 *
 * AUTHORING NOTES
 * - Buttons / text links in block markup: core/button with className
 *   `btn-y` | `btn-d` | `btn-l` | `btn-o` | `tl` (+ motion classes). A render
 *   filter (inc/core-blocks.php) outputs the design's bare
 *   `<a class="btn btn-y …">Text<span class="arw">…</span></a>`; add
 *   `no-arw` to drop the arrow. In PHP print that markup directly.
 * - Line-mask headings (`rvl`/`ldl`): see the doc comment in inc/motion.php.
 * - Stat counters: write `<span class="cnt-n">30</span>` (the real number);
 *   inc/motion.php turns it into the animated counter + readable number.
 * - Scroll motion only runs inside `@supports (animation-timeline: view())`.
 *   Elsewhere `html.no-sda` is set before paint and assets/js/motion.js adds
 *   `.in` to .rv/.rvl/.clip/.grow when they scroll into view (`html.io` marks
 *   the observer as running; without it everything simply stays visible).
 * - Loader (chrome): set `--ld-base` on <html> (e.g. 1.2s) while it plays so
 *   the hero load-in waits for it.
 * - `prefers-reduced-motion: reduce` switches every animation and transition
 *   off; all final states are visible. Don't re-enable motion in context CSS.
 */

/* ---------------------------------------------------------------- tokens -- */

:root,
.editor-styles-wrapper {
	--paper: var(--wp--preset--color--paper);
	--py: var(--wp--preset--color--paper-tint);
	--y: var(--wp--preset--color--accent);
	--yh: var(--wp--preset--color--accent-hover);
	--yfill: var(--wp--preset--color--accent-fill);
	--yline: var(--wp--preset--color--accent-line);
	--olive: var(--wp--preset--color--muted-accent);
	--g1: var(--wp--preset--color--grey-1);
	--g2: var(--wp--preset--color--grey-2);
	--ink: var(--wp--preset--color--ink);
	--ink2: var(--wp--preset--color--ink-2);
	--dark: var(--wp--preset--color--dark);
	--dark2: var(--wp--preset--color--dark-2);
	--dark3: var(--wp--preset--color--dark-3);
	--black: var(--wp--preset--color--black);
	--cream: var(--wp--preset--color--cream);
	--cream2: var(--wp--custom--cream-muted);
	/* Hairlines follow the scheme's ink/cream (Butter: rgba(20,19,19,.15) / rgba(254,251,246,.18)). */
	--line: color-mix(in srgb, var(--ink) 15%, transparent);
	--lined: color-mix(in srgb, var(--cream) 18%, transparent);
	--ease: var(--wp--custom--ease--in-out);
	--out: var(--wp--custom--ease--out);
	/* Art strokes/labels on dark bands. */
	--art: color-mix(in srgb, var(--cream) 58%, transparent);
	--up: 40px;
	--ld-base: 0s;
}

@media (max-width: 600px) {
	:root {
		--up: 32px;
	}
}

/* ------------------------------------------------------------ reset/base -- */

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

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

@media (max-width: 600px) {
	html {
		scroll-padding-top: 72px;
	}
}

/* Lenis smooth scrolling (build/front/smooth-scroll.js). Lenis drives the scroll itself, so the native
   smooth behaviour is off while it runs; without JS, anchors still glide via scroll-behavior above. */
html.lenis,
html.lenis body {
	height: auto;
}

html.lenis {
	scroll-behavior: auto;
}

.lenis:not(.lenis-autoToggle).lenis-stopped {
	overflow: clip;
}

.lenis [data-lenis-prevent] {
	overscroll-behavior: contain;
}

.lenis.lenis-smooth iframe {
	pointer-events: none;
}

body {
	margin: 0;
	overflow-x: clip;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

img,
svg,
video {
	max-width: 100%;
}

img,
video {
	height: auto;
}

figure {
	margin: 0;
}

a {
	color: var(--ink);
	text-decoration: none;
}

a:hover {
	color: var(--ink);
}

button,
input,
select,
textarea {
	font: inherit;
	letter-spacing: inherit;
}

::selection {
	background: var(--y);
	color: var(--ink);
}

.dk ::selection,
.gridbg ::selection {
	background: var(--yline);
	color: var(--black);
}

/* Visible focus for every interactive element (WCAG 2.2 AA 2.4.7 / 2.4.11). */
:focus-visible {
	outline: 2px solid var(--ink);
	outline-offset: 3px;
}

.dk :focus-visible,
.gridbg :focus-visible {
	outline-color: var(--cream);
}

:focus:not(:focus-visible) {
	outline: none;
}

.vh,
.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	z-index: 100000;
	top: 8px;
	left: 8px;
	width: auto;
	height: auto;
	padding: 14px 20px;
	margin: 0;
	clip: auto;
	clip-path: none;
	background: var(--black);
	color: var(--cream);
	font-size: 16px;
	font-weight: 500;
	text-decoration: none;
	border-radius: 4px;
}

/* ----------------------------------------------- WordPress core overrides -- */

/* Core adds padding to any group with a background colour; the design never does. */
:where(.wp-block-group.has-background) {
	padding: 0;
}

/* Headings/paragraphs carrying a design type class own their spacing. */
:where(h1, h2, h3, h4, h5, h6, p).wp-block-heading,
:where(.d1, .d2, .d3, .t32, .t28, .t24, .p36, .p28, .p20, .p18, .p16) {
	margin: 0;
}

/* core/buttons is only a flex row; buttons inside are the design's bare links. */
.wp-block-buttons > .btn,
.wp-block-buttons > .tl {
	margin: 0;
}

.alignfull {
	width: 100%;
	max-width: none;
}

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

.dk a,
.dk a:hover {
	color: var(--cream);
}

.dk .tag {
	border-color: var(--lined);
}

/* --------------------------------------------------------------- layout -- */

.wrap {
	width: 100%;
	max-width: 1920px;
	margin-right: auto;
	margin-left: auto;
	padding-right: 60px;
	padding-left: 60px;
}

.g12 {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	column-gap: 24px;
}

@media (max-width: 1200px) {
	.wrap {
		padding-right: 40px;
		padding-left: 40px;
	}
}

@media (max-width: 600px) {
	.wrap {
		padding-right: 20px;
		padding-left: 20px;
	}
}

/* Viewport variants: the design's 390 px copy/art differs in places. */
@media (min-width: 601px) {
	.only-m {
		display: none !important;
	}
}

@media (max-width: 600px) {
	.only-d {
		display: none !important;
	}
}

/* ----------------------------------------------------------- typography -- */

.d1 {
	margin: 0;
	font-size: clamp(56px, 5vw, 96px);
	line-height: 1.02;
	font-weight: 400;
	letter-spacing: -0.05em;
}

.d2 {
	margin: 0;
	font-size: clamp(44px, 3.75vw, 72px);
	line-height: 1.06;
	font-weight: 400;
	letter-spacing: -0.045em;
}

.d3 {
	margin: 0;
	font-size: clamp(52px, 4.4vw, 84px);
	line-height: 1;
	font-weight: 400;
	letter-spacing: -0.045em;
}

.t32 {
	margin: 0;
	font-size: clamp(26px, 1.7vw, 32px);
	line-height: 1.1;
	font-weight: 400;
	letter-spacing: -0.04em;
}

.t28 {
	margin: 0;
	font-size: 28px;
	line-height: 1.1;
	font-weight: 400;
	letter-spacing: -0.04em;
}

.t24 {
	margin: 0;
	font-size: 24px;
	line-height: 1.1;
	font-weight: 400;
	letter-spacing: -0.035em;
}

.p36 {
	margin: 0;
	font-size: clamp(26px, 1.9vw, 36px);
	line-height: 1.2;
	font-weight: 400;
	letter-spacing: -0.025em;
	text-wrap: pretty;
}

.p28 {
	margin: 0;
	font-size: clamp(21px, 1.45vw, 28px);
	line-height: 1.22;
	font-weight: 400;
	letter-spacing: -0.02em;
	text-wrap: pretty;
}

.p20 {
	margin: 0;
	font-size: 20px;
	line-height: 1.25;
	letter-spacing: -0.02em;
	text-wrap: pretty;
}

.p18 {
	margin: 0;
	font-size: 18px;
	line-height: 1.45;
	letter-spacing: -0.01em;
}

.p16 {
	margin: 0;
	font-size: 16px;
	line-height: 1.45;
	letter-spacing: -0.01em;
}

.label {
	margin: 0;
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 16px;
	font-weight: 500;
}

.label::before {
	content: "";
	flex: none;
	width: 6px;
	height: 6px;
	background: currentColor;
}

.mono {
	font-family: var(--wp--preset--font-family--jetbrains-mono);
}

/* Mobile sizes = design/html/*-mobile.html (390 px). */
@media (max-width: 600px) {
	.d1 {
		font-size: 42px;
		line-height: 1.04;
		letter-spacing: -0.045em;
	}

	.d2 {
		font-size: 34px;
		line-height: 1.1;
		letter-spacing: -0.04em;
	}

	.d3 {
		font-size: 44px;
		line-height: 1.1;
		letter-spacing: -0.04em;
	}

	.t32 {
		font-size: 24px;
		letter-spacing: -0.035em;
	}

	.p36 {
		font-size: 20px;
		line-height: 1.25;
		letter-spacing: -0.02em;
	}

	.p28 {
		font-size: 18px;
		line-height: 1.3;
		letter-spacing: -0.02em;
	}

	.p18 {
		font-size: 16px;
		line-height: 1.45;
	}

	.label {
		font-size: 14px;
	}
}

/* ---------------------------------------------------------------- arrow -- */

.ic {
	fill: none;
	stroke: currentColor;
	stroke-width: 1.3;
	stroke-linecap: square;
}

.arw {
	position: relative;
	display: inline-block;
	flex: none;
	width: 16px;
	height: 14px;
	overflow: hidden;
}

.arw svg {
	position: absolute;
	top: 0;
	left: 0;
	transition: transform 0.5s var(--ease);
}

.arw svg + svg {
	transform: translateX(-150%);
}

.btn:hover .arw svg:first-child,
.tl:hover .arw svg:first-child,
.svc:hover .arw svg:first-child {
	transform: translateX(150%);
}

.btn:hover .arw svg + svg,
.tl:hover .arw svg + svg,
.svc:hover .arw svg + svg {
	transform: translateX(0);
}

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

.btn {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	display: inline-flex;
	align-items: center;
	gap: 16px;
	border: 0;
	border-radius: 4px;
	font-family: inherit;
	font-size: 16px;
	font-weight: 500;
	white-space: nowrap;
	text-decoration: none;
	cursor: pointer;
	transition: color 0.45s var(--ease), transform 0.25s var(--out);
}

.btn::before {
	content: "";
	position: absolute;
	inset: -1px;
	z-index: -1;
	border-radius: inherit;
	transform: translateY(102%);
	transition: transform 0.5s var(--ease);
}

.btn:hover::before,
.btn:active::before {
	transform: translateY(0);
}

.btn:active {
	transform: scale(0.97);
}

.btn:disabled,
.btn[aria-disabled="true"] {
	cursor: not-allowed;
	background: var(--g1);
	color: color-mix(in srgb, var(--ink2) 80%, var(--g1));
}

.btn:disabled::before,
.btn[aria-disabled="true"]::before {
	display: none;
}

.btn-y {
	height: 44px;
	padding: 0 16px;
	background: var(--y);
	color: var(--ink);
	border: 1px solid var(--ink);
}

.btn-y::before {
	background: var(--ink);
}

.btn-y:hover {
	color: var(--y);
}

.btn-d,
.btn-l {
	height: 56px;
	padding: 0 20px;
	justify-content: space-between;
	gap: 48px;
}

.btn-d,
.btn-d:hover,
.dk .btn-d {
	background: var(--dark);
	color: var(--cream);
}

.btn-d::before {
	background: var(--y);
}

.btn-d:hover,
.dk .btn-d:hover {
	color: var(--ink);
}

.btn-l,
.btn-l:hover,
.dk .btn-l,
.dk .btn-l:hover {
	background: var(--y);
	color: var(--ink);
}

.btn-l::before {
	background: var(--cream);
}

.btn-o {
	height: 60px;
	padding: 0 22px;
	background: transparent;
	color: var(--ink);
	border: 1px solid var(--ink);
}

.btn-o::before {
	background: var(--ink);
}

.btn-o:hover {
	color: var(--y);
}

.dk .btn-y {
	color: var(--ink);
}

.dk .btn-y:hover,
.dk .btn-o:hover {
	color: var(--y);
}

@media (max-width: 600px) {
	.btn-y {
		gap: 10px;
		height: 40px;
		padding: 0 12px;
		font-size: 14px;
	}

	.btn-d,
	.btn-l {
		display: flex;
		height: 54px;
		padding: 0 18px;
		gap: 16px;
	}

	.wp-block-buttons > .btn-d,
	.wp-block-buttons > .btn-l {
		flex: 1 1 100%;
	}
}

/* ------------------------------------------------------------ text link -- */

.tl {
	display: inline-flex;
	align-items: center;
	align-self: flex-start;
	gap: 12px;
	padding: 10px 0 7px;
	font-size: 16px;
	font-weight: 500;
	/* A fixed line height (Instrument Sans' own "normal") so glyphs from a fallback font, like the ↗ in
	   "Visit ownthegame.app ↗" (not in the latin subset), can't make one link taller than its neighbours. */
	line-height: 1.25;
	background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
}

.tl:hover {
	animation: ul 0.7s var(--ease);
}

@keyframes ul {
	0% {
		background-size: 100% 1px;
		background-position: 100% 100%;
	}

	48% {
		background-size: 0% 1px;
		background-position: 100% 100%;
	}

	52% {
		background-size: 0% 1px;
		background-position: 0 100%;
	}

	100% {
		background-size: 100% 1px;
		background-position: 0 100%;
	}
}

@media (max-width: 600px) {
	.tl {
		padding: 12px 0 7px;
		font-size: 15px;
	}
}

.flink {
	position: relative;
	display: inline-block;
}

.flink::after {
	content: "";
	position: absolute;
	right: 0;
	bottom: 0.02em;
	left: 0;
	height: 2px;
	background: var(--y);
	transform: scaleX(0);
	transform-origin: right;
	transition: transform 0.55s var(--ease);
}

.flink:hover::after,
.flink:focus-visible::after {
	transform: scaleX(1);
	transform-origin: left;
}

/* ------------------------------------------------------------ tags/chips -- */

.tag {
	padding: 7px 10px;
	border: 1px solid var(--line);
	border-radius: 3px;
	font-size: 13px;
	font-weight: 500;
	line-height: 1;
	white-space: nowrap;
	transition: border-color 0.3s;
}

@media (max-width: 600px) {
	.tag {
		padding: 6px 8px;
		font-size: 12px;
	}
}

.opts {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.opt {
	-webkit-appearance: none;
	appearance: none;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	height: 44px;
	padding: 0 16px;
	border: 1px solid var(--line);
	border-radius: 4px;
	background: transparent;
	font-family: inherit;
	font-size: 15px;
	font-weight: 500;
	color: var(--ink);
	white-space: nowrap;
	cursor: pointer;
	transition: background 0.3s var(--ease), color 0.3s, border-color 0.25s, transform 0.2s var(--out);
}

.opt:hover {
	border-color: var(--ink);
	color: var(--ink);
}

button.opt:active {
	transform: scale(0.97);
}

.opt .cnt {
	font-size: 13px;
	color: var(--ink2);
}

.opt.on,
.opt.on:hover,
.opt[aria-current],
.opt[aria-pressed="true"] {
	background: var(--ink);
	border-color: var(--ink);
	color: var(--cream);
}

.opt.on .cnt,
.opt[aria-current] .cnt,
.opt[aria-pressed="true"] .cnt {
	color: var(--y);
}

/* Sticky filter bar under the header (Work, blog). The header is only floating chips, so while the bar is
   stuck (`.is-stuck`, set by assets/js/sticky-bar.js) its paper extends up behind the header with a solid
   box-shadow (not clipped by the mobile overflow scroller) and header + bar read as one band instead of
   page content showing through the gap. Offset + spread = header height. */
.fbar {
	position: sticky;
	top: 96px;
	z-index: 60;
	background: var(--paper);
	border-bottom: 1px solid var(--line);
	transition: box-shadow 0.25s var(--out);
}

.fbar.is-stuck {
	box-shadow: 0 -48px 0 48px var(--paper);
}

@media (max-width: 600px) {
	.fbar {
		top: 72px;
		overflow-x: auto;
		scrollbar-width: none;
	}

	.fbar.is-stuck {
		box-shadow: 0 -36px 0 36px var(--paper);
	}

	.fbar::-webkit-scrollbar {
		display: none;
	}

	.fbar .opts {
		flex-wrap: nowrap;
		width: max-content;
		padding: 12px 20px;
	}
}

/* --------------------------------------------------------------- avatar -- */

.av {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: var(--dark);
	color: var(--yline);
	font-size: 12px;
	font-weight: 600;
	overflow: hidden;
}

img.av {
	object-fit: cover;
}

/* ------------------------------------------------------------ surfaces -- */

.gridbg {
	background-color: var(--dark);
	background-image:
		linear-gradient(color-mix(in srgb, var(--cream) 8%, transparent) 1px, transparent 1px),
		linear-gradient(90deg, color-mix(in srgb, var(--cream) 8%, transparent) 1px, transparent 1px);
	background-size: 24px 24px;
	background-position: -1px -1px;
}

.gridbg-l {
	background-image:
		linear-gradient(color-mix(in srgb, var(--ink) 6%, transparent) 1px, transparent 1px),
		linear-gradient(90deg, color-mix(in srgb, var(--ink) 6%, transparent) 1px, transparent 1px);
	background-size: 24px 24px;
	background-position: -1px -1px;
}

@media (max-width: 600px) {
	.gridbg,
	.gridbg-l {
		background-size: 20px 20px;
	}
}

/* Service card (bento, "Often paired with"): accent fill wipes up on hover. */
.svc {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	display: block;
	background: var(--g1);
	border-radius: 4px;
	color: var(--ink);
}

.svc::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: var(--yfill);
	transform: scaleY(0);
	transform-origin: bottom;
	transition: transform 0.6s var(--ease);
}

a.svc:hover {
	color: var(--ink);
}

.svc:hover::before,
.svc:focus-visible::before {
	transform: scaleY(1);
}

.svc:hover .tag {
	border-color: color-mix(in srgb, var(--ink) 45%, transparent);
}

.zoom {
	transition: transform 0.8s var(--ease);
}

.svc:hover .zoom {
	transform: scale(1.03);
}

.svc .pkh {
	opacity: 0;
	animation-play-state: paused;
	transition: opacity 0.3s;
}

.svc:hover .pkh {
	opacity: 1;
	animation-play-state: running;
}

/* -------------------------------------------------------------- SVG art -- */

.art {
	fill: none;
	stroke: var(--art);
	stroke-width: 1;
}

.artf {
	fill: var(--dark);
	stroke: var(--art);
	stroke-width: 1;
}

.arty {
	fill: none;
	stroke: var(--yline);
	stroke-width: 1.3;
}

.artyd {
	fill: none;
	stroke: var(--yline);
	stroke-width: 1.1;
	stroke-dasharray: 3 4;
}

.nodey {
	fill: var(--dark);
	stroke: var(--yline);
	stroke-width: 1.2;
}

.nodec {
	fill: var(--dark);
	stroke: var(--art);
	stroke-width: 1;
}

.olive {
	fill: var(--olive);
}

.mid {
	text-anchor: middle;
}

.stc {
	font-family: var(--wp--preset--font-family--instrument-sans);
	font-size: 12px;
	fill: var(--art);
}

.stw {
	font-family: var(--wp--preset--font-family--instrument-sans);
	font-size: 15px;
	font-weight: 500;
	fill: var(--cream);
}

.stl {
	font-family: var(--wp--preset--font-family--instrument-sans);
	font-size: 15px;
	fill: color-mix(in srgb, var(--cream) 62%, transparent);
}

.lk {
	fill: none;
	stroke: var(--black);
	stroke-width: 1;
}

.lkf {
	fill: var(--cream);
	stroke: var(--black);
	stroke-width: 1;
}

.lky {
	fill: var(--y);
	stroke: var(--black);
	stroke-width: 1;
}

.pk {
	fill: none;
	stroke: var(--yline);
	stroke-width: 5;
	stroke-linecap: round;
	stroke-dasharray: 0.1 150;
	animation: pk 3.2s linear infinite;
}

@keyframes pk {
	to {
		stroke-dashoffset: -150;
	}
}

.blink {
	animation: blinkOl 1.6s infinite;
}

@keyframes blinkOl {
	0%,
	100% {
		fill: var(--olive);
	}

	50% {
		fill: var(--yline);
	}
}

@media (max-width: 600px) {
	.stc {
		font-size: 11px;
	}

	.stw {
		font-size: 13px;
	}

	.pk {
		stroke-width: 4;
		animation-duration: 3s;
	}
}

/* --------------------------------------------------------- motion: load -- */

.ln {
	display: block;
	overflow: hidden;
	padding-bottom: 0.08em;
	margin-bottom: -0.08em;
}

.ln > span {
	display: block;
}

@keyframes upIn {
	from {
		opacity: 0;
		transform: translateY(var(--up));
	}

	to {
		opacity: 1;
		transform: none;
	}
}

@keyframes lineIn {
	from {
		transform: translateY(105%);
	}

	to {
		transform: none;
	}
}

.ld {
	animation: upIn 1.1s var(--out) both;
}

.ldl {
	animation: lineIn 1.1s var(--out) both;
}

.ld1 {
	animation-delay: calc(var(--ld-base) + 0.1s);
}

.ld2 {
	animation-delay: calc(var(--ld-base) + 0.22s);
}

.ld3 {
	animation-delay: calc(var(--ld-base) + 0.34s);
}

.ld4 {
	animation-delay: calc(var(--ld-base) + 0.46s);
}

.ld5 {
	animation-delay: calc(var(--ld-base) + 0.58s);
}

@media (max-width: 600px) {
	.ld,
	.ldl {
		animation-duration: 1s;
	}
}

/* ------------------------------------------------------- motion: scroll -- */

@property --num {
	syntax: "<integer>";
	inherits: false;
	initial-value: 0;
}

/* Static fallback: the readable number is shown, the animated one hidden. */
.cnt-n {
	display: none;
}

@keyframes clipIn {
	from {
		clip-path: inset(8% 5% 8% 5%);
	}

	to {
		clip-path: inset(0 0 0 0);
	}
}

@keyframes px {
	from {
		transform: translateY(60px);
	}

	to {
		transform: translateY(-60px);
	}
}

@keyframes pxs {
	from {
		transform: translateY(-60px) scale(1.1);
	}

	to {
		transform: translateY(60px) scale(1.1);
	}
}

@keyframes grow {
	from {
		transform: scaleX(0);
	}

	to {
		transform: scaleX(1);
	}
}

@keyframes count {
	from {
		--num: 0;
	}

	to {
		--num: var(--to);
	}
}

@supports (animation-timeline: view()) {
	.rv {
		animation: upIn linear both;
		animation-timeline: view();
		animation-range: entry 0% entry 70%;
	}

	.rv2 {
		animation-range: entry 10% entry 85%;
	}

	.rv3 {
		animation-range: entry 20% entry 100%;
	}

	.rvl > span {
		animation: lineIn linear both;
		animation-timeline: view();
		animation-range: entry 10% entry 90%;
	}

	.rvl + .rvl > span {
		animation-range: entry 25% entry 100%;
	}

	.clip {
		animation: clipIn linear both;
		animation-timeline: view();
		animation-range: entry 0% cover 40%;
	}

	.px {
		animation: px linear both;
		animation-timeline: view();
		animation-range: cover;
	}

	.pxs {
		animation: pxs linear both;
		animation-timeline: view();
		animation-range: cover;
	}

	.grow {
		transform-origin: left;
		animation: grow linear both;
		animation-timeline: view();
		animation-range: entry 10% cover 40%;
	}

	.cnt-n {
		display: inline;
		counter-reset: num var(--num);
		animation: count linear both;
		animation-timeline: view();
		animation-range: entry 20% cover 45%;
	}

	.cnt-n::before {
		content: counter(num);
	}

	/* The real number stays in the accessibility tree. */
	.cnt-n + .cnt-s {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip-path: inset(50%);
		white-space: nowrap;
	}
}

@media (max-width: 600px) {
	@supports (animation-timeline: view()) {
		.rv {
			animation-range: entry 0% entry 60%;
		}

		.rv2 {
			animation-range: entry 10% entry 75%;
		}

		.rv3 {
			animation-range: entry 20% entry 90%;
		}

		.clip {
			animation-range: entry 0% cover 35%;
		}
	}
}

/*
 * Fallback without scroll-driven animations (Firefox, older Safari).
 * html.no-sda: set in <head> before paint (inc/motion.php).
 * html.io:     set by assets/js/motion.js once the observer runs; it already
 *              marks everything in view with .in, so nothing flashes and
 *              nothing stays hidden if the module never loads.
 */
@media (prefers-reduced-motion: no-preference) {
	.no-sda.io :is(.rv, .clip, .grow) {
		transition: opacity 1s var(--out), transform 1s var(--out), clip-path 1s var(--out);
	}

	.no-sda.io .rv:not(.in) {
		opacity: 0;
		transform: translateY(var(--up));
	}

	.no-sda.io .rv2 {
		transition-delay: 0.08s;
	}

	.no-sda.io .rv3 {
		transition-delay: 0.16s;
	}

	.no-sda.io .clip:not(.in) {
		clip-path: inset(8% 5% 8% 5%);
	}

	.no-sda.io .grow {
		transform-origin: left;
	}

	.no-sda.io .grow:not(.in) {
		transform: scaleX(0);
	}

	.no-sda.io .rvl > span {
		transition: transform 1.1s var(--out);
	}

	.no-sda.io .rvl + .rvl > span {
		transition-delay: 0.12s;
	}

	.no-sda.io .rvl:not(.in) > span {
		transform: translateY(105%);
	}
}

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

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

	*,
	*::before,
	*::after {
		animation: none !important;
		transition: none !important;
	}

	.pk,
	.pkh {
		display: none;
	}

	.cnt-n {
		display: none !important;
	}

	.cnt-n + .cnt-s {
		position: static;
		width: auto;
		height: auto;
		overflow: visible;
		clip-path: none;
	}
}

/* ------------------------------------------------------------- editor -- */

/* No motion while editing: every element shows its final state. */
.editor-styles-wrapper :is(.ld, .ldl, .rv, .rvl, .rvl > span, .clip, .px, .pxs, .grow, .pk, .blink) {
	animation: none !important;
}

.editor-styles-wrapper .cnt-n {
	display: none !important;
}
