/* ==========================================================================
   CWK Architects — monochrome theme
   ========================================================================== */

:root {
	/* Color tokens */
	--ink: #111111;
	--charcoal: #262626;
	--graphite: #5c5c5c;      /* 6.7:1 on white */
	--mist: #a8a8a8;          /* secondary text on dark (7.9:1 on --ink) */
	--line: #d9d9d9;
	--line-strong: #8c8c8c;   /* form borders, 3.4:1 on white */
	--stone: #f2f2f2;
	--paper: #ffffff;
	--danger: #a3001b;        /* errors only */
	--success: #1d5e2f;

	/* Type */
	--font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	--font-heading: var(--font);
	--fs-body: 1.0625rem;
	--fs-small: 0.875rem;
	--fs-h3: 1.25rem;
	--fs-h2: clamp(1.875rem, 1.3rem + 2.2vw, 3rem);
	--fs-display: clamp(2.5rem, 1.4rem + 4.4vw, 4.75rem);

	/* Space & layout */
	--gutter: clamp(16px, 4vw, 48px);
	--container: 1280px;
	--section: clamp(72px, 9vw, 136px);
	--header-h: 76px;

	/* Motion */
	--ease-out: cubic-bezier(0.22, 1, 0.36, 1);
	--dur-fast: 160ms;
	--dur: 260ms;
	--dur-slow: 600ms;

	--z-header: 100;
	--z-skip: 1000;
}

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

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--font);
	font-size: var(--fs-body);
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; }

h1, h2, h3, h4, .site-footer__lead, .stats dd, .pager__title { font-family: var(--font-heading); }
/* All headings set in capitals; open tracking keeps uppercase legible. Overrides per-element negative tracking. */
h1, h2, h3, h4, .site-footer__lead, .pager__title { text-transform: uppercase; letter-spacing: 0.03em !important; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; line-height: 1.1; letter-spacing: -0.02em; text-wrap: balance; }

p { margin: 0 0 1em; }

address { font-style: normal; }

:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

main:focus { outline: none; }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
	position: fixed; top: 12px; left: 12px; z-index: var(--z-skip);
	padding: 12px 18px; background: var(--paper); color: var(--ink);
	font-weight: 600; text-decoration: none; transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { max-width: calc(760px + var(--gutter) * 2); }

/* ---------- Type helpers ---------- */

.eyebrow {
	margin: 0 0 18px;
	font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
	color: var(--graphite);
	display: flex; align-items: center; gap: 12px;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }

.h2 { font-size: var(--fs-h2); }
.h3 { font-size: var(--fs-h3); font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }
.lead { font-size: 1.25rem; line-height: 1.55; }

