/*
 * Component-level CSS that theme.json's global styles system can't express:
 * card grids, the stats band, spec rows, hover states. Design tokens are
 * consumed via the --wp--preset--* custom properties theme.json generates,
 * so this file never hard-codes a colour or font.
 */

/* ---------- Section summary-metrics banner ---------- */

/* The stats themselves — the panel-coloured, edge-to-edge band around them
   is a real alignfull wp:group (same mechanism as .fc-stats-band and the
   footer), not CSS, so it correctly escapes both the root padding and the
   .fc-body-section 1800px cap at any viewport width. */
.fc-mini-stats {
	display: flex;
	flex-wrap: wrap;
	column-gap: 3rem;
	row-gap: 1.25rem;
}

.fc-mini-stats > div {
	margin: 0;
}

.fc-mini-stats dt {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--xx-large);
	font-weight: 600;
	line-height: 1;
	color: var(--wp--preset--color--white);
}

.fc-mini-stats dd {
	margin: 0.4rem 0 0;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--panel-soft);
}

/* ---------- Layout helpers ---------- */

.fc-full-bleed {
	width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
}

/* Applied to each body section (Education, Experience, Skills, Projects,
   Writing, Consultation) instead of WordPress' own "alignfull" — caps that
   section's own box (background included) at 1800px and centres it. The
   header, hero image, stats band, and footer are deliberately NOT given
   this class — they keep their independent alignfull styling and stay
   genuinely edge-to-edge. On any screen narrower than 1800px this is a
   no-op, so mobile is unaffected either way. */
.fc-body-section {
	max-width: 1800px;
	margin-left: auto;
	margin-right: auto;
}

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

/* Below the core/navigation mobile-overlay breakpoint the hamburger toggle
   and this CTA button collide in the same row — drop the button there; the
   full-screen menu and every section still offer the same call to action. */
@media (max-width: 599px) {
	/* Wins over WordPress' own inline global-styles rule
	   (`body .is-layout-flex { display: flex }`), which otherwise beats a
	   plain single-class selector here regardless of media-query nesting. */
	.fc-header-cta {
		display: none !important;
	}
}

/* ---------- Eyebrow + hero ---------- */

.fc-hero-image {
	margin: 0;
	line-height: 0;
}

.fc-hero-buttons {
	justify-content: center;
}

.fc-hero-image img {
	/* Source file is already pre-cropped (1920x691) — just scale it,
	   don't crop it again. */
	display: block;
	width: 100%;
	height: auto;
}

/* ---------- Stats band ---------- */

.fc-stats-band {
	background-color: var(--wp--preset--color--panel);
	border-top: 2px solid var(--wp--preset--color--accent);
	color: var(--wp--preset--color--white);
}

.fc-stats-band .wp-block-columns {
	margin-bottom: 0;
}

.fc-stat dt {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--huge);
	font-weight: 600;
	color: var(--wp--preset--color--white);
}

.fc-stat dd {
	margin: 0.35rem 0 0;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--panel-soft);
}

/* ---------- Spec rows (education / experience) ---------- */

.fc-spec-row {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.35rem 2rem;
	padding: 1.75rem 0;
}

@media (min-width: 782px) {
	.fc-spec-row {
		grid-template-columns: 1fr auto;
		align-items: baseline;
	}
}

.fc-spec-row__meta {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--ink-soft);
	white-space: nowrap;
}

.fc-spec-row h3 {
	margin: 0;
	font-size: var(--wp--preset--font-size--x-large);
}

.fc-spec-row p {
	margin: 0.35rem 0 0;
	color: var(--wp--preset--color--ink-soft);
}

/* ---------- Card grids (Projects / Field Notes / Services) ---------- */

.fc-card-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
	gap: 1.25rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.fc-card-grid > li {
	margin: 0;
}

.fc-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	padding: 1.75rem;
	background: var(--wp--preset--color--paper);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 6px;
	text-decoration: none;
	color: inherit;
	transition: border-color 0.15s ease, transform 0.15s ease;
}

