/**
 * Reverie Sounds — Global Styles
 * Reset, typography, utilities, shared components.
 */

/* ── @font-face: Self-hosted fonts ──
 * Place woff2 files in assets/fonts/.
 * Fallback: Google Fonts import below covers until local files are added.
 */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Syne:wght@400;600;700;800&display=swap');

/* ── Design Tokens ── */
:root {
	/* Backgrounds */
	--bg-primary: #08080a;
	--bg-card: #111114;
	--bg-card-2: #1a1a1f;
	--bg-hover: #222228;

	/* Text */
	--text-primary: #f0f0f2;
	--text-dim: #8a8a96;
	--text-muted: #55555f;

	/* Accent — Reverie Sounds */
	--rs-accent: #4a8fd9;
	--rs-glow: rgba(74, 143, 217, 0.15);

	/* Accent — Reverie XO */
	--xo-accent: #e85535;
	--xo-glow: rgba(232, 85, 53, 0.15);

	/* UI */
	--border: #1e1e24;
	--radius: 12px;
	--radius-sm: 8px;

	/* Typography */
	--font-body: 'Outfit', sans-serif;
	--font-display: 'Syne', sans-serif;
}

/* ── Reset ── */
*,
*::before,
*::after {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	font-family: var(--font-body);
	font-size: 16px;
	font-weight: 400;
	line-height: 1.6;
	color: var(--text-primary);
	background: var(--bg-primary);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: hidden;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: inherit;
	text-decoration: none;
}

ul, ol {
	list-style: none;
}

button, input, textarea, select {
	font-family: inherit;
	font-size: inherit;
	color: inherit;
	background: none;
	border: none;
	outline: none;
}

button {
	cursor: pointer;
}

/* ── Selection ── */
::selection {
	background: rgba(74, 143, 217, 0.2);
	color: var(--text-primary);
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
	width: 6px;
}

::-webkit-scrollbar-track {
	background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
	background: var(--border);
	border-radius: 3px;
}

/* ── Placeholder ── */
input::placeholder,
textarea::placeholder {
	color: var(--text-muted);
}

/* ── Container ── */
.rvs-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 24px;
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-display);
	font-weight: 700;
	line-height: 1.2;
	color: var(--text-primary);
}

h1 { font-size: 48px; letter-spacing: -1.5px; }
h2 { font-size: 28px; letter-spacing: -0.5px; }
h3 { font-size: 22px; }
h4 { font-size: 18px; }

/* ── Section Title ── */
.rvs-section-title {
	margin-bottom: 32px;
}

.rvs-section-title h2 {
	font-family: var(--font-display);
	font-size: 28px;
	font-weight: 700;
	color: var(--text-primary);
	margin: 0;
	letter-spacing: -0.5px;
}

.rvs-section-title .rvs-section-sub {
	font-family: var(--font-body);
	font-size: 14px;
	color: var(--text-dim);
	margin-top: 6px;
}

/* ── Label Badge ── */
.rvs-label-badges {
	display: flex;
	gap: 4px;
}

.rvs-label-badge {
	display: inline-block;
	font-size: 11px;
	padding: 3px 10px;
	border-radius: 20px;
	font-weight: 600;
	letter-spacing: 0.5px;
	font-family: var(--font-body);
}

.rvs-label-badge--rs {
	background: var(--rs-glow);
	color: var(--rs-accent);
}

.rvs-label-badge--xo {
	background: var(--xo-glow);
	color: var(--xo-accent);
}

.rvs-label-badge--sm {
	font-size: 10px;
	padding: 2px 8px;
}

/* ── Buttons ── */
.rvs-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 10px 24px;
	border-radius: 30px;
	font-family: var(--font-body);
	font-weight: 600;
	font-size: 13px;
	letter-spacing: 0.3px;
	cursor: pointer;
	transition: all 0.25s ease;
	border: 1px solid var(--rs-accent);
	background: var(--rs-accent);
	color: #fff;
}

.rvs-btn:hover {
	opacity: 0.85;
	transform: translateY(-1px);
}

