/* ==========================================================================
   Cyon — design tokens and block styles.
   Loaded on the front end and inside the block editor, so blocks look the same in both.
   Colours, fonts and sizes come from theme.json presets.
   ========================================================================== */

:root {
	/* Two section themes. Change the hex values in theme.json, not here. */
	--purple: var(--wp--preset--color--purple, #1a182c);
	--paper: var(--wp--preset--color--paper, #fff);
	--violet: var(--wp--preset--color--violet, #665eea);
	--coral: var(--wp--preset--color--coral, #ff5e51);
	--pink: var(--wp--preset--color--pink, #f6b4cd);
	--mist: var(--wp--preset--color--mist, #efefef);
	--light-bg: var(--paper);
	--light-fg: var(--purple);
	--dark-bg: var(--purple);
	--dark-fg: var(--paper);

	/* The current theme. html.is-dark flips these (see "Section themes"). */
	--bg: var(--light-bg);
	--fg: var(--light-fg);

	/* The menu is always dark. */
	--menu-bg: var(--dark-bg);
	--menu-fg: var(--dark-fg);

	/* The Cyon peach (assets/images/peach.svg), used as a mask wherever a circle would be.
	   Apply with the .peach helper below, or mask-image: var(--peach). Its proportions are --peach-ratio. */
	--peach: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 201.69 178.9' preserveAspectRatio='none'%3E%3Cpath d='M0,89.74C0,40.11,24.53,0,100.99,0s100.7,40.4,100.7,89.74-24.24,89.16-100.7,89.16S0,139.08,0,89.74Z'/%3E%3C/svg%3E");
	--peach-ratio: 1.1274;

	/* Derived from whatever the current text colour is, so they work on both themes. */
	--muted: color-mix(in srgb, currentColor 62%, transparent);
	--tint: color-mix(in srgb, currentColor 9%, transparent);
	--rule: color-mix(in srgb, currentColor 18%, transparent);

	/* PP Radio Grotesk for text, PP Fragment Serif Italic for display. One weight each. */
	--font-text: var(--wp--preset--font-family--text, "Helvetica Neue", Helvetica, Arial, sans-serif);
	--font-serif: var(--wp--preset--font-family--serif, Georgia, serif);
	--font-display: var(--font-serif);

	--fs-small: var(--wp--preset--font-size--text-small, .875rem);
	--fs-body: var(--wp--preset--font-size--text-normal, 1.0688rem);
	--fs-lead: var(--wp--preset--font-size--heading-small, 1.75rem);
	--fs-heading: var(--wp--preset--font-size--heading-normal, 3rem);
	--fs-display: var(--wp--preset--font-size--heading-large, 9rem);   /* Page titles: Heading large, max 144px */

	--edge: var(--wp--preset--spacing--global-margin, 8rem);   /* page margin (theme spacing: Page margin) */
	--fs-copy: var(--wp--preset--font-size--text-normal, 1.0688rem);   /* quotes, intro copy, CTA text: the original site's body size */

	/* Line heights, shared so text sits consistently: body text, larger copy, leads and statements. */
	--lh-body: 1.4;
	--lh-copy: 1.3;
	--lh-lead: 1.25;

	/* Controls stay the same size on every screen; only text scales. */
	--burger: 3rem;      /* The burger's peach. */
	--control: 2.75rem;  /* Peach arrow buttons: hero, call to action, carousel (44px: easy to tap). */
	--play: 2.5rem;      /* Play peach on client story stills. */
	--gap: var(--space-m);                          /* grid gap (theme spacing XL) */
	/* Spacing: the theme's scale (theme.json → spacing sizes). Every margin and padding uses it. */
	--space-xs: var(--wp--preset--spacing--xs, .5rem);
	--space-s: var(--wp--preset--spacing--md, 1rem);
	--space-m: var(--wp--preset--spacing--xl, 2rem);
	--space-l: var(--wp--preset--spacing--global-gap-v, 4rem);
	--space-xl: var(--wp--preset--spacing--global-padding, 8rem);
	--measure: 46rem;
	--wide: 90rem;
	/* Header: the logo's row is 4.5rem; above it sits the same space again as the logo has above
	   it within that row, so the logo's top space is doubled at every width. --header-h is the
	   whole header (row plus that space), used for anything that clears the header. */
	--logo-w: clamp(4rem, 5vw, 6rem);
	--logo-h: calc(var(--logo-w) / 2.6667);   /* The wordmark is 96 × 36. */
	--text-width: var(--wp--custom--text-width, 62rem);   /* Text width: the original site's content width (theme.json → settings → custom). */
	--header-bar: 4.5rem;
	--header-offset: calc((var(--header-bar) - var(--logo-h)) / 2);
	--header-h: calc(var(--header-bar) + var(--header-offset));

	--ease-out: cubic-bezier(.16, 1, .3, 1);
}

/* Peach shape -------------------------------------------------------------- */

.peach,
.hero__arrow,
.story__play::before,
.clock__dot {
	-webkit-mask: var(--peach) center / 100% 100% no-repeat;
	mask: var(--peach) center / 100% 100% no-repeat;
}

/* Section themes ---------------------------------------------------------
   Sections (Group blocks and Cyon blocks) take a Dark or Light block style.

   Without JavaScript, and in the editor, each section paints its own colours.
   With JavaScript (html.scroll-theme), sections go transparent and the page
   background and text fade between themes as each section reaches the middle
   of the screen (see main.js). Unstyled sections count as Light. */

html.is-dark { --bg: var(--dark-bg); --fg: var(--dark-fg); }

/* Used for the first paint only, so the page doesn't fade in from the wrong theme. */
html.theme-instant, html.theme-instant * { transition: none !important; }

html:not(.scroll-theme) .is-style-dark,
html:not(.scroll-theme) .is-style-light {
	background-color: var(--bg);
	color: var(--fg);
}
html:not(.scroll-theme) .is-style-dark { --bg: var(--dark-bg); --fg: var(--dark-fg); }

/* Anywhere on a page that changes colour on scroll, text set to White, Off-white or Dark purple
   (the theme's light and dark inks) takes the page's current text colour, so light text turns dark
   when the background turns light, and back. Not on its own background (white text on a violet
   block stays white), and accent colours (Coral, Violet, Pink) always stay as set. */
/* Outside Dark and Light sections: unless on its own background. */
html.scroll-theme :is(.has-paper-color, .has-mist-color, .has-purple-color):not(.has-background, .has-background *),
/* Inside them: the same, except the section's own (cleared) background doesn't count. */
html.scroll-theme :is(.is-style-dark, .is-style-light, :is(.is-style-dark, .is-style-light) *):is(.has-paper-color, .has-mist-color, .has-purple-color):not(.has-background:not(.is-style-dark, .is-style-light), .has-background:not(.is-style-dark, .is-style-light) *) {
	color: var(--fg) !important;
}
/* A Dark or Light section's own White or Dark purple background clears, like any section. */
html.scroll-theme :is(.is-style-dark, .is-style-light):is(.has-paper-background-color, .has-purple-background-color) {
	background-color: transparent !important;
}
html:not(.scroll-theme) .is-style-light { --bg: var(--light-bg); --fg: var(--light-fg); }

/* Group blocks used as sections: full width, generous padding, text on the page's left line. */
.wp-block-group:is(.is-style-dark, .is-style-light) { padding: var(--space-xl) var(--edge); }
/* Section content spans the full width inside the page margins. To narrow it, use the group's
   own Layout setting (Inner blocks use content width), which WordPress centres. */
.wp-block-group:is(.is-style-dark, .is-style-light) > * { margin-inline: 0; }
/* The Statement paragraph style keeps a line length that suits its size, aligned left. */
.wp-block-group > .is-style-statement { max-width: 28ch; margin-left: 0 !important; }
.wp-block-group:is(.is-style-dark, .is-style-light) > .alignfull { margin-inline: calc(var(--edge) * -1); }
.wp-block-group:is(.is-style-dark, .is-style-light) > * + * { margin-top: var(--space-s); margin-bottom: 0; }

/* Block internals reset. Repeated here because main.css doesn't load in the editor. */
.work-grid, .work-card__disciplines, .stories__track, .filter ul { list-style: none; margin: 0; }
.work-card__disciplines, .filter ul { padding: 0; }
.work-card :is(p, h3), .story :is(p, blockquote, figure), .cta .cta__body p { margin: 0; }
.hero .hero__statement, .stories .stories__title, .cta .cta__title { margin: 0; }
.cta .cta__body > * + * { margin-top: 0; }
.stories .stories__title { margin-bottom: var(--space-m); }
.work-card__link, .work-card__link:hover { color: inherit; text-decoration: none; }

.block-notice {
	padding: var(--space-m) var(--edge);
	background: var(--tint);
	font-size: var(--fs-small);
}

/* Paragraph: Statement — the large intro line on the homepage. */
.is-style-statement {
	font-size: var(--fs-heading);
	line-height: 1.08;
	letter-spacing: 0;
	text-wrap: balance;
}

/* Buttons (theme links and core Button block) ----------------------------- */

.button,
.wp-block-button__link {
	display: inline-flex; align-items: center; gap: .5em;
	padding: .85em 1.5em;
	border: 1px solid currentColor;
	border-radius: 999px;
	text-decoration: none;
	transition: background-color .2s, color .2s;
}
.button:hover,
.wp-block-button__link:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.cta .button:hover,
.wp-block-button__link:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }

.wp-block-button__link { background: transparent; color: inherit; font-size: inherit; }
.is-style-solid .wp-block-button__link { background: var(--fg); color: var(--bg); border-color: var(--fg); }

/* Hero (Statement block) --------------------------------------------------
   Upper-case italic serif, centred, every line justified to the width of the
   longest, each line in its own colour. main.js sizes the type so the block
   fills a set share of the screen (--hero-fill), whatever the font's widths. */

.hero {
	--hero-fill: .67;           /* Share of the screen width the statement fills. */
	--hero-1: var(--coral);
	--hero-2: var(--violet);
	--hero-3: var(--pink);
	--hero-4: var(--fg);
	display: grid; justify-items: center; align-content: center;
	gap: var(--space-l);
	min-height: 100svh;
	padding: var(--space-l) var(--edge);
}
html.is-dark .hero,
html:not(.scroll-theme) .hero.is-style-dark { --hero-4: var(--mist); }
.hero.has-text-color { --hero-4: currentColor; }   /* A text colour chosen in the editor applies to line 4 and the link. */

.hero .hero__statement {
	display: inline-block; width: max-content; max-width: none;
	font-family: var(--font-serif); font-style: italic; font-weight: 400;
	font-size: clamp(2.5rem, 10.6vw, 17rem); /* Before main.js fits it. */
	line-height: .88;       /* Measured from the live site. */
	letter-spacing: -.02em;
	text-transform: uppercase;
	text-wrap: initial;
}
.hero__line {
	display: block;
	/* The reveal mask: clips only the bottom edge, so italic overhangs and accents aren't cut off. */
	clip-path: inset(-.5em -.5em 0 -.5em);
	padding-bottom: .02em;
	white-space: nowrap;
	text-align: justify; text-align-last: justify; /* Word gaps stretch so every line meets both edges. */
}
.hero__line > span { display: block; text-align: inherit; text-align-last: inherit; }
.hero__line:nth-child(4n+1) { color: var(--hero-1); }
.hero__line:nth-child(4n+2) { color: var(--hero-2); }
.hero__line:nth-child(4n+3) { color: var(--hero-3); }
.hero__line:nth-child(4n+4) { color: var(--hero-4); }

/* "About Cyon" with a violet pill arrow. */
.hero__link {
	display: inline-flex; align-items: center; gap: 1rem;
	font-size: var(--hero-link, clamp(1.0625rem, 1.25vw, 2rem));
	letter-spacing: 0;
	text-decoration: none;
}
.hero__arrow {
	display: grid; place-items: center;
	width: var(--control); aspect-ratio: var(--peach-ratio);
	background: var(--violet); color: #fff;
	transition: transform .35s var(--ease-out);
}
.hero__arrow svg { width: 45%; height: auto; }
.hero__link:hover .hero__arrow,
.hero__link:focus-visible .hero__arrow,
.job-details__apply:is(:hover, :focus-visible) .hero__arrow { transform: translateX(.25em); }

@media (prefers-reduced-motion: no-preference) {
	.js .hero__line > span {
		transform: translateY(105%);
		animation: line-up .9s var(--ease-out) forwards;
		animation-delay: calc(var(--i) * 110ms + 150ms);
	}
	.js .hero__link { opacity: 0; animation: fade .6s ease forwards .8s; }
}
@keyframes line-up { to { transform: none; } }
@keyframes fade { to { opacity: 1; } }

@media (max-width: 47.99em) {
	.hero { --hero-fill: .9; min-height: 75svh; }
}

/* Work grid -------------------------------------------------------------- */

.work-grid {
	/* As on the original site: the stagger (and the landscape cards' indent) up to 15rem, rows up
	   to 11rem apart, columns the Gap, vertical spacing apart. */
	--stagger: clamp(0rem, -10.714rem + 28.571vw, 15rem);
	display: grid;
	row-gap: clamp(2rem, .7143rem + 6.4286vw, 11rem);
	column-gap: var(--wp--preset--spacing--global-gap-v, var(--gap));
	margin: 0;
	padding-inline: 0;   /* The block's width setting decides the edges (below). */
}
/* Width (Work grid block → alignment), as for any block: Full: the cards fill the width between
   the page margins. Wide: up to 144rem, centred. None: 62rem, centred. */
.work.alignfull .work-grid { padding-inline: var(--edge); }
/* Edge to edge (Width → Edge to edge): the cards run to the screen edges; their text keeps a
   small inset so it never touches the edge. */
.work.is-full-bleed .work-grid { padding-inline: 0; }
.work.is-full-bleed .work-card__text { padding-inline: var(--space-s); }
.work:not(.alignfull, .alignwide) { --stagger: clamp(3rem, 7vw, 7rem); }  /* Narrower grid, smaller step. */

/* Text size (Work grid block → Layout → Text size). */
.work--text-small  { --card-client: clamp(1.5rem, 1rem + 1.2vw, 2.5rem);  --card-title: clamp(1rem, .9rem + .4vw, 1.375rem); }
.work--text-medium { --card-client: clamp(2rem, 1.2rem + 2vw, 3.75rem);   --card-title: var(--fs-lead); }
.work--text-large  { --card-client: clamp(2.5rem, 1.3rem + 3.4vw, 5.75rem); --card-title: clamp(1.5rem, 1rem + 1.6vw, 2.75rem); }
@media (min-width: 48em) {
	/* Portrait pairs: the right-hand column sits lower, so the grid reads as a staggered wall. */
	.work:not(.work--landscape, .work--mixed, .work--portrait-even) .work-grid { grid-template-columns: 1fr 1fr; padding-bottom: var(--stagger); }
	.work:not(.work--landscape, .work--mixed, .work--portrait-even) .work-grid > li:nth-child(even) { transform: translateY(var(--stagger)); }

	/* Portrait pairs (no offset): two columns, side by side, tops level. */
	.work--portrait-even .work-grid { grid-template-columns: 1fr 1fr; align-items: start; }

	/* Landscape: one card per row, indented by the stagger on alternate sides (as on the original
	   site: about 90% wide at large sizes). */
	.work--landscape .work-grid { grid-template-columns: 1fr; }
	.work--landscape .work-grid > li { margin-right: var(--stagger); }
	.work--landscape .work-grid > li:nth-child(even) { margin-right: 0; margin-left: var(--stagger); }

	/* Mixed: two portrait cards side by side (the second lower), then two landscape cards
	   alternating left and right, repeating. */
	.work--mixed .work-grid { grid-template-columns: 1fr 1fr; align-items: start; }
	.work--mixed .work-grid > li:nth-child(4n+2) { margin-top: var(--stagger); }
	.work--mixed .work-grid > .work-card--landscape { grid-column: 1 / -1; margin-right: var(--stagger); }
	.work--mixed .work-grid > li.work-card--landscape:nth-child(4n) { margin-right: 0; margin-left: var(--stagger); }

	/* Landscape cards → Full width: each landscape card spans the grid (within the page margins). */
	.work--landscape-full .work-grid > .work-card--landscape { margin-left: 0 !important; margin-right: 0 !important; }
}

/* Landscape cards are 2:1. */
.work-card--landscape .work-card__media { aspect-ratio: 2 / 1; }

/* Single column (phones): every card shares one shape, 5:4, between portrait (4:4.5) and landscape
   (2:1), so a stack of mixed cards reads evenly. Images and videos crop to fill it. */
@media (max-width: 47.99em) {
	.work-card .work-card__media,
	.work-card--landscape .work-card__media { aspect-ratio: 5 / 4; }
}

.work-card__link { display: block; text-decoration: none; }
.work-card__media {
	position: relative; overflow: hidden;
	aspect-ratio: 4 / 4.5;   /* As on the original site. */
	background: var(--tint);
}
.work-card__image, .work-card__video {
	position: absolute; inset: 0;
	width: 100%; height: 100%; object-fit: cover;
}
.work-card__image { transition: transform 1.1s var(--ease-out); }
.work-card__video { opacity: 0; transition: opacity .35s ease; }
.work-card.is-playing .work-card__video { opacity: 1; }
@media (hover: hover) {
	.work-card__link:hover .work-card__image { transform: scale(1.03); }
}

.work-card__text { display: grid; }
.work-card__text { gap: var(--space-xs); padding-top: var(--space-s); }
/* Client name: Fragment Serif, larger than the title, turning coral when the card is hovered or focused. */
.work-card .work-card__client {
	font-family: var(--font-serif); font-style: italic; font-weight: 400;
	font-size: var(--card-client, clamp(2rem, 1.2rem + 2vw, 3.75rem));
	line-height: 1; letter-spacing: 0;
	color: inherit;
	transition: color .35s ease;
}
.work-card__link:is(:hover, :focus-visible) .work-card__client { color: var(--card-hover, var(--coral)); }
.work-card .work-card__title { font-family: var(--font-text); font-style: normal; font-weight: 400; font-size: var(--card-title, var(--fs-lead)); letter-spacing: 0; line-height: 1.15; }
.work-card__disciplines { display: flex; flex-wrap: wrap; gap: var(--space-xs); margin-top: var(--space-xs); font-size: var(--fs-small); }
.work-card__disciplines li { padding: .15em .7em; border: 1px solid currentColor; border-radius: 999px; }

/* Discipline filter ------------------------------------------------------ */

.filter ul { display: flex; flex-wrap: wrap; gap: .5rem; }
.filter a {
	display: inline-block; padding: .4em 1em;
	border: 1px solid currentColor; border-radius: 999px;
	text-decoration: none;
}
.filter a[aria-current="page"], .filter a:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }


/* Client stories -----------------------------------------------------------
   A carousel. Each story: a 16:9 video still (play peach and client name over a
   dimmed image) with the quote, logo and person beside it. The next story peeks
   in on the right. A progress line and peach arrows sit underneath.
   Proportions measured from the live site. */

.stories { padding-block: var(--space-xl); overflow: hidden; }
.stories .stories__title {
	margin: 0 0 var(--space-l);
	padding-inline: var(--edge);
	font-size: var(--stories-title, clamp(2rem, 6.2vw, 9rem));
	line-height: 1; letter-spacing: 0;
	text-align: center; text-transform: uppercase;
}

.stories__track {
	--slide: 71vw;                 /* Story width: still + quote column. The next still peeks in after it. */
	display: flex;
	padding-inline: var(--edge);
	overflow-x: auto; overscroll-behavior-x: contain;
	/* No CSS snapping: it fights small trackpad steps. main.js settles on the nearest story instead. */
	scrollbar-width: none;
	clip-path: inset(-1rem var(--edge)); /* The peeking story is cut off at the page margin, not the screen edge. */
}
.stories__track::-webkit-scrollbar { display: none; }
.stories__track.is-dragging { cursor: grabbing; user-select: none; }
.stories__track.is-dragging a, .stories__track.is-dragging button { pointer-events: none; }
/* Trailing space so the last story can line up with the left edge like the rest. */
.stories__track::after { content: ""; flex: 0 0 calc(100vw - var(--slide) - var(--edge) * 2); }

.story { flex: 0 0 var(--slide); }
.story__figure {
	display: grid; grid-template-columns: 53% 1fr; align-items: center;
	margin: 0;
}

.story__media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--tint); }
.story__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease-out); }
.story__media::after { content: ""; position: absolute; inset: 0; background: rgb(14 12 26 / .28); pointer-events: none; } /* Dims the still so white text reads. */

