/*
Theme Name: Meridian Daily Field
Author: Rowan Aster Works
Description: A mobile-first classic editorial WordPress theme for daily news, insights, and magazine-style publishing.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: hpd-theme
*/

:root {
	--hpd-bg: #f4efe7;
	--hpd-bg-soft: #ebe3d7;
	--hpd-ink: #12110f;
	--hpd-muted: #68625a;
	--hpd-line: rgba(18, 17, 15, 0.16);
	--hpd-card: #fffaf2;
	--hpd-accent: #df553c;
	--hpd-accent-dark: #9f2d20;
	--hpd-gold: #e7a33e;
	--hpd-white: #ffffff;
	--hpd-shadow: 0 18px 45px rgba(18, 17, 15, 0.11);
	--hpd-radius: 8px;
	--hpd-wrap: min(1180px, calc(100% - 32px));
}

* {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--hpd-bg);
	color: var(--hpd-ink);
	font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 16px;
	line-height: 1.55;
	letter-spacing: 0;
	text-rendering: optimizeLegibility;
}

body.hpd-body {
	min-width: 320px;
}

img,
svg,
video {
	max-width: 100%;
	height: auto;
}

a {
	color: inherit;
	text-decoration: none;
}

a:hover,
a:focus-visible {
	color: var(--hpd-accent-dark);
}

button,
input,
textarea,
select {
	font: inherit;
}

.hpd-skip-link {
	position: fixed;
	left: 16px;
	top: 16px;
	z-index: 9999;
	transform: translateY(-140%);
	background: var(--hpd-ink);
	color: var(--hpd-white);
	padding: 10px 14px;
	border-radius: var(--hpd-radius);
}

.hpd-skip-link:focus {
	transform: translateY(0);
}

.hpd-site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(244, 239, 231, 0.93);
	backdrop-filter: blur(18px);
	border-bottom: 1px solid var(--hpd-line);
}

.hpd-header-inner {
	width: var(--hpd-wrap);
	margin: 0 auto;
	min-height: 76px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
}

.hpd-brand {
	display: inline-flex;
	align-items: center;
	gap: 11px;
	min-width: 0;
	font-weight: 800;
	text-transform: uppercase;
}

.hpd-brand-mark {
	display: inline-grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--hpd-ink);
	color: var(--hpd-bg);
	font-size: 0.82rem;
	line-height: 1;
}

.hpd-brand-text {
	display: grid;
	gap: 1px;
	min-width: 0;
}

.hpd-brand-name {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: 190px;
	font-size: 0.93rem;
}

.hpd-brand-tagline {
	display: none;
	color: var(--hpd-muted);
	font-size: 0.72rem;
	font-weight: 600;
	text-transform: none;
}

.hpd-desktop-nav {
	display: none;
}

.hpd-menu {
	counter-reset: hpd-menu-count;
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 0;
	margin: 0;
	list-style: none;
}

.hpd-menu li {
	counter-increment: hpd-menu-count;
}

.hpd-menu a {
	display: inline-flex;
	align-items: baseline;
	gap: 6px;
	min-height: 42px;
	padding: 10px 0;
	color: var(--hpd-ink);
	font-size: 0.88rem;
	font-weight: 700;
}

.hpd-menu a::after {
	content: counter(hpd-menu-count, decimal-leading-zero);
	color: var(--hpd-muted);
	font-size: 0.67rem;
	font-weight: 800;
}

.hpd-menu a:hover::after,
.hpd-menu a:focus-visible::after {
	color: var(--hpd-accent);
}

.hpd-mobile-nav {
	position: relative;
}

.hpd-mobile-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	padding: 9px 14px;
	border: 1px solid var(--hpd-line);
	border-radius: 999px;
	cursor: pointer;
	font-size: 0.82rem;
	font-weight: 800;
	text-transform: uppercase;
	list-style: none;
	background: var(--hpd-card);
}

.hpd-mobile-toggle::-webkit-details-marker {
	display: none;
}

