/*
 * MO Store component styles.
 * Rule (spec §28.1 / ticket §9): every color, spacing and typography value
 * here is a var() pulled from theme.json. A literal hex or spacing number
 * in this file is a bug, not a style. Border widths, radius fallbacks and
 * the three responsive breakpoints (320/768/1024) are not design tokens —
 * they are structural and media queries cannot read CSS custom properties.
 *
 * MO-165: retuned to Direction 1 "Night Drive Precision". The surface stack
 * is surface-primary / -secondary / -elevated, text is text-primary /
 * text-muted, the single accent is cobalt and amber is reserved exclusively
 * for caution. Small and regular text on a dark surface uses
 * accent-cobalt-light (#6E9BFF), never base accent-cobalt (#2E6BFF) — the
 * base tint measures 3.373:1 on surface-elevated and 4.158:1 on
 * surface-primary, both below the 4.5:1 AA floor. Base cobalt is only ever
 * used as a non-text border/fill, where the 3:1 floor applies.
 */

/* Box-sizing reset — without this, width:100% elements (e.g. .mo-btn--full)
 * add their own padding/border on top of the parent's width, overflowing it. */
*,
*::before,
*::after {
	box-sizing: border-box;
}

/* Skip link — keyboard users must be able to bypass repeated nav. */
.mo-skip-link {
	position: absolute;
	left: var(--wp--preset--spacing--xs);
	top: -999px;
	z-index: 100;
	background: var(--wp--preset--color--surface-elevated);
	color: var(--wp--preset--color--text-primary);
	padding: var(--wp--preset--spacing--xs) var(--wp--preset--spacing--sm);
	border-radius: var(--wp--custom--radius--sm);
}
.mo-skip-link:focus {
	top: var(--wp--preset--spacing--xs);
}

/* Focus visibility — never hover-only; every interactive element gets this.
 * On the night palette the ring is text-primary (17.316:1 on surface-primary,
 * 6.277:1 on the cobalt-dark CTA) rather than brand blue, which would have
 * disappeared into the cobalt button it most needs to outline. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
	outline: var(--wp--custom--focus-ring-width) solid var(--wp--preset--color--text-primary);
	outline-offset: var(--wp--custom--focus-ring-offset);
}

/* ---------- Header ---------- */
/* fable/design: sticky and translucent so the wordmark and cart stay
   reachable while the page scrolls under it.
   Shared-owner fix (store request: "mobile sticky header floats mid-page"):
   the sticky element is the template-part WRAPPER (<header
   class="wp-block-template-part">, a direct child of .wp-site-blocks), not
   .mo-header itself. .mo-header is the wrapper's only child, so sticky on it
   had no room to stick, and fix-shell.css makes it position:relative for
   the mobile nav dropdown anyway; the old mobile rule
   `top: var(--mo-consent-height)` then just shifted the relative header
   ~218px down into the hero while the consent banner was open. The consent
   banner is now a bottom sheet on phones too, so the header never needs an
   offset. A store that wants a header that scrolls away sets
   `theme.header: "static"` in its JSON (body class mo-sf-header-static). */
.wp-site-blocks > header.wp-block-template-part {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 70;
}
body.mo-sf-header-static .wp-site-blocks > header.wp-block-template-part {
	position: relative;
	top: auto;
}
.mo-header {
	position: relative;
	z-index: 70;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--md);
	padding: var(--wp--preset--spacing--xs) var(--wp--preset--spacing--md);
	background: var(--wp--custom--header-scrim);
	-webkit-backdrop-filter: blur(14px);
	backdrop-filter: blur(14px);
	border-bottom: 1px solid var(--wp--custom--border-subtle);
}

.mo-header .wp-block-site-title a {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--text-primary);
	text-decoration: none;
}

/* Wordmark: a cobalt full stop after the name — one accent, used sparingly. */
.mo-header .wp-block-site-title a::after {
	content: ".";
	color: var(--wp--preset--color--accent-cobalt);
}

/* Store-specific overrides of this dot (e.g. Tailwag & Co.) live in
   plugins/mo-storefronts/assets/css/sf-<slug>.css. */

.mo-header__nav-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: var(--wp--custom--touch-target);
	min-height: var(--wp--custom--touch-target);
	border: 1px solid var(--wp--custom--border-control);
	border-radius: var(--wp--custom--radius--sm);
	background: var(--wp--preset--color--surface-elevated);
	color: var(--wp--preset--color--text-primary);
}

.mo-header__nav {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--sm);
}

.mo-header__nav[hidden] {
	display: none;
}

.mo-header__nav a {
	position: relative;
	display: flex;
	align-items: center;
	min-height: var(--wp--custom--touch-target);
	min-width: var(--wp--custom--touch-target);
	padding: var(--wp--preset--spacing--xs) var(--wp--preset--spacing--xs);
	text-decoration: none;
	font-size: var(--wp--preset--font-size--sm);
	font-weight: 500;
	color: var(--wp--preset--color--text-secondary);
	transition: color var(--wp--custom--motion-duration) var(--wp--custom--motion-ease);
}

.mo-header__nav a:hover {
	color: var(--wp--preset--color--text-primary);
}

/* Desktop only: a cobalt rule grows in under the link on hover/focus.
   transform, not width, so nothing reflows. */
@media (min-width: 768px) {
	.mo-header__nav a::after {
		content: "";
		position: absolute;
		left: var(--wp--preset--spacing--xs);
		right: var(--wp--preset--spacing--xs);
		bottom: var(--wp--preset--spacing--2-xs);
		height: 2px;
		border-radius: var(--wp--custom--radius--full);
		background: var(--wp--preset--color--accent-cobalt);
		transform: scaleX(0);
		transform-origin: left;
		transition: transform var(--wp--custom--motion-duration) var(--wp--custom--motion-ease);
	}
	.mo-header__nav a:hover::after,
	.mo-header__nav a:focus-visible::after {
		transform: scaleX(1);
	}
}

.mo-header__cart {
	display: inline-flex;
	align-items: center;
	gap: var(--wp--preset--spacing--2-xs);
	min-height: var(--wp--custom--touch-target);
	padding: 0 var(--wp--preset--spacing--sm);
	border-radius: var(--wp--custom--radius--sm);
	font-size: var(--wp--preset--font-size--sm);
	color: var(--wp--preset--color--text-muted);
	text-decoration: none;
}

.mo-header__cart-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: var(--wp--preset--spacing--lg);
	min-height: var(--wp--preset--spacing--lg);
	border-radius: var(--wp--custom--radius--full);
	background: var(--wp--preset--color--accent-cobalt-dark);
	color: var(--wp--preset--color--text-primary);
	font-size: var(--wp--preset--font-size--xs);
	font-weight: 700;
}

@media (min-width: 768px) {
	.mo-header {
		padding-inline: var(--wp--preset--spacing--2-xl);
	}
	.mo-header__nav-toggle {
		display: none;
	}
	.mo-header__nav {
		flex-direction: row;
		gap: var(--wp--preset--spacing--sm);
	}
	.mo-header__nav[hidden] {
		display: flex;
	}
}

/* ---------- Footer ---------- */
.mo-footer {
	background: var(--wp--preset--color--surface-sunken);
	color: var(--wp--preset--color--text-muted);
	border-top: 1px solid var(--wp--custom--border-subtle);
	padding: var(--wp--preset--spacing--2-xl) var(--wp--preset--spacing--md) var(--wp--preset--spacing--xl);
	font-size: var(--wp--preset--font-size--sm);
}

.mo-footer a {
	color: var(--wp--preset--color--text-secondary);
	text-decoration: none;
}
.mo-footer a:hover {
	color: var(--wp--preset--color--text-primary);
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

.mo-footer__top {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--xl);
	padding-bottom: var(--wp--preset--spacing--xl);
	margin-bottom: var(--wp--preset--spacing--lg);
	border-bottom: 1px solid var(--wp--custom--border-subtle);
}

