/* Page header, listings (post card, pagination, search) and long-form content. Loaded on pages and archives only. */

/* ---------- Page header ---------- */

.hf-page-header {
	position: relative;
	isolation: isolate;
	padding-block: clamp(40px, 6vw, 88px) clamp(40px, 5vw, 72px);
	background:
		radial-gradient(80% 140% at 100% 0%, rgba(253, 126, 20, 0.16) 0%, rgba(253, 126, 20, 0) 50%),
		linear-gradient(135deg, var(--hf-deep-500) 0%, var(--hf-blue-700) 100%);
	color: #fff;
	overflow: hidden;
}

.hf-page-header--image {
	display: flex;
	align-items: flex-end;
	min-height: clamp(320px, 42vw, 480px);
	background: var(--hf-deep-700);
}

.hf-page-header__image {
	position: absolute;
	inset: 0;
	z-index: -2;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.hf-page-header__scrim {
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(0deg, rgba(0, 33, 56, 0.88) 0%, rgba(0, 33, 56, 0.45) 50%, rgba(0, 33, 56, 0.2) 100%);
}

.hf-page-header__inner {
	position: relative;
}

.hf-page-header__crumbs {
	margin-bottom: var(--sp-6);
	color: rgba(255, 255, 255, 0.78);
}

.hf-page-header__crumbs [aria-current] {
	color: #fff;
}

.hf-page-header .hf-eyebrow {
	color: #ffc58f;
}

.hf-page-header__title {
	max-width: 22ch;
	color: #fff;
	font-size: var(--fs-h1);
	font-weight: 800;
	line-height: 1.08;
	letter-spacing: -0.03em;
}

.hf-page-header__lead {
	max-width: 60ch;
	margin-top: var(--sp-4);
	color: rgba(255, 255, 255, 0.85);
	font-size: var(--fs-lead);
}

.hf-page-header__meta {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: var(--sp-5);
	padding: 6px 14px;
	border-radius: var(--radius-pill);
	background: rgba(255, 255, 255, 0.14);
	font-size: var(--fs-xs);
	font-weight: 700;
}

.hf-page-header__meta .hf-icon {
	width: 16px;
	height: 16px;
	color: #ffc58f;
}

/* ---------- Listings ---------- */

.hf-listing__intro {
	max-width: var(--container-narrow);
	margin-bottom: var(--sp-10);
}

.hf-listing__title {
	margin-bottom: var(--sp-6);
	font-size: var(--fs-h3);
}

.hf-listing__guide {
	max-width: var(--container-narrow);
	margin: var(--section-y) auto 0;
	padding-top: var(--sp-12);
	border-top: 1px solid var(--hf-line);
}

.hf-empty {
	padding: var(--sp-10) var(--sp-6);
	border: 1px dashed var(--hf-line-strong);
	border-radius: var(--radius-m);
	color: var(--color-muted);
	text-align: center;
}

.hf-empty h2 {
	margin-bottom: var(--sp-2);
	font-size: var(--fs-h3);
}

.hf-empty .hf-button {
	margin-top: var(--sp-5);
}

.hf-inline-search {
	position: relative;
	display: flex;
	gap: 8px;
	max-width: 640px;
	margin-bottom: var(--sp-10);
}

.hf-inline-search > .hf-icon {
	position: absolute;
	top: 50%;
	left: 18px;
	width: 20px;
	height: 20px;
	color: var(--hf-muted);
	transform: translateY(-50%);
	pointer-events: none;
}

.hf-inline-search input {
	flex: 1;
	min-width: 0;
	height: 52px;
	padding: 0 16px 0 48px;
	border: 1px solid var(--hf-line-strong);
	border-radius: var(--radius-pill);
	font-size: 1rem;
	outline: none;
}

.hf-inline-search input:focus {
	border-color: var(--hf-blue-500);
	box-shadow: 0 0 0 4px rgba(var(--hf-blue-rgb), 0.16);
}

.hf-inline-search .hf-button {
	min-height: 52px;
}

/* Post card */
.hf-post-card {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	border-radius: var(--radius-m);
	background: #fff;
	box-shadow: var(--shadow-1);
	outline: 1px solid var(--hf-line);
	outline-offset: -1px;
	overflow: hidden;
	transition:
		box-shadow var(--dur-3) var(--ease-out),
		transform var(--dur-3) var(--ease-out);
}

.hf-post-card:hover {
	box-shadow: var(--shadow-3);
	transform: translateY(-4px);
}

.hf-post-card:has(a:focus-visible) {
	box-shadow: var(--ring);
}

.hf-post-card__media {
	aspect-ratio: 16 / 10;
	background: var(--hf-surface-sunk);
	overflow: hidden;
}

.hf-post-card__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 700ms var(--ease-out);
}

.hf-post-card:hover .hf-post-card__image {
	transform: scale(1.05);
}

.hf-post-card__placeholder {
	display: grid;
	place-items: center;
	height: 100%;
	color: var(--hf-blue-200);
}

.hf-post-card__placeholder .hf-icon {
	width: 48px;
	height: 48px;
}

.hf-post-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: var(--sp-3);
	padding: var(--sp-5) var(--sp-5) var(--sp-6);
}

.hf-post-card__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 12px;
	color: var(--color-muted);
	font-size: 0.75rem;
	font-weight: 600;
}