.hpd-mobile-toggle::after {
	content: "+";
	margin-left: 8px;
	color: var(--hpd-accent);
	font-weight: 900;
}

.hpd-mobile-nav[open] .hpd-mobile-toggle::after {
	content: "-";
}

.hpd-mobile-panel {
	position: absolute;
	right: 0;
	top: calc(100% + 12px);
	width: min(82vw, 310px);
	padding: 14px;
	background: var(--hpd-card);
	border: 1px solid var(--hpd-line);
	border-radius: var(--hpd-radius);
	box-shadow: var(--hpd-shadow);
}

.hpd-menu--mobile {
	display: grid;
	align-items: stretch;
	gap: 6px;
}

.hpd-menu--mobile a {
	justify-content: space-between;
	width: 100%;
	border-bottom: 1px solid var(--hpd-line);
}

.hpd-menu--mobile li:last-child a {
	border-bottom: 0;
}

.hpd-main {
	min-height: 60vh;
}

.hpd-wrap {
	width: var(--hpd-wrap);
	margin: 0 auto;
}

.hpd-hero {
	width: var(--hpd-wrap);
	margin: 0 auto;
	padding: 34px 0 28px;
}

.hpd-hero-grid {
	display: grid;
	gap: 18px;
}

.hpd-hero-copy {
	order: 2;
	display: grid;
	align-content: end;
	gap: 18px;
	min-height: auto;
	padding: 20px 0 4px;
}

.hpd-kicker {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	width: fit-content;
	color: var(--hpd-muted);
	font-size: 0.78rem;
	font-weight: 850;
	text-transform: uppercase;
}

.hpd-kicker::before {
	content: "";
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--hpd-accent);
}

.hpd-hero-title {
	max-width: 980px;
	margin: 0;
	font-size: 3.05rem;
	line-height: 0.95;
	font-weight: 900;
	text-transform: uppercase;
}

.hpd-hero-summary {
	max-width: 680px;
	margin: 0;
	color: var(--hpd-muted);
	font-size: 1.05rem;
}

.hpd-hero-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
}

.hpd-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 46px;
	padding: 12px 18px;
	border-radius: 999px;
	background: var(--hpd-ink);
	color: var(--hpd-white);
	font-size: 0.88rem;
	font-weight: 850;
	text-transform: uppercase;
}

.hpd-button:hover,
.hpd-button:focus-visible {
	background: var(--hpd-accent);
	color: var(--hpd-white);
}

.hpd-button--light {
	background: var(--hpd-card);
	color: var(--hpd-ink);
	border: 1px solid var(--hpd-line);
}

.hpd-button-icon {
	display: inline-grid;
	place-items: center;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.18);
}

.hpd-button--light .hpd-button-icon {
	background: var(--hpd-bg-soft);
}

.hpd-hero-visual {
	order: 1;
	min-height: 420px;
	overflow: hidden;
	position: relative;
	border-radius: var(--hpd-radius);
	background-color: var(--hpd-accent);
	background-image: url("assets/hpd-hero-visual.png");
	background-position: center 48%;
	background-size: cover;
	box-shadow: var(--hpd-shadow);
	animation: hpd-hero-image-motion 14s ease-in-out infinite alternate;
	transform: translateZ(0);
}

.hpd-hero-visual::before {
	content: "";
	position: absolute;
	inset: 0;
	background:
		linear-gradient(145deg, rgba(18, 17, 15, 0.08), rgba(18, 17, 15, 0.48)),
		radial-gradient(circle at 26% 18%, rgba(255, 255, 255, 0.28), transparent 34%);
}

.hpd-hero-visual::after {
	content: "19'";
	display: none;
}

.hpd-hero-feature {
	display: none;
}

.hpd-hero-feature-label {
	color: var(--hpd-accent-dark);
	font-size: 0.72rem;
	font-weight: 850;
	text-transform: uppercase;
}

.hpd-hero-feature-title {
	margin: 0;
	font-size: 1.15rem;
	line-height: 1.15;
}

