/*
Theme Name: Hitta Fackförbund Modern
Theme URI: https://www.hittafackforbund.se/
Description: A fresh, modern design for hittafackforbund.se. Child theme of Twenty Twenty-One – keeps all your content, menus and settings, and replaces the look: sticky header, front-page hero, card layouts, self-hosted fonts.
Author: Enkla Media
Template: twentytwentyone
Version: 1.0.0
Requires at least: 5.3
Requires PHP: 7.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hittafackforbund-modern
*/

/* ==========================================================================
   1. Design tokens
   ========================================================================== */

:root {
	/* Palette */
	--hfm-ink: #14213d;
	--hfm-text: #273043;
	--hfm-muted: #5d6677;
	--hfm-green: #0e5c47;
	--hfm-green-700: #0a4636;
	--hfm-green-50: #e6f1ec;
	--hfm-sun: #ffcf5c;
	--hfm-sun-soft: #fff4d6;
	--hfm-cream: #f7f5ef;
	--hfm-white: #ffffff;
	--hfm-line: #e4e1d8;

	--hfm-radius-sm: 10px;
	--hfm-radius: 18px;
	--hfm-radius-lg: 28px;
	--hfm-shadow: 0 1px 2px rgba(20, 33, 61, 0.05), 0 8px 24px -8px rgba(20, 33, 61, 0.12);
	--hfm-shadow-lift: 0 2px 4px rgba(20, 33, 61, 0.06), 0 18px 40px -12px rgba(20, 33, 61, 0.22);

	--hfm-font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
	--hfm-font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

	/* Map onto Twenty Twenty-One variables */
	--global--font-primary: var(--hfm-font-display);
	--global--font-secondary: var(--hfm-font-body);
	--global--font-size-base: 1.0625rem;
	--global--font-size-xs: 0.875rem;
	--global--font-size-sm: 1rem;
	--global--font-size-md: 1.0625rem;
	--global--font-size-lg: 1.25rem;
	--global--font-size-xl: 2rem;
	--global--font-size-xxl: 2.75rem;
	--global--font-size-xxxl: 3.5rem;
	--global--line-height-body: 1.7;
	--global--line-height-heading: 1.15;

	--heading--font-weight: 700;
	--heading--font-weight-page-title: 700;
	--heading--font-weight-strong: 700;
	--heading--letter-spacing-h1: -0.025em;
	--heading--letter-spacing-h2: -0.02em;
	--heading--letter-spacing-h3: -0.01em;

	--global--color-primary: var(--hfm-text);
	--global--color-secondary: var(--hfm-ink);
	--global--color-primary-hover: var(--hfm-green);
	--global--color-background: var(--hfm-cream);
	--global--color-border: var(--hfm-line);

	--wp--style--color--link: var(--hfm-green);

	--button--color-text: var(--hfm-white);
	--button--color-text-hover: var(--hfm-white);
	--button--color-text-active: var(--hfm-white);
	--button--color-background: var(--hfm-green);
	--button--color-background-active: var(--hfm-green-700);
	--button--border-width: 0;
	--button--border-radius: 999px;
	--button--padding-vertical: 14px;
	--button--padding-horizontal: 26px;
	--button--font-weight: 600;
	--button--font-size: 1rem;

	--form--border-color: var(--hfm-line);
	--form--border-width: 1.5px;
	--form--border-radius: var(--hfm-radius-sm);
	--form--color-text: var(--hfm-text);

	--branding--logo--max-width: 220px;
	--branding--logo--max-height: 72px;
	--branding--logo--max-width-mobile: 170px;
	--branding--logo--max-height-mobile: 52px;

	--primary-nav--font-family: var(--hfm-font-body);
	--primary-nav--font-family-mobile: var(--hfm-font-display);
	--primary-nav--font-size: 0.95rem;
	--primary-nav--font-size-mobile: 1.5rem;
	--primary-nav--font-weight: 500;
	--primary-nav--color-link: var(--hfm-text);
	--primary-nav--color-link-hover: var(--hfm-green);
	--primary-nav--padding: 10px;

	--footer--color-text: rgba(255, 255, 255, 0.78);
	--footer--color-link: #fff;
	--footer--color-link-hover: var(--hfm-sun);

	--hfm-container: min(1120px, calc(100vw - 40px));
	--hfm-measure: min(720px, calc(100vw - 40px));
}

