/* ==========================================================================
   Back Monday — inner pages (lore, field notes, single, generic, 404)
   Scoped under .bm-page. Tokens come from base.css.
   ========================================================================== */

.bm-page {
	position: relative;
	overflow-x: clip;
	padding-top: clamp(104px, 14vh, 140px);
	background: var(--paper);
	color: var(--ink);
}
.bm-page img { max-width: 100%; height: auto; }
.bm-page sup {
	font-family: var(--f-mono);
	font-size: .55em;
	color: var(--sun);
	margin-left: .1em;
}

/* reveal fallback (base.js adds .is-in) */
.bm-page [data-reveal] {
	opacity: 0;
	transform: translateY(28px);
	transition: opacity .9s cubic-bezier(.2, .7, .1, 1), transform .9s cubic-bezier(.2, .7, .1, 1);
}
.bm-page [data-reveal].is-in,
.reduce-motion .bm-page [data-reveal],
.no-js .bm-page [data-reveal] { opacity: 1; transform: none; }

/* ---------- prose extensions ---------- */
.bm-page .bm-prose {
	max-width: 68ch;
	font-size: clamp(1.05rem, 1rem + .3vw, 1.22rem);
	line-height: 1.65;
}
.bm-page .bm-prose > * + * { margin-top: 1.1em; }
.bm-page .bm-prose a {
	color: inherit;
	text-decoration-color: var(--sun);
	text-decoration-thickness: 2px;
	text-underline-offset: .2em;
}
.bm-page .bm-prose a:hover { color: var(--sun); }
.bm-page .bm-prose em { font-family: var(--f-serif); font-style: italic; font-size: 1.12em; }
.bm-page .bm-prose h2,
.bm-page .bm-prose h3 {
	font-family: var(--f-display);
	font-variation-settings: "wdth" 78;
	font-weight: 800;
	line-height: .95;
	letter-spacing: -.01em;
	text-transform: uppercase;
	margin-top: 1.8em;
}
.bm-page .bm-prose h2 { font-size: clamp(1.8rem, 1.2rem + 2vw, 2.8rem); }
.bm-page .bm-prose h3 { font-size: clamp(1.3rem, 1rem + 1vw, 1.8rem); }
.bm-page .bm-prose ul,
.bm-page .bm-prose ol { padding-left: 1.2em; }
.bm-page .bm-prose li + li { margin-top: .5em; }
.bm-page .bm-prose li::marker { color: var(--sun); font-family: var(--f-mono); }
.bm-page .bm-prose blockquote {
	font-family: var(--f-serif);
	font-style: italic;
	font-size: 1.6em;
	line-height: 1.2;
	border-left: 3px solid var(--sun);
	padding-left: .8em;
	margin-left: 0;
}
.bm-page .bm-prose strong { font-weight: 700; }

/* ==========================================================================
   FIELD NOTES (index)
   ========================================================================== */
.notes-head {
	position: relative;
	padding-top: clamp(24px, 6vh, 64px);
	padding-bottom: clamp(40px, 8vh, 96px);
	isolation: isolate;
}
.notes-head__ink {
	position: absolute;
	right: var(--gutter);
	top: -20px;
	width: min(36vw, 400px);
	z-index: -1;
	opacity: .8;
	pointer-events: none;
}
.notes-head__title {
	font-family: var(--f-display);
	font-weight: 800;
	font-variation-settings: "wdth" 75;
	font-size: clamp(3.2rem, 1rem + 10vw, 10rem);
	line-height: .82;
	letter-spacing: -.03em;
	text-transform: uppercase;
	margin: .2em 0 .25em;
	max-width: 10ch;
	overflow-wrap: anywhere;
}
.notes-head__dek {
	font-family: var(--f-serif);
	font-style: italic;
	font-size: clamp(1.2rem, 1rem + .7vw, 1.6rem);
	max-width: 34ch;
	line-height: 1.25;
	margin: 0;
}

