/* ==========================================================================
   ThisOne theme styles that theme.json can't express.
   Loaded on the front end and inside the block editor.
   ========================================================================== */

:root {
	--header-h: 72px;
	--ease: cubic-bezier(.2, .7, .2, 1);
	--gutter: var(--wp--style--root--padding-left, clamp(16px, 4vw, 40px));
	/* Header and mobile menu sit close to the screen edges: the page gutter, at most 24px */
	--header-pad: min(var(--gutter), 24px);
}

/* Surfaces -----------------------------------------------------------------
   The page appearance (template) and section overrides (Dark / Light styles)
   share these tokens, so every component follows the surface it sits on. */

:root,
.is-style-section-light,
.site-header.is-on-light {
	--surface: var(--wp--preset--color--paper);
	--surface-glass: rgba(243, 241, 236, .82);
	--on-surface: var(--wp--preset--color--ink);
	--on-surface-soft: var(--wp--preset--color--ink-2);
	--rule: rgba(26, 25, 23, .16);
	--rule-strong: rgba(26, 25, 23, .3);
	--ghost-hover: rgba(255, 255, 255, .45);
	--accent-ink: var(--wp--preset--color--accent);
}

.is-style-section-dark,
.site-header.is-on-dark {
	--surface: var(--wp--preset--color--night);
	--surface-glass: rgba(22, 21, 19, .78);
	--on-surface: var(--wp--preset--color--paper);
	--on-surface-soft: rgba(243, 241, 236, .7);
	--rule: rgba(243, 241, 236, .18);
	--rule-strong: rgba(243, 241, 236, .3);
	--ghost-hover: transparent;
	--accent-ink: var(--wp--preset--color--accent-bright);
}

/* A block with its own text colour (a colour field, an accent panel) derives
   soft text and rules from that colour instead of the section around it */
.has-text-color {
	--on-surface-soft: color-mix(in srgb, currentColor 72%, transparent);
	--rule: color-mix(in srgb, currentColor 16%, transparent);
	--rule-strong: color-mix(in srgb, currentColor 30%, transparent);
}

/* Base -------------------------------------------------------------------- */

html {
	scroll-behavior: smooth;
	scroll-padding-top: var(--header-h);
	scrollbar-gutter: stable;
}