.mo-footer__wordmark {
	margin: 0 0 var(--wp--preset--spacing--2-xs);
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--md);
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--text-primary);
}
.mo-footer__wordmark::after {
	content: ".";
	color: var(--wp--preset--color--accent-cobalt);
}

.mo-footer__tagline {
	margin: 0;
	max-width: 32ch;
	color: var(--wp--preset--color--text-muted);
}

@media (min-width: 1024px) {
	.mo-footer__top {
		flex-direction: row;
		justify-content: space-between;
		gap: var(--wp--preset--spacing--3-xl);
	}
}

.mo-footer__links {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--sm);
}

@media (min-width: 768px) {
	.mo-footer__links {
		flex-direction: row;
		gap: var(--wp--preset--spacing--lg);
	}
}

/* ---------- Buttons ---------- */
.mo-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--wp--preset--spacing--2-xs);
	min-height: var(--wp--custom--touch-target);
	padding: var(--wp--preset--spacing--xs) var(--wp--preset--spacing--lg);
	border-radius: var(--wp--custom--radius--md);
	font-size: var(--wp--preset--font-size--base);
	font-weight: 600;
	text-decoration: none;
	border: 1px solid transparent;
	cursor: pointer;
	font-family: inherit;
}

.mo-btn {
	transition:
		background-color var(--wp--custom--motion-duration) var(--wp--custom--motion-ease),
		border-color var(--wp--custom--motion-duration) var(--wp--custom--motion-ease),
		transform var(--wp--custom--motion-duration) var(--wp--custom--motion-ease),
		box-shadow var(--wp--custom--motion-duration) var(--wp--custom--motion-ease);
}

.mo-btn--primary {
	background: var(--wp--preset--color--accent-cobalt-dark);
	border-color: var(--wp--preset--color--accent-cobalt);
	/* fable/design round 3: --mo-sf-accent-contrast is a per-storefront,
	   AA-enforced override (Mo_Storefronts_Theme::resolved_css_vars) —
	   falls back to the original text-primary when unset (default
	   storefront), unchanged from before this variable existed. */
	color: var(--mo-sf-accent-contrast, var(--wp--preset--color--text-primary));
	box-shadow: var(--wp--preset--shadow--sm);
}
.mo-btn--primary:hover,
.mo-btn--primary:focus-visible {
	/* Darker, not brighter: text-primary on base accent-cobalt measures
	   4.165:1 and would fail AA on hover. accentCobaltHover is 7.435:1. */
	background: var(--wp--custom--accent-cobalt-hover);
	transform: translateY(-1px);
	box-shadow: var(--wp--preset--shadow--md);
}
.mo-btn--primary:active {
	transform: translateY(0);
}

.mo-btn--secondary {
	background: transparent;
	color: var(--wp--preset--color--text-primary);
	border-color: var(--wp--custom--border-control);
}
.mo-btn--secondary:hover,
.mo-btn--secondary:focus-visible {
	background: var(--wp--preset--color--surface-elevated);
	border-color: var(--wp--preset--color--text-muted);
}

.mo-btn--full {
	width: 100%;
}

.mo-btn--lg {
	min-height: calc(var(--wp--custom--touch-target) * 1.15);
	padding-inline: var(--wp--preset--spacing--xl);
	font-size: var(--wp--preset--font-size--base);
	font-weight: 700;
}

/* ---------- Shared editorial primitives ---------- */
.mo-eyebrow {
	margin: 0 0 var(--wp--preset--spacing--sm);
	font-size: var(--wp--preset--font-size--xs);
	font-weight: 700;
	letter-spacing: var(--wp--custom--letter-spacing-wide);
	text-transform: uppercase;
	color: var(--wp--preset--color--accent-cobalt-light);
}
.mo-eyebrow a {
	display: inline-flex;
	align-items: center;
	min-height: var(--wp--custom--touch-target);
	color: inherit;
	text-decoration: none;
}
.mo-eyebrow a:hover {
	text-decoration: underline;
	text-underline-offset: 0.25em;
}
.mo-eyebrow__sep {
	margin-inline: var(--wp--preset--spacing--2-xs);
	color: var(--wp--preset--color--text-muted);
}

.mo-section-head {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--xs);
	max-width: 64ch;
	margin-bottom: var(--wp--preset--spacing--xl);
}
.mo-section-head__title {
	margin: 0;
	font-size: var(--wp--preset--font-size--xl);
	line-height: 1.12;
}
.mo-section-head__lede {
	margin: 0;
	color: var(--wp--preset--color--text-secondary);
	font-size: var(--wp--preset--font-size--md);
	line-height: 1.5;
}

.mo-link-arrow {
	display: inline-flex;
	align-items: center;
	gap: var(--wp--preset--spacing--2-xs);
	min-height: var(--wp--custom--touch-target);
	font-weight: 600;
	color: var(--wp--preset--color--accent-cobalt-light);
	text-decoration: none;
}
.mo-link-arrow span[aria-hidden] {
	display: inline-block;
	transition: transform var(--wp--custom--motion-duration) var(--wp--custom--motion-ease);
}
.mo-link-arrow:hover span[aria-hidden],
a:hover .mo-link-arrow span[aria-hidden] {
	transform: translateX(4px);
}

.mo-icon {
	display: block;
	width: 24px;
	height: 24px;
}

/* Add-to-cart confirmation state (MO-165 §E). Colour change plus a short
   scale bump on the label only — transform/opacity, no layout property, so
   it cannot shift anything around it. */
.mo-btn--primary.is-confirmed {
	background: var(--wp--preset--color--success);
	border-color: var(--wp--preset--color--success);
}
.mo-btn__label {
	display: inline-block;
	transform-origin: center;
}
.mo-btn--primary.is-confirmed .mo-btn__label {
	animation: mo-cta-bump 260ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes mo-cta-bump {
	0% { transform: scale(1); }
	50% { transform: scale(1.12); }
	100% { transform: scale(1); }
}

/* ---------- Sticky mobile CTA ---------- */
.mo-sticky-cta {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 50;
	padding: var(--wp--preset--spacing--sm) var(--wp--preset--spacing--md);
	background: var(--wp--preset--color--surface-secondary);
	border-top: 1px solid var(--wp--custom--border-subtle);
	box-shadow: var(--wp--preset--shadow--md);
}
.mo-sticky-cta[hidden] {
	display: none;
}
@media (min-width: 768px) {
	.mo-sticky-cta {
		display: none;
	}
}

/* ---------- Product card ---------- */
.mo-product-card {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--sm);
	padding: var(--wp--preset--spacing--md);
	border: 1px solid var(--wp--custom--border-subtle);
	border-radius: var(--wp--custom--radius--lg);
	background: var(--wp--preset--color--surface-secondary);
}

.mo-product-card img {
	border-radius: var(--wp--custom--radius--md);
	width: 100%;
	height: auto;
}

.mo-product-card__title {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--md);
	color: var(--wp--preset--color--text-primary);
}

/* ---------- Price display ---------- */
.mo-price {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: var(--wp--preset--spacing--xs);
}

/* The price notes are sentences, not badges: they get their own line rather
   than sharing the baseline row with the amount. Without this they only
   behaved on the product page, whose stylesheet is not loaded on the home
   page, and the home card laid the two notes out as columns beside $200.00. */
.mo-price__note {
	flex-basis: 100%;
	margin: 0;
	font-size: var(--wp--preset--font-size--xs);
	line-height: 1.45;
	color: var(--wp--preset--color--text-muted);
}

/* wpautop leaves an empty paragraph behind when it wraps shortcode output;
   as a flex item it would add a gap for nothing. */
.mo-price > p:empty {
	display: none;
}

.mo-price__current {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--lg);
	font-weight: 700;
	color: var(--wp--preset--color--text-primary);
}

