/* =========================================================================
   Hoppy Monk Press
   =========================================================================

   Built for the Hoppy Monk identity: pure black, white type, square corners,
   hairline rules, no accent colour. Everything is monochrome by design —
   contrast and letterspacing do the work an accent colour usually does.

   BRAND TOKENS — the only block you should need to edit.
   A light-background variant is at the bottom of this file.
   ====================================================================== */

.hm-press {
	--hm-ink:      #ffffff;                    /* headlines, body copy      */
	--hm-ink-soft: rgba(255, 255, 255, 0.58);  /* dates, quieter text       */
	--hm-page:     transparent;                /* inherits Salient's black  */
	--hm-line:     rgba(255, 255, 255, 0.22);  /* hairline rules and boxes  */
	--hm-line-lit: rgba(255, 255, 255, 0.55);  /* hairlines on hover        */
	--hm-fill:     #ffffff;                    /* active filter background  */
	--hm-fill-ink: #000000;                    /* text on that fill         */

	--hm-display: inherit;
	--hm-body:    inherit;

	--hm-gap:   clamp(1.75rem, 4vw, 3.25rem);
	--hm-track: 0.18em;                        /* the wide uppercase track  */

	color: var(--hm-ink);
	background: var(--hm-page);
	font-family: var(--hm-body);
	max-width: 68rem;
	margin-inline: auto;
}

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

/* --- Full-bleed background --------------------------------------------
   Extends the section colour to the viewport edges without changing the
   layout of anything inside it.

   The box-shadow spread paints outward from the element's box; clip-path
   trims it vertically so it cannot bleed into neighbouring sections. Both
   are paint-only, so unlike the usual `margin-left: calc(50% - 50vw)`
   approach this cannot introduce a horizontal scrollbar — 100vw includes
   the scrollbar's width, which is what makes that technique overflow.

   Only needed when the theme's own row cannot be stretched full width.
   --------------------------------------------------------------------- */

.hm-press--bleed {
	--hm-bleed: #000000;
	background: var(--hm-bleed);
	box-shadow: 0 0 0 100vmax var(--hm-bleed);
	clip-path: inset(0 -100vmax);
	padding-block: clamp(2rem, 5vw, 3.5rem);
}

.hm-press--light.hm-press--bleed {
	--hm-bleed: #ffffff;
}

/* Scroll target for pagination. scroll-margin-top is honoured by
   scrollIntoView, so a sticky site header can be cleared without any
   JavaScript measurement. Set --hm-scroll-offset via the shortcode. */
.hm-press__anchor {
	display: block;
	width: 0;
	height: 0;
	overflow: hidden;
	scroll-margin-top: calc(var(--hm-scroll-offset, 0px) + 1rem);
}

/* --- Filters ---------------------------------------------------------
   Square outlined boxes, matching the site's DRINK + FOOD MENU buttons.
   -------------------------------------------------------------------- */

.hm-press__filters {
	display: flex;
	flex-wrap: wrap;
	gap: 0.625rem;
	margin: 0 0 clamp(2rem, 5vw, 3.5rem);
}

