/*
 * Catalog interior pages — pathbar and prose.
 *
 * Marker class: .nou-catalog-page
 * Depends on:   assets/css/catalog.css  (shell, title, secthead, chip)
 *
 * Covers design-lab/wf-c-about.html and wf-c-contact.html, and the prose body
 * of wf-c-single.html. The pathbar lives here rather than in catalog-blog.css
 * because four templates use it and only one of them is the blog.
 *
 * MEASURE IS SET ON THE PROSE, NOT THE SHELL. `.nou-catalog-shell` is 1120px
 * because that is what a three-column card grid needs. Running body text to
 * 1120px gives about 150 characters a line, roughly twice the comfortable
 * maximum, so the prose block caps itself instead.
 */

/* ================================================================== *
 * PATHBAR — breadcrumb left, scope note right, one row
 * ================================================================== */

.nou-catalog-pathbar {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px 20px;
	margin-bottom: clamp(22px, 2.4vw, 28px);
	font-family: var(--wp--preset--font-family--mono);
	font-size: 11px;
	letter-spacing: 0.05em;
	color: var(--wp--custom--neutral--600);
}

/*
 * `:root .nou-catalog-pagehead > *` (catalog.css) resets margin-block to 0 on
 * every direct child (specificity 0,2,0), which silently kills the gap above —
 * the pathbar is a direct child of the pagehead. Restore it with a selector
 * that outweighs the reset (0,3,0). Applies wherever a pathbar sits in a
 * pagehead (product, single, blog, cart), which is every case it needs a gap.
 */
:root .nou-catalog-pagehead > .nou-catalog-pathbar {
	margin-bottom: clamp(22px, 2.4vw, 28px);
}

/*
 * THE TWO HALVES ARE CASED DIFFERENTLY, and that is the design, not an
 * oversight. The wireframe sets `text-transform: lowercase` on the trail and
 * `uppercase` on the note (design-lab/css/wf-c-path.css). An earlier pass here
 * put uppercase on the container, which shouted the breadcrumb — `HOME / SHOP`
 * where the design reads `home / shop`.
 *
 * Lowercase is a DISPLAY change only: the DOM still says "Home", so a screen
 * reader announces the real word. That is the whole reason the wireframe does
 * it in CSS rather than typing lowercase into the markup.
 */
.nou-catalog-pathbar ol {
	text-transform: lowercase;
}

.nou-catalog-pathbar__note {
	text-transform: uppercase;
}

.nou-catalog-pathbar a {
	color: var(--wp--custom--neutral--600);
	text-decoration: none;
	transition: color 160ms var(--wp--custom--easing--base);
}

.nou-catalog-pathbar a:hover {
	color: var(--wp--custom--neutral--900);
}