/* Wider reading column than the parent's 610px */
@media only screen and (min-width: 482px) {
	:root {
		--responsive--aligndefault-width: var(--hfm-measure);
		--responsive--alignwide-width: var(--hfm-container);
	}
}

/* ==========================================================================
   2. Base
   ========================================================================== */

html {
	scroll-behavior: smooth;
}

body,
body.custom-background {
	background: var(--hfm-cream);
	color: var(--hfm-text);
	font-family: var(--hfm-font-body);
	font-size: var(--global--font-size-base);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
	overflow-x: clip;
}

::selection {
	background: var(--hfm-sun);
	color: var(--hfm-ink);
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
	font-family: var(--hfm-font-display);
	color: var(--hfm-ink);
	font-weight: 700;
	text-wrap: balance;
}

p,
li {
	text-wrap: pretty;
}

a {
	color: var(--hfm-green);
	text-decoration-thickness: 1.5px;
	text-underline-offset: 0.2em;
	text-decoration-color: rgba(14, 92, 71, 0.35);
	transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

a:hover {
	color: var(--hfm-green-700);
	text-decoration-color: currentColor;
	text-decoration-style: solid;
}

a:focus,
.site a:focus:not(.wp-block-button__link):not(.wp-block-file__button) {
	background: none;
	text-decoration: none;
	outline: 2.5px solid var(--hfm-green);
	outline-offset: 3px;
	border-radius: 6px;
}

.site a:focus:not(.wp-block-button__link):not(.wp-block-file__button) img {
	outline: none;
}

/* ==========================================================================
   3. Header
   ========================================================================== */

.site-header {
	position: sticky;
	top: var(--global--admin-bar--height, 0);
	z-index: 100;
	max-width: var(--hfm-container);
	align-items: center;
	flex-wrap: nowrap;
	row-gap: 0;
	column-gap: 24px;
	padding-top: 14px;
	padding-bottom: 14px;
	/* Full-bleed white bar with hairline, without wrapper markup */
	border-image: linear-gradient(to top, var(--hfm-line) 1px, #fff 1px) fill 0 / 0 / 0 100vmax;
	/* no backdrop-filter/transform here: it would trap the fixed mobile menu inside the bar */
}

@media only screen and (min-width: 482px) {
	.site-header {
		padding-top: 14px;
		padding-bottom: 14px;
	}
}

@media only screen and (min-width: 822px) {
	.site-header {
		padding-top: 16px;
		padding-bottom: 16px;
	}
}

/* Logo: no divider, sits left */
.site-header > .site-logo,
.site-logo {
	width: auto;
	margin: 0;
	padding: 0;
	border: 0;
	text-align: left;
	flex: 0 0 auto;
	line-height: 0;
}

.site-logo .custom-logo {
	margin: 0;
}

/* Title + tagline are already in the logo – keep them for SEO and screen readers only */
.site-header.has-logo .site-branding {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Without a logo, show a tidy wordmark */
.site-header:not(.has-logo) .site-branding {
	margin: 0;
	text-align: left;
}

.site-title {
	font-family: var(--hfm-font-display);
	font-weight: 800;
	letter-spacing: -0.02em;
	text-transform: none;
	margin: 0;
}

.site-title a {
	text-decoration: none;
	font-weight: 800;
}

.site-header:not(.has-logo) .site-description {
	display: none;
}

/* Desktop navigation as soft pills */
@media only screen and (min-width: 482px) {
	.primary-navigation {
		margin-left: auto;
	}

	.primary-navigation > div > .menu-wrapper {
		flex-wrap: nowrap;
		gap: 2px;
		align-items: center;
	}

	.primary-navigation > div > .menu-wrapper > li > a {
		display: block;
		padding: 9px 14px;
		border-radius: 999px;
		color: var(--hfm-text);
		font-weight: 500;
		white-space: nowrap;
		text-decoration: none;
		transition: background-color 0.15s ease, color 0.15s ease;
	}

	.primary-navigation > div > .menu-wrapper > li > a:hover {
		background: var(--hfm-green-50);
		color: var(--hfm-green-700);
		text-decoration: none;
	}

	.primary-navigation .current-menu-item > a,
	.primary-navigation .current_page_item > a,
	.primary-navigation .current-menu-ancestor > a {
		background: var(--hfm-green-50);
		color: var(--hfm-green-700);
	}

	/* Call-to-action menu item: add CSS class "menu-cta" in Appearance → Menus,
	   or it's applied automatically to the "Gå med i facket" link. */
	.primary-navigation .menu-cta > a,
	.primary-navigation .menu-wrapper > li > a[href*="ga-med-i-facket"] {
		background: var(--hfm-green);
		color: #fff;
		font-weight: 600;
		margin-left: 6px;
	}

	.primary-navigation .menu-cta > a:hover,
	.primary-navigation .menu-wrapper > li > a[href*="ga-med-i-facket"]:hover {
		background: var(--hfm-green-700);
		color: #fff;
	}

	/* Sub-menus as cards */
	.primary-navigation > div > .menu-wrapper > li > .sub-menu {
		padding: 8px;
		background: #fff;
		border: 1px solid var(--hfm-line);
		border-radius: var(--hfm-radius);
		box-shadow: var(--hfm-shadow-lift);
	}

	.primary-navigation > div > .menu-wrapper > li > .sub-menu:before,
	.primary-navigation > div > .menu-wrapper > li > .sub-menu:after {
		display: none;
	}

	.primary-navigation > div > .menu-wrapper > li > .sub-menu li {
		background: transparent;
	}

	.primary-navigation .sub-menu .menu-item > a {
		border-radius: var(--hfm-radius-sm);
		padding: 10px 14px;
	}

	.primary-navigation .sub-menu .menu-item > a:hover {
		background: var(--hfm-green-50);
		text-decoration: none;
	}
}

/* The CTA would push five links past the logo on mid-size screens: drop it to text there */
@media only screen and (min-width: 482px) and (max-width: 979.98px) {
	.site-header {
		flex-wrap: wrap;
		row-gap: 8px;
		justify-content: center;
	}

	.site-header > .site-logo {
		width: 100%;
		text-align: center;
	}

	.primary-navigation {
		margin-left: 0;
	}

	.primary-navigation > div > .menu-wrapper {
		flex-wrap: wrap;
		justify-content: center;
	}

	.primary-navigation > div > .menu-wrapper > li > a {
		padding: 7px 11px;
	}
}

/* Mobile menu button + overlay */
@media only screen and (max-width: 481.98px) {
	.site-header {
		justify-content: space-between;
	}

	body:not(.primary-navigation-open) .site-header.has-logo.has-title-and-tagline .menu-button-container {
		margin-top: 0;
	}

	.menu-button-container {
		padding: 0;
	}

	.menu-button-container #primary-mobile-menu,
	body:not(.primary-navigation-open) .site-header.has-logo.has-title-and-tagline .menu-button-container #primary-mobile-menu {
		margin: 0;
		padding: 9px 14px;
		border-radius: 999px;
		background: var(--hfm-ink);
		color: #fff;
		font-family: var(--hfm-font-body);
		font-size: 0.9rem;
		font-weight: 600;
		gap: 6px;
	}

	.menu-button-container #primary-mobile-menu .dropdown-icon {
		gap: 6px;
		align-items: center;
	}

	.menu-button-container #primary-mobile-menu .svg-icon {
		width: 18px;
		height: 18px;
	}

	.primary-navigation-open .menu-button-container {
		background: transparent;
		display: flex;
		justify-content: flex-end;
		padding: 14px 20px;
	}

	.primary-navigation > .primary-menu-container {
		background: var(--hfm-cream);
		padding-top: 84px;
		padding-left: 24px;
		padding-right: 24px;
	}

	.primary-navigation > div > .menu-wrapper > li {
		border-bottom: 1px solid var(--hfm-line);
	}

	.primary-navigation > div > .menu-wrapper > li > a {
		display: block;
		padding: 18px 0;
		font-family: var(--hfm-font-display);
		font-size: 1.5rem;
		font-weight: 700;
		letter-spacing: -0.015em;
		color: var(--hfm-ink);
		text-decoration: none;
	}

	.primary-navigation > div > .menu-wrapper > li > a::after {
		content: "→";
		float: right;
		color: var(--hfm-green);
		font-weight: 500;
	}
}