.notes-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.notes-item { border-bottom: 1px solid color-mix(in srgb, var(--ink) 20%, transparent); }
.notes-item__link {
	position: relative;
	display: grid;
	grid-template-columns: 4.5rem minmax(0, 1fr) auto;
	grid-template-areas:
		"no meta arrow"
		"no title arrow"
		"no excerpt arrow";
	column-gap: clamp(12px, 3vw, 40px);
	padding: clamp(24px, 4vh, 40px) 0;
	color: inherit;
	text-decoration: none;
	isolation: isolate;
}
.notes-item__link::before {
	content: "";
	position: absolute;
	inset: 0 calc(var(--gutter) * -1);
	background: var(--ink);
	transform: scaleY(0);
	transform-origin: bottom;
	transition: transform .5s cubic-bezier(.7, 0, .2, 1);
	z-index: -1;
}
.notes-item__link:hover::before,
.notes-item__link:focus-visible::before { transform: scaleY(1); transform-origin: top; }
.notes-item__link:hover,
.notes-item__link:focus-visible { color: var(--paper); }
.notes-item__no {
	grid-area: no;
	font-family: var(--f-serif);
	font-style: italic;
	font-size: clamp(2rem, 1.4rem + 2vw, 3.2rem);
	line-height: 1;
	color: var(--sun);
}
.notes-item__meta {
	grid-area: meta;
	font-family: var(--f-mono);
	font-size: .75rem;
	letter-spacing: .12em;
	text-transform: uppercase;
	opacity: .7;
}
.notes-item__title {
	grid-area: title;
	font-family: var(--f-display);
	font-weight: 800;
	font-variation-settings: "wdth" 78;
	font-size: clamp(1.8rem, 1rem + 3.4vw, 4rem);
	line-height: .92;
	letter-spacing: -.02em;
	text-transform: uppercase;
	margin: .2em 0 .3em;
	transition: transform .5s cubic-bezier(.2, .7, .1, 1), font-variation-settings .5s;
}
.notes-item__link:hover .notes-item__title { transform: translateX(.25em); font-variation-settings: "wdth" 100; }
.notes-item__excerpt {
	grid-area: excerpt;
	font-family: var(--f-serif);
	font-style: italic;
	font-size: clamp(1.05rem, 1rem + .3vw, 1.3rem);
	line-height: 1.35;
	max-width: 52ch;
	opacity: .85;
}
.notes-item__arrow {
	grid-area: arrow;
	align-self: center;
	font-size: clamp(1.6rem, 1rem + 2vw, 2.6rem);
	transition: transform .4s cubic-bezier(.2, .7, .1, 1), color .3s;
}
.notes-item__link:hover .notes-item__arrow { transform: translateX(8px) rotate(-30deg); color: var(--sun); }

.notes-pager {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 48px 0 clamp(80px, 12vh, 140px);
	font-family: var(--f-mono);
	font-size: .85rem;
}
.notes-pager .page-numbers {
	display: inline-block;
	padding: .55em .9em;
	border: 1px solid var(--ink);
	border-radius: 999px;
	color: inherit;
	text-decoration: none;
}
.notes-pager .page-numbers.current,
.notes-pager a.page-numbers:hover { background: var(--ink); color: var(--paper); }
.notes-empty { padding: 48px 0 140px; }
.notes-empty p { font-size: clamp(1.4rem, 1rem + 1.5vw, 2.2rem); margin: 0 0 1.4rem; }

/* ==========================================================================
   SINGLE NOTE
   ========================================================================== */
.single-note__head { padding-top: clamp(16px, 4vh, 40px); padding-bottom: clamp(32px, 6vh, 64px); }
.single-note__back {
	display: inline-block;
	color: inherit;
	text-decoration: none;
	margin-bottom: 1.4rem;
}
.single-note__back:hover { color: var(--sun); }
.single-note__title {
	font-family: var(--f-display);
	font-weight: 800;
	font-variation-settings: "wdth" 75;
	font-size: clamp(2.6rem, 1rem + 7vw, 8rem);
	line-height: .86;
	letter-spacing: -.025em;
	text-transform: uppercase;
	margin: 0 0 .4em;
	max-width: 14ch;
	overflow-wrap: anywhere;
}
.single-note__meta {
	display: flex;
	flex-wrap: wrap;
	gap: .6em;
	font-family: var(--f-mono);
	font-size: .78rem;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--muted);
	border-top: 2px solid var(--ink);
	padding-top: 1rem;
	margin: 0;
}
.single-note__figure { margin: 0 auto clamp(32px, 6vh, 64px); overflow: hidden; }
.single-note__figure img { display: block; width: 100%; border-radius: 4px; }
.single-note__body { padding-bottom: clamp(48px, 8vh, 96px); }
.single-note__body .bm-prose { margin-left: clamp(0px, 12vw, 220px); }
.single-note__sig {
	margin: 3rem 0 0 clamp(0px, 12vw, 220px);
	font-family: var(--f-mono);
	font-size: .82rem;
	color: var(--muted);
}
.single-note__sig::before { content: "— "; color: var(--sun); }