.hm-press__filter {
	font: inherit;
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: var(--hm-track);
	text-transform: uppercase;
	color: var(--hm-ink-soft);
	background: transparent;
	border: 1px solid var(--hm-line);
	border-radius: 0;
	padding: 0.85rem 1.5rem;
	cursor: pointer;
	transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.hm-press__filter:hover {
	color: var(--hm-ink);
	border-color: var(--hm-line-lit);
}

.hm-press__filter.is-active {
	color: var(--hm-fill-ink);
	background: var(--hm-fill);
	border-color: var(--hm-fill);
}

.hm-press__filter:focus-visible {
	outline: 2px solid var(--hm-ink);
	outline-offset: 3px;
}

/* --- List ------------------------------------------------------------ */

.hm-press__list {
	display: flex;
	flex-direction: column;
}

/* Focused programmatically after paging so keyboard and screen-reader users
   are moved with the visual scroll. It is not an interactive element, so it
   should not display a focus ring. */
.hm-press__list:focus {
	outline: none;
}

.hm-press__item {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	gap: var(--hm-gap);
	align-items: start;
	padding-block: clamp(2rem, 5vw, 3.25rem);
	border-top: 1px solid var(--hm-line);
}

.hm-press__item:first-child {
	border-top: 0;
	padding-top: 0;
}

.hm-press__item--nomedia {
	grid-template-columns: minmax(0, 1fr);
}

/* --- Media ------------------------------------------------------------
   Photography is the only colour on the page, so it is left untreated.
   --------------------------------------------------------------------- */

.hm-press__media {
	overflow: hidden;
	background: rgba(255, 255, 255, 0.04);
}

/* Image linked to the coverage. The anchor must fill its container, or an
   inline element leaves a clickable gap around the picture. */
.hm-press__media-link {
	display: block;
	width: 100%;
	height: 100%;
	cursor: pointer;
	text-decoration: none;
	-webkit-tap-highlight-color: transparent;
}

.hm-press__media-link img {
	transition: transform 0.5s ease, opacity 0.3s ease;
}

/* A small, restrained response so the image reads as clickable. Nothing moves
   on the page — only the image scales inside its own frame. */
.hm-press__media-link:hover img {
	transform: scale(1.03);
	opacity: 0.92;
}

.hm-press__media .hm-press__image,
.hm-press__media img {
	display: block;
	width: 100%;
	height: 100%;
	max-height: 22rem;
	object-fit: cover;
	border-radius: 0;
}

.hm-press__embed {
	position: relative;
	aspect-ratio: 16 / 9;
}

.hm-press__embed iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.hm-press__embed:has(iframe[src*="spotify"]),
.hm-press__embed:has(iframe[src*="soundcloud"]) {
	aspect-ratio: auto;
	min-height: 9.5rem;
}

/* --- Eyebrow: the publication as masthead -----------------------------
   The outlet name is the anchor of the whole item. On a press page, who
   said it carries as much weight as what they said, so the publication
   gets the typographic emphasis and the headline sits underneath it.
   --------------------------------------------------------------------- */

.hm-press__eyebrow {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.5rem 0.9rem;
	margin: 0 0 0.9rem;
	font-size: 0.6875rem;
	line-height: 1;
}

.hm-press__outlet {
	font-weight: 700;
	letter-spacing: var(--hm-track);
	text-transform: uppercase;
	color: var(--hm-ink);
}

.hm-press__rule {
	flex: 1 1 1.5rem;
	min-width: 1.5rem;
	height: 1px;
	background: var(--hm-line);
}

.hm-press__date {
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--hm-ink-soft);
	white-space: nowrap;
}

.hm-press__type {
	font-size: 0.625rem;
	font-weight: 700;
	letter-spacing: var(--hm-track);
	text-transform: uppercase;
	color: var(--hm-ink-soft);
	border: 1px solid var(--hm-line);
	padding: 0.35rem 0.6rem;
	white-space: nowrap;
}

/* --- Headline --------------------------------------------------------- */

.hm-press__headline {
	font-family: var(--hm-display);
	font-size: clamp(1.25rem, 2.4vw, 1.75rem);
	font-weight: 700;
	line-height: 1.22;
	letter-spacing: 0.01em;
	text-transform: uppercase;
	margin: 0;
	color: var(--hm-ink);
}

.hm-press__headline a {
	color: inherit;
	text-decoration: none;
	background-image: linear-gradient(currentColor, currentColor);
	background-repeat: no-repeat;
	background-position: 0 100%;
	background-size: 0% 1px;
	transition: background-size 0.3s ease;
}

.hm-press__headline a:hover,
.hm-press__headline a:focus-visible {
	background-size: 100% 1px;
}

.hm-press__headline a:focus-visible {
	outline: 2px solid var(--hm-ink);
	outline-offset: 5px;
}

