/*
Theme Name: Unrelenting
Theme URI: https://www.unrelenting.show/
Author: Gene Naftulyev
Description: Dark, cover-art-first theme for the Unrelenting podcast. A big player for the newest episode, a wall of covers, and one page per episode. Plays the audio attached to each post (the standard WordPress enclosure that PowerPress and Seriously Simple Podcasting save).
Version: 1.0.0
Requires at least: 6.3
Requires PHP: 7.4
License: GNU General Public License v3 or later
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Text Domain: unrelenting
*/

/* ---------- Tokens ---------- */
:root {
	--k: #0b0b0d;
	--y: #ffe21f;
	--tx: #f2f2f2;
	--mu: #c9c9cf;
	--pan: #17171b;
	--line: #2c2c33;
	--gutter: 28px;
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
	margin: 0;
	background: var(--k);
	color: var(--tx);
	font: 16px/1.55 "Instrument Sans", system-ui, sans-serif;
	-webkit-text-size-adjust: 100%;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--y); }
button { font: inherit; color: inherit; cursor: pointer; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
[tabindex]:focus-visible { outline: 3px solid #6aa7ff; outline-offset: 2px; }

.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
	height: 1px; margin: -1px; overflow: hidden; padding: 0;
	position: absolute; width: 1px; word-wrap: normal !important;
}
.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 12px; top: 12px; background: var(--y); color: #111; padding: 8px 12px; z-index: 100; }

/* ---------- Header ---------- */
.bar {
	display: flex; gap: 18px; align-items: center; flex-wrap: wrap;
	padding: 20px var(--gutter);
}
.bar .logo {
	font: 700 30px/1 "Barlow Condensed", sans-serif;
	letter-spacing: .06em; text-transform: uppercase;
	color: var(--y); text-decoration: none; margin-right: auto;
}
.menu ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 20px; flex-wrap: wrap; }
.menu a {
	color: #fff; text-decoration: none; font-weight: 600; font-size: 13px;
	text-transform: uppercase; letter-spacing: .1em;
}
.menu a:hover { text-decoration: underline; }

/* On the home page the bar sits on top of the big panel. */
.home .bar { position: absolute; inset: 0 0 auto 0; z-index: 3; }
.home .now { padding-top: 96px; }

/* ---------- Now playing panel ---------- */
.now { position: relative; overflow: hidden; isolation: isolate; padding: 28px var(--gutter) 36px; }
.now .bg {
	position: absolute; inset: -60px; z-index: -1;
	background-size: cover; background-position: center;
	filter: blur(46px) saturate(1.3) brightness(.55);
}
.now .row {
	display: grid; grid-template-columns: minmax(0, var(--cover, 360px)) 1fr; gap: 34px;
	align-items: start; max-width: 1280px; margin: 0 auto;
}
.now .cover { display: block; min-width: 0; margin-top: var(--cover-top, 0); }
.now .cover img {
	width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px;
	box-shadow: 0 24px 60px rgba(0, 0, 0, .6);
}
.now .info { min-width: 0; overflow-wrap: anywhere; }

.no {
	font: 700 clamp(96px, 15vw, 190px)/.8 "Barlow Condensed", sans-serif;
	color: var(--y); margin: 0 0 6px; letter-spacing: .01em;
}
.lab {
	font: 600 13px "Barlow Condensed", sans-serif; letter-spacing: .2em;
	text-transform: uppercase; color: var(--y);
}
.now .title {
	font: 700 clamp(44px, 7vw, 92px)/.92 "Barlow Condensed", sans-serif;
	text-transform: uppercase; margin: 6px 0 10px; text-wrap: balance;
}
.now .title a { color: inherit; text-decoration: none; }
.now .meta {
	color: #e6e6ec; font-size: 17px; line-height: 1.45; max-width: 52ch; margin: 0 0 20px;
}

