/* SINGLE SONG PAGE ONLY
   Loaded only for single kw_song posts.
   Base styles come from about.css; this file adds song-specific layout.
*/

body.kw-single-song-page {
	--kw-song-notch-height: 66px;
}

body.kw-single-song-page .kw-section-inner {
	width: min(92vw, 1180px);
}

/* Hero */
body.kw-single-song-page .kw-about-hero.kw-song-hero {
	position: relative;
	min-height: 420px;
	max-height: none;
	height: auto;
	overflow: visible;
	isolation: isolate;
}

@media (min-width: 1025px) {
	body.kw-single-song-page .kw-about-hero.kw-song-hero {
		width: 100vw;
		max-width: none;
		margin-left: calc(50% - 50vw);
		margin-right: calc(50% - 50vw);
	}
}

.kw-song-hero__image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	background-size: cover;
	background-position: center center;
	background-repeat: no-repeat;
	z-index: 0;
}

body.kw-single-song-page .kw-song-hero__overlay {
	position: absolute;
	inset: 0;
	background:
		linear-gradient(
			90deg,
			rgba(5, 9, 5, 0.92) 0%,
			rgba(5, 9, 5, 0.72) 45%,
			rgba(5, 9, 5, 0.35) 100%
		),
		linear-gradient(
			180deg,
			rgba(5, 9, 5, 0.1) 0%,
			rgba(5, 9, 5, 0.65) 100%
		);
	z-index: 1;
}

body.kw-single-song-page .kw-song-hero__content {
	position: relative;
	z-index: 2;
	width: min(92vw, 1180px);
	margin-inline: auto;
	padding-top: 150px;
	padding-bottom: calc(90px + var(--kw-song-notch-height));
}

body.kw-single-song-page .kw-song-hero__content .kw-eyebrow {
	position: relative;
	margin-bottom: 1rem;
	padding-left: 0;
}

body.kw-single-song-page .kw-song-hero__content .kw-eyebrow::before {
	display: none;
}

body.kw-single-song-page .kw-song-hero__content h1 {
	max-width: 720px;
	font-size: clamp(3rem, 5vw, 4.6rem);
	line-height: 0.95;
	color: #f1e8d7;
}

.kw-song-hero__subline {
	max-width: 560px;
	margin: 1.1rem 0 0;
	font-family: var(--kw-font-serif, Georgia, "Times New Roman", serif);
	font-size: clamp(1.1rem, 1.5vw, 1.35rem);
	font-style: italic;
	line-height: 1.4;
	color: rgba(242, 234, 217, 0.92);
}