.mo-price__compare-at {
	font-size: var(--wp--preset--font-size--sm);
	color: var(--wp--preset--color--text-muted);
	text-decoration: line-through;
}

.mo-price__discount {
	display: inline-flex;
	align-items: center;
	padding: var(--wp--preset--spacing--2-xs) var(--wp--preset--spacing--xs);
	border-radius: var(--wp--custom--radius--sm);
	background: var(--wp--preset--color--success-surface);
	color: var(--wp--preset--color--success-text);
	font-size: var(--wp--preset--font-size--sm);
	font-weight: 700;
}

/* ---------- Trust / badge strip ---------- */
.mo-trust-strip {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--wp--preset--spacing--md);
	padding: var(--wp--preset--spacing--lg) var(--wp--preset--spacing--md);
	background: var(--wp--preset--color--surface-secondary);
}

.mo-trust-strip__item {
	display: flex;
	align-items: center;
	gap: var(--wp--preset--spacing--xs);
	color: var(--wp--preset--color--text-muted);
}

@media (min-width: 768px) {
	.mo-trust-strip {
		grid-template-columns: repeat(2, 1fr);
	}
}
@media (min-width: 1024px) {
	.mo-trust-strip {
		grid-template-columns: repeat(4, 1fr);
	}
}

/* ---------- FAQ accordion (native details/summary — keyboard-operable with no JS) ---------- */
#mo-main:has(.mo-faq) {
	box-sizing: border-box;
	width: 100%;
	max-width: 760px;
	margin-inline: auto;
	padding: var(--wp--preset--spacing--xl) var(--wp--preset--spacing--md);
}

.mo-faq {
	border-top: 1px solid var(--wp--custom--border-subtle);
}

.mo-faq__item {
	border-bottom: 1px solid var(--wp--custom--border-subtle);
}

.mo-faq__item summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: var(--wp--custom--touch-target);
	padding: var(--wp--preset--spacing--sm) 0;
	font-size: var(--wp--preset--font-size--base);
	font-weight: 600;
	color: var(--wp--preset--color--text-primary);
	cursor: pointer;
	list-style: none;
}
.mo-faq__item summary::-webkit-details-marker {
	display: none;
}
.mo-faq__item summary::after {
	content: "+";
	font-size: var(--wp--preset--font-size--md);
	color: var(--wp--preset--color--accent-cobalt-light);
}
.mo-faq__item[open] summary::after {
	content: "\2212";
}

.mo-faq__answer {
	padding: 0 0 var(--wp--preset--spacing--sm);
	color: var(--wp--preset--color--text-muted);
}

/* ---------- Form fields ---------- */
.mo-field {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--2-xs);
	margin-bottom: var(--wp--preset--spacing--md);
}

.mo-field__label {
	font-size: var(--wp--preset--font-size--sm);
	font-weight: 600;
	color: var(--wp--preset--color--text-primary);
}

.mo-field__input {
	min-height: var(--wp--custom--touch-target);
	padding: var(--wp--preset--spacing--xs) var(--wp--preset--spacing--sm);
	border: 1px solid var(--wp--custom--border-control);
	border-radius: var(--wp--custom--radius--sm);
	font-size: var(--wp--preset--font-size--base);
	font-family: inherit;
	color: var(--wp--preset--color--text-primary);
	background: var(--wp--preset--color--surface-elevated);
}

.mo-field__hint {
	font-size: var(--wp--preset--font-size--sm);
	color: var(--wp--preset--color--text-muted);
}

.mo-field--error .mo-field__input {
	border-color: var(--wp--preset--color--error);
}

.mo-field__error {
	display: flex;
	align-items: center;
	gap: var(--wp--preset--spacing--2-xs);
	font-size: var(--wp--preset--font-size--sm);
	font-weight: 600;
	color: var(--wp--preset--color--error-text);
}
.mo-field__error::before {
	content: "!";
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--wp--preset--spacing--md);
	height: var(--wp--preset--spacing--md);
	border-radius: var(--wp--custom--radius--full);
	background: var(--wp--preset--color--error-surface);
	color: var(--wp--preset--color--error-text);
}

/* ---------- Consent banner ---------- */
/* Shared-owner fix (store request: "mobile cookie banner takes ~40% of the
 * first screen"): below 768px this used to be a full-width bar pinned to the
 * TOP with the page padded down by its height (MO-155): ~218px of banner plus
 * the header before any content. It is now a compact bottom sheet (~130px at
 * 390px: title visually hidden, 13px copy, two equal buttons). MO-155's
 * objections to a bottom overlay are handled directly: the html element is
 * padded at the BOTTOM by the sheet's measured height so the page end (cart
 * and checkout buttons, last cards) is always reachable, and the fixed
 * sticky add-to-cart bar sits on top of the sheet instead of under it.
 * Store CSS may restyle it (colours, radius, spacing); keep it at the
 * bottom so the header offset logic stays out of the picture. */
.mo-consent-banner {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 100;
	padding: var(--wp--preset--spacing--sm) var(--wp--preset--spacing--md);
	padding-bottom: calc(var(--wp--preset--spacing--sm) + env(safe-area-inset-bottom, 0px));
	background: var(--wp--preset--color--surface-secondary);
	border-top: 1px solid var(--wp--custom--border-subtle);
	box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.14);
}

/* MO-148 round 2 item 4: html, not body — the reservation is set
 * synchronously in <head> (consent-buffer.js) before <body> exists, so it
 * has to target an element that is already in the DOM at that point. */
html.mo-consent-open {
	padding-bottom: var(--mo-consent-height, 0px);
}

@media (max-width: 767.98px) {
	/* Keep the dialog's accessible name (aria-labelledby) but spend no
	   height on it: the copy itself opens with "We use ... cookies". */
	.mo-consent-banner .mo-consent-banner__title {
		position: absolute;
		width: 1px;
		height: 1px;
		margin: -1px;
		padding: 0;
		overflow: hidden;
		clip: rect(0 0 0 0);
		white-space: nowrap;
		border: 0;
	}
	.mo-consent-banner .mo-consent-banner__text {
		font-size: 13px;
		line-height: 1.4;
		margin-bottom: var(--wp--preset--spacing--xs);
	}
	.mo-consent-banner .mo-consent-banner__actions {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: var(--wp--preset--spacing--xs);
	}
	.mo-consent-banner .mo-consent-banner__actions .mo-btn {
		width: 100%;
		min-height: 44px;
	}
	/* The PDP's fixed add-to-cart bar rides above the sheet, not under it. */
	html.mo-consent-open .mo-sticky-cta {
		bottom: var(--mo-consent-height, 0px);
	}
}

/* Narrower corner placement on wider screens — a near-full-width bottom bar
 * is the layout most likely to sit on top of a card or CTA that also lives
 * near the bottom of the viewport. Actual overlap is additionally prevented
 * by the body bottom-padding reserved in consent-banner.js while it is shown. */
@media (min-width: 768px) {
	.mo-consent-banner {
		left: auto;
		right: var(--wp--preset--spacing--lg);
		bottom: var(--wp--preset--spacing--lg);
		max-width: 380px;
		margin: 0;
		padding: var(--wp--preset--spacing--md);
		border: 1px solid var(--wp--custom--border-subtle);
		border-radius: var(--wp--custom--radius--lg);
		box-shadow: var(--wp--preset--shadow--md);
	}

	html.mo-consent-open {
		padding-bottom: calc(var(--mo-consent-height, 0px) + var(--wp--preset--spacing--lg));
	}
}

.mo-consent-banner__title {
	font-size: var(--wp--preset--font-size--base);
	font-weight: 700;
	color: var(--wp--preset--color--text-primary);
	margin: 0 0 var(--wp--preset--spacing--2-xs);
}

.mo-consent-banner__text {
	font-size: var(--wp--preset--font-size--sm);
	color: var(--wp--preset--color--text-muted);
	margin: 0 0 var(--wp--preset--spacing--sm);
}