.nou-catalog-pathbar ol {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Separator as a pseudo-element so it is never selected or read aloud. */
.nou-catalog-pathbar li + li::before {
	content: "/";
	margin-right: 8px;
	color: var(--wp--custom--neutral--500);
}

/* Current page: the one item at full strength. */
.nou-catalog-pathbar [aria-current="page"] {
	color: var(--wp--custom--neutral--900);
}

.nou-catalog-pathbar__note {
	margin: 0;
	text-transform: uppercase;
	color: var(--wp--custom--neutral--600);
}

/* ================================================================== *
 * PROSE
 *
 * The page body. Everything is scoped under `.nou-catalog-prose` so it applies
 * to post_content the user edits, without theme.json having to take a position
 * on every element globally.
 * ================================================================== */

.nou-catalog-prose {
	max-width: 68ch;
	color: var(--wp--custom--neutral--800, var(--wp--custom--neutral--900));
	font-size: 16px;
	line-height: 1.7;
}

.nou-catalog-prose > * {
	margin-block: 0;
}

.nou-catalog-prose > * + * {
	margin-block-start: 1.1em;
}

/*
 * Lead paragraph: one step up, and the only place the body text is allowed to
 * be larger. Added as a class so it survives editing — the pattern sets it on
 * the first paragraph.
 */
.nou-catalog-prose .nou-page-lead {
	font-size: clamp(17px, 1.4vw, 20px);
	line-height: 1.55;
	color: var(--wp--custom--neutral--900);
}

/*
 * Headings inside prose. Mono, like every other structural heading in this
 * design, with more space above than below so a heading binds to the text it
 * introduces rather than floating between two blocks.
 */
.nou-catalog-prose h2,
.nou-catalog-prose h3 {
	margin-block-start: 1.9em;
	margin-block-end: 0.5em;
	font-family: var(--wp--preset--font-family--mono);
	font-weight: var(--wp--custom--font-weight--medium);
	letter-spacing: -0.01em;
	line-height: 1.25;
	color: var(--wp--custom--neutral--900);
}

.nou-catalog-prose h2 {
	font-size: clamp(19px, 1.8vw, 23px);
}

.nou-catalog-prose h3 {
	font-size: clamp(16px, 1.4vw, 18px);
}

.nou-catalog-prose a {
	color: var(--wp--custom--neutral--900);
	text-decoration: underline;
	text-decoration-color: var(--wp--custom--accent--strong);
	text-underline-offset: 3px;
	transition: color 160ms var(--wp--custom--easing--base);
}

.nou-catalog-prose a:hover {
	color: var(--wp--custom--accent--strong);
}

.nou-catalog-prose ul,
.nou-catalog-prose ol {
	padding-left: 0;
	list-style: none;
}

.nou-catalog-prose li + li {
	margin-top: 0.7em;
}

/*
 * List marker as a monospace dash rather than a disc: it lines up with the
 * mono headings and does not need a hanging indent to look deliberate.
 */
.nou-catalog-prose ul > li {
	position: relative;
	padding-left: 1.5em;
}

.nou-catalog-prose ul > li::before {
	content: "—";
	position: absolute;
	left: 0;
	font-family: var(--wp--preset--font-family--mono);
	color: var(--wp--custom--neutral--600);
}

.nou-catalog-prose ol {
	counter-reset: nou-prose;
}

.nou-catalog-prose ol > li {
	position: relative;
	padding-left: 1.9em;
	counter-increment: nou-prose;
}

.nou-catalog-prose ol > li::before {
	content: counter(nou-prose) ".";
	position: absolute;
	left: 0;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 13px;
	color: var(--wp--custom--neutral--600);
}

/*
 * `<strong>` opening a list item is how the design writes a term followed by
 * its explanation — the definition list from the wireframe, without requiring
 * the editor to produce <dl>, which the block editor cannot do.
 */
.nou-catalog-prose li > strong:first-child {
	color: var(--wp--custom--neutral--900);
	font-weight: var(--wp--custom--font-weight--medium);
}

.nou-catalog-prose code {
	padding: 2px 5px;
	border: 1px solid var(--wp--custom--line--soft);
	border-radius: var(--wp--custom--radius--xs);
	background: var(--wp--custom--neutral--100);
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.88em;
}

.nou-catalog-prose pre {
	overflow-x: auto;
	padding: 16px 18px;
	border: 1px solid var(--wp--custom--line--soft);
	border-radius: var(--wp--custom--radius--sm, var(--wp--custom--radius--xs));
	background: var(--wp--custom--neutral--100);
	font-family: var(--wp--preset--font-family--mono);
	font-size: 13px;
	line-height: 1.6;
}

/* A code block inside a <pre> must not repeat the inline box. */
.nou-catalog-prose pre code {
	padding: 0;
	border: 0;
	background: none;
	font-size: inherit;
}

/*
 * Quote: an accent rule on the leading edge, no quotation marks. Logical
 * property so it flips for right-to-left languages.
 */
.nou-catalog-prose blockquote {
	margin-inline: 0;
	padding-inline-start: 20px;
	border-inline-start: 2px solid var(--wp--custom--accent--strong);
	color: var(--wp--custom--neutral--900);
}

.nou-catalog-prose blockquote p:last-child {
	margin-bottom: 0;
}

.nou-catalog-prose img {
	height: auto;
	max-width: 100%;
	border-radius: var(--wp--custom--radius--md);
}

.nou-catalog-prose figure {
	margin-inline: 0;
}

.nou-catalog-prose figcaption {
	margin-top: 8px;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 11px;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--wp--custom--neutral--600);
}

