/*
Theme Name: Korab Shaqiri - Barok
Theme URI: https://barokentertainment.com/
Description: The site for Korab Shaqiri, artist, composer, songwriter and producer, under the Barok Entertainment Group identity. A child theme of Muzica. Adds a Music & Work catalogue with a Role field, an editorial homepage assembled from that content, a Spotify sync, an events layer that follows The Events Calendar when it is active, and a now-playing bar cued to the latest release. Nothing in the parent theme is edited, so Muzica can still be updated.
Author: Barok Entertainment Group
Author URI: https://barokentertainment.com/
Version: 1.10.0
Tested up to: 6.9
Requires at least: 5.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: muzica
Template: muzica
*/

/* =Child-Theme customization starts here
------------------------------------------------------------ */

/* ---------------------------------------------------------------
   Tokens
   Every colour, edge, layer and timing the site uses is named here
   and nowhere else. Two of these are overwritten from PHP at render
   time: --korab-bronze carries the Customizer's accent colour, and
   --korab-serif / --korab-sans / --korab-tight carry the chosen
   typeface pair. The values below are what the site falls back to
   if that inline style is ever missing, so the stylesheet stands on
   its own.
   --------------------------------------------------------------- */
:root {
	/* Ink: the ivory, at the five levels the design actually uses.
	   Every one of them clears WCAG AA on the ground below. */
	--korab-ivory: #F2EEE5;
	--korab-ink: #F2EEE5;
	--korab-ink-strong: rgba(242, 238, 229, 0.78);
	--korab-ink-dim: rgba(242, 238, 229, 0.62);
	--korab-ink-muted: rgba(242, 238, 229, 0.55);
	/* There is no level below muted: anything quieter stops passing AA at
	   the sizes this design sets small print in, so the scale stops here
	   and decoration uses the mark tokens instead. */

	/* Ground */
	--korab-black: #080808;
	--korab-bg: #080808;
	--korab-bg-soft: #0E0E0E;
	--korab-bg-bar: rgba(8, 8, 8, 0.92);
	--korab-bg-veil: rgba(8, 8, 8, 0.94);
	--korab-bg-deep: rgba(8, 8, 8, 0.97);

	/* Line */
	--korab-rule: rgba(242, 238, 229, 0.14);
	--korab-rule-soft: rgba(242, 238, 229, 0.12);
	--korab-rule-strong: rgba(242, 238, 229, 0.3);

	/* Accent */
	--korab-bronze: #A38A65;

	/* Marks that are drawn rather than read, so contrast rules do not apply */
	--korab-mark-quiet: rgba(242, 238, 229, 0.16);
	--korab-mark-loud: rgba(242, 238, 229, 0.3);
	--korab-wave-idle: rgba(242, 238, 229, 0.22);

	/* The generated sleeve ground */
	--korab-sleeve-1: #16150F;
	--korab-sleeve-2: #0C0C0C;
	--korab-sleeve-3: #070707;

	/* Type. The families arrive from PHP; these are the fallbacks. */
	--korab-serif: 'Instrument Serif', 'Cormorant Garamond', Georgia, serif;
	--korab-sans: 'Inter', 'Helvetica Neue', Arial, sans-serif;
	--korab-tight: -0.02em;

	/* Space */
	--korab-gap: clamp(24px, 3vw, 44px);
	--korab-pad-x: clamp(20px, 5vw, 64px);
	--korab-wrap: 1280px;

	/* Layers, in the order they stack */
	--korab-layer-embed: 8999;
	--korab-layer-player: 9000;
	--korab-layer-panel: 9200;
	--korab-layer-bar: 9300;

	/* Motion */
	--korab-ease: cubic-bezier(0.16, 1, 0.3, 1);
	--korab-quick: 0.3s;
	--korab-slow: 0.7s;

	/* Metrics */
	--korab-bar-h: 84px;
}

/* Room at the foot of the page so the bar never covers the last line. */
body.has-korab-player { padding-bottom: var(--korab-bar-h); }

/* ---------------------------------------------------------------
   The bar
   --------------------------------------------------------------- */
.korab-player {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: var(--korab-layer-player);
	height: var(--korab-bar-h);
	display: flex;
	align-items: center;
	gap: 20px;
	padding-right: clamp(12px, 2vw, 28px);
	background: var(--korab-bg-veil);
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
	border-top: 1px solid var(--korab-rule-soft);
	transform: translateY(110%);
	transition: transform var(--korab-slow) var(--korab-ease);
	font-family: var(--korab-sans);
	color: var(--korab-ink);
}
.korab-player.is-in { transform: none; }

.korab-player::before {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	top: -1px;
	height: 1px;
	background: linear-gradient(to right, transparent, var(--korab-bronze) 22%, var(--korab-bronze) 60%, transparent);
	opacity: 0.7;
}

.korab-player__progress {
	position: absolute;
	left: 0;
	top: 0;
	height: 2px;
	width: 0;
	background: var(--korab-bronze);
	opacity: 0.9;
	transition: width 0.4s linear;
}

