/*
 * Hand-written port of storefront-grundlayout.html's CSS — everything
 * theme.json can't reach (exact card-grid hairline-divider trick, hero
 * pixel breakpoints, journal tile layout, mobile nav).
 *
 * Selectors mostly reuse the mockup's own class names, applied to WP block
 * markup via each block's "Additional CSS class(es)" field. Two structural
 * differences from the static mockup, both load-bearing:
 *   - .card-grid is the Query Loop's Post Template element itself (a <ul>),
 *     not a plain <div> — each product becomes an <li class="wp-block-post">
 *     that IS the card box (no separate nested .card div needed).
 *   - .journal-grid is the same pattern for posts; .post is a group nested
 *     inside each <li>, not the <li> itself, since the post tile needs its
 *     own flex row independent of the grid item.
 */

/*
 * Kadence's own Customizer global-palette CSS (a separate, dynamically
 * generated stylesheet, not declared as a dependency of this one) sets
 * "body { background: var(--global-palette8); }" and loads after WP's
 * theme.json-driven global-styles output, so it silently wins the cascade
 * on equal specificity — the page rendered white instead of --bg. Force it
 * here rather than fight enqueue order.
 */
body {
	background: var(--wp--preset--color--bg) !important;
	color: var(--wp--preset--color--text) !important;
}

/* ---------- Header ---------- */

.site-header {
	border-bottom: 1px solid var(--wp--preset--color--line);
	padding: 28px 0;
}

.site-header .wp-block-group {
	align-items: center;
}

.wordmark a,
.wordmark {
	font-family: var(--wp--preset--font-family--fraunces);
	font-weight: 900;
	font-size: 22px;
	letter-spacing: -0.02em;
	color: var(--wp--preset--color--text);
	text-decoration: none;
}

.nav {
	display: flex;
	gap: 40px;
	align-items: center;
}

.nav a {
	color: var(--wp--preset--color--text-muted);
	text-decoration: none;
	font-size: 14px;
	transition: color 0.15s ease;
}

.nav a:hover {
	color: var(--wp--preset--color--text);
}

.nav .nav-cta {
	border: 1px solid var(--wp--preset--color--line-strong);
	padding: 9px 20px;
	border-radius: 2px;
	color: var(--wp--preset--color--text) !important;
	font-size: 13px;
}

.nav .nav-cta:hover {
	border-color: var(--wp--preset--color--accent);
	background: rgba(196, 41, 63, 0.08);
}

.nav-toggle {
	display: none;
}

.nav-toggle-label {
	display: none;
	cursor: pointer;
	color: var(--wp--preset--color--text);
}

/* ---------- Hero ---------- */

.hero {
	padding: 96px 0 88px;
	border-bottom: 1px solid var(--wp--preset--color--line);
	position: relative;
	overflow: hidden;
}

.hero::before {
	content: '';
	position: absolute;
	right: -180px;
	top: -120px;
	width: 520px;
	height: 520px;
	background: radial-gradient(circle, rgba(196, 41, 63, 0.16) 0%, rgba(196, 41, 63, 0) 68%);
	pointer-events: none;
}

.hero-grid {
	display: grid;
	grid-template-columns: 1.4fr 1fr;
	gap: 64px;
	align-items: end;
	position: relative;
}

.hero h1 {
	font-family: var(--wp--preset--font-family--fraunces);
	font-weight: 900;
	font-size: 64px;
	line-height: 1.02;
	letter-spacing: -0.02em;
	max-width: 11ch;
	margin: 0;
}

.hero-meta p {
	color: var(--wp--preset--color--text-muted);
	font-size: 15px;
	max-width: 34ch;
	margin: 0 0 28px;
}

.hero-actions {
	display: flex;
	gap: 16px;
}

.btn {
	display: inline-block;
	padding: 13px 26px;
	border-radius: 2px;
	font-size: 14px;
	text-decoration: none;
	transition: all 0.15s ease;
	border: 1px solid transparent;
}

.btn-primary,
.btn-primary a {
	background: var(--wp--preset--color--accent);
	color: #f5edea;
}

.btn-primary:hover {
	background: #a81f32;
}

.btn-ghost {
	border-color: var(--wp--preset--color--line-strong);
	color: var(--wp--preset--color--text);
}

.btn-ghost:hover {
	border-color: var(--wp--preset--color--text-muted);
}

/* ---------- Section heads (Drops + Journal share this) ---------- */

.drops,
.journal {
	padding: 88px 0 100px;
}

.journal {
	padding-top: 0;
}

.section-head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	margin-bottom: 40px;
}

.section-head h2 {
	font-family: var(--wp--preset--font-family--fraunces);
	font-weight: 600;
	font-style: italic;
	font-size: 28px;
	margin: 0;
}

.section-head a {
	color: var(--wp--preset--color--text-muted);
	text-decoration: none;
	font-size: 14px;
	border-bottom: 1px solid var(--wp--preset--color--line-strong);
	padding-bottom: 2px;
}

.section-head a:hover {
	color: var(--wp--preset--color--text);
	border-color: var(--wp--preset--color--text);
}

/* ---------- Drops / product card grid ---------- */