/* ================================================================== *
 * DEFINITION LIST — term on the left, explanation on the right
 *
 * The structure the About and Contact designs are built from. Hairlines top
 * and bottom of every row rather than a card each: the rows are a list of
 * facts, and a border per row is one line where a card would be four.
 *
 * The label column is capped at 210px instead of a fraction, so the
 * explanation column keeps a readable measure no matter how long a term is.
 * ================================================================== */

.nou-catalog-deflist {
	margin: 0;
	border-top: 1px solid var(--wp--custom--line--soft);
}

.nou-catalog-deflist > div {
	display: grid;
	grid-template-columns: minmax(130px, 210px) minmax(0, 1fr);
	gap: 0 clamp(20px, 3vw, 44px);
	padding-block: clamp(16px, 2vw, 22px);
	border-bottom: 1px solid var(--wp--custom--line--soft);
}

/*
 * `padding-top: 3px` is not a nudge for its own sake: the label is mono 11px
 * and the explanation is 15px, so without it the label hangs above the first
 * line of text instead of sharing its baseline.
 */
.nou-catalog-deflist dt {
	margin: 0;
	padding-top: 3px;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 11px;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--wp--custom--neutral--600);
}

.nou-catalog-deflist dd {
	margin: 0;
	font-size: 15px;
	line-height: 1.6;
	color: var(--wp--custom--neutral--700);
}

/* A lead line inside the row: the email address, the product type. */
.nou-catalog-deflist dd strong {
	display: block;
	margin-bottom: 4px;
	font-weight: var(--wp--custom--font-weight--medium);
	color: var(--wp--custom--neutral--900);
}

.nou-catalog-deflist a {
	color: var(--wp--custom--neutral--900);
	text-decoration: underline;
	text-decoration-color: var(--wp--custom--accent--strong);
	text-underline-offset: 3px;
	transition: color 160ms var(--wp--custom--easing--base);
}

.nou-catalog-deflist a:hover {
	color: var(--wp--custom--accent--strong);
}

.nou-catalog-deflist code {
	padding: 2px 5px;
	border-radius: var(--wp--custom--radius--xs);
	background: var(--wp--custom--neutral--100);
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.88em;
}

@media (max-width: 600px) {
	/* One column: a 130px label beside body text is unreadable at 375px. */
	.nou-catalog-deflist > div {
		grid-template-columns: minmax(0, 1fr);
		gap: 6px;
	}

	.nou-catalog-deflist dt {
		padding-top: 0;
	}
}

/* ================================================================== *
 * CONTACT — form left, "other ways" right
 * ================================================================== */

.nou-catalog-contact {
	display: grid;
	/* The form is wider because sending a message is the job of this page. */
	grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
	gap: clamp(32px, 5vw, 72px);
	align-items: start;
}