/* ==========================================================================
   4. Front-page hero
   ========================================================================== */

.hfm-hero {
	position: relative;
	isolation: isolate;
	background: var(--hfm-green);
	color: #fff;
	overflow: hidden;
}

.hfm-hero::before {
	content: "";
	position: absolute;
	z-index: -1;
	inset: 0;
	background:
		radial-gradient(60% 80% at 100% 0%, rgba(255, 207, 92, 0.28), transparent 60%),
		radial-gradient(50% 70% at 0% 100%, rgba(255, 255, 255, 0.10), transparent 60%);
}

/* Subtle dot texture */
.hfm-hero::after {
	content: "";
	position: absolute;
	z-index: -1;
	inset: 0;
	background-image: radial-gradient(rgba(255, 255, 255, 0.14) 1px, transparent 1.2px);
	background-size: 22px 22px;
	-webkit-mask-image: linear-gradient(100deg, transparent 35%, #000 85%);
	mask-image: linear-gradient(100deg, transparent 35%, #000 85%);
}

.hfm-hero__inner {
	width: var(--hfm-container);
	margin: 0 auto;
	padding: clamp(48px, 8vw, 104px) 0 clamp(48px, 7vw, 96px);
	display: grid;
	gap: clamp(32px, 5vw, 64px);
	align-items: end;
}

@media only screen and (min-width: 900px) {
	.hfm-hero__inner {
		grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
	}
}

.hfm-hero__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 22px;
	padding: 6px 14px 6px 10px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.12);
	border: 1px solid rgba(255, 255, 255, 0.18);
	font-size: 0.85rem;
	font-weight: 600;
	letter-spacing: 0.01em;
	color: #fff;
}

