/**
 * By Any Meanz — component layer.
 *
 * Mobile-first throughout. Every colour, size and space below resolves to a
 * theme.json token; nothing is hardcoded except geometry that isn't a design
 * decision (aspect ratios, hit-target minimums).
 */

/* -------------------------------------------------------------------------
 * Base
 * ---------------------------------------------------------------------- */

*,
*::before,
*::after {
	box-sizing: border-box;
}

body {
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

:where( a, button, input, [ tabindex ] ):focus-visible {
	outline: var( --bam-rule-medium ) solid var( --wp--preset--color--red );
	outline-offset: 3px;
}

/* A class that sets `display` outbids the UA rule for [hidden], which would
   otherwise leave "Load more" on screen after the feed is exhausted. */
[ hidden ] {
	display: none !important;
}

.bam-visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect( 0, 0, 0, 0 );
	white-space: nowrap;
	border: 0;
}

.bam-kicker {
	font-family: var( --wp--preset--font-family--stencil );
	font-size: var( --wp--preset--font-size--small );
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.24em;
}

/* Section headers get the broadsheet treatment. */
.bam-section-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: var( --wp--preset--spacing--20 );
	border-bottom: var( --bam-rule-heavy ) solid var( --wp--preset--color--ink );
	padding-bottom: var( --wp--preset--spacing--10 );
	margin-bottom: var( --wp--preset--spacing--30 );
}

.bam-section-head h2 {
	margin: 0;
	font-size: var( --wp--preset--font-size--x-large );
}

/* -------------------------------------------------------------------------
 * Masthead
 * ---------------------------------------------------------------------- */

.bam-masthead {
	background: var( --wp--preset--color--ink );
	color: var( --wp--preset--color--paper );
	border-bottom: var( --bam-rule-heavy ) solid var( --wp--preset--color--red );
}

.bam-masthead__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var( --wp--preset--spacing--20 );
	max-width: var( --wp--style--global--wide-size );
	margin-inline: auto;
	padding: var( --wp--preset--spacing--20 ) var( --wp--preset--spacing--30 );
}

.bam-masthead__mark {
	font-family: var( --wp--preset--font-family--display );
	font-size: var( --wp--preset--font-size--large );
	text-transform: uppercase;
	letter-spacing: 0.02em;
	color: var( --wp--preset--color--paper );
	text-decoration: none;
	line-height: 1;
}

.bam-masthead__mark .dot762 {
	color: var( --wp--preset--color--red );
}

.bam-masthead__nav {
	display: flex;
	gap: var( --wp--preset--spacing--20 );
	align-items: center;
}

.bam-masthead__nav a {
	color: var( --wp--preset--color--paper );
	text-decoration: none;
	font-family: var( --wp--preset--font-family--stencil );
	font-size: var( --wp--preset--font-size--small );
	text-transform: uppercase;
	letter-spacing: 0.14em;
}

.bam-masthead__nav a:hover {
	color: var( --wp--preset--color--yellow );
	text-decoration: underline;
}

/* On narrow screens the nav drops under the mark as its own scrollable row.
   Left inline, the labels wrap mid-phrase into a cramped stack. */
@media ( max-width: 34rem ) {
	.bam-masthead__inner {
		flex-wrap: wrap;
		row-gap: var( --wp--preset--spacing--10 );
		padding-bottom: var( --wp--preset--spacing--10 );
	}

	.bam-masthead__mark {
		flex: 1 1 100%;
	}

	.bam-masthead__nav {
		flex: 1 1 100%;
		gap: var( --wp--preset--spacing--20 );
		overflow-x: auto;
		scrollbar-width: none;
	}

	.bam-masthead__nav::-webkit-scrollbar {
		display: none;
	}

	.bam-masthead__nav a {
		white-space: nowrap;
		font-size: 0.75rem;
		letter-spacing: 0.1em;
	}
}

/* -------------------------------------------------------------------------
 * Hero — the battle cry plus the primary catch, both above the fold.
 * ---------------------------------------------------------------------- */

/* Block layout gives sibling blocks a top margin; the hero must butt straight
   up against the masthead rule instead of floating below a strip of paper. */
main.wp-block-group {
	margin-block-start: 0;
}