@media (max-width: 860px) {
	.nou-catalog-contact {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* In the narrow column a 210px label eats more than half the width. */
.nou-catalog-contact__aside .nou-catalog-deflist > div {
	grid-template-columns: minmax(88px, 120px) minmax(0, 1fr);
}

/*
 * Same family as a section title but one step down: this is a second h2 beside
 * the main one, not the start of a new section.
 */
.nou-catalog-contact__title {
	margin: 0 0 18px;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 21px;
	font-weight: var(--wp--custom--font-weight--medium);
	letter-spacing: -0.02em;
	color: var(--wp--custom--neutral--900);
}

/* ================================================================== *
 * FORM
 * ================================================================== */

.nou-catalog-form {
	display: grid;
	gap: clamp(18px, 2.2vw, 24px);
}

.nou-catalog-form__row {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: clamp(14px, 1.8vw, 20px);
}

@media (max-width: 600px) {
	.nou-catalog-form__row {
		grid-template-columns: minmax(0, 1fr);
	}
}

.nou-catalog-field {
	display: grid;
	gap: 7px;
}

.nou-catalog-field label {
	font-family: var(--wp--preset--font-family--mono);
	font-size: 11px;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--wp--custom--neutral--600);
}

.nou-catalog-field input,
.nou-catalog-field select,
.nou-catalog-field textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 12px 14px;
	border: 1px solid var(--wp--custom--line--strong);
	border-radius: var(--wp--custom--radius--xs);
	background: var(--wp--custom--surface--soft);
	color: var(--wp--custom--neutral--900);
	font-family: inherit;
	font-size: 15px;
	line-height: 1.5;
	transition: border-color 180ms var(--wp--custom--easing--base),
		background-color 180ms var(--wp--custom--easing--base);
}

.nou-catalog-field textarea {
	min-height: 150px;
	resize: vertical;
}

.nou-catalog-field input:focus,
.nou-catalog-field select:focus,
.nou-catalog-field textarea:focus {
	border-color: var(--wp--custom--accent--strong);
	background: var(--wp--custom--surface--page);
	outline: 2px solid color-mix(in srgb, var(--wp--custom--accent--strong) 40%, transparent);
	outline-offset: 1px;
}

/*
 * Invalid state is driven by the server round trip, not by `:invalid`. A
 * browser marks an untouched required field invalid the moment the page loads,
 * so `:invalid` would paint every empty field red before anyone typed.
 */
.nou-catalog-field--error input,
.nou-catalog-field--error select,
.nou-catalog-field--error textarea {
	border-color: #b42318;
}

.nou-catalog-field__req {
	color: var(--wp--custom--accent--strong);
}

.nou-catalog-field__error {
	margin: 0;
	font-size: 13px;
	color: #b42318;
}

.nou-catalog-hint {
	margin: 0;
	font-size: 13px;
	line-height: 1.5;
	color: var(--wp--custom--neutral--600);
}

.nou-catalog-form__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px 20px;
}

/*
 * Not the theme.json button element: that is a pill and this design asks for a
 * mono uppercase rectangle. White on #0066ff measures 4.83:1, above the 4.5
 * floor for normal text.
 */
.nou-catalog-btn {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	padding: 14px 24px;
	border: 1px solid transparent;
	border-radius: var(--wp--custom--radius--xs);
	background: var(--wp--custom--accent--strong);
	color: #ffffff;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 12px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 180ms var(--wp--custom--easing--base),
		transform 200ms var(--wp--custom--easing--out);
}

.nou-catalog-btn:hover {
	background: var(--wp--custom--accent--stronger);
	transform: translateY(-1px);
}

/* ================================================================== *
 * NOT FOUND — the 404 body, patterns/404.php
 *
 * The empty-state block from design-lab/wf-c-404.html: a plain statement, an
 * inline search box and the way home. The "404" heading sits in the template's
 * pagehead above, so this is body only. Centred and narrow because a dead link
 * is a dead end — the reader needs one clear next move, not a page to scan.
 * ================================================================== */

.nou-catalog-notfound {
	max-width: 54ch;
	margin-inline: auto;
	padding-block: clamp(40px, 6vw, 72px);
	border-top: 1px solid var(--wp--custom--line--soft);
	border-bottom: 1px solid var(--wp--custom--line--soft);
	text-align: center;
}

