/* ============================================================
   PLANTISIMA - homepage (front-page.php)
   Botanical Editorial brand tokens come from style.css :root
   ============================================================ */

.home-main { background: var(--brand-canvas); }

.home-wrap {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 24px;
}

.home-section { padding: 64px 0; }

/* Section background bands: cream (hero) -> forest (states) -> sage (topics)
   -> cream (latest). Each block reads as its own zone. */
.home-states { background: var(--brand-forest); }
.home-cats   { background: var(--brand-sage); }

/* Dark band (states): light heading + subtext, terracotta kicker still pops */
.home-states .section-head h2 { color: var(--brand-cream); }
.home-states .section-sub { color: rgba(247, 243, 232, 0.78); }

.section-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 2rem;
}
.section-head h2 {
	font-size: clamp(1.8rem, 3.5vw, 2.5rem);
	margin: 0;
	color: var(--brand-ink);
}

/* Topic landing (page-topic.php): title matches the section-heading size, and
   the feed sits directly under the intro (no second heading). */
.home-topic-intro .topic-title {
	font-size: clamp(1.8rem, 3.5vw, 2.5rem);
	margin: 0;
	color: var(--brand-ink);
}
#topic-main .home-latest { padding-top: 0; border-top: 0; }
.section-sub {
	margin: 0.5rem 0 0;
	color: var(--global-palette5);
	font-size: 1.12rem;
	line-height: 1.55;
	max-width: 52ch;
}
.kicker {
	text-transform: uppercase;
	letter-spacing: 0.16em;
	font-size: 0.78rem;
	font-weight: 700;
	color: var(--brand-accent);
	margin: 0 0 0.55rem;
}
.section-link {
	flex: none;
	font-weight: 600;
	color: var(--brand-forest);
	text-decoration: none;
	white-space: nowrap;
}
.section-link:hover { color: var(--brand-accent); }