.card-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1px;
	background: var(--wp--preset--color--line);
	border: 1px solid var(--wp--preset--color--line);
	list-style: none;
	margin: 0;
	padding: 0;
}

.card-grid > li {
	background: var(--wp--preset--color--surface);
	display: flex;
	flex-direction: column;
	transition: background 0.15s ease;
}

.card-grid > li:hover {
	background: var(--wp--preset--color--surface-hover);
}

.card-art {
	aspect-ratio: 4 / 3;
	background: linear-gradient(135deg, #2a211b 0%, #14100d 100%);
	position: relative;
	display: flex;
	align-items: flex-end;
	padding: 16px;
	overflow: hidden;
}

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

.card-art::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(14, 13, 12, 0) 40%, rgba(14, 13, 12, 0.9) 100%);
	pointer-events: none;
}

.card-play {
	position: relative;
	z-index: 1;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	border: 1px solid var(--wp--preset--color--line-strong);
	background: rgba(14, 13, 12, 0.55);
	display: flex;
	align-items: center;
	justify-content: center;
}

.card-play::after {
	content: '';
	width: 0;
	height: 0;
	border-top: 5px solid transparent;
	border-bottom: 5px solid transparent;
	border-left: 8px solid var(--wp--preset--color--text);
	margin-left: 2px;
}

.card-body {
	padding: 20px 22px 24px;
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.card-tag {
	font-size: 12px;
	color: var(--wp--preset--color--text-muted);
}

.card-title,
.card-title a {
	font-family: var(--wp--preset--font-family--fraunces);
	font-weight: 600;
	font-size: 19px;
	line-height: 1.25;
	color: var(--wp--preset--color--text);
	text-decoration: none;
	margin: 0;
}

.card-data {
	display: flex;
	align-items: center;
	gap: 12px;
	font-family: var(--wp--preset--font-family--space-grotesk);
	font-size: 13px;
	color: var(--wp--preset--color--text-muted);
	margin-top: auto;
	padding-top: 14px;
	border-top: 1px solid var(--wp--preset--color--line);
}

.card-data .divider {
	width: 1px;
	height: 12px;
	background: var(--wp--preset--color--line-strong);
	flex-shrink: 0;
}

.card-data > *:last-child {
	margin-left: auto;
	color: var(--wp--preset--color--text);
	font-weight: 500;
}

/* ---------- Journal ---------- */

.journal-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 48px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.post {
	display: flex;
	gap: 24px;
}

.post-thumb {
	width: 108px;
	height: 108px;
	flex-shrink: 0;
	border-radius: 2px;
	background: linear-gradient(135deg, #241a17 0%, #120e0c 100%);
	overflow: hidden;
}

.post-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.post-date {
	font-size: 12px;
	color: var(--wp--preset--color--text-muted);
	margin-bottom: 6px;
}

.post-title,
.post-title a {
	font-family: var(--wp--preset--font-family--fraunces);
	font-weight: 600;
	font-size: 17px;
	line-height: 1.3;
	margin: 0 0 8px;
	color: var(--wp--preset--color--text);
	text-decoration: none;
}

.post-excerpt {
	font-size: 14px;
	color: var(--wp--preset--color--text-muted);
	max-width: 40ch;
}

.post-excerpt p {
	margin: 0;
}

/* ---------- Footer ---------- */

.site-footer {
	border-top: 1px solid var(--wp--preset--color--line);
	padding: 32px 0;
}

.footer-inner {
	display: flex;
	justify-content: space-between;
	align-items: center;
	color: var(--wp--preset--color--text-muted);
	font-size: 13px;
	flex-wrap: wrap;
	gap: 12px;
}

.footer-inner a {
	color: var(--wp--preset--color--text-muted);
	text-decoration: none;
	margin-left: 24px;
}

.footer-inner a:hover {
	color: var(--wp--preset--color--text);
}

/* ---------- Mobile ----------
 * The mockup only defines "nav { display: none }" below 860px with no
 * replacement — assumption: add a minimal CSS-only (no JS) checkbox-driven
 * dropdown so the nav links stay reachable on mobile instead of vanishing.
 */

@media (max-width: 860px) {
	.hero-grid {
		grid-template-columns: 1fr;
	}

	.hero h1 {
		font-size: 44px;
		max-width: none;
	}

	.card-grid {
		grid-template-columns: 1fr;
	}

	.journal-grid {
		grid-template-columns: 1fr;
	}

	.nav {
		position: absolute;
		top: 100%;
		right: 0;
		left: 0;
		flex-direction: column;
		align-items: flex-start;
		gap: 0;
		background: var(--wp--preset--color--surface);
		border-bottom: 1px solid var(--wp--preset--color--line);
		max-height: 0;
		overflow: hidden;
		transition: max-height 0.2s ease;
	}

	.nav a {
		padding: 14px 32px;
		width: 100%;
	}

	.nav .nav-cta {
		margin: 12px 32px;
		width: fit-content;
	}

	.nav-toggle-label {
		display: block;
	}

	.nav-toggle:checked ~ .nav {
		max-height: 320px;
	}

	.site-header .wp-block-group {
		position: relative;
	}
}