.nou-catalog-notfound__title {
	margin: 0 0 10px;
	font-family: var(--wp--preset--font-family--mono);
	font-size: clamp(18px, 2vw, 22px);
	font-weight: var(--wp--custom--font-weight--medium);
	letter-spacing: var(--wp--custom--tracking--snug);
	color: var(--wp--custom--neutral--900);
}

.nou-catalog-notfound__note {
	max-width: 46ch;
	margin: 0 auto 22px;
	font-size: 14px;
	line-height: var(--wp--custom--line-height--medium);
	color: var(--wp--custom--neutral--600);
}

/*
 * Input + button on one row, the same shape as the search bar in the
 * wireframe. Constrained so the pair never stretches the full 54ch — a search
 * field that wide reads as a form, not a quick way out.
 */
.nou-catalog-notfound__search {
	display: flex;
	gap: 8px;
	max-width: 380px;
	margin: 0 auto;
}

.nou-catalog-notfound__input {
	flex: 1;
	min-width: 0;
	padding: 12px 16px;
	border: 1px solid var(--wp--custom--line--strong);
	border-radius: var(--wp--custom--radius--xs);
	background: var(--wp--custom--surface--soft);
	font-family: var(--wp--preset--font-family--primary);
	font-size: var(--wp--preset--font-size--x-small);
	color: var(--wp--custom--neutral--900);
	transition: border-color 180ms var(--wp--custom--easing--base);
}

.nou-catalog-notfound__input:focus-visible {
	outline: none;
	border-color: var(--wp--custom--accent--strong);
	background: var(--wp--custom--neutral--100);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--wp--custom--accent--strong) 22%, transparent);
}

.nou-catalog-notfound__input::placeholder {
	color: var(--wp--custom--neutral--600);
	opacity: 1;
}

.nou-catalog-notfound__btn {
	flex: none;
	padding: 12px 18px;
	border: 1px solid var(--wp--custom--line--strong);
	border-radius: var(--wp--custom--radius--xs);
	background: transparent;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 11px;
	letter-spacing: var(--wp--custom--tracking--wide);
	text-transform: uppercase;
	color: var(--wp--custom--neutral--900);
	cursor: pointer;
	transition: border-color 180ms var(--wp--custom--easing--base);
}

.nou-catalog-notfound__btn:hover {
	border-color: var(--wp--custom--accent--strong);
}

.nou-catalog-notfound__out {
	margin: 24px 0 0;
}

/*
 * Honeypot. Off-screen rather than `display: none`: some bots skip hidden
 * inputs but happily fill positioned ones. `aria-hidden` plus `tabindex="-1"`
 * on the input keeps it away from screen readers and the tab order.
 */
.nou-catalog-form__trap {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* --- Notices ----------------------------------------------------- */

.nou-catalog-notice {
	margin: 0 0 24px;
	padding: 14px 16px;
	border: 1px solid var(--wp--custom--line--strong);
	border-left-width: 3px;
	border-radius: var(--wp--custom--radius--xs);
	font-size: 15px;
	line-height: 1.6;
}

.nou-catalog-notice--ok {
	border-left-color: var(--wp--custom--accent--strong);
	background: color-mix(in srgb, var(--wp--custom--accent--strong) 7%, transparent);
	color: var(--wp--custom--neutral--900);
}

.nou-catalog-notice--error {
	border-left-color: #b42318;
	background: color-mix(in srgb, #b42318 6%, transparent);
	color: var(--wp--custom--neutral--900);
}

/* ================================================================== *
 * REDUCED MOTION
 * ================================================================== */

@media (prefers-reduced-motion: reduce) {
	.nou-catalog-pathbar a,
	.nou-catalog-prose a,
	.nou-catalog-deflist a,
	.nou-catalog-field input,
	.nou-catalog-field select,
	.nou-catalog-field textarea,
	.nou-catalog-btn {
		transition: none;
	}

	.nou-catalog-btn:hover {
		transform: none;
	}
}