/* Text on the red ground is pure white, not newsprint. Paper white measures
   4.38:1 against this red — under the 4.5:1 needed for body copy — where plain
   white clears it at 5.11:1. The newsprint tone is kept for large display type
   and for everything sitting on black. */
.bam-hero {
	background: var( --wp--preset--color--red );
	color: var( --wp--preset--color--white );
	border-bottom: var( --bam-rule-heavy ) solid var( --wp--preset--color--ink );
	overflow: hidden;
}

.bam-hero__inner {
	max-width: var( --wp--style--global--wide-size );
	margin-inline: auto;
	padding: var( --wp--preset--spacing--40 ) var( --wp--preset--spacing--30 );
	position: relative;
	z-index: 2;
	display: grid;
	gap: var( --wp--preset--spacing--30 );
}

/* Two columns as early as the space allows. The cry and the catch belong in
   the same viewport — a visitor who has to scroll to find the form is a
   visitor deciding whether to bother. */
@media ( min-width: 54rem ) {
	.bam-hero__inner {
		grid-template-columns: 1.25fr 1fr;
		align-items: center;
		gap: var( --wp--preset--spacing--40 );
		padding-block: var( --wp--preset--spacing--50 );
	}
}

.bam-hero__cry {
	font-family: var( --wp--preset--font-family--display );
	font-size: var( --wp--preset--font-size--battle-cry );
	line-height: 0.84;
	text-transform: uppercase;
	margin: 0 0 var( --wp--preset--spacing--20 );
	color: var( --wp--preset--color--white );
	text-wrap: balance;
}

.bam-hero__cry .line-2 {
	color: var( --wp--preset--color--yellow );
}

.bam-hero__cry .line-3 {
	display: inline-block;
	background: var( --wp--preset--color--ink );
	color: var( --wp--preset--color--paper );
	padding: 0 0.16em;
}

.bam-hero__sub {
	font-size: var( --wp--preset--font-size--large );
	max-width: 32ch;
	margin: 0;
}

/* -------------------------------------------------------------------------
 * Opt-in — the point of the site. Given real estate, not a footer afterthought.
 * ---------------------------------------------------------------------- */

.bam-optin {
	background: var( --wp--preset--color--paper );
	color: var( --wp--preset--color--ink );
	border: var( --bam-rule-heavy ) solid var( --wp--preset--color--ink );
	padding: var( --wp--preset--spacing--30 );
	position: relative;
	z-index: 2;
	box-shadow: 10px 10px 0 rgba( 11, 11, 11, 0.9 );
}

.bam-optin__title {
	font-family: var( --wp--preset--font-family--display );
	font-size: var( --wp--preset--font-size--x-large );
	text-transform: uppercase;
	line-height: 0.9;
	margin: 0 0 var( --wp--preset--spacing--10 );
}

.bam-optin__blurb {
	font-size: var( --wp--preset--font-size--small );
	margin: 0 0 var( --wp--preset--spacing--20 );
}

.bam-optin__field {
	display: grid;
	gap: var( --wp--preset--spacing--10 );
	margin-bottom: var( --wp--preset--spacing--20 );
}

.bam-optin label {
	font-family: var( --wp--preset--font-family--stencil );
	font-size: var( --wp--preset--font-size--small );
	text-transform: uppercase;
	letter-spacing: 0.14em;
	font-weight: 700;
}

.bam-optin input[ type="email" ],
.bam-optin input[ type="text" ] {
	width: 100%;
	min-height: 3rem;
	padding: 0.6rem 0.75rem;
	font-family: var( --wp--preset--font-family--body );
	font-size: 1rem; /* 16px minimum, or iOS zooms the viewport on focus */
	color: var( --wp--preset--color--ink );
	background: var( --wp--preset--color--white );
	border: var( --bam-rule-medium ) solid var( --wp--preset--color--ink );
	border-radius: 0;
}

.bam-optin__consent {
	display: flex;
	gap: 0.6rem;
	align-items: flex-start;
	font-size: var( --wp--preset--font-size--small );
	margin-bottom: var( --wp--preset--spacing--20 );
}

.bam-optin__consent input {
	margin-top: 0.2rem;
	width: 1.15rem;
	height: 1.15rem;
	accent-color: var( --wp--preset--color--red );
	flex: 0 0 auto;
}