/* The whole still is the button; play peach and name sit bottom left. */
.story__play {
	position: absolute; inset: 0; z-index: 1;
	display: flex; align-items: flex-end;   /* The label sits bottom left… */
	padding: 0 0 var(--space-m) var(--space-m);
	border: 0; background: none; color: #fff; text-decoration: none; text-align: left;
	cursor: pointer;
}
.story__play--still { cursor: default; }
.story__play-icon {
	flex: none;
	width: var(--play); aspect-ratio: var(--peach-ratio);
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 5.5v13l10.5-6.5z' fill='%231a182c'/%3E%3C/svg%3E") 56% 50% / 46% no-repeat;
	-webkit-mask: var(--peach) center / 100% 100% no-repeat;
	mask: var(--peach) center / 100% 100% no-repeat;
	transition: transform .35s var(--ease-out);
}
.story__label { display: flex; align-items: center; gap: .75rem; }   /* …with the play peach and name centred on each other. */
.story__name {
	font-size: var(--story-name, var(--wp--preset--font-size--heading-small, 1.75rem));   /* In proportion with the fixed-size play peach. */
	line-height: 1; letter-spacing: 0;
	transform: translateY(.04em);   /* Optical: centre the capitals, not the line box. */
}
.story__play:hover .story__play-icon, .story__play:focus-visible .story__play-icon { transform: scale(1.12) rotate(-4deg); }
.story__media:hover img { transform: scale(1.03); }
.story__play:focus-visible { outline: 2px solid #fff; outline-offset: -6px; }

.story__text {
	padding-inline: var(--space-m);
	font-size: var(--fs-copy);
}
.story__quote { margin: 0; max-width: 20em; font-size: var(--story-quote, inherit); line-height: var(--lh-copy); letter-spacing: 0; }
.story__caption {
	display: flex; align-items: center; gap: var(--space-m);
	margin-top: var(--space-m);
	font-size: var(--story-caption, inherit);
}
.story__caption > * + * { position: relative; padding-left: var(--space-m); }
.story__caption > * + *::before {
	content: ""; position: absolute; left: 0; top: 50%;
	height: clamp(2.5rem, 3.35vw, 5.5rem); transform: translateY(-50%);
	border-left: 1px solid var(--rule);
}
.story__client { line-height: 1.2; }
.story__person { color: inherit; line-height: 1.2; }

/* Progress line and arrows. */
.stories__controls {
	display: flex; align-items: center; gap: .75rem;
	margin-top: var(--space-l);
	padding-inline: var(--edge);
}
.stories__progress { position: relative; flex: 1; height: 3px; margin-right: var(--space-s); background: color-mix(in srgb, currentColor 13%, transparent); overflow: hidden; }
.stories__progress span {
	position: absolute; inset: 0 auto 0 0;
	width: var(--progress-size, 20%);
	background: currentColor;
	transform: translateX(var(--progress-pos, 0%));
	transition: transform .25s ease-out, width .25s ease-out;
}
.stories__arrow {
	flex: none;
	width: var(--control); aspect-ratio: var(--peach-ratio);
	padding: 0; border: 0; cursor: pointer;
	background-color: var(--fg);
	-webkit-mask: var(--peach) center / 100% 100% no-repeat;
	mask: var(--peach) center / 100% 100% no-repeat;
	position: relative;
	transition: transform .3s var(--ease-out), opacity .2s;
}
/* The arrow is cut out of the peach, so it always shows the section's background colour. */
.stories__arrow::after {
	content: ""; position: absolute; inset: 0;
	background: var(--bg);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12h15M13 5.5 19.5 12 13 18.5'/%3E%3C/svg%3E") center / 48% no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12h15M13 5.5 19.5 12 13 18.5'/%3E%3C/svg%3E") center / 48% no-repeat;
}
.stories__arrow--prev::after { transform: scaleX(-1); }
.stories__arrow:hover { transform: scale(1.08); }
.stories__arrow[aria-disabled="true"] { cursor: default; transform: none; } /* Stays solid at either end, as on the live site. */

@media (max-width: 63.99em) {
	.stories__track { --slide: 84vw; gap: 0; }
	.story { padding-right: 1rem; }
	.story__figure { grid-template-columns: 1fr; align-items: start; }
	.story__text { padding: 1.25rem 0 0; }
	.story__quote { max-width: none; }
}

/* Video slider: fits the column or group it's in, one video at a time, with the Client stories
   play button, label, pop-up, arrows and progress bar. */
.video-slider { position: relative; }
.video-slider .stories__track { --slide: 100%; gap: var(--space-m); padding-inline: 0; clip-path: none; }
.video-slider .story { flex: 0 0 100%; padding-right: 0; }
.video-slider .story__media { aspect-ratio: var(--slider-ratio, 16 / 9); }
.video-slider .stories__controls { margin-top: var(--space-s); padding-inline: 0; }

/* Client testimonials: the Client stories slider (same slide width, drag, arrows and progress)
   with a large quote in place of each video, and "Name from [logo]" beneath it in muted grey. */
.testimonial { padding-right: var(--gap); }
.testimonial__figure { margin: 0; }
.testimonial__quote { margin: 0; }
.testimonial__quote p {
	margin: 0;
	font-family: var(--font-serif); font-style: italic;
	font-size: var(--testimonial-quote, var(--fs-heading));
	line-height: 1; letter-spacing: 0;
	text-wrap: pretty;
}
.testimonial__mark { color: var(--violet); }
.testimonial__caption {
	display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-xs) var(--space-s);
	margin-top: var(--space-l);
	font-size: var(--testimonial-caption, var(--fs-copy));
	color: color-mix(in srgb, currentColor 45%, var(--bg));
}
.testimonial__logo { --logo-h: clamp(1.5rem, 1.7vw, 2.75rem); }
/* Wider slides than Client stories on larger screens, as in the design: the next quote peeks in
   further right, and lines run longer. Phones keep the Client stories slide width. */
