/*
Theme Name: OMWTFYB Reliquary
Theme URI: https://blog.omwtfyb-ifym.com/
Description: A dark, gothic "Fortune-Teller Reliquary" child theme of Twenty Twenty-Five, built to match the OMWTFYB & IFYM zine's real visual identity (grimy punk-zine aesthetic).
Author: Garry (for OMWTFYB & IFYM)
Template: twentytwentyfive
Requires at least: 6.7
Requires PHP: 7.2
Version: 1.0.0
Text Domain: omwtfyb-reliquary
*/

/*
 * Pragmatic CSS fallback layer.
 *
 * theme.json (colors, typography, spacing) does the real styling work for
 * this block theme. The rules below only cover things theme.json's schema
 * doesn't reach cleanly: the body's fine dot-grain texture and the grime
 * wallpaper wash the live zine uses on its background, and a couple of
 * small brand accents (rotated headings, red text-selection) that are
 * cheap here and expensive to model as block-style overrides.
 */

body {
	background-color: #040404;
	background-image: radial-gradient(rgba(228, 225, 218, 0.07) 0.6px, transparent 0.6px);
	background-size: 5px 5px;
}

.wp-site-blocks {
	background-image:
		linear-gradient(90deg, rgba(4, 4, 4, 0.85), rgba(4, 4, 4, 0.96)),
		url("./assets/grime-wallpaper.jpg");
	background-position: center top;
	background-size: cover;
	background-attachment: fixed;
	background-blend-mode: multiply, luminosity;
}

h1, h2, h3, h4, h5, h6 {
	letter-spacing: -0.01em;
}

::selection {
	background-color: #e11b22;
	color: #f7f5f1;
}

a {
	text-decoration-thickness: 1px;
	text-underline-offset: 2px;
}

