/* ==========================================================================
   Cyon — site chrome and templates (header, panel, pages, case studies, footer).
   Tokens and block styles are in blocks.css, which loads first.
   Colours, fonts and sizes come from theme.json presets, so the editor and
   the front end stay in step. Change brand values there, not here.
   ========================================================================== */

/* Reset ------------------------------------------------------------------ */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--header-h); }
body {
	margin: 0;
	background-color: var(--bg);
	color: var(--fg);
	transition: background-color .7s ease, color .7s ease;
	font-family: var(--font-text);
	font-size: var(--fs-body);
	line-height: var(--lh-body, 1.4);
	-webkit-font-smoothing: antialiased;
	font-synthesis: none; /* Single-weight fonts: no faux bold or italic headings. */
	text-rendering: optimizeLegibility;
}
img, video, svg, iframe { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
:where(ul[class], ol[class]) { list-style: none; padding: 0; } /* :where() so component padding always wins. */
a { color: inherit; text-underline-offset: .18em; text-decoration-thickness: 1px; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

h1, h2, h3, h4 { font-weight: 400; text-wrap: balance; }
h1, h2 { font-family: var(--font-serif); font-style: italic; line-height: 1; letter-spacing: 0; }
h3, h4 { font-family: var(--font-text); font-style: normal; line-height: 1.15; letter-spacing: 0; }
/* Letter spacing follows the original site: none on headings and text, except Heading big
   (-0.05em) and Heading small (-0.0025em), whatever block they're on. */
:is(h1, h2, h3, h4, h5, h6, p, .wp-block-heading).has-heading-big-font-size { letter-spacing: -.05em; }
:is(h1, h2, h3, h4, h5, h6, p, .wp-block-heading).has-heading-small-font-size { letter-spacing: -.0025em; }
/* Inline emphasis in running text may still use the browser's bold/italic. */
:where(p, li, blockquote, figcaption, dd) :is(strong, b, em, i) { font-synthesis: weight style; }
p { text-wrap: pretty; }

:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.site-header :focus-visible,
.site-menu :focus-visible,
.cta :focus-visible,
.site-footer :focus-visible { outline-color: currentColor; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden; clip: rect(0 0 0 0);
	white-space: nowrap;
}
.skip-link {
	position: absolute; left: var(--edge); top: -10rem; z-index: 100;
	padding: .75rem 1rem; background: var(--fg); color: var(--bg);
}
.skip-link:focus { top: 1rem; }
.site-main:focus { outline: none; }

/* Header ----------------------------------------------------------------- */

.site-header {
	position: relative; z-index: 50;
	min-height: var(--header-h);   /* Holds the space; the bar itself is fixed to the top. */
	background-color: var(--bg);
	transition: background-color .7s ease, color .7s ease;
}

/* The bar stays at the top of the screen. The logo stays put for the first 100px of scrolling,
   then slides up and fades out (main.js adds .logo-away); it comes back at the top. The bar
   itself lets clicks through, so it never blocks the page beneath it. */
.site-header__bar {
	position: fixed; top: 0; left: 0; right: 0;
	display: flex; align-items: center; justify-content: space-between; gap: var(--gap);
	min-height: var(--header-h);
	padding-top: var(--header-offset);   /* The extra top space; the logo is centred in the row below it. */
	padding-inline: var(--edge);
	pointer-events: none;
	z-index: 3;   /* Above the open menu (2) and its violet lead-in (1), so the burger, now the close button, stays on top. */
}
.site-header__bar > * { pointer-events: auto; }

/* Logo and burger sit above the menu so they stay usable while it's open. */
.site-header__bar > * { position: relative; z-index: 3; }

.site-logo, .custom-logo-link { display: inline-flex; text-decoration: none; }
.custom-logo { width: var(--logo-w); height: auto; }
/* Logo ----------------------------------------------------------------------
   The Cyon wordmark, inline SVG in the current text colour. On hover the letters hop
   in turn, unless a Lottie animation is provided (then main.js plays that instead). */
.site-logo { position: relative; color: inherit; }
.site-logo__mark svg, .site-logo__lottie svg { display: block; width: var(--logo-w); height: auto; overflow: visible; }
.site-logo__lottie { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.site-logo__lottie svg { width: 100% !important; height: 100% !important; }
.site-logo__lottie :is(path, [fill]):not([fill="none"]) { fill: currentColor; }   /* Lottie colours follow the logo's colour. */
.site-logo__lottie [stroke]:not([stroke="none"]) { stroke: currentColor; }
.site-logo.has-lottie .site-logo__lottie { opacity: 1; }
.site-logo.has-lottie .site-logo__mark { opacity: 0; }

.logo__letter { transform-box: fill-box; transform-origin: 50% 100%; }
.logo__letter--y { transform-origin: 50% 35%; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
	.site-logo--animate:not(.has-lottie):is(:hover, :focus-visible) .logo__letter { animation: logo-hop .7s cubic-bezier(.3, .7, .4, 1) both; }
	.site-logo--animate:not(.has-lottie):is(:hover, :focus-visible) .logo__letter--y { animation-name: logo-swing; animation-delay: 70ms; }
	.site-logo--animate:not(.has-lottie):is(:hover, :focus-visible) .logo__letter--o { animation-delay: 140ms; }
	.site-logo--animate:not(.has-lottie):is(:hover, :focus-visible) .logo__letter--n { animation-delay: 210ms; }
}
@keyframes logo-hop {
	0%   { transform: none; }
	30%  { transform: translateY(-22%) rotate(-5deg); }
	55%  { transform: translateY(3%) scale(1.04, .93); }
	75%  { transform: translateY(-4%); }
	100% { transform: none; }
}
@keyframes logo-swing {           /* The y's tail swings rather than hops. */
	0%   { transform: none; }
	30%  { transform: translateY(-10%) rotate(10deg); }
	60%  { transform: rotate(-6deg); }
	80%  { transform: rotate(2deg); }
	100% { transform: none; }
}

/* Burger -------------------------------------------------------------------- */

/* The burger stays put while the page scrolls, on a dark purple peach (as on the live site):
   it stands out over light sections and sits quietly on dark ones. */
.burger {
	position: fixed; z-index: 60;
	top: calc(var(--header-offset) + (var(--header-bar) - var(--burger) / var(--peach-ratio)) / 2);   /* Level with the logo. */
	right: var(--edge);
	display: grid; place-items: center;
	width: var(--burger); aspect-ratio: var(--peach-ratio);
	color: #fff;
	transition: transform .35s var(--ease-out), color .35s ease;
}
.burger::before {
	content: ""; position: absolute; inset: 0; z-index: -1;
	background: var(--purple);
	-webkit-mask: var(--peach) center / 100% 100% no-repeat;
	mask: var(--peach) center / 100% 100% no-repeat;
	transition: transform .35s var(--ease-out), background-color .35s ease;
}
/* Open: the same peach, in the same place, becomes the close button: white with a dark X, so it
   stands out on the dark menu. */
.burger[aria-expanded="true"] { color: var(--purple); }
.burger[aria-expanded="true"]::before { background: var(--paper); }
.burger:hover::before { transform: scale(1.08) rotate(-4deg); }
.burger:active::before { transform: scale(.94); }
/* Clear the WordPress admin bar when logged in. */
.admin-bar .burger { top: calc(var(--header-offset) + (var(--header-bar) - var(--burger) / var(--peach-ratio)) / 2 + 32px); }
@media (max-width: 782px) { .admin-bar .burger { top: calc(var(--header-offset) + (var(--header-bar) - var(--burger) / var(--peach-ratio)) / 2 + 46px); } }
/* Keep room in the header bar where the fixed burger sits. */
.site-header__bar::after { content: ""; width: var(--burger); flex: none; }

/* Three lines; the middle one fades and the outer two cross into an X. */
.burger__lines { position: relative; display: block; width: 43%; height: 32%; }
.burger__lines span {
	position: absolute; left: 0; right: 0; height: 1.5px;
	background: currentColor;
	transition: transform .4s var(--ease-out), top .4s var(--ease-out), opacity .2s;
}
.burger__lines span:nth-child(1) { top: 0; }
.burger__lines span:nth-child(2) { top: calc(50% - .75px); }
.burger__lines span:nth-child(3) { top: calc(100% - 1.5px); }
.burger[aria-expanded="true"] .burger__lines span:nth-child(1),
.burger[aria-expanded="true"] .burger__lines span:nth-child(3) { top: calc(50% - .75px); }
.burger[aria-expanded="true"] .burger__lines span:nth-child(1) { transform: rotate(45deg); }
.burger[aria-expanded="true"] .burger__lines span:nth-child(3) { transform: rotate(-45deg); }
.burger[aria-expanded="true"] .burger__lines span:nth-child(2) { opacity: 0; }



.site-logo, .custom-logo-link { transition: opacity .45s ease, transform .7s var(--ease-out); }
/* After the menu closes, the logo waits for the menu to clear before fading back in. */
.site-header.menu-closing :is(.site-logo, .custom-logo-link) { transition-delay: .45s; }
html.logo-away .site-header:not(.is-open) :is(.site-logo, .custom-logo-link) {
	opacity: 0; transform: translateY(-150%); pointer-events: none;
	transition: opacity .35s ease, transform .6s var(--ease-out);
}
@media (prefers-reduced-motion: reduce) {
	html.logo-away .site-header:not(.is-open) :is(.site-logo, .custom-logo-link) { transform: none; }   /* Fade only. */
}
.custom-logo { transition: filter .5s ease .2s; }
/* The logo steps aside while the menu is open, as on the current site. */
.site-header.is-open :is(.site-logo, .custom-logo-link) { opacity: 0; transition-delay: 0s; pointer-events: none; }
/* On dark sections an image logo is turned white. Assumes a single-colour logo. */
html.is-dark .custom-logo { filter: brightness(0) invert(1); }

/* Full-screen menu ----------------------------------------------------------
   Two peaches grow from the burger: a violet one leads and the dark menu follows a
   beat behind, so the opening reads on light and dark sections alike. JS sets
   --menu-x / --menu-y (the burger's centre) and --menu-w / --menu-h (a peach big
   enough to cover the screen) on the header. The mask size and position move
   together, so the peach stays centred on the burger as it grows. */

.site-menu, .site-menu-wave {
	position: fixed; inset: 0; z-index: 2;
	-webkit-mask: var(--peach) no-repeat;
	mask: var(--peach) no-repeat;
	-webkit-mask-size: 0 0; mask-size: 0 0;
	-webkit-mask-position: var(--menu-x, calc(100% - 2.5rem)) var(--menu-y, 2.25rem);
	mask-position: var(--menu-x, calc(100% - 2.5rem)) var(--menu-y, 2.25rem);
	transition: -webkit-mask-size .8s cubic-bezier(.76, 0, .24, 1), -webkit-mask-position .8s cubic-bezier(.76, 0, .24, 1),
		mask-size .8s cubic-bezier(.76, 0, .24, 1), mask-position .8s cubic-bezier(.76, 0, .24, 1);
}
.site-menu.is-open, .site-menu-wave.is-open {
	-webkit-mask-size: var(--menu-w) var(--menu-h); mask-size: var(--menu-w) var(--menu-h);
	-webkit-mask-position: calc(var(--menu-x) - var(--menu-w) / 2) calc(var(--menu-y) - var(--menu-h) / 2);
	mask-position: calc(var(--menu-x) - var(--menu-w) / 2) calc(var(--menu-y) - var(--menu-h) / 2);
}
.site-menu-wave { z-index: 1; background: var(--violet); pointer-events: none; }
.site-menu {
	overflow-y: auto; overscroll-behavior: contain;
	background: var(--menu-bg); color: var(--menu-fg);
}
.site-menu.is-open { transition-delay: .08s; }               /* Opening: the violet leads. */
.site-menu:not(.is-open) { transition-delay: 0s; }           /* Closing: the menu shrinks first… */
.site-menu-wave:not(.is-open) { transition-delay: .08s; }    /* …and the violet follows. */

.site-menu__inner {
	display: grid; gap: var(--space-l) var(--gap);
	box-sizing: border-box;
	width: 100%; min-height: 100%;       /* Full width between the page margins, full height of the screen… */
	padding: calc(var(--header-h) + var(--space-m)) var(--edge); /* …with equal room top and bottom… */
	align-content: center;               /* …so the menu sits in the vertical centre. */
}

/* Navigation: large italic serif. */
.site-menu__nav-list { list-style: none; margin: 0; padding: 0; }
.site-menu__nav-list a {
	display: inline-block;
	font-family: var(--font-serif); font-style: italic; font-weight: 400;
	font-size: clamp(3.25rem, min(8.9vw, 18.5vh), 15rem); /* Fits four lines on short screens too. */
	line-height: 1.02; letter-spacing: -.04em;
	text-decoration: none;
	transition: color .25s;
}
.site-menu__nav-list .current-menu-item > a,
.site-menu__nav-list .current_page_parent > a { color: var(--violet); }

/* Split-character roll (letters wrapped by main.js). Each letter has a copy of itself
   below it; on hover the letters rise in turn, 30ms apart, the originals fading as they
   near the top while the copies roll into place. Moving off reverses it. The label clips
   top and bottom only, so italic overhangs show. */
.site-menu__nav-list .split {
	display: inline-block;
	clip-path: inset(-.08em -.5em -.24em -.5em);
}
/* The rising copies sit just below each letter; clip them to the menu's link area (with
   room for italic overhangs and descenders) so they never make the menu scroll. */
.site-menu__nav { overflow: hidden; padding: 2.5rem; margin: -2.5rem; }
.split__char {
	--roll: .85s;                                   /* Duration of each letter's roll. */
	position: relative;
	display: inline-block;
	transition: transform var(--roll) cubic-bezier(.65, .05, .25, 1);
	transition-delay: calc(var(--i, 0) * 30ms);
}
.split__char::after {                              /* The copy that rolls in from below. */
	content: attr(data-char);
	position: absolute; left: 0; top: 1.4em;
}
.split__glyph {
	display: inline-block;
	transition: opacity calc(var(--roll) * .45) ease;
	transition-delay: calc(var(--i, 0) * 30ms);     /* On the way back, fade in as it returns. */
}
@media (hover: hover) {
	.site-menu__nav-list a:hover .split__char { transform: translateY(-1.4em); }
	.site-menu__nav-list a:hover .split__glyph {
		opacity: 0;
		transition-delay: calc(var(--i, 0) * 30ms + var(--roll) * .35); /* Fade only in the last stretch, near the top. */
	}
}
.site-menu__nav-list a:focus-visible .split__char { transform: translateY(-1.4em); }
.site-menu__nav-list a:focus-visible .split__glyph { opacity: 0; transition-delay: calc(var(--i, 0) * 30ms + var(--roll) * .35); }

/* Right-hand column: right-aligned, one size throughout. */
.site-menu__clock,
.site-menu__contact {
	font-size: clamp(1rem, .25rem + 1vw, 2rem);
	line-height: var(--lh-copy);
	letter-spacing: 0;
}
.site-menu__contact { display: grid; gap: .95em; }
.site-menu__contact p { display: grid; justify-items: inherit; margin: 0; }
.site-menu__sep { margin-inline: .6em; }

/* Studio clock: violet now, dimmer violet for the mood, dot lit when the studio's open. */
.clock { display: block; max-width: 24ch; }
.clock__now { color: var(--violet); }
.clock__mood { display: block; color: color-mix(in srgb, var(--violet) 45%, var(--menu-bg)); }
.clock__dot {
	display: inline-block; vertical-align: .1em;
	width: .62em; aspect-ratio: var(--peach-ratio); margin-right: .6em;
	background: color-mix(in srgb, var(--menu-fg) 22%, var(--menu-bg));
}
.clock__dot.is-open { background: var(--violet); }

@media (min-width: 64em) {
	.site-menu__inner {
		grid-template-columns: 1fr auto;
		grid-template-rows: auto auto;
		align-content: center;
		row-gap: 0;
	}
	.site-menu__nav { grid-row: 1 / span 2; align-self: center; }
	.site-menu__clock { align-self: start; justify-self: end; text-align: left; margin-top: .4em; }
	.site-menu__contact { align-self: end; justify-self: end; justify-items: end; text-align: right; margin-bottom: .6em; }
	.site-menu__contact p { justify-items: end; }
	.site-menu__nav-list a { padding-left: .03em; }
}

/* The contents follow the circle in, once it has mostly covered the screen. */
.site-menu__nav-list li,
.site-menu__clock,
.site-menu__contact {
	opacity: 0; transform: translateY(1.5rem);
	transition: opacity .2s, transform .2s;
}
.site-menu.is-open .site-menu__nav-list li,
.site-menu.is-open .site-menu__clock,
.site-menu.is-open .site-menu__contact {
	opacity: 1; transform: none;
	transition: opacity .5s ease, transform .8s var(--ease-out);
	transition-delay: calc(.4s + var(--d, 0) * 70ms);
}
.site-menu__nav-list li:nth-child(2) { --d: 1; }
.site-menu__nav-list li:nth-child(3) { --d: 2; }
.site-menu__nav-list li:nth-child(4) { --d: 3; }
.site-menu__nav-list li:nth-child(5) { --d: 4; }
.site-menu__nav-list li:nth-child(6) { --d: 5; }
.site-menu__clock, .site-menu__contact { --d: 3; }

/* Page locked while the menu or video player is open (main.js). The scrollbar's width is held
   as padding, and the fixed burger and menu allow for it, so nothing jumps sideways. */
html.scroll-locked { overflow: hidden; padding-right: var(--sbw, 0px); }
html.scroll-locked .burger { right: calc(var(--edge) + var(--sbw, 0px)); }
html.scroll-locked .site-menu__inner { padding-right: calc(var(--edge) + var(--sbw, 0px)); }

@media (prefers-reduced-motion: reduce) {
	.site-menu-wave { display: none; }
	.site-menu, .site-menu.is-open { -webkit-mask: none; mask: none; opacity: 0; transition: opacity .2s; }
	.site-menu.is-open { opacity: 1; }
}

/* Page header ------------------------------------------------------------ */

.page-header {
	padding: var(--space-l) var(--edge) var(--space-m);
	max-width: var(--wide); margin-inline: auto;
}
.page-header__title { font-size: var(--fs-display); line-height: .9; letter-spacing: 0; }

/* Title sizes are theme settings: Appearance → Editor → Styles → Blocks → Page title / Case study
   header → Typography (defaults in theme.json: Display for page titles, 4.1vw up to 7rem for
   case studies), or per block in a template. The block's font size is the title's size; the
   other text in these headers keeps its own sizes. */
.wp-block-cyon-page-title .page-header__title { font-size: var(--cs-title, 1em); }
:is(.wp-block-cyon-page-title, .wp-block-cyon-case-study-header) :is(.case-study__intro, .filter) { font-size: var(--wp--preset--font-size--text-normal, 1rem); }
/* Editor previews: the inner copy of the block takes the size set on the block. */
:is(.wp-block-cyon-page-title, .wp-block-cyon-case-study-header) :is(.wp-block-cyon-page-title, .wp-block-cyon-case-study-header) { font-size: inherit; }
.page-header__meta { color: var(--muted); margin-bottom: var(--space-s); }

.empty { padding: 0 var(--edge) var(--space-xl); color: var(--muted); }

/* Template layout ---------------------------------------------------------
   WordPress puts a default gap between the header, main content and footer, and between
   blocks in the main area. The layout spaces itself, so those gaps are removed (a margin
   set on a block in the editor still applies, as an inline style). */
body .wp-site-blocks > * { margin-block: 0; }
.wp-site-blocks .site-main > * { margin-block-start: 0; }

/* Case study ------------------------------------------------------------- */

/* Case study header, as on the live site (measured): two columns divided by thin rules.
   Left (48%): the title, with the services at the foot of the column. Right: the intro
   (the case study's excerpt), sitting on the same baseline as the services. */
.case-study__header {
	--cs-rule: color-mix(in srgb, currentColor 28%, transparent);
	display: grid;
	grid-template-columns: var(--ch-split, 47.8%) 1fr;   /* Header layout → Left column width */
	padding: var(--space-xl) var(--edge);
}
.case-study__primary,
.case-study__intro {
	border-left: 1px solid var(--cs-rule);
	min-height: max(10rem, 14.4vw);   /* As on the live site: the rules run 14.4% of the width. */
}
.case-study__primary {
	display: grid; grid-template-rows: auto 1fr auto; row-gap: var(--space-m);
	padding-left: var(--ch-title-inset, var(--edge));   /* Header layout → Title inset */
	padding-right: var(--gap);
}
.case-study__intro {
	display: flex; align-items: flex-end;
	padding-left: var(--ch-side-inset, var(--space-l));   /* Header layout → Right column inset */
}
.case-study__client { letter-spacing: 0; font-size: var(--cs-services, var(--fs-copy)); }
.case-study .case-study__title,
.case-study__header .case-study__title {
	grid-row: 2; align-self: start;
	margin: 0;
	font-size: var(--cs-title, 1em);   /* The block's font size (theme: Styles → Blocks, or the block's Typography). */
	line-height: .94; letter-spacing: 0;
	margin-top: -.12em;   /* Optical: the capitals' tops line up with the top of the rules. */
}
.case-study__services {
	grid-row: 3;
	margin: 0;
	color: color-mix(in srgb, currentColor 72%, var(--bg));
	font-size: var(--cs-services, var(--fs-copy)); line-height: var(--lh-copy);
	margin-bottom: -.2em;   /* Optical: baseline sits at the foot of the rule, like the intro's. */
}
.case-study__intro-text { width: 100%; }
.case-study__intro-text > * + * { margin-top: var(--space-s); }
.case-study__intro :is(p, li) {
	margin: 0 0 -.2em;
	font-size: var(--cs-intro, var(--fs-copy)); line-height: 1.42; letter-spacing: 0;
	text-wrap: pretty;
}
.case-study__header:not(:has(.case-study__intro)) { grid-template-columns: 1fr; }

/* Work and discipline pages: the same header, with the intro and the discipline filter on
   the right, sitting at the foot of the column like a case study's intro. Less space below,
   as the grid follows straight on. */
.work-header__side { display: grid; gap: var(--space-m); width: 100%; }
.work-header__intro > * { margin: 0; font-size: var(--fs-copy); line-height: 1.42; }
.work-header__intro > * + * { margin-top: var(--space-s); }
.work-header .filter ul { justify-content: flex-start; }

@media (max-width: 47.99em) {
	.case-study__header { grid-template-columns: 1fr; row-gap: var(--space-m); }
	.case-study__primary, .case-study__intro { min-height: 0; }
	.case-study__primary { padding-left: var(--gap); }
	.case-study__intro { border-left: 0; padding-left: 0; }
}

/* Block content ---------------------------------------------------------- */

.entry-content { padding-bottom: var(--space-l); }
/* Widths come from WordPress's layout, as on the original site (theme.json): None 62rem and
   Wide 144rem, centred inside the page margins; Full width edge to edge, its contents keeping the
   margins. */
.entry-content > * + * { margin-top: var(--space-s); }
.entry-content > h2, .entry-content > h3 { margin-top: var(--space-l); }
.entry-content > :is(figure, .wp-block-columns, .wp-block-gallery, .wp-block-video, .wp-block-embed) { margin-block: var(--space-m); }
.entry-content > :first-child { margin-top: 0; }

/* Theme sections with their own page margins (case study header, page title, Related work, post
   list) span the full width wherever they're placed, like a Full width block. */
.has-global-padding > :is(.wp-block-cyon-case-study-header, .wp-block-cyon-page-title, .wp-block-cyon-related-work, .wp-block-cyon-post-list) {
	width: auto !important; max-width: none !important;
	margin-left: calc(var(--wp--style--root--padding-left) * -1) !important;
	margin-right: calc(var(--wp--style--root--padding-right) * -1) !important;
}

/* Edge to edge (Width → Edge to edge on groups, covers, images, videos, galleries, embeds,
   columns): the whole screen width, ignoring the page margins, wherever the block sits.
   :not(#cyon-bleed) lifts the priority above the page and case study margin rules.
   --scrollbar (set by main.js) keeps it from running under a desktop scrollbar. */
.is-full-bleed:not(#cyon-bleed) {
	width: calc(100vw - var(--scrollbar, 0px)) !important;
	max-width: none !important;
	margin-left: calc(50% - 50vw + var(--scrollbar, 0px) / 2) !important;
	margin-right: calc(50% - 50vw + var(--scrollbar, 0px) / 2) !important;
}
.wp-block-group.is-full-bleed:not(#cyon-bleed) { padding-inline: 0; }      /* Padding set in Dimensions still applies. */
.is-full-bleed > .alignfull { margin-inline: 0 !important; }
html { overflow-x: clip; }   /* Belt and braces: an edge-to-edge block never causes sideways scrolling. */

/* Text page template: the title and content share one centred reading column (Text width),
   inside the page margins on small screens. (#cyon-text lifts it above the page width rules.) */
.text-page .entry-content > :not(.alignfull, .is-full-bleed, #cyon-text),
.text-page .page-header > :not(#cyon-text) {
	width: auto !important;
	max-width: min(var(--text-width), 100% - var(--edge) * 2) !important;
	margin-left: auto !important; margin-right: auto !important;
}
.text-page .page-header { padding-inline: 0; }

/* A full-width Group runs edge to edge; its contents keep the page margins. */
.entry-content > .wp-block-group.alignfull { padding-inline: var(--edge); }   /* The space above content comes from what precedes it (e.g. the case study header). */
/* Heading sizes in content: theme.json (as on the original site: H1–H2 Heading large, H3–H4 Heading, H5–H6 Heading small). */
.entry-content :is(ul:not([class]), ol:not([class]), .wp-block-list) { padding-left: 1.25em; }
.entry-content ul.wp-block-list { list-style: disc; }      /* The List block keeps its bullets and numbers. */
.entry-content ol.wp-block-list { list-style: decimal; }
.entry-content .wp-block-list > li + li { margin-top: var(--space-xs); }

.entry-content .is-style-lead { font-size: var(--fs-lead); line-height: var(--lh-lead); letter-spacing: 0; }

.entry-content .wp-block-image img { width: 100%; }
.entry-content .wp-block-image figcaption { font-size: var(--fs-small); color: var(--muted); margin-top: var(--space-xs); }
/* Columns: the gap between columns, and between blocks inside a column, default to spacing M
   (theme.json → styles → blocks), so a block's own Block spacing setting overrides them, 0 included. */
/* Images in columns lose WordPress's default bottom margin only; spacing between blocks comes from Block spacing. */
:where(.entry-content .wp-block-column) .wp-block-image { margin-bottom: 0; }

.entry-content .is-style-trio { align-items: end; }

.entry-content .wp-block-quote { border: 0; padding: 0; font-style: normal; }
.entry-content .wp-block-quote p { font-style: normal; }
.entry-content > .wp-block-quote.is-style-large { width: min(62rem, 100% - var(--edge) * 2); margin-block: var(--space-l); text-align: left; }
.entry-content .wp-block-quote.is-style-large p {
	font-family: var(--font-serif); font-style: italic; font-size: var(--fs-heading);
	line-height: 1.05; letter-spacing: 0;
}
.entry-content .wp-block-quote cite { display: block; margin-top: var(--space-s); font-style: normal; text-align: left; font-size: var(--fs-small); color: var(--muted); }

.entry-content--blocks { padding-bottom: 0; }
.entry-content--blocks > [class*="wp-block-cyon-"] { margin-block: 0; }
.entry-content--blocks > .is-style-statement { margin-top: var(--space-xl); }
/* A Statement at the top of the page is centred on the whole screen, header included. */
.entry-content--blocks > .wp-block-cyon-hero:first-child {
	margin-top: calc(var(--header-h) * -1);
	padding-block: var(--header-h); /* Equal top and bottom, so it's centred on the screen exactly. */
}
.entry-content--blocks > p:not(.is-style-statement):last-of-type,
.entry-content--blocks > :not([class*="wp-block-cyon-"]):has(+ [class*="wp-block-cyon-"]) { margin-bottom: var(--space-l); }

/* Related ---------------------------------------------------------------- */

/* More good stuff (Related work block): as on the original site, the title centred with the Gap
   below it. Alignment, size and gap are block settings; the section's spacing is under Dimensions. */
.related { padding: var(--space-xl) var(--edge); }
.related__title {
	margin: 0 0 var(--related-gap, var(--wp--preset--spacing--global-gap));
	font-size: var(--related-title, var(--fs-heading));
}
.related--center .related__title { text-align: center; }
.related--left .related__title { text-align: left; }
.related .work-grid { padding-inline: 0; }

/* Post list -------------------------------------------------------------- */

.post-list { padding: 0 var(--edge) var(--space-l); max-width: var(--wide); margin-inline: auto; }
.post-list__item a { display: block; padding-block: var(--space-m); border-top: 1px solid var(--rule); text-decoration: none; }
.post-list__title { font-size: var(--fs-lead); }
.post-list__excerpt { color: var(--muted); margin-top: var(--space-xs); max-width: 60ch; }
.navigation.pagination { padding: 0 var(--edge) var(--space-l); }
.nav-links { display: flex; gap: 1rem; }

/* 404 -------------------------------------------------------------------- */

.not-found { display: grid; gap: var(--space-m); justify-items: start; padding: var(--space-xl) var(--edge); max-width: var(--wide); margin-inline: auto; }
.not-found__title { font-size: var(--fs-display); line-height: .9; letter-spacing: 0; max-width: 12ch; }
.not-found p { max-width: 40ch; }

/* Footer -------------------------------------------------------------------
   Dark, quiet: the menu stacked on the left with the copyright under it, legal
   links top right. Measured from the live site. */

/* The end of every page: the closing call to action and the footer together fill one screen's
   height (100vh; the visible height on phones, so the address bar doesn't throw it off). The call
   to action takes the space the footer doesn't need, its content centred in it; the footer sits at
   the bottom. A minimum, so taller content grows rather than being cut off. Pages with no call to
   action keep the footer at its own height. */
.wp-block-template-part:has(> .site-footer):has(> .closing-cta) {
	display: flex; flex-direction: column;
	min-height: 100vh;
	min-height: 100svh;
}
/* The call to action, whatever its layout (a Call to action block or a custom section), fills the
   space above the footer with its content centred in it. */
.wp-block-template-part:has(> .site-footer) > .closing-cta { flex: 1 0 auto; display: flex; flex-direction: column; justify-content: center; }
.closing-cta > * { margin-block: 0; }
.closing-cta > .cta { flex: 1 0 auto; align-content: center; }
.wp-block-template-part:has(> .site-footer) > .site-footer { flex: none; }

.site-footer { color: color-mix(in srgb, var(--fg) 36%, var(--bg)); }
/* Same muted colour when the footer paints its own dark background (in the editor, or without JavaScript). */
html:not(.scroll-theme) .site-footer.is-style-dark:not(.has-text-color) { color: color-mix(in srgb, var(--dark-fg) 36%, var(--dark-bg)); }
.site-footer__inner {
	display: grid; grid-template-columns: 1fr auto; align-items: start; gap: var(--space-m);
	padding: var(--space-m) var(--edge);   /* 48px top and bottom at most, as on the original site. */
}
.site-footer__nav ul { list-style: none; margin: 0; padding: 0; }
.site-footer__nav a {
	font-size: var(--footer-menu, clamp(1.0625rem, 1.42vw, 2.375rem)); line-height: 1.5; letter-spacing: 0;
}
.site-footer__nav .current-menu-item > a { color: var(--fg); }
.site-footer__copy { margin-top: var(--space-m); font-size: var(--footer-copy, clamp(.8125rem, .95vw, 1.5rem)); }
.site-footer__legal ul { display: flex; flex-wrap: wrap; gap: 1.5em; list-style: none; margin: 0; padding: 0; }
.site-footer__legal { font-size: min(var(--footer-legal, clamp(.8125rem, .87vw, 1.375rem)), .875rem); padding-top: .35em; }   /* Never above 14px, whatever size is chosen. */
/* When the footer follows the call to action, it closes the same dark screen. */
.cta + .site-footer, .site-footer { margin-top: 0; }

/* Video dialog ----------------------------------------------------------- */

.video-dialog {
	width: min(92vw, 80rem, (100svh - 7rem) * 16 / 9); max-width: none; /* Video plus Close always fit on screen. */
	padding: 0; border: 0; background: transparent; color: #fff;
	overflow: visible;
}
.video-dialog::backdrop { background: rgb(14 12 26 / 0); transition: background-color .6s ease; }
.video-dialog.is-visible::backdrop { background: rgb(14 12 26 / .94); }
.video-dialog__frame {
	position: relative; overflow: hidden;
	aspect-ratio: 16 / 9;
	background: #000 center / cover no-repeat;   /* The still, while the frame grows. */
	transform-origin: 0 0;
	transition: transform .7s cubic-bezier(.76, 0, .24, 1);
}
.video-dialog__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; opacity: 0; transition: opacity .45s ease; }
.video-dialog__frame.is-ready iframe { opacity: 1; }
.video-dialog__close { opacity: 0; transition: opacity .3s ease; }
.video-dialog.is-visible .video-dialog__close { opacity: 1; transition-delay: .45s; }
@media (prefers-reduced-motion: reduce) {
	.video-dialog__frame { transition: none; }
}
.video-dialog { display: flex; flex-direction: column-reverse; } /* Close sits below the video, though it comes first for focus. */
.video-dialog:not([open]) { display: none; }
.video-dialog__close {
	align-self: flex-start; margin-top: var(--space-s);
	display: inline-flex; align-items: center; gap: .75rem;
	padding: 0; border: 0; background: none; color: #fff; font: inherit; cursor: pointer;
}
/* The same white peach with an X as the menu's close button. */
.video-dialog__close-icon {
	flex: none; width: var(--control); 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='M6.5 6.5l11 11M17.5 6.5l-11 11' stroke='%231a182c' stroke-width='1.8' stroke-linecap='round'/%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);
}
.video-dialog__close:is(:hover, :focus-visible) .video-dialog__close-icon { transform: scale(1.08); }
.video-dialog__close:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
/* Uploaded videos play in the pop-up too; any shape fits the frame. */
.video-dialog__frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; opacity: 0; transition: opacity .45s ease; }
.video-dialog__frame.is-ready video { opacity: 1; }

/* Cursor --------------------------------------------------------------------
   On mouse and trackpad devices a violet peach replaces the pointer. It follows
   exactly (the outer element moves, untransitioned) and the inner peach grows to
   show a label (View, Drag, Play) or swells slightly over links and buttons. Text
   fields keep the normal text cursor, and anything in an iframe or the video
   player uses the system pointer. */

.cursor { display: none; }
@media (hover: hover) and (pointer: fine) {
	html.has-cursor, html.has-cursor * { cursor: none !important; }
	html.has-cursor :is(input:not([type="checkbox"], [type="radio"], [type="submit"], [type="button"]), textarea, select, [contenteditable="true"]) { cursor: auto !important; }
	html.has-cursor:has(dialog[open]), html.has-cursor:has(dialog[open]) * { cursor: auto !important; }

	.cursor {
		position: fixed; top: 0; left: 0; z-index: 2147483000;
		display: block; width: 0; height: 0;
		pointer-events: none;
		transform: translate3d(var(--x, -100px), var(--y, -100px), 0);
	}
	.cursor__shape {
		position: absolute;
		width: 4.6rem; aspect-ratio: var(--peach-ratio);   /* The labelled size (View, Drag, Play). */
		left: -2.3rem; top: calc(-2.3rem / var(--peach-ratio));
		display: grid; place-items: center;
		background: var(--violet); color: #fff;
		font-size: var(--fs-small);
		-webkit-mask: var(--peach) center / 100% 100% no-repeat;
		mask: var(--peach) center / 100% 100% no-repeat;
		transform: scale(.25);  /* Resting dot, 1.15rem. */
		transition: transform .3s var(--ease-out), opacity .2s;
	}
	.cursor.is-link .cursor__shape { transform: scale(.375); opacity: .85; } /* A small swell over links, without hiding the words. */
	.cursor.is-active .cursor__shape { transform: scale(1); }
	.cursor.is-down .cursor__shape { transform: scale(.2); }
	.cursor.is-active.is-down .cursor__shape { transform: scale(.92); }
	.cursor [data-cursor-label] { opacity: 0; transition: opacity .15s; }
	.cursor.is-active [data-cursor-label] { opacity: 1; transition-delay: .08s; }
	.cursor.is-hidden .cursor__shape,
	html:has(dialog[open]) .cursor__shape { opacity: 0; }
}

/* Text link underlines ---------------------------------------------------------
   Text links only (not cards, pills or buttons) underline on hover with a line that
   draws in from left to right, across each line of a link that wraps. Links inside
   paragraphs, captions and plain bullet lists keep a faint line at rest so they can
   be spotted; the named links below are clean until hovered. */

:where(
	.site-footer__nav a,
	.site-footer__legal a,
	.site-menu__contact a,
	.hero__link-text,
	.cta-link-text,
	.post-list__title,
	.video-dialog__close-text,
	.case-study__header a,
	.join__action,
	.job-details__apply-text
),
.entry-content :where(p, figcaption, cite, td, .wp-block-list > li, ul:not([class]) > li, ol:not([class]) > li) a:not(.wp-block-button__link) {
	text-decoration: none;
	background-image: linear-gradient(currentColor, currentColor);
	background-repeat: no-repeat;
	background-position: 0 100%;
	background-size: 0% 1px;
	transition: background-size .5s cubic-bezier(.65, 0, .35, 1), color .2s; /* Even pace, so the line visibly travels. */
	-webkit-box-decoration-break: slice;
	box-decoration-break: slice;
	padding-bottom: .06em;
}
.entry-content :where(p, figcaption, cite, td, .wp-block-list > li, ul:not([class]) > li, ol:not([class]) > li) a:not(.wp-block-button__link) {
	background-image: linear-gradient(currentColor, currentColor), linear-gradient(var(--rule), var(--rule));
	background-size: 0% 1px, 100% 1px;
}

:where(.site-footer__nav a, .site-footer__legal a, .site-menu__contact a, .case-study__header a):is(:hover, :focus-visible),
.video-dialog__close:is(:hover, :focus-visible) .video-dialog__close-text,
.hero__link:is(:hover, :focus-visible) .hero__link-text,
.join__row-link:is(:hover, :focus-visible) .join__action,
a.join__action:is(:hover, :focus-visible),
.job-details__apply:is(:hover, :focus-visible) .job-details__apply-text,
.post-list__item a:is(:hover, :focus-visible) .post-list__title { background-size: 100% 1px; }
.entry-content :where(p, figcaption, cite, td, .wp-block-list > li, ul:not([class]) > li, ol:not([class]) > li) a:not(.wp-block-button__link):is(:hover, :focus-visible) { background-size: 100% 1px, 100% 1px; }

/* The call to action's button is a core Button: underline the words, not the peach arrow. */
:is(.cta .wp-block-button__link, .cyon-arrow-button) {
	background-image: linear-gradient(currentColor, currentColor);
	background-repeat: no-repeat;
	background-position: 0 calc(50% + .72em);
	background-size: 0% 1px;
	transition: background-size .5s cubic-bezier(.65, 0, .35, 1);
}
:is(.cta .wp-block-button__link, .cyon-arrow-button):is(:hover, :focus-visible) { background-size: calc(100% - var(--control) - 1rem) 1px; }
:is(.cta .wp-block-button__link, .cyon-arrow-button):hover { background-color: transparent; }

/* Smooth scrolling (Lenis). Adapted from Lenis's own stylesheet, but iframes stay clickable
   except during a scroll, so the video player's controls always work. */
html.lenis, html.lenis body { height: auto; }
.lenis [data-lenis-prevent], .lenis [data-lenis-prevent-wheel], .lenis [data-lenis-prevent-touch] { overscroll-behavior: contain; }
.lenis.lenis-scrolling iframe { pointer-events: none; }
html.smooth-anchors { scroll-behavior: smooth; }

/* Reduced motion --------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
	.cursor__shape { transition: none !important; }
}

/* ------------------------------------------------------------------------------------------------
   Forms (Gravity Forms). Its own styles are off (inc/gravity-forms.php); these follow the original
   site: small labels, underlined fields in the text colour, the site's arrow button.
   ------------------------------------------------------------------------------------------------ */
.gform_wrapper { --field-gap: var(--wp--preset--spacing--sm, .75rem); color: inherit; }
.gform_wrapper :where(.gform_hidden, .gfield_visibility_hidden, .gform_validation_container, .gfield--type-honeypot) { display: none !important; }
.gform_wrapper .hidden_label .gfield_label,
.gform_wrapper .screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.gform_wrapper form { margin: 0; }
.gform_wrapper .gform_heading { margin-bottom: var(--space-m); }

/* Layout: one column on phones; Gravity Forms' field widths from 48em. */
.gform_wrapper .gform_fields {
	display: grid; grid-template-columns: repeat(12, minmax(0, 1fr));
	gap: var(--space-m) var(--gap);
	margin: 0; padding: 0; list-style: none; border: 0;
}
.gform_wrapper .gfield { grid-column: 1 / -1; display: grid; gap: var(--field-gap); min-width: 0; margin: 0; padding: 0; border: 0; }
@media (min-width: 48em) {
	.gform_wrapper .gfield--width-quarter { grid-column: span 3; }
	.gform_wrapper .gfield--width-third { grid-column: span 4; }
	.gform_wrapper .gfield--width-five-twelfths { grid-column: span 5; }
	.gform_wrapper .gfield--width-half { grid-column: span 6; }
	.gform_wrapper .gfield--width-seven-twelfths { grid-column: span 7; }
	.gform_wrapper .gfield--width-two-thirds { grid-column: span 8; }
	.gform_wrapper .gfield--width-three-quarter { grid-column: span 9; }
}

/* Labels: small, slightly opened up, as on the original site. */
.gform_wrapper :is(.gfield_label, legend.gfield_label, .gform-field-label) {
	display: block; margin: 0; padding: 0;
	font-size: .875rem; letter-spacing: .013125em; line-height: 1.4; font-weight: 400;
}
.gform_wrapper .gfield_required { color: inherit; margin-left: .2em; }
.gform_wrapper :is(.gfield_description, .gform_fileupload_rules, .ginput_counter, .gfield_consent_description) { font-size: .875rem; line-height: 1.4; color: color-mix(in srgb, currentColor 60%, transparent); }

/* Fields: underlined in the text colour, at body text size. */
.gform_wrapper :is(input:not([type="radio"], [type="checkbox"], [type="image"], [type="file"], [type="submit"], [type="button"], [type="hidden"]), textarea, select) {
	width: 100%; min-width: 0; margin: 0;
	padding: 0 0 var(--wp--preset--spacing--nm, .75rem);
	border: 0; border-bottom: 1px solid currentColor; border-radius: 0;
	background: transparent; color: inherit;
	font: inherit; font-size: var(--fs-copy); line-height: 1.4; letter-spacing: 0;
	box-shadow: none; -webkit-appearance: none; appearance: none;
	transition: border-color .2s ease, box-shadow .2s ease;
}
.gform_wrapper :is(input, textarea, select):focus { outline: none; border-bottom-color: var(--violet); box-shadow: 0 1px 0 var(--violet); }
.gform_wrapper :is(input, textarea)::placeholder { color: color-mix(in srgb, currentColor 45%, transparent); opacity: 1; }
.gform_wrapper textarea { min-height: 8em; resize: vertical; }
.gform_wrapper select {
	padding-right: 1.5em; cursor: pointer;
	background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
	background-position: calc(100% - .55em) 45%, calc(100% - .25em) 45%;
	background-size: .3em .3em; background-repeat: no-repeat;
}
.gform_wrapper select option { color: var(--purple); background: #fff; }

/* Multi-part fields (name, address): side by side, each with its small label beneath. */
.gform_wrapper .ginput_complex { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(12rem, 100%), 1fr)); gap: var(--space-s) var(--gap); }
.gform_wrapper .ginput_complex > span, .gform_wrapper .ginput_complex .ginput_full { display: flex; flex-direction: column; gap: .35em; }   /* Sub-labels above or below, as set in the form. */
.gform_wrapper .ginput_complex label { font-size: .875rem; letter-spacing: .013125em; color: color-mix(in srgb, currentColor 60%, transparent); }

/* Choices: brand-coloured ticks and dots, text at body size. */
.gform_wrapper :is(.gfield_checkbox, .gfield_radio) { display: grid; gap: .5em; margin: 0; padding: 0; list-style: none; }
.gform_wrapper .gchoice { display: flex; align-items: center; gap: .6em; }
.gform_wrapper :is(input[type="checkbox"], input[type="radio"]) { width: 1.1em; height: 1.1em; margin: 0; accent-color: var(--violet); flex: none; }
.gform_wrapper .gchoice label, .gform_wrapper .gfield_consent_label { font-size: var(--fs-copy); line-height: 1.4; letter-spacing: 0; }

/* Errors and confirmation. */
.gform_wrapper .gfield_error :is(input, textarea, select) { border-bottom-color: var(--coral); }
.gform_wrapper :is(.validation_message, .gfield_validation_message, .instruction.validation_message) { font-size: .875rem; line-height: 1.4; color: var(--coral); margin: 0; }
.gform_wrapper .gform_validation_errors { margin-bottom: var(--space-m); padding: var(--space-s); border: 1px solid var(--coral); }
.gform_wrapper .gform_validation_errors :is(h2, .gform_submission_error) { margin: 0; font-family: var(--font-text); font-style: normal; font-size: var(--fs-copy); letter-spacing: 0; color: var(--coral); }
.gform_confirmation_message { font-size: var(--fs-copy); line-height: 1.4; }

/* Footer: the site's arrow buttons (Submit, Next, Previous). */
.gform_wrapper :is(.gform_footer, .gform_page_footer) { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-s) var(--space-m); margin-top: var(--space-l); padding: 0; }
.gform_wrapper .gform_ajax_spinner, .gform_wrapper .gform-loader { width: 1.25rem; height: 1.25rem; margin-left: .5rem; }

/* Multi-page progress bar. */
.gform_wrapper .gf_progressbar_title { font-size: .875rem; letter-spacing: .013125em; margin: 0 0 .5em; }
.gform_wrapper .gf_progressbar { height: 2px; background: color-mix(in srgb, currentColor 20%, transparent); margin-bottom: var(--space-m); }
.gform_wrapper .gf_progressbar_percentage { height: 100%; background: var(--violet); }
.gform_wrapper .gf_progressbar_percentage span { display: none; }