.hf-post-card__cat {
	color: var(--color-accent-text);
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.hf-post-card__title {
	font-size: 1.1875rem;
	line-height: 1.3;
}

.hf-post-card__title a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.hf-post-card__title a:focus-visible {
	outline: none;
}

.hf-post-card__excerpt {
	color: var(--color-muted);
	font-size: var(--fs-sm);
}

.hf-post-card__more {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: auto;
	padding-top: var(--sp-2);
	color: var(--color-primary-text);
	font-size: var(--fs-sm);
	font-weight: 700;
}

.hf-post-card__more .hf-icon {
	width: 18px;
	height: 18px;
	transition: transform var(--dur-2) var(--ease-out);
}

.hf-post-card:hover .hf-post-card__more .hf-icon {
	transform: translateX(4px);
}

/* Pagination */
.hf-pagination {
	margin-top: var(--sp-12);
}

.hf-pagination ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
}

.hf-pagination .page-numbers {
	display: grid;
	place-items: center;
	min-width: 44px;
	height: 44px;
	padding: 0 12px;
	border: 1px solid var(--hf-line-strong);
	border-radius: var(--radius-pill);
	color: var(--hf-ink);
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	transition:
		background-color var(--dur-2) var(--ease-out),
		border-color var(--dur-2) var(--ease-out);
}

.hf-pagination a.page-numbers:hover {
	border-color: var(--hf-blue-500);
	background: var(--hf-blue-50);
}

.hf-pagination .page-numbers.current {
	border-color: var(--hf-blue-500);
	background: var(--hf-blue-500);
	color: #fff;
}

.hf-pagination .page-numbers.dots {
	border: 0;
}

.hf-pagination .hf-icon {
	width: 18px;
	height: 18px;
}

/* ---------- Long-form content (pages, region guides, archive intros) ---------- */

.page-content {
	padding: var(--section-y) var(--gutter);
	background: #fff;
}

.page-content__container {
	max-width: var(--container-narrow);
	margin: 0 auto;
}

.hf-prose,
.page-content__body {
	color: var(--hf-text);
	font-size: 1.0625rem;
	line-height: 1.75;
}

.hf-prose > * + *,
.page-content__body > * + * {
	margin-top: 1.1em;
}

:is(.hf-prose, .page-content__body) :is(h2, h3, h4) {
	margin-top: 1.8em;
	margin-bottom: 0.5em;
	color: var(--hf-ink);
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: -0.02em;
}

:is(.hf-prose, .page-content__body) h1 {
	margin: 1.2em 0 0.5em;
	font-size: var(--fs-h2);
}

:is(.hf-prose, .page-content__body) h2 {
	font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem);
}

:is(.hf-prose, .page-content__body) h3 {
	font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
}

:is(.hf-prose, .page-content__body) h4 {
	font-size: 1.125rem;
}

:is(.hf-prose, .page-content__body) > :first-child {
	margin-top: 0;
}

:is(.hf-prose, .page-content__body) strong {
	color: var(--hf-ink);
	font-weight: 700;
}

:is(.hf-prose, .page-content__body) a {
	color: var(--color-link);
	font-weight: 600;
	text-decoration: underline;
	text-decoration-color: rgba(var(--hf-blue-rgb), 0.35);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
	transition: text-decoration-color var(--dur-2) var(--ease-out);
}

:is(.hf-prose, .page-content__body) a:hover {
	text-decoration-color: currentColor;
}

:is(.hf-prose, .page-content__body) :is(ul, ol) {
	padding-left: 1.4em;
}

:is(.hf-prose, .page-content__body) ul {
	list-style: disc;
}

:is(.hf-prose, .page-content__body) ol {
	list-style: decimal;
}

:is(.hf-prose, .page-content__body) li + li {
	margin-top: 0.4em;
}

:is(.hf-prose, .page-content__body) li::marker {
	color: var(--hf-orange-700);
}

:is(.hf-prose, .page-content__body) :is(ul, ol) :is(ul, ol) {
	margin-top: 0.4em;
}

:is(.hf-prose, .page-content__body) blockquote {
	padding: 4px 0 4px 1.25em;
	border-left: 3px solid var(--hf-orange-500);
	color: var(--hf-ink);
	font-size: 1.125rem;
	font-style: italic;
}

:is(.hf-prose, .page-content__body) img {
	display: block;
	max-width: 100%;
	height: auto;
	border-radius: var(--radius-m);
}

:is(.hf-prose, .page-content__body) figure {
	margin-block: 1.6em;
}

:is(.hf-prose, .page-content__body) figcaption {
	margin-top: 8px;
	color: var(--color-muted);
	font-size: var(--fs-xs);
	text-align: center;
}

:is(.hf-prose, .page-content__body) code {
	padding: 2px 6px;
	border-radius: 6px;
	background: var(--hf-surface-sunk);
	font-size: 0.92em;
}

:is(.hf-prose, .page-content__body) pre {
	padding: 18px 20px;
	border-radius: var(--radius-s);
	background: var(--hf-ink);
	color: #fff;
	overflow-x: auto;
}

:is(.hf-prose, .page-content__body) pre code {
	padding: 0;
	background: none;
}


:is(.hf-prose, .page-content__body) hr {
	height: 1px;
	margin-block: 2em;
	border: 0;
	background: var(--hf-line);
}

:is(.hf-prose, .page-content__body) iframe {
	max-width: 100%;
}

.page-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: var(--sp-10);
	padding-top: var(--sp-6);
	border-top: 1px solid var(--hf-line);
	font-weight: 600;
}

.page-links a {
	padding: 8px 16px;
	border-radius: var(--radius-pill);
	background: var(--hf-blue-50);
	color: var(--color-primary-text);
}