.mo-consent-banner__actions {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: var(--wp--preset--spacing--xs);
}

/* ---------- Policy pages (MO-146) ---------- */
#mo-main:has(.mo-policy) > .wp-block-post-title {
	box-sizing: border-box;
	width: 100%;
	max-width: 760px;
	margin: 0 auto;
	padding: var(--wp--preset--spacing--xl) var(--wp--preset--spacing--md) 0;
}

.mo-policy {
	max-width: 760px;
	margin: 0 auto;
	padding: var(--wp--preset--spacing--xl) var(--wp--preset--spacing--md);
}

.mo-policy h2 {
	margin-top: var(--wp--preset--spacing--2-xl);
	font-size: var(--wp--preset--font-size--lg);
}

.mo-policy h3 {
	margin-top: var(--wp--preset--spacing--lg);
	font-size: var(--wp--preset--font-size--md);
}

.mo-policy p,
.mo-policy li {
	color: var(--wp--preset--color--text-primary);
	line-height: 1.65;
}

.mo-policy .mo-policy__updated {
	color: var(--wp--preset--color--text-muted);
	font-size: var(--wp--preset--font-size--sm);
	margin-top: calc(-1 * var(--wp--preset--spacing--sm));
}

/* Fact grid — used on the shipping page for delivery-window/on-time stats. */
.mo-fact-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--wp--preset--spacing--md);
	margin: var(--wp--preset--spacing--lg) 0;
}

@media (min-width: 768px) {
	.mo-fact-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

.mo-fact-card {
	padding: var(--wp--preset--spacing--md);
	border: 1px solid var(--wp--custom--border-subtle);
	border-radius: var(--wp--custom--radius--lg);
	background: var(--wp--preset--color--surface-secondary);
}

.mo-fact-card__value {
	display: block;
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--lg);
	font-weight: 700;
	color: var(--wp--preset--color--text-primary);
}

.mo-fact-card__label {
	display: block;
	font-size: var(--wp--preset--font-size--sm);
	color: var(--wp--preset--color--text-muted);
}

/* Provisional/pending-decision marker — must be visible on the page itself,
   never a hidden code comment (ticket DoD item 3). Amber is the caution
   colour and is used for nothing else in this theme. */
.mo-provisional {
	display: inline-flex;
	align-items: center;
	gap: var(--wp--preset--spacing--2-xs);
	padding: var(--wp--preset--spacing--2-xs) var(--wp--preset--spacing--xs);
	margin-bottom: var(--wp--preset--spacing--xs);
	border-radius: var(--wp--custom--radius--sm);
	background: var(--wp--preset--color--caution-surface);
	color: var(--wp--preset--color--caution-amber);
	font-size: var(--wp--preset--font-size--sm);
	font-weight: 700;
}

.mo-unknown {
	background: var(--wp--preset--color--error-surface);
	color: var(--wp--preset--color--error-text);
}

/* Shop-archive product image comes from WooCommerce's own core block
 * (this theme has no archive-product.html override), so its placeholder
 * media can't be swapped in markup — flag it with the same provisional
 * styling via an overlay badge instead. */
.wc-block-components-product-image:has(img.woocommerce-placeholder) {
	position: relative;
}
.wc-block-components-product-image:has(img.woocommerce-placeholder)::after {
	content: 'Placeholder image — licensed product photo pending';
	position: absolute;
	left: var(--wp--preset--spacing--2-xs);
	bottom: var(--wp--preset--spacing--2-xs);
	right: var(--wp--preset--spacing--2-xs);
	padding: var(--wp--preset--spacing--2-xs) var(--wp--preset--spacing--xs);
	border-radius: var(--wp--custom--radius--sm);
	background: var(--wp--preset--color--caution-surface);
	color: var(--wp--preset--color--caution-amber);
	font-size: var(--wp--preset--font-size--sm);
	font-weight: 700;
	text-align: center;
}

/* WooCommerce ships a near-white placeholder image, which on the cart's
 * cross-sell block punched a bright square into the dark page. The file is
 * greyscale line art, so inverting it reads correctly on a dark surface and
 * keeps it obviously a placeholder rather than dressing it up as a photo.
 * Applies wherever WooCommerce renders its own markup (cart, archive). */
img.woocommerce-placeholder {
	filter: invert(1);
	opacity: 0.85;
}

/* Alerts — contact form success/error states. */
.mo-alert {
	padding: var(--wp--preset--spacing--sm) var(--wp--preset--spacing--md);
	border-radius: var(--wp--custom--radius--md);
	margin-bottom: var(--wp--preset--spacing--md);
	font-weight: 600;
}
.mo-alert--success {
	background: var(--wp--preset--color--success-surface);
	color: var(--wp--preset--color--success-text);
}
.mo-alert--error {
	background: var(--wp--preset--color--error-surface);
	color: var(--wp--preset--color--error-text);
}

.mo-field__textarea {
	min-height: calc(var(--wp--custom--touch-target) * 3);
	resize: vertical;
}

/* Order tracking block (confirmation page / track-order page). */
.mo-order-tracking {
	margin-top: var(--wp--preset--spacing--lg);
	padding: var(--wp--preset--spacing--md);
	border: 1px solid var(--wp--custom--border-subtle);
	border-radius: var(--wp--custom--radius--lg);
}
.mo-order-tracking__pending {
	color: var(--wp--preset--color--text-muted);
}
/* MO-466 D11: help line under each Track Order field. */
.mo-track-help {
	display: block;
	margin-top: 4px;
	font-size: var(--wp--preset--font-size--sm);
	color: var(--wp--preset--color--text-muted);
}

.mo-shipping-blocked {
	padding: var(--wp--preset--spacing--sm) var(--wp--preset--spacing--md);
	border-radius: var(--wp--custom--radius--md);
	background: var(--wp--preset--color--caution-surface);
	color: var(--wp--preset--color--caution-amber);
}

/* ---------- Front page (fable/design) ----------
   Hero: value proposition left, product composition right, the night-road
   atmosphere render as a heavily scrimmed backdrop. Every colour is a token;
   the two image layers are the theme's existing concept renders. */

#mo-main {
	margin-block-start: 0;
}

.mo-home-hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	padding: var(--wp--preset--spacing--xl) var(--wp--preset--spacing--md) var(--wp--preset--spacing--2-xl);
	background: var(--wp--preset--color--surface-sunken);
	border-bottom: 1px solid var(--wp--custom--border-subtle);
}

.mo-home-hero__backdrop {
	position: absolute;
	inset: 0;
	z-index: -1;
	overflow: hidden;
}
.mo-home-hero__backdrop img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 40%;
	opacity: 0.28;
	filter: saturate(0.9);
}
.mo-home-hero__backdrop::after {
	content: "";
	position: absolute;
	inset: 0;
	background:
		var(--wp--custom--hero-glow),
		linear-gradient(180deg, var(--wp--custom--overlay-scrim) 0%, var(--wp--custom--hero-scrim-mid) 50%, var(--wp--preset--color--surface-sunken) 100%);
}

.mo-home-hero__inner {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--wp--preset--spacing--xl);
	max-width: var(--wp--style--global--content-size);
	margin: 0 auto;
}

.mo-home-hero__copy {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--wp--preset--spacing--md);
}

.mo-home-hero__eyebrow {
	margin: 0;
	font-size: var(--wp--preset--font-size--xs);
	font-weight: 700;
	letter-spacing: var(--wp--custom--letter-spacing-wide);
	text-transform: uppercase;
	color: var(--wp--preset--color--accent-cobalt-light);
}

.mo-home-hero__title {
	margin: 0;
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--display-xl);
	font-weight: 700;
	line-height: 1.02;
	letter-spacing: var(--wp--custom--letter-spacing-tight);
	color: var(--wp--preset--color--text-primary);
	text-wrap: balance;
}
.mo-home-hero__title em {
	font-style: normal;
	color: var(--wp--preset--color--accent-cobalt-light);
}

