/* ==========================================================================
   Yousaf Studio: design system + components
   Tokens first. Components read semantic variables (--fg, --fg-muted, --line,
   --surface) so a section can switch ground (dark, paper, ember) in one place.
   ========================================================================== */

/* Fonts (self-hosted, variable) ------------------------------------------- */
@font-face {
	font-family: "Bricolage Grotesque";
	src: url("../fonts/bricolage-grotesque.woff2") format("woff2");
	font-weight: 200 800;
	font-stretch: 75% 100%;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Geist";
	src: url("../fonts/geist.woff2") format("woff2");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Geist Mono";
	src: url("../fonts/geist-mono.woff2") format("woff2");
	font-weight: 400 600;
	font-style: normal;
	font-display: swap;
}

/* Tokens ------------------------------------------------------------------- */
:root {
	/* Palette: warm off-black ground, bone paper, one ember accent. */
	--c-bg: #0f0e0d;
	--c-surface: #181614;
	--c-surface-2: #221f1c;
	--c-ink: #f3efea;
	--c-ink-soft: #d8d2ca;
	--c-muted: #a39c94;
	--c-line: rgb(243 239 234 / 0.12);
	--c-paper: #f2efea;
	--c-paper-2: #e8e3dc;
	--c-paper-ink: #171513;
	--c-paper-muted: #5e5850;
	--c-paper-line: rgb(23 21 19 / 0.14);
	--c-accent: #ee6a35;
	--c-accent-2: #f5a14e;
	--c-accent-deep: #b4461b;
	--c-on-accent: #160b05;

	/* Type */
	--f-display: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
	--f-body: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
	--f-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

	--t-xs: clamp(0.75rem, 0.72rem + 0.12vw, 0.8125rem);
	--t-sm: clamp(0.875rem, 0.84rem + 0.15vw, 0.9375rem);
	--t-base: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
	--t-lg: clamp(1.0625rem, 0.98rem + 0.4vw, 1.25rem);
	--t-xl: clamp(1.25rem, 1.05rem + 0.9vw, 1.75rem);
	--t-2xl: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem);
	--t-3xl: clamp(2rem, 1.25rem + 3vw, 3.75rem);
	--t-4xl: clamp(2.5rem, 1.35rem + 4.4vw, 5.25rem);
	--t-hero: clamp(2.5rem, 1.2rem + 4.8vw, 5.4rem);

	/* Space */
	--s-1: clamp(0.5rem, 0.45rem + 0.2vw, 0.625rem);
	--s-2: clamp(0.75rem, 0.68rem + 0.3vw, 1rem);
	--s-3: clamp(1rem, 0.9rem + 0.5vw, 1.5rem);
	--s-4: clamp(1.5rem, 1.25rem + 1vw, 2.25rem);
	--s-5: clamp(2rem, 1.6rem + 2vw, 3.5rem);
	--s-6: clamp(3rem, 2.2rem + 4vw, 6rem);
	--s-7: clamp(4.5rem, 3rem + 7vw, 9.5rem);

	/* Layout */
	--container: 80rem;
	--narrow: 46rem;
	--gutter: clamp(1rem, 0.5rem + 3vw, 2.5rem);
	--header-h: 4.5rem;

	/* Shape: pills for controls, 20px for cards, 12px for fields. */
	--r-pill: 999px;
	--r-card: 1.25rem;
	--r-field: 0.75rem;

	--ease: cubic-bezier(0.2, 0.7, 0.2, 1);
	--shadow: 0 1.5rem 3rem -1.5rem rgb(5 4 3 / 0.6);

	/* Semantic (overridden per section ground) */
	--bg: var(--c-bg);
	--fg: var(--c-ink);
	--fg-muted: var(--c-muted);
	--line: var(--c-line);
	--surface: var(--c-surface);
	--link-accent: var(--c-accent);

	color-scheme: dark;
}

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

:where(html) { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1rem); }
:where(body, h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd, ol, ul) { margin: 0; }
:where(ul, ol)[role="list"] { list-style: none; padding: 0; }
:where(img, svg, video) { display: block; max-width: 100%; height: auto; }
:where(input, button, textarea, select) { font: inherit; color: inherit; }
:where(a) { color: inherit; }

body {
	background: var(--c-bg);
	color: var(--c-ink);
	font-family: var(--f-body);
	font-size: var(--t-base);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
	overflow-x: clip;
}

::selection { background: var(--c-accent); color: var(--c-on-accent); }

:where(h1, h2, h3, h4) {
	font-family: var(--f-display);
	font-weight: 600;
	font-stretch: 85%;
	line-height: 1.06;
	letter-spacing: -0.02em;
	text-wrap: balance;
}

:where(p) { text-wrap: pretty; }

:focus-visible {
	outline: 2px solid var(--c-accent);
	outline-offset: 3px;
	border-radius: 4px;
}

.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
	height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0;
	position: absolute !important; word-wrap: normal !important;
}
.skip-link:focus {
	clip: auto; clip-path: none; width: auto; height: auto; margin: 0;
	top: 1rem; left: 1rem; z-index: 1000; padding: 0.75rem 1.25rem;
	background: var(--c-accent); color: var(--c-on-accent); border-radius: var(--r-pill);
	font-weight: 600; text-decoration: none;
}