@keyframes hpd-hero-image-motion {
	from {
		background-position: center 42%;
		filter: saturate(1) contrast(1);
	}

	to {
		background-position: center 58%;
		filter: saturate(1.08) contrast(1.04);
	}
}

.hpd-section {
	padding: 42px 0;
	border-top: 1px solid var(--hpd-line);
}

.hpd-section-head {
	width: var(--hpd-wrap);
	margin: 0 auto 24px;
	display: grid;
	gap: 14px;
}

.hpd-section-meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	color: var(--hpd-muted);
	font-size: 0.8rem;
	font-weight: 850;
	text-transform: uppercase;
}

.hpd-section-title {
	margin: 0;
	max-width: 820px;
	font-size: 2rem;
	line-height: 1.02;
	font-weight: 900;
	text-transform: uppercase;
}

.hpd-section-text {
	margin: 0;
	max-width: 740px;
	color: var(--hpd-muted);
}

.hpd-feature-grid {
	width: var(--hpd-wrap);
	margin: 0 auto;
	display: grid;
	gap: 14px;
}

.hpd-feature-card {
	display: grid;
	gap: 16px;
	padding: 20px;
	min-height: 230px;
	background: var(--hpd-card);
	border: 1px solid var(--hpd-line);
	border-radius: var(--hpd-radius);
}

.hpd-feature-icon {
	display: inline-grid;
	place-items: center;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: var(--hpd-ink);
	color: var(--hpd-bg);
}

.hpd-icon-svg {
	width: 24px;
	height: 24px;
	stroke: currentColor;
	stroke-width: 1.8;
	fill: none;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.hpd-feature-title {
	margin: 0;
	font-size: 1.35rem;
	line-height: 1.08;
	text-transform: uppercase;
}

.hpd-feature-text {
	margin: 0;
	color: var(--hpd-muted);
}

.hpd-widget-band {
	width: var(--hpd-wrap);
	margin: 0 auto;
}

.hpd-widget-band + .hpd-widget-band {
	margin-top: 20px;
}

.hpd-widget-band > * {
	margin: 0 0 16px;
}

.hpd-stats {
	width: var(--hpd-wrap);
	margin: 0 auto;
	display: grid;
	gap: 1px;
	overflow: hidden;
	border-radius: var(--hpd-radius);
	border: 1px solid var(--hpd-line);
	background: var(--hpd-line);
}

.hpd-stat {
	display: grid;
	gap: 8px;
	padding: 22px;
	background: var(--hpd-bg-soft);
}

.hpd-stat-value {
	font-size: 2.35rem;
	line-height: 1;
	font-weight: 900;
}

.hpd-stat-label {
	color: var(--hpd-muted);
	font-size: 0.86rem;
	font-weight: 750;
	text-transform: uppercase;
}

.hpd-post-grid {
	width: var(--hpd-wrap);
	margin: 0 auto;
	display: grid;
	gap: 16px;
}

.hpd-card {
	display: grid;
	min-height: 100%;
	background: var(--hpd-card);
	border: 1px solid var(--hpd-line);
	border-radius: var(--hpd-radius);
	overflow: hidden;
	transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.hpd-card:hover,
.hpd-card:focus-within {
	transform: translateY(-3px);
	border-color: rgba(223, 85, 60, 0.46);
	box-shadow: var(--hpd-shadow);
}

.hpd-card-media {
	position: relative;
	aspect-ratio: 16 / 11;
	background: var(--hpd-bg-soft);
	overflow: hidden;
}

.hpd-card-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.hpd-card-placeholder {
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	color: var(--hpd-bg);
	background:
		linear-gradient(135deg, rgba(223, 85, 60, 0.92), rgba(231, 163, 62, 0.9)),
		var(--hpd-accent);
	font-size: 3rem;
	font-weight: 900;
}

.hpd-card-body {
	display: grid;
	gap: 11px;
	padding: 18px;
}

.hpd-card-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	color: var(--hpd-muted);
	font-size: 0.75rem;
	font-weight: 850;
	text-transform: uppercase;
}

.hpd-card-category {
	color: var(--hpd-accent-dark);
}

.hpd-card-title {
	margin: 0;
	font-size: 1.34rem;
	line-height: 1.1;
}

.hpd-card-title a {
	display: inline;
}

.hpd-card-excerpt {
	margin: 0;
	color: var(--hpd-muted);
}

.hpd-card-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	width: fit-content;
	margin-top: 4px;
	color: var(--hpd-ink);
	font-size: 0.8rem;
	font-weight: 850;
	text-transform: uppercase;
}