.rvs-btn--ghost {
	background: transparent;
	color: var(--rs-accent);
}

.rvs-btn--xo {
	border-color: var(--xo-accent);
	background: var(--xo-accent);
}

.rvs-btn--xo.rvs-btn--ghost {
	background: transparent;
	color: var(--xo-accent);
}

.rvs-btn--sm {
	padding: 7px 18px;
	font-size: 12px;
}

/* ── Form Inputs ── */
.rvs-input {
	padding: 10px 16px;
	border-radius: var(--radius-sm);
	border: 1px solid var(--border);
	background: var(--bg-card);
	color: var(--text-primary);
	font-family: var(--font-body);
	font-size: 14px;
	transition: border-color 0.2s ease;
}

.rvs-input:focus {
	border-color: var(--rs-accent);
}

.rvs-input--pill {
	border-radius: 30px;
}

textarea.rvs-input {
	resize: vertical;
}

/* ── Cards ── */
.rvs-card {
	background: var(--bg-card);
	border-radius: var(--radius);
	border: 1px solid var(--border);
	transition: border-color 0.2s ease, transform 0.2s ease;
}

.rvs-card:hover {
	border-color: var(--bg-hover);
}

.rvs-card--clickable {
	cursor: pointer;
}

.rvs-card--clickable:hover {
	transform: translateY(-2px);
}

/* ── Spotify Embed ── */
.rvs-spotify-embed {
	border-radius: var(--radius-sm);
	overflow: hidden;
}

.rvs-spotify-embed iframe {
	display: block;
	width: 100%;
	border: none;
}

/* ── YouTube Embed ── */
.rvs-youtube-embed {
	position: relative;
	aspect-ratio: 16 / 9;
	border-radius: var(--radius-sm);
	overflow: hidden;
	background: #0f0f0f;
	border: 1px solid var(--border);
}

.rvs-youtube-embed iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: none;
}

/* ── Stream Links Row ── */
.rvs-stream-links {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.rvs-stream-link {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 6px 14px;
	border-radius: 20px;
	border: 1px solid var(--border);
	color: var(--text-dim);
	font-family: var(--font-body);
	font-size: 12px;
	cursor: pointer;
	transition: all 0.2s ease;
}

.rvs-stream-link:hover {
	border-color: var(--text-dim);
	color: var(--text-primary);
}

.rvs-stream-link svg {
	width: 11px;
	height: 11px;
}

/* ── Filter Bar ── */
.rvs-filter-bar {
	display: flex;
	gap: 8px;
	margin-bottom: 24px;
	flex-wrap: wrap;
}

.rvs-filter-btn {
	padding: 7px 20px;
	border-radius: 30px;
	border: 1px solid var(--border);
	background: transparent;
	color: var(--text-dim);
	font-family: var(--font-body);
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease;
}

.rvs-filter-btn.active,
.rvs-filter-btn[aria-pressed="true"] {
	border-color: var(--rs-accent);
	background: var(--rs-glow);
	color: var(--rs-accent);
}

/* ── Subscribe Pill Links ── */
.rvs-subscribe-bar {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.rvs-subscribe-pill {
	padding: 6px 14px;
	border-radius: 20px;
	border: 1px solid var(--border);
	color: var(--text-dim);
	font-family: var(--font-body);
	font-size: 12px;
	cursor: pointer;
	transition: all 0.2s ease;
}

.rvs-subscribe-pill:hover {
	border-color: var(--text-dim);
	color: var(--text-primary);
}

/* ── Shared Page Top (accounts for fixed header) ── */
.rvs-page-top {
	padding-top: 100px;
	padding-bottom: 60px;
	min-height: 60vh;
}

/* ── Back Link ── */
.rvs-back-link {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-family: var(--font-body);
	font-size: 13px;
	color: var(--text-dim);
	margin-bottom: 28px;
	transition: color 0.2s ease;
}

.rvs-back-link:hover {
	color: var(--text-primary);
}

/* ── Episode Grid (shared radio + podcast) ── */
.rvs-episodes-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
}

.rvs-episode-grid-card {
	overflow: hidden;
}

.rvs-episode-grid-card__thumb {
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: var(--bg-card-2);
}

.rvs-episode-grid-card__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.rvs-episode-grid-card__placeholder {
	width: 100%;
	height: 100%;
}

.rvs-episode-grid-card__body {
	padding: 16px;
}

.rvs-episode-grid-card__body .rvs-label-badges {
	margin-bottom: 6px;
}

.rvs-episode-grid-card__title {
	font-family: var(--font-display);
	font-size: 15px;
	font-weight: 600;
	color: var(--text-primary);
	margin: 0 0 4px;
	line-height: 1.3;
}

.rvs-episode-grid-card__date {
	font-family: var(--font-body);
	font-size: 12px;
	color: var(--text-muted);
	margin: 0;
}

/* ── Pagination ── */
.rvs-pagination {
	margin-top: 40px;
	display: flex;
	justify-content: center;
	gap: 6px;
}

.rvs-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 8px;
	border-radius: var(--radius-sm);
	border: 1px solid var(--border);
	font-family: var(--font-body);
	font-size: 14px;
	color: var(--text-dim);
	transition: all 0.2s ease;
}

