/*
 * Shared styling for static pages (page.php: About/Contact), the 404
 * template, and the search-results template.
 *
 * Implements docs/17_VISUAL_DESIGN.md's typography/spacing tokens on views
 * the spec doesn't name explicitly (it only specifies catalog grid, single
 * artwork, front page, header/footer) — same gallery-quiet visual language,
 * restated here rather than imported, matching this theme's existing
 * per-view stylesheet pattern (catalog.css, single-artwork.css, front-
 * page.css are each scoped and self-contained; see inc/enqueue.php).
 *
 * Loaded only on static pages / 404 / search (inc/enqueue.php) — never
 * sitewide. Mobile-first: base rules target ~375px, min-width media
 * queries widen upward (agency standard — no max-width cascades). All
 * color/type values come from theme.json via the CSS custom properties
 * WordPress generates from it (--wp--preset--*) — no hex/font literals
 * here, per docs/17 "Hard rules" #1.
 */

/* ---------------------------------------------------------------------
 * Reusable CTA link (404, search empty state, Contact page body content).
 * The button look itself (404 / search "Browse the catalogue") is the
 * shared v2 outline component, `.jost-snoj-btn` (assets/css/style.css) —
 * 404.php/search.php apply it directly alongside `.jost-snoj-cta-button`,
 * which is now only a markup/JS hook and carries no styling of its own.
 * --------------------------------------------------------------------- */
.jost-snoj-cta-link {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 10px 4px;
	color: var(--wp--preset--color--foreground);
	font-size: 0.9rem;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.jost-snoj-cta-link:hover,
.jost-snoj-cta-link:focus-visible {
	color: var(--wp--preset--color--accent);
}

/* ---------------------------------------------------------------------
 * Generic static pages (page.php) — Privacy Policy and any future
 * long-form-prose page. About/Contact have their own layouts below.
 * --------------------------------------------------------------------- */
.jost-snoj-page__article {
	max-width: 44em;
	margin: 0 auto;
}

.jost-snoj-page__header {
	margin: 0 0 24px;
}

.jost-snoj-page__title {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 400;
	font-size: clamp(1.75rem, 1.4rem + 1.5vw, 2.5rem);
	line-height: 1.15;
	color: var(--wp--preset--color--foreground);
	margin: 0;
}

/* Prose measure for editor-authored body content: paragraph rhythm,
 * heading scale, and link colour all derive from theme.json tokens so an
 * editor's plain paragraphs/headings in the block editor render on-brand
 * with no extra markup required. */
.entry-content {
	font-family: var(--wp--preset--font-family--text);
	font-size: 1rem;
	line-height: 1.65;
	color: var(--wp--preset--color--foreground);
}

.entry-content > * + * {
	margin-top: 16px;
}

.entry-content h2 {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 400;
	font-size: clamp(1.2rem, 1.05rem + 0.6vw, 1.5rem);
	line-height: 1.25;
	margin-top: 40px;
}

.entry-content h3 {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 400;
	font-size: 1.1rem;
	margin-top: 32px;
}

.entry-content a {
	color: var(--wp--preset--color--accent);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.entry-content a:hover {
	color: var(--wp--preset--color--foreground);
}

.entry-content address {
	font-style: normal;
}

/* Editor-authored CTA links (e.g. the Contact page's own "Browse the
 * catalogue" paragraph, stored in post content — out of this task's
 * scope) carry only the `.jost-snoj-cta-button` markup/JS-hook class
 * (assets/css/style.css's docblock: it "carries no styling of its own"
 * by design, so 404.php/search.php can pair it with `.jost-snoj-btn`
 * explicitly) — without this rule such a link would render as a bare
 * text link, inconsistent with the outline-button language used
 * everywhere else on the site. Scoped to editor content only (not global,
 * unlike `.jost-snoj-btn` in style.css), reusing that exact component's
 * visual treatment. */
.entry-content a.jost-snoj-cta-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0.95rem 1.9rem;
	border: 1px solid var(--wp--preset--color--foreground);
	color: var(--wp--preset--color--foreground);
	font-family: var(--wp--preset--font-family--text);
	font-size: 0.72rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	text-decoration: none;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.entry-content a.jost-snoj-cta-button:hover,
.entry-content a.jost-snoj-cta-button:focus-visible {
	background-color: var(--wp--preset--color--foreground);
	color: var(--wp--preset--color--background);
}

/* ---------------------------------------------------------------------
 * About (page-about.php) / Contact (page-contact.php) — v2 two-column
 * layouts. docs/17_VISUAL_DESIGN.md v2 "About"/"Contact" entries, mirroring
 * wordpress/mockup/podoba-v2.html `?p=about` / `?p=contact` pixel-close.
 * Mobile-first: single column below 900px, side-by-side above it (agency
 * standard — min-width queries only).
 * --------------------------------------------------------------------- */
.jost-snoj-about__article,
.jost-snoj-contact__article {
	max-width: 1100px;
	margin: 0 auto;
}

.jost-snoj-about__title,
.jost-snoj-contact__title {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 400;
	font-size: clamp(2.2rem, 1.9rem + 1.5vw, 3rem);
	line-height: 1.15;
	color: var(--wp--preset--color--foreground);
	margin: 0 0 24px;
}

.jost-snoj-about__grid,
.jost-snoj-contact__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: clamp(2rem, 5vw, 4.5rem);
}

@media (min-width: 900px) {
	.jost-snoj-about__grid {
		grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
	}

	.jost-snoj-contact__grid {
		grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
	}
}

/* Prose column: 64ch measure, ochre drop-cap on the first paragraph only
 * (docs/17: "prose (64ch, ochre drop-cap on first paragraph)"). */
.jost-snoj-about__prose.entry-content p {
	max-width: 64ch;
}

.jost-snoj-about__prose.entry-content > p:first-of-type::first-letter {
	font-family: var(--wp--preset--font-family--display);
	font-size: 3.2em;
	float: left;
	line-height: 0.85;
	padding-right: 0.09em;
	color: var(--wp--preset--color--accent);
}

/* "At a glance" facts card — surface tile, dt/dd list. */
.jost-snoj-about__side {
	background-color: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--line);
	padding: 24px;
	align-self: start;
}