.single-note__nav {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px;
	border-top: 1px solid color-mix(in srgb, var(--ink) 20%, transparent);
	padding-top: 32px;
	padding-bottom: clamp(80px, 12vh, 140px);
}
.single-note__nav a {
	display: grid;
	gap: .4rem;
	color: inherit;
	text-decoration: none;
}
.single-note__nav-col--next { text-align: right; }
.single-note__nav-title {
	font-family: var(--f-serif);
	font-style: italic;
	font-size: clamp(1.3rem, 1rem + 1vw, 2rem);
	line-height: 1.1;
	transition: color .3s;
}
.single-note__nav a:hover .single-note__nav-title { color: var(--sun); }

/* ==========================================================================
   GENERIC PAGE (Small Print, cart, checkout, account)
   ========================================================================== */
.basic-page__head { padding-top: clamp(16px, 4vh, 40px); padding-bottom: clamp(24px, 5vh, 48px); }
.basic-page__title {
	font-family: var(--f-display);
	font-weight: 800;
	font-variation-settings: "wdth" 75;
	font-size: clamp(2.6rem, 1rem + 6vw, 6.5rem);
	line-height: .86;
	letter-spacing: -.025em;
	text-transform: uppercase;
	margin: .2em 0 0;
	border-bottom: 2px solid var(--ink);
	padding-bottom: .25em;
	overflow-wrap: anywhere;
}
.basic-page__body { padding-bottom: clamp(80px, 12vh, 140px); }
.bm-basic--store .basic-page__title { font-size: clamp(2.4rem, 1rem + 4.5vw, 5rem); }
/* never squeeze Woo blocks into prose width */
.bm-page .basic-page__body .wp-block-woocommerce-cart,
.bm-page .basic-page__body .wp-block-woocommerce-checkout,
.bm-page .basic-page__body .woocommerce,
.bm-page .bm-prose [class*="wp-block-woocommerce-"] { max-width: none; }

/* ==========================================================================
   404
   ========================================================================== */
.bm-404 { min-height: 100svh; display: grid; align-items: center; }
.e404 {
	position: relative;
	padding-top: 24px;
	padding-bottom: clamp(80px, 12vh, 140px);
	isolation: isolate;
}
.e404__mark {
	position: absolute;
	right: var(--gutter);
	top: -40px;
	width: min(38vw, 440px);
	opacity: .1;
	z-index: -1;
	pointer-events: none;
}
.e404__title {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	font-family: var(--f-display);
	font-weight: 800;
	font-variation-settings: "wdth" 75;
	font-size: clamp(2.8rem, .5rem + 10.5vw, 12rem);
	line-height: .8;
	letter-spacing: -.02em;
	margin: .2em 0 .4em;
}
.e404__title span {
	display: inline-block;
	transform: scaleY(var(--s, 1));
	transform-origin: center;
	transition: transform .6s cubic-bezier(.2, .7, .1, 1);
}
.e404__title:hover span { transform: scaleY(1); }
.e404__mail {
	max-width: 52ch;
	font-family: var(--f-mono);
	font-size: .92rem;
	line-height: 1.65;
	background: var(--paper-2);
	border-left: 3px solid var(--sun);
	padding: 1.4rem 1.6rem;
}
.e404__mail p { margin: 0 0 .8em; }
.e404__sig { color: var(--muted); margin: 1.2em 0 0 !important; }
.e404__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 2rem; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 860px) {
	.single-note__body .bm-prose,
	.single-note__sig { margin-left: 0; }
}
@media (max-width: 560px) {
	.notes-item__link {
		grid-template-columns: 2.6rem minmax(0, 1fr);
		grid-template-areas:
			"no meta"
			"no title"
			"no excerpt";
	}
	.notes-item__arrow { display: none; }
	.notes-head__ink { width: 52vw; opacity: .35; }
	.single-note__nav { grid-template-columns: 1fr; }
	.single-note__nav-col--next { text-align: left; }
	.e404__title { font-size: clamp(2.4rem, 14vw, 4rem); }
}

/* motion off: parallax pieces sit still, warps stay static */
@media (prefers-reduced-motion: reduce) {
	.bm-page [data-reveal] { opacity: 1; transform: none; transition: none; }
	.notes-item__link::before,
	.notes-item__title,
	.notes-item__arrow,
	.e404__title span { transition: none; }
}