.fc-card:hover,
.fc-card:focus-visible {
	border-color: var(--wp--preset--color--accent);
	transform: translateY(-2px);
}

.fc-card--static {
	cursor: default;
}

.fc-card--static:hover,
.fc-card--static:focus-visible {
	transform: none;
	border-color: var(--wp--preset--color--line);
}

.fc-card__index {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--xx-large);
	color: var(--wp--preset--color--line);
}

.fc-card h3 {
	margin: 1rem 0 0.5rem;
	font-size: var(--wp--preset--font-size--large);
}

.fc-card p {
	margin: 0;
	color: var(--wp--preset--color--ink-soft);
	font-size: var(--wp--preset--font-size--small);
}

.fc-card__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 1.25rem;
	margin: 0 0 0.75rem;
	font-size: var(--wp--preset--font-size--label);
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--wp--preset--color--ink-soft);
}

.fc-card__meta strong {
	color: var(--wp--preset--color--ink);
	font-weight: 600;
	text-transform: none;
	letter-spacing: normal;
}

.fc-card__outcome {
	margin-top: auto;
	padding-top: 1rem;
	border-top: 1px solid color-mix(in srgb, var(--wp--preset--color--accent) 35%, transparent);
	font-family: var(--wp--preset--font-family--display);
	font-weight: 600;
	color: var(--wp--preset--color--accent-strong);
}

.fc-badge {
	display: inline-flex;
	align-items: center;
	padding: 0.2rem 0.65rem;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 999px;
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--wp--preset--color--ink-soft);
}

/* ---------- Services / consultation pillars ---------- */

.fc-pillar {
	padding: 1.75rem;
	background: var(--wp--preset--color--paper);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 6px;
	height: 100%;
}

.fc-pillar h3 {
	margin: 0;
	font-size: var(--wp--preset--font-size--large);
}

.fc-skills-grid {
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr));
}

.fc-pillar ul {
	margin: 1rem 0 0;
	padding: 0;
	list-style: none;
}

.fc-pillar li {
	position: relative;
	padding-left: 1.1rem;
	margin: 0 0 0.5rem;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--ink-soft);
}

.fc-pillar li::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0.55em;
	width: 6px;
	height: 6px;
	border-radius: 999px;
	background: var(--wp--preset--color--accent);
}

/* ---------- Utility ---------- */

.fc-on-panel,
.fc-on-panel :where(h1, h2, h3, h4, p) {
	color: var(--wp--preset--color--white);
}

.fc-on-panel .fc-eyebrow {
	color: var(--wp--preset--color--panel-soft);
}

.fc-on-panel .fc-eyebrow::before {
	background: var(--wp--preset--color--accent);
}

/* Site-wide sticky header */
.fc-site-header {
	position: sticky;
	top: 0;
	z-index: 40;
	background: color-mix(in srgb, var(--wp--preset--color--paper) 92%, transparent);
	backdrop-filter: saturate(140%) blur(6px);
	border-bottom: 1px solid var(--wp--preset--color--line);
}

.wp-block-navigation__responsive-container.is-menu-open {
	background: var(--wp--preset--color--paper) !important;
}

/* ---------- Article (Field Note) page ---------- */

/* Wide layout: cover + title row, then a navigation pane beside the body,
   then a card row of other published articles at the bottom. */
.fc-article-hero {
	display: grid;
	grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
	gap: 2.5rem;
	align-items: center;
	margin: 1.5rem 0 0;
	padding-bottom: 2.5rem;
	border-bottom: 1px solid var(--wp--preset--color--line);
}

.fc-article-hero__text > * {
	margin-block: 0;
}

.fc-article-hero__text > * + * {
	margin-block-start: 1rem;
}

.fc-note-cover {
	margin: 0;
	aspect-ratio: 16 / 10;
	border-radius: 6px;
	overflow: hidden;
	background: var(--wp--preset--color--paper-2);
	border: 1px solid var(--wp--preset--color--line);
}