.jost-snoj-about__side-label {
	display: block;
	margin: 0 0 16px;
	font-family: var(--wp--preset--font-family--text);
	font-size: 0.72rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
}

.jost-snoj-about__side dl {
	margin: 0;
	font-size: 0.92rem;
}

.jost-snoj-about__side dt {
	color: var(--wp--preset--color--muted);
	font-family: var(--wp--preset--font-family--text);
	font-size: 0.72rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	margin-top: 16px;
}

.jost-snoj-about__side dd {
	margin: 4px 0 0;
	color: var(--wp--preset--color--foreground);
}

/* Contact: left column is the page's own authored copy (entry-content);
 * cap its measure and give any mailto: link the mockup's serif-ochre
 * accent treatment (docs/17: "intro with serif accent email") without
 * needing to touch the authored content markup itself. */
.jost-snoj-contact__info.entry-content p {
	max-width: 46ch;
}

.jost-snoj-contact__info.entry-content a[href^="mailto:"] {
	font-family: var(--wp--preset--font-family--display);
	font-size: 1.05em;
	color: var(--wp--preset--color--accent);
	text-decoration: none;
}

.jost-snoj-contact__info.entry-content a[href^="mailto:"]:hover,
.jost-snoj-contact__info.entry-content a[href^="mailto:"]:focus-visible {
	color: var(--wp--preset--color--accent-ink);
	text-decoration: underline;
}

/* ---------------------------------------------------------------------
 * General contact form (right column of the Contact page).
 * docs/17: "minimal form (labels uppercase, inputs UNDERLINE-only 1px
 * line, focus = ochre underline), GDPR consent checkbox line, solid
 * submit." Deliberately not reusing `.jost-snoj-enquiry__*`
 * (assets/css/single-artwork.css): that component is a boxed-input
 * per-artwork disclosure form; this is the visually distinct always-
 * visible underline-field form the v2 mockup specifies for this page.
 * --------------------------------------------------------------------- */
.jost-snoj-contact-form__status {
	margin: 0 0 24px;
	padding: 12px 16px;
	border: 1px solid var(--wp--preset--color--line);
	font-family: var(--wp--preset--font-family--text);
	font-size: 0.85rem;
	color: var(--wp--preset--color--foreground);
}

.jost-snoj-contact-form__status--success {
	border-color: var(--wp--preset--color--accent);
}

/* Honeypot: off-screen, matching .jost-snoj-enquiry__hp's reasoning
 * (single-artwork.css) — not display:none, separately removed from the
 * tab order/accessibility tree via markup (inc/contact-form.php). */