/* "View all" pill link beneath a card grid */
.section-foot {
	margin-top: 2.2rem;
	text-align: center;
}
.section-more {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	font-weight: 600;
	font-size: 1.02rem;
	text-decoration: none;
	color: var(--brand-forest);
	border: 1.5px solid currentColor;
	border-radius: 999px;
	padding: 0.6rem 1.35rem;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.section-more:hover { background: var(--brand-forest); color: var(--brand-cream); }
/* On the dark states band */
.home-states .section-more { color: var(--brand-cream); border-color: rgba(247, 243, 232, 0.5); }
.home-states .section-more:hover { background: var(--brand-cream); color: var(--brand-forest); border-color: var(--brand-cream); }

.eyebrow {
	text-transform: uppercase;
	letter-spacing: 0.16em;
	font-size: 0.8rem;
	font-weight: 700;
	color: var(--brand-accent);
	margin: 0 0 1rem;
}

/* ---- ❶ HERO ------------------------------------------------------------- */
.home-hero {
	background:
		radial-gradient(120% 120% at 80% -10%, rgba(197,107,62,0.10), transparent 55%),
		var(--brand-cream);
	border-bottom: 1px solid var(--brand-sand);
}
.hero-inner {
	padding: 84px 24px 88px;
	text-align: center;
}
.home-hero h1 {
	font-size: clamp(2.6rem, 6vw, 4.4rem);
	line-height: 1.15;
	color: var(--brand-ink);
	margin: 0 auto 1.1rem;
}
.hero-lead {
	font-size: 1.25rem;
	line-height: 1.7;
	color: var(--global-palette5);
	max-width: 46ch;
	margin: 0 auto;
	text-wrap: pretty;
}
.hero-actions {
	display: flex;
	gap: 0.9rem;
	justify-content: center;
	flex-wrap: wrap;
}

/* State picker */
.state-picker { position: relative; }
.state-picker select {
	appearance: none;
	-webkit-appearance: none;
	font-family: var(--global-body-font-family);
	font-size: 1.02rem;
	font-weight: 600;
	color: var(--brand-ink);
	background: #fff;
	border: 1.5px solid var(--brand-forest);
	border-radius: 8px;
	padding: 0.85rem 2.6rem 0.85rem 1.2rem;
	cursor: pointer;
	min-width: 250px;
}
.state-picker::after {
	content: "";
	position: absolute;
	right: 1.1rem;
	top: 50%;
	width: 0.6rem;
	height: 0.6rem;
	border-right: 2px solid var(--brand-forest);
	border-bottom: 2px solid var(--brand-forest);
	transform: translateY(-65%) rotate(45deg);
	pointer-events: none;
}

.btn-primary {
	display: inline-flex;
	align-items: center;
	background: var(--brand-forest);
	color: var(--brand-cream);
	font-weight: 600;
	font-size: 1.02rem;
	padding: 0.85rem 1.7rem;
	border-radius: 8px;
	text-decoration: none;
}
.btn-primary:hover { background: var(--brand-accent); color: #fff; }

.btn-ghost {
	display: inline-flex;
	align-items: center;
	background: transparent;
	color: var(--brand-forest);
	font-weight: 600;
	font-size: 1.02rem;
	padding: 0.85rem 1.6rem;
	border: 1.5px solid var(--brand-forest);
	border-radius: 8px;
	text-decoration: none;
}
.btn-ghost:hover { background: var(--brand-forest); color: var(--brand-cream); }

/* ---- Card grids (states + categories) ----------------------------------- */
.card-grid {
	display: grid;
	gap: 20px;
}
.states-grid { grid-template-columns: repeat(4, 1fr); }
.cats-grid   { grid-template-columns: repeat(4, 1fr); }

.tile {
	display: block;
	background: var(--brand-surface);
	border: 1px solid var(--brand-sand);
	border-radius: 10px;
	overflow: hidden;
	text-decoration: none;
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.tile:hover {
	transform: translateY(-3px);
	box-shadow: 0 10px 26px rgba(27, 58, 43, 0.12);
}
.tile-media {
	display: block;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: var(--brand-sand);
}
.tile-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.tile-img--placeholder {
	background: linear-gradient(135deg, var(--brand-forest), var(--brand-accent));
}

/* State card: SVG silhouette + plain background fills the media (16:10) */
.tile-media--state { background: #eef0e6; }
.tile-state-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Topic card: line-art botanical icon, centered with breathing room */
.tile-media--topic {
	background: #eef0e6;
	display: flex;
	align-items: center;
	justify-content: center;
}
.tile-topic-img {
	width: 70%;
	height: 70%;
	object-fit: contain;
	display: block;
}
.tile-body {
	display: block;
	padding: 0.95rem 1.1rem 1.1rem;
}
.tile-name {
	display: block;
	font-family: var(--global-heading-font-family);
	font-size: 1.3rem;
	color: var(--brand-ink);
	line-height: 1.15;
}
.tile-desc {
	display: block;
	margin-top: 0.4rem;
	font-size: 0.92rem;
	line-height: 1.45;
	color: var(--global-palette5);
}

/* Topic card: full-bleed photo with label + blurb overlaid */
.tile--overlay {
	position: relative;
	border: none;
}
.tile--overlay .tile-media {
	aspect-ratio: 3 / 4;
	position: relative;
}
.tile--overlay .tile-overlay {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	padding: 1.15rem 1.25rem 1.3rem;
	background: linear-gradient(to top, rgba(16, 30, 22, 0.9) 0%, rgba(16, 30, 22, 0.45) 42%, rgba(16, 30, 22, 0) 74%);
}
.tile--overlay .tile-name {
	color: #fff;
	font-size: 1.5rem;
}
.tile--overlay .tile-desc {
	margin-top: 0.45rem;
	color: rgba(255, 255, 255, 0.85);
	font-size: 0.88rem;
}

/* ---- ❺ LATEST FEED (compact, 2-col) ------------------------------------ */
.home-latest { background: var(--brand-cream); border-top: 1px solid var(--brand-sand); }
.feed-list {
	list-style: none;
	margin: 0;
	padding: 0;
	columns: 2;
	column-gap: 28px;
}
.feed-item {
	break-inside: avoid;
	margin: 0 0 6px;
}
.feed-link {
	display: flex;
	gap: 14px;
	align-items: center;
	padding: 10px;
	border-radius: 8px;
	text-decoration: none;
	transition: background 0.15s ease;
}
.feed-link:hover { background: #fff; }
.feed-media { flex: none; }
.feed-img {
	width: 64px;
	height: 64px;
	object-fit: cover;
	border-radius: 6px;
	display: block;
}
.feed-img--ph {
	background: linear-gradient(135deg, var(--brand-forest), var(--brand-accent));
}
.feed-body {
	display: flex;
	flex-direction: column;
	min-width: 0;
}
.feed-cat {
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--brand-accent);
	margin-bottom: 2px;
}
.feed-title {
	font-family: var(--global-body-font-family);
	font-weight: 600;
	font-size: 0.98rem;
	line-height: 1.3;
	color: var(--brand-ink);
}
.feed-link:hover .feed-title { color: var(--brand-accent); }
.feed-date {
	font-size: 0.78rem;
	color: var(--global-palette6);
	margin-top: 3px;
}

/* ---- Latest feed: banner (1) + mid grid (2-10) cards ------------------ */
.posts-grid {
	grid-template-columns: repeat(3, 1fr);
	margin-bottom: 40px;
}

.post-card {
	display: flex;
	flex-direction: column;
	background: var(--brand-surface);
	border: 1px solid var(--brand-sand);
	border-radius: 10px;
	overflow: hidden;
	text-decoration: none;
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.post-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 10px 26px rgba(27, 58, 43, 0.12);
}
.post-card-media {
	display: block;
	overflow: hidden;
	background: var(--brand-sand);
}
.post-card-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.post-card-img--ph {
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, var(--brand-forest), var(--brand-accent));
}
.post-card-body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 1rem 1.15rem 1.2rem;
}
.post-cat {
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--brand-accent);
	margin-bottom: 0.45rem;
}
.post-card-title {
	font-family: var(--global-heading-font-family);
	color: var(--brand-ink);
	line-height: 1.2;
}
.post-card:hover .post-card-title { color: var(--brand-accent); }
.post-card-meta {
	margin-top: auto;
	padding-top: 0.7rem;
	font-size: 0.78rem;
	color: var(--global-palette6);
}
.post-card-excerpt {
	margin-top: 0.7rem;
	font-size: 1rem;
	line-height: 1.55;
	color: var(--global-palette5);
}

/* Lead post (1): full-width banner, image left + text right */
.post-card--lead {
	flex-direction: row;
	align-items: stretch;
	margin-bottom: 40px;
}
.post-card--lead .post-card-media {
	width: 56%;
	flex: none;
	aspect-ratio: 16 / 10;
}
.post-card--lead .post-card-body {
	justify-content: center;
	padding: 2rem 2.4rem;
}
.post-card--lead .post-cat { margin-bottom: 0.7rem; }
.post-card--lead .post-card-title {
	font-size: clamp(1.6rem, 2.6vw, 2.3rem);
	line-height: 1.15;
}
.post-card--lead .post-card-meta { margin-top: 1rem; }

/* Mid tier (2-4): vertical card */
.post-card--mid .post-card-media { aspect-ratio: 16 / 10; }
.post-card--mid .post-card-title { font-size: 1.12rem; }
.post-card--mid .post-card-body { padding: 0.85rem 1rem 1rem; }

/* Row tier (5-10): full-width single-line rows, image left + title/description */
.row-list {
	display: flex;
	flex-direction: column;
	margin-bottom: 40px;
	border-top: 1px solid var(--brand-sand);
}
.post-row {
	display: flex;
	gap: 1.3rem;
	align-items: center;
	padding: 1.1rem 0.5rem;
	border-bottom: 1px solid var(--brand-sand);
	text-decoration: none;
	transition: background 0.15s ease;
}
.post-row:hover { background: var(--brand-surface); }
.post-row-media {
	flex: none;
	width: 200px;
	aspect-ratio: 16 / 10;
	border-radius: 8px;
	overflow: hidden;
	background: var(--brand-sand);
}
.post-row-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.post-row-img--ph {
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, var(--brand-forest), var(--brand-accent));
}
.post-row-body {
	display: flex;
	flex-direction: column;
	min-width: 0;
}
.post-row-title {
	font-family: var(--global-heading-font-family);
	font-size: 1.3rem;
	line-height: 1.2;
	color: var(--brand-ink);
}
.post-row:hover .post-row-title { color: var(--brand-accent); }
.post-row-desc {
	margin-top: 0.4rem;
	font-size: 0.95rem;
	line-height: 1.5;
	color: var(--global-palette5);
}
.post-row .post-card-meta { margin-top: 0.45rem; padding-top: 0; }

