/*
Theme Name: Grovefield Journal
Author: Elena Brook Studio
Description: A classic PHP WordPress theme for editorial gardening sites with mobile-first layouts, dynamic WordPress content, and bundled visual assets.
Version: 1.0.3
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: mgd-theme
*/

:root {
	--mgd-ink: #070808;
	--mgd-muted: #626d69;
	--mgd-paper: #fdfefe;
	--mgd-cloud: #f2f5f3;
	--mgd-line: rgba(7, 8, 8, 0.1);
	--mgd-sky: #28b8df;
	--mgd-sky-soft: #d8f7fb;
	--mgd-lime: #d9ff6a;
	--mgd-green: #244e35;
	--mgd-shadow: 0 18px 44px rgba(7, 8, 8, 0.1);
	--mgd-radius-lg: 28px;
	--mgd-radius-md: 18px;
	--mgd-radius-sm: 8px;
	--mgd-max: 1180px;
}

* {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--mgd-paper);
	color: var(--mgd-ink);
	font-family: "Aptos", "Inter Tight", "Segoe UI Variable Text", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 16px;
	line-height: 1.55;
	letter-spacing: 0;
}

.mgd-brand,
.mgd-menu a,
.mgd-footer-menu a,
.mgd-button,
.mgd-hero-title,
.mgd-section-title,
.mgd-post-card-title,
.mgd-mini-card-title,
.mgd-lime-title,
.mgd-single-title,
.mgd-archive-title {
	font-family: "Aptos Display", "Sora", "Space Grotesk", "Segoe UI Variable Display", ui-sans-serif, system-ui, sans-serif;
	letter-spacing: 0;
}

.screen-reader-text,
.mgd-screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

img {
	display: block;
	max-width: 100%;
	height: auto;
}

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

a:hover,
a:focus-visible {
	color: var(--mgd-green);
}

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

.mgd-site {
	min-height: 100vh;
	overflow-x: clip;
}

.mgd-header-shell {
	position: sticky;
	top: 0;
	z-index: 50;
	width: min(calc(100% - 24px), var(--mgd-max));
	margin: 10px auto 0;
}

.mgd-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 50px;
	padding: 8px;
	border: 1px solid rgba(255, 255, 255, 0.7);
	border-radius: 8px;
	background: rgba(253, 254, 254, 0.94);
	box-shadow: 0 12px 28px rgba(7, 8, 8, 0.08);
	backdrop-filter: blur(16px);
}

.mgd-brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 34px;
	padding: 0 8px;
	color: var(--mgd-ink);
	font-size: 1.42rem;
	font-weight: 800;
	line-height: 1;
	white-space: nowrap;
}

.mgd-brand-logo {
	width: 34px;
	height: 34px;
	border-radius: 999px;
	object-fit: cover;
	box-shadow: 0 8px 18px rgba(7, 8, 8, 0.12);
}

.mgd-brand-name {
	display: inline-block;
	max-width: 250px;
	overflow: hidden;
	text-overflow: ellipsis;
}

.mgd-nav {
	position: fixed;
	top: 72px;
	right: 12px;
	left: 12px;
	display: none;
	padding: 12px;
	border: 1px solid var(--mgd-line);
	border-radius: 8px;
	background: var(--mgd-paper);
	box-shadow: var(--mgd-shadow);
}

.mgd-header[data-open="true"] .mgd-nav {
	display: block;
}