.hfm-hero__eyebrow::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--hfm-sun);
	box-shadow: 0 0 0 4px rgba(255, 207, 92, 0.25);
}

.hfm-hero__title {
	margin: 0;
	color: #fff;
	font-size: clamp(2.5rem, 6.4vw, 4.75rem);
	line-height: 1.02;
	font-weight: 800;
	letter-spacing: -0.035em;
	max-width: 13ch;
}

.hfm-hero__lead {
	margin: 24px 0 0;
	max-width: 46ch;
	font-size: clamp(1.05rem, 1.6vw, 1.25rem);
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.86);
}

.hfm-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 34px;
}

.hfm-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 15px 26px;
	border-radius: 999px;
	font-weight: 600;
	font-size: 1rem;
	line-height: 1.2;
	text-decoration: none;
	transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}

.hfm-btn:hover {
	text-decoration: none;
	transform: translateY(-1px);
}

.hfm-btn span {
	transition: transform 0.15s ease;
}

.hfm-btn:hover span {
	transform: translateX(3px);
}

.site .hfm-btn--primary,
.site .hfm-btn--primary:visited {
	background: var(--hfm-sun);
	color: var(--hfm-ink);
	box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.45);
}

.site .hfm-btn--primary:hover {
	background: #ffd977;
	color: var(--hfm-ink);
}

.site .hfm-btn--ghost,
.site .hfm-btn--ghost:visited {
	color: #fff;
	box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.45);
}

.site .hfm-btn--ghost:hover {
	color: #fff;
	background: rgba(255, 255, 255, 0.1);
	box-shadow: inset 0 0 0 1.5px #fff;
}

.hfm-hero__topics {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 10px;
}

.hfm-hero__topics a {
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: 16px;
	padding: 18px 20px;
	border-radius: var(--hfm-radius);
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.14);
	color: #fff;
	text-decoration: none;
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	transition: background-color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.hfm-hero__topics a:hover {
	color: var(--hfm-ink);
	background: #fff;
	border-color: #fff;
	transform: translateX(4px);
}

.hfm-hero__topic-num {
	font-family: var(--hfm-font-display);
	font-size: 0.85rem;
	font-weight: 700;
	color: var(--hfm-sun);
	font-variant-numeric: tabular-nums;
}