@media (max-width: 1024px) {
	.posts-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
	.post-card--lead { flex-direction: column; }
	.post-card--lead .post-card-media { width: 100%; aspect-ratio: 16 / 9; }
	.post-card--lead .post-card-body { padding: 1.2rem 1.3rem 1.4rem; }
	.posts-grid { grid-template-columns: 1fr; }
	/* Tighten the space around the row image and make it a little bigger. */
	.post-row { gap: 0.9rem; padding: 0.9rem 0.25rem; }
	.post-row-media { width: 145px; }
	.post-row-desc { display: none; }
	/* Match headline size + line-height across both card types (image-above
	   "mid" card and image-left "row" card), and nudge them up a little. */
	.post-card--mid .post-card-title,
	.post-row-title {
		font-size: 1.2rem;
		line-height: 1.3;
	}
}

/* ---- Pagination (latest feed) ------------------------------------------ */
.home-latest .pagination { margin-top: 2.5rem; }
.home-latest .pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 8px;
}
.home-latest .pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	height: 42px;
	padding: 0 0.7rem;
	border: 1px solid var(--brand-sand);
	border-radius: 8px;
	background: var(--brand-surface);
	color: var(--brand-ink);
	font-weight: 600;
	font-size: 0.98rem;
	text-decoration: none;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.home-latest .pagination a.page-numbers:hover {
	background: var(--brand-forest);
	color: var(--brand-cream);
	border-color: var(--brand-forest);
}
.home-latest .pagination .page-numbers.current {
	background: var(--brand-forest);
	color: var(--brand-cream);
	border-color: var(--brand-forest);
}
.home-latest .pagination .page-numbers.dots {
	border-color: transparent;
	background: transparent;
	min-width: 0;
}
.home-latest .pagination .prev.page-numbers,
.home-latest .pagination .next.page-numbers {
	font-weight: 600;
}

/* ---- Responsive --------------------------------------------------------- */
@media (max-width: 1024px) {
	.states-grid, .cats-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
	.states-grid, .cats-grid { grid-template-columns: repeat(2, 1fr); }
	.home-section { padding: 48px 0; }
	.section-head { flex-wrap: wrap; }
	.feed-list { columns: 1; }
	/* Drop the forced two-line break; let the headline wrap to the screen. */
	.hero-br { display: none; }
	/* States: drop the blurb and show each full silhouette in a square box.
	   contain (not cover) keeps every state uncropped at a consistent scale. */
	.states-grid .tile-desc { display: none; }
	.states-grid .tile-media--state { aspect-ratio: 1 / 1; }
	.states-grid .tile-state-img { object-fit: cover; padding: 5%; }
	/* Topics: hide the overlaid blurb, keep just the label on the photo. */
	.cats-grid .tile-desc { display: none; }
}
@media (max-width: 440px) {
	.states-grid, .cats-grid { grid-template-columns: 1fr 1fr; }
	.hero-actions { flex-direction: column; align-items: stretch; }
	.state-picker select { width: 100%; }
}