.text-link { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.text-link:hover { text-decoration-thickness: 2px; }

/* ---------- Split buttons (label + arrow cell) ---------- */

.btn {
	--btn-fg: var(--ink); --btn-bg: var(--paper); --btn-border: var(--paper);
	display: inline-flex; align-items: stretch; gap: 4px;
	min-height: 52px; text-decoration: none; cursor: pointer;
	font: 600 1rem/1 var(--font); color: var(--btn-fg);
	background: none; border: 0; padding: 0;
	touch-action: manipulation;
}
.btn__label, .btn__icon {
	display: inline-flex; align-items: center;
	border: 1px solid var(--btn-border); background: var(--btn-bg);
	transition: background-color var(--dur) var(--ease-out), color var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
}
.btn__label { padding: 0 22px; white-space: nowrap; }
.btn__icon { width: 52px; justify-content: center; }
.btn__icon .icon { transition: transform var(--dur) var(--ease-out); }
.btn:hover .btn__icon .icon, .btn:focus-visible .btn__icon .icon { transform: translate(2px, -2px); }
.btn:active .btn__label, .btn:active .btn__icon { opacity: 0.85; }

/* Solid (white) */
.btn--solid:hover .btn__icon { background: transparent; color: var(--paper); }

/* Outline (on dark) */
.btn--outline { --btn-fg: var(--paper); --btn-bg: transparent; --btn-border: rgba(255, 255, 255, 0.85); }
.btn--outline:hover .btn__label, .btn--outline:hover .btn__icon { background: var(--paper); color: var(--ink); border-color: var(--paper); }

/* Dark (on light) */
.btn--dark { --btn-fg: var(--paper); --btn-bg: var(--ink); --btn-border: var(--ink); }
.btn--dark:hover .btn__icon { background: var(--paper); color: var(--ink); }

/* Outline (on light) */
.btn--outline-dark { --btn-fg: var(--ink); --btn-bg: transparent; --btn-border: var(--ink); }
.btn--outline-dark:hover .btn__label, .btn--outline-dark:hover .btn__icon { background: var(--ink); color: var(--paper); }

.btn[aria-busy="true"] { pointer-events: none; opacity: 0.6; }

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

/* Light sticky header (white) on text pages; on pages with a hero (.has-overlay-header) it is
   transparent over the photo and scrolls away with it (solid charcoal only while the menu is open). */
.site-header {
	--hdr-bg: var(--paper); --hdr-fg: var(--ink); --hdr-line: rgba(17, 17, 17, 0.12);
	position: sticky; top: 0; z-index: var(--z-header);
	background: var(--hdr-bg); color: var(--hdr-fg);
	transition: background-color var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}
.site-header.is-scrolled { box-shadow: 0 1px 0 var(--hdr-line); }

.has-overlay-header .site-header {
	--hdr-bg: transparent; --hdr-fg: var(--paper); --hdr-line: rgba(255, 255, 255, 0.16);
	position: absolute; left: 0; right: 0; box-shadow: none;
}
.has-overlay-header .site-header.is-open { --hdr-bg: var(--charcoal); }

.admin-bar .site-header { top: var(--wp-admin--admin-bar--height, 32px); }
@media (max-width: 600px) { .admin-bar .site-header { top: 0; } .admin-bar.has-overlay-header .site-header { top: 46px; } }

.site-header__inner { display: flex; align-items: center; gap: 40px; min-height: var(--header-h); }
.site-header__brand { display: inline-flex; padding: 6px 0; }
.site-header__brand .logo { height: 50px; width: auto; }
.site-header .logo--light { display: none; }
.has-overlay-header .site-header .logo--light { display: block; }
.has-overlay-header .site-header .logo--dark { display: none; }

.nav { display: flex; align-items: center; justify-content: flex-end; flex: 1; }
.nav__list { display: flex; gap: 40px; margin: 0; padding: 0; list-style: none; }
.nav__list a {
	display: inline-block; padding: 10px 0; font-weight: 600; font-size: 0.9375rem;
	text-decoration: none; position: relative;
}
.nav__list a::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 1px; background: currentColor;
	transform: scaleX(0); transform-origin: left; transition: transform var(--dur) var(--ease-out);
}
.nav__list a:hover::after, .nav__list a[aria-current="page"]::after, .nav__list .current-menu-item > a::after { transform: scaleX(1); }
.has-overlay-header .site-header:not(.is-open) .nav__list a { text-shadow: 0 1px 10px rgba(0, 0, 0, 0.35); }