.hfm-hero__topics a:hover .hfm-hero__topic-num {
	color: var(--hfm-green);
}

.hfm-hero__topic-label {
	font-family: var(--hfm-font-display);
	font-size: 1.2rem;
	font-weight: 700;
	letter-spacing: -0.01em;
}

.hfm-hero__topic-arrow {
	font-size: 1.1rem;
	opacity: 0.7;
}

/* ==========================================================================
   5. Content
   ========================================================================== */

.site-main {
	padding-top: clamp(40px, 6vw, 80px);
	padding-bottom: clamp(56px, 8vw, 112px);
}

/* Page titles on inner pages get a soft banner */
.singular .entry-header {
	border-bottom: 0;
	padding-bottom: 0;
	margin-bottom: clamp(28px, 4vw, 48px);
}

.entry-title,
.page-title {
	font-size: clamp(2.25rem, 5vw, 3.5rem);
	line-height: 1.05;
	letter-spacing: -0.03em;
	font-weight: 800;
}

.singular .entry-title {
	position: relative;
	padding-bottom: 24px;
}

.singular .entry-title::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 56px;
	height: 5px;
	border-radius: 999px;
	background: var(--hfm-sun);
}

.entry-content {
	font-size: 1.0625rem;
	line-height: 1.75;
	color: var(--hfm-text);
}

.entry-content > p:first-of-type:not(:only-child) {
	font-size: 1.2rem;
	line-height: 1.65;
	color: var(--hfm-ink);
}

.entry-content h2,
.entry-content .wp-block-heading:is(h2) {
	font-size: clamp(1.75rem, 3.4vw, 2.4rem);
	letter-spacing: -0.025em;
	line-height: 1.1;
	margin-top: clamp(56px, 7vw, 88px);
}

.entry-content > h2:first-child {
	margin-top: 0;
}

.entry-content h3 {
	font-size: clamp(1.3rem, 2.2vw, 1.6rem);
	letter-spacing: -0.015em;
	margin-top: 48px;
	display: flex;
	align-items: center;
	gap: 12px;
}

.entry-content h3::before {
	content: "";
	flex: 0 0 auto;
	width: 10px;
	height: 10px;
	border-radius: 3px;
	background: var(--hfm-green);
	transform: rotate(45deg);
}

.entry-content strong {
	color: var(--hfm-ink);
	font-weight: 650;
}

/* A standalone bold paragraph becomes a highlighted callout */
.entry-content > p:has(> strong:only-child) {
	position: relative;
	padding: 22px 26px 22px 30px;
	border-radius: var(--hfm-radius);
	background: var(--hfm-sun-soft);
	font-size: 1.1rem;
	line-height: 1.6;
}

.entry-content > p:has(> strong:only-child)::before {
	content: "";
	position: absolute;
	left: 0;
	top: 18px;
	bottom: 18px;
	width: 4px;
	border-radius: 0 4px 4px 0;
	background: var(--hfm-sun);
}

.entry-content > p:has(> strong:only-child) strong {
	font-weight: 600;
}

/* Images: rounded with a soft tinted backdrop */
.entry-content .wp-block-image {
	margin-top: 40px;
	margin-bottom: 40px;
}

.entry-content .wp-block-image figure,
.entry-content figure.wp-block-image {
	margin-top: 0;
	margin-bottom: 0;
}

.entry-content .wp-block-image img {
	border-radius: var(--hfm-radius-lg);
	background: var(--hfm-green-50);
	padding: clamp(12px, 2.5vw, 28px);
	max-height: 360px;
	object-fit: contain;
	box-sizing: border-box;
}

.entry-content .wp-block-image a:hover img {
	transform: translateY(-2px);
}

.entry-content .wp-block-image img {
	transition: transform 0.2s ease;
}

.entry-content figcaption,
.wp-caption-text {
	color: var(--hfm-muted);
	font-size: 0.875rem;
	text-align: center;
}

/* Regular lists */
.entry-content ul:not(.wp-block-gallery):not(.blocks-gallery-grid) {
	padding-left: 1.25em;
}

.entry-content ul > li::marker {
	color: var(--hfm-green);
}

