﻿/**
 * Homepage sections: hero, countdown, story panel, journal cards.
 */

/* ---- hero ---- */

.pl-hero {
	position: relative;
	border-radius: var(--pl-radius-2xl);
	overflow: hidden;
	background: var(--pl-bg-dark);
	border: 1px solid rgb(255 255 255 / 0.08);
	color: #fff;
	isolation: isolate;
}

.pl-hero__grid {
	display: grid;
	grid-template-columns: 1fr;
}

@media (min-width: 48rem) {
	.pl-hero__grid { grid-template-columns: 1.05fr 0.95fr; align-items: stretch; }
}

.pl-hero__body {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: var(--pl-space-4);
	padding: var(--pl-space-8) var(--pl-space-6);
	order: 2;
}

@media (min-width: 48rem) {
	.pl-hero__body { order: 1; padding: var(--pl-space-12) var(--pl-space-10); }
}

@media (min-width: 64rem) {
	.pl-hero__body { padding: var(--pl-space-16); }
}

.pl-hero__title {
	font-size: var(--pl-fs-hero);
	font-weight: 700;
	color: #fff;
	line-height: 1.05;
	max-width: 14ch;
}

.pl-hero__lede {
	font-size: var(--pl-fs-body);
	color: rgb(248 250 252 / 0.72);
	max-width: 46ch;
}

.pl-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.625rem;
	margin-top: var(--pl-space-2);
}

.pl-hero__media {
	position: relative;
	order: 1;
	aspect-ratio: 4 / 3;
	background: var(--pl-primary-deep);
}

@media (min-width: 48rem) {
	.pl-hero__media { order: 2; aspect-ratio: auto; min-height: 33.875rem; }
}

.pl-hero__media img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 22%;
}

/* Blend the photo into the panel on wide screens. */
@media (min-width: 48rem) {
	.pl-hero__media::after {
		content: "";
		position: absolute;
		inset: 0;
		background: linear-gradient(to right, rgb(15 23 42 / 0.85) 0%, rgb(15 23 42 / 0.15) 38%, transparent 70%);
	}
}

/* ---- countdown ---- */

.pl-countdown {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.4375rem 0.75rem;
	border: 1px solid var(--pl-border-light);
	border-radius: var(--pl-radius-full);
	background: var(--pl-bg-white);
	font-size: var(--pl-fs-xs);
	color: var(--pl-text-muted);
	white-space: nowrap;
}

.pl-countdown__time {
	font-weight: 800;
	font-variant-numeric: tabular-nums;
	color: var(--pl-primary-ink);
}

/* ---- story panel ---- */

.pl-story__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--pl-space-8);
	align-items: center;
}

@media (min-width: 48rem) {
	.pl-story__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.pl-story__title {
	font-size: var(--pl-fs-h2);
	line-height: 1.2;
	margin-bottom: var(--pl-space-4);
}

.pl-story__copy {
	font-size: var(--pl-fs-body);
	color: var(--pl-text-secondary);
	max-width: 52ch;
}

/* A <dl>, so the browser defaults have to go: 1em of margin below the list, and
   40px of margin-inline-start on every <dd> — which pushed each label out of
   line with the value directly above it. */
.pl-story__stats {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--pl-space-4);
	margin: var(--pl-space-8) 0 0;
	padding-top: var(--pl-space-6);
	border-top: 1px solid var(--pl-border-light);
}

.pl-story__statvalue {
	margin: 0;
	font-size: 1.125rem;
	font-weight: 800;
	color: var(--pl-text-primary);
	line-height: 1.2;
}

.pl-story__statlabel {
	margin: 0;
	font-size: var(--pl-fs-xs);
	color: var(--pl-text-muted);
	line-height: 1.4;
}

.pl-story__media {
	position: relative;
	aspect-ratio: 4 / 3;
	border-radius: var(--pl-radius-xl);
	overflow: hidden;
	background: var(--pl-bg-dark);
}

@media (min-width: 48rem) {
	.pl-story__media { aspect-ratio: 5 / 4; }
}

.pl-story__media img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* ---- journal cards ---- */

.pl-post {
	display: grid;
	grid-template-columns: 1fr;
	background: #fff;
	border: 1px solid var(--pl-border-light);
	border-radius: var(--pl-radius-lg);
	overflow: hidden;
	transition: border-color var(--pl-dur) var(--pl-ease), box-shadow var(--pl-dur) var(--pl-ease);
}

.pl-post:hover { border-color: var(--pl-border-mid); box-shadow: var(--pl-shadow-md); }

@media (min-width: 40rem) {
	.pl-post { grid-template-columns: 13.5rem minmax(0, 1fr); }
}

.pl-post__media {
	position: relative;
	aspect-ratio: 16 / 10;
	background: var(--pl-bg-alt);
	overflow: hidden;
}

@media (min-width: 40rem) {
	.pl-post__media { aspect-ratio: auto; height: 100%; }
}

.pl-post__media img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform var(--pl-dur-slow) var(--pl-ease);
}

@media (hover: hover) {
	.pl-post:hover .pl-post__media img { transform: scale(1.04); }
}

.pl-post__body {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	padding: var(--pl-space-5);
}

.pl-post__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	font-size: var(--pl-fs-xs);
	color: var(--pl-text-muted);
}

.pl-post__cat {
	font-weight: 700;
	color: var(--pl-primary-ink);
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.pl-post__title {
	font-size: 1.0625rem;
	font-weight: 700;
	line-height: 1.35;
}

.pl-post__title a:hover { color: var(--pl-primary-ink); }

.pl-post__excerpt {
	font-size: var(--pl-fs-sm);
	color: var(--pl-text-muted);
	line-height: 1.55;
}

.pl-post__more {
	margin-top: auto;
	padding-top: 0.5rem;
	font-size: var(--pl-fs-xs);
	font-weight: 700;
	color: var(--pl-primary-ink);
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
}