@media (min-width: 48em) { .testimonials .stories__track { --slide: 80.6vw; } }

/* Client logos take the current text colour (see render.php), so they flip with the section.
   Wide wordmarks are capped by width, tall marks by height. */
.story__logo {
	display: block;
	--logo-h: clamp(2rem, 2.57vw, 4.25rem);
	height: var(--logo-h); width: calc(var(--logo-h) * var(--logo-ratio, 3));
	max-width: clamp(7rem, 9vw, 15rem); flex: none;
	aspect-ratio: var(--logo-ratio, 3);
	background-color: currentColor;
	-webkit-mask: var(--logo) left center / contain no-repeat;
	mask: var(--logo) left center / contain no-repeat;
}

/* CTA ----------------------------------------------------------------------
   Big serif heading on the left; copy and a "link + white peach arrow" on the right,
   the copy starting at 52% of the width. Measured from the live site. */

.cta {
	display: grid; gap: var(--space-m) var(--gap);
	/* As on the original site: Section padding plus the page margin, top and bottom. */
	padding: calc(var(--space-xl) + var(--edge)) var(--edge);
}
.cta .cta__title {
	margin: 0;
	font-size: var(--wp--preset--font-size--heading-large, 9rem);   /* Heading large, as on the original site: max 144px */
	line-height: 1; letter-spacing: 0;
	max-width: 6.3em; /* Breaks as "Let’s get to" / "work" */
	text-wrap: wrap; /* Not balanced, which would split it "Let’s get" / "to work". */
}
/* The right column takes any blocks; they fill it, and buttons sit on the right unless their own
   alignment is set (Buttons → Justification). */