.fc-note-cover img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.fc-note-cover--placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--wp--preset--color--accent);
	background-color: var(--wp--preset--color--panel);
	background-image:
		linear-gradient(var(--wp--preset--color--panel-line) 1px, transparent 1px),
		linear-gradient(90deg, var(--wp--preset--color--panel-line) 1px, transparent 1px);
	background-size: 24px 24px;
	border-color: var(--wp--preset--color--panel-line);
}

.fc-note-cover--placeholder svg {
	width: 78%;
	height: auto;
}

.fc-article-layout {
	display: grid;
	grid-template-columns: 17.5rem minmax(0, 1fr);
	gap: 3.5rem;
	align-items: start;
	margin-top: 2.5rem;
}

.fc-article-nav {
	position: sticky;
	top: 2rem;
}

.fc-note-nav ul {
	list-style: none;
	margin: 1rem 0 0;
	padding: 0;
	border-top: 1px solid var(--wp--preset--color--line);
}

.fc-note-nav li {
	margin: 0;
	padding: 0.85rem 0;
	border-bottom: 1px solid var(--wp--preset--color--line);
}

.fc-note-nav li a {
	display: block;
	font-weight: 500;
	line-height: 1.35;
	text-decoration: none;
	color: var(--wp--preset--color--ink);
}

.fc-note-nav li a:hover,
.fc-note-nav li a:focus-visible {
	color: var(--wp--preset--color--accent);
}

.fc-note-nav li span {
	display: block;
	margin-top: 0.25rem;
	font-size: var(--wp--preset--font-size--label);
	color: var(--wp--preset--color--ink-soft);
}

.fc-note-nav__all {
	display: inline-block;
	margin-top: 1rem;
	font-size: var(--wp--preset--font-size--small);
}

.fc-article-body > * {
	max-width: 52rem;
}

.fc-article-body > * + * {
	margin-block-start: 1.25rem;
}

.fc-article-body .wp-block-post-content > * + * {
	margin-block-start: 1.25rem;
}

.fc-article-body h2 {
	margin-top: 2.5rem;
}

.fc-article-more {
	margin-top: 4.5rem;
	padding-top: 3rem;
	border-top: 1px solid var(--wp--preset--color--line);
}

.fc-article-more h2 {
	margin: 0.5rem 0 1.75rem;
}

.fc-article-more .fc-card h3 a {
	text-decoration: none;
	color: inherit;
}

.fc-article-more .fc-card h3 a:hover {
	color: var(--wp--preset--color--accent);
}

.fc-card__more {
	margin-top: auto;
	padding-top: 1rem;
	font-size: var(--wp--preset--font-size--small);
}

.fc-article-more__all {
	margin: 1.75rem 0 0;
}

@media (max-width: 899px) {
	.fc-article-hero {
		grid-template-columns: 1fr;
		gap: 1.5rem;
	}

	.fc-article-layout {
		grid-template-columns: 1fr;
		gap: 0;
	}

	/* The bottom "More articles" row carries this on small screens. */
	.fc-article-nav {
		display: none;
	}
}

.fc-article-hero__text h1 {
	font-size: clamp(2rem, 3.6vw, 3.25rem);
	line-height: 1.1;
}

/* ---------- Shared page hero (archives and detail pages) ---------- */

.fc-page-hero {
	padding-bottom: 2.25rem;
	margin-bottom: 2.5rem;
	border-bottom: 1px solid var(--wp--preset--color--line);
}

.fc-page-hero > * {
	margin-block: 0;
}

.fc-page-hero > * + * {
	margin-block-start: 1rem;
}

.fc-page-hero h1 {
	font-size: clamp(2.25rem, 4.2vw, 3.5rem);
	line-height: 1.08;
}

.fc-page-hero__intro {
	max-width: 46rem;
}

/* Detail pages already place the layout grid directly under the hero. */
.fc-article-page .fc-page-hero {
	margin-bottom: 0;
}

.fc-article-page .fc-page-hero + .fc-article-layout {
	margin-top: 2.5rem;
}

/* ---------- Two-column card grid (Projects archive) ---------- */

.fc-card-grid--2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.fc-card__outcome {
	margin-top: 1rem;
	font-weight: 600;
	color: var(--wp--preset--color--accent-strong);
}