.nav-toggle {
	display: none; margin-left: auto; width: 48px; height: 48px;
	background: none; border: 1px solid currentColor; color: inherit; cursor: pointer;
	align-items: center; justify-content: center;
}
.nav-toggle__bars { display: grid; gap: 6px; width: 20px; }
.nav-toggle__bars span { display: block; height: 1.5px; background: currentColor; transition: transform var(--dur) var(--ease-out); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:first-child { transform: translateY(3.75px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:last-child { transform: translateY(-3.75px) rotate(-45deg); }

@media (max-width: 899px) {
	:root { --header-h: 68px; }
	.site-header__brand .logo { height: 42px; }
	.nav-toggle { display: inline-flex; }
	.nav {
		position: absolute; left: 0; right: 0; top: 100%;
		flex-direction: column; align-items: stretch; gap: 24px;
		padding: 16px var(--gutter) 32px; background: var(--hdr-bg);
		border-top: 1px solid var(--hdr-line); box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
		visibility: hidden; opacity: 0; transform: translateY(-8px);
		transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out), visibility 0s linear var(--dur);
	}
	.nav.is-open { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
	.nav__list { flex-direction: column; gap: 0; }
	.nav__list a { display: block; padding: 14px 0; font-size: 1.25rem; border-bottom: 1px solid var(--hdr-line); }
	.nav__list a::after { display: none; }
	.no-js .nav { position: static; visibility: visible; opacity: 1; transform: none; }
}

/* ---------- Hero ---------- */

.hero {
	position: relative; isolation: isolate; color: var(--paper); background: var(--charcoal);
	min-height: 100svh; display: flex;
}
.hero__media { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.hero__img { width: 100%; height: 100%; object-fit: cover; }
.hero__media::after {
	content: ""; position: absolute; inset: 0;
	background:
		linear-gradient(180deg, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0.12) 35%, rgba(0, 0, 0, 0.25) 60%, rgba(0, 0, 0, 0.72) 100%),
		linear-gradient(90deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0) 60%);
}
.hero__inner {
	display: flex; flex-direction: column; gap: 48px;
	/* Top padding clears the transparent header sitting over the image. */
	padding-block: calc(var(--header-h) + clamp(32px, 8vh, 104px)) clamp(40px, 9vh, 88px);
}
.hero__intro {
	align-self: flex-end; max-width: 36ch; margin: 0;
	font-size: 1.0625rem; line-height: 1.6; text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
}
.hero__main { margin-top: auto; }
.hero__title { font-size: var(--fs-display); line-height: 1.04; max-width: 16ch; margin-bottom: 40px; text-shadow: 0 2px 24px rgba(0, 0, 0, 0.25); }
.hero__title--md { font-size: clamp(2.25rem, 1.5rem + 3vw, 4rem); margin-bottom: 12px; }
.hero__sub { font-size: 1.125rem; margin: 0; color: rgba(255, 255, 255, 0.88); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 16px; }

.hero--project { min-height: min(85svh, 900px); }

/* Home headline: Playfair Display serif in sentence case (overrides the site-wide uppercase headings). */
.hero--home .hero__title {
	font-family: "Playfair Display", Georgia, "Times New Roman", serif; font-weight: 400;
	text-transform: none; letter-spacing: -0.01em !important;
	font-size: clamp(1.875rem, 1.1rem + 3.1vw, 3.625rem); line-height: 1.12;
	max-width: 13em; margin-bottom: 0;
}
.hero--home .hero__inner { padding-top: calc(var(--header-h) + clamp(8px, 3vh, 40px)); }
/* Crop from the left so the right wing of the house stays in frame. */
.hero--home .hero__img { object-position: 85% 50%; }
/* Looping video sits over the still image and fades in once it is actually playing. */
.hero__video {
	position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 85% 50%;
	opacity: 0; transition: opacity 800ms var(--ease-out);
}
.hero__video.is-playing { opacity: 1; }

/* Curtain reveal: the home photo stays fixed while the headline and logo scroll away over it,
   then the next sections (given solid backgrounds) slide up and cover it. */
.hero--home .hero__media { position: fixed; inset: 0; }
.home main > section:not(.hero), .home .site-footer { position: relative; z-index: 1; background-color: var(--paper); }
.home main > section.section--dark { background-color: var(--ink); }
.home .site-footer { background-color: var(--ink); }
.home main > .hero + section { box-shadow: 0 -24px 48px rgba(0, 0, 0, 0.18); }

/* Home: headline in the sky at top-left; the header logo is replaced by a large mark
   in the hero's bottom-right corner. */
.home .site-header__brand { display: none; }
.home .site-header__inner { justify-content: flex-end; }
.hero--home .hero__main { margin-top: 0; }
.hero--home .hero__inner { position: relative; }
.hero__logo {
	position: absolute; right: var(--gutter); bottom: clamp(32px, 7vh, 72px);
	filter: drop-shadow(0 2px 16px rgba(0, 0, 0, 0.35));
}
.hero__logo .logo { height: clamp(72px, 4rem + 4vw, 140px); width: auto; }
.hero--home .hero__media::after {
	background:
		linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.2) 40%, rgba(0, 0, 0, 0) 65%, rgba(0, 0, 0, 0.25) 100%),
		linear-gradient(90deg, rgba(0, 0, 0, 0.25) 0%, rgba(0, 0, 0, 0) 55%);
}

.crumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; font-size: var(--fs-small); font-weight: 500; color: rgba(255, 255, 255, 0.88); }
.crumbs a { text-underline-offset: 4px; }

@media (max-width: 767px) {
	.hero__intro { order: 2; align-self: flex-start; font-size: 1rem; }
	.hero__main { order: 1; }
	.hero__title { margin-bottom: 28px; }
}

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

.section { padding-block: var(--section); }
.section--tight { padding-top: 0; }
/* Featured slideshow → What We Do: one modest gap instead of two full section paddings. */
.featured { padding-bottom: clamp(48px, 6vw, 80px); }
.featured + .services { padding-top: 0; }
.section--flush-top { padding-top: 0; }
.section--dark { background: var(--ink); color: var(--paper); }
.section--dark .eyebrow { color: var(--mist); }
.section--stone { background: var(--stone); }