.cta .cta__body { display: grid; gap: var(--space-m); justify-items: stretch; align-self: start; padding-top: var(--space-s); min-width: 0; }
.cta .cta__body > .wp-block-buttons:not([class*="is-content-justification"]) { justify-self: end; }
.cta .cta__body > * { margin: 0; }
.cta .cta__body :is(ul, ol) { font-size: var(--fs-copy); line-height: var(--lh-copy); }
.cta .cta__body img { max-width: 100%; height: auto; }

/* Contact card (pattern): a headshot beside name, role and link, e.g. in a call to action. */
.contact-card { display: flex !important; align-items: flex-end; gap: var(--space-m); }
/* The photo's default size; resize it with the Image block's own controls (drag its corner, or
   Width and Aspect ratio in its settings), which then take over. */
.contact-card .wp-block-image { flex: none; margin: 0; }
.contact-card .wp-block-image:not(.is-resized) { width: clamp(6rem, 9vw, 10rem); }
.contact-card .wp-block-image:not(.is-resized) img { width: 100%; }
.contact-card .wp-block-image img { aspect-ratio: 2 / 3; object-fit: cover; }
.contact-card__details { display: grid; gap: .15em; }
.contact-card__details > * { margin: 0 !important; }
.contact-card__name { font-weight: 600; }
.cta .cta__body p { justify-self: stretch; font-size: var(--fs-copy); line-height: var(--lh-copy); letter-spacing: 0; }
.cta .wp-block-buttons { margin: 0; }