.jost-snoj-contact-form__hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.jost-snoj-contact-form__field {
	margin: 0 0 24px;
}

.jost-snoj-contact-form__field label {
	display: block;
	font-family: var(--wp--preset--font-family--text);
	font-size: 0.72rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
	margin: 0 0 8px;
}

.jost-snoj-contact-form__field input,
.jost-snoj-contact-form__field textarea {
	box-sizing: border-box;
	display: block;
	width: 100%;
	min-height: 44px;
	border: 0;
	border-bottom: 1px solid var(--wp--preset--color--line);
	background-color: transparent;
	padding: 8px 0;
	color: var(--wp--preset--color--foreground);
	font-family: inherit;
	font-size: 1rem;
	transition: border-color 0.2s ease;
}

.jost-snoj-contact-form__field textarea {
	min-height: 96px;
	resize: vertical;
}

.jost-snoj-contact-form__field input:focus,
.jost-snoj-contact-form__field textarea:focus {
	border-bottom-color: var(--wp--preset--color--accent);
}

/* GDPR consent checkbox — same 44px-row/20px-checkbox pattern as
 * .jost-snoj-enquiry__consent (single-artwork.css), namespaced separately
 * since this is a distinct form component. */
.jost-snoj-contact-form__consent {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	min-height: 44px;
	margin: 0 0 24px;
	padding: 6px 0;
}

.jost-snoj-contact-form__consent input[type="checkbox"] {
	flex-shrink: 0;
	width: 20px;
	height: 20px;
	margin: 2px 0 0;
	accent-color: var(--wp--preset--color--accent);
}

.jost-snoj-contact-form__consent label {
	font-family: var(--wp--preset--font-family--text);
	font-size: 0.85rem;
	line-height: 1.5;
	color: var(--wp--preset--color--foreground);
}

.jost-snoj-contact-form__consent a {
	color: var(--wp--preset--color--accent);
}

.jost-snoj-contact-form__consent a:hover,
.jost-snoj-contact-form__consent a:focus-visible {
	color: var(--wp--preset--color--accent-ink);
}

/* "Curriculum vitae" pointer at the foot of the About "At a glance" card
 * (page-about.php) — links to the CV sub-page. Own ≥44px tap target with a
 * hairline separating it from the facts above; accent on hover/focus like
 * every other link on these views. */
.jost-snoj-about__cv-link {
	margin: 20px 0 0;
	padding-top: 16px;
	border-top: 1px solid var(--wp--preset--color--line);
}

.jost-snoj-about__cv-link a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	font-family: var(--wp--preset--font-family--text);
	font-size: 0.72rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--foreground);
	text-decoration: none;
}

