/* ============================================================
   Break'n'Beatz – gemeinsames Design-System
   (index.html, events.html, impressum.html, datenschutz.html)

   Look: schwarzer Hintergrund mit warm-orangefarbenem Kreuz-
   Raster, riesige Typo mit Orange-Verlauf, Sidebar mit
   Haarllinien, liquid-glass Player-Bar, Scroll-Reveals.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

:root {
	--bg: #0a0c10;
	--surface: #10131a;
	--surface-2: #171b24;
	--line: rgba(255, 255, 255, 0.08);
	--hairline: rgba(255, 255, 255, 0.12);
	--line-strong: rgba(255, 255, 255, 0.18);
	--text: #eef0f4;
	--muted: #9aa3b2;
	--accent: #ff7f00;
	--accent-2: #ffa13d;
	--accent-3: #ffc46b;
	--accent-soft: rgba(255, 127, 0, 0.14);
	--grad: linear-gradient(90deg, var(--accent), var(--accent-3));
	--grad-soft: linear-gradient(90deg, rgba(255, 127, 0, 0.85), rgba(255, 196, 107, 0.85));
	--radius: 14px;
	--shadow-md: 0 14px 34px rgba(0, 0, 0, 0.35);
	--shadow-lg: 0 30px 70px rgba(0, 0, 0, 0.5);
}

html { scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: 'Montserrat', system-ui, -apple-system, Arial, sans-serif;
	font-size: 16px;
	line-height: 1.6;
	letter-spacing: 0.01em;
	min-height: 100vh;
}

::selection { background: rgba(255, 127, 0, 0.35); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
a { color: inherit; }

/* ---------- Kreuz-Raster (Design 1) ---------- */
.crossgrid {
	position: fixed;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='58' height='58'%3E%3Cpath d='M29 22v14M22 29h14' stroke='rgba(255,190,120,0.05)' stroke-width='1'/%3E%3C/svg%3E");
}

/* ---------- Layout mit Sidebar ---------- */
/* WICHTIG: .layout darf KEINEN z-index bekommen – sonst entstünde ein
   Stacking Context, in dem der Drawer (z90) unter dem Root-Level-Backdrop
   (z85) läge und dessen Taps alle Link-Klicks schlucken würden. */
.layout {
	position: relative;
	display: grid;
	grid-template-columns: 230px minmax(0, 1fr);
	min-height: 100vh;
}

.side {
	position: sticky;
	top: 0;
	align-self: start;
	height: 100vh;
	display: flex;
	flex-direction: column;
	gap: 26px;
	padding: 26px 22px;
	border-right: 1px solid var(--hairline);
}

.brand {
	font-weight: 800;
	font-style: bold;
	font-size: 1.05rem;
	letter-spacing: 0.02em;
	text-decoration: none;
	width: fit-content;
}

.side-logo {
	display: block;
	width: 92px;
	height: auto;
	object-fit: contain;
}

.nav { display: grid; gap: 10px; }

.nav a {
	color: var(--muted);
	text-decoration: none;
	font-size: 0.82rem;
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	width: fit-content;
	transition: color 0.15s ease, transform 0.15s ease;
}

.nav a:hover { color: var(--text); transform: translateX(3px); }
.nav a[aria-current="page"] { color: var(--accent-2); }

.side-socials { margin-top: auto; display: grid; gap: 9px; }

.side-socials a {
	color: var(--muted);
	text-decoration: none;
	font-size: 0.78rem;
	letter-spacing: 0.04em;
	transition: color 0.15s ease;
	width: fit-content;
}

.side-socials a:hover { color: var(--accent-3); }

.content { min-width: 0; padding: 0 clamp(22px, 4vw, 64px) 90px; }

/* ---------- Typo-Bausteine ---------- */
.kicker {
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.28em;
	color: var(--muted);
	text-transform: uppercase;
}

.headline {
	margin: 0;
	font-weight: 800;
	text-transform: uppercase;
	line-height: 0.95;
	letter-spacing: -0.01em;
	background: var(--grad);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.link-more {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--text);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	text-decoration: none;
	border-bottom: 1px solid var(--line-strong);
	padding-bottom: 4px;
	width: fit-content;
	transition: color 0.15s ease, border-color 0.15s ease;
}

