/* ==========================================================================
   Лучшие песни — основные стили
   ========================================================================== */

:root {
	--bg: #F4F8FE;
	--surface: #FFFFFF;
	--tint: #E6F0FD;
	--tint-soft: #EEF4FC;
	--line: #DCE8F7;
	--line-strong: #C9DCF4;
	--ink: #0F2440;
	--ink-2: #33465F;
	--muted: #4A5D78;
	--accent: #1F6FD6;
	--accent-ink: #1F63C6;
	--accent-hover: #164C9A;
	--deep: #1F4E8C;
	--deep-ink: #DCEAFB;
	--radius: 20px;
	--radius-lg: 28px;
	--shadow: 0 12px 40px rgba(31, 99, 198, 0.10);
	--font: Manrope, system-ui, -apple-system, "Segoe UI", sans-serif;
	--font-display: Unbounded, var(--font);
}

*,
*::before,
*::after { box-sizing: border-box; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}

a { color: var(--accent-ink); text-decoration: none; }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
p { margin: 0; }
button, input { font: inherit; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.icon { flex: none; }

.container {
	max-width: 1200px;
	margin: 0 auto;
	padding-inline: 24px;
}

.visually-hidden,
.skip-link:not(:focus) {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.skip-link:focus {
	position: absolute;
	top: 8px;
	left: 8px;
	z-index: 10;
	background: var(--surface);
	padding: 10px 16px;
	border-radius: 10px;
}

/* --- Шапка --------------------------------------------------------------- */

.site-header {
	background: var(--surface);
	border-bottom: 1px solid var(--line);
}

.site-header__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 32px;
	padding-block: 14px;
}

.logo {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--ink);
}

.logo:hover { color: var(--ink); }

.logo__mark {
	width: 40px;
	height: 40px;
	border-radius: 12px;
	background: var(--accent);
	color: #FFFFFF;
	display: flex;
	align-items: center;
	justify-content: center;
}

.logo__text {
	font-family: var(--font-display);
	font-weight: 600;
	font-size: 18px;
}

.nav { display: flex; flex-wrap: wrap; gap: 4px; }

.nav__link {
	padding: 10px 14px;
	border-radius: 10px;
	color: var(--ink-2);
	font-weight: 600;
	font-size: 15px;
}

.nav__link:hover { background: var(--tint-soft); color: var(--ink); }
.nav__link.is-active { background: var(--tint); color: var(--deep); }

/* --- Поиск --------------------------------------------------------------- */

.search {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	max-width: 600px;
}

.search input {
	flex: 1 1 260px;
	min-width: 0;
	height: 56px;
	border-radius: 14px;
	border: 1px solid var(--line-strong);
	background: var(--surface);
	padding: 0 18px;
	font-size: 17px;
	color: var(--ink);
}

.search--compact {
	flex: 1 1 260px;
	flex-wrap: nowrap;
	align-items: center;
	gap: 8px;
	max-width: none;
	height: 44px;
	padding: 0 14px;
	background: var(--tint-soft);
	border: 1px solid var(--line);
	border-radius: 12px;
	color: var(--muted);
}

.search--compact input {
	height: auto;
	border: 0;
	padding: 0;
	background: transparent;
	font-size: 15px;
}

.search--compact input:focus { outline: none; }
.search--compact:focus-within { outline: 3px solid var(--accent); outline-offset: 2px; }

/* --- Кнопки и метки ------------------------------------------------------ */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 52px;
	padding: 0 24px;
	border-radius: 14px;
	border: 1px solid transparent;
	font-weight: 700;
	font-size: 16px;
	cursor: pointer;
	white-space: nowrap;
}