.korab-player__art {
	width: var(--korab-bar-h);
	height: var(--korab-bar-h);
	flex-shrink: 0;
	overflow: hidden;
}
.korab-player__art {
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(150deg, var(--korab-sleeve-1) 0%, var(--korab-sleeve-2) 100%);
	border-right: 1px solid var(--korab-rule-soft);
}
/* A class rule with display would otherwise beat the browser's own
   [hidden] rule and leave the empty image holding its space. */
.korab-player__art img[hidden] { display: none; }
.korab-player__art img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 50% 22%;
	display: block;
	margin: 0;
	border-radius: 0;
}
/* Stands in when a release has no sleeve art of its own. */
.korab-player__glyph {
	font-family: var(--korab-serif);
	font-size: 30px;
	line-height: 1;
	color: var(--korab-ink-muted);
}

.korab-player__play {
	width: 42px;
	height: 42px;
	flex-shrink: 0;
	margin-left: clamp(8px, 1.4vw, 20px);
	border-radius: 50%;
	border: 1px solid var(--korab-bronze);
	background: transparent;
	color: var(--korab-bronze);
	font-size: 11px;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	padding: 0;
	transition: background 0.35s ease, color 0.35s ease;
}
.korab-player__play:hover,
.korab-player__play:focus-visible { background: var(--korab-bronze); color: var(--korab-bg); }

.korab-player__meta { flex-shrink: 0; width: clamp(150px, 20vw, 240px); min-width: 0; }
.korab-player__eyebrow {
	margin: 0;
	font-size: 9px;
	text-transform: uppercase;
	letter-spacing: 0.28em;
	color: var(--korab-bronze);
	line-height: 1.2;
}
.korab-player__title {
	margin: 5px 0 0;
	font-family: var(--korab-serif);
	font-weight: 400;
	font-size: 20px;
	line-height: 1;
	color: var(--korab-ink);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.korab-player__title a { color: inherit; text-decoration: none; transition: color 0.3s ease; }
.korab-player__title a:hover { color: var(--korab-bronze); }
.korab-player__artist {
	margin: 4px 0 0;
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: 0.22em;
	color: var(--korab-ink-dim);
	line-height: 1.2;
}

.korab-wave { display: flex; align-items: center; gap: 3px; flex: 1; height: 34px; min-width: 0; }
.korab-wave i {
	display: block;
	width: 3px;
	border-radius: 2px;
	background: var(--korab-wave-idle);
	height: 26%;
}
.korab-wave i.is-played { background: var(--korab-bronze); }
.korab-wave.is-playing i { animation: korab-pulse 1.15s ease-in-out infinite; }
.korab-wave.is-playing i:nth-child(5n+2) { animation-delay: 0.13s; }
.korab-wave.is-playing i:nth-child(5n+3) { animation-delay: 0.27s; }
.korab-wave.is-playing i:nth-child(5n+4) { animation-delay: 0.41s; }
.korab-wave.is-playing i:nth-child(5n+5) { animation-delay: 0.55s; }
@keyframes korab-pulse {
	0%, 100% { transform: scaleY(0.55); }
	50% { transform: scaleY(1.25); }
}

.korab-player__time {
	flex-shrink: 0;
	margin: 0;
	font-size: 10px;
	letter-spacing: 0.22em;
	color: var(--korab-ink-dim);
	font-variant-numeric: tabular-nums;
}

.korab-player__link {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: 0.28em;
	color: var(--korab-ink);
	border: 1px solid var(--korab-rule-strong);
	border-radius: 999px;
	padding: 10px 18px;
	text-decoration: none;
	transition: border-color 0.35s ease, color 0.35s ease;
}
.korab-player__link:hover { border-color: var(--korab-bronze); color: var(--korab-bronze); }

.korab-player__chev {
	background: none;
	border: 0;
	color: var(--korab-ink-muted);
	font-size: 13px;
	padding: 8px;
	cursor: pointer;
	transition: color 0.3s ease, transform 0.3s ease;
}
.korab-player__chev:hover { color: var(--korab-bronze); }
.korab-player__chev[aria-expanded="true"] { transform: rotate(180deg); }

/* ---------------------------------------------------------------
   The Spotify drawer
   --------------------------------------------------------------- */
.korab-embed {
	position: fixed;
	left: 0;
	right: 0;
	bottom: var(--korab-bar-h);
	z-index: var(--korab-layer-embed);
	background: var(--korab-bg-deep);
	border-top: 1px solid var(--korab-rule-soft);
	padding: 12px clamp(12px, 2vw, 28px);
	transform: translateY(115%);
	transition: transform 0.5s var(--korab-ease);
}
.korab-embed.is-open { transform: none; }
.korab-embed iframe { display: block; width: 100%; border: 0; border-radius: 12px; }

/* ---------------------------------------------------------------
   Small screens — the bar keeps the essentials
   --------------------------------------------------------------- */
@media (max-width: 900px) {
	:root { --korab-bar-h: 74px; }
	.korab-wave,
	.korab-player__time,
	.korab-player__link { display: none; }
	.korab-player__meta { flex: 1; width: auto; }
	.korab-player__title { font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
	.korab-player,
	.korab-embed { transition: none; }
	.korab-wave.is-playing i { animation: none; }
}

/* Screen-reader helper, in case the parent theme's is scoped differently. */
.korab-player .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}