body {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

:where(h1, h2, h3, h4, h5, h6, .wp-block-post-title) {
	font-variation-settings: "SOFT" 100, "WONK" 0;
	text-wrap: balance;
}
:where(h1, h2, h3, h4) em { color: var(--accent-ink); }

:focus-visible {
	outline: 2px solid var(--accent-ink);
	outline-offset: 3px;
}

::selection { background: var(--wp--preset--color--accent); color: #fff; }

/* Buttons match the prototype's: a 1.5px border (transparent unless outlined) and a fixed text size */
.wp-block-button > .wp-block-button__link {
	border: 1.5px solid transparent;
	font-size: .9375rem;
	transition: background-color .25s, color .25s, border-color .25s;
}

/* Outline ("ghost" in the prototype) */
.wp-block-button.is-style-outline > .wp-block-button__link {
	padding: 1em 1.55em;
	border: 1.5px solid var(--rule-strong);
	background: transparent;
	color: inherit;
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	border-color: currentColor;
	background: var(--ghost-hover);
	color: inherit;
}

/* Accent: the homepage's main call to action */
.wp-block-button.is-style-accent > .wp-block-button__link { background: var(--wp--preset--color--accent); color: #fff; }
.wp-block-button.is-style-accent > .wp-block-button__link:hover { background: var(--wp--preset--color--ink); color: #fff; }

/* Arrow icons: add the class has-arrow or has-arrow-down to a Button (Advanced > Additional CSS class) */
.wp-block-button.has-arrow { --button-icon: 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.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E"); }
.wp-block-button.has-arrow-down { --button-icon: 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.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14M6 13l6 6 6-6'/%3E%3C/svg%3E"); }
.wp-block-button:is(.has-arrow, .has-arrow-down) > .wp-block-button__link { display: inline-flex; align-items: center; gap: .6em; }
.wp-block-button:is(.has-arrow, .has-arrow-down) > .wp-block-button__link::after {
	content: "";
	flex: none;
	width: 1.15em;
	height: 1.15em;
	background: currentColor;
	-webkit-mask: var(--button-icon) center / contain no-repeat;
	mask: var(--button-icon) center / contain no-repeat;
	transition: transform .35s var(--ease);
}
.wp-block-button.has-arrow > .wp-block-button__link:hover::after { transform: translateX(3px); }
.wp-block-button.has-arrow-down > .wp-block-button__link:hover::after { transform: translateY(3px); }

/* Page shell -------------------------------------------------------------- */

.project-shell {
	position: relative;
	min-height: 100vh;
	background-color: var(--surface);
	color: var(--on-surface);
}

/* Project sections sit edge to edge; each section sets its own spacing */
.project-shell .project-content > * { margin-block: 0; }

/* A project that doesn't open with a hero keeps its first section clear of the fixed header */
.project-shell .project-content > :first-child:not(.project-hero) { margin-top: var(--header-h); }

.site-main { padding-block: calc(var(--header-h) + var(--wp--preset--spacing--40)) var(--wp--preset--spacing--50); }

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

.site-header {
	position: fixed;
	inset: 0 0 auto;
	z-index: 50;
	color: var(--on-surface);
	background: var(--surface-glass);
	-webkit-backdrop-filter: saturate(1.4) blur(14px);
	backdrop-filter: saturate(1.4) blur(14px);
	box-shadow: 0 1px 0 var(--rule);
	transition: background-color .3s, color .3s, box-shadow .3s;
}
.admin-bar .site-header { top: var(--wp-admin--admin-bar--height, 0px); }

/* As in the prototype: clear at the top of the page, frosted once it scrolls, and light or dark to match
   the section underneath (the site script sets is-scrolled, is-on-light and is-on-dark) */
.js .site-header:not(.is-scrolled) {
	background: transparent;
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
	box-shadow: none;
}
/* While the mobile menu is open the header drops its blur: a blurred header would become the frame of the
   full-screen menu inside it and squeeze the menu into the header's height */
.has-modal-open .site-header {
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
}
.site-header.is-on-dark .site-cta .wp-block-button__link:hover {
	background: var(--wp--preset--color--accent-bright);
	color: var(--wp--preset--color--night);
}

.site-header__inner {
	box-sizing: border-box;
	gap: 2rem;
	height: var(--header-h);
	padding-inline: var(--header-pad);
}

.site-brand { display: inline-flex; color: inherit; }
.site-brand svg { display: block; width: 104px; height: 20px; fill: currentColor; }

.site-nav { margin-inline: auto; font-size: .9375rem; font-weight: 600; }
.site-nav .wp-block-navigation__container { gap: 2.25rem; }
.site-nav .wp-block-navigation-item__content { position: relative; padding-block: .4em; text-decoration: none; }
/* The header links (the list also carries site-nav); the mobile overlay's links have their own hover */
ul.site-nav .wp-block-navigation-item__content::after {
	content: "";
	position: absolute;
	inset: auto 0 0;
	height: 1.5px;
	background: currentColor;
	transform: scaleX(0);
	transform-origin: right;
	transition: transform .4s var(--ease);
}
ul.site-nav .wp-block-navigation-item__content:hover { color: inherit; }
/* aria-current="true": the homepage section in view (set by the site script) */
ul.site-nav .wp-block-navigation-item__content:is(:hover, [aria-current="true"])::after { transform: scaleX(1); transform-origin: left; }

.site-header__actions { gap: 1.25rem; }

.site-cta .wp-block-button__link { padding: .72em 1.15em; font-size: .875rem; }

/* Mobile navigation ---------------------------------------------------------
   As in the prototype, the menu button replaces the inline links below 881px
   (WordPress switches at 600px by default). The menu itself is the
   "Navigation overlay" template part. */

.site-nav .wp-block-navigation__responsive-container-open {
	box-sizing: border-box;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1.5px solid var(--rule-strong);
	border-radius: 50%;
	color: inherit;
}
.site-nav .wp-block-navigation__responsive-container-open svg { width: 22px; height: 22px; }

@media (min-width: 600px) and (max-width: 880px) {
	.site-nav .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex; }
	.site-nav .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none; }
}
/* Logo on the left; links and "Let's talk" on the right. Header items need more specificity than
   WordPress's flex-layout margin reset */
.site-header .site-header__inner > .site-nav { margin-inline: auto 0; }
/* On desktop the menu's link to the contact section is shown as the "Let's talk" button instead;
   the mobile menu still lists it (one shared menu, Appearance > Editor > Navigation) */
@media (min-width: 881px) {
	.site-header ul.site-nav > li:has(> a[href$="#contact"]) { display: none; }
}
@media (max-width: 880px) {
	.site-header .site-header__actions { display: none; }
}

/* The overlay: full screen and off-white, logo and close button where the header's sit */
.site-nav .wp-block-navigation__responsive-container.is-menu-open { background: var(--wp--preset--color--paper); }
.site-overlay {
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	min-height: 100dvh;
	padding: 0 var(--header-pad) 32px;
	color: var(--wp--preset--color--ink);
	animation: overlay-in .3s var(--ease);
}
.site-overlay > * { margin-block: 0; }
.site-overlay__top { flex: none; height: var(--header-h); }
.wp-block-navigation-overlay-close {
	box-sizing: border-box;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1.5px solid var(--rule-strong);
	border-radius: 50%;
	background: transparent;
	color: inherit;
	cursor: pointer;
}
.wp-block-navigation-overlay-close svg { width: 22px; height: 22px; fill: currentColor; }

/* WordPress puts the block's class on both the nav wrapper and its list, so space only the wrapper */
.site-overlay__nav:not(ul) { flex: 1; align-items: flex-start; padding-top: 32px; }
.site-overlay__nav .wp-block-navigation__container { flex-direction: column; align-items: flex-start; gap: 0; padding: 0; }
/* The overlay is light even inside a Dark page, so its links don't take the page's link colour */
.site-overlay .site-overlay__email a { color: inherit; }
.site-overlay__nav .wp-block-navigation-item__content {
	display: block;
	padding: .12em 0;
	font-family: var(--wp--preset--font-family--fraunces);
	font-size: clamp(2.75rem, 13vw, 4rem);
	font-weight: 380;
	font-variation-settings: "SOFT" 100;
	letter-spacing: -.02em;
	line-height: 1.12;
	white-space: nowrap;
	text-decoration: none;
}
.site-overlay__nav .wp-block-navigation-item__content:hover,
.site-overlay__nav .wp-block-navigation-item__content:focus-visible { color: var(--wp--preset--color--accent); font-style: italic; }

.site-overlay__foot {
	flex: none;
	gap: 16px;
	padding-top: 24px;
	border-top: 1px solid var(--rule);
	font-weight: 600;
}
.site-overlay__foot p { margin: 0; }

@keyframes overlay-in { from { opacity: 0; } }

/* Over a project hero the header is transparent and takes the hero's text colour
   (Hero block > Color > Text), so light or dark navigation is chosen explicitly per project.
   Once scrolled past the hero it turns solid again. Without JavaScript it simply stays solid. */
.project-shell:has(.project-hero) {
	--hero-ink: var(--wp--preset--color--paper);
	--hero-ground: var(--wp--preset--color--night);
}
.project-shell:has(.project-hero:is(.has-ink-color, .has-night-color, .has-ink-2-color, .has-night-2-color)) {
	--hero-ink: var(--wp--preset--color--ink);
	--hero-ground: var(--wp--preset--color--paper);
}
.js .project-shell:has(.project-hero) .site-header:not(.is-past-hero),
.editor-styles-wrapper .project-shell:has(.project-hero) .site-header {
	--on-surface: var(--hero-ink);
	--surface: var(--hero-ground);
	--rule: color-mix(in srgb, var(--hero-ink) 35%, transparent);
	--rule-strong: color-mix(in srgb, var(--hero-ink) 35%, transparent);
	color: var(--hero-ink);
	background: transparent;
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
	box-shadow: none;
}

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

.wp-block-cover.project-hero {
	padding: calc(var(--header-h) + var(--wp--preset--spacing--40)) var(--gutter) var(--wp--preset--spacing--40);
}
/* Mobile browsers: fill the visible viewport, not the one behind the address bar. Zero specificity (:where), so a
   block's own per-viewport size (Responsive styles → Mobile / Tablet, see functions.php) still takes precedence;
   not for blocks with an aspect ratio (e.g. a 16:9 hero), whose saved minimum height WordPress itself releases. */
@supports (min-height: 100svh) {
	:where(.wp-block-cover, .wp-block-group):where([style*="min-height:100vh"]:not(.has-aspect-ratio)) { min-height: 100svh !important; }
}

/* Hero text sits on the same wide grid as the header; its alignment follows the block's content position */
.project-shell .wp-block-cover.project-hero.has-custom-content-position .wp-block-cover__inner-container,
.project-shell .wp-block-cover.project-hero .wp-block-cover__inner-container {
	width: 100%;
	max-width: var(--wp--style--global--wide-size);
	margin-inline: auto;
}
.project-hero[class*="-center"] .wp-block-cover__inner-container { text-align: center; }
.project-hero[class*="-right"] .wp-block-cover__inner-container { text-align: right; }

.project-hero .wp-block-post-title {
	margin: 0;
	font-size: var(--wp--preset--font-size--display);
	line-height: .96;
	letter-spacing: -.028em;
}
.project-hero .wp-block-post-terms {
	margin-bottom: 1.25rem;
	font-size: .75rem;
	font-weight: 700;
	letter-spacing: .16em;
	text-transform: uppercase;
}
.project-hero .wp-block-post-terms a { text-decoration: none; }
.project-hero__client {
	margin-top: 1rem;
	font-family: var(--wp--preset--font-family--fraunces);
	font-size: var(--wp--preset--font-size--large);
	font-style: italic;
	font-weight: 340;
	opacity: .85;
}

/* "Contain media": show the whole image or video (slides, typography, artwork) on the section surface */
.wp-block-cover.is-style-contain { background-color: var(--surface); }
.wp-block-cover.is-style-contain :is(.wp-block-cover__image-background, .wp-block-cover__video-background) {
	box-sizing: border-box;
	padding: calc(var(--header-h) + var(--wp--preset--spacing--20)) var(--gutter) var(--wp--preset--spacing--20);
	object-fit: contain;
}

/* Sections ----------------------------------------------------------------- */

.is-style-label {
	color: var(--on-surface-soft);
	font-size: .75rem;
	font-weight: 700;
	letter-spacing: .16em;
	text-transform: uppercase;
}

.wp-block-separator.is-style-hairline {
	width: 100%;
	max-width: none;
	height: 0;
	margin-block: 0;
	border: 0;
	border-top: 1px solid var(--rule);
	background: none;
	opacity: 1;
}

/* 50/50 panels: a Columns block (Full width, no gap) whose two Columns are panels with their own
   background and padding. Panels stay equal height; the Column's vertical alignment setting
   positions the content inside the panel instead of shrinking the panel. */
.wp-block-columns.project-panels { margin-block: 0; }
.wp-block-columns.project-panels > .wp-block-column {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-self: stretch;
	box-sizing: border-box;
	min-width: 0;
}
/* Exact halves even when only one panel has padding (a width set on the Column in the editor still wins) */
.wp-block-columns.project-panels > .wp-block-column:not([style*="flex-basis"]) { flex: 1 1 50%; }
.wp-block-columns.project-panels > .wp-block-column.is-vertically-aligned-top { justify-content: flex-start; }
.wp-block-columns.project-panels > .wp-block-column.is-vertically-aligned-bottom { justify-content: flex-end; }
.wp-block-columns.project-panels > .wp-block-column > :first-child { margin-top: 0; }

/* Media fills its panel edge to edge at its natural proportions (add Column padding to inset it) */
.wp-block-columns.project-panels .wp-block-image { margin: 0; }
.wp-block-columns.project-panels .wp-block-image img { width: 100%; }
.wp-block-columns.project-panels .wp-block-video video { display: block; width: 100%; }

/* Columns stack below 782px (WordPress default). Empty columns hold space on desktop and disappear when stacked. */
@media (max-width: 781px) {
	.wp-block-columns > .wp-block-column:empty { display: none; }
	.wp-block-columns.is-style-reverse-mobile:not(.is-not-stacked-on-mobile) { flex-direction: column-reverse; }
}

/* Media --------------------------------------------------------------------
   Full bleed = Full width alignment; fullscreen = Minimum height 100vh.
   Nothing is cropped unless a Cover block (or a Gallery aspect ratio) is chosen. */

.wp-element-caption { color: var(--on-surface-soft); }
.wp-block-image.alignfull { margin-block: 0; }
.wp-block-image.alignfull img { width: 100%; border-radius: 0; } /* edge to edge: square (see Media corners) */
.wp-block-image.alignfull .wp-element-caption,
.wp-block-video.alignfull .wp-element-caption {
	box-sizing: border-box;
	max-width: calc(var(--wp--style--global--wide-size) + 2 * var(--gutter));
	margin: .75rem auto 0;
	padding-inline: var(--gutter);
}
.wp-block-video.alignfull video { display: block; width: 100%; }

/* "Fullscreen, contain": the whole image or video fits inside the visible screen */
.project-media-screen > :is(.wp-block-image, .wp-block-video) { display: flex; flex-direction: column; align-items: center; margin: 0; }
.project-media-screen :is(.wp-block-image img, .wp-block-video video) {
	width: auto;
	max-width: 100%;
	max-height: calc(100svh - 2 * var(--wp--preset--spacing--40) - 3rem);
	object-fit: contain;
}

/* Media corners: images and videos have a subtle radius on the visible media, set by the theme.json token
   custom.media.radius (images take it from theme.json; videos have no corner setting, so it is set here).
   Square by default: media running edge to edge across the full width (Full width without padding) and
   Cover blocks (heroes, fullscreen backgrounds). Block styles decide per block: "Subtle Rounded" always
   rounds, "Square" never does, and WordPress's own "Rounded" image style stays fully round. */
.wp-block-video video { border-radius: var(--wp--custom--media--radius); }
.wp-block-video:where(.alignfull:not([style*="padding"])) video { border-radius: 0; }
.wp-block-image.is-style-subtle-rounded img,
.wp-block-video.is-style-subtle-rounded video { border-radius: var(--wp--custom--media--radius); }
.wp-block-image.is-style-square img,
.wp-block-video.is-style-square video { border-radius: 0; }
/* WordPress's "Rounded" keeps its own fully round shape; the theme's default radius would otherwise replace it */
.wp-block-image.is-style-rounded img,
.wp-block-image .is-style-rounded img { border-radius: 9999px; }
/* A Gallery's own Border > Radius setting applies to all its images (0 makes the whole gallery square) */
:where(.wp-block-gallery[style*="border-radius"]) > .wp-block-image,
:where(.wp-block-gallery[style*="border-radius"]) > .wp-block-image img { border-radius: inherit; }
/* Captions laid over gallery images follow the image's corners */
.wp-block-gallery.has-nested-images figure.wp-block-image:has(figcaption)::before,
.wp-block-gallery.has-nested-images figure.wp-block-image figcaption {
	border-radius: 0 0 var(--wp--custom--media--radius) var(--wp--custom--media--radius);
}
.wp-block-gallery.has-nested-images figure.wp-block-image.is-style-square:has(figcaption)::before,
.wp-block-gallery.has-nested-images figure.wp-block-image.is-style-square figcaption { border-radius: 0; }

/* Adobe Publish Online publications (Embed block with an indd.adobe.com link). The 16:9 frame and the clipping of
   Adobe's grey bands are set by the embed handler (functions.php); here only the corners follow the media
   convention: rounded, square when Full width runs edge to edge. Full-width captions keep to the page gutter. */
.wp-block-embed .thisone-publication { border-radius: var(--wp--custom--media--radius); }
.wp-block-embed.alignfull:not([style*="padding"]) .thisone-publication { border-radius: 0; }
.wp-block-embed.alignfull:has(.thisone-publication) .wp-element-caption {
	box-sizing: border-box;
	max-width: calc(var(--wp--style--global--wide-size) + 2 * var(--gutter));
	margin: .75rem auto 0;
	padding-inline: var(--gutter);
}

/* Slide gallery: Gallery block with style "Slider". Its Columns setting is "slides per view";
   the next slide peeks in so the gallery reads as scrollable. */
.wp-block-gallery.has-nested-images:is(.is-style-slider, .is-style-slider-swipe) {
	--slide-width: 44%;
	--slider-inset: 0px;
	flex-wrap: nowrap;
	align-items: flex-start;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scroll-padding-inline: var(--slider-inset);
	padding-inline: var(--slider-inset);
	scrollbar-width: thin;
}
/* Full width: the first slide lines up with the page grid */
.wp-block-gallery.alignfull:is(.is-style-slider, .is-style-slider-swipe) {
	--slider-inset: calc(var(--gutter) + max(0px, (100% - var(--wp--style--global--wide-size)) / 2));
}
.wp-block-gallery:is(.is-style-slider, .is-style-slider-swipe).columns-1 { --slide-width: 82%; }
.wp-block-gallery:is(.is-style-slider, .is-style-slider-swipe).columns-3 { --slide-width: 29%; }
.wp-block-gallery:is(.is-style-slider, .is-style-slider-swipe):is(.columns-4, .columns-5, .columns-6, .columns-7, .columns-8) { --slide-width: 22%; }
.wp-block-gallery.has-nested-images:is(.is-style-slider, .is-style-slider-swipe) figure.wp-block-image:not(#individual-image) {
	flex: 0 0 auto;
	width: var(--slide-width) !important;
	max-width: none;
	margin: 0;
	scroll-snap-align: start;
}
.wp-block-gallery:is(.is-style-slider, .is-style-slider-swipe):focus-visible { outline-offset: -2px; }
@media (max-width: 781px) {
	.wp-block-gallery:is(.is-style-slider, .is-style-slider-swipe) { --slide-width: 86% !important; }
}

.slider-controls {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	margin-top: 16px;
}
.slider-controls[hidden] { display: none; }
.slider-button {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1.5px solid var(--rule-strong);
	border-radius: 50%;
	background: transparent;
	color: inherit;
	cursor: pointer;
	transition: background-color .25s, color .25s, border-color .25s;
}
.slider-button svg { width: 20px; height: 20px; }
.slider-button:hover:not(:disabled) { border-color: var(--on-surface); background: var(--on-surface); color: var(--surface); }
.slider-button:disabled { opacity: .35; cursor: default; }

/* Project details: Disciplines and Software tools ----------------------------
   A quiet strip between the project content and Related projects, filled from the project's fields
   (see functions.php). Pills and icons take the surface's text and rule colours, so they suit Light and Dark. */

.project-details { padding-top: var(--wp--preset--spacing--40); }
.project-details__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px 32px;
}
.project-details__disciplines,
.project-details__tools {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.project-details__disciplines li,
.project-details__tools .project-tool-name {
	padding: .45em .95em;
	border: 1px solid var(--rule-strong);
	border-radius: 999px;
	color: var(--on-surface);
	font-size: .8125rem;
	font-weight: 600;
	line-height: 1.3;
}
.project-details__tools { gap: 10px; color: var(--on-surface); }
.project-tool {
	display: block;
	width: 28px;
	height: 28px;
	background: currentColor;
	-webkit-mask: var(--tool-icon) center / contain no-repeat;
	mask: var(--tool-icon) center / contain no-repeat;
}
/* The movable block "ThisOne — Project Details": same lists. Placed directly in the project content it keeps the
   strip's spacing above; inside a Group or Columns it follows that container's spacing. */
.wp-block-thisone-project-details { width: 100%; } /* also in the panels' flex columns, which shrink-wrap their blocks */
.project-content > .wp-block-thisone-project-details { padding-top: var(--wp--preset--spacing--40); }
.thisone-project-details-note { margin: .5rem 0 0; color: var(--on-surface-soft); font-size: .8125rem; }

/* Related projects (template part) ------------------------------------------ */

.related-projects .wp-block-post-template { gap: clamp(40px, 5vw, 72px) clamp(16px, 2vw, 28px); }
.related-projects .wp-block-post > * { margin-block: 0; }
.related-projects .wp-block-post-featured-image { overflow: hidden; border-radius: 14px; background: var(--wp--preset--color--night-2); }
.related-projects .wp-block-post-featured-image img { transition: transform 1.1s var(--ease); }
.related-projects .wp-block-post:hover .wp-block-post-featured-image img { transform: scale(1.045); }
.related-projects__terms {
	margin-top: 1.1rem !important;
	color: var(--on-surface-soft);
	font-size: .75rem;
	font-weight: 700;
	letter-spacing: .16em;
	text-transform: uppercase;
}
.related-projects__terms a { color: inherit; text-decoration: none; }
.related-projects__title { margin-top: .35rem !important; font-size: clamp(1.5rem, 2.1vw, 2rem); line-height: 1.12; }
.related-projects__title a { text-decoration: none; }
.related-projects__title a:hover { color: var(--accent-ink); }
/* No other published projects yet: show only "Back to all work" */
.related-projects:not(:has(.wp-block-post)) :is(.project-section__label, .related-projects__query) { display: none; }

/* Contact and footer (template part "Footer") ------------------------------- */

.site-contact { padding-top: clamp(96px, 13vw, 176px); }
.site-contact.site-contact > * { margin-block: 0; }

.contact-head:not(.is-layout-flex) {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 19rem);
	align-items: end;
	gap: 24px 48px;
}
.contact-head > * { margin: 0; }
.contact-title.contact-title {
	margin-left: -.04em;
	font-size: clamp(4.6rem, 16vw, 15rem);
	letter-spacing: -.045em;
	line-height: .9;
}
.contact-note { padding-bottom: 1.4rem; color: var(--on-surface-soft); font-size: 1.125rem; text-wrap: pretty; }

.contact-email {
	margin-top: clamp(36px, 4vw, 56px) !important;
	padding-bottom: clamp(48px, 6vw, 80px);
	font-family: var(--wp--preset--font-family--fraunces);
	font-size: clamp(1.75rem, 4.4vw, 3.5rem);
	font-weight: 340;
	font-variation-settings: "SOFT" 100;
	letter-spacing: -.02em;
	line-height: 1.15;
	overflow-wrap: anywhere;
}
/* No underline: the large type marks it as the link; hover and keyboard focus turn it the accent colour
   (focus also keeps the site-wide focus outline) */
/* When the heading and email share one group (Site Editor), the email sits close beneath the heading */
.contact-head .contact-email { margin-top: clamp(16px, 2.25vw, 32px) !important; }
.contact-email a { color: inherit; text-decoration: none; transition: color .25s; }
.contact-email a:is(:hover, :focus-visible) { color: var(--accent-ink); }

.contact-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 24px;
	padding-block: clamp(40px, 5vw, 64px) clamp(72px, 9vw, 120px);
}
.contact-grid > * { margin: 0; }

.contact-person { align-items: flex-start; gap: 20px; }
.contact-person > * { margin: 0; }
.contact-avatar { flex: none; overflow: hidden; width: 84px; height: 84px; margin: 0; border-radius: 50%; background: var(--wp--preset--color--paper-2); }
/* Crop in slightly so the face, not the shoulders, fills the circle */
.contact-avatar img { width: 100%; height: 100%; border-radius: 0; object-fit: cover; transform: scale(1.2); transform-origin: 50% 32%; }
.contact-person__text > * { margin-block: 0; }
.contact-name { font-family: var(--wp--preset--font-family--fraunces); font-size: 1.75rem; font-weight: 400; font-variation-settings: "SOFT" 100; line-height: 1.15; }
.contact-role { color: var(--on-surface-soft); }

/* Behance / LinkedIn: core Social Icons block shown as outlined pills with labels */
.wp-block-social-links.social-pills { gap: 8px; margin-top: 14px; padding: 0; }
.wp-block-social-links.social-pills .wp-social-link { margin: 0; border-radius: 999px; background: none; color: inherit; }
.wp-block-social-links.social-pills .wp-block-social-link-anchor {
	box-sizing: border-box;
	display: flex;
	align-items: center;
	gap: .5em;
	min-height: 44px;
	padding: 0 .8em;
	border: 1px solid var(--rule);
	border-radius: 999px;
	color: inherit;
	font-size: .875rem;
	font-weight: 600;
	transition: border-color .3s, background-color .3s;
}
.wp-block-social-links.social-pills .wp-block-social-link-anchor:hover { border-color: var(--accent-ink); background: rgba(238, 90, 60, .08); }
.wp-block-social-links.social-pills .wp-block-social-link-anchor svg { width: 17px; height: 17px; }
.wp-block-social-links.social-pills .wp-social-link .wp-block-social-link-label { margin: 0; padding: 0; font-size: .875rem; line-height: 1; }

/* Toptal credential: the whole card is the link */
.toptal-card {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: 2px 24px;
	justify-self: end;
	align-self: center;
	box-sizing: border-box;
	width: min(100%, 440px);
	padding: 22px 26px;
	border: 1px solid var(--rule);
	border-radius: 14px;
	transition: border-color .3s, background-color .3s;
}
.toptal-card:hover { border-color: var(--accent-ink); background: rgba(238, 90, 60, .08); }
.toptal-card > * { margin: 0; }
.toptal-card__label { font-size: .8125rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.toptal-card__sub { grid-row: 2; color: var(--on-surface-soft); font-size: .9375rem; }
.toptal-card__cta { grid-row: 1 / 3; grid-column: 2; color: var(--accent-ink); font-weight: 700; }
.toptal-card__cta a { color: inherit; text-decoration: none; }
.toptal-card__cta a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }

@media (max-width: 900px) {
	.contact-head { grid-template-columns: 1fr; }
	.contact-note { max-width: 26rem; padding-bottom: 0; }
}
@media (max-width: 760px) {
	.contact-grid { grid-template-columns: 1fr; }
	.toptal-card { justify-self: stretch; width: 100%; }
}
@media (max-width: 480px), (min-width: 761px) and (max-width: 900px) {
	.toptal-card { grid-template-columns: 1fr; }
	.toptal-card__cta { grid-row: auto; grid-column: auto; margin-top: 14px; }
}

.site-footer__inner {
	box-sizing: border-box;
	gap: 16px 32px;
	max-width: calc(var(--wp--style--global--wide-size) + 2 * var(--gutter));
	margin-inline: auto;
	padding: 28px var(--gutter) 32px;
	color: var(--on-surface-soft);
	font-size: .9375rem;
}
.site-footer-bar { border-top: 1px solid var(--rule); }
/* Copyright on the left, Back to top on the right at every width (also if they ever wrap) */
.site-footer__inner > .site-footer__copy { margin: 0 auto 0 0; }
.site-footer__nav { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0 0 0 auto; }
.site-footer__nav a { text-decoration: none; }
.site-footer__nav a:hover { color: var(--on-surface); }

/* Homepage ------------------------------------------------------------------
   Ported from the approved prototype. The Home page holds the content; the
   layout rules below stay with the theme. */

.home-shell {
	position: relative;
	background-color: var(--surface);
	color: var(--on-surface);
}
.home-shell .home-content > * { margin-block: 0; }
.home-content :where(p) { line-height: 1.6; }

.home-section { padding-block: clamp(88px, 11vw, 160px); }
.home-section > * { margin-block: 0; }

.home-eyebrow {
	display: flex;
	align-items: center;
	gap: .7em;
	color: var(--on-surface-soft);
	font-size: .75rem;
	font-weight: 700;
	letter-spacing: .16em;
	text-transform: uppercase;
}
/* The section number: "<em>01</em> Portfolio" */
.home-eyebrow em {
	color: var(--accent-ink);
	font-family: var(--wp--preset--font-family--fraunces);
	font-size: 1.0625rem;
	font-weight: 400;
	letter-spacing: 0;
	text-transform: none;
}

.home-section-title {
	font-size: clamp(2.5rem, 6vw, 5.25rem);
	letter-spacing: -.028em;
	line-height: .98;
	text-wrap: wrap;
}
:is(.home-section-title, .home-hero__title) em { font-style: italic; font-weight: 340; }

.home-section-intro { max-width: 27rem; color: var(--on-surface-soft); text-wrap: pretty; }

.home-section-head {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 20px 48px;
	align-items: end;
	margin-bottom: clamp(40px, 6vw, 80px) !important;
}
.home-section-head > * { margin: 0; }
.home-section-head > .home-eyebrow { grid-column: 1 / -1; }
@media (max-width: 800px) {
	.home-section-head { grid-template-columns: 1fr; }
}

/* Intro drawing (checkpoint O): the System Blueprint line drawing beside the headline, a background layer of the
   intro Group (Additional CSS class "home-intro"). Desktop only: from 1400px the headline is at its full 8rem and
   the project grid at its 1280px width and 28px gutter, the measurements the drawing is built on (module 61px).
   Narrower screens show the headline alone and never load the file. Static, decorative, never takes the pointer. */
@media (min-width: 1400px) {
	.home-intro { position: relative; isolation: isolate; }
	.home-intro::before {
		content: "";
		position: absolute;
		z-index: -1;
		/* top stays auto, so the layer starts where the headline starts (below the Group's top padding);
		   the margin puts the drawing's axis on the headline's first baseline */
		margin-top: -76px;
		/* the module field ends on the content's right edge; axis and base run on to the screen edge */
		left: calc(50% + var(--wp--style--global--wide-size, 1280px) / 2 - 638px);
		right: 0;
		height: 854px;
		background: url("../images/home-intro-blueprint.svg") 0 0 / 976px 854px no-repeat;
		pointer-events: none;
	}
	/* Whole pixels keep the 1px lines sharp. In @supports, not as a second declaration: with var() inside, an
	   unsupported round() would only fail after the cascade and drop the position instead of falling back. */
	@supports (left: round(down, 1px, 1px)) {
		.home-intro::before { left: round(down, 50% + var(--wp--style--global--wide-size, 1280px) / 2 - 638px, 1px); }
	}
}

/* Hero: a Cover block. Its image is the desktop artwork, behind the text with a soft wash; below 1080px it moves
   under the text as the mobile crop (the Image block "home-hero__mobile", served through a <picture>). */
.home-hero.wp-block-cover {
	flex-direction: column;
	align-items: stretch;
	min-height: max(660px, min(100svh, 1000px));
	padding: var(--header-h) 0 0;
	overflow: hidden;
	isolation: isolate;
	color: var(--on-surface);
}
.home-hero > .home-hero__picture { display: contents; }
.home-hero .wp-block-cover__image-background { animation: settle 1.8s var(--ease) both; }
.home-hero.wp-block-cover .wp-block-cover__background {
	opacity: 1 !important;
	background: linear-gradient(90deg, rgba(243, 241, 236, .7) 0%, rgba(243, 241, 236, .25) 38%, rgba(243, 241, 236, 0) 55%) !important;
	pointer-events: none;
}
.home-hero .wp-block-cover__inner-container {
	display: flex;
	flex: 1;
	flex-direction: column;
	width: 100%;
	color: var(--on-surface);
}
.home-hero :is(.home-hero__content, .home-hero__partners) {
	box-sizing: border-box;
	width: 100%;
	max-width: calc(var(--wp--style--global--wide-size) + 2 * var(--gutter));
	margin: 0 auto;
	padding-inline: var(--gutter);
}
.home-hero__content {
	display: flex;
	flex: 1;
	flex-direction: column;
	justify-content: center;
	align-items: flex-start;
	padding-block: clamp(24px, 6vh, 56px) clamp(16px, 4vh, 40px);
}
.home-hero__content > * { margin: 0; }

.home-hero__title {
	font-size: clamp(3.4rem, 7.6vw, 7.75rem);
	letter-spacing: -.028em;
	line-height: .94;
	text-wrap: wrap;
}
/* Each line (a line break in the editor) rises in turn; the site script wraps the lines */
.home-hero__title .line {
	display: block;
	animation: rise 1s var(--ease) both;
	animation-delay: calc(var(--n) * 90ms + 100ms);
}
.js .home-hero__title:not(.is-split) { animation: rise 1s var(--ease) .1s both; }

.home-hero__lead {
	max-width: 25rem;
	margin-top: 1.75rem !important;
	color: var(--on-surface-soft);
	font-size: 1.125rem;
	text-wrap: pretty;
	animation: rise 1s var(--ease) .45s both;
}
.home-hero__cta {
	align-items: stretch;
	gap: 12px;
	margin-top: 2.25rem !important;
	animation: rise 1s var(--ease) .55s both;
}
/* Both buttons take the height of the taller one (the one with the arrow), as in the prototype */
.home-hero__cta > .wp-block-button { display: flex; }
.home-hero__cta > .wp-block-button > .wp-block-button__link { display: inline-flex; align-items: center; }

.home-hero__partners {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px 40px;
	padding-block: 28px 36px;
}
.home-hero__partners > * { margin: 0; }
.home-partners {
	--partners-gap: clamp(24px, 3.4vw, 52px);
	--partners-logo: 26px;
	display: flex;
	flex: 1;
	flex-wrap: wrap;
	align-items: center;
	gap: 20px var(--partners-gap);
}
.home-partners .wp-block-image { margin: 0; }
.home-partners img {
	display: block;
	width: auto;
	height: var(--partners-logo) !important; /* the editor sets an inline height: auto on images */
	border-radius: 0;
	filter: grayscale(1) brightness(.5); /* grayscale: colour logos take the same muted grey as the SVGs */
	opacity: .8;
	transition: filter .3s, opacity .3s;
}
.home-partners .wp-block-image:is(:hover, .is-hover) img { filter: grayscale(1) brightness(0); opacity: 1; }

/* Logo marquee: the logos (Image blocks in the Group "home-partners") glide slowly from right to left in an
   endless loop; the label beside them stays put. The site script wraps the logos in a moving track and adds
   copies of the set (hidden from screen readers, keyboard and pointer) so the loop has no seam, whatever the
   number of logos. Without the script, or with reduced motion, the logos stay the static row above.
   From the first paint (html.js) the row is already a single clipped line with the marquee's spacing, so
   starting the motion moves nothing. */
@media (prefers-reduced-motion: no-preference) {
	.js .home-partners {
		flex-wrap: nowrap;
		align-self: stretch;
		min-width: 0;
		gap: 0;
		overflow: hidden;
		overflow: clip; /* also stops a focused logo from scrolling the strip */
		-webkit-mask-image: linear-gradient(90deg, transparent 0, #000 48px, #000 calc(100% - 48px), transparent 100%);
		mask-image: linear-gradient(90deg, transparent 0, #000 48px, #000 calc(100% - 48px), transparent 100%);
	}
	.js .home-partners .wp-block-image { flex: none; padding-inline-end: var(--partners-gap); }
	.home-partners__track,
	.home-partners__set { display: flex; flex: none; align-items: center; }
	.home-partners.is-moving .home-partners__track {
		animation: partners-marquee var(--marquee-duration, 30s) linear infinite;
		will-change: transform;
	}
	/* Pauses while pointed at, while a (linked) logo has keyboard focus, and while off screen */
	.home-partners.is-moving:is(:hover, :focus-within, .is-paused) .home-partners__track { animation-play-state: paused; }
}
@keyframes partners-marquee {
	to { transform: translate3d(calc(-1 * var(--marquee-distance, 0px)), 0, 0); }
}

@media (max-width: 1079px) {
	.home-hero.wp-block-cover { min-height: 0; }
	.home-hero.wp-block-cover .wp-block-cover__background { display: none; }
	/* The text, the artwork and the logos stack in that order */
	.home-hero .wp-block-cover__inner-container { display: contents; }
	.home-hero__content { flex: none; order: 1; padding-block: 32px 0; }
	.home-hero.wp-block-cover > .home-hero__picture,
	.home-hero.wp-block-cover > .wp-block-cover__image-background {
		display: block;
		order: 2;
		position: relative;
		width: 100%;
		max-width: 760px;
		height: auto;
		margin: 4px auto 0;
		-webkit-mask-image: linear-gradient(180deg, transparent 0, #000 14%, #000 82%, transparent 100%);
		mask-image: linear-gradient(180deg, transparent 0, #000 14%, #000 82%, transparent 100%);
	}
	.home-hero.wp-block-cover > .home-hero__picture > .wp-block-cover__image-background { position: static; display: block; width: 100%; height: auto; }
	.home-hero__lead { max-width: 34rem; }
	.home-hero__partners { order: 3; flex-direction: column; align-items: flex-start; padding-block: 8px 40px; }
}
/* Where the artwork is narrower than the screen, its sides fade into the page too */
@media (min-width: 761px) and (max-width: 1079px) {
	.home-hero.wp-block-cover > .home-hero__picture,
	.home-hero.wp-block-cover > .wp-block-cover__image-background {
		-webkit-mask-image: linear-gradient(180deg, transparent 0, #000 14%, #000 82%, transparent 100%), linear-gradient(90deg, transparent 0, #000 14%, #000 86%, transparent 100%);
		mask-image: linear-gradient(180deg, transparent 0, #000 14%, #000 82%, transparent 100%), linear-gradient(90deg, transparent 0, #000 14%, #000 86%, transparent 100%);
		-webkit-mask-composite: source-in;
		mask-composite: intersect;
	}
}
@media (max-width: 600px) {
	.home-partners { --partners-logo: 24px; --partners-gap: 32px; gap: 18px 28px; }
}

/* Selected work: a Query Loop of published projects, ordered by each project's Order.
   The prototype's rhythm repeats every ten projects: 7+5, 4+4+4, 5+7, 4+4+4 (of 12 columns).
   A last row that isn't full is spread across the width, so any number of projects lays out cleanly. */
.home-work { padding-top: clamp(56px, 7vw, 104px); }
.home-work-grid {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	gap: clamp(40px, 5vw, 72px) clamp(16px, 2vw, 28px);
}
.home-work-grid > .wp-block-post { position: relative; grid-column: span 6; margin: 0; }
.home-work-grid > .wp-block-post > * { margin: 0; }

.home-card__media {
	position: relative;
	overflow: hidden;
	aspect-ratio: 1;
	border-radius: 14px;
	background: var(--wp--preset--color--paper-2);
}
.home-card__media > * { margin: 0; }
.home-card__media .wp-block-post-featured-image { position: absolute; inset: 0; }
.home-card__media .wp-block-post-featured-image img {
	width: 100%;
	height: 100%;
	border-radius: 0;
	object-fit: cover;
	transition: transform 1.1s var(--ease);
}
.home-work-grid > .wp-block-post:hover .home-card__media img { transform: scale(1.045); }

.home-card__body {
	display: flex;
	flex-direction: column;
	gap: .2rem;
	padding: 1.1rem 3.75rem 0 0;
}
.home-card__body > * { margin: 0; }
.home-card__title {
	font-size: clamp(1.5rem, 2.1vw, 2rem);
	font-weight: 400;
	letter-spacing: -.015em;
	line-height: 1.12;
	text-wrap: wrap;
}
.home-card__title a { color: inherit; text-decoration: none; }
.home-card__title a:hover { color: inherit; }
/* The whole card is the project link */
.home-card__title a::after { content: ""; position: absolute; inset: 0; border-radius: 14px; }
.home-card__title a:focus-visible { outline: none; }
.home-card__title a:focus-visible::after { outline: 2px solid var(--accent-ink); outline-offset: 6px; }
/* Project Categories under the title, as plain text ("Reports & Publications · Visual Systems") */
.home-card__categories { color: var(--on-surface-soft); font-size: .9375rem; }

/* The round arrow in the card's corner */
.home-work-grid > .wp-block-post::before,
.home-work-grid > .wp-block-post::after {
	content: "";
	position: absolute;
	right: 0;
	bottom: .3rem;
	box-sizing: border-box;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	pointer-events: none;
	transition: background-color .3s, color .3s, border-color .3s, transform .45s var(--ease);
}
.home-work-grid > .wp-block-post::before { border: 1.5px solid var(--rule-strong); }
.home-work-grid > .wp-block-post::after {
	background: currentColor;
	-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.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17 17 7M8 7h9v9'/%3E%3C/svg%3E") center / 20px 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.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17 17 7M8 7h9v9'/%3E%3C/svg%3E") center / 20px no-repeat;
}
.home-work-grid > .wp-block-post:hover::before { border-color: var(--wp--preset--color--accent); background: var(--wp--preset--color--accent); transform: rotate(45deg); }
.home-work-grid > .wp-block-post:hover::after { color: #fff; transform: rotate(45deg); }

@media (min-width: 961px) {
	.home-work-grid > .wp-block-post { grid-column: span 4; }
	.home-work-grid > :is(:nth-child(10n+1), :nth-child(10n+7)) { grid-column: span 7; }
	.home-work-grid > :is(:nth-child(10n+2), :nth-child(10n+6)) { grid-column: span 5; }
	/* Last row not full: one card spans the width, two share it */
	.home-work-grid > :is(:nth-child(10n+1), :nth-child(10n+3), :nth-child(10n+6), :nth-child(10n+8)):last-child { grid-column: 1 / -1; }
	.home-work-grid > :is(:nth-child(10n+3), :nth-child(10n+8)):nth-last-child(2),
	.home-work-grid > :is(:nth-child(10n+4), :nth-child(10n+9)):last-child { grid-column: span 6; }
	/* Wide cards and cards spanning the width use a fixed height instead of a square */
	.home-work-grid > :is(:nth-child(10n+1), :nth-child(10n+2), :nth-child(10n+6), :nth-child(10n+7)) .home-card__media,
	.home-work-grid > :is(:nth-child(10n+3), :nth-child(10n+8)):is(:last-child, :nth-last-child(2)) .home-card__media,
	.home-work-grid > :is(:nth-child(10n+4), :nth-child(10n+9)):last-child .home-card__media {
		aspect-ratio: auto;
		height: clamp(340px, 42vw, 600px);
	}
}
@media (max-width: 600px) {
	.home-work-grid { row-gap: 44px; }
	.home-work-grid > .wp-block-post { grid-column: 1 / -1; }
	.home-card__media { aspect-ratio: 5 / 4; }
}

/* Services */
.home-services__layout {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	gap: clamp(48px, 7vw, 112px);
}
.home-services__layout > * { margin: 0; }
.home-services__aside {
	position: sticky;
	top: calc(var(--header-h) + 32px);
	align-self: start;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 1.6rem;
}
.home-services__aside > * { margin: 0; }

/* Each service is numbered automatically, so services can be added, removed or reordered freely */
.home-services__list { border-top: 1.5px solid var(--on-surface); counter-reset: service; }
.home-services__list > .home-service {
	display: grid;
	grid-template-columns: 2.75rem minmax(0, 1fr);
	gap: 0 1rem;
	margin: 0;
	padding-block: clamp(26px, 3vw, 38px);
	border-bottom: 1px solid var(--rule-strong);
	counter-increment: service;
}
.home-service::before {
	content: counter(service, decimal-leading-zero);
	grid-row: 1 / span 3;
	padding-top: .55em;
	color: var(--accent-ink);
	font-family: var(--wp--preset--font-family--fraunces);
	font-size: 1.125rem;
	font-style: italic;
	line-height: 1.6;
}
.home-service > * { grid-column: 2; margin: 0; }
.home-service__head { display: flex; align-items: baseline; gap: 1rem; }
.home-service__head > * { margin: 0; }
/* The dotted leader between the service and its tag */
.home-service__head::after {
	content: "";
	order: 1;
	flex: 1;
	min-width: 1.5rem;
	border-bottom: 2px dotted var(--rule-strong);
	transform: translateY(-.3em);
}
.home-service__name {
	font-size: clamp(1.65rem, 2.6vw, 2.35rem);
	font-weight: 400;
	letter-spacing: -.018em;
	line-height: 1.1;
	text-wrap: wrap;
}
.home-service__tag {
	order: 2;
	color: var(--on-surface-soft);
	font-size: .75rem;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	white-space: nowrap;
}
.home-service__desc { max-width: 34rem; margin-top: .6rem !important; color: var(--on-surface-soft); }
.home-service__refs { margin-top: 1.1rem !important; }

/* Paragraph style "Project links": "<em>Related work</em>" followed by links shown as chips */
.is-style-project-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .5rem;
	font-size: .875rem;
}
.is-style-project-links em {
	margin-right: .25rem;
	color: var(--on-surface-soft);
	font-family: var(--wp--preset--font-family--fraunces);
	font-size: 1rem;
	font-style: italic;
}
.is-style-project-links a {
	display: inline-flex;
	align-items: center;
	padding: .5em .95em;
	border: 1px solid var(--rule-strong);
	border-radius: 999px;
	color: inherit;
	font-weight: 600;
	line-height: 1.6;
	text-decoration: none;
	transition: background-color .25s, color .25s, border-color .25s;
}
.is-style-project-links a:hover { border-color: var(--on-surface); background: var(--on-surface); color: var(--surface); }

@media (max-width: 900px) {
	.home-services__layout { grid-template-columns: 1fr; }
	.home-services__aside { position: static; }
}
@media (max-width: 600px) {
	.home-services__list > .home-service { grid-template-columns: 1fr; }
	.home-service::before { grid-row: auto; padding: 0 0 .35rem; }
	.home-service > * { grid-column: 1; }
	.home-service__head { flex-wrap: wrap; gap: .4rem; }
	.home-service__head::after { display: none; }
	.home-service__tag { flex-basis: 100%; order: -1; }
}

/* About and process */
.home-about__layout {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	gap: clamp(48px, 7vw, 112px);
	align-items: end;
}
.home-about__layout > * { margin: 0; }
.home-about__intro { display: flex; flex-direction: column; align-items: flex-start; gap: 1.6rem; }
.home-about__intro > * { margin: 0; }
/* Capped at the photo's native 226px so it is never upscaled */
.home-about__portrait.wp-block-image { width: 226px; max-width: 100%; margin-bottom: .4rem; }
.home-about__portrait img {
	width: 100%;
	aspect-ratio: 1;
	border-radius: 50%;
	object-fit: cover;
	object-position: 50% 40%;
	background: var(--wp--preset--color--paper-2);
}
.home-about__copy { display: flex; flex-direction: column; gap: clamp(36px, 4vw, 52px); }
.home-about__copy > * { margin: 0; }
.home-about__lead { display: grid; gap: .9em; max-width: 36rem; font-size: 1.1875rem; }
.home-about__lead > * { margin: 0; }

.home-experience { display: grid; gap: 1.1rem; padding-top: 1rem; border-top: 1.5px solid var(--on-surface); }
.home-experience > * { margin: 0; }
.home-experience__title { font-size: 1.5rem; font-weight: 400; letter-spacing: 0; line-height: 1.15; }
/* An editorial name list rather than chips, so it doesn't read as the clickable links in Services */
.home-experience__list {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	column-gap: 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.home-experience__list a {
	color: inherit;
	text-decoration: none;
}

.home-experience__list a:hover {
	color: var(--wp--preset--color--accent);
	text-decoration: none;
}

.home-experience__list li {
	padding-block: .75rem;
	border-bottom: 1px solid var(--rule);
	font-family: var(--wp--preset--font-family--fraunces);
	font-size: clamp(1.25rem, 1.7vw, 1.5rem);
	font-variation-settings: "SOFT" 100;
	letter-spacing: -.01em;
	line-height: 1.2;
}

/* Process steps, numbered automatically. As rendered in the approved prototype, the steps start right
   below the rule (its list reset overrides the padding its stylesheet sets). */
.home-steps {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(24px, 4vw, 56px);
	margin-top: clamp(72px, 9vw, 128px) !important;
	border-top: 1px solid var(--rule-strong);
	counter-reset: step;
}
.home-steps > .home-step { display: flex; flex-direction: column; gap: .7rem; margin: 0; counter-increment: step; }
.home-step > * { margin: 0; }
.home-step::before {
	content: counter(step, decimal-leading-zero);
	color: var(--accent-ink);
	font-family: var(--wp--preset--font-family--fraunces);
	font-size: 3rem;
	font-style: italic;
	font-weight: 300;
	line-height: 1;
}
.home-step h3 { font-size: 1.6rem; font-weight: 400; letter-spacing: -.01em; line-height: 1.6; }
.home-step p { max-width: 22rem; color: var(--on-surface-soft); }

@media (max-width: 900px) {
	.home-about__layout { grid-template-columns: 1fr; gap: 32px; }
	.home-about__portrait.wp-block-image { width: clamp(140px, 40vw, 160px); }
}
@media (max-width: 700px) {
	.home-steps { grid-template-columns: 1fr; }
	.home-experience__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Reveal on scroll: cards, services, portrait and steps fade up as they come into view (site script adds is-in) */
.js :is(.home-work-grid > .wp-block-post, .home-service, .home-about__portrait, .home-step) {
	opacity: 0;
	transform: translateY(28px);
	transition: opacity .9s var(--ease) var(--delay, 0ms), transform .9s var(--ease) var(--delay, 0ms);
}
.js :is(.home-work-grid > .wp-block-post, .home-service, .home-about__portrait, .home-step).is-in { opacity: 1; transform: none; }

@keyframes rise { from { opacity: 0; transform: translateY(24px); } }
@keyframes settle { from { opacity: 0; transform: scale(1.04); } }

/* Editor -------------------------------------------------------------------- */

/* In the editor the header sits at the top of the page instead of following the scroll */
.editor-styles-wrapper .site-header { position: absolute; top: 0; }
.editor-styles-wrapper .wp-block-column:empty { min-height: 120px; }
/* The hero's mobile artwork is edited here and shown on the site below 1080px */
.editor-styles-wrapper .home-hero__mobile {
	order: 4;
	width: 160px;
	margin: 0 0 24px var(--gutter);
	outline: 1px dashed var(--rule-strong);
	outline-offset: 6px;
}
.editor-styles-wrapper .home-hero__mobile::before {
	content: "Mobile image (below 1080 px)";
	display: block;
	margin-bottom: 6px;
	font-size: .75rem;
	font-weight: 700;
}
/* Let clicks reach the blocks of the project card while editing */
.editor-styles-wrapper .home-card__title a::after { content: none; }

/* Motion -------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .01ms !important;
		scroll-behavior: auto !important;
	}
	.js :is(.home-work-grid > .wp-block-post, .home-service, .home-about__portrait, .home-step) { opacity: 1; transform: none; }
}
