/* Siren Internet Vinyl Experience — gatefold booklet, one spread per track. */

:root {
	--bsh-black: #141414;
	--bsh-text: #ece6dd;
	--bsh-muted: #9b958f;
	--bsh-line: rgba(255, 255, 255, 0.12);
	--bsh-red: #c4161c;
	--exp-paper: #0f1114;
	--exp-bar: 104px;
	--exp-size: min(calc(100vh - var(--exp-bar) - 72px), 46vw);
	--exp-lyrics-font: "Source Sans 3", "Source Sans Pro", sans-serif;
	--exp-title-font: Arya, serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
	background: #050505;
	color: var(--bsh-text);
	font: 16px/1.5 var(--exp-lyrics-font);
	-webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--bsh-red); outline-offset: 3px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

.exp {
	position: relative;
	min-height: 100%;
	background: radial-gradient(ellipse at 50% 35%, #1b1b1d 0, #050505 70%);
	overflow: clip; /* not hidden (that makes a scroll box): a lifted booklet corner must not add a scrollbar */
}

.exp-home {
	position: fixed;
	top: 16px;
	left: 20px;
	z-index: 30;
	color: var(--bsh-muted);
	font-size: 13px;
	letter-spacing: 0.08em;
	text-decoration: none;
}
.exp-home:hover { color: var(--bsh-text); }

/* --- Spreads ------------------------------------------------------------ */

.exp-spreads {
	display: grid;
	place-items: center;
	min-height: calc(100vh - var(--exp-bar));
	padding: 52px 20px 20px;
}

.exp-spread {
	position: relative;
	display: grid;
	grid-template-columns: var(--exp-size) var(--exp-size);
	height: var(--exp-size);
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.85);
}
.exp-spread::after { /* the fold */
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: 50%;
	width: 48px;
	margin-left: -24px;
	background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.55) 50%, rgba(255, 255, 255, 0.03) 52%, transparent);
	pointer-events: none;
}
.exp-art img { display: block; width: 100%; height: 100%; object-fit: cover; }

.exp-centrefold { grid-template-columns: calc(var(--exp-size) * 2); }
.exp-centrefold .exp-art img { object-fit: cover; }

.exp-page {
	position: relative;
	display: flex;
	flex-direction: column;
	min-height: 0;
	overflow-y: auto;
	scrollbar-width: thin;
	scrollbar-color: rgba(236, 230, 221, 0.18) transparent;
	padding: 7% 8% 6%;
	background:
		radial-gradient(ellipse at 20% 0%, rgba(255, 255, 255, 0.04), transparent 60%),
		var(--exp-paper);
}
.exp-page::-webkit-scrollbar { width: 6px; }
.exp-page::-webkit-scrollbar-track { background: transparent; }
.exp-page::-webkit-scrollbar-thumb { background: rgba(236, 230, 221, 0.18); border-radius: 3px; }
.exp-page::-webkit-scrollbar-thumb:hover { background: rgba(236, 230, 221, 0.35); }

.exp-number {
	margin: 0 0 4px;
	color: var(--bsh-muted);
	font-size: 12px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}
.exp-title {
	margin: 0 0 14px;
	font: 700 clamp(26px, 2.6vw, 40px)/1.05 var(--exp-title-font);
	letter-spacing: 0.04em;
	text-transform: uppercase;
}
.is-title-in-art .exp-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.exp-play {
	display: inline-flex;
	align-self: flex-start;
	gap: 10px;
	align-items: center;
	margin-bottom: 18px;
	padding: 8px 16px 8px 12px;
	border: 1px solid var(--bsh-text);
	font-size: 12px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}