.bam-optin__consent label {
	font-family: var( --wp--preset--font-family--body );
	text-transform: none;
	letter-spacing: 0;
	font-weight: 400;
	line-height: 1.4;
}

.bam-btn {
	display: inline-block;
	width: 100%;
	min-height: 3.25rem;
	font-family: var( --wp--preset--font-family--display );
	font-size: var( --wp--preset--font-size--large );
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: var( --wp--preset--color--white );
	background: var( --wp--preset--color--red );
	border: var( --bam-rule-medium ) solid var( --wp--preset--color--ink );
	border-radius: 0;
	padding: 0.7rem 1rem;
	cursor: pointer;
}

.bam-btn:hover {
	background: var( --wp--preset--color--ink );
	color: var( --wp--preset--color--yellow );
}

.bam-btn[ disabled ] {
	opacity: 0.55;
	cursor: wait;
}

/* The honeypot. Off-screen rather than display:none — some bots skip hidden
   fields but happily fill positioned ones. aria-hidden + tabindex keep it away
   from real users and assistive tech. */
.bam-optin__pot {
	position: absolute !important;
	left: -9999px;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.bam-optin__msg {
	margin-top: var( --wp--preset--spacing--20 );
	padding: var( --wp--preset--spacing--20 );
	font-size: var( --wp--preset--font-size--small );
	border: var( --bam-rule-medium ) solid currentColor;
	display: none;
}

.bam-optin__msg.is-visible {
	display: block;
}

.bam-optin__msg.is-ok {
	color: var( --wp--preset--color--green );
	background: var( --wp--preset--color--white );
}

.bam-optin__msg.is-err {
	color: var( --wp--preset--color--red );
	background: var( --wp--preset--color--white );
}

/* -------------------------------------------------------------------------
 * Video cards + embed facades
 *
 * A real YouTube iframe is ~800KB and several hundred ms of main thread each.
 * These cards ship a thumbnail and swap in the iframe on click, so a feed of
 * twenty videos costs roughly one image each until the visitor chooses.
 * ---------------------------------------------------------------------- */

.bam-video {
	display: flex;
	flex-direction: column;
	gap: var( --wp--preset--spacing--10 );
}

.bam-facade {
	position: relative;
	display: block;
	width: 100%;
	padding: 0;
	border: var( --bam-rule-medium ) solid var( --wp--preset--color--ink );
	background: var( --wp--preset--color--ink );
	cursor: pointer;
	overflow: hidden;
	aspect-ratio: 16 / 9;
}

.bam-video--short .bam-facade {
	aspect-ratio: 9 / 16;
}

.bam-facade__thumb {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	filter: grayscale( 1 ) contrast( 1.32 ) brightness( 0.94 );
}

/* Colour returns on intent — the poster is monochrome until you engage. */
.bam-facade:hover .bam-facade__thumb,
.bam-facade:focus-visible .bam-facade__thumb {
	filter: none;
}

.bam-facade__play {
	position: absolute;
	inset: 0;
	margin: auto;
	width: 4.5rem;
	height: 4.5rem;
	background: var( --wp--preset--color--red );
	border: var( --bam-rule-medium ) solid var( --wp--preset--color--paper );
	display: grid;
	place-items: center;
	pointer-events: none;
	z-index: 2;
}

.bam-facade__play::after {
	content: "";
	width: 0;
	height: 0;
	border-left: 1.35rem solid var( --wp--preset--color--paper );
	border-top: 0.85rem solid transparent;
	border-bottom: 0.85rem solid transparent;
	margin-left: 0.3rem;
}

.bam-facade:hover .bam-facade__play {
	background: var( --wp--preset--color--yellow );
}

.bam-facade:hover .bam-facade__play::after {
	border-left-color: var( --wp--preset--color--ink );
}

.bam-facade__duration {
	position: absolute;
	right: 0;
	bottom: 0;
	z-index: 2;
	background: var( --wp--preset--color--ink );
	color: var( --wp--preset--color--paper );
	font-family: var( --wp--preset--font-family--stencil );
	font-size: 0.75rem;
	letter-spacing: 0.08em;
	padding: 0.15rem 0.4rem;
}

/* Once activated the button is replaced by the iframe wrapper. */
.bam-facade__frame {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	z-index: 3;
}

.bam-video__title {
	font-family: var( --wp--preset--font-family--display );
	font-size: var( --wp--preset--font-size--large );
	line-height: 0.95;
	text-transform: uppercase;
	margin: 0;
}

.bam-video__title a {
	color: var( --wp--preset--color--ink );
	text-decoration: none;
}

.bam-video__title a:hover {
	color: var( --wp--preset--color--red );
	text-decoration: underline;
}

.bam-video__meta {
	font-family: var( --wp--preset--font-family--stencil );
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	margin: 0;
	opacity: 0.75;
}

/* -------------------------------------------------------------------------
 * Verticals rail — horizontal, swipeable, CSS scroll-snap. No carousel
 * library: the platform already does this, and does it with momentum.
 * ---------------------------------------------------------------------- */

.bam-rail-section {
	padding: var( --wp--preset--spacing--50 ) 0;
	background: var( --wp--preset--color--paper );
}

.bam-rail-section__inner,
.bam-feed-section__inner {
	max-width: var( --wp--style--global--wide-size );
	margin-inline: auto;
	padding-inline: var( --wp--preset--spacing--30 );
}

.bam-rail {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: 68vw;
	gap: var( --wp--preset--spacing--20 );
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scroll-padding-left: var( --wp--preset--spacing--30 );
	padding-bottom: var( --wp--preset--spacing--20 );
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
	scrollbar-color: var( --wp--preset--color--red ) var( --wp--preset--color--paper );
}

.bam-rail > * {
	scroll-snap-align: start;
}

@media ( min-width: 40rem ) {
	.bam-rail {
		grid-auto-columns: 30vw;
	}
}

@media ( min-width: 64rem ) {
	.bam-rail {
		grid-auto-columns: 19rem;
	}
}

/* Rail scrollbar styled as a printed rule rather than a UI chrome element. */
.bam-rail::-webkit-scrollbar {
	height: 10px;
}

.bam-rail::-webkit-scrollbar-track {
	background: var( --wp--preset--color--paper );
	border-top: var( --bam-rule-medium ) solid var( --wp--preset--color--ink );
}

.bam-rail::-webkit-scrollbar-thumb {
	background: var( --wp--preset--color--red );
	border-top: var( --bam-rule-medium ) solid var( --wp--preset--color--ink );
}

/* -------------------------------------------------------------------------
 * Long-form feed
 * ---------------------------------------------------------------------- */

.bam-feed-section {
	padding: var( --wp--preset--spacing--50 ) 0;
	background: var( --wp--preset--color--paper );
	border-top: var( --bam-rule-heavy ) solid var( --wp--preset--color--ink );
}

.bam-feed {
	display: grid;
	gap: var( --wp--preset--spacing--40 );
	grid-template-columns: 1fr;
}

@media ( min-width: 44rem ) {
	.bam-feed {
		grid-template-columns: repeat( 2, 1fr );
	}
}

@media ( min-width: 68rem ) {
	.bam-feed {
		grid-template-columns: repeat( 3, 1fr );
	}
}

.bam-feed__more {
	margin-top: var( --wp--preset--spacing--40 );
	text-align: center;
}

.bam-feed__more .bam-btn {
	width: auto;
	min-width: 16rem;
}

.bam-feed__status {
	margin-top: var( --wp--preset--spacing--20 );
	text-align: center;
	font-family: var( --wp--preset--font-family--stencil );
	font-size: var( --wp--preset--font-size--small );
	text-transform: uppercase;
	letter-spacing: 0.16em;
}

.bam-empty {
	border: var( --bam-rule-medium ) dashed var( --wp--preset--color--ink );
	padding: var( --wp--preset--spacing--40 );
	text-align: center;
	font-family: var( --wp--preset--font-family--stencil );
	text-transform: uppercase;
	letter-spacing: 0.14em;
	font-size: var( --wp--preset--font-size--small );
}

/* -------------------------------------------------------------------------
 * Sticky catch — arms only after the hero form leaves the viewport, so it
 * never competes with the primary catch it duplicates.
 * ---------------------------------------------------------------------- */

.bam-sticky {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 40;
	background: var( --wp--preset--color--ink );
	color: var( --wp--preset--color--paper );
	border-top: var( --bam-rule-heavy ) solid var( --wp--preset--color--red );
	transform: translateY( 110% );
	visibility: hidden;
}

@media ( prefers-reduced-motion: no-preference ) {
	.bam-sticky {
		transition: transform 160ms steps( 4, end ), visibility 0s linear 160ms;
	}
}

.bam-sticky.is-armed {
	transform: translateY( 0 );
	visibility: visible;
	transition-delay: 0s;
}

.bam-sticky__inner {
	max-width: var( --wp--style--global--wide-size );
	margin-inline: auto;
	padding: var( --wp--preset--spacing--20 ) var( --wp--preset--spacing--30 );
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var( --wp--preset--spacing--20 );
}

.bam-sticky__cry {
	font-family: var( --wp--preset--font-family--display );
	font-size: var( --wp--preset--font-size--large );
	text-transform: uppercase;
	line-height: 1;
	margin: 0;
	flex: 1 1 12rem;
}

.bam-sticky form {
	display: flex;
	gap: 0.5rem;
	flex: 2 1 22rem;
}

.bam-sticky input[ type="email" ] {
	flex: 1 1 auto;
	min-height: 2.75rem;
	min-width: 0;
	padding: 0.5rem 0.7rem;
	font-size: 1rem;
	border: var( --bam-rule-medium ) solid var( --wp--preset--color--paper );
	border-radius: 0;
	background: var( --wp--preset--color--white );
	color: var( --wp--preset--color--ink );
}

.bam-sticky .bam-btn {
	width: auto;
	min-height: 2.75rem;
	flex: 0 0 auto;
	border-color: var( --wp--preset--color--paper );
	font-size: var( --wp--preset--font-size--medium );
}

.bam-sticky__close {
	background: none;
	border: 0;
	color: var( --wp--preset--color--paper );
	font-family: var( --wp--preset--font-family--stencil );
	font-size: var( --wp--preset--font-size--small );
	text-transform: uppercase;
	letter-spacing: 0.14em;
	cursor: pointer;
	padding: 0.4rem;
	flex: 0 0 auto;
}

.bam-sticky__close:hover {
	color: var( --wp--preset--color--yellow );
}

/* Keep the sticky bar from covering the last row of the feed. */
body.has-sticky-catch {
	padding-bottom: 5.5rem;
}

/* -------------------------------------------------------------------------
 * Colophon
 * ---------------------------------------------------------------------- */

.bam-colophon {
	background: var( --wp--preset--color--ink );
	color: var( --wp--preset--color--paper );
	border-top: var( --bam-rule-heavy ) solid var( --wp--preset--color--red );
	padding: var( --wp--preset--spacing--50 ) var( --wp--preset--spacing--30 );
}

.bam-colophon__inner {
	max-width: var( --wp--style--global--wide-size );
	margin-inline: auto;
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: var( --wp--preset--spacing--30 );
	align-items: flex-end;
}

.bam-colophon a {
	color: var( --wp--preset--color--yellow );
}

.bam-colophon__tagline {
	margin: 0 0 0.5rem;
	color: var( --wp--preset--color--yellow );
}

.bam-colophon__mark {
	margin: 0;
	font-family: var( --wp--preset--font-family--display );
	font-size: var( --wp--preset--font-size--x-large );
	text-transform: uppercase;
	line-height: 0.9;
}

.bam-colophon__mark .dot762 {
	color: var( --wp--preset--color--red );
}

/* The CAN-SPAM block. Deliberately quiet but not hidden — a mailing address
   that nobody can find does not do the job it exists to do. */
.bam-colophon__legal {
	max-width: var( --wp--style--global--wide-size );
	margin: var( --wp--preset--spacing--40 ) auto 0;
	padding-top: var( --wp--preset--spacing--20 );
	border-top: var( --bam-rule-medium ) solid var( --wp--preset--color--red );
	display: flex;
	flex-wrap: wrap;
	gap: var( --wp--preset--spacing--30 );
	align-items: flex-start;
	font-size: var( --wp--preset--font-size--small );
}

.bam-colophon__address {
	font-style: normal;
	margin: 0;
	line-height: 1.5;
}

.bam-colophon__unsub,
.bam-colophon__fine {
	margin: 0;
	line-height: 1.5;
}

.bam-colophon__fine {
	flex: 1 1 100%;
	opacity: 0.7;
}