.kw-song-hero__meta {
	margin: 1rem 0 0.7rem;
	font-family: var(--kw-font-sans, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
	font-size: clamp(0.95rem, 1.1vw, 1.1rem);
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--kw-about-rust, #9a4e32);
}

.kw-song-hero__summary {
	max-width: 560px;
	margin-top: 0.7rem;
	font-family: var(--kw-font-sans, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
	font-size: clamp(1.05rem, 1.2vw, 1.2rem);
	line-height: 1.55;
	color: rgba(242, 234, 217, 0.95);
}

.kw-song-hero__summary p {
	margin: 0 0 0.75rem;
}

.kw-song-hero__summary p:last-child {
	margin-bottom: 0;
}

.kw-song-hero__video {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	margin-top: 1.2rem;
	padding: 0.55rem 1.2rem;
	font-family: var(--kw-font-sans, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	text-decoration: none;
	color: #f2ead9;
	background: transparent;
	border: 1px solid rgba(242, 234, 217, 0.5);
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.kw-song-hero__video:hover,
.kw-song-hero__video:focus-visible {
	background: #f2ead9;
	color: #172019;
	border-color: #f2ead9;
}

.kw-song-hero__video-icon {
	display: inline-block;
	width: 0;
	height: 0;
	border-top: 5px solid transparent;
	border-bottom: 5px solid transparent;
	border-left: 8px solid currentColor;
}

.kw-video-overlay {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 2rem;
	background: rgba(5, 9, 5, 0.94);
	opacity: 0;
	transition: opacity 0.25s ease;
}

.kw-video-overlay.is-open {
	opacity: 1;
}

.kw-video-overlay__wrapper {
	position: relative;
	width: min(960px, 90vw);
	aspect-ratio: 16 / 9;
	background: #000;
}

.kw-video-overlay__iframe {
	width: 100%;
	height: 100%;
	border: 0;
}

.kw-video-overlay__close {
	position: absolute;
	top: -52px;
	right: 0;
	width: 44px;
	height: 44px;
	font-size: 2rem;
	line-height: 1;
	color: #f2ead9;
	background: transparent;
	border: 1px solid rgba(242, 234, 217, 0.4);
	cursor: pointer;
}

.kw-video-overlay__close:hover,
.kw-video-overlay__close:focus-visible {
	background: rgba(242, 234, 217, 0.12);
}

/* Paper area */
body.kw-single-song-page .kw-about-intro.kw-song-intro {
	position: relative;
	z-index: 3;
	margin-top: calc(-1 * var(--kw-song-notch-height));
	background: transparent;
}

body.kw-single-song-page .kw-song-paper {
	position: relative;
	background:
		radial-gradient(circle at 18% 8%, rgba(255, 255, 255, 0.55), transparent 26%),
		radial-gradient(circle at 86% 82%, rgba(37, 37, 30, 0.05), transparent 34%),
		linear-gradient(0deg, rgba(37, 37, 30, 0.025), rgba(37, 37, 30, 0.025)),
		#eee6d5;
	padding-block: 3rem 4rem;
}

body.kw-single-song-page .kw-song-paper .kw-section-inner {
	position: relative;
	z-index: 1;
}

/* Top: player */
.kw-song-top {
	padding-bottom: 2.5rem;
	border-bottom: 1px solid rgba(154, 78, 50, 0.25);
	margin-bottom: 2.5rem;
}

.kw-song-player {
	display: flex;
	align-items: center;
	gap: 1.25rem;
	flex-wrap: wrap;
}

.kw-song-player__button {
	display: inline-flex;
	align-items: center;
	gap: 0.75rem;
	min-height: 52px;
	padding: 0 1.8rem;
	font-family: var(--kw-font-sans, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.18em;
	line-height: 1;
	text-transform: uppercase;
	text-decoration: none;
	color: #172019;
	background: transparent;
	border: 1px solid rgba(23, 32, 25, 0.38);
	cursor: pointer;
	transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.kw-song-player__button:hover,
.kw-song-player__button:focus-visible {
	color: #fffaf0;
	background: #9b4f2f;
	border-color: #9b4f2f;
}

.kw-song-player__button.is-playing {
	color: #fffaf0;
	background: #9b4f2f;
	border-color: #9b4f2f;
}

.kw-song-player__icon {
	display: inline-block;
	width: 0;
	height: 0;
	border-top: 6px solid transparent;
	border-bottom: 6px solid transparent;
	border-left: 10px solid currentColor;
}

.kw-song-player__button.is-playing .kw-song-player__icon {
	width: 10px;
	height: 12px;
	border: 0;
	background: currentColor;
	border-left: 3px solid currentColor;
	border-right: 3px solid currentColor;
	background-clip: content-box;
}

.kw-song-player__times {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	flex: 1;
	min-width: 220px;
}

.kw-song-player__time-current,
.kw-song-player__time-remaining {
	flex-shrink: 0;
	min-width: 3.2ch;
	font-family: var(--kw-font-sans, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.05em;
	color: rgba(37, 37, 30, 0.9);
}

.kw-song-player__time-current {
	text-align: right;
}

.kw-song-player__progress {
	flex: 1;
	position: relative;
	height: 6px;
	background: rgba(23, 32, 25, 0.14);
	border-radius: 3px;
	cursor: pointer;
}

.kw-song-player__progress:focus-visible {
	outline: 2px solid var(--kw-about-rust, #9a4e32);
	outline-offset: 3px;
}

.kw-song-player__progress-fill {
	display: block;
	height: 100%;
	width: 0%;
	background: var(--kw-about-rust, #9a4e32);
	border-radius: 3px;
	pointer-events: none;
}

.kw-song-summary__text {
	margin: 0;
	font-family: var(--kw-font-serif, Georgia, "Times New Roman", serif);
	font-size: clamp(1.05rem, 1.15vw, 1.2rem);
	line-height: 1.6;
	color: rgba(37, 37, 30, 0.92);
}

.kw-song-summary__text p {
	margin: 0 0 1rem;
}

.kw-song-summary__text p:last-child {
	margin-bottom: 0;
}

/* Lyrics */
.kw-song-lyrics {
	max-width: 760px;
}

.kw-song-lyrics__title {
	font-family: var(--kw-font-sans, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--kw-about-rust, #9a4e32);
	margin: 0 0 1.5rem;
}

.kw-song-lyrics__content {
	font-family: var(--kw-font-serif, Georgia, "Times New Roman", serif);
	font-size: clamp(1.1rem, 1.25vw, 1.25rem);
	line-height: 1.75;
	color: rgba(37, 37, 30, 0.95);
	text-align: left;
	white-space: pre-wrap;
}

.kw-song-lyrics__content > br {
	display: none;
}

.kw-song-lyrics__tag {
	display: block;
	margin-top: 1.5rem;
	margin-bottom: 0;
	padding: 0;
	font-family: var(--kw-font-sans, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
	font-size: 0.68rem;
	font-weight: 800;
	letter-spacing: 0.18em;
	line-height: 1.2;
	text-transform: uppercase;
	text-align: left;
	color: var(--kw-about-rust, #9a4e32);
}

.kw-song-lyrics__tag:first-child {
	margin-top: 0;
}

/* Responsive */
@media (max-width: 1024px) {
	body.kw-single-song-page .kw-song-hero__content {
		padding-top: 130px;
		padding-bottom: calc(70px + var(--kw-song-notch-height));
	}

	.kw-song-top {
		gap: 2rem;
	}
}

@media (max-width: 767px) {
	body.kw-single-song-page .kw-about-hero.kw-song-hero {
		min-height: 360px;
		max-height: none;
		height: auto;
		aspect-ratio: auto;
		overflow: visible;
	}

	body.kw-single-song-page .kw-song-hero__content {
		width: 100%;
		max-width: 100%;
		padding-left: 28px;
		padding-right: 28px;
		padding-top: 120px;
		padding-bottom: calc(90px + var(--kw-song-notch-height));
	}

	body.kw-single-song-page .kw-song-hero__content h1 {
		font-size: clamp(2.6rem, 10vw, 3.6rem);
	}

	.kw-song-hero__subline {
		max-width: 100%;
	}

	.kw-song-hero__summary {
		width: 100%;
		max-width: 100%;
		white-space: normal;
		overflow-wrap: break-word;
		word-break: normal;
		box-sizing: border-box;
		padding-right: 0;
	}

	.kw-song-hero__video {
		margin-top: 1.2rem;
	}

	.kw-song-top {
		gap: 1.5rem;
		padding-bottom: 2rem;
		margin-bottom: 2rem;
	}

	.kw-song-player__times {
		min-width: 100%;
	}

	.kw-song-player__button {
		width: 100%;
		justify-content: center;
	}

	.kw-song-lyrics__content {
		font-size: 1.05rem;
		line-height: 1.7;
	}
}

@media (max-width: 620px) {
	body.kw-single-song-page .kw-about-topbar,
	body.kw-single-song-page .kw-global-header {
		min-height: auto;
		padding-top: 1.3rem;
	}

	body.kw-single-song-page .kw-about-nav,
	body.kw-single-song-page .kw-global-header__nav {
		gap: 0.9rem;
		flex-wrap: wrap;
	}

	body.kw-single-song-page .kw-about-nav a,
	body.kw-single-song-page .kw-global-header__nav a {
		font-size: 0.64rem;
	}

	body.kw-single-song-page .kw-song-hero__content {
		padding-top: 110px;
		padding-bottom: calc(80px + var(--kw-song-notch-height));
	}

	body.kw-single-song-page .kw-song-hero__content h1 {
		font-size: clamp(2.4rem, 10vw, 3.2rem);
	}
}