.mo-home-hero__subtitle {
	margin: 0;
	max-width: 46ch;
	font-size: var(--wp--preset--font-size--md);
	line-height: 1.5;
	color: var(--wp--preset--color--text-secondary);
}

.mo-home-hero__actions {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--sm);
	width: 100%;
	margin-top: var(--wp--preset--spacing--xs);
}

.mo-home-hero__facts {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--xs) var(--wp--preset--spacing--lg);
	margin: var(--wp--preset--spacing--xs) 0 0;
	padding: 0;
	list-style: none;
	font-size: var(--wp--preset--font-size--sm);
	color: var(--wp--preset--color--text-muted);
}
.mo-home-hero__facts li {
	display: inline-flex;
	align-items: center;
	gap: var(--wp--preset--spacing--xs);
}
.mo-home-hero__facts li::before {
	content: "";
	width: 6px;
	height: 6px;
	border-radius: var(--wp--custom--radius--full);
	background: var(--wp--preset--color--accent-cobalt);
}

/* Product composition: the render sits in a rounded, glowing card that
   floats over the atmosphere; a compact price tag anchors the composition
   and is itself the route to the product.
   Round 2: on phones the copy and both CTAs come FIRST and the render is a
   short (≤45vh), uncropped, letterboxed frame below them, with the price
   tag in normal flow — the headline and CTAs sit inside the first screen. */
.mo-home-hero__media {
	position: relative;
	order: 1;
	max-width: 560px;
	margin-inline: auto;
	width: 100%;
	margin-top: var(--wp--preset--spacing--sm);
}

.mo-home-hero__figure {
	position: relative;
	margin: 0;
	overflow: hidden;
	border-radius: var(--wp--custom--radius--lg);
	background: var(--wp--preset--color--surface-sunken);
	box-shadow: var(--wp--preset--shadow--glow);
}
.mo-home-hero__figure picture,
.mo-home-hero__figure img {
	display: block;
	width: 100%;
}
.mo-home-hero__figure img {
	/* height:auto is load-bearing: the HTML height="703" attribute is a
	   presentational hint that otherwise fixes the box height and defeats
	   every aspect-ratio rule below. */
	height: auto;
	max-height: 45vh;
	object-fit: contain;
	object-position: center;
}

/* Phone: the provenance note is a compact corner chip. */
.mo-home-hero__figure .mo-concept-tag {
	top: var(--wp--preset--spacing--xs);
	left: var(--wp--preset--spacing--xs);
	bottom: auto;
	max-width: 60%;
	padding: var(--wp--preset--spacing--2-xs) var(--wp--preset--spacing--xs);
	font-size: var(--wp--preset--font-size--xs);
	line-height: 1.3;
}

.mo-home-hero__tag {
	position: static;
	margin-top: var(--wp--preset--spacing--sm);
	display: grid;
	grid-template-columns: 1fr auto;
	grid-template-areas: "name price" "cta cta";
	gap: var(--wp--preset--spacing--2-xs) var(--wp--preset--spacing--md);
	align-items: center;
	padding: var(--wp--preset--spacing--sm) var(--wp--preset--spacing--md);
	border: 1px solid var(--wp--custom--border-accent);
	border-radius: var(--wp--custom--radius--md);
	background: var(--wp--preset--color--surface-elevated);
	box-shadow: var(--wp--preset--shadow--lg);
	color: var(--wp--preset--color--text-primary);
	text-decoration: none;
	transition: transform var(--wp--custom--motion-duration) var(--wp--custom--motion-ease);
}
.mo-home-hero__tag:hover {
	transform: translateY(-2px);
}
.mo-home-hero__tag-name {
	grid-area: name;
	font-weight: 600;
	font-size: var(--wp--preset--font-size--sm);
	line-height: 1.3;
}
.mo-home-hero__tag-price {
	grid-area: price;
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--md);
	font-weight: 700;
}
.mo-home-hero__tag-cta {
	grid-area: cta;
	font-size: var(--wp--preset--font-size--xs);
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--wp--preset--color--accent-cobalt-light);
}

@media (min-width: 768px) {
	.mo-home-hero {
		padding: var(--wp--preset--spacing--2-xl) var(--wp--preset--spacing--2-xl);
	}
	.mo-home-hero__inner {
		grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
		align-items: center;
		gap: var(--wp--preset--spacing--2-xl);
	}
	.mo-home-hero__media {
		order: 0;
		max-width: none;
		margin-top: 0;
		padding-bottom: var(--wp--preset--spacing--lg);
	}
	/* Tablet columns are narrow: show the whole 16:9 render, no crop. */
	.mo-home-hero__figure img {
		max-height: none;
		aspect-ratio: 16 / 9;
		object-fit: contain;
		object-position: center;
	}
	.mo-home-hero__actions {
		flex-direction: row;
		width: auto;
	}
	.mo-home-hero__actions .mo-btn {
		white-space: nowrap;
	}
	/* Tablet: the frame is small, so nothing overlays it — the provenance
	   note becomes a caption and the price tag sits below in normal flow. */
	.mo-home-hero__figure .mo-concept-tag {
		position: static;
		max-width: none;
		margin: 0;
		padding: var(--wp--preset--spacing--xs) var(--wp--preset--spacing--xs) 0;
		background: transparent;
		color: var(--wp--preset--color--text-muted);
		font-style: italic;
	}
	.mo-home-hero__figure {
		padding-bottom: var(--wp--preset--spacing--xs);
	}
	.mo-home-hero__tag {
		grid-template-columns: 1fr auto;
		grid-template-areas: "name price" "cta cta";
	}
}

@media (min-width: 1024px) {
	.mo-home-hero__figure {
		padding-bottom: 0;
	}
	.mo-home-hero__tag {
		position: absolute;
		margin-top: 0;
		left: auto;
		right: calc(-1 * var(--wp--preset--spacing--md));
		bottom: var(--wp--preset--spacing--lg);
		grid-template-columns: auto auto;
		min-width: 260px;
	}
	/* The price tag owns the bottom edge, so the provenance label sits in
	   the top-left corner of the frame (still rendered, always visible). */
	.mo-home-hero__figure .mo-concept-tag {
		position: absolute;
		top: var(--wp--preset--spacing--md);
		left: var(--wp--preset--spacing--md);
		max-width: 48%;
		margin: 0;
		padding: var(--wp--preset--spacing--2-xs) var(--wp--preset--spacing--xs);
		background: var(--wp--custom--concept-tag-surface);
		color: var(--wp--preset--color--text-primary);
		font-style: normal;
	}
}

@media (min-width: 1024px) {
	.mo-home-hero {
		padding: var(--wp--preset--spacing--3-xl) var(--wp--preset--spacing--3-xl) var(--wp--preset--spacing--4-xl);
		min-height: calc(100vh - 88px);
		display: flex;
		align-items: center;
	}
	.mo-home-hero__inner {
		width: 100%;
		gap: var(--wp--preset--spacing--3-xl);
	}
	.mo-home-hero__copy {
		gap: var(--wp--preset--spacing--lg);
	}
	.mo-home-hero__title {
		max-width: 12ch;
	}
	.mo-home-hero__figure {
		transform: rotate(-1.5deg);
	}
	/* Desktop render is 16:9 with the camera system on the right. A
	   slightly taller frame cover-crops the EMPTY left side only: anchoring
	   at 100% keeps every camera whole (verified at 1024–1440). */
	.mo-home-hero__figure img {
		aspect-ratio: 16 / 10;
		object-fit: cover;
		object-position: 100% 50%;
	}
}

/* Entrance: copy rises, the composition fades in a beat later. Only opacity
   and transform, gated on html.mo-js so a no-script render is complete, and
   fully disabled under prefers-reduced-motion below. */