/* Layout ------------------------------------------------------------------- */
.container {
	width: min(100% - 2 * var(--gutter), var(--container));
	margin-inline: auto;
}
.container--narrow { width: min(100% - 2 * var(--gutter), var(--narrow)); }

.section { padding-block: var(--s-7); position: relative; }
.section--tight { padding-block: var(--s-4) var(--s-7); }

.section--paper {
	--bg: var(--c-paper);
	--fg: var(--c-paper-ink);
	--fg-muted: var(--c-paper-muted);
	--line: var(--c-paper-line);
	--surface: #fff;
	--link-accent: var(--c-accent-deep);
	background: var(--c-paper);
	color: var(--c-paper-ink);
	color-scheme: light;
}

.section-head { max-width: 48rem; margin-bottom: var(--s-6); }
.section-title { font-size: var(--t-3xl); color: var(--fg); }
.section-lede { margin-top: var(--s-3); font-size: var(--t-lg); color: var(--fg-muted); max-width: 52ch; }

.eyebrow {
	display: inline-flex; align-items: center; gap: 0.75rem;
	font-family: var(--f-mono); font-size: var(--t-xs); font-weight: 500;
	text-transform: uppercase; letter-spacing: 0.12em; color: var(--fg-muted);
}
.eyebrow::before { content: ""; width: 1.75rem; height: 2px; background: var(--c-accent); border-radius: 2px; }

/* Buttons & links ---------------------------------------------------------- */
.btn {
	--btn-bg: transparent;
	--btn-fg: var(--fg);
	display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
	min-height: 3rem; padding: 0.8rem 1.5rem;
	border: 1px solid transparent; border-radius: var(--r-pill);
	background: var(--btn-bg); color: var(--btn-fg);
	font-family: var(--f-body); font-size: var(--t-sm); font-weight: 600; letter-spacing: 0.01em;
	text-decoration: none; white-space: nowrap; cursor: pointer;
	transition: transform 0.35s var(--ease), background-color 0.3s, border-color 0.3s, color 0.3s, box-shadow 0.35s var(--ease);
}
.btn .icon { width: 1.1em; height: 1.1em; transition: transform 0.35s var(--ease); }
.btn:hover .icon { transform: translateX(3px); }
.btn:active { transform: translateY(1px) scale(0.99); }

.btn--primary { --btn-bg: var(--c-accent); --btn-fg: var(--c-on-accent); box-shadow: 0 0.75rem 2rem -1rem rgb(238 106 53 / 0.7); }
.btn--primary:hover { --btn-bg: #f47c49; transform: translateY(-2px); box-shadow: 0 1.25rem 2.5rem -1rem rgb(238 106 53 / 0.75); }
.btn--ghost { border-color: var(--line); }
.btn--ghost:hover { border-color: var(--fg); }
.btn--sm { min-height: 2.75rem; padding: 0.55rem 1.15rem; }
.btn--block { width: 100%; }

.link-arrow {
	display: inline-flex; align-items: center; gap: 0.5rem;
	font-weight: 600; text-decoration: none; color: var(--fg);
	border-bottom: 1px solid var(--line); padding-bottom: 0.25rem;
	transition: border-color 0.3s, color 0.3s;
}
.link-arrow .icon { width: 1.1em; height: 1.1em; transition: transform 0.35s var(--ease); }
.link-arrow:hover { border-color: var(--link-accent); color: var(--link-accent); }
.link-arrow:hover .icon { transform: translateX(4px); }
.link-arrow--back::before { content: "\2190"; }

.icon { width: 1.25rem; height: 1.25rem; flex: none; }

.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; padding: 0; margin: 0; }
.tags li {
	padding: 0.35rem 0.8rem; border: 1px solid var(--line); border-radius: var(--r-pill);
	font-size: var(--t-xs); font-family: var(--f-mono); letter-spacing: 0.02em; color: var(--fg-muted);
}

/* Header ------------------------------------------------------------------- */
.site-header {
	position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header-h);
	transition: transform 0.45s var(--ease), background-color 0.3s, border-color 0.3s;
	border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
	background: rgb(15 14 13 / 0.78);
	-webkit-backdrop-filter: blur(14px) saturate(140%);
	backdrop-filter: blur(14px) saturate(140%);
	border-bottom-color: var(--c-line);
}
.site-header.is-hidden:not(.is-open) { transform: translateY(-100%); }
.site-header__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.admin-bar .site-header { top: var(--wp-admin--admin-bar--height, 32px); }

.brand { display: inline-flex; align-items: center; gap: 0.7rem; text-decoration: none; color: var(--c-ink); }
.brand-mark { width: 2.25rem; height: 2.25rem; color: currentColor; transition: transform 0.5s var(--ease); }
.brand:hover .brand-mark { transform: rotate(-6deg) scale(1.05); }
.brand__word { font-family: var(--f-display); font-stretch: 85%; font-size: 1.0625rem; font-weight: 500; letter-spacing: -0.01em; white-space: nowrap; }
.brand__word strong { font-weight: 700; }
.brand__img { max-height: 2.75rem; width: auto; }