.hpd-card-link::after {
	content: "->";
	color: var(--hpd-accent);
}

.hpd-empty {
	width: var(--hpd-wrap);
	margin: 0 auto;
	padding: 28px;
	background: var(--hpd-card);
	border: 1px solid var(--hpd-line);
	border-radius: var(--hpd-radius);
	color: var(--hpd-muted);
}

.hpd-archive-header {
	width: var(--hpd-wrap);
	margin: 0 auto;
	padding: 52px 0 24px;
	display: grid;
	gap: 14px;
}

.hpd-archive-title {
	margin: 0;
	font-size: 2.6rem;
	line-height: 1;
	font-weight: 900;
	text-transform: uppercase;
}

.hpd-archive-description {
	max-width: 740px;
	color: var(--hpd-muted);
}

.hpd-pagination {
	width: var(--hpd-wrap);
	margin: 28px auto 0;
}

.hpd-pagination nav > div {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.hpd-pagination a,
.hpd-pagination span {
	display: inline-grid;
	place-items: center;
	min-width: 42px;
	min-height: 42px;
	padding: 8px 12px;
	border: 1px solid var(--hpd-line);
	border-radius: 999px;
	background: var(--hpd-card);
	font-weight: 800;
}

.hpd-pagination [aria-current="page"] {
	background: var(--hpd-ink);
	color: var(--hpd-bg);
}

.hpd-single-shell {
	width: min(80vw, 980px);
	margin: 0 auto;
	padding: 48px 0 58px;
}

.hpd-single-article {
	display: grid;
	gap: 24px;
}

.hpd-single-header {
	display: grid;
	gap: 16px;
	padding-bottom: 24px;
	border-bottom: 1px solid var(--hpd-line);
}

.hpd-single-title {
	margin: 0;
	font-size: 2.55rem;
	line-height: 0.98;
	font-weight: 900;
	text-transform: uppercase;
}

.hpd-single-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	color: var(--hpd-muted);
	font-size: 0.78rem;
	font-weight: 850;
	text-transform: uppercase;
}

.hpd-single-content {
	font-size: 1.05rem;
}

.hpd-single-content > *:first-child {
	margin-top: 0;
}

.hpd-single-content a {
	color: var(--hpd-accent-dark);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

.hpd-single-content p,
.hpd-single-content ul,
.hpd-single-content ol {
	margin: 0 0 1.35em;
}

.hpd-single-content h2,
.hpd-single-content h3,
.hpd-single-content h4 {
	margin: 1.65em 0 0.65em;
	line-height: 1.12;
}

.hpd-single-content blockquote {
	margin: 1.6em 0;
	padding: 18px 20px;
	border-left: 4px solid var(--hpd-accent);
	background: var(--hpd-card);
	color: var(--hpd-ink);
}

.hpd-single-content img {
	border-radius: var(--hpd-radius);
}

.hpd-single-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding-top: 10px;
}

.hpd-single-tags a {
	display: inline-flex;
	align-items: center;
	min-height: 34px;
	padding: 7px 11px;
	border: 1px solid var(--hpd-line);
	border-radius: 999px;
	background: var(--hpd-card);
	color: var(--hpd-muted);
	font-size: 0.78rem;
	font-weight: 800;
}

.hpd-post-nav {
	display: grid;
	gap: 12px;
	padding-top: 26px;
	border-top: 1px solid var(--hpd-line);
}

.hpd-post-nav a {
	display: block;
	padding: 16px;
	background: var(--hpd-card);
	border: 1px solid var(--hpd-line);
	border-radius: var(--hpd-radius);
	font-weight: 850;
}