.mgd-menu,
.mgd-footer-menu {
	display: grid;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.mgd-menu a,
.mgd-footer-menu a {
	display: block;
	padding: 10px 12px;
	border-radius: 8px;
	color: var(--mgd-muted);
	font-size: 0.9rem;
	font-weight: 640;
}

.mgd-menu a:hover,
.mgd-menu a:focus-visible,
.mgd-footer-menu a:hover,
.mgd-footer-menu a:focus-visible {
	background: var(--mgd-cloud);
	color: var(--mgd-ink);
}

.mgd-nav-toggle {
	display: inline-grid;
	place-items: center;
	width: 38px;
	height: 38px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var(--mgd-ink);
	cursor: pointer;
}

.mgd-nav-toggle-lines,
.mgd-nav-toggle-lines::before,
.mgd-nav-toggle-lines::after {
	display: block;
	width: 18px;
	height: 2px;
	border-radius: 999px;
	background: currentColor;
	content: "";
	transition: transform 180ms ease, opacity 180ms ease;
}

.mgd-nav-toggle-lines {
	position: relative;
}

.mgd-nav-toggle-lines::before,
.mgd-nav-toggle-lines::after {
	position: absolute;
	left: 0;
}

.mgd-nav-toggle-lines::before {
	top: -6px;
}

.mgd-nav-toggle-lines::after {
	top: 6px;
}

.mgd-header[data-open="true"] .mgd-nav-toggle-lines {
	background: transparent;
}

.mgd-header[data-open="true"] .mgd-nav-toggle-lines::before {
	transform: translateY(6px) rotate(45deg);
}

.mgd-header[data-open="true"] .mgd-nav-toggle-lines::after {
	transform: translateY(-6px) rotate(-45deg);
}

.mgd-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 43px;
	padding: 0 18px;
	border: 1px solid var(--mgd-ink);
	border-radius: 8px;
	background: var(--mgd-ink);
	color: #fff;
	font-weight: 700;
	line-height: 1;
	box-shadow: 0 12px 26px rgba(7, 8, 8, 0.18);
	transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.mgd-button:hover,
.mgd-button:focus-visible {
	background: var(--mgd-green);
	color: #fff;
	transform: translateY(-1px);
	box-shadow: 0 16px 32px rgba(7, 8, 8, 0.2);
}

.mgd-button-icon,
.mgd-card-arrow {
	display: inline-grid;
	place-items: center;
	width: 21px;
	height: 21px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.16);
	font-size: 0.88rem;
	line-height: 1;
}

.mgd-header-cta {
	display: none;
}

.mgd-hero {
	position: relative;
	min-height: 740px;
	margin-top: -70px;
	overflow: hidden;
	background: var(--mgd-sky);
}

.mgd-hero-image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center bottom;
}

.mgd-hero-overlay {
	position: absolute;
	inset: 0;
	background:
		linear-gradient(180deg, rgba(40, 184, 223, 0.08) 0%, rgba(40, 184, 223, 0.12) 42%, rgba(253, 254, 254, 0.8) 96%),
		linear-gradient(90deg, rgba(253, 254, 254, 0.2), rgba(253, 254, 254, 0));
}

.mgd-hero-inner {
	position: relative;
	z-index: 1;
	display: grid;
	place-items: center;
	width: min(calc(100% - 32px), 930px);
	min-height: 740px;
	margin: 0 auto;
	padding: 112px 0 92px;
	text-align: center;
}

.mgd-hero-copy {
	display: grid;
	justify-items: center;
	gap: 18px;
}

.mgd-kicker {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	margin: 0;
	color: rgba(7, 8, 8, 0.72);
	font-size: 0.85rem;
	font-weight: 700;
}

.mgd-kicker::before {
	width: 15px;
	height: 15px;
	border: 1px solid currentColor;
	border-radius: 999px;
	content: "";
}

.mgd-hero-title {
	max-width: 870px;
	margin: 0;
	color: #fff;
	font-size: clamp(3rem, 12vw, 6.9rem);
	font-weight: 860;
	line-height: 0.96;
	text-wrap: balance;
}

.mgd-hero-text {
	max-width: 570px;
	margin: 0;
	color: rgba(7, 8, 8, 0.78);
	font-size: 1rem;
}

.mgd-section {
	width: min(calc(100% - 24px), var(--mgd-max));
	margin: 0 auto;
	padding: 74px 0;
}

.mgd-section-head {
	display: grid;
	justify-items: center;
	gap: 16px;
	max-width: 760px;
	margin: 0 auto 42px;
	text-align: center;
}

.mgd-section-title {
	margin: 0;
	font-size: clamp(2.2rem, 7vw, 4.55rem);
	font-weight: 850;
	line-height: 0.98;
	text-wrap: balance;
}

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

.mgd-post-grid {
	display: grid;
	gap: 18px;
}

.mgd-post-card {
	position: relative;
	display: grid;
	min-height: 350px;
	overflow: hidden;
	border: 1px solid rgba(7, 8, 8, 0.08);
	border-radius: var(--mgd-radius-lg);
	background: var(--mgd-cloud);
	box-shadow: var(--mgd-shadow);
	isolation: isolate;
}

.mgd-post-card-image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 260ms ease;
}

.mgd-post-card::after {
	position: absolute;
	inset: 36% 0 0;
	z-index: 1;
	background: linear-gradient(180deg, rgba(253, 254, 254, 0) 0%, rgba(253, 254, 254, 0.9) 50%, rgba(253, 254, 254, 0.98) 100%);
	content: "";
}