.custom-logo {
	filter: drop-shadow(0 2px 0 #000);
}

/*
 * Twenty Twenty-Five's compiled style.css hardcodes #fff for the mobile
 * nav overlay and submenu dropdown backgrounds (not theme.json-driven),
 * which would otherwise show a stock-white panel against this dark theme.
 */
.wp-block-navigation:not(.has-background) .wp-block-navigation__submenu-container,
.wp-block-navigation__responsive-container.is-menu-open:not(.disable-default-overlay) {
	background-color: #0d0d0d;
	color: #e4e1da;
}

/*
 * Persistent header/footer (ported from the React zine's ZineHeader/
 * ZineFooter components — see site/repo/src/components/ZineLayout.tsx).
 * Rendered via wp:html blocks in parts/header.html and parts/footer.html
 * so this WP blog shares real chrome with the rest of the site instead of
 * falling back to the parent theme's default header/footer.
 */

.omwtfyb-header {
	position: sticky;
	top: 0;
	z-index: 40;
	background: rgba(4, 4, 4, 0.95);
}

.omwtfyb-header-inner {
	max-width: 1200px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.75rem 1.5rem;
}

.omwtfyb-header::after {
	content: "";
	pointer-events: none;
	position: absolute;
	left: 0;
	right: 0;
	bottom: -0.5rem;
	height: 0.6rem;
	background: #e4e1da;
	clip-path: polygon(0 0, 6% 18%, 13% 3%, 21% 24%, 30% 6%, 39% 22%, 49% 2%, 58% 18%, 67% 5%, 77% 24%, 87% 4%, 94% 20%, 100% 2%, 100% 38%, 92% 66%, 84% 43%, 74% 78%, 63% 48%, 53% 82%, 43% 51%, 32% 75%, 22% 45%, 11% 81%, 0 52%);
	opacity: 0.9;
}

.omwtfyb-header-brand {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	text-decoration: none;
}

.omwtfyb-header-logo {
	border-radius: 9999px;
	display: block;
	filter: drop-shadow(0 2px 0 #000);
}

.omwtfyb-wordmark {
	font-family: "Permanent Marker", cursive;
	color: #e4e1da;
	font-size: 1.1rem;
	letter-spacing: 0.01em;
	white-space: nowrap;
}

.omwtfyb-wordmark-footer {
	font-size: 1.6rem;
}

.omwtfyb-amp {
	color: #e11b22;
	font-family: "Cormorant Garamond", Georgia, serif;
	font-style: italic;
}

.omwtfyb-tm {
	font-size: 0.55em;
	vertical-align: super;
}

.omwtfyb-header-nav {
	display: flex;
	gap: 0.25rem;
	flex-wrap: wrap;
}

.omwtfyb-nav-item {
	font-family: "Courier Prime", monospace;
	text-transform: uppercase;
	font-size: 0.7rem;
	letter-spacing: 0.06em;
	color: #9e9b96;
	text-decoration: none;
	padding: 0.5rem 0.65rem;
	clip-path: polygon(0 12%, 16% 2%, 34% 9%, 52% 0, 69% 10%, 87% 2%, 100% 13%, 96% 88%, 79% 100%, 61% 91%, 42% 100%, 23% 90%, 2% 100%);
	transition: color 0.15s, background-color 0.15s;
}

.omwtfyb-nav-item:hover {
	color: #e4e1da;
	background-color: #0d0d0d;
}

.omwtfyb-header-actions {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.omwtfyb-icon-link {
	color: #9e9b96;
	display: inline-flex;
	padding: 0.4rem;
	text-decoration: none;
}

.omwtfyb-icon-link:hover {
	color: #e4e1da;
}

.omwtfyb-shop-btn {
	font-family: "Courier Prime", monospace;
	text-transform: uppercase;
	font-size: 0.7rem;
	letter-spacing: 0.06em;
	background: #bc0012;
	color: #e4e1da;
	padding: 0.55rem 0.9rem;
	text-decoration: none;
	white-space: nowrap;
}

.omwtfyb-shop-btn:hover {
	background: #e11b22;
	color: #040404;
}

.omwtfyb-footer {
	position: relative;
	background: #0d0d0d;
	padding: 3rem 1.5rem 2.5rem;
	margin-top: 2rem;
	overflow: hidden;
}

.omwtfyb-footer::before {
	content: "";
	pointer-events: none;
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 0.6rem;
	background: #e4e1da;
	clip-path: polygon(0 20%, 8% 2%, 16% 28%, 26% 5%, 35% 31%, 45% 4%, 55% 27%, 65% 1%, 76% 30%, 86% 6%, 94% 25%, 100% 3%, 100% 55%, 91% 83%, 81% 53%, 71% 88%, 61% 56%, 51% 91%, 41% 58%, 31% 86%, 21% 54%, 11% 90%, 0 62%);
	opacity: 0.78;
}

.omwtfyb-footer-inner {
	max-width: 1200px;
	margin: 0 auto;
	display: grid;
	gap: 2rem;
	grid-template-columns: 1.3fr 1fr;
	position: relative;
	z-index: 1;
}

@media (max-width: 640px) {
	.omwtfyb-footer-inner {
		grid-template-columns: 1fr;
	}
}

.omwtfyb-footer-tagline {
	margin-top: 0.75rem;
	max-width: 32rem;
	font-family: "Cormorant Garamond", Georgia, serif;
	font-size: 1.05rem;
	line-height: 1.5;
	color: #9e9b96;
}

.omwtfyb-footer-nav {
	display: grid;
	grid-template-columns: repeat(2, auto);
	gap: 0.75rem 1.5rem;
	font-family: "Courier Prime", monospace;
	text-transform: uppercase;
	font-size: 0.75rem;
	letter-spacing: 0.05em;
	align-content: start;
	justify-content: end;
}

@media (max-width: 640px) {
	.omwtfyb-footer-nav {
		justify-content: start;
	}
}

.omwtfyb-footer-nav a {
	color: #9e9b96;
	text-decoration: none;
}

.omwtfyb-footer-nav a:hover {
	color: #e4e1da;
}

.omwtfyb-footer-seal {
	position: absolute;
	right: 1rem;
	bottom: 1rem;
	opacity: 0.12;
	pointer-events: none;
}

/*
 * Single-post readable type scale. theme.json's generic elements.heading
 * setting can't size h1/h2/h3 differently, so that's handled here instead
 * of fighting the schema for something CSS does natively.
 */
.entry-content h1, .wp-block-post-content h1 { font-size: 2.4rem; line-height: 1.15; }
.entry-content h2, .wp-block-post-content h2 { font-size: 1.5rem; line-height: 1.25; margin-top: 2.5rem; }
.entry-content h3, .wp-block-post-content h3 { font-size: 1.2rem; line-height: 1.3; }
.entry-content p, .wp-block-post-content p { max-width: 44rem; }
.wp-block-post-title { font-size: 2.6rem !important; line-height: 1.1 !important; max-width: 44rem; margin-inline: auto; }

/*
 * Mobile header — the desktop layout above just wraps at narrow widths
 * with no actual responsive treatment, stacking logo/nav/actions into
 * three ugly rows. Collapse to a compact single-row bar instead.
 */
@media (max-width: 640px) {
	.omwtfyb-header-inner {
		flex-wrap: nowrap;
		padding: 0.6rem 1rem;
		gap: 0.5rem;
	}

	.omwtfyb-header-logo {
		width: 32px;
		height: 32px;
	}

	.omwtfyb-wordmark {
		font-size: 0.75rem;
	}

	.omwtfyb-header-nav {
		display: none;
	}

	.omwtfyb-shop-btn {
		padding: 0.4rem 0.6rem;
		font-size: 0.6rem;
	}
}

/*
 * Prevent a single orphaned word wrapping onto its own line in headings
 * (e.g. "THE" alone above "GYM BROS WHO..."). Widely supported now.
 */
.wp-block-post-title, .entry-content h1, .entry-content h2, .entry-content h3,
.wp-block-post-content h1, .wp-block-post-content h2, .wp-block-post-content h3 {
	text-wrap: balance;
}

/* Same fix for body copy so paragraphs don't dangle a single word either. */
.entry-content p, .wp-block-post-content p {
	text-wrap: pretty;
}