.nav__list { display: flex; gap: 0.25rem; list-style: none; margin: 0; padding: 0; }
.nav__list a {
	display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 0.9rem;
	color: var(--c-ink-soft); text-decoration: none; font-size: var(--t-sm); font-weight: 500;
	border-radius: var(--r-pill); transition: color 0.25s, background-color 0.25s;
}
.nav__list a:hover,
.nav__list .current-menu-item:not(.menu-item-type-custom) > a { color: var(--c-ink); background: rgb(243 239 234 / 0.06); }

.nav-toggle {
	display: none; width: 2.75rem; height: 2.75rem; border-radius: 50%;
	border: 1px solid var(--c-line); background: transparent; color: var(--c-ink);
	align-items: center; justify-content: center; cursor: pointer;
}
.nav-toggle__close { display: none; }

@media (min-width: 960px) {
	.nav { display: flex; align-items: center; gap: 1rem; }
}

@media (max-width: 959.98px) {
	.js .nav-toggle { display: inline-flex; position: relative; z-index: 2; }
	.js .nav {
		position: fixed; inset: 0; z-index: 1;
		display: flex; flex-direction: column; justify-content: center; gap: 2rem;
		padding: calc(var(--header-h) + 2rem) var(--gutter) 3rem;
		background: var(--c-bg);
		opacity: 0; visibility: hidden; transition: opacity 0.35s var(--ease), visibility 0s linear 0.35s;
	}
	.js .site-header.is-open .nav { opacity: 1; visibility: visible; transition: opacity 0.35s var(--ease); }
	.js .site-header.is-open .nav-toggle__open { display: none; }
	.js .site-header.is-open .nav-toggle__close { display: inline-flex; }
	.js .nav .nav__list { flex-direction: column; gap: 0.25rem; }
	.js .nav .nav__list a { font-family: var(--f-display); font-stretch: 85%; font-size: var(--t-3xl); font-weight: 600; color: var(--c-ink); padding: 0.25rem 0; }
	.js .nav__cta { align-self: flex-start; }
	html:not(.js) .site-header { position: absolute; height: auto; padding-block: 1rem; }
	html:not(.js) .site-header__inner { flex-wrap: wrap; }
	html:not(.js) .nav__list { flex-wrap: wrap; }
	html:not(.js) .nav__cta { display: none; }
	body.nav-open { overflow: hidden; }
}