.hpd-site-footer {
	border-top: 1px solid var(--hpd-line);
	background: var(--hpd-ink);
	color: var(--hpd-bg);
}

.hpd-footer-inner {
	width: var(--hpd-wrap);
	margin: 0 auto;
	padding: 42px 0 28px;
	display: grid;
	gap: 28px;
}

.hpd-footer-top {
	display: grid;
	gap: 18px;
}

.hpd-footer-title {
	margin: 0;
	font-size: 2rem;
	line-height: 1.03;
	font-weight: 900;
	text-transform: uppercase;
}

.hpd-footer-widgets {
	display: grid;
	gap: 16px;
	color: rgba(244, 239, 231, 0.78);
}

.hpd-footer-widgets a {
	color: var(--hpd-bg);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

.hpd-footer-nav .hpd-menu {
	display: grid;
	gap: 4px;
	align-items: stretch;
}

.hpd-footer-nav .hpd-menu a {
	color: var(--hpd-bg);
}

.hpd-footer-nav .hpd-menu a::after {
	color: rgba(244, 239, 231, 0.48);
}

.hpd-footer-bottom {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	color: rgba(244, 239, 231, 0.7);
	font-size: 0.82rem;
	border-top: 1px solid rgba(244, 239, 231, 0.15);
	padding-top: 18px;
}

@media (min-width: 640px) {
	:root {
		--hpd-wrap: min(1180px, calc(100% - 48px));
	}

	.hpd-brand-tagline {
		display: block;
	}

	.hpd-brand-name {
		max-width: 280px;
	}

	.hpd-hero-title {
		font-size: 4.2rem;
	}

	.hpd-feature-grid,
	.hpd-stats,
	.hpd-post-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.hpd-post-nav {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 900px) {
	.hpd-desktop-nav {
		display: block;
	}

	.hpd-mobile-nav {
		display: none;
	}

	.hpd-hero {
		padding-top: 38px;
	}

	.hpd-hero-grid {
		grid-template-columns: minmax(0, 1fr);
		align-items: stretch;
	}

	.hpd-hero-copy {
		min-height: auto;
		max-width: 980px;
		padding-right: 0;
	}

	.hpd-hero-title {
		font-size: 5.8rem;
	}

	.hpd-hero-visual {
		min-height: 62vh;
	}

	.hpd-section {
		padding: 56px 0;
	}

	.hpd-section-head {
		grid-template-columns: minmax(180px, 0.34fr) minmax(0, 1fr);
		align-items: start;
	}

	.hpd-section-meta {
		display: grid;
		justify-content: start;
	}

	.hpd-feature-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.hpd-stats,
	.hpd-post-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.hpd-post-grid .hpd-card:first-child {
		grid-column: span 2;
	}

	.hpd-footer-top {
		grid-template-columns: minmax(0, 1fr) minmax(220px, 0.35fr);
		align-items: start;
	}
}

@media (min-width: 1180px) {
	.hpd-hero-title {
		font-size: 6.7rem;
	}

	.hpd-single-title {
		font-size: 4.35rem;
	}
}

@media (max-width: 420px) {
	:root {
		--hpd-wrap: min(100% - 24px, 1180px);
	}

	.hpd-header-inner {
		min-height: 68px;
	}

	.hpd-brand-mark {
		width: 38px;
		height: 38px;
	}

	.hpd-brand-name {
		max-width: 148px;
	}

	.hpd-hero-copy {
		min-height: auto;
	}

	.hpd-hero-title {
		font-size: 2.46rem;
	}

	.hpd-hero-visual {
		min-height: 330px;
	}

	.hpd-hero-feature {
		right: 58px;
	}

	.hpd-section-title,
	.hpd-footer-title {
		font-size: 1.68rem;
	}

	.hpd-archive-title,
	.hpd-single-title {
		font-size: 2.08rem;
	}

	.hpd-single-shell {
		width: 80vw;
	}
}

@media (prefers-reduced-motion: reduce) {
	* {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
	}
}