.exp-play:hover { background: var(--bsh-text); color: #000; }
.exp-play-icon { width: 0; height: 0; border-left: 9px solid currentColor; border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.exp-play.is-playing .exp-play-icon { width: 9px; height: 11px; border: 0; border-left: 3px solid currentColor; border-right: 3px solid currentColor; }

.exp-lyrics {
	margin: 0;
	padding: 0;
	list-style: none;
	column-count: 2;
	column-gap: 2em;
	font-size: var(--exp-lyrics-size, 15px);
	line-height: var(--exp-lyrics-lh, 1.55);
	color: rgba(236, 230, 221, 0.82);
}
.exp-lyrics li { break-inside: avoid; transition: color 0.25s, text-shadow 0.25s; }
.exp-lyrics .exp-gap { height: 0.8em; }
.exp-lyrics .exp-marker { color: var(--bsh-muted); font-style: italic; }
.exp-lyrics .exp-repeat { color: var(--bsh-muted); font-style: italic; }
.exp-lyrics .exp-repeat::before { content: "↻ "; font-style: normal; }
.exp.is-karaoke .exp-lyrics li { color: rgba(236, 230, 221, 0.38); }
.exp.is-karaoke .exp-lyrics li.is-active { color: #fff; text-shadow: 0 0 14px rgba(255, 255, 255, 0.35); }

/* --- Page turn (JS adds .is-turning-next / .is-turning-prev) ------------ */

.exp-spread.is-entering .exp-page { animation: exp-turn 0.6s cubic-bezier(0.3, 0.6, 0.2, 1) both; transform-origin: left center; }
.exp-spread.is-entering.from-prev .exp-page { animation-name: exp-turn-back; }
.exp-spread.is-entering .exp-art { animation: exp-fade 0.6s ease both; }
@keyframes exp-turn { from { transform: perspective(1600px) rotateY(-70deg); filter: brightness(0.4); } to { transform: none; filter: none; } }
@keyframes exp-turn-back { from { transform: perspective(1600px) rotateY(40deg); filter: brightness(0.4); } to { transform: none; filter: none; } }
@keyframes exp-fade { from { opacity: 0.2; } to { opacity: 1; } }

/* --- Player bar --------------------------------------------------------- */

.exp-bar {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 20;
	display: flex;
	gap: 18px;
	align-items: center;
	height: var(--exp-bar);
	padding: 12px 20px;
	background: linear-gradient(0deg, #000 60%, rgba(0, 0, 0, 0.6));
	border-top: 1px solid var(--bsh-line);
}
.exp-record {
	flex: 0 0 64px;
	height: 64px;
	border-radius: 50%;
	background: repeating-radial-gradient(circle, #101010 0 1px, #1c1c1c 1px 3px);
	box-shadow: 0 4px 18px rgba(0, 0, 0, 0.8);
	position: relative;
}
.exp-record-label { position: absolute; inset: 33%; border-radius: 50%; background: center / cover; box-shadow: 0 0 0 2px #000; }
.exp-record.is-spinning { animation: exp-spin 3.6s linear infinite; }
@keyframes exp-spin { to { transform: rotate(360deg); } }

.exp-nav { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(120px, 3fr) minmax(0, 1fr); gap: 14px; align-items: center; min-width: 0; }
.exp-nav { position: relative; }
.exp-now {
	position: absolute;
	left: 50%;
	bottom: calc(50% + 12px);
	max-width: 60%;
	overflow: hidden;
	transform: translateX(-50%);
	color: var(--bsh-muted);
	font-size: 12px;
	letter-spacing: 0.08em;
	white-space: nowrap;
	text-overflow: ellipsis;
}
.exp-now-title { color: var(--bsh-text); }
.exp-now:hover .exp-now-title, .exp-now:focus-visible .exp-now-title { color: var(--bsh-red); }
.exp-now.is-here { cursor: default; }
.exp-now.is-here .exp-now-title { color: var(--bsh-text); }
.exp-prev, .exp-next {
	overflow: hidden;
	color: var(--bsh-muted);
	font-size: 12px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	white-space: nowrap;
	text-overflow: ellipsis;
}
.exp-prev { text-align: right; }
.exp-next { text-align: left; }
.exp-choice-note { max-width: 30em; margin: 0 0 14px; color: var(--bsh-muted); font-size: 14px; line-height: 1.5; text-align: center; }
.exp-login {
	position: absolute;
	right: 20px;
	bottom: calc(100% + 8px);
	padding: 5px 12px;
	border: 1px solid rgba(30, 215, 96, 0.7);
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.75);
	color: #e8f9ee;
	font-size: 12px;
	letter-spacing: 0.06em;
}
.exp-login:hover, .exp-login:focus-visible { background: #1ed760; color: #000; }
.exp-prev:hover, .exp-next:hover { color: var(--bsh-text); }
.exp-progress { display: flex; align-items: center; gap: 10px; padding: 10px 0; }
.exp-progress input { flex: 1; min-width: 0; }
.exp-time { flex: none; min-width: 2.6em; font-size: 11px; letter-spacing: 0.04em; color: var(--bsh-muted); font-variant-numeric: tabular-nums; }
.exp-time-pos { text-align: right; }
.exp-progress input {
	--p: 0%;
	display: block;
	width: 100%;
	height: 3px;
	margin: 0;
	appearance: none;
	-webkit-appearance: none;
	background: linear-gradient(90deg, var(--bsh-red) var(--p), rgba(236, 230, 221, 0.16) var(--p));
	border-radius: 2px;
	cursor: pointer;
}
.exp-progress input::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: var(--bsh-text); border: 0; opacity: 0; transition: opacity 0.15s; }
.exp-progress input::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--bsh-text); border: 0; opacity: 0; transition: opacity 0.15s; }
.exp-progress input::-moz-range-track { background: transparent; }
.exp-progress:hover input::-webkit-slider-thumb, .exp-progress input:focus-visible::-webkit-slider-thumb { opacity: 1; }
/* Touch screens have no hover: the thumb is always there and the bar is a finger high. */
@media (pointer: coarse) {
	.exp-progress input { height: 26px; background: linear-gradient(90deg, var(--bsh-red) var(--p), rgba(236, 230, 221, 0.16) var(--p)) center / 100% 4px no-repeat; }
	.exp-progress input::-webkit-slider-thumb { width: 16px; height: 16px; opacity: 1; }
	.exp-progress input::-moz-range-thumb { width: 16px; height: 16px; opacity: 1; }
	.exp-progress { padding: 0; }
}
.exp-progress:hover input::-moz-range-thumb, .exp-progress input:focus-visible::-moz-range-thumb { opacity: 1; }
.exp-progress:hover input { height: 5px; }

.exp-spotify { flex: 0 0 340px; height: 80px; border-radius: 12px; overflow: hidden; }
.exp-spotify iframe { display: block; width: 100%; }
/* Our own player row (phones, in-app browsers) in the place of the Spotify embed. */
.exp-own { display: none; flex: 0 0 340px; align-items: center; gap: 12px; height: 64px; padding: 0 14px 0 8px; border-radius: 12px; background: linear-gradient(90deg, #3a0b0d, #1c0607); }
.exp.is-own-audio .exp-own { display: flex; }
.exp.is-own-audio .exp-spotify { display: none; }
.exp-own-play { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--bsh-text); color: #000; }
.exp-own-play .exp-play-icon { margin-left: 3px; }
.exp-own-play.is-playing .exp-play-icon { width: 9px; height: 11px; margin: 0; border: 0; border-left: 3px solid currentColor; border-right: 3px solid currentColor; }
.exp-own-title { flex: 1; min-width: 0; overflow: hidden; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.exp-own-spotify { flex: none; padding: 6px 12px; border: 1px solid rgba(30, 215, 96, 0.7); border-radius: 999px; color: #e8f9ee; font-size: 12px; letter-spacing: 0.04em; text-decoration: none; }
.exp-own-spotify:hover, .exp-own-spotify:focus-visible { background: #1ed760; color: #000; }

/* --- Sleeve (start screen on the album URL) ----------------------------- */

.exp-sleeve {
	position: fixed;
	inset: 0 0 var(--exp-bar); /* the Spotify bar stays visible */
	z-index: 25;
	display: flex;
	gap: 6vmin;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: radial-gradient(ellipse at 40% 40%, #1a0b0c, #040404 70%);
	overflow: hidden; /* the record never widens the page */
}
/* The record peeks out of its sleeve and turns slowly; Open draws it out before the booklet opens. */
.exp-sleeve-art { position: relative; flex: none; cursor: pointer; width: min(60vmin, 560px); aspect-ratio: 1; margin-right: calc(min(60vmin, 560px) * 0.38); /* room for the record */ }
.exp-sleeve-cover { position: relative; z-index: 1; display: block; width: 100%; height: 100%; object-fit: cover; box-shadow: 0 30px 90px rgba(0, 0, 0, 0.9); }
.exp-vinyl {
	--out: 30%;
	position: absolute;
	inset: 2.5%;
	border-radius: 50%;
	background: repeating-radial-gradient(circle, #0b0b0b 0 1px, #191919 1px 3px);
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85);
	transform: translateX(var(--out));
	transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.exp-vinyl::after { /* light on the grooves stays put while the record turns */
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background: conic-gradient(from 30deg, transparent 0 8%, rgba(255, 255, 255, 0.07) 13%, transparent 20% 52%, rgba(255, 255, 255, 0.05) 60%, transparent 68%);
}
.exp-vinyl-label { position: absolute; inset: 34%; border-radius: 50%; background: center / cover; box-shadow: 0 0 0 3px #000; animation: exp-spin 9s linear infinite; }
.exp-sleeve-art:hover .exp-vinyl, .exp-sleeve:has(.exp-open:hover, .exp-open:focus-visible) .exp-vinyl { --out: 42%; }
/* Doubled classes: the Open button is still :hover when tapped or clicked, and the hover rule must not hold the record back. */
.exp-sleeve.is-dropping.is-dropping .exp-vinyl.exp-vinyl { --out: 58%; transition-duration: 2.4s; }
.exp-sleeve.is-dropping .exp-vinyl-label { animation-duration: 1.8s; } /* 33 rpm */
.exp-sleeve.is-dropping { animation: exp-sleeve-out 0.6s ease-in 2.6s forwards; } /* with CEREMONY_MS in app.js */
@keyframes exp-sleeve-out { to { opacity: 0; } }
.exp-sleeve-title { margin: 0; font: 700 clamp(40px, 6vw, 84px)/1 var(--exp-title-font); letter-spacing: 0.12em; text-transform: uppercase; }
.exp-sleeve-sub { margin: 6px 0 26px; color: var(--bsh-muted); letter-spacing: 0.16em; text-transform: uppercase; font-size: 13px; }
.exp-open { padding: 12px 22px; border: 1px solid var(--bsh-text); letter-spacing: 0.18em; text-transform: uppercase; font-size: 13px; }
.exp-open:hover { background: var(--bsh-text); color: #000; }

/* --- Login choice -------------------------------------------------------- */

.exp-choice { position: fixed; inset: 0 0 var(--exp-bar); z-index: 40; display: grid; place-items: center; padding: 20px; background: rgba(0, 0, 0, 0.75); }
.exp-choice-box { display: grid; gap: 12px; max-width: 420px; padding: 28px; background: var(--exp-paper); border: 1px solid var(--bsh-line); text-align: center; }
.exp-choice-title { margin: 0 0 6px; color: var(--bsh-muted); }
.exp-choice-login { padding: 12px 18px; background: #1ed760; color: #000; font-weight: 600; border-radius: 999px; }
.exp-choice-samples { padding: 10px 18px; color: var(--bsh-text); text-decoration: underline; text-underline-offset: 3px; }

/* --- Phone ---------------------------------------------------------------- */

@media (max-width: 767px) {
	:root { --exp-bar: 182px; } /* now playing, progress, names, Spotify */
	.exp-spreads { display: block; padding: 0 0 calc(var(--exp-bar) + 12px); }
	.exp-spread { grid-template-columns: 1fr; height: auto; box-shadow: none; }
	.exp-spread::after { display: none; }
	.exp-art { aspect-ratio: 1; }
	.exp-centrefold { grid-template-columns: 1fr; }
	.exp-centrefold .exp-art { aspect-ratio: auto; height: min(78svh, 680px); overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scrollbar-width: none; } /* the band photo at full height, scrolled sideways */
	.exp-centrefold .exp-art::-webkit-scrollbar { display: none; }
	.exp-centrefold .exp-art img { width: auto; max-width: none; height: 100%; }
	.exp-spreads { position: relative; touch-action: pan-y; overflow: hidden; } /* sideways drags turn the page */
	.exp-centrefold .exp-art { touch-action: pan-x pan-y; }
	.exp-spread.is-paper { transform-origin: left center; backface-visibility: hidden; will-change: transform; background: var(--exp-paper, #111); }
	.exp-page { padding: 22px 20px 28px; }
	.exp-lyrics { column-count: 1; overflow: visible; font-size: 15px; }
	.exp-home { position: absolute; top: 12px; left: 14px; padding: 4px 8px; background: rgba(0, 0, 0, 0.55); border-radius: 4px; } /* scrolls away instead of sitting on the lyrics */
	.exp-bar { flex-wrap: wrap; align-content: flex-start; gap: 8px 12px; height: calc(var(--exp-bar) + env(safe-area-inset-bottom)); padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: #000; }
	.exp-record { flex-basis: 44px; height: 44px; }
	.exp-nav { flex: 1 1 calc(100% - 60px); grid-template-columns: 1fr 1fr; }
	.exp-progress { grid-column: 1 / -1; order: -1; }
	.exp-now { position: static; grid-column: 1 / -1; order: -2; max-width: none; transform: none; text-align: left; }
	.exp-now[hidden] { display: block !important; visibility: hidden; } /* keeps its row so the bar does not jump */
	.exp-nav.no-prev .exp-prev { display: none; } /* the progress bar has its own row here, so the next name may take the whole width */
	.exp-nav.no-prev .exp-next { grid-column: 1 / -1; }
	.exp-prev { text-align: left; } /* the names sit at the two ends under the progress bar */
	.exp-next { text-align: right; }
	.exp-login { right: 12px; }
	.exp-spotify { flex: 1 1 100%; }
	.exp.is-own-audio .exp-own { display: none; } /* the record is the play button here */
	.exp.is-own-audio .exp-record::after { content: ""; position: absolute; left: 50%; top: 50%; z-index: 1; border-left: 12px solid var(--bsh-text); border-top: 8px solid transparent; border-bottom: 8px solid transparent; transform: translate(-35%, -50%); filter: drop-shadow(0 0 3px #000); }
	.exp.is-own-audio .exp-record.is-spinning::after { display: none; }
	.exp.is-own-audio { --exp-bar: 112px; } /* now playing, progress, then the record and the names */
	.exp-sleeve { flex-direction: column; text-align: center; }
	.exp-sleeve-art { width: min(64vw, 380px); margin-right: 18%; }
	.exp-vinyl { --out: 22%; }
	.exp-sleeve-art:hover .exp-vinyl, .exp-sleeve:has(.exp-open:hover) .exp-vinyl { --out: 22%; }
	/* Opening: the sleeve steps left and the record comes well out, so its turning label shows. */
	.exp-sleeve-art { transition: transform 1.6s cubic-bezier(0.2, 0.7, 0.2, 1); }
	.exp-sleeve.is-dropping .exp-sleeve-art { transform: translateX(-16%); }
	.exp-sleeve.is-dropping.is-dropping .exp-vinyl.exp-vinyl { --out: 60%; }
}

@media (prefers-reduced-motion: reduce) {
	.exp-record.is-spinning, .exp-vinyl-label { animation: none; }
	.exp-vinyl { transition: none; }
	.exp-spread.is-entering .exp-page { animation-name: exp-fade; }
	.exp-lyrics li { transition: none; }
}

/* --- Draggable booklet (desktop) ---------------------------------------- */

.exp.is-book .exp-spread { display: none !important; }
.exp-book { position: relative; width: calc(var(--exp-size) * 2) !important; } /* StPageFlip sets width:100% inline; the booklet must fit above the player bar */
.exp.is-book .exp-spreads { position: relative; }
.exp-book-page { overflow: hidden; background: var(--exp-paper); }
.exp-book-page::after { /* this page's half of the gatefold crease; turns with the page */
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	width: 28px;
	pointer-events: none;
}
.exp-book-page.is-left::after { right: 0; background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.5)); }
.exp-book-page.is-right::after { left: 0; background: linear-gradient(270deg, rgba(255, 255, 255, 0.02), rgba(0, 0, 0, 0.55) 85%, rgba(0, 0, 0, 0.6)); }
.exp-book-page > .exp-art { width: 100%; height: 100%; }
.exp-book-page > .exp-page { height: 100%; overflow: hidden; }
.exp-book-page > .exp-page.is-overflow { overflow-y: auto; }
.exp-book-page.is-text > .exp-page.is-title-in-art .exp-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.exp-cf-half { width: 100%; height: 100%; background-size: 200% 100%; background-repeat: no-repeat; }
.exp-cf-left { background-position: left center; }
.exp-cf-right { background-position: right center; }
.exp.is-book .stf__parent { box-shadow: 0 30px 80px rgba(0, 0, 0, 0.85); }

@media (pointer: coarse) {
	.exp-progress:hover input { height: 26px; } /* a tap leaves :hover on; keep the finger-high bar */
}
