/* Nordkant — small additions on top of theme.json. */

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

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

::selection { background: var(--wp--preset--color--contrast); color: var(--wp--preset--color--base); }

/* ---------- Arrow links (paragraph / read more / button style "arrow") ---------- */
.is-style-arrow a,
a.wp-block-read-more.is-style-arrow,
.wp-block-read-more.is-style-arrow,
.wp-block-button.is-style-arrow .wp-block-button__link {
	text-decoration: none;
}
.is-style-arrow a::after,
.wp-block-read-more.is-style-arrow::after,
.wp-block-button.is-style-arrow .wp-block-button__link::after {
	content: "\2009\2192";
	display: inline-block;
	transition: transform .25s ease;
}
.is-style-arrow a:hover::after,
.wp-block-read-more.is-style-arrow:hover::after,
.wp-block-button.is-style-arrow .wp-block-button__link:hover::after {
	transform: translateX(.3em);
}
.wp-block-button.is-style-arrow .wp-block-button__link {
	background: transparent !important;
	color: inherit !important;
	border: 0;
	padding: 0;
	font-size: inherit;
	font-weight: inherit;
}

/* Small grey label above card titles ("Insight", "Housing" …) */
.is-style-label {
	font-size: var(--wp--preset--font-size--x-small);
	color: var(--wp--preset--color--muted);
	letter-spacing: .01em;
	margin-bottom: .35em !important;
}

/* ---------- Plain list ---------- */
.wp-block-list.is-style-plain { list-style: none; padding-left: 0; }
.wp-block-list.is-style-plain li + li { margin-top: .15em; }

/* ---------- Image hover zoom ---------- */
.is-style-hover-zoom { overflow: hidden; }
.is-style-hover-zoom img { transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.is-style-hover-zoom:hover img,
a:hover .is-style-hover-zoom img,
.nk-card:hover .is-style-hover-zoom img { transform: scale(1.035); }
@media (prefers-reduced-motion: reduce) { .is-style-hover-zoom img { transition: none; } }

/* ---------- Horizontal scroller (insights strip) ---------- */
.is-style-scroll-row,
.wp-block-post-template.is-style-scroll-row {
	display: flex !important;
	flex-wrap: nowrap !important;
	gap: var(--wp--preset--spacing--30);
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: thin;
	padding-bottom: var(--wp--preset--spacing--20);
	-webkit-overflow-scrolling: touch;
	position: relative; /* contain absolutely positioned screen-reader text so it can't widen the page */
}
.is-style-scroll-row > * {
	flex: 0 0 clamp(220px, 24vw, 340px);
	scroll-snap-align: start;
	margin: 0 !important;
}
.is-style-scroll-row::-webkit-scrollbar { height: 4px; }
.is-style-scroll-row::-webkit-scrollbar-thumb { background: var(--wp--preset--color--line); }

/* ---------- Cards ---------- */
.nk-card .wp-block-image,
.nk-card .wp-block-post-featured-image { margin-bottom: var(--wp--preset--spacing--10); }
.nk-card h3, .nk-card .wp-block-post-title { margin-top: 0; }
.nk-card .is-style-arrow { color: var(--wp--preset--color--muted); }
.nk-card:hover .is-style-arrow { color: var(--wp--preset--color--contrast); }

/* ---------- Header ---------- */
.nk-header .wp-block-navigation__responsive-container-open,
.nk-header .wp-block-navigation__responsive-container-close { font-size: var(--wp--preset--font-size--medium); }
.nk-header--overlay {
	position: absolute;
	inset: 0 0 auto 0;
	z-index: 20;
}
.admin-bar .nk-header--overlay { top: var(--wp-admin--admin-bar--height, 32px); }
.nk-header--overlay a,
.nk-header--overlay .wp-block-navigation__responsive-container-open { color: #fff; }

/* Full-screen mobile menu */
.wp-block-navigation__responsive-container.is-menu-open {
	padding: var(--wp--preset--spacing--40) !important;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	gap: var(--wp--preset--spacing--20);
	font-size: var(--wp--preset--font-size--xx-large);
	letter-spacing: -.025em;
}

/* ---------- Hero statement ---------- */
.nk-statement { text-wrap: balance; max-width: 22ch; }

/* ---------- Project facts column ---------- */
.nk-facts p { margin: 0; }
.nk-facts .is-style-label { margin-top: var(--wp--preset--spacing--20) !important; }
.nk-facts .is-style-label:first-child { margin-top: 0 !important; }
.nk-facts .wp-block-post-terms a { color: var(--wp--preset--color--contrast); }

/* ---------- People (footer contacts) ---------- */
.nk-person > .wp-block-image { flex: 0 0 88px; width: 88px; }
.nk-person .wp-block-image img { border-radius: 50%; aspect-ratio: 1; object-fit: cover; width: 100%; height: auto; }

/* ---------- Footer ---------- */
.nk-footer a:hover { text-decoration: underline; }
.nk-footer .wp-block-columns { row-gap: var(--wp--preset--spacing--40); }

/* ---------- Gallery rhythm on project pages ---------- */
.nk-gallery .wp-block-image img { width: 100%; height: auto; }

/* ---------- Query pagination ---------- */
.wp-block-query-pagination { border-top: 1px solid var(--wp--preset--color--line); padding-top: var(--wp--preset--spacing--20); }

/* ---------- Text widths ---------- */
.nk-lead { text-wrap: pretty; }
@media (min-width: 782px) {
	.nk-sticky { position: sticky; top: var(--wp--preset--spacing--40); align-self: flex-start; }
}

/* ---------- Project category filter (archive) ---------- */
.wp-block-categories.nk-filter {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	gap: .25em 1.25em;
	color: var(--wp--preset--color--muted);
}
.wp-block-categories.nk-filter .current-cat a { color: var(--wp--preset--color--contrast); text-decoration: underline; }
.nk-lead { line-height: 1.15; }