.rvs-pagination .page-numbers:hover {
	border-color: var(--text-dim);
	color: var(--text-primary);
}

.rvs-pagination .page-numbers.current {
	background: var(--rs-accent);
	border-color: var(--rs-accent);
	color: #fff;
}

.rvs-pagination .page-numbers.prev,
.rvs-pagination .page-numbers.next {
	padding: 0 16px;
}

.rvs-pagination .page-numbers.dots {
	border: none;
	cursor: default;
}

/* ── Empty State ── */
.rvs-empty {
	font-family: var(--font-body);
	font-size: 14px;
	color: var(--text-muted);
	padding: 40px 0;
}

/* ── Show Header (shared between radio + podcast) ── */
.rvs-show-header {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-bottom: 16px;
}

.rvs-show-header__icon {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.rvs-show-header__icon--rs {
	background: linear-gradient(135deg, var(--rs-accent), #2a6ab9);
}

.rvs-show-header__icon--xo {
	background: linear-gradient(135deg, var(--xo-accent), #b03020);
}

.rvs-show-header__icon--sm {
	width: 32px;
	height: 32px;
}

.rvs-show-header__title {
	font-family: var(--font-display);
	font-size: 32px;
	font-weight: 700;
	color: var(--text-primary);
	margin: 0;
}

.rvs-show-header__sub {
	font-family: var(--font-body);
	font-size: 14px;
	color: var(--text-dim);
	margin: 4px 0 0;
}

/* ── Utility ── */
.rvs-text-center { text-align: center; }
.rvs-mt-16 { margin-top: 16px; }
.rvs-mt-20 { margin-top: 20px; }
.rvs-mt-24 { margin-top: 24px; }
.rvs-mt-32 { margin-top: 32px; }
.rvs-mt-40 { margin-top: 40px; }
.rvs-mb-8  { margin-bottom: 8px; }
.rvs-mb-16 { margin-bottom: 16px; }
.rvs-mb-24 { margin-bottom: 24px; }
.rvs-mb-40 { margin-bottom: 40px; }

/* ── Responsive ── */
@media (max-width: 1024px) {
	h1 { font-size: 36px; }
	h2 { font-size: 24px; }

	.rvs-episodes-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 768px) {
	h1 { font-size: 30px; }
	h2 { font-size: 22px; }

	.rvs-container {
		padding: 0 16px;
	}

	.rvs-page-top {
		padding-top: 80px;
		padding-bottom: 40px;
	}

	.rvs-show-header__title {
		font-size: 24px;
	}

	.rvs-episodes-grid {
		grid-template-columns: 1fr;
		max-width: 400px;
	}

	.rvs-episode-grid-card__title {
		font-size: 14px;
	}
}

@media (max-width: 480px) {
	h1 { font-size: 26px; }
	h2 { font-size: 20px; }
	body { font-size: 15px; }
}