.btn--primary { background: var(--accent); color: #FFFFFF; }
.btn--primary:hover { background: var(--accent-hover); color: #FFFFFF; }
.btn--ghost { background: var(--surface); color: var(--deep); border-color: var(--line-strong); }
.btn--ghost:hover { color: var(--deep); border-color: var(--accent); }
.btn--light { background: #FFFFFF; color: var(--deep); }
.btn--light:hover { color: var(--accent-hover); }
.btn--sm { min-height: 44px; padding: 0 16px; font-size: 15px; border-radius: 12px; }

.chip {
	display: inline-block;
	background: var(--surface);
	border: 1px solid var(--line-strong);
	color: var(--deep);
	border-radius: 999px;
	padding: 8px 14px;
	font-size: 14px;
	font-weight: 600;
}

.chip--soft { background: var(--tint-soft); border-color: transparent; }
.chip:hover { border-color: var(--accent); color: var(--deep); }

.pill {
	align-self: flex-start;
	display: inline-block;
	background: var(--surface);
	color: var(--accent-ink);
	border-radius: 999px;
	padding: 6px 14px;
	font-size: 14px;
	font-weight: 600;
}

a.pill { box-shadow: inset 0 0 0 1px transparent; transition: box-shadow .15s; }
a.pill:hover { box-shadow: inset 0 0 0 1px var(--accent); color: var(--accent-ink); }

.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* --- Аватары и оттенки -------------------------------------------------- */

.avatar {
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: var(--font-display);
	font-weight: 600;
	flex: none;
	object-fit: cover;
}

.avatar--sm { width: 44px; height: 44px; font-size: 15px; font-family: var(--font); font-weight: 700; }
.avatar--md { width: 96px; height: 96px; font-size: 30px; }
.avatar--lg { width: 168px; height: 168px; font-size: 56px; font-weight: 700; box-shadow: var(--shadow); }

.tint-0 { background: #DCEBFD; color: #1F4E8C; }
.tint-1 { background: #D9F1F4; color: #155E68; }
.tint-2 { background: #E5E3FB; color: #3F3A8C; }
.tint-3 { background: #FDE9DC; color: #8A3F12; }
.tint-4 { background: #E1F3E4; color: #24603A; }
.tint-5 { background: #FBE3EC; color: #8A2350; }

/* --- Общие блоки -------------------------------------------------------- */

.hero { background: var(--tint); }
.hero__inner { padding-block: 24px 48px; display: flex; flex-direction: column; gap: 28px; }

.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--muted); }

.section { display: flex; flex-direction: column; gap: 24px; }

.section__head {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: baseline;
	gap: 8px;
}

.section__head a { font-weight: 600; }

.h1 {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: clamp(30px, 4.5vw, 48px);
	line-height: 1.1;
	letter-spacing: -0.01em;
}

.h2 { font-family: var(--font-display); font-weight: 600; font-size: clamp(22px, 3vw, 28px); }
.h3 { font-size: 22px; font-weight: 700; }
.h4 { font-size: 18px; font-weight: 700; }

.lead { font-size: 17px; line-height: 1.6; color: var(--ink-2); max-width: 680px; }
.muted { color: var(--muted); font-size: 14px; }
.note { font-size: 13px; color: var(--muted); }

.card {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 24px;
}

.card--deep {
	background: var(--deep);
	border-color: var(--deep);
	color: #FFFFFF;
}

.card--deep p { color: var(--deep-ink); }

.stack { display: flex; flex-direction: column; gap: 12px; }

.prose { display: flex; flex-direction: column; gap: 12px; font-size: 16px; line-height: 1.7; color: var(--ink-2); }

/* Основная колонка + боковая: на телефоне боковая уходит вниз. */
.layout {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 32px;
	padding-block: 40px 24px;
}

.layout__main { flex: 999 1 600px; min-width: 0; display: flex; flex-direction: column; gap: 40px; }
.layout__side { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }

.page-body { padding-block: 56px 24px; display: flex; flex-direction: column; gap: 64px; }

/* --- Карточки артистов и подборок --------------------------------------- */

.grid-artists {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
	gap: 16px;
}

.artist-card {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 20px 16px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	text-align: center;
	color: var(--ink);
	transition: border-color .15s, box-shadow .15s;
}

.artist-card:hover { color: var(--ink); border-color: var(--line-strong); box-shadow: var(--shadow); }
.artist-card__name { font-weight: 700; }

.grid-collections {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 16px;
}

.collection-card {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 18px;
	display: flex;
	align-items: center;
	gap: 16px;
	color: var(--ink);
	transition: border-color .15s, box-shadow .15s;
}

.collection-card:hover { color: var(--ink); border-color: var(--line-strong); box-shadow: var(--shadow); }

.collection-card__cover {
	width: 72px;
	height: 72px;
	border-radius: 16px;
	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
}

.collection-card__title { font-weight: 700; line-height: 1.3; }

.mini-artist { display: flex; align-items: center; gap: 12px; color: var(--ink); font-weight: 600; }

/* --- Треки --------------------------------------------------------------- */

.tracks { list-style: none; margin: 0; padding: 0; }

.track {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0 16px;
	padding: 12px;
	border-radius: 14px;
}

.track.is-playing { background: var(--tint-soft); }

.track__n { width: 24px; text-align: right; font-weight: 700; color: var(--muted); }

.track__play {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 0;
	background: var(--tint);
	color: var(--accent);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	flex: none;
}

.track__play:hover { background: #D3E4FB; }
.track.is-playing .track__play { background: var(--accent); color: #FFFFFF; }
.track__play .i-pause { display: none; }
.track.is-playing .track__play .i-play { display: none; }
.track.is-playing .track__play .i-pause { display: block; }

.track__info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.track__title { font-weight: 700; }
.track__sub { font-size: 14px; color: var(--muted); }
.track__link { font-size: 14px; font-weight: 600; white-space: nowrap; }

/* Движение в чарте */
.move { min-width: 56px; text-align: right; font-size: 13px; font-weight: 700; white-space: nowrap; color: var(--muted); }
.move--up { color: #1E8E5A; }
.move--down { color: #C2410C; }
.move--new { color: var(--accent-ink); }

/* Плеер Яндекс Музыки подставляется по клику на всю ширину строки. */
.track__player { flex-basis: 100%; margin-top: 12px; }
.track__player iframe { display: block; width: 100%; height: 100px; border: 0; border-radius: 12px; }
.album__cover { flex: none; width: 48px; height: 48px; border-radius: 8px; object-fit: cover; background: var(--tint-soft); }
/* Виджет альбома — со списком треков. */
.album .track__player iframe { height: 450px; }
.gigs-more .albums { margin-top: 8px; }

/* Крупные карточки треков в подборке */
.tracks--cards { display: flex; flex-direction: column; gap: 16px; }

.tracks--cards .track {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 20px 24px;
}

.tracks--cards .track.is-playing { border-color: #8DB6EC; background: var(--surface); }
.tracks--cards .track__n { font-family: var(--font-display); font-size: 26px; color: #6F8DB5; width: 36px; text-align: left; }
.tracks--cards .track__play { width: 52px; height: 52px; }
.tracks--cards .track__title { font-size: 18px; }
.tracks--cards .track__note { flex-basis: 100%; padding-left: 104px; margin-top: 8px; color: var(--ink-2); font-size: 15px; }

/* --- Главная ------------------------------------------------------------- */

.home-hero__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 48px;
	padding-block: 72px 64px;
}

.home-hero__text { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.home-hero__title { font-size: clamp(32px, 5vw, 56px); }
.home-hero__lead { font-size: 19px; max-width: 560px; }

.top-card {
	flex: 1 1 340px;
	min-width: 0;
	background: var(--surface);
	border-radius: 24px;
	padding: 24px;
	box-shadow: var(--shadow);
}

.top-card .track { padding: 8px 0; border-radius: 0; border-top: 1px solid var(--tint-soft); }
.top-card .track__play { width: 40px; height: 40px; }

.promo {
	background: var(--deep);
	color: #FFFFFF;
	border-radius: var(--radius-lg);
	padding: 40px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}

.promo__text { flex: 999 1 420px; display: flex; flex-direction: column; gap: 10px; }
.promo__kicker { font-size: 14px; font-weight: 600; color: #BFD8F8; }
.promo p { color: var(--deep-ink); font-size: 17px; }

.concerts {
	display: flex;
	flex-wrap: wrap;
	gap: 32px;
	align-items: center;
	border-radius: var(--radius-lg);
	padding: 32px;
}

.concerts__text { flex: 1 1 320px; display: flex; flex-direction: column; gap: 10px; }
.concerts__list { flex: 999 1 480px; }

.gig {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 20px;
	padding: 14px 0;
	border-top: 1px solid var(--tint-soft);
}

.gig__info { flex: 1 1 200px; display: flex; flex-direction: column; }
.gig__name { font-weight: 700; }

.abc { display: flex; flex-wrap: wrap; gap: 8px; }

.abc a {
	min-width: 44px;
	height: 44px;
	padding: 0 8px;
	border-radius: 12px;
	background: var(--surface);
	border: 1px solid var(--line);
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	color: var(--deep);
}

.abc a:hover,
.abc a.is-active { border-color: var(--accent); }
.abc a.is-active { background: var(--accent); color: #FFFFFF; }

/* --- Артист -------------------------------------------------------------- */

.artist-head { display: flex; flex-wrap: wrap; align-items: center; gap: 32px; }
.artist-head__text { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.artist-head .avatar--lg { background: var(--surface); color: var(--deep); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }

.faq { display: flex; flex-direction: column; gap: 12px; }

.faq details {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 16px;
	padding: 16px 20px;
}

.faq summary { font-weight: 700; cursor: pointer; }
.faq details p { margin-top: 10px; color: var(--ink-2); }

/* --- Подборка ------------------------------------------------------------ */

.cover {
	width: 200px;
	height: 200px;
	border-radius: var(--radius-lg);
	background: var(--deep);
	flex: none;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 6px;
	padding: 6px;
}

.cover span:nth-child(1) { border-radius: 22px 8px 8px 8px; background: #3B7FD9; }
.cover span:nth-child(2) { border-radius: 8px 22px 8px 8px; background: #BFD8F8; }
.cover span:nth-child(3) { border-radius: 8px 8px 8px 22px; background: #DCEBFD; }
.cover span:nth-child(4) { border-radius: 8px 8px 22px 8px; background: #6FA3E8; }

/* --- Подвал -------------------------------------------------------------- */

.site-footer { margin-top: 48px; background: var(--surface); border-top: 1px solid var(--line); }

.site-footer__inner {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 16px;
	padding-block: 32px;
	font-size: 14px;
	color: var(--muted);
}

.site-footer__nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 20px; }

/* --- Телефон ------------------------------------------------------------- */

@media (max-width: 640px) {
	.container { padding-inline: 16px; }
	/* Шапка: меню в одну строку с прокруткой, а не в две */
	.site-header__inner { gap: 10px; padding-block: 10px; }
	.logo__mark { width: 34px; height: 34px; border-radius: 10px; }
	.logo__text { font-size: 16px; }
	.nav { order: 3; flex: 1 1 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding-inline: 12px; }
	.nav::-webkit-scrollbar { display: none; }
	.nav__link { padding: 8px 12px; white-space: nowrap; }
	.search--compact { order: 2; flex: 1 1 120px; min-width: 0; height: 40px; padding: 0 10px; }
	.search--compact input { min-width: 0; }
	.home-hero__inner { padding-block: 40px; gap: 32px; }
	.page-body { padding-block: 40px 16px; gap: 48px; }
	.promo, .concerts { padding: 24px; }
	.card { padding: 16px; }
	.track { padding: 10px 4px; gap: 0 12px; }
	.track__n { width: 16px; }
	.avatar--lg { width: 112px; height: 112px; font-size: 40px; }
	.cover { width: 120px; height: 120px; }
	.artist-head { gap: 20px; }
	.tracks--cards .track { padding: 16px; }
	.tracks--cards .track__n { display: none; }
	.tracks--cards .track__note { padding-left: 0; }
	.grid-artists { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.pager { margin-top: 32px; }

/* Концерты на странице артиста */
.gig__date { flex: 0 0 180px; font-weight: 700; }
.gig__name { color: var(--ink); }
.gigs-more summary { cursor: pointer; padding: 14px 0 4px; color: var(--accent); font-weight: 600; }
@media (max-width: 640px) {
	/* Дата строкой сверху, город и кнопка — в одну строку */
	.gig { gap: 4px 12px; }
	.gig__date { flex-basis: 100%; }
	.gig__info { flex: 1 1 0; min-width: 0; }
}

/* Подсказки в поиске */
.has-suggest { position: relative; }
.suggest {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	right: 0;
	min-width: 280px;
	max-height: min(70vh, 460px);
	overflow-y: auto;
	margin: 0;
	padding: 6px;
	list-style: none;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 14px;
	box-shadow: var(--shadow);
	z-index: 50;
}
.suggest[hidden] { display: none; }
.suggest__item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px 10px;
	border-radius: 10px;
	color: var(--ink);
}
.suggest__item:hover,
.suggest__item.is-active { background: var(--tint-soft); color: var(--ink); }
.suggest__title { flex: 1 1 auto; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest__type { color: var(--muted); font-size: 13px; }
.suggest .avatar--sm { width: 36px; height: 36px; flex: 0 0 36px; font-size: 13px; }
@media (max-width: 640px) {
	/* В шапке поле узкое — список на всю ширину под шапкой */
	.site-header__inner { position: relative; }
	.search--compact.has-suggest { position: static; }
	.search--compact .suggest { left: 16px; right: 16px; min-width: 0; top: calc(100% - 4px); }
}