.jost-snoj-about__cv-link a:hover,
.jost-snoj-about__cv-link a:focus-visible {
	color: var(--wp--preset--color--accent);
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* ---------------------------------------------------------------------
 * CV (page-cv.php) — the four biographical sections (solo exhibitions,
 * group exhibitions, sacred realizations, publications). docs/17's quiet-
 * catalogue language restated (serif titles, small-caps year labels,
 * hairline section rules). Mobile-first: single column throughout; the
 * year/detail rows stay two-column even at ~375px (the year cell is a fixed
 * ~3.5rem, comfortably inside the viewport — no horizontal scroll).
 * --------------------------------------------------------------------- */
.jost-snoj-cv__article {
	max-width: 820px;
	margin: 0 auto;
}

.jost-snoj-cv__title {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 400;
	font-size: clamp(2.2rem, 1.9rem + 1.5vw, 3rem);
	line-height: 1.15;
	color: var(--wp--preset--color--foreground);
	margin: 0 0 24px;
}

.jost-snoj-cv__intro.entry-content {
	margin: 0 0 8px;
}

.jost-snoj-cv__intro.entry-content p {
	max-width: 64ch;
}

.jost-snoj-cv__sections {
	display: flex;
	flex-direction: column;
	gap: clamp(2rem, 4vw, 3rem);
}

.jost-snoj-cv__section-title {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 400;
	font-size: clamp(1.2rem, 1.05rem + 0.6vw, 1.5rem);
	line-height: 1.25;
	color: var(--wp--preset--color--foreground);
	margin: 0 0 16px;
	padding-bottom: 8px;
	border-bottom: 1px solid var(--wp--preset--color--line);
}

.jost-snoj-cv__list {
	margin: 0;
}

.jost-snoj-cv__row {
	display: grid;
	grid-template-columns: 3.5rem 1fr;
	gap: 8px 16px;
	padding: 8px 0;
}

.jost-snoj-cv__row + .jost-snoj-cv__row {
	border-top: 1px solid var(--wp--preset--color--line);
}

.jost-snoj-cv__year {
	margin: 0;
	font-family: var(--wp--preset--font-family--text);
	font-size: 0.78rem;
	letter-spacing: 0.06em;
	font-variant-numeric: tabular-nums;
	color: var(--wp--preset--color--muted);
	white-space: nowrap;
}

.jost-snoj-cv__detail {
	margin: 0;
	font-family: var(--wp--preset--font-family--text);
	font-size: 1rem;
	line-height: 1.5;
	color: var(--wp--preset--color--foreground);
}

.jost-snoj-cv__note {
	margin: 0;
	font-family: var(--wp--preset--font-family--text);
	font-size: 1rem;
	line-height: 1.65;
	color: var(--wp--preset--color--foreground);
	max-width: 64ch;
}

@media (min-width: 700px) {
	.jost-snoj-cv__row {
		grid-template-columns: 5rem 1fr;
	}
}

/* ---------------------------------------------------------------------
 * 404 template.
 * --------------------------------------------------------------------- */
/* min-height:55vh + vertical centering matches the mockup's `.nf` exactly
 * (wordpress/mockup/podoba-v2.html) — the 404 content sits centered in the
 * viewport, not just top-padded. */
.jost-snoj-404 {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 55vh;
	padding-top: 24px;
	padding-bottom: 24px;
}

.jost-snoj-404__panel {
	max-width: 36em;
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
}

/* Mockup (authoritative — docs/17_VISUAL_DESIGN.md v2): flat `font-size:
 * 6rem`, no smaller size at any viewport. Skeptik rejection follow-up
 * (2026-07-20): an earlier version of this rule used
 * `clamp(3.5rem, 3rem + 6vw, 6rem)`, reasoning the flat value might
 * overflow a ~390px viewport — that reasoning was wrong (verified against
 * the mockup itself at 390px: the "404" numeral renders comfortably with
 * margin on both sides, no overflow, confirmed again here with a live
 * Playwright screenshot, see PROJECT_LOG.md) and produced a numeral ~26%
 * narrower than the mockup's on mobile, an undocumented deviation from
 * the mockup this task's own MERILA require pixel-closeness against. Set
 * to the mockup's exact flat value at every width; a 3-glyph string in a
 * fixed rem size cannot overflow a viewport as narrow as this site
 * supports (see docs/17 hard rules — no viewport this theme targets goes
 * below ~360px), so no clamp/fluid-scaling is needed here. */
.jost-snoj-404__eyebrow {
	margin: 0;
	font-family: var(--wp--preset--font-family--display);
	font-size: 6rem;
	line-height: 1;
	color: var(--wp--preset--color--line);
}

.jost-snoj-404__title {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 400;
	font-size: clamp(1.5rem, 1.3rem + 1vw, 2rem);
	color: var(--wp--preset--color--foreground);
	margin: 0;
}

.jost-snoj-404__text {
	color: var(--wp--preset--color--muted);
	margin: 0;
}

.jost-snoj-404__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 8px 24px;
	margin: 8px 0 0;
}

.jost-snoj-404__search {
	margin-top: 16px;
	width: 100%;
	max-width: 24em;
}

/* ---------------------------------------------------------------------
 * Search form (get_search_form(), core html5 markup) — used on 404 and
 * search.php. WordPress core wraps the field in a <label>, so this is
 * already an accessible implicit label association.
 * --------------------------------------------------------------------- */
.search-form {
	display: flex;
	gap: 8px;
	width: 100%;
}

.search-form label {
	flex: 1 1 auto;
	min-width: 0;
}

.search-form .search-field {
	box-sizing: border-box;
	width: 100%;
	min-height: 44px;
	padding: 10px 12px;
	border: 1px solid var(--wp--preset--color--line);
	background-color: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--foreground);
	font-family: var(--wp--preset--font-family--text);
	font-size: 1rem;
}