/* ---------- Player ---------- */
.ctl { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.pp {
	background: var(--y); color: #111; border: 0; border-radius: 999px;
	padding: 13px 26px; font: 700 15px "Barlow Condensed", sans-serif;
	letter-spacing: .14em; text-transform: uppercase;
}
.tm { font-variant-numeric: tabular-nums; font-weight: 600; min-width: 3.2ch; }
.prog {
	flex: 1; min-width: 140px; height: 5px; background: rgba(255, 255, 255, .2);
	border-radius: 9px; overflow: hidden; cursor: pointer;
}
.prog i { display: block; height: 100%; width: 0; background: var(--y); }
a.mp3 {
	border: 2px solid var(--y); color: var(--y); border-radius: 999px; padding: 11px 22px;
	font: 700 15px "Barlow Condensed", sans-serif; letter-spacing: .14em;
	text-transform: uppercase; text-decoration: none;
}
a.mp3:hover { background: var(--y); color: #111; }

/* ---------- Cover wall ---------- */
.sec-head {
	display: flex; justify-content: space-between; align-items: baseline;
	gap: 16px; flex-wrap: wrap; padding: 28px var(--gutter) 14px;
}
.sec-head h2 {
	font: 700 34px/1 "Barlow Condensed", sans-serif; text-transform: uppercase;
	letter-spacing: .04em; margin: 0;
}
.sec-head a { font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .1em; }

.wall { display: grid; grid-template-columns: repeat(5, 1fr); }
.t { position: relative; display: block; background: #000; aspect-ratio: 1; overflow: hidden; min-width: 0; }
.t img {
	width: 100%; height: 100%; object-fit: cover;
	filter: saturate(.85) brightness(.8); transition: filter .25s, transform .4s;
}
.t:hover img, .t:focus-visible img { filter: none; transform: scale(1.05); }
.t .n {
	position: absolute; left: 10px; bottom: 8px; color: #fff;
	font: 700 30px "Barlow Condensed", sans-serif; text-shadow: 0 2px 10px #000; opacity: .9;
}
.t .tt {
	position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
	text-align: center; padding: 12px; background: rgba(0, 0, 0, .6); opacity: 0;
	font: 700 22px/1 "Barlow Condensed", sans-serif; text-transform: uppercase; color: #fff;
	transition: opacity .2s;
}
.t:hover .tt, .t:focus-visible .tt { opacity: 1; }

/* ---------- About, footer ---------- */
.foot-about { display: grid; gap: 10px; max-width: 78ch; }
.foot-about p { margin: 0; color: var(--mu); }
.listen { display: flex; gap: 8px; flex-wrap: wrap; }
.listen a {
	border: 1px solid #4a4a52; color: #fff; border-radius: 999px; padding: 4px 14px;
	font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; text-decoration: none;
}
.listen a:hover { border-color: var(--y); color: var(--y); }

.site-foot { background: #000; border-top: 1px solid var(--line); padding: 32px var(--gutter) 24px; }
.foot-main { display: flex; gap: 32px; justify-content: space-between; flex-wrap: wrap; }
.foot-menu ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot-menu a { color: #fff; text-decoration: none; font-weight: 600; }
.copy { color: var(--mu); font-size: 13px; margin: 24px 0 0; }

/* ---------- Lists, pages, entries ---------- */
.page-head { padding: 28px var(--gutter) 20px; display: grid; gap: 14px; max-width: 900px; }
.page-head h1 {
	font: 700 clamp(40px, 6vw, 72px)/.95 "Barlow Condensed", sans-serif;
	text-transform: uppercase; margin: 0;
}
.page-head p { margin: 0; color: var(--mu); }
.empty { padding: 0 var(--gutter) 40px; color: var(--mu); }

.search-form { display: flex; gap: 8px; flex-wrap: wrap; }
.search-form input[type="search"] {
	flex: 1; min-width: 200px; background: var(--pan); color: var(--tx);
	border: 1px solid #3a3a42; border-radius: 10px; padding: 12px 14px; font: inherit;
}
.search-form button {
	background: var(--y); color: #111; border: 0; border-radius: 10px; padding: 12px 20px;
	font: 700 15px "Barlow Condensed", sans-serif; letter-spacing: .12em; text-transform: uppercase;
}

.navigation.pagination { padding: 24px var(--gutter) 8px; }
.nav-links { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.page-numbers {
	border: 1px solid #3a3a42; border-radius: 8px; padding: 6px 14px;
	color: #fff; text-decoration: none; font-weight: 600;
}
.page-numbers.current { background: var(--y); color: #111; border-color: var(--y); }
.page-numbers.dots { border: 0; }

.entry { padding: 32px var(--gutter); max-width: calc(72ch + var(--gutter) * 2); overflow-wrap: anywhere; }
.entry > * { max-width: 72ch; }
.entry h2, .entry h3, .entry h4 { font-family: "Barlow Condensed", sans-serif; text-transform: uppercase; letter-spacing: .03em; line-height: 1.05; }
.entry h2 { font-size: 34px; }
.entry h3 { font-size: 26px; }
.entry blockquote { margin: 1.5em 0; padding-left: 18px; border-left: 4px solid var(--y); color: var(--mu); }
.entry pre, .entry code { background: var(--pan); border-radius: 6px; }
.entry pre { padding: 14px; overflow-x: auto; }
.entry code { padding: 2px 6px; }
.entry img { border-radius: 6px; }
.entry table { border-collapse: collapse; display: block; overflow-x: auto; }
.entry td, .entry th { border: 1px solid var(--line); padding: 8px 12px; }
.entry .alignleft { float: left; margin: 0 20px 10px 0; }
.entry .alignright { float: right; margin: 0 0 10px 20px; }
.entry .aligncenter { margin-inline: auto; }
.wp-caption, .gallery-caption, .wp-caption-text { color: var(--mu); font-size: 14px; }
.sticky, .bypostauthor { display: block; }
.entry audio { width: 100%; max-width: 560px; }

.post-navigation { padding: 8px var(--gutter) 48px; }
.post-navigation .nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.post-navigation a {
	display: grid; gap: 4px; padding: 16px; background: var(--pan); border-radius: 10px;
	text-decoration: none; color: #fff; min-width: 0;
}
.post-navigation .nav-next { text-align: right; }
.post-navigation .nav-title { font: 700 22px/1.1 "Barlow Condensed", sans-serif; text-transform: uppercase; overflow-wrap: anywhere; }

/* ---------- Phones ---------- */
@media (max-width: 820px) {
	:root { --gutter: 16px; }
	.home .now { padding-top: 132px; }
	.now .row { grid-template-columns: 1fr; }
	.now .cover img { max-width: 300px; }
	.wall { grid-template-columns: repeat(3, 1fr); }
	.post-navigation .nav-links { grid-template-columns: 1fr; }
	.t .tt { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; animation: none !important; }
}