/* The site's arrow button: a link with a white peach arrow. Buttons in the call to action, and
   Gravity Forms' Submit, Next and Previous (.cyon-arrow-button, inc/gravity-forms.php). */
:is(.cta .wp-block-button__link, .cyon-arrow-button) {
	display: inline-flex; align-items: center; gap: 1rem;
	padding: 0; border: 0; border-radius: 0;
	background: none; color: inherit;
	font-size: var(--fs-copy); letter-spacing: 0;
}
:is(.cta .wp-block-button__link, .cyon-arrow-button)::after {
	content: "";
	width: var(--control); aspect-ratio: var(--peach-ratio); flex: none;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23665eea' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12h15M13 5.5 19.5 12 13 18.5'/%3E%3C/svg%3E") center / 46% no-repeat;
	-webkit-mask: var(--peach) center / 100% 100% no-repeat;
	mask: var(--peach) center / 100% 100% no-repeat;
	transition: transform .35s var(--ease-out);
}
:is(.cta .wp-block-button__link, .cyon-arrow-button):hover { background-color: transparent; color: inherit; } /* Not the background shorthand: that would wipe out the underline. */
:is(.cta .wp-block-button__link, .cyon-arrow-button):hover::after,
:is(.cta .wp-block-button__link, .cyon-arrow-button):focus-visible::after { transform: translateX(.25em); }
.cta.is-style-light .wp-block-button__link::after { background-color: var(--purple); } /* White would vanish on a light CTA. */
/* Form buttons sit on any background: the peach follows the text colour (white on dark, purple on light). */
.cyon-arrow-button { font-family: inherit; line-height: 1.2; cursor: pointer; }
.cyon-arrow-button.cyon-arrow-button::after { background-color: currentColor; }   /* Doubled class: beats the shared style above. */
.cyon-arrow-button--back { flex-direction: row-reverse; }
.cyon-arrow-button.cyon-arrow-button--back::after { transform: scaleX(-1); }
.cyon-arrow-button.cyon-arrow-button--back:is(:hover, :focus-visible)::after { transform: scaleX(-1) translateX(.25em); }
.cyon-arrow-button:disabled, .cyon-arrow-button[aria-disabled="true"] { opacity: .5; cursor: progress; }
.cyon-arrow-button:focus-visible { outline: 2px solid currentColor; outline-offset: 6px; }