.search-form .search-submit {
	flex: 0 0 auto;
	min-height: 44px;
	min-width: 44px;
	padding: 10px 20px;
	border: 0;
	background-color: var(--wp--preset--color--foreground);
	color: var(--wp--preset--color--background);
	font-family: var(--wp--preset--font-family--text);
	font-size: 0.85rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	cursor: pointer;
}

.search-form .search-submit:hover,
.search-form .search-submit:focus-visible {
	background-color: var(--wp--preset--color--accent);
}

/* ---------------------------------------------------------------------
 * Search results (search.php).
 * --------------------------------------------------------------------- */
.jost-snoj-search__header {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin: 0 0 32px;
}

.jost-snoj-search__title {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 400;
	font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem);
	color: var(--wp--preset--color--foreground);
	margin: 0;
	overflow-wrap: anywhere;
}

.jost-snoj-search__form {
	max-width: 28em;
}

.jost-snoj-search__empty,
.jost-snoj-search__empty-cta {
	margin: 0 0 16px;
}

.jost-snoj-search__section {
	margin: 0 0 48px;
}

.jost-snoj-search__section-title {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 400;
	font-size: clamp(1.1rem, 1rem + 0.5vw, 1.3rem);
	color: var(--wp--preset--color--foreground);
	margin: 0 0 16px;
}

/* Artwork hits: same card grid language as catalog.css/front-page.css
 * (.jost-snoj-card__* class names restated per-stylesheet on purpose — see
 * this file's docblock). */
.jost-snoj-search-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: var(--wp--custom--spacing--gutter-mobile, 16px);
	list-style: none;
	margin: 0;
	padding: 0;
}

@media (min-width: 700px) {
	.jost-snoj-search-grid {
		gap: var(--wp--custom--spacing--gutter-desktop, 24px);
	}
}

.jost-snoj-search-grid__item {
	margin: 0;
	padding: 0;
	list-style: none;
}

.jost-snoj-search-grid__link {
	display: flex;
	flex-direction: column;
	gap: 8px;
	color: inherit;
	text-decoration: none;
}

.jost-snoj-search-grid .jost-snoj-card__media {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 4 / 5;
	background-color: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--line);
	overflow: hidden;
}

.jost-snoj-search-grid .jost-snoj-card__media img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	transition: transform 200ms ease;
}

@media (prefers-reduced-motion: no-preference) {
	.jost-snoj-search-grid__link:hover .jost-snoj-card__media img,
	.jost-snoj-search-grid__link:focus-visible .jost-snoj-card__media img {
		transform: scale(1.02);
	}
}

.jost-snoj-search-grid .jost-snoj-card__title {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 400;
	font-size: 0.9rem;
	line-height: 1.3;
	color: var(--wp--preset--color--foreground);
	margin: 0;
}

.jost-snoj-search-grid__link:hover .jost-snoj-card__title,
.jost-snoj-search-grid__link:focus-visible .jost-snoj-card__title {
	color: var(--wp--preset--color--accent);
}

.jost-snoj-search-grid .jost-snoj-card__meta {
	font-family: var(--wp--preset--font-family--text);
	font-size: 0.72rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--wp--preset--color--muted);
}

/* Page hits: quiet text list, not a card — a page result has no image. */
.jost-snoj-search-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.jost-snoj-search-list__item {
	padding-bottom: 16px;
	border-bottom: 1px solid var(--wp--preset--color--line);
}

.jost-snoj-search-list__link {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	font-family: var(--wp--preset--font-family--display);
	font-size: 1.05rem;
	color: var(--wp--preset--color--foreground);
	text-decoration: none;
}

.jost-snoj-search-list__link:hover,
.jost-snoj-search-list__link:focus-visible {
	color: var(--wp--preset--color--accent);
}

.jost-snoj-search-list__excerpt {
	margin: 4px 0 0;
	color: var(--wp--preset--color--muted);
	font-size: 0.9rem;
}

/* Pagination (the_posts_pagination() core markup). */
.pagination.navigation {
	margin-top: 32px;
	padding-top: 16px;
	border-top: 1px solid var(--wp--preset--color--line);
}

.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 16px;
}

.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	min-width: 44px;
	padding: 0 8px;
	color: var(--wp--preset--color--foreground);
	text-decoration: none;
	font-size: 0.9rem;
}

.pagination .page-numbers.current {
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.pagination .page-numbers:hover,
.pagination .page-numbers:focus-visible {
	color: var(--wp--preset--color--accent);
}