@media (min-width: 768px) {
	.mo-js .mo-home-hero__copy > * {
		animation: mo-rise var(--wp--custom--motion-duration-slow) var(--wp--custom--motion-ease) both;
	}
	.mo-js .mo-home-hero__copy > :nth-child(2) { animation-delay: 60ms; }
	.mo-js .mo-home-hero__copy > :nth-child(3) { animation-delay: 120ms; }
	.mo-js .mo-home-hero__copy > :nth-child(4) { animation-delay: 180ms; }
	.mo-js .mo-home-hero__copy > :nth-child(5) { animation-delay: 240ms; }
	.mo-js .mo-home-hero__media {
		animation: mo-fade var(--wp--custom--motion-duration-slow) var(--wp--custom--motion-ease) 160ms both;
	}
}
@keyframes mo-rise {
	from { opacity: 0; transform: translateY(14px); }
	to   { opacity: 1; transform: translateY(0); }
}
@keyframes mo-fade {
	from { opacity: 0; transform: translateY(8px) scale(0.985); }
	to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------- Trust tiles ---------- */
.mo-trust {
	padding: var(--wp--preset--spacing--xl) var(--wp--preset--spacing--md);
	background: var(--wp--preset--color--surface-primary);
	border-bottom: 1px solid var(--wp--custom--border-subtle);
}

.mo-trust__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--wp--preset--spacing--sm);
	max-width: var(--wp--style--global--content-size);
	margin: 0 auto;
	padding: 0;
	list-style: none;
}

.mo-trust__tile {
	display: flex;
	gap: var(--wp--preset--spacing--sm);
	align-items: flex-start;
	padding: var(--wp--preset--spacing--md);
	border: 1px solid var(--wp--custom--border-subtle);
	border-radius: var(--wp--custom--radius--md);
	background: var(--wp--custom--card-gradient);
}

.mo-trust__icon {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--wp--custom--touch-target);
	height: var(--wp--custom--touch-target);
	border-radius: var(--wp--custom--radius--md);
	background: var(--wp--custom--accent-tint);
	color: var(--wp--preset--color--accent-cobalt-light);
}

.mo-trust__text {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--2-xs);
	min-width: 0;
}
.mo-trust__title {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--base);
	font-weight: 700;
	line-height: 1.25;
	color: var(--wp--preset--color--text-primary);
}
.mo-trust__detail {
	font-size: var(--wp--preset--font-size--sm);
	line-height: 1.45;
	color: var(--wp--preset--color--text-muted);
}

/* An unconfirmed fact is drawn as one: dashed, greyed icon, no tick. */
.mo-trust__tile--unconfirmed {
	border-style: dashed;
	border-color: var(--wp--custom--unconfirmed-border);
	background: var(--wp--custom--unconfirmed-surface);
}
.mo-trust__tile--unconfirmed .mo-trust__icon {
	background: transparent;
	border: 1px dashed var(--wp--custom--unconfirmed-border);
	color: var(--wp--preset--color--text-muted);
}
.mo-trust__tile--unconfirmed .mo-trust__title {
	color: var(--wp--preset--color--text-secondary);
	font-style: italic;
}

@media (min-width: 768px) {
	.mo-trust {
		padding-inline: var(--wp--preset--spacing--2-xl);
	}
	.mo-trust__grid {
		grid-template-columns: repeat(2, 1fr);
		gap: var(--wp--preset--spacing--md);
	}
}
@media (min-width: 1024px) {
	.mo-trust {
		padding-inline: var(--wp--preset--spacing--3-xl);
	}
	.mo-trust__grid {
		grid-template-columns: repeat(4, 1fr);
	}
}

/* ---------- Product spotlight ---------- */
.mo-spotlight {
	padding: var(--wp--preset--spacing--2-xl) var(--wp--preset--spacing--md);
	background: var(--wp--custom--section-glow), var(--wp--preset--color--surface-primary);
}

.mo-spotlight__inner {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--wp--preset--spacing--lg);
	max-width: var(--wp--style--global--content-size);
	margin: 0 auto;
	padding: var(--wp--preset--spacing--md);
	border: 1px solid var(--wp--custom--border-subtle);
	border-radius: var(--wp--custom--radius--xl);
	background: var(--wp--custom--card-gradient);
	box-shadow: var(--wp--preset--shadow--md);
}

.mo-spotlight__media {
	position: relative;
	overflow: hidden;
	border-radius: var(--wp--custom--radius--lg);
	background: var(--wp--preset--color--surface-sunken);
}
.mo-spotlight__img {
	display: block;
	width: 100%;
	height: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	object-position: 60% center;
}

.mo-spotlight__copy {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--md);
	padding: var(--wp--preset--spacing--xs) var(--wp--preset--spacing--xs) var(--wp--preset--spacing--sm);
}
.mo-spotlight__copy .mo-eyebrow {
	margin: 0;
}
.mo-spotlight__title {
	margin: 0;
	font-size: var(--wp--preset--font-size--display-sm);
	line-height: 1.1;
}
.mo-spotlight__promise {
	margin: 0;
	font-size: var(--wp--preset--font-size--md);
	line-height: 1.5;
	color: var(--wp--preset--color--text-secondary);
}

.mo-spotlight__benefits {
	display: grid;
	gap: var(--wp--preset--spacing--xs);
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: var(--wp--preset--font-size--sm);
	line-height: 1.45;
	color: var(--wp--preset--color--text-muted);
}
.mo-spotlight__benefits li {
	position: relative;
	padding-left: var(--wp--preset--spacing--lg);
}
.mo-spotlight__benefits li::before {
	content: "\2713";
	position: absolute;
	left: 0;
	top: 0;
	font-weight: 700;
	color: var(--wp--preset--color--accent-cobalt-light);
}

.mo-spotlight__buy {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--md);
	margin-top: var(--wp--preset--spacing--xs);
	padding-top: var(--wp--preset--spacing--md);
	border-top: 1px solid var(--wp--custom--border-subtle);
}
.mo-spotlight__buy .mo-price__current {
	font-size: var(--wp--preset--font-size--display-sm);
	line-height: 1.1;
}
.mo-spotlight__buy .mo-btn {
	align-self: stretch;
}

@media (min-width: 768px) {
	.mo-spotlight {
		padding-inline: var(--wp--preset--spacing--2-xl);
	}
	.mo-spotlight__inner {
		grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
		align-items: center;
		gap: var(--wp--preset--spacing--xl);
		padding: var(--wp--preset--spacing--lg);
	}
	.mo-spotlight__img {
		aspect-ratio: 5 / 4;
	}
	.mo-spotlight__buy .mo-btn {
		align-self: flex-start;
	}
}
@media (min-width: 1024px) {
	.mo-spotlight {
		padding: var(--wp--preset--spacing--3-xl) var(--wp--preset--spacing--3-xl);
	}
	.mo-spotlight__inner {
		gap: var(--wp--preset--spacing--2-xl);
		padding: var(--wp--preset--spacing--xl);
	}
	.mo-spotlight__copy {
		padding-inline: var(--wp--preset--spacing--md);
	}
}

/* ---------- Guides teaser + guide cards (shared with /guides/) ---------- */
.mo-home-guides {
	padding: var(--wp--preset--spacing--2-xl) var(--wp--preset--spacing--md);
	border-top: 1px solid var(--wp--custom--border-subtle);
	background: var(--wp--preset--color--surface-primary);
}
.mo-home-guides__inner {
	max-width: var(--wp--style--global--content-size);
	margin: 0 auto;
}
/* Head beside the cards from tablet up; one guide still fills its column
   instead of sitting alone in a third of the row. */
@media (min-width: 1024px) {
	.mo-home-guides__inner {
		display: grid;
		grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
		gap: var(--wp--preset--spacing--3-xl);
		align-items: start;
	}
	.mo-home-guides .mo-section-head {
		margin-bottom: 0;
	}
	.mo-home-guides .mo-guide-grid {
		grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	}
	.mo-home-guides .mo-guide-card {
		max-width: 560px;
	}
}