/* Hero --------------------------------------------------------------------- */
.hero {
	position: relative; isolation: isolate; overflow: hidden;
	padding-top: calc(var(--header-h) + var(--s-5));
	min-height: min(100svh, 62rem);
	display: flex; flex-direction: column;
}
.hero__glow {
	position: absolute; inset: 0; z-index: -1; pointer-events: none;
	background:
		radial-gradient(38rem circle at var(--mx, 78%) var(--my, 32%), rgb(238 106 53 / 0.16), transparent 62%),
		radial-gradient(60rem 40rem at 100% 0%, rgb(245 161 78 / 0.08), transparent 60%),
		radial-gradient(40rem 30rem at 0% 100%, rgb(238 106 53 / 0.06), transparent 70%);
	transition: background-position 0.2s;
}
.hero__glow::after {
	content: ""; position: absolute; inset: 0; opacity: 0.07; mix-blend-mode: overlay;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.hero__grid { flex: 1; display: grid; gap: var(--s-4); align-items: center; }
.hero__copy { padding-block: var(--s-3) var(--s-2); }
.hero__eyebrow { margin-bottom: var(--s-3); }
.hero__title {
	font-size: var(--t-hero); font-weight: 650; font-stretch: 80%;
	line-height: 1.02; letter-spacing: -0.028em; max-width: 15em;
	padding-bottom: 0.06em;
}
.hl {
	background: linear-gradient(100deg, var(--c-accent) 10%, var(--c-accent-2) 90%);
	-webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__text { margin-top: var(--s-3); font-size: var(--t-lg); color: var(--c-ink-soft); max-width: 40ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: var(--s-4); }

.hero__visual {
	position: relative; justify-self: center; align-self: end;
	width: min(100%, 26rem); aspect-ratio: 1;
}
.hero__orb { position: absolute; inset: 8% 6% 0; z-index: 0; }
.hero__orb::before {
	content: ""; position: absolute; inset: 6% 4% -4%; border-radius: 50%;
	background:
		radial-gradient(circle at 32% 28%, rgb(255 210 160 / 0.55), transparent 40%),
		radial-gradient(circle at 50% 55%, var(--c-accent) 0%, #c24a1c 55%, #4a1a0a 80%, transparent 81%);
	filter: saturate(110%);
}
.hero__orb span {
	position: absolute; inset: -2% -2% -8%; border-radius: 50%;
	background: conic-gradient(from 0deg, transparent 0 62%, rgb(245 161 78 / 0.55) 75%, transparent 88%);
	-webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 1.5px), #000 calc(100% - 1px));
	mask: radial-gradient(farthest-side, transparent calc(100% - 1.5px), #000 calc(100% - 1px));
}
.hero__portrait {
	position: relative; z-index: 1; width: 100%; height: 100%;
	object-fit: contain; object-position: bottom center;
	-webkit-mask-image: linear-gradient(to bottom, #000 82%, transparent 100%);
	mask-image: linear-gradient(to bottom, #000 82%, transparent 100%);
}

@media (min-width: 960px) {
	.hero__grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.85fr); gap: var(--s-5); }
	.hero__visual { width: 100%; max-width: 31.25rem; justify-self: end; }
	.hero__orb span { inset: -2% -6% -12%; }
	.hero__copy { padding-block: var(--s-5) var(--s-6); }
}

/* Entrance (CSS only: final state is visible if animations never run). */
@keyframes rise { from { opacity: 0; transform: translateY(1.5rem); } }
@keyframes bloom { from { opacity: 0; transform: scale(0.92); } }
@keyframes orbit { to { transform: rotate(1turn); } }
.hero__copy > * { animation: rise 1s var(--ease) both; }
.hero__copy > :nth-child(2) { animation-delay: 0.08s; }
.hero__copy > :nth-child(3) { animation-delay: 0.18s; }
.hero__copy > :nth-child(4) { animation-delay: 0.28s; }
.hero__orb { animation: bloom 1.4s var(--ease) 0.1s both; }
.hero__orb span { animation: orbit 28s linear infinite; }
.hero__portrait { animation: rise 1.2s var(--ease) 0.25s both; }

/* Intro statement ------------------------------------------------------------ */
.intro { padding-block: var(--s-6) var(--s-7); border-top: 1px solid var(--c-line); }
.intro__statement {
	font-family: var(--f-display); font-stretch: 85%; font-weight: 500;
	font-size: clamp(1.6rem, 1rem + 2.5vw, 3.15rem); line-height: 1.18; letter-spacing: -0.02em;
	color: var(--c-ink-soft); max-width: 30ch;
}
.figure {
	font-weight: 700; font-stretch: 78%; font-size: 1.35em; line-height: 1;
	background: linear-gradient(100deg, var(--c-accent), var(--c-accent-2));
	-webkit-background-clip: text; background-clip: text; color: transparent;
	white-space: nowrap;
}
.intro__text { margin-top: var(--s-5); margin-left: auto; max-width: 46ch; font-size: var(--t-lg); color: var(--c-muted); }

/* Work ----------------------------------------------------------------------- */
.work { padding-top: 0; }
.work__grid { display: grid; gap: clamp(1rem, 0.6rem + 1.5vw, 1.75rem); }
.work__more { margin-top: var(--s-5); }

@media (min-width: 800px) {
	.work__grid { grid-template-columns: repeat(12, minmax(0, 1fr)); }
	.work__grid > .card { grid-column: span 6; }
	.work__grid--1 > .card { grid-column: 1 / -1; }
	.work__grid--2 > .card:first-child,
	.work__grid--3 > .card:first-child { grid-column: span 7; }
	.work__grid--2 > .card:nth-child(2),
	.work__grid--3 > .card:nth-child(2),
	.work__grid--3 > .card:nth-child(3) { grid-column: span 5; }
	.work__grid--3 > .card:first-child { grid-row: span 2; }
	.work__grid--3 > .card:nth-child(n + 4) { grid-column: span 6; }
	.work__grid--archive > .card { grid-column: span 6 !important; grid-row: auto !important; }
}

.card {
	position: relative; isolation: isolate;
	background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-card);
	overflow: hidden; transition: border-color 0.4s, transform 0.5s var(--ease);
}
.card::before {
	content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0;
	background: radial-gradient(24rem circle at var(--x, 50%) var(--y, 50%), rgb(238 106 53 / 0.14), transparent 60%);
	transition: opacity 0.4s;
}
.card:hover { border-color: rgb(238 106 53 / 0.45); }
.card:hover::before { opacity: 1; }
.card__link { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
.card__media { aspect-ratio: 4 / 3; }
.media { position: relative; overflow: hidden; background: var(--c-surface-2); }
.media__img,
.media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.card:hover .media__img,
.card:hover .media__placeholder span { transform: scale(1.045); }
.card__body { display: grid; gap: 0.6rem; padding: clamp(1.25rem, 1rem + 1vw, 2rem); }
.card__meta { font-family: var(--f-mono); font-size: var(--t-xs); text-transform: uppercase; letter-spacing: 0.1em; color: var(--c-muted); }
.card__title { font-size: var(--t-2xl); }
.card__text { color: var(--c-muted); max-width: 52ch; }
.card__cta { display: inline-flex; align-items: center; gap: 0.5rem; margin-top: 0.5rem; font-weight: 600; font-size: var(--t-sm); }
.card__cta .icon { transition: transform 0.35s var(--ease); color: var(--c-accent); }
.card:hover .card__cta .icon { transform: translateX(5px); }

@media (min-width: 800px) {
	.card--feature .card__media { aspect-ratio: auto; flex: 1 1 auto; min-height: 22rem; }
	.card--feature .card__title { font-size: var(--t-3xl); }
	.work__grid--archive .card--feature .card__media { aspect-ratio: 4 / 3; flex: none; min-height: 0; }
}

.media__placeholder { position: absolute; inset: 0; display: flex; align-items: flex-end; overflow: hidden; }
.media__placeholder span {
	font-family: var(--f-display); font-weight: 800; font-stretch: 75%; line-height: 0.78;
	font-size: clamp(10rem, 6rem + 14vw, 20rem); color: transparent;
	-webkit-text-stroke: 1.5px rgb(243 239 234 / 0.28);
	padding-left: 0.08em; transform-origin: bottom left; transition: transform 1s var(--ease);
}
.media__placeholder--1 { background: radial-gradient(70% 90% at 80% 15%, rgb(238 106 53 / 0.9), rgb(120 40 14 / 0.6) 45%, transparent 75%), linear-gradient(160deg, #26201b, #120f0d); }
.media__placeholder--2 { background: radial-gradient(60% 70% at 15% 20%, rgb(245 161 78 / 0.75), transparent 70%), linear-gradient(135deg, #c24a1c, #3a160a 85%); }
.media__placeholder--3 { background: radial-gradient(circle at 70% 60%, transparent 34%, rgb(238 106 53 / 0.5) 35%, transparent 36%), radial-gradient(circle at 70% 60%, rgb(238 106 53 / 0.35), transparent 30%), linear-gradient(200deg, #2a2420, #121010); }

.empty-note { padding: var(--s-5); border: 1px dashed var(--line); border-radius: var(--r-card); color: var(--fg-muted); }

/* Services (paper) ------------------------------------------------------------ */
.services__list { border-top: 1px solid var(--line); }
.service {
	position: relative; display: grid; gap: 0.75rem;
	padding-block: clamp(1.5rem, 1.2rem + 1vw, 2.25rem);
	border-bottom: 1px solid var(--line);
}
.service::before {
	content: ""; position: absolute; inset: 0 calc(-1 * var(--s-2)); z-index: 0; border-radius: 0.75rem;
	background: linear-gradient(90deg, rgb(238 106 53 / 0.12), rgb(238 106 53 / 0));
	transform: scaleX(0); transform-origin: left; transition: transform 0.6s var(--ease);
}
.service > * { position: relative; z-index: 1; }
.service:hover::before { transform: scaleX(1); }
.service__name { font-size: var(--t-2xl); color: var(--fg); transition: transform 0.5s var(--ease), color 0.3s; }
.service:hover .service__name { transform: translateX(0.5rem); color: var(--c-accent-deep); }
.service__text { color: var(--fg-muted); max-width: 48ch; }
.service__tags { align-content: start; }

@media (min-width: 900px) {
	.service { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr) minmax(0, 0.85fr); gap: var(--s-4); align-items: start; }
	.service__tags { justify-content: flex-end; }
}

/* Approach -------------------------------------------------------------------- */
.approach { background: var(--c-surface); }
.approach__grid { display: grid; gap: var(--s-5); }
.approach__head .section-lede { margin-bottom: 0; }
.steps { position: relative; padding-left: 2.75rem; }
.steps__list { list-style: none; margin: 0; padding: 0; }
.steps__line { position: absolute; left: 0.6875rem; top: 0.5rem; bottom: 0.5rem; width: 2px; background: var(--c-line); border-radius: 2px; overflow: hidden; }
.steps__line span { position: absolute; inset: 0; background: linear-gradient(var(--c-accent-2), var(--c-accent)); transform: scaleY(var(--p, 1)); transform-origin: top; }
.js .steps__line span { --p: 0; }
.step { position: relative; padding-block: var(--s-3) var(--s-5); }
.step:last-child { padding-bottom: 0; }
.step::before {
	content: ""; position: absolute; left: -2.75rem; top: calc(var(--s-3) + 0.55em);
	width: 1.5rem; height: 1.5rem; border-radius: 50%;
	background: var(--c-surface); border: 2px solid var(--c-line);
	transition: border-color 0.4s, background-color 0.4s, box-shadow 0.4s;
}
.step__title { font-size: clamp(1.75rem, 1.2rem + 2.2vw, 3rem); font-weight: 600; color: var(--c-ink); transition: color 0.4s; }
.step__text { margin-top: 0.75rem; max-width: 44ch; color: var(--c-muted); font-size: var(--t-lg); }
.js .step:not(.is-active) .step__title { color: rgb(243 239 234 / 0.42); }
.step.is-active::before { border-color: var(--c-accent); background: var(--c-accent); box-shadow: 0 0 0 6px rgb(238 106 53 / 0.18); }

@media (min-width: 960px) {
	.approach__grid { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: var(--s-6); }
	.approach__head { position: sticky; top: calc(var(--header-h) + var(--s-4)); align-self: start; }
}

/* About (paper) --------------------------------------------------------------- */
.about { overflow-x: clip; }
.about__grid { display: grid; gap: var(--s-5); align-items: center; }
.about__photo { position: relative; width: min(100%, 26rem); margin-inline: auto; }
.about__photo::before {
	content: ""; position: absolute; inset: -4%; border-radius: 50%;
	border: 1.5px solid var(--c-accent); opacity: 0.55; transform: translate(4%, 3%);
}
.about__photo img { position: relative; width: 100%; border-radius: 50%; }
.about__text { display: grid; gap: 1rem; margin-top: var(--s-3); font-size: var(--t-lg); color: var(--fg-muted); max-width: 58ch; }
.about__tools { margin-top: var(--s-4); padding-top: var(--s-3); border-top: 1px solid var(--line); }
.about__tools-label { font-family: var(--f-mono); font-size: var(--t-xs); font-weight: 500; font-stretch: 100%; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-muted); margin-bottom: 0.9rem; }

@media (min-width: 960px) {
	.about__grid { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: var(--s-6); }
	.about__photo { width: 100%; margin-top: calc(-1 * var(--s-7) - 4rem); align-self: start; }
}

/* Contact (ember ground) ------------------------------------------------------- */
.contact {
	--fg: var(--c-on-accent);
	--fg-muted: rgb(22 11 5 / 0.74);
	--line: rgb(22 11 5 / 0.22);
	--link-accent: var(--c-on-accent);
	isolation: isolate; overflow: hidden;
	background: linear-gradient(140deg, #f07a45 0%, var(--c-accent) 40%, #d8531f 100%);
	color: var(--c-on-accent);
	color-scheme: light;
}
.contact__glow {
	position: absolute; inset: 0; z-index: -1; pointer-events: none;
	background: radial-gradient(50rem 30rem at 10% 0%, rgb(255 214 170 / 0.5), transparent 60%), radial-gradient(40rem 30rem at 100% 100%, rgb(110 32 8 / 0.35), transparent 65%);
}
.contact__grid { display: grid; gap: var(--s-5); align-items: start; }
.contact__status { display: inline-flex; align-items: center; gap: 0.6rem; font-family: var(--f-mono); font-size: var(--t-xs); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 500; }
.pulse { width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--c-on-accent); box-shadow: 0 0 0 0 rgb(22 11 5 / 0.4); animation: pulse 2.4s ease-out infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 0.6rem rgb(22 11 5 / 0); } 100% { box-shadow: 0 0 0 0 rgb(22 11 5 / 0); } }
.contact__title { margin-top: var(--s-3); font-size: var(--t-4xl); font-weight: 650; font-stretch: 78%; line-height: 0.98; letter-spacing: -0.03em; max-width: 12ch; padding-bottom: 0.08em; }
.contact__text { margin-top: var(--s-3); font-size: var(--t-lg); max-width: 40ch; color: var(--fg-muted); }
.contact__email { margin-top: var(--s-4); }
.contact__email a { display: inline-flex; align-items: center; gap: 0.6rem; font-family: var(--f-display); font-stretch: 85%; font-size: var(--t-xl); font-weight: 600; text-decoration: none; border-bottom: 2px solid var(--fg); padding-bottom: 0.2rem; }
.contact__socials { margin-top: var(--s-4); }

.contact__card {
	--fg: var(--c-ink); --fg-muted: var(--c-muted); --line: var(--c-line);
	background: var(--c-bg); color: var(--c-ink); color-scheme: dark;
	border-radius: calc(var(--r-card) + 0.25rem); padding: clamp(1.25rem, 0.8rem + 2vw, 2.5rem);
	box-shadow: 0 2.5rem 5rem -2rem rgb(60 18 4 / 0.55);
}

@media (min-width: 960px) {
	.contact__grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: var(--s-6); }
}

/* Forms ------------------------------------------------------------------------ */
.form { display: grid; gap: 1.1rem; }
.form__row { display: grid; gap: 1.1rem; }
@media (min-width: 640px) { .form__row { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 0.45rem; }
.field label { font-size: var(--t-sm); font-weight: 500; color: var(--c-ink-soft); }
.field__opt { color: var(--c-muted); font-weight: 400; }
.field input,
.field textarea,
.search-form input[type="search"],
.comment-form input:not([type="submit"]):not([type="checkbox"]),
.comment-form textarea {
	width: 100%; min-height: 3rem; padding: 0.75rem 1rem;
	background: var(--c-surface); color: var(--c-ink);
	border: 1px solid rgb(243 239 234 / 0.18); border-radius: var(--r-field);
	transition: border-color 0.25s, box-shadow 0.25s;
}
.field textarea { resize: vertical; min-height: 8rem; }
.field input:focus-visible,
.field textarea:focus-visible,
.search-form input:focus-visible { outline: none; border-color: var(--c-accent); box-shadow: 0 0 0 3px rgb(238 106 53 / 0.3); }
.form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin-bottom: 1.25rem; padding: 0.9rem 1.1rem; border-radius: var(--r-field); font-size: var(--t-sm); border: 1px solid; }
.form-status--ok { border-color: rgb(120 200 140 / 0.5); background: rgb(120 200 140 / 0.1); }
.form-status--error { border-color: rgb(238 106 53 / 0.6); background: rgb(238 106 53 / 0.1); }

.search-form { display: flex; gap: 0.5rem; margin-top: var(--s-4); max-width: 32rem; }

/* Socials ---------------------------------------------------------------------- */
.socials { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; margin: 0; padding: 0; }
.socials a {
	display: inline-flex; align-items: center; gap: 0.35rem; min-height: 2.75rem; padding: 0 1rem;
	border: 1px solid var(--line); border-radius: var(--r-pill);
	font-size: var(--t-sm); font-weight: 500; text-decoration: none; color: var(--fg);
	transition: border-color 0.25s, background-color 0.25s;
}
.socials a:hover { border-color: var(--fg); }
.socials .icon { width: 1rem; height: 1rem; }

/* Footer ----------------------------------------------------------------------- */
.site-footer { padding-block: var(--s-6) var(--s-4); background: var(--c-bg); border-top: 1px solid var(--c-line); --fg: var(--c-ink); --line: var(--c-line); }
.site-footer__grid { display: grid; gap: var(--s-4); }
.site-footer__tagline { margin-top: 1rem; max-width: 36ch; color: var(--c-muted); }
.site-footer__nav .nav__list { flex-direction: column; }
.site-footer__nav .nav__list a { padding: 0; min-height: 2.5rem; }
.site-footer__nav .nav__list a:hover { background: none; }
.site-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-top: var(--s-5); padding-top: var(--s-3); border-top: 1px solid var(--c-line); font-size: var(--t-sm); color: var(--c-muted); }
.site-footer__bottom a { color: var(--c-ink-soft); text-underline-offset: 3px; }
.to-top { text-decoration: none; }
@media (min-width: 800px) {
	.site-footer__grid { grid-template-columns: 1.4fr 0.8fr 1fr; align-items: start; }
	.site-footer__socials { justify-content: flex-end; }
}

/* Inner pages -------------------------------------------------------------------- */
.page-hero { padding-top: calc(var(--header-h) + var(--s-6)); padding-bottom: var(--s-5); }
.page-hero__title { font-size: var(--t-4xl); font-weight: 650; font-stretch: 80%; letter-spacing: -0.028em; max-width: 18ch; padding-bottom: 0.06em; }
.page-hero__lede { margin-top: var(--s-3); max-width: 52ch; font-size: var(--t-lg); color: var(--c-muted); }
.page-hero__meta { margin-bottom: var(--s-2); font-family: var(--f-mono); font-size: var(--t-xs); text-transform: uppercase; letter-spacing: 0.1em; color: var(--c-muted); }
.page-hero--404 .hero__actions { margin-top: var(--s-4); }
.figure-404 { font-family: var(--f-display); font-weight: 800; font-stretch: 75%; font-size: clamp(6rem, 3rem + 14vw, 14rem); line-height: 0.8; color: transparent; -webkit-text-stroke: 1.5px var(--c-accent); margin-bottom: var(--s-3); }

.case__hero { padding-top: calc(var(--header-h) + var(--s-5)); padding-bottom: var(--s-5); }
.case__back { margin-bottom: var(--s-4); }
.case__title { font-size: var(--t-4xl); font-weight: 650; font-stretch: 80%; letter-spacing: -0.028em; max-width: 16ch; padding-bottom: 0.06em; }
.case__lede { margin-top: var(--s-3); max-width: 50ch; font-size: var(--t-xl); color: var(--c-ink-soft); line-height: 1.45; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); gap: var(--s-3); margin-top: var(--s-5); padding-top: var(--s-3); border-top: 1px solid var(--c-line); }
.facts dt { font-family: var(--f-mono); font-size: var(--t-xs); text-transform: uppercase; letter-spacing: 0.1em; color: var(--c-muted); margin-bottom: 0.35rem; }
.facts dd { font-weight: 500; }
.facts dd a { display: inline-flex; align-items: center; gap: 0.3rem; color: var(--c-accent); text-underline-offset: 3px; }
.facts .icon { width: 1rem; height: 1rem; }
.case__media { aspect-ratio: 16 / 9; border-radius: var(--r-card); border: 1px solid var(--c-line); }
.case__media .media__placeholder span { font-size: min(36vw, 30rem); }
.case__chapters { display: grid; gap: var(--s-5); padding-block: var(--s-6) var(--s-4); }
.chapter { display: grid; gap: var(--s-2); padding-top: var(--s-3); border-top: 1px solid var(--c-line); }
.chapter__label { font-size: var(--t-2xl); color: var(--c-ink); }
.chapter__text { display: grid; gap: 1rem; font-size: var(--t-lg); color: var(--c-ink-soft); max-width: 62ch; }
@media (min-width: 900px) { .chapter { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr); gap: var(--s-5); } }

.case__next { padding-block: var(--s-5) var(--s-6); }
.case__next a { display: grid; gap: 0.5rem; padding-block: var(--s-4); border-block: 1px solid var(--c-line); text-decoration: none; }
.case__next-label { font-family: var(--f-mono); font-size: var(--t-xs); text-transform: uppercase; letter-spacing: 0.1em; color: var(--c-muted); }
.case__next-title { display: inline-flex; align-items: center; gap: 1rem; font-family: var(--f-display); font-stretch: 80%; font-weight: 650; font-size: var(--t-3xl); letter-spacing: -0.02em; line-height: 1.05; transition: color 0.3s; }
.case__next-title .icon { width: 0.8em; height: 0.8em; color: var(--c-accent); transition: transform 0.4s var(--ease); }
.case__next a:hover .case__next-title { color: var(--c-accent-2); }
.case__next a:hover .icon { transform: translateX(8px); }

/* Prose (block editor content) ------------------------------------------------------ */
.prose { max-width: 44rem; margin-inline: auto; padding-block: var(--s-5); font-size: var(--t-lg); color: var(--c-ink-soft); }
.prose > * + * { margin-top: 1.25em; }
.prose :where(h2) { font-size: var(--t-2xl); color: var(--c-ink); margin-top: 2.2em; }
.prose :where(h3) { font-size: var(--t-xl); color: var(--c-ink); margin-top: 1.8em; }
.prose :where(a) { color: var(--c-accent); text-underline-offset: 3px; }
.prose :where(ul, ol) { padding-left: 1.25em; }
.prose :where(li + li) { margin-top: 0.4em; }
.prose :where(blockquote) { padding-left: 1.25em; border-left: 3px solid var(--c-accent); font-family: var(--f-display); font-stretch: 85%; font-size: var(--t-xl); color: var(--c-ink); }
.prose :where(img) { border-radius: 0.875rem; }
.prose :where(figcaption) { margin-top: 0.6rem; font-size: var(--t-sm); color: var(--c-muted); }
.prose :where(code) { font-family: var(--f-mono); font-size: 0.9em; background: var(--c-surface-2); padding: 0.1em 0.35em; border-radius: 0.3em; }
.prose :where(pre) { overflow-x: auto; padding: 1.25rem; background: var(--c-surface); border-radius: 0.875rem; }
.prose :where(hr) { border: 0; border-top: 1px solid var(--c-line); }
.prose .alignwide { width: min(100vw - 2 * var(--gutter), 72rem); margin-inline: 50%; transform: translateX(-50%); }
.prose .alignfull { width: 100vw; margin-inline: 50%; transform: translateX(-50%); }
.prose .alignfull img { border-radius: 0; }
.prose .wp-block-button__link { border-radius: var(--r-pill); background: var(--c-accent); color: var(--c-on-accent); font-weight: 600; }
.prose-tags { margin-block: var(--s-3); justify-content: center; }

.posts { border-top: 1px solid var(--c-line); }
.post-row__link { position: relative; display: grid; gap: 0.5rem; padding: var(--s-4) 3rem var(--s-4) 0; border-bottom: 1px solid var(--c-line); text-decoration: none; }
.post-row__meta { font-family: var(--f-mono); font-size: var(--t-xs); text-transform: uppercase; letter-spacing: 0.1em; color: var(--c-muted); }
.post-row__title { font-size: var(--t-2xl); transition: color 0.3s; }
.post-row__text { color: var(--c-muted); max-width: 60ch; }
.post-row__link > .icon { position: absolute; right: 0; top: 50%; color: var(--c-accent); transition: transform 0.4s var(--ease); }
.post-row__link:hover .post-row__title { color: var(--c-accent-2); }
.post-row__link:hover > .icon { transform: translateX(6px); }

.pagination { margin-top: var(--s-5); }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 2.75rem; min-height: 2.75rem; padding: 0 0.9rem; border: 1px solid var(--c-line); border-radius: var(--r-pill); text-decoration: none; }
.pagination .current { background: var(--c-accent); color: var(--c-on-accent); border-color: var(--c-accent); }

.comments { max-width: 44rem; margin: 0 auto var(--s-6); padding-top: var(--s-4); border-top: 1px solid var(--c-line); }
.comments__title { font-size: var(--t-2xl); margin-bottom: var(--s-3); }
.comments__list { list-style: none; padding: 0; display: grid; gap: var(--s-3); }
.comment-form { display: grid; gap: 1rem; }
.comment-form label { display: block; margin-bottom: 0.35rem; font-size: var(--t-sm); }

/* Scroll reveal: hidden only when JS is present; reduced motion shows everything. */
.js .reveal { opacity: 0; transform: translateY(1.75rem); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
.work__grid > .reveal:nth-child(2) { transition-delay: 0.08s; }
.work__grid > .reveal:nth-child(3) { transition-delay: 0.16s; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*,
	*::before,
	*::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
	.js .reveal { opacity: 1; transform: none; }
	.hero__orb span,
	.pulse { animation: none; }
}

@media print {
	.site-header, .nav-toggle, .hero__glow, .contact__card, .to-top { display: none !important; }
	body { background: #fff; color: #000; }
	.js .reveal { opacity: 1; transform: none; }
}