.mgd-post-card:hover .mgd-post-card-image,
.mgd-post-card:focus-within .mgd-post-card-image {
	transform: scale(1.035);
}

.mgd-post-card-content {
	position: relative;
	z-index: 2;
	align-self: end;
	display: grid;
	gap: 9px;
	padding: 118px 22px 22px;
}

.mgd-post-card-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	color: var(--mgd-muted);
	font-size: 0.84rem;
}

.mgd-chip {
	display: inline-flex;
	align-items: center;
	max-width: 100%;
	min-height: 27px;
	padding: 0 12px;
	border-radius: 999px;
	background: var(--mgd-ink);
	color: #fff;
	font-size: 0.78rem;
	font-weight: 700;
	line-height: 1;
}

.mgd-date {
	color: var(--mgd-muted);
}

.mgd-post-card-title {
	margin: 0;
	font-size: clamp(1.22rem, 5vw, 1.58rem);
	font-weight: 800;
	line-height: 1.1;
	text-wrap: balance;
}

.mgd-post-card-title a::after {
	position: absolute;
	inset: 0;
	z-index: 3;
	content: "";
}

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

.mgd-card-arrow {
	position: absolute;
	top: 16px;
	right: 16px;
	z-index: 4;
	width: 45px;
	height: 45px;
	background: var(--mgd-paper);
	color: var(--mgd-ink);
	font-size: 1.5rem;
	box-shadow: 0 10px 24px rgba(7, 8, 8, 0.12);
}

.mgd-mosaic {
	display: grid;
	gap: 22px;
	align-items: stretch;
}

.mgd-mosaic-visual {
	position: relative;
	min-height: 500px;
	border-radius: var(--mgd-radius-lg);
	background: var(--mgd-cloud);
	overflow: hidden;
	box-shadow: var(--mgd-shadow);
}

.mgd-mosaic-image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0.94;
}

.mgd-mini-card {
	position: absolute;
	left: 18px;
	right: 18px;
	bottom: 18px;
	display: grid;
	gap: 10px;
	padding: 18px;
	border: 1px solid rgba(255, 255, 255, 0.62);
	border-radius: var(--mgd-radius-md);
	background: rgba(253, 254, 254, 0.88);
	box-shadow: 0 18px 36px rgba(7, 8, 8, 0.12);
	backdrop-filter: blur(14px);
}

.mgd-mini-card-title {
	margin: 0;
	font-size: 1.25rem;
	font-weight: 800;
	line-height: 1.08;
}

.mgd-mini-card-text {
	margin: 0;
	color: var(--mgd-muted);
}

.mgd-lime-card {
	display: grid;
	align-content: space-between;
	min-height: 500px;
	padding: 28px;
	border-radius: var(--mgd-radius-lg);
	background: var(--mgd-lime);
	color: var(--mgd-ink);
	box-shadow: var(--mgd-shadow);
}

.mgd-lime-title {
	max-width: 520px;
	margin: 0;
	font-size: clamp(2rem, 7vw, 4.2rem);
	font-weight: 800;
	line-height: 0.98;
	text-wrap: balance;
}

.mgd-lime-text {
	max-width: 500px;
	margin: 0;
	color: rgba(7, 8, 8, 0.76);
}

.mgd-chip-row {
	display: flex;
	flex-wrap: wrap;
	gap: 9px;
	margin-top: 22px;
}

.mgd-chip-row .mgd-chip {
	background: rgba(253, 254, 254, 0.85);
	color: var(--mgd-ink);
}

.mgd-empty {
	display: grid;
	gap: 10px;
	padding: 24px;
	border: 1px solid var(--mgd-line);
	border-radius: var(--mgd-radius-md);
	background: var(--mgd-cloud);
}

.mgd-empty p {
	margin: 0;
	color: var(--mgd-muted);
}

.mgd-single-main {
	padding: 84px 0;
}

.mgd-archive-hero {
	margin-top: -70px;
	padding: 148px 0 74px;
	background:
		linear-gradient(135deg, rgba(216, 247, 251, 0.95), rgba(253, 254, 254, 0.95) 58%, rgba(217, 255, 106, 0.34)),
		var(--mgd-paper);
}

.mgd-archive-shell {
	width: min(calc(100% - 24px), var(--mgd-max));
	margin: 0 auto;
}

.mgd-archive-copy {
	display: grid;
	gap: 14px;
	max-width: 760px;
}

.mgd-archive-title {
	margin: 0;
	font-size: clamp(2.6rem, 9vw, 5.8rem);
	font-weight: 860;
	line-height: 0.96;
	text-wrap: balance;
}

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