/* Paragraphs added to the left column, under the title. On phones they follow the title, before
   the right column, wherever they sit in the editor. */
.cta > p { margin: 0; max-width: 34ch; font-size: var(--fs-copy); line-height: var(--lh-copy); letter-spacing: 0; }
.cta > .cta__title { order: 0; }
.cta > p { order: 1; }
.cta > .cta__body { order: 2; }

@media (min-width: 64em) {
	/* Two columns: the title, and any paragraphs under it, on the left; the right column spans
	   the full height. The last row is flexible, so the right column's height never spreads the
	   title and its paragraphs apart; empty rows take no space. */
	.cta {
		grid-template-columns: minmax(0, 1fr) 42.8vw;
		grid-template-rows: repeat(11, auto) 1fr;
		column-gap: 0; row-gap: 0;
	}
	.cta > .cta__title, .cta > p { grid-column: 1; }
	.cta > .cta__body { grid-column: 2; grid-row: 1 / -1; }
	.cta > p { margin-top: var(--space-s); margin-right: var(--gap); }
	.cta > .cta__title + p { margin-top: var(--space-m); }
}

/* Join our team ------------------------------------------------------------
   As on the live Join Us page (measured): heading and intro on the left (52.8% of the
   width between the margins); open roles on the right, one row each between muted rules,
   ending with "Can't see your role? Message us". */