.mo-guide-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--wp--preset--spacing--md);
}

.mo-guide-card {
	position: relative;
	display: flex;
	flex-direction: column;
	border: 1px solid var(--wp--custom--border-subtle);
	border-radius: var(--wp--custom--radius--lg);
	background: var(--wp--custom--card-gradient);
	overflow: hidden;
	transition:
		transform var(--wp--custom--motion-duration) var(--wp--custom--motion-ease),
		border-color var(--wp--custom--motion-duration) var(--wp--custom--motion-ease),
		box-shadow var(--wp--custom--motion-duration) var(--wp--custom--motion-ease);
}
.mo-guide-card:hover {
	transform: translateY(-3px);
	border-color: var(--wp--custom--border-accent);
	box-shadow: var(--wp--preset--shadow--md);
}
/* The title link's hit area is the whole card (::after overlay); the focus
   ring is drawn on the card via :focus-within so it stays visible. */
.mo-guide-card__link {
	color: inherit;
	text-decoration: none;
}
.mo-guide-card__link::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	border-radius: inherit;
}
.mo-guide-card__link:focus-visible {
	outline: none;
}
.mo-guide-card:focus-within {
	outline: var(--wp--custom--focus-ring-width) solid var(--wp--preset--color--text-primary);
	outline-offset: var(--wp--custom--focus-ring-offset);
}
.mo-guide-card__more {
	margin: auto 0 0;
}

/* Hub guide: one wide card ahead of the grid, media beside the copy. */
.mo-guides-hub {
	margin-bottom: var(--wp--preset--spacing--xl);
}
.mo-guide-card--hub {
	border-color: var(--wp--custom--border-accent);
	box-shadow: var(--wp--preset--shadow--glow);
}
.mo-guide-card--hub .mo-guide-card__meta {
	color: var(--wp--preset--color--accent-cobalt-light);
}
.mo-guide-card--hub .mo-guide-card__title {
	font-size: var(--wp--preset--font-size--xl);
	line-height: 1.12;
}
.mo-guide-card--hub .mo-guide-card__excerpt {
	font-size: var(--wp--preset--font-size--base);
}
.mo-guide-card--hub .mo-guide-card__body {
	gap: var(--wp--preset--spacing--sm);
	padding: var(--wp--preset--spacing--lg);
}
@media (min-width: 768px) {
	.mo-guide-card--hub {
		display: grid;
		grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
		align-items: stretch;
	}
	.mo-guide-card--hub .mo-guide-card__media {
		aspect-ratio: auto;
		min-height: 260px;
	}
	.mo-guide-card--hub .mo-guide-card__body {
		padding: var(--wp--preset--spacing--xl);
		justify-content: center;
	}
}
/* 16:10 — the aspect of the cover illustrations (assets/guides/*.svg), so
   a cover is shown whole; a featured image, if one is set, is cover-cropped. */
.mo-guide-card__media {
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: var(--wp--preset--color--surface-sunken);
}
.mo-guide-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
/* No featured image yet: a quiet cobalt gradient with a road-line motif,
   drawn in CSS, so the card never shows a broken or empty box. */
.mo-guide-card__media--placeholder {
	position: relative;
	background:
		var(--wp--custom--hero-glow),
		linear-gradient(160deg, var(--wp--preset--color--surface-elevated), var(--wp--preset--color--surface-sunken));
}
.mo-guide-card__media--placeholder::after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: -10%;
	width: 2px;
	height: 120%;
	background: repeating-linear-gradient(to top, var(--wp--preset--color--accent-cobalt-light) 0 18px, transparent 18px 34px);
	opacity: 0.55;
	transform: translateX(-50%) perspective(120px) rotateX(58deg);
	transform-origin: bottom;
}
.mo-guide-card__body {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--xs);
	padding: var(--wp--preset--spacing--md) var(--wp--preset--spacing--md) var(--wp--preset--spacing--sm);
}
.mo-guide-card__meta {
	margin: 0;
	font-size: var(--wp--preset--font-size--xs);
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--wp--preset--color--text-muted);
}
.mo-guide-card__title {
	margin: 0;
	font-size: var(--wp--preset--font-size--md);
	line-height: 1.25;
	color: var(--wp--preset--color--text-primary);
}
.mo-guide-card__excerpt {
	margin: 0;
	font-size: var(--wp--preset--font-size--sm);
	line-height: 1.5;
	color: var(--wp--preset--color--text-muted);
}
.mo-guide-card .mo-link-arrow {
	min-height: 0;
}
.mo-guide-card:hover .mo-link-arrow span[aria-hidden] {
	transform: translateX(4px);
}

@media (min-width: 768px) {
	.mo-home-guides {
		padding-inline: var(--wp--preset--spacing--2-xl);
	}
	.mo-guide-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: var(--wp--preset--spacing--lg);
	}
}
@media (min-width: 1024px) {
	.mo-home-guides {
		padding: var(--wp--preset--spacing--3-xl) var(--wp--preset--spacing--3-xl);
	}
	.mo-guide-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

/* ---------- Closing band ---------- */
.mo-home-final-cta {
	position: relative;
	overflow: hidden;
	padding: var(--wp--preset--spacing--3-xl) var(--wp--preset--spacing--md);
	text-align: center;
	background: var(--wp--custom--section-glow), var(--wp--preset--color--surface-sunken);
	border-top: 1px solid var(--wp--custom--border-subtle);
}
.mo-home-final-cta__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--wp--preset--spacing--md);
	max-width: 640px;
	margin: 0 auto;
}
.mo-home-final-cta__inner .mo-eyebrow {
	margin: 0;
}
.mo-home-final-cta__title {
	margin: 0;
	font-size: var(--wp--preset--font-size--display-md);
	line-height: 1.1;
	text-wrap: balance;
}
.mo-home-final-cta__text {
	margin: 0;
	font-size: var(--wp--preset--font-size--sm);
	color: var(--wp--preset--color--text-muted);
}

/* Legacy card media rule — still used by the product-card pattern. */
.mo-product-card__media {
	position: relative;
	overflow: hidden;
	border-radius: var(--wp--custom--radius--md);
	background: var(--wp--preset--color--surface-elevated);
}
.mo-product-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	object-position: 62% center;
}

/* ---------- MO-165 §F element 1: persistent sandbox micro-bar ----------
   Replaces the four stacked notice bands of the previous design together
   with the single hero-level provisional pill (§F element 2, see
   product-page.css). One line, ~22px tall, amber-on-caution-surface, and
   deliberately NOT position:sticky: it occupies the first viewport and then
   scrolls away with the document instead of permanently eating vertical
   space on a 390x800 screen. */
.mo-sandbox-notice {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 22px;
	padding: 0 var(--wp--preset--spacing--md);
	background: var(--wp--preset--color--caution-surface);
	color: var(--wp--preset--color--caution-amber);
	text-align: center;
	font-size: var(--wp--preset--font-size--xs);
	line-height: 1.35;
	font-weight: 600;
	letter-spacing: 0.01em;
}

/* ---------- MO-165: night-drive primitives ---------- */

/* Spec chips. The label is text-muted; the emphasised token inside is
   accent-cobalt-light (5.638:1 on surface-elevated). Base cobalt here
   measured 3.373:1 and was rejected. */
.mo-chip-row {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--xs);
	margin: 0;
	padding: 0;
	list-style: none;
}

.mo-chip {
	display: inline-flex;
	align-items: center;
	gap: var(--wp--preset--spacing--2-xs);
	padding: var(--wp--preset--spacing--2-xs) var(--wp--preset--spacing--sm);
	border-radius: var(--wp--custom--radius--full);
	background: var(--wp--preset--color--surface-elevated);
	color: var(--wp--preset--color--text-muted);
	font-size: var(--wp--preset--font-size--xs);
	font-weight: 500;
	line-height: 1.5;
}