.section-head {
	display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px;
	margin-bottom: clamp(32px, 5vw, 56px);
}
.section-head .h2 { max-width: 20ch; }

.page-hero { padding-block: clamp(56px, 8vw, 112px) clamp(40px, 5vw, 64px); }
.page-hero__title { font-size: clamp(2.5rem, 1.6rem + 3.6vw, 4.5rem); line-height: 1.05; max-width: 18ch; }
.page-hero__lead { margin: 24px 0 0; max-width: 56ch; font-size: 1.1875rem; color: var(--graphite); }
.page-hero--center { text-align: center; padding-block: 18vh; }
.page-hero--center .eyebrow { justify-content: center; }
.page-hero--center .page-hero__title, .page-hero--center .page-hero__lead { margin-inline: auto; }
.page-hero--center .hero__actions { justify-content: center; margin-top: 40px; }

/* Intro + stats */
.intro__grid { display: grid; gap: 40px 80px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .intro__grid { grid-template-columns: 5fr 6fr; } }
.intro__copy > p { font-size: 1.1875rem; color: var(--graphite); max-width: 60ch; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 24px; margin: 40px 0 0; }
.stats__item { display: flex; flex-direction: column-reverse; gap: 6px; padding-top: 20px; border-top: 1px solid var(--ink); }
.stats dd { margin: 0; font-size: clamp(2rem, 1.4rem + 2vw, 2.75rem); font-weight: 500; letter-spacing: -0.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.stats dt { font-size: var(--fs-small); color: var(--graphite); }

/* Services / approach list */
.services__list {
	list-style: none; margin: 0; padding: 0; counter-reset: svc;
	display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 32px;
}
/* Five items: 3 + 2 at mid widths, one row of five on desktop (avoids a lone orphan). */
@media (min-width: 900px) { .services__list--five { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1200px) { .services__list--five { grid-template-columns: repeat(5, 1fr); } }
.services__item { counter-increment: svc; padding: 28px 0 8px; border-top: 1px solid var(--ink); }
.services__item::before {
	content: counter(svc, decimal-leading-zero); display: block; margin-bottom: 40px;
	font-size: var(--fs-small); font-weight: 600; color: var(--graphite); font-variant-numeric: tabular-nums;
}
.services__item .h3 { margin-bottom: 12px; }
.services__item p { color: var(--graphite); font-size: 1rem; }

/* Principal (dark band) */
.principal__grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 900px) { .principal__grid { grid-template-columns: 1fr 1fr; gap: 96px; } }
.principal__media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 30%; filter: grayscale(1) contrast(1.05); }
.principal__copy p { color: var(--mist); font-size: 1.125rem; max-width: 48ch; margin: 24px 0 40px; }

/* CTA band */
.cta-band__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }

/* ---------- Cards / grid ---------- */

/* Portfolio mosaic: square photos edge to edge (4px seams). The name/location overlay appears on
   hover or keyboard focus; on touch screens (no hover) it is always shown. */
.grid { display: grid; gap: 4px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1280px) { .grid { grid-template-columns: repeat(4, 1fr); } }

.card { position: relative; }
.card[hidden] { display: none; }
.card__link { position: relative; display: block; overflow: hidden; color: var(--paper); text-decoration: none; }
.card__media { position: relative; overflow: hidden; aspect-ratio: 1 / 1; background: var(--stone); }
/* Tiles show a zoomed-in detail of the cover photo; the full image is on the project page. */
.card__media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.6); transition: transform var(--dur-slow) var(--ease-out); }
.card__media::after {
	content: ""; position: absolute; inset: 0;
	background: rgba(0, 0, 0, 0.55); opacity: 0;
	transition: opacity var(--dur) var(--ease-out);
}
.card__body {
	position: absolute; left: 0; right: 0; bottom: 0;
	display: flex; justify-content: space-between; align-items: flex-end; gap: 16px;
	padding: clamp(18px, 2vw, 28px);
	opacity: 0; transform: translateY(8px);
	transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}