.join {
	--join-rule: color-mix(in srgb, currentColor 36%, var(--bg));
	display: grid; grid-template-columns: 52.8% 1fr; align-items: start;
	padding: var(--space-xl) var(--edge);
}
.join__intro { padding-right: var(--gap); }
.join__intro > * { margin: 0; }
.join .join__title {
	font-size: var(--join-title, clamp(3rem, 5.9vw, 9rem));   /* As on the live Join Us page. */
	line-height: .96; letter-spacing: 0;
	text-wrap: wrap;
}
.join__intro > * + * { margin-top: var(--space-xs); }
.join__intro > p { font-size: var(--fs-copy); line-height: 1.42; max-width: 36em; }

.join__roles { margin-top: -.45vw; }   /* The top rule sits just above the heading, as on the live site. */
.join__list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--join-rule); }
.join__row { border-bottom: 1px solid var(--join-rule); font-size: var(--join-row, var(--fs-copy)); line-height: 1.2; }
.join__row-link,
.join__row--fallback {
	display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: var(--gap);
	padding-block: var(--space-m);
	color: inherit; text-decoration: none;
}
.join__row-link:has(.join__meta) { grid-template-columns: 1fr auto auto; }
.join__meta { color: color-mix(in srgb, currentColor 60%, var(--bg)); }
.join__action { justify-self: end; white-space: nowrap; }

@media (max-width: 63.99em) {
	.join { grid-template-columns: 1fr; }
	.join__intro { padding-right: 0; }
	.join__roles { margin-top: var(--space-l); }
	.join__row-link:has(.join__meta) { grid-template-columns: 1fr auto; }
	.join__meta { grid-column: 1; grid-row: 2; }
}

/* Job details (job page): location, type and salary, and an Apply link with the violet peach arrow. */
.job-details { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-s) var(--space-l); margin-top: var(--space-m); }
.job-details__meta { margin: 0; font-size: var(--fs-copy); color: color-mix(in srgb, currentColor 65%, var(--bg)); }
.job-details__apply { display: inline-flex; align-items: center; gap: 1rem; font-size: var(--fs-copy); color: inherit; text-decoration: none; }

/* Group → Side rules: a thin rule either side, as in the case study text boxes. Text sits in from
   the rules by the page margin unless the group sets its own padding. */
.wp-block-group.is-style-ruled {
	border-inline: 1px solid color-mix(in srgb, currentColor 28%, transparent);
	padding-inline: var(--edge);
}

/* Stat -------------------------------------------------------------------------
   A big number (display serif) with a short label. main.js counts the number up as it comes
   into view; until it's ready the number is hidden, so the final figure doesn't flash first
   (shown after 3s regardless, if JavaScript never arrives). */
.stat { display: grid; gap: var(--space-xs); align-content: start; }
.stat > p { margin: 0; }
.stat__number {
	font-family: var(--font-serif);
	font-size: var(--stat-number, var(--wp--preset--font-size--heading-large));
	line-height: .95; letter-spacing: 0;
	font-variant-numeric: tabular-nums;
}
.stat__label { font-size: var(--stat-label, var(--fs-copy)); line-height: var(--lh-copy); max-width: 24em; }
/* The counting copy holds the final number's width, so changing digits don't shift anything. */
.stat__count { display: inline-grid; }
.stat__count > span,
.stat__count::after { grid-area: 1 / 1; }
.stat__count::after { content: attr(data-final); visibility: hidden; }
.js .stat__number[data-count]:not(.is-ready) { opacity: 0; animation: cyon-reveal 0s linear 3s forwards; }

/* Text width: a centred reading column (62rem), never closer to the edge than the page margins.
   Group → Width → Content width → Text width; and the whole of a Text page (template).
   Full width and edge-to-edge blocks inside still break out. */
.wp-block-group.has-text-width > :not(.alignfull, .is-full-bleed) {
	width: auto !important;
	max-width: var(--text-width) !important;
	margin-left: auto !important; margin-right: auto !important;
}