.entry-content li + li {
	margin-top: 0.4em;
}

/* Lists where each item starts with a bold heading → masonry card grid */
.entry-content > ul.wp-block-list:has(> li > strong:first-child) {
	counter-reset: hfm-card;
	list-style: none;
	padding: 0;
	margin-top: 36px;
	margin-bottom: 36px;
	columns: 1;
	column-gap: 20px;
	/* break out of the reading column (parent rule is very specific) */
	max-width: var(--hfm-container) !important;
}

/* …and its heading lines up with the wider card grid */
.entry-content > h2:has(+ ul.wp-block-list > li > strong:first-child) {
	max-width: var(--hfm-container) !important;
}

@media only screen and (min-width: 700px) {
	.entry-content > ul.wp-block-list:has(> li > strong:first-child) {
		columns: 2;
	}
}

@media only screen and (min-width: 1040px) {
	.entry-content > ul.wp-block-list:has(> li > strong:first-child) {
		columns: 3;
	}
}

.entry-content > ul.wp-block-list:has(> li > strong:first-child) > li {
	counter-increment: hfm-card;
	break-inside: avoid;
	display: inline-block;
	width: 100%;
	box-sizing: border-box;
	margin: 0 0 20px;
	padding: 26px 26px 28px;
	background: #fff;
	border: 1px solid var(--hfm-line);
	border-radius: var(--hfm-radius);
	box-shadow: var(--hfm-shadow);
	font-size: 0.975rem;
	line-height: 1.65;
	color: var(--hfm-muted);
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.entry-content > ul.wp-block-list:has(> li > strong:first-child) > li:hover {
	transform: translateY(-3px);
	box-shadow: var(--hfm-shadow-lift);
	border-color: transparent;
}

.entry-content > ul.wp-block-list:has(> li > strong:first-child) > li::before {
	content: counter(hfm-card, decimal-leading-zero);
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	margin-bottom: 18px;
	border-radius: 14px;
	background: var(--hfm-green-50);
	color: var(--hfm-green);
	font-family: var(--hfm-font-display);
	font-weight: 800;
	font-size: 0.95rem;
	font-variant-numeric: tabular-nums;
}

.entry-content > ul.wp-block-list:has(> li > strong:first-child) > li:nth-child(3n + 2)::before {
	background: var(--hfm-sun-soft);
	color: #8a5a00;
}

.entry-content > ul.wp-block-list:has(> li > strong:first-child) > li:nth-child(3n)::before {
	background: #e9ecf6;
	color: var(--hfm-ink);
}

.entry-content > ul.wp-block-list:has(> li > strong:first-child) > li > strong:first-child {
	display: block;
	margin-bottom: 10px;
	font-family: var(--hfm-font-display);
	font-size: 1.2rem;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: -0.01em;
	color: var(--hfm-ink);
}

.entry-content > ul.wp-block-list:has(> li > strong:first-child) > li > strong:first-child + br {
	display: none;
}

/* Block buttons */
.wp-block-button__link,
.site .button,
input[type=submit],
button[type=submit] {
	border-radius: 999px;
	font-family: var(--hfm-font-body);
	font-weight: 600;
	transition: background-color 0.15s ease, transform 0.15s ease;
}

.wp-block-button__link:hover,
.site .button:hover,
input[type=submit]:hover {
	transform: translateY(-1px);
}

.wp-block-button:not(.is-style-outline) .wp-block-button__link:not(:hover):not(:active):not(.has-background) {
	background-color: var(--hfm-green);
}

.wp-block-button:not(.is-style-outline) .wp-block-button__link:hover {
	background-color: var(--hfm-green-700);
	color: #fff;
}

/* Tables (great for comparisons) */
.entry-content .wp-block-table {
	border-radius: var(--hfm-radius);
	overflow: hidden;
	border: 1px solid var(--hfm-line);
	background: #fff;
	box-shadow: var(--hfm-shadow);
}

.entry-content .wp-block-table table {
	border: 0;
	font-size: 0.95rem;
}

.entry-content .wp-block-table th,
.entry-content .wp-block-table td {
	border: 0;
	border-bottom: 1px solid var(--hfm-line);
	padding: 14px 18px;
	text-align: left;
}

.entry-content .wp-block-table thead th {
	background: var(--hfm-ink);
	color: #fff;
	font-family: var(--hfm-font-display);
	font-weight: 700;
}

.entry-content .wp-block-table tbody tr:last-child td {
	border-bottom: 0;
}

.entry-content .wp-block-table tbody tr:nth-child(even) {
	background: var(--hfm-cream);
}

/* Quotes */
.entry-content blockquote,
.wp-block-quote {
	border-left: 4px solid var(--hfm-sun);
	padding: 4px 0 4px 24px;
	margin-left: 0;
}

.wp-block-quote p {
	font-family: var(--hfm-font-display);
	font-size: 1.35rem;
	line-height: 1.4;
	color: var(--hfm-ink);
}

/* Separators */
hr.wp-block-separator,
.wp-block-separator {
	border: 0;
	border-top: 1px solid var(--hfm-line);
	opacity: 1;
}

/* Forms */
input[type=text],
input[type=email],
input[type=url],
input[type=password],
input[type=search],
input[type=number],
input[type=tel],
textarea,
select {
	background: #fff;
	border-radius: var(--hfm-radius-sm);
	padding: 12px 14px;
}

input:focus,
textarea:focus,
select:focus {
	outline: 2.5px solid var(--hfm-green);
	outline-offset: 1px;
	border-color: var(--hfm-green);
}

/* Blog/archive cards */
.blog .site-main > article,
.archive .site-main > article,
.search .site-main > article {
	background: #fff;
	border: 1px solid var(--hfm-line);
	border-radius: var(--hfm-radius);
	padding: clamp(24px, 4vw, 40px);
	box-shadow: var(--hfm-shadow);
	margin-bottom: 24px;
}

.blog .entry-footer,
.archive .entry-footer,
.search .entry-footer,
.single .entry-footer,
.single .site-main > article > .entry-footer {
	border-bottom: 0;
	color: var(--hfm-muted);
	font-size: 0.875rem;
}

.post-navigation,
.pagination,
.navigation {
	border-top: 1px solid var(--hfm-line);
}

/* ==========================================================================
   6. Footer
   ========================================================================== */

.widget-area {
	border-top: 1px solid var(--hfm-line);
}

.site-footer,
.no-widgets .site-footer {
	max-width: var(--hfm-container);
	margin-top: 0;
	padding-top: clamp(40px, 6vw, 72px);
	padding-bottom: clamp(32px, 5vw, 56px);
	color: rgba(255, 255, 255, 0.72);
	/* Full-bleed dark band */
	border-image: linear-gradient(var(--hfm-ink), var(--hfm-ink)) fill 0 / 0 / 0 100vmax;
}

.site-footer > .site-info {
	border-top: 0;
	padding-top: 0;
	margin-top: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	font-size: 0.875rem;
	color: rgba(255, 255, 255, 0.65);
}

.site-footer > .site-info .site-name {
	margin: 0;
	text-transform: none;
	font-family: var(--hfm-font-display);
	font-weight: 800;
	font-size: 1.25rem;
	color: #fff;
}

.site-footer > .site-info .site-logo {
	margin: 0;
}

/* Make the dark logo read on the dark footer */
.site-footer .custom-logo {
	filter: brightness(0) invert(1);
	opacity: 0.92;
	max-height: 52px;
	width: auto;
}

.site-footer > .site-info .powered-by {
	margin: 0;
}

.site-footer a,
.site-footer > .site-info a {
	color: #fff;
	text-decoration-color: rgba(255, 255, 255, 0.35);
}

.site-footer a:hover,
.site-footer > .site-info a:hover {
	color: var(--hfm-sun);
	text-decoration-color: currentColor;
}

.footer-navigation {
	margin-top: 0;
	margin-bottom: 28px;
}

.footer-navigation-wrapper li a {
	color: #fff;
}

.footer-navigation-wrapper li a:hover {
	color: var(--hfm-sun);
}

@media only screen and (max-width: 481.98px) {
	.site-footer > .site-info {
		flex-direction: column;
		align-items: flex-start;
	}
}

/* ==========================================================================
   7. Motion preferences
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		transition: none !important;
		animation: none !important;
	}
}