.hm-press__summary {
	margin: 1rem 0 0;
	font-size: 0.9375rem;
	line-height: 1.7;
	color: var(--hm-ink-soft);
	max-width: 60ch;
}

/* --- CTA: matches the site's outlined buttons -------------------------- */

.hm-press__cta {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	margin-top: 1.5rem;
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: var(--hm-track);
	text-transform: uppercase;
	color: var(--hm-ink);
	text-decoration: none;
	border: 1px solid var(--hm-line);
	padding: 0.85rem 1.5rem;
	transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.hm-press__cta:hover,
.hm-press__cta:focus-visible {
	color: var(--hm-fill-ink);
	background: var(--hm-fill);
	border-color: var(--hm-fill);
}

.hm-press__cta:focus-visible {
	outline: 2px solid var(--hm-ink);
	outline-offset: 3px;
}

.hm-press__cta span {
	transition: transform 0.2s ease;
}

.hm-press__cta:hover span,
.hm-press__cta:focus-visible span {
	transform: translate(2px, -2px);
}


/* --- Masthead: page title and standfirst -------------------------------
   Sized and tracked to match the site's own display type. The h2 sits under
   whatever h1 the theme renders for the page.
   --------------------------------------------------------------------- */

.hm-press__masthead {
	text-align: center;
	margin: 0 0 clamp(2.5rem, 6vw, 4rem);
}

/* Doubled selector for specificity (0,2,0). Themes commonly style headings with
   compound selectors such as `.container-wrap h2`, which outrank a single class
   and can repaint the title in the theme's own colour — invisible on black.
   The subtitle is a <p> and rarely gets the same treatment, which is why a
   missing title with a visible subtitle points here first. */
.hm-press .hm-press__title,
.hm-press h2.hm-press__title {
	display: block;
	visibility: visible;
	margin: 0;
	padding: 0;
	font-family: var(--hm-display);
	font-size: clamp(1.75rem, 5vw, 3rem);
	font-weight: 300;
	line-height: 1.1;
	letter-spacing: 0.32em;
	text-transform: uppercase;
	text-indent: 0.32em; /* offsets the trailing letterspace so it reads centred */
	color: var(--hm-ink);
	background: none;
	border: 0;
	text-align: center;
	opacity: 1;
}

.hm-press .hm-press__title::before,
.hm-press .hm-press__title::after {
	content: none; /* some themes inject decorative rules into headings */
}

.hm-press .hm-press__subtitle {
	display: block;
	text-align: center;
	margin: 1.25rem 0 0;
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: var(--hm-track);
	text-transform: uppercase;
	color: var(--hm-ink-soft);
}

/* --- Pagination --------------------------------------------------------
   Square outlined boxes, same language as the filter row and the CTA.
   --------------------------------------------------------------------- */

.hm-press__pagination {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.5rem;
	margin-top: clamp(2.5rem, 6vw, 4rem);
	padding-top: clamp(2rem, 5vw, 3rem);
	border-top: 1px solid var(--hm-line);
}

.hm-press__pagination[hidden] {
	display: none;
}

.hm-press__page {
	font: inherit;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	color: var(--hm-ink-soft);
	background: transparent;
	border: 1px solid var(--hm-line);
	border-radius: 0;
	min-width: 2.75rem;
	padding: 0.7rem 0.5rem;
	cursor: pointer;
	transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.hm-press__page:hover:not(:disabled) {
	color: var(--hm-ink);
	border-color: var(--hm-line-lit);
}

.hm-press__page.is-active {
	color: var(--hm-fill-ink);
	background: var(--hm-fill);
	border-color: var(--hm-fill);
	cursor: default;
}

.hm-press__page:disabled {
	opacity: 0.3;
	cursor: default;
}

.hm-press__page:focus-visible {
	outline: 2px solid var(--hm-ink);
	outline-offset: 3px;
}

.hm-press__page--nav {
	font-size: 1rem;
	line-height: 1;
}


/* --- Return links -----------------------------------------------------
   Two different jobs, so two different treatments. The top one is quiet
   navigation and must not compete with the page title. The bottom one is a
   call to action at the point where the reader has finished the list.
   --------------------------------------------------------------------- */

.hm-press__back {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	margin: 0 0 clamp(1.5rem, 4vw, 2.25rem);
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: var(--hm-track);
	text-transform: uppercase;
	color: var(--hm-ink-soft);
	text-decoration: none;
	transition: color 0.2s ease;
}

.hm-press__back:hover,
.hm-press__back:focus-visible {
	color: var(--hm-ink);
}

.hm-press__back:focus-visible {
	outline: 2px solid var(--hm-ink);
	outline-offset: 4px;
}

.hm-press__back-arrow {
	display: inline-block;
	transition: transform 0.2s ease;
}

.hm-press__back:hover .hm-press__back-arrow,
.hm-press__back:focus-visible .hm-press__back-arrow,
.hm-press__return-link:hover .hm-press__back-arrow,
.hm-press__return-link:focus-visible .hm-press__back-arrow {
	transform: translateX(-3px);
}

.hm-press__return {
	display: flex;
	justify-content: center;
	margin-top: clamp(2.5rem, 6vw, 4rem);
	padding-top: clamp(2rem, 5vw, 3rem);
	border-top: 1px solid var(--hm-line);
}

/* When pagination is present it already draws the dividing rule. */
.hm-press__pagination:not([hidden]) + .hm-press__return {
	border-top: 0;
	padding-top: 0;
	margin-top: clamp(1.75rem, 4vw, 2.5rem);
}

.hm-press__return-link {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: var(--hm-track);
	text-transform: uppercase;
	color: var(--hm-ink);
	text-decoration: none;
	border: 1px solid var(--hm-line);
	padding: 0.95rem 1.75rem;
	transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.hm-press__return-link:hover,
.hm-press__return-link:focus-visible {
	color: var(--hm-fill-ink);
	background: var(--hm-fill);
	border-color: var(--hm-fill);
}

.hm-press__return-link:focus-visible {
	outline: 2px solid var(--hm-ink);
	outline-offset: 3px;
}

/* --- States ----------------------------------------------------------- */

.hm-press__noresults,
.hm-press--empty p {
	margin: 3rem 0 0;
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: var(--hm-track);
	text-transform: uppercase;
	color: var(--hm-ink-soft);
	text-align: center;
}

.hm-press__item[hidden] {
	display: none;
}

/* --- Responsive -------------------------------------------------------- */

@media (max-width: 720px) {
	.hm-press__item {
		grid-template-columns: minmax(0, 1fr);
		gap: 1.25rem;
	}

	.hm-press__media .hm-press__image,
	.hm-press__media img {
		max-height: 15rem;
	}

	.hm-press__rule {
		display: none;
	}

	.hm-press__cta {
		width: 100%;
		justify-content: center;
	}

	.hm-press .hm-press__title,
	.hm-press h2.hm-press__title {
		letter-spacing: 0.2em;
		text-indent: 0.2em;
	}

	.hm-press__page {
		min-width: 2.5rem;
		padding: 0.6rem 0.4rem;
	}

	.hm-press__return-link {
		width: 100%;
		justify-content: center;
	}
}

@media (prefers-reduced-motion: reduce) {
	.hm-press *,
	.hm-press *::before,
	.hm-press *::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
	}
}

/* =========================================================================
   Light-background variant
   Add class="hm-press hm-press--light" (or set these on a wrapper) if the
   press list ever needs to sit on a white section.
   ====================================================================== */

.hm-press--light {
	--hm-ink:      #000000;
	--hm-ink-soft: rgba(0, 0, 0, 0.62);
	--hm-line:     rgba(0, 0, 0, 0.20);
	--hm-line-lit: rgba(0, 0, 0, 0.55);
	--hm-fill:     #000000;
	--hm-fill-ink: #ffffff;
}