.card__title { font-size: var(--fs-h3); font-weight: 600; line-height: 1.3; }
.card__meta { display: flex; flex-direction: column; gap: 2px; margin: 6px 0 0; font-size: var(--fs-small); color: rgba(255, 255, 255, 0.88); }
.card__arrow {
	flex: none; display: inline-flex; align-items: center; justify-content: center;
	width: 44px; height: 44px; border: 1px solid var(--paper);
	transition: background-color var(--dur) var(--ease-out), color var(--dur) var(--ease-out);
}

.card__link:hover .card__media::after, .card__link:focus-visible .card__media::after { opacity: 1; }
.card__link:hover .card__body, .card__link:focus-visible .card__body { opacity: 1; transform: none; }
.card__link:hover .card__media img, .card__link:focus-visible .card__media img { transform: scale(1.68); }
.card__link:hover .card__arrow, .card__link:focus-visible .card__arrow { background: var(--paper); color: var(--ink); }
.card__link:focus-visible { outline: 3px solid var(--ink); outline-offset: -3px; }

@media (hover: none) {
	.card__media::after { opacity: 1; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, 0.65) 100%); }
	.card__body { opacity: 1; transform: none; }
}

/* Featured: one large image that cycles through projects (crossfade). Without JS the slides stack. */
.slider__viewport { display: grid; gap: 24px; }
.slide { position: relative; overflow: hidden; aspect-ratio: 4 / 5; background: var(--charcoal); color: var(--paper); }
@media (min-width: 640px) { .slide { aspect-ratio: 16 / 10; } }
@media (min-width: 1024px) { .slide { aspect-ratio: 21 / 10; } }
.slide__img {
	position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
	filter: grayscale(1) contrast(1.05);
}
/* Clicking anywhere on the photo opens the project; the caption lets clicks pass through except on the title. */
.slide__media { position: absolute; inset: 0; display: block; cursor: pointer; }
.slide__caption { pointer-events: none; }
.slide__link { pointer-events: auto; color: inherit; text-decoration: none; }
.slide:hover .slide__link, .slide__link:focus-visible { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
.slide__link:focus-visible { outline: 2px solid var(--paper); outline-offset: 4px; }
.slide::after {
	content: ""; position: absolute; inset: 0; pointer-events: none;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, 0.65) 100%);
}
.slide__caption {
	position: absolute; left: 0; right: 0; bottom: 0; z-index: 1;
	display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px;
	padding: clamp(20px, 4vw, 48px);
}
.slide__title { font-size: clamp(1.375rem, 1rem + 1.6vw, 2.25rem); line-height: 1.15; }
.slide__meta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 8px 0 0; font-size: var(--fs-small); color: rgba(255, 255, 255, 0.88); }
.slide__meta span + span::before { content: ""; display: inline-block; width: 4px; height: 4px; margin-right: 16px; vertical-align: middle; background: currentColor; }

.js .slider__viewport { display: grid; gap: 0; }
.js .slide { grid-area: 1 / 1; opacity: 0; visibility: hidden; transition: opacity 900ms var(--ease-out), visibility 0s linear 900ms; }
.js .slide.is-active { opacity: 1; visibility: visible; transition-delay: 0s; z-index: 1; }
.js .slide.is-active .slide__img { animation: cwk-kenburns 7s ease-out both; }
/* Captions never overlap mid-crossfade: outgoing fades fast, incoming waits for the photo. */
.js .slide .slide__caption { opacity: 0; transform: translateY(8px); transition: opacity 250ms var(--ease-out), transform 250ms var(--ease-out); }
.js .slide.is-active .slide__caption { opacity: 1; transform: none; transition: opacity 500ms var(--ease-out) 550ms, transform 500ms var(--ease-out) 550ms; }
@keyframes cwk-kenburns { from { transform: scale(1.06); } to { transform: scale(1); } }