.mgd-archive-description p {
	margin: 0;
}

.mgd-single-shell {
	width: min(80vw, 920px);
	margin: 0 auto;
}

.mgd-single-kicker {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	margin-bottom: 18px;
}

.mgd-single-title {
	margin: 0 0 16px;
	font-size: clamp(2.4rem, 8vw, 5.4rem);
	font-weight: 800;
	line-height: 0.98;
	text-wrap: balance;
}

.mgd-single-byline {
	margin: 0 0 44px;
	color: var(--mgd-muted);
}

.mgd-content {
	color: #202423;
	font-size: 1.05rem;
}

.mgd-content > * {
	margin-top: 0;
	margin-bottom: 1.35em;
}

.mgd-content h2,
.mgd-content h3,
.mgd-content h4 {
	margin-top: 1.6em;
	color: var(--mgd-ink);
	line-height: 1.08;
}

.mgd-content a {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
}

.mgd-content img {
	border-radius: var(--mgd-radius-md);
}

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

.mgd-pagination {
	margin-top: 34px;
}

.mgd-pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.mgd-pagination a,
.mgd-pagination span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	min-height: 42px;
	padding: 0 14px;
	border: 1px solid var(--mgd-line);
	border-radius: 8px;
	background: var(--mgd-paper);
	font-weight: 720;
}

.mgd-pagination .current {
	background: var(--mgd-ink);
	color: #fff;
}

.mgd-post-nav a {
	display: block;
	padding: 16px;
	border: 1px solid var(--mgd-line);
	border-radius: var(--mgd-radius-sm);
	background: var(--mgd-cloud);
	font-weight: 700;
}

.mgd-footer {
	background: var(--mgd-cloud);
}

.mgd-footer-inner {
	width: min(calc(100% - 24px), var(--mgd-max));
	margin: 0 auto;
	padding: 28px 0;
}

.mgd-footer-card {
	display: grid;
	gap: 24px;
	padding: 22px;
	border-radius: var(--mgd-radius-md);
	background: var(--mgd-paper);
}

.mgd-footer-brand {
	display: grid;
	gap: 8px;
}

.mgd-footer-brand strong {
	font-size: 1.55rem;
	line-height: 1;
}

.mgd-footer-brand p,
.mgd-footer-copy {
	margin: 0;
	color: var(--mgd-muted);
}

.mgd-footer-bottom {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 12px;
	margin-top: 18px;
	color: var(--mgd-muted);
	font-size: 0.9rem;
}

@media (min-width: 720px) {
	.mgd-header-shell {
		width: min(calc(100% - 56px), var(--mgd-max));
		margin-top: 14px;
	}

	.mgd-header {
		min-height: 58px;
		padding: 8px 10px;
	}

	.mgd-nav-toggle {
		display: none;
	}

	.mgd-nav {
		position: static;
		display: block;
		padding: 0;
		border: 0;
		border-radius: 0;
		background: transparent;
		box-shadow: none;
	}

	.mgd-menu {
		display: flex;
		align-items: center;
		gap: 8px;
		justify-content: center;
		flex-wrap: nowrap;
	}

	.mgd-menu a {
		padding: 9px 10px;
		font-size: 0.86rem;
		white-space: nowrap;
	}

	.mgd-header-cta {
		display: inline-flex;
	}

	.mgd-hero {
		min-height: 780px;
	}

	.mgd-hero-inner {
		min-height: 780px;
		padding-top: 142px;
	}

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

	.mgd-post-card {
		min-height: 365px;
	}

	.mgd-mosaic {
		grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
	}

	.mgd-footer-card {
		grid-template-columns: 0.95fr 1fr;
		align-items: center;
	}

	.mgd-footer-menu {
		display: flex;
		flex-wrap: wrap;
		justify-content: flex-end;
	}

	.mgd-post-nav {
		grid-template-columns: 1fr 1fr;
	}
}

@media (max-width: 420px) {
	.mgd-brand {
		max-width: 255px;
		overflow-wrap: anywhere;
		font-size: 1.15rem;
	}

	.mgd-brand-name {
		max-width: 190px;
	}

	.mgd-hero {
		min-height: 690px;
	}

	.mgd-hero-inner {
		min-height: 690px;
		padding-top: 104px;
	}

	.mgd-section {
		padding: 58px 0;
	}

	.mgd-post-card,
	.mgd-mosaic-visual,
	.mgd-lime-card {
		border-radius: 22px;
	}
}