/* ---------- Field Note rows (Writing archive) ---------- */

.fc-note-rows {
	list-style: none;
	margin: 0;
	padding: 0;
	border-top: 1px solid var(--wp--preset--color--line);
}

.fc-note-rows > li {
	margin: 0;
}

.fc-note-row {
	display: grid;
	grid-template-columns: 10rem minmax(0, 1fr) 8rem;
	gap: 2rem;
	align-items: start;
	padding: 1.75rem 0;
	border-bottom: 1px solid var(--wp--preset--color--line);
}

.fc-note-row > * {
	margin: 0;
}

.fc-note-row__date {
	padding-top: 0.35rem;
	font-size: var(--wp--preset--font-size--label);
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--wp--preset--color--ink-soft);
}

.fc-note-row__main h3 {
	margin: 0;
	font-size: var(--wp--preset--font-size--x-large);
	line-height: 1.2;
}

.fc-note-row__main h3 a {
	text-decoration: none;
	color: var(--wp--preset--color--ink);
}

.fc-note-row__main h3 a:hover,
.fc-note-row__main h3 a:focus-visible {
	color: var(--wp--preset--color--accent);
}

.fc-note-row__main p {
	margin: 0.6rem 0 0;
	max-width: 42rem;
	color: var(--wp--preset--color--ink-soft);
}

.fc-note-row__aside {
	justify-self: end;
	padding-top: 0.3rem;
	font-size: var(--wp--preset--font-size--small);
}

.fc-note-row.is-soon .fc-note-row__main h3 {
	color: var(--wp--preset--color--ink-soft);
}

/* Titles inside the dynamic cards (teaser and "more articles"). */
.fc-card h3 {
	font-size: var(--wp--preset--font-size--x-large);
	line-height: 1.2;
}

.fc-card h3 a {
	text-decoration: none;
	color: inherit;
}

/* ---------- Spec / enquiry card (project and service pages) ---------- */

.fc-spec-card {
	padding: 1.5rem;
	background: var(--wp--preset--color--paper-2);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 6px;
}

.fc-spec-card > * {
	margin-block: 0;
}

.fc-spec-card > .fc-eyebrow:not(:first-child) {
	margin-top: 1.25rem;
}

.fc-spec-card > p:not(.fc-eyebrow) {
	margin-top: 0.35rem;
}

.fc-spec-card .wp-block-buttons {
	margin-top: 1.25rem;
}

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

.fc-contact-layout {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	grid-template-rows: auto auto auto 1fr;
	column-gap: 4rem;
	align-items: start;
}

.fc-contact-layout > * {
	grid-column: 1;
	margin-block: 0 1rem;
}

.fc-contact-layout > :last-child {
	grid-column: 2;
	grid-row: 1 / 5;
	margin: 0;
	padding: 2rem;
	background: var(--wp--preset--color--paper-2);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 6px;
}

@media (max-width: 899px) {
	.fc-note-row {
		grid-template-columns: 1fr;
		gap: 0.5rem;
	}

	.fc-note-row__aside {
		justify-self: start;
		padding-top: 0;
	}

	.fc-card-grid--2 {
		grid-template-columns: 1fr;
	}

	.fc-contact-layout {
		grid-template-columns: 1fr;
		grid-template-rows: none;
	}

	.fc-contact-layout > :last-child {
		grid-column: 1;
		grid-row: auto;
		margin-top: 1.5rem;
		padding: 1.25rem;
	}
}

/* ---------- Section heading block: align with the section's left edge ---------- */

.fc-section-head {
	max-width: 46rem;
	margin-left: max(0px, calc((100% - var(--fc-col, 1200px)) / 2)) !important;
	margin-right: auto !important;
}

#writing .fc-section-head {
	--fc-col: 1800px;
}

.fc-section-head > * {
	margin-left: 0 !important;
	margin-right: 0 !important;
}

.fc-contact-layout h1 {
	font-size: clamp(2.25rem, 4vw, 3.5rem);
	line-height: 1.08;
}