.slider__bar { display: none; }
.js .slider__bar { display: flex; align-items: center; gap: 24px; padding-top: 20px; }
.slider__count { margin: 0; font-size: var(--fs-small); font-weight: 600; letter-spacing: 0.08em; font-variant-numeric: tabular-nums; }
.slider__progress { flex: 1; height: 1px; background: var(--line); overflow: hidden; }
.slider__progress span { display: block; height: 100%; background: var(--ink); transform-origin: left; transform: scaleX(0); }
.slider__controls { display: flex; gap: 8px; }
.slider__btn {
	display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px;
	background: transparent; color: var(--ink); border: 1px solid var(--ink); cursor: pointer;
	transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.slider__btn:hover { background: var(--ink); color: var(--paper); }
.slider__btn .i-play { display: none; }
.slider.is-paused .slider__btn .i-play { display: block; }
.slider.is-paused .slider__btn .i-pause { display: none; }

@media (prefers-reduced-motion: reduce) {
	.js .slide.is-active .slide__img { animation: none; }
}

/* Filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 40px; }
.filters__btn {
	display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px;
	border: 1px solid var(--line-strong); text-decoration: none; font-weight: 600; font-size: 0.9375rem;
	transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.filters__btn:hover { border-color: var(--ink); }
.filters__btn[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.filters__count { font-size: 0.75rem; font-weight: 500; opacity: 0.75; font-variant-numeric: tabular-nums; }

.empty { padding: 64px 0; text-align: center; color: var(--graphite); }

/* ---------- Single project ---------- */

.project__grid { display: grid; gap: 48px; }
@media (min-width: 1024px) {
	.project__grid { grid-template-columns: 320px 1fr; gap: 64px; align-items: start; }
	.project__facts { position: sticky; top: calc(var(--header-h) + 32px); }
}
.project__facts .btn { margin-top: 32px; }
.project__lead { font-size: 1.25rem; margin-bottom: 40px; max-width: 60ch; }

.facts { margin: 0; }
.facts__row { display: grid; gap: 4px; padding: 16px 0; border-top: 1px solid var(--line); }
.facts__row:last-child { border-bottom: 1px solid var(--line); }
.facts dt { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--graphite); }
.facts dd { margin: 0; font-weight: 500; }
.facts--about { margin-top: 40px; }
@media (min-width: 640px) { .facts--about .facts__row { grid-template-columns: 160px 1fr; align-items: baseline; } }

/* Gallery block → editorial grid */
.entry .wp-block-gallery.has-nested-images {
	display: grid !important; grid-template-columns: 1fr; gap: 12px !important; margin: 0;
}
@media (min-width: 640px) { .entry .wp-block-gallery.has-nested-images { grid-template-columns: 1fr 1fr; } }
.entry .wp-block-gallery.has-nested-images figure.wp-block-image {
	width: auto !important; margin: 0 !important; flex: none !important;
}
.entry .wp-block-gallery.has-nested-images figure.wp-block-image img {
	width: 100%; height: 100% !important; aspect-ratio: 3 / 2; object-fit: cover;
}
@media (min-width: 640px) {
	.entry .wp-block-gallery.has-nested-images figure.wp-block-image:nth-child(3n + 1) { grid-column: 1 / -1; }
	.entry .wp-block-gallery.has-nested-images figure.wp-block-image:nth-child(3n + 1) img { aspect-ratio: 16 / 9; }
	/* A photo left alone on the last row spans full width instead of leaving a gap. */
	.entry .wp-block-gallery.has-nested-images figure.wp-block-image:nth-child(3n + 2):last-child { grid-column: 1 / -1; }
	.entry .wp-block-gallery.has-nested-images figure.wp-block-image:nth-child(3n + 2):last-child img { aspect-ratio: 16 / 9; }
}
.entry .wp-lightbox-container button { cursor: zoom-in; }

/* Entry prose */
.entry > * + * { margin-top: 1.25em; }
.entry p { max-width: 68ch; }
.entry a { text-underline-offset: 3px; }

/* Prev / next */
.pager { border-top: 1px solid var(--line); }
.pager__inner { display: grid; grid-template-columns: 1fr 1fr; }
.pager__link { display: grid; gap: 6px; padding: 40px 0; text-decoration: none; }
.pager__link--next { text-align: right; padding-left: 24px; border-left: 1px solid var(--line); }
.pager__label { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--graphite); }
.pager__title { font-size: clamp(1.125rem, 0.9rem + 1vw, 1.5rem); font-weight: 500; }
.pager__link:hover .pager__title { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }

/* ---------- About ---------- */

.about__grid { display: grid; gap: 48px; }
@media (min-width: 900px) {
	.about__grid { grid-template-columns: 5fr 7fr; gap: 80px; align-items: start; }
	.about__portrait { position: sticky; top: calc(var(--header-h) + 32px); }
}
.about__portrait { margin: 0; }
.about__portrait img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 30%; filter: grayscale(1) contrast(1.05); }
.about__portrait figcaption { display: flex; justify-content: space-between; gap: 16px; padding-top: 16px; border-bottom: 1px solid var(--ink); padding-bottom: 16px; }
.about__name { font-weight: 600; }
.about__role { color: var(--graphite); }
.about__bio p { color: var(--ink); }
.about__bio .lead { margin-bottom: 1.5em; }