.mo-chip strong {
	color: var(--wp--preset--color--accent-cobalt-light);
	font-weight: 700;
}

/* Unconfirmed fact marker. Anything whose Mo_Store_Facts status is not
   confirmed/measured renders here, greyed and dashed — never as a claim. */
.mo-unconfirmed-chip {
	display: inline-block;
	padding: var(--wp--preset--spacing--2-xs) var(--wp--preset--spacing--sm);
	border: 1px dashed var(--wp--custom--unconfirmed-border);
	border-radius: var(--wp--custom--radius--full);
	background: var(--wp--custom--unconfirmed-surface);
	color: var(--wp--preset--color--text-muted);
	font-size: var(--wp--preset--font-size--xs);
	font-style: italic;
	font-weight: 500;
}

/* Persistent (never hover-only, never alt-only) provenance label on every
   concept render. Required by MO-164 §A: the image is not the product. */
.mo-concept-tag {
	position: absolute;
	left: var(--wp--preset--spacing--sm);
	bottom: var(--wp--preset--spacing--sm);
	max-width: 62%;
	margin: 0;
	padding: var(--wp--preset--spacing--xs) var(--wp--preset--spacing--sm);
	border-radius: var(--wp--custom--radius--sm);
	background: var(--wp--custom--concept-tag-surface);
	color: var(--wp--preset--color--text-primary);
	font-size: var(--wp--preset--font-size--xs);
	font-weight: 500;
	line-height: 1.35;
}

@media (min-width: 768px) {
	.mo-concept-tag {
		left: var(--wp--preset--spacing--lg);
		bottom: var(--wp--preset--spacing--lg);
		max-width: 60%;
		font-size: var(--wp--preset--font-size--sm);
	}
}

/* Scroll reveal — transform/opacity only, so it can never move a neighbour
   or contribute to CLS.
   The hidden start state is gated on .mo-js, which is set on <html> by the
   inline head script. If scripting is off or that script never runs, the
   selector never matches and the content is simply visible — content is
   never hidden by something that might not come back. */
.mo-js #mo-main [data-mo-block]:not([data-mo-block="hero"]):not([data-mo-block="home-hero"]),
.mo-js .mo-reveal {
	opacity: 0;
	transform: translateY(16px);
	transition:
		opacity var(--wp--custom--motion-duration) var(--wp--custom--motion-ease),
		transform var(--wp--custom--motion-duration) var(--wp--custom--motion-ease);
}

.mo-js #mo-main [data-mo-block]:not([data-mo-block="hero"]):not([data-mo-block="home-hero"]).is-in-view,
.mo-js .mo-reveal.is-in-view {
	opacity: 1;
	transform: translateY(0);
}

/* Real reduced-motion fallback: the FINAL state is rendered immediately,
   not merely a suppressed transition. */
@media (prefers-reduced-motion: reduce) {
	.mo-js #mo-main [data-mo-block],
	#mo-main [data-mo-block],
	.mo-js .mo-reveal,
	.mo-reveal {
		opacity: 1 !important;
		transform: none !important;
		transition: none !important;
	}
	.mo-btn--primary.is-confirmed .mo-btn__label {
		animation: none !important;
	}
	.mo-btn__spinner {
		animation: none !important;
	}
	.mo-sticky-cta {
		transition: none !important;
		transform: none !important;
		animation: none !important;
	}
	/* fable/design: entrance and hover motion off — final state only. */
	.mo-js .mo-home-hero__copy > *,
	.mo-js .mo-home-hero__media {
		animation: none !important;
	}
	.mo-btn,
	.mo-guide-card,
	.mo-home-hero__tag,
	.mo-link-arrow span[aria-hidden],
	.mo-header__nav a::after {
		transition: none !important;
	}
	.mo-btn:hover,
	.mo-guide-card:hover,
	.mo-home-hero__tag:hover {
		transform: none !important;
	}
}

/* ---------- MO-155: WooCommerce block-grid gutter overflow ----------
   wc-block-grid__products is a WooCommerce core list that pulls itself 8px
   outward on each side to cancel its own item gutters. Inside our constrained
   containers there is no gutter to cancel, so it ends up 16px wider than the
   viewport: /cart/ and /checkout/ measured scrollWidth 398 against
   innerWidth 390 at mobile, and 828 against 820 at tablet (the empty-cart
   cross-sell grid). The commit that fixed the other overflow instances did not
   reach this one because the grid only renders when the cart is empty.
   Neutralise the negative margin and pad the items instead. */
.wc-block-grid__products {
	margin-left: 0;
	margin-right: 0;
}

/* ---------- WooCommerce block surfaces on the night palette ----------
   Cart and checkout are rendered by WooCommerce's own blocks, whose default
   styles assume a light page. They inherit the body colour but paint their
   own panels, inputs and rules, so those are re-pointed at the night tokens
   here rather than left as white-on-white. */
.wc-block-components-panel,
.wc-block-components-totals-wrapper,
.wc-block-cart__sidebar,
.wc-block-checkout__sidebar,
.wp-block-woocommerce-checkout-order-summary-block {
	background: var(--wp--preset--color--surface-secondary);
	color: var(--wp--preset--color--text-primary);
	border-color: var(--wp--custom--border-subtle);
}

.wc-block-components-text-input input,
.wc-block-components-textarea,
.wc-block-components-country-input select,
.wc-block-components-state-input select,
.wc-block-components-combobox-control input {
	background: var(--wp--preset--color--surface-elevated) !important;
	color: var(--wp--preset--color--text-primary) !important;
	border-color: var(--wp--custom--border-control) !important;
}

.wc-block-components-text-input label,
.wc-block-components-checkout-step__description,
.wc-block-components-totals-item__label {
	color: var(--wp--preset--color--text-muted) !important;
}

.wc-block-components-product-name,
.wc-block-components-totals-item__value,
.wc-block-components-product-price {
	color: var(--wp--preset--color--text-primary) !important;
}

.wc-block-components-sidebar-layout .wc-block-components-panel,
.wc-block-cart-items__row {
	border-bottom-color: var(--wp--custom--border-subtle);
}

/* fable/design (owner reviewer fix, Phase A item 3): hero loop-video
   figure. Sits in the same __media/__figure slot as the 'product'/'custom'
   image modes (side-by-side with the copy column, never overlaid text on
   top of it), so no separate contrast treatment is needed beyond what the
   existing hero copy column already provides. */
.mo-home-hero__figure--video {
	background: var(--wp--preset--color--surface-sunken);
}
.mo-home-hero__video {
	display: block;
	width: 100%;
	height: auto;
	max-height: 45vh;
	object-fit: cover;
	background: var(--wp--preset--color--surface-sunken);
}
@media (prefers-reduced-motion: reduce) {
	/* Belt-and-braces: hero-video.js already never attaches <source>
	   elements or calls play() when this media feature matches, so the
	   element only ever shows its poster frame -- this rule just makes
	   that explicit in CSS too. */
	.mo-home-hero__video {
		pointer-events: none;
	}
}

/* fable/design (owner reviewer fix, Phase A item 4): "mood" section --
   2-3 atmosphere stills with a short caption each, per storefront. */
.mo-mood {
	padding: 2.5rem 1.25rem;
}
.mo-mood__list {
	list-style: none;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 1.5rem;
	max-width: var(--wp--style--global--content-size, 1100px);
	margin: 0 auto;
	padding: 0;
}
.mo-mood__item {
	margin: 0;
}
.mo-mood__img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: var(--wp--custom--radius--lg, 12px);
}
.mo-mood__caption {
	margin: 0.6rem 0 0;
	font-size: var(--wp--preset--font-size--sm, 0.95rem);
	color: var(--wp--preset--color--text-muted, inherit);
}

@media (max-width: 767px) {
	.mo-home-hero__video {
		max-height: 55vh;
	}
}