/* Image → Ink: the image becomes a shape filled with the text colour (the image itself is moved
   out of sight; its outline masks a block of currentColor). */
.wp-block-image.is-style-ink img {
	object-position: -99999px 0;
	background-color: currentColor;
	-webkit-mask: var(--ink) center / contain no-repeat;
	mask: var(--ink) center / contain no-repeat;
	transition: background-color .7s ease;
}

/* Client logos pattern: four across (two on phones), centred in their cells. */
.client-logos {
	display: grid !important; grid-template-columns: repeat(2, 1fr);
	gap: var(--space-l) var(--gap); align-items: center; justify-items: center;
}
@media (min-width: 48em) { .client-logos { grid-template-columns: repeat(4, 1fr); } }
.client-logos > * { margin: 0 !important; width: 100%; }   /* Each logo's frame fills its column… */
.client-logos .wp-block-image img { display: block; height: auto; max-width: 100%; margin-inline: auto; }   /* …and the logo is centred in it, sized against the column. */

/* Video → Width → Fill the width of its container (on by default): the video spans its column or
   section and keeps its proportions, overriding any fixed size (WordPress gives its "GIF" videos
   their own dimensions). */
.wp-block-video.is-fill { width: 100% !important; max-width: 100% !important; }
.wp-block-video.is-fill video { display: block; width: 100% !important; max-width: 100% !important; height: auto !important; }
/* With fill off, a video keeps its own size but never overflows its container. */
.wp-block-video:not(.is-fill) { max-width: 100%; }
.wp-block-video:not(.is-fill) video { max-width: 100%; height: auto; }

/* Pop-up videos (Video and Embed blocks → Open in a pop-up): a still with the Client stories play
   button; clicking opens the pop-up. */
.video-modal__still { position: relative; overflow: hidden; background: var(--tint, #222); }
.video-modal__still > :is(img, video) { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.has-video-modal .wp-block-embed__wrapper { display: none; }

/* Scroll animations (per block: Scroll animation panel) ---------------------
   Hidden states only apply once JavaScript is running (.js), never in the editor, and not at
   all for visitors who prefer reduced motion. A split block that JavaScript never reaches is
   shown after 3s regardless. */

@media (prefers-reduced-motion: no-preference) {
	.js :is([data-anim="fade-up"], [data-anim="fade-in"], [data-anim="zoom-in"]) {
		transition: opacity .9s ease var(--anim-delay, 0ms), transform 1.1s var(--ease-out) var(--anim-delay, 0ms);
	}
	.js [data-anim="fade-up"]:not(.is-in) { opacity: 0; transform: translateY(2.5rem); }
	.js [data-anim="fade-in"]:not(.is-in) { opacity: 0; }
	.js [data-anim="zoom-in"]:not(.is-in) { opacity: 0; transform: scale(.94); }

	.js [data-anim^="split-"]:not(.is-split) { opacity: 0; animation: cyon-reveal 0s linear 3s forwards; }
	.js [data-anim^="split-"] .split-unit {
		display: inline-block;
		transition: transform .9s var(--ease-out), opacity .6s ease;
		transition-delay: calc(var(--anim-delay, 0ms) + var(--i, 0) * var(--step, 40ms));
	}
	.js :is([data-anim="split-words"], [data-anim="split-chars"]):not(.is-in) .split-unit { transform: translateY(110%); }
	.js [data-anim="split-lines"]:not(.is-in) .split-unit { opacity: 0; transform: translateY(.7em); }
}
/* Count up: numbers keep a steady width while they count. */
.count { display: inline-block; font-variant-numeric: tabular-nums; }

/* Words (and the letters inside them) rise from behind their own baseline; the mask clips only
   below, so accents, italics and descenders aren't cut. */
.split-mask { display: inline-block; clip-path: inset(-1em -.2em -.18em -.2em); }
@keyframes cyon-reveal { to { opacity: 1; } }

/* Image parallax (Image blocks: Parallax): the image is enlarged within a clipping frame and
   moved by main.js as the page scrolls. */
.parallax-frame { display: block; overflow: hidden; }
.has-parallax .parallax-frame img {
	display: block; width: 100%;
	transform: translate3d(0, var(--parallax-y, 0px), 0) scale(var(--parallax-scale, 1));
	will-change: transform;
}
@media (prefers-reduced-motion: reduce) {
	.has-parallax .parallax-frame img { transform: none; }
}

/* Editor-only adjustments ------------------------------------------------- */

/* When padding is set on the Client stories block, the editor applies it to the block's
   outer frame; drop the preview's built-in padding on those sides so it isn't counted twice
   (the live page has a single element, where the setting simply replaces it). */
.editor-styles-wrapper [data-type="cyon/client-stories"][style*="padding-top"] .stories { padding-top: 0; }
.editor-styles-wrapper [data-type="cyon/client-stories"][style*="padding-bottom"] .stories { padding-bottom: 0; }

.editor-styles-wrapper .hero { min-height: 70vh; margin-top: 0; padding-top: var(--space-l); }
/* In the editor the statement is one editable heading, so lines aren't justified or coloured individually. */
.editor-styles-wrapper .hero .hero__statement--editing { width: auto; font-size: clamp(2.5rem, 7vw, 9rem); line-height: .9; white-space: pre-wrap; text-align: center; color: var(--coral); }
.editor-styles-wrapper .hero .hero__link { display: inline-block; min-width: 8ch; }