/* ---------- Contact ---------- */

.contact__grid { display: grid; gap: 64px; }
@media (min-width: 1024px) { .contact__grid { grid-template-columns: 7fr 4fr; gap: 96px; } }
.contact__form:focus { outline: none; }
.contact__block { padding: 24px 0; border-top: 1px solid var(--ink); }
.contact__block p { margin: 0 0 6px; }
.contact__block address { margin-bottom: 12px; }
.contact__info .site-footer__label { color: var(--graphite); }

.form { display: grid; gap: 24px; }
.form__row { display: grid; gap: 24px; }
@media (min-width: 640px) { .form__row { grid-template-columns: 1fr 1fr; } }

.field { display: grid; gap: 8px; align-content: start; }
.field label { font-weight: 600; font-size: 0.9375rem; }
.req { color: var(--ink); }
.optional { font-weight: 400; color: var(--graphite); }
.field__help { margin: -4px 0 0; font-size: var(--fs-small); color: var(--graphite); }
.field input, .field select, .field textarea {
	width: 100%; min-height: 52px; padding: 12px 16px;
	font: inherit; font-size: 1rem; color: var(--ink);
	background: var(--paper); border: 1px solid var(--line-strong); border-radius: 0;
	transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.field textarea { min-height: 160px; resize: vertical; line-height: 1.55; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--ink); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
	outline: none; border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink), 0 0 0 4px rgba(17, 17, 17, 0.12);
}
.field [aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }
.field__error { margin: 0; font-size: var(--fs-small); font-weight: 600; color: var(--danger); display: flex; gap: 8px; align-items: baseline; }
.field__error::before { content: "!"; flex: none; display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--danger); color: var(--paper); font-size: 0.75rem; transform: translateY(2px); }

.select { position: relative; }
.select select { appearance: none; padding-right: 44px; cursor: pointer; }
.select::after {
	content: ""; position: absolute; right: 18px; top: 50%; width: 8px; height: 8px; pointer-events: none;
	border-right: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); transform: translateY(-70%) rotate(45deg);
}

.form__note { margin: -8px 0 0; font-size: var(--fs-small); color: var(--graphite); }
.form .btn { justify-self: start; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.notice { padding: 20px 24px; margin-bottom: 32px; border-left: 4px solid; background: var(--stone); }
.notice p { margin: 0; }
.notice ul { margin: 8px 0 0; padding-left: 20px; }
.notice--success { border-color: var(--success); }
.notice--success strong { color: var(--success); }
.notice--error { border-color: var(--danger); }
.notice--error strong { color: var(--danger); }
.notice:focus { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ---------- Footer ---------- */

.site-footer { background: var(--ink); color: var(--paper); padding-top: clamp(64px, 8vw, 112px); }
.site-footer__top {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px;
	padding-bottom: clamp(48px, 6vw, 80px); border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}
.site-footer__lead { margin: 0; font-size: clamp(1.75rem, 1.2rem + 2.4vw, 3rem); font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; }
.site-footer__grid { display: grid; gap: 40px; padding-block: 56px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .site-footer__grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.site-footer__brand .logo { height: 72px; width: auto; }
.site-footer__label { font-family: var(--font); margin: 0 0 16px; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mist); }
.site-footer address, .site-footer__list { color: rgba(255, 255, 255, 0.9); font-size: 0.9375rem; line-height: 1.8; }
.site-footer__list { list-style: none; margin: 0; padding: 0; }
.site-footer__list a { text-decoration: none; display: inline-block; padding: 2px 0; }
.site-footer__list a:hover { text-decoration: underline; text-underline-offset: 4px; }
.site-footer__bottom {
	display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
	padding-block: 24px 32px; border-top: 1px solid rgba(255, 255, 255, 0.16);
	font-size: 0.8125rem; color: var(--mist);
}
.site-footer__bottom p { margin: 0; }

/* ---------- Reveal (only when JS is present) ---------- */

.js [data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out); }
.js [data-reveal].is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; scroll-behavior: auto !important; }
	.js [data-reveal] { opacity: 1; transform: none; }
	.card__link:hover .card__media img, .card__link:focus-visible .card__media img { transform: scale(1.6); }
}

@media print {
	.site-header, .site-footer, .hero__actions, .pager, .filters { display: none; }
}