.link-more:hover { color: var(--accent-3); border-color: var(--accent-3); }

/* ---------- Haarlinien-Zeilen (Event/Sendeplan-Design) ---------- */
.list-head {
	display: flex;
	justify-content: space-between;
	border-bottom: 1px solid var(--hairline);
	padding-bottom: 10px;
	color: var(--muted);
	font-size: 0.68rem;
	letter-spacing: 0.22em;
	text-transform: uppercase;
}

.rows { list-style: none; margin: 0; padding: 0; }

.rows .row {
	display: grid;
	grid-template-columns: 110px 1fr auto;
	align-items: center;
	gap: 14px;
	border-bottom: 1px solid var(--hairline);
	padding: 13px 10px;
	transition: background 0.15s ease;
}

.rows .row:hover { background: rgba(255, 190, 120, 0.04); }

.rows .row .date,
.rows .row .day {
	font-weight: 700;
	font-size: 0.86rem;
	letter-spacing: 0.06em;
	color: var(--accent-2);
	white-space: nowrap;
}

.rows .row .title {
	font-weight: 600;
	font-size: 0.86rem;
	letter-spacing: 0.03em;
	background: linear-gradient(90deg, #fff1e0, var(--accent));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 13px 18px;
	border-radius: 10px;
	background: var(--surface-2);
	color: var(--text);
	border: 1px solid var(--line-strong);
	font-weight: 600;
	font-size: 0.95rem;
	text-decoration: none;
	line-height: inherit;
	font-family: inherit;
	cursor: pointer;
	transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.btn:hover {
	background: var(--accent-soft);
	border-color: rgba(255, 127, 0, 0.55);
	color: var(--accent-2);
	transform: translateY(-2px);
}

/* ---------- Reveal on scroll ---------- */
[data-reveal] {
	opacity: 0;
	transform: translateY(18px);
	transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-reveal].is-visible { opacity: 1; transform: none; }

/* ---------- Liquid-Glass Player-Bar ---------- */
.player {
	position: fixed;
	left: 50%;
	transform: translateX(-50%);
	bottom: 18px;
	z-index: 60;
	width: min(920px, calc(100vw - 28px));
	border-radius: 18px;
	background: linear-gradient(160deg, rgba(30, 26, 20, 0.55), rgba(14, 12, 9, 0.65));
	-webkit-backdrop-filter: blur(22px) saturate(1.3);
	backdrop-filter: blur(22px) saturate(1.3);
	border: 1px solid rgba(255, 255, 255, 0.14);
	box-shadow:
		0 24px 60px rgba(0, 0, 0, 0.5),
		inset 0 1px 0 rgba(255, 255, 255, 0.18),
		inset 0 -1px 0 rgba(255, 255, 255, 0.04);
	/* Landing: unsichtbar unter dem Viewport; erscheint nach dem Scrollen */
	opacity: 0;
	pointer-events: none;
	transform: translate(-50%, 26px);
	transition: opacity 0.45s ease, transform 0.45s ease;
}

.player.is-visible {
	opacity: 1;
	pointer-events: auto;
	transform: translate(-50%, 0);
}

.player::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	pointer-events: none;
	background:
		radial-gradient(120px 60px at 18% 0%, rgba(255, 169, 61, 0.16), transparent 70%),
		radial-gradient(200px 80px at 85% 100%, rgba(255, 127, 0, 0.1), transparent 70%);
}

.player-line {
	height: 3px;
	background: linear-gradient(90deg, var(--accent), var(--accent-3));
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform 0.5s ease;
	border-radius: 18px 18px 0 0;
}

.player.is-live .player-line { transform: scaleX(1); }
.player.is-offline .player-line { background: #6b7280; transform: scaleX(1); }
.player.is-connecting .player-line { background: #f59e0b; transform: scaleX(1); }

.player-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	padding: 11px 18px;
}

.player-meta { display: flex; align-items: center; gap: 14px; min-width: 0; }

.player-logo {
	width: 52px;
	height: 44px;
	object-fit: cover;
	border-radius: 10px;
	background: var(--surface);
}

.player-text { display: flex; flex-direction: column; min-width: 0; }

.player-station { font-weight: 700; font-size: 0.95rem; line-height: 1.25; }

.player-song {
	color: var(--muted);
	font-size: 0.85rem;
	line-height: 1.3;
	max-width: 320px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.player-song.marquee { text-overflow: clip; }
.player-song.marquee .song-text { display: inline-block; animation: marquee 12s linear infinite alternate; }

@keyframes marquee {
	from { transform: translateX(0); }
	to { transform: translateX(var(--marquee-dist, -40px)); }
}

.live-chip {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 5px 11px;
	border-radius: 7px;
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.14em;
	background: var(--accent-soft);
	color: var(--accent-2);
	border: 1px solid rgba(255, 127, 0, 0.4);
	white-space: nowrap;
}

.live-chip[hidden] { display: none; }

.player.is-offline .live-chip {
	background: rgba(255, 255, 255, 0.06);
	color: #8b93a1;
	border-color: var(--line-strong);
}

.eq { display: inline-flex; align-items: flex-end; gap: 2.5px; height: 12px; }

.eq i {
	width: 3px;
	height: 12px;
	border-radius: 1px;
	background: currentColor;
	transform-origin: bottom center;
}

.eq i:nth-child(2) { animation-delay: 0.18s; }
.eq i:nth-child(3) { animation-delay: 0.36s; }

.player.is-live .eq i { animation: eq 0.9s ease-in-out infinite; }
.player.is-connecting .eq i { animation: eq 1.1s ease-in-out infinite; }

@keyframes eq {
	0%, 100% { transform: scaleY(0.35); }
	50% { transform: scaleY(1); }
}

.player-controls { display: flex; align-items: center; gap: 16px; }

.play-btn {
	width: 48px;
	height: 48px;
	border: 0;
	border-radius: 12px;
	background: linear-gradient(135deg, var(--accent), var(--accent-3));
	color: #1a0e02;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
	box-shadow: 0 6px 18px rgba(255, 127, 0, 0.35);
}

.play-btn:hover { transform: scale(1.05); filter: brightness(1.06); }
.play-btn:active { transform: scale(0.96); }

.play-btn .icon-pause { display: none; }
.play-btn.is-playing .icon-play { display: none; }
.play-btn.is-playing .icon-pause { display: inline-flex; }

.player.is-offline .play-btn { background: #2a2f3a; color: #6b7280; box-shadow: none; }

.volume { display: flex; align-items: center; gap: 8px; }

.icon-btn {
	background: none;
	border: 0;
	color: var(--muted);
	cursor: pointer;
	padding: 6px;
	border-radius: 8px;
	display: inline-flex;
	transition: color 0.15s ease, background 0.15s ease;
}

.icon-btn:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }

.icon-btn .icon-muted { display: none; }
.icon-btn.is-muted .icon-volume { display: none; }
.icon-btn.is-muted .icon-muted { display: inline-flex; }

.volume-slider { width: 96px; accent-color: var(--accent); cursor: pointer; }

.listeners {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--muted);
	font-size: 0.85rem;
	font-weight: 600;
	white-space: nowrap;
}

.listeners[hidden] { display: none; }

/* ---------- Footer ---------- */
.site-footer {
	border-top: 1px solid var(--hairline);
	padding: 26px 0 34px;
	color: var(--muted);
	font-size: 0.82rem;
	text-align: center;
}

.site-footer a {
	text-decoration: none;
	border-bottom: 1px solid var(--line-strong);
	transition: color 0.15s ease, border-color 0.15s ease;
}

.site-footer a:hover { color: var(--accent-2); border-color: var(--accent-2); }

.foot-links { display: flex; justify-content: center; gap: 22px; margin-top: 8px; flex-wrap: wrap; }

/* ---------- Responsive ---------- */

/* Hamburger + Backdrop: nur auf Mobil sichtbar (unten in der Media Query) */
.nav-toggle { display: none; }
.side-backdrop { display: none; }

@media (max-width: 820px) {
	.layout { grid-template-columns: 1fr; }

	/* Hamburger-Button (liquid glass, fixed oben links) */
	.nav-toggle {
		display: inline-flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 5px;
		position: fixed;
		top: 14px;
		left: 14px;
		z-index: 95;
		width: 46px;
		height: 46px;
		border-radius: 12px;
		cursor: pointer;
		touch-action: manipulation;
		font-family: inherit;
		background: linear-gradient(160deg, rgba(30, 26, 20, 0.55), rgba(14, 12, 9, 0.65));
		-webkit-backdrop-filter: blur(18px) saturate(1.3);
		backdrop-filter: blur(18px) saturate(1.3);
		border: 1px solid rgba(255, 255, 255, 0.14);
		box-shadow:
			0 10px 26px rgba(0, 0, 0, 0.4),
			inset 0 1px 0 rgba(255, 255, 255, 0.16);
		transition: transform 0.15s ease;
	}

	.nav-toggle:active { transform: scale(0.94); }

	.nav-toggle .bar {
		width: 20px;
		height: 2px;
		border-radius: 2px;
		background: var(--text);
		transition: transform 0.3s ease, opacity 0.2s ease;
	}

	/* Drei Striche → X, wenn offen */
	.nav-toggle[aria-expanded="true"] .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
	.nav-toggle[aria-expanded="true"] .bar:nth-child(2) { opacity: 0; }
	.nav-toggle[aria-expanded="true"] .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

	/* Abdunkelung hinter dem geöffneten Menü */
	.side-backdrop {
		display: block;
		position: fixed;
		inset: 0;
		z-index: 85;
		background: rgba(0, 0, 0, 0.55);
		-webkit-backdrop-filter: blur(2px);
		backdrop-filter: blur(2px);
		opacity: 0;
		pointer-events: none;
		transition: opacity 0.3s ease;
	}

	.side-backdrop.is-open { opacity: 1; pointer-events: auto; }

	/* Sidebar: Off-Canvas, fährt von links ein.
	   Bewusst OHNE backdrop-filter – der löst auf Touch-Geräten einen
	   WebKit-Bug aus, bei dem Links im Panel keine Taps mehr bekommen. */
	.side {
		position: fixed;
		top: 0;
		left: 0;
		bottom: 0;
		z-index: 90;
		width: min(300px, 84vw);
		height: 100vh;
		flex-direction: column;
		gap: 26px;
		padding: 64px 22px 26px;
		border-right: 1px solid var(--hairline);
		border-bottom: 0;
		background: #0e1116;
		overflow-y: auto;
		transform: translateX(-103%);
		opacity: 0.4;
		visibility: hidden;
		pointer-events: none; /* geschlossenes Panel darf niemals Taps fangen */
		transition: transform 0.35s cubic-bezier(0.22, 0.9, 0.3, 1), opacity 0.35s ease, visibility 0s linear 0.35s;
	}

	.side.is-open {
		transform: none;
		opacity: 1;
		visibility: visible;
		pointer-events: auto;
		transition: transform 0.35s cubic-bezier(0.22, 0.9, 0.3, 1), opacity 0.35s ease;
	}

	.side-logo { width: 56px; height: auto; }
	/* Platz für den fixen Hamburger-Button (14px + 46px + Luft) */
	.content { padding-top: 76px; }
	.nav { gap: 6px; }

	/* Große Tap-Ziele für Touch */
	.nav a {
		font-size: 0.95rem;
		padding: 12px 4px;
		touch-action: manipulation;
	}

	.side-socials { margin-top: auto; grid-auto-flow: row; gap: 4px; }

	.side-socials a { padding: 10px 4px; touch-action: manipulation; }

	.rows .row { grid-template-columns: 84px 1fr auto; }
	.player { bottom: 10px; }
}

@media (max-width: 480px) {
	.player-logo { width: 38px; height: 38px; }
	.volume-slider { display: none; }
	.listeners { display: none; }
	.player-controls { gap: 10px; }
	.rows .row { grid-template-columns: 74px 1fr auto; padding: 12px 6px; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	[data-reveal] { opacity: 1; transform: none; transition: none; }
	.player { transition: none; }
	.player.is-live .eq i { animation: none; }
	.player-song.marquee .song-text { animation: none !important; }
	.side, .side-backdrop, .nav-toggle .bar { transition: none !important; }
}
