/* ============================================================
   Сайты артистов - общий шаблон в стиле IZI
   Шрифты: Unbounded (дисплей), Tektur (техно-лейблы), Inter (текст)
   Акценты --accent / --accent2 переопределяются в data.js артиста (theme)
   ============================================================ */

@font-face { font-family: 'Unbounded'; font-weight: 200 900; font-display: swap; src: url('fonts/unbounded-cyr.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Unbounded'; font-weight: 200 900; font-display: swap; src: url('fonts/unbounded-lat.woff2') format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: 'Tektur'; font-weight: 400 900; font-display: block; src: url('fonts/tektur-cyr.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Tektur'; font-weight: 400 900; font-display: block; src: url('fonts/tektur-lat.woff2') format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: 'Inter'; font-weight: 100 900; font-display: swap; src: url('fonts/inter-cyr.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Inter'; font-weight: 100 900; font-display: swap; src: url('fonts/inter-lat.woff2') format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122; }

:root {
  --bg: #060608;
  --panel: #0c0d12;
  --white: #f4f5f7;
  --mut: rgba(244, 245, 247, 0.55);
  --line: rgba(244, 245, 247, 0.1);
  --accent: #2b59ff;
  --accent2: #ffe600;
  --font-display: 'Unbounded', 'Arial Black', sans-serif;
  --font-tech: 'Tektur', 'Arial', sans-serif;
  --font-text: 'Inter', 'Segoe UI', sans-serif;
  --pad: clamp(20px, 5vw, 72px);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scrollbar-gutter: stable; }
body { background: var(--bg); color: var(--white); font-family: var(--font-text); line-height: 1.55; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img { display: block; max-width: 100%; height: auto; }
svg { width: 1em; height: 1em; flex: none; }
::selection { background: var(--accent2); color: #060608; }
.wrap { width: min(100% - var(--pad) * 2, 1240px); margin-inline: auto; }

/* -------- Заставка -------- */
.preloader { position: fixed; inset: 0; z-index: 200; display: grid; place-content: center; justify-items: center; gap: 22px; background: var(--bg); transition: opacity 0.7s ease, visibility 0.7s; }
body:not(.is-loading) .preloader { opacity: 0; visibility: hidden; }
.preloader__logo { font-family: var(--font-display); font-weight: 800; font-size: clamp(28px, 6vw, 54px); letter-spacing: -0.03em; }
.preloader__bar { width: 200px; height: 2px; background: var(--line); overflow: hidden; }
.preloader__bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); transform-origin: left; animation: pre-fill 0.7s ease-out both; }
@keyframes pre-fill { from { transform: scaleX(0); } }

/* -------- Общие детали -------- */
.eyebrow { display: inline-flex; align-items: center; gap: 12px; font-family: var(--font-tech); font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--mut); }
.eyebrow::before { content: ''; width: 34px; height: 2px; background: var(--accent2); }

.btn { display: inline-flex; align-items: center; gap: 10px; height: 50px; padding: 0 24px; border: 1px solid rgba(244, 245, 247, 0.22); border-radius: 999px; font-family: var(--font-tech); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; transition: border-color 0.25s, background 0.25s, color 0.25s, transform 0.25s; }
.btn:hover { border-color: var(--accent2); color: var(--accent2); transform: translateY(-2px); }
.btn--fill { background: var(--white); color: #060608; border-color: var(--white); }
.btn--fill:hover { background: var(--accent2); border-color: var(--accent2); color: #060608; }

/* уголки-скобки, как у карточек клубов IZI */
.corner { position: absolute; width: 14px; height: 14px; opacity: 0; transition: opacity 0.3s; pointer-events: none; }
.corner--tl { top: 10px; left: 10px; border-top: 2px solid var(--accent2); border-left: 2px solid var(--accent2); }
.corner--br { bottom: 10px; right: 10px; border-bottom: 2px solid var(--accent2); border-right: 2px solid var(--accent2); }
:hover > .corner, .is-playing > .corner, .story__card > .corner { opacity: 1; }

/* энерголиния под заголовком */
.energy { display: block; width: min(320px, 60%); height: 2px; margin-top: 22px; background: linear-gradient(90deg, var(--accent), var(--accent2), var(--accent), var(--accent2)); background-size: 300% 100%; animation: energy-flow 3.4s linear infinite; transform: scaleX(0); transform-origin: left; transition: transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) 0.2s; }
.is-in .energy { transform: scaleX(1); }
@keyframes energy-flow { to { background-position: -300% 0; } }

.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); }
.reveal.is-in { opacity: 1; transform: none; }

/* -------- Шапка -------- */
.nav { position: fixed; inset: 0 0 auto; z-index: 100; transition: background 0.35s, border-color 0.35s; border-bottom: 1px solid transparent; }
.nav.is-scrolled { background: rgba(6, 6, 8, 0.8); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-color: var(--line); }
.nav__in { height: 74px; display: flex; align-items: center; justify-content: space-between; }
.nav__logo { font-family: var(--font-display); font-weight: 800; font-size: 19px; letter-spacing: -0.03em; }
.nav__links { display: flex; align-items: center; gap: 30px; font-family: var(--font-tech); font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; }
.nav__links a { position: relative; color: rgba(244, 245, 247, 0.8); }
.nav__links a::after { content: ''; position: absolute; left: 0; bottom: -7px; width: 100%; height: 2px; background: var(--accent2); transform: scaleX(0); transform-origin: left; transition: transform 0.25s; }
.nav__links a:hover { color: var(--white); }
.nav__links a:hover::after { transform: scaleX(1); }
.lang { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.lang button { padding: 6px 12px; font-size: 12px; color: var(--mut); }
.lang button.is-on { background: var(--white); color: #060608; }
.nav__btn { display: none; width: 46px; height: 46px; position: relative; }
.nav__btn i, .nav__btn i::before { content: ''; position: absolute; left: 12px; width: 22px; height: 2px; background: var(--white); transition: transform 0.3s, top 0.3s; }
.nav__btn i { top: 19px; }
.nav__btn i::before { left: 0; top: 7px; }
/* открытое меню: две полоски складываются в крестик */
.nav__btn[aria-expanded='true'] i { top: 22px; transform: rotate(45deg); }
.nav__btn[aria-expanded='true'] i::before { top: 0; transform: rotate(-90deg); }
.nav__btn:focus-visible, .lang button:focus-visible { outline: 2px solid var(--accent2); outline-offset: 3px; }

/* -------- Хиро -------- */
.hero { position: relative; min-height: min(100svh, 920px); display: flex; align-items: flex-end; padding: 150px 0 clamp(56px, 8vw, 96px); overflow: hidden; }
.hero__bg { position: absolute; inset: 0; }
.hero__bg picture { display: block; width: 100%; height: 100%; }
.hero__bg img { width: 100%; height: var(--h, 100%); object-fit: cover; animation: hero-zoom 2.6s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes hero-zoom { from { transform: scale(1.08); } }
.hero__bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(6, 6, 8, 0.94) 0%, rgba(6, 6, 8, 0.72) 38%, rgba(6, 6, 8, 0.1) 75%), linear-gradient(0deg, var(--bg) 0%, rgba(6, 6, 8, 0) 34%); }
/* вертикальный портрет: кадр стоит справа, а не растянут на весь экран */
.hero--side .hero__bg img { width: 58%; margin-left: auto; }
.hero--side .hero__bg::after { background: linear-gradient(90deg, var(--bg) 42%, rgba(6, 6, 8, 0.55) 62%, rgba(6, 6, 8, 0) 85%), linear-gradient(0deg, var(--bg) 0%, rgba(6, 6, 8, 0) 34%); }
.hero__in { position: relative; }
.hero__title { margin: 22px 0 20px; font-family: var(--font-display); font-weight: 800; font-size: clamp(46px, 9.4vw, 132px); line-height: 0.95; letter-spacing: -0.045em; text-transform: uppercase; }
/* длинное имя - кегль меньше, чтобы не наезжало на портрет */
.hero__title--long { font-size: clamp(38px, 6.4vw, 90px); }
.hero__title span { display: block; margin-top: 18px; line-height: 1.5; font-family: var(--font-tech); font-weight: 500; font-size: clamp(14px, 1.7vw, 20px); letter-spacing: 0.32em; color: var(--accent2); }
.hero__lead { max-width: 560px; font-size: clamp(17px, 1.7vw, 22px); color: rgba(244, 245, 247, 0.86); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero__note { display: flex; align-items: center; gap: 14px; margin-top: 38px; font-family: var(--font-tech); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mut); }
.wave { display: inline-flex; align-items: center; gap: 3px; height: 22px; }
.wave i { width: 2px; height: 100%; background: var(--accent2); transform-origin: center; animation: wave 1.1s ease-in-out infinite; }
.wave i:nth-child(2) { animation-delay: -0.9s; } .wave i:nth-child(3) { animation-delay: -0.5s; }
.wave i:nth-child(4) { animation-delay: -0.2s; } .wave i:nth-child(5) { animation-delay: -0.7s; } .wave i:nth-child(6) { animation-delay: -0.35s; }
@keyframes wave { 0%, 100% { transform: scaleY(0.25); } 50% { transform: scaleY(1); } }

/* -------- Статы -------- */
.stats { border-block: 1px solid var(--line); }
.stats__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat { position: relative; padding: clamp(28px, 4vw, 48px) clamp(16px, 2.4vw, 36px); border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat__value { font-family: var(--font-display); font-weight: 800; font-size: clamp(30px, 4.4vw, 58px); letter-spacing: -0.04em; line-height: 1; }
.stat p { margin-top: 12px; max-width: 260px; font-size: 14px; color: var(--mut); }

/* -------- Секции -------- */
.section { padding: clamp(64px, 9vw, 130px) 0 0; }
.section:last-of-type { padding-bottom: clamp(64px, 9vw, 120px); }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; margin-bottom: clamp(30px, 4vw, 52px); }
.head h2, .contact h2 { margin-top: 20px; max-width: 14em; font-family: var(--font-display); font-weight: 800; font-size: clamp(28px, 4.6vw, 62px); line-height: 1.04; letter-spacing: -0.04em; text-transform: uppercase; }
.head h2 mark, .contact h2 mark { padding: 0 0.18em; background: var(--accent2); color: #060608; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.head__intro { max-width: 380px; font-size: 15px; color: var(--mut); }

/* -------- Треки -------- */
.filter { display: flex; gap: 8px; margin-bottom: 18px; }
.filter button { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 18px; border: 1px solid var(--line); border-radius: 999px; font-family: var(--font-tech); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mut); transition: 0.25s; }
.filter button b { font-weight: 500; opacity: 0.6; }
.filter button svg { color: var(--accent2); }
.filter button.is-on { border-color: var(--accent2); color: var(--white); }
.tracks { display: grid; gap: 10px; }
.tracks.only-star .track:not(.is-star) { display: none; }
.track { position: relative; display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 20px 24px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.3s, background 0.3s; }
.track:hover, .track.is-playing { border-color: rgba(244, 245, 247, 0.26); background: #10121a; }
.track__no { font-family: var(--font-tech); font-size: 13px; color: var(--mut); }
.track__title { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 600; font-size: clamp(16px, 1.9vw, 22px); letter-spacing: -0.02em; }
.track__star { display: inline-flex; color: var(--accent2); font-size: 0.85em; }
.track__meta { margin-top: 4px; font-size: 13px; color: var(--mut); }
.track__actions { display: flex; align-items: center; gap: 14px; }
.track__play { display: grid; place-items: center; width: 46px; height: 46px; border: 1px solid rgba(244, 245, 247, 0.22); border-radius: 50%; font-size: 17px; transition: 0.25s; }
.track__play:hover, .is-playing .track__play { background: var(--accent2); border-color: var(--accent2); color: #060608; }
.track__play svg:last-child, .is-playing .track__play svg:first-child { display: none; }
.is-playing .track__play svg:last-child { display: block; }
.track__link { display: inline-flex; align-items: center; gap: 8px; height: 46px; font-family: var(--font-tech); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(244, 245, 247, 0.8); transition: color 0.25s; }
.track__link:hover { color: var(--accent2); }
.track__soon { font-family: var(--font-tech); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--mut); }
.track__bar { position: absolute; inset: auto 0 0; height: 2px; }
.track__bar i { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); }

/* -------- История -------- */
.story { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(28px, 6vw, 90px); align-items: start; }
.story__copy p { color: var(--mut); }
.story__copy p:first-child { margin-bottom: 22px; font-size: clamp(19px, 2.1vw, 27px); line-height: 1.35; color: var(--white); }
.story__copy p + p { margin-top: 14px; }
.story__card { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.story__card img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.story__card figcaption { display: flex; justify-content: space-between; gap: 12px; padding: 16px 20px; font-family: var(--font-tech); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mut); }
.story__card b { font-weight: 600; color: var(--white); }

/* -------- Сотрудничество -------- */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.card { position: relative; display: flex; flex-direction: column; min-height: 290px; padding: 28px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.3s; }
.card::before { content: ''; position: absolute; top: -90px; right: -90px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, var(--accent), transparent 70%); opacity: 0.22; transition: opacity 0.4s; }
.card:hover { border-color: rgba(244, 245, 247, 0.26); }
.card:hover::before { opacity: 0.5; }
.card__idx { font-family: var(--font-tech); font-size: 12px; letter-spacing: 0.16em; color: var(--accent2); }
.card h3 { margin-top: auto; padding-top: 60px; font-family: var(--font-display); font-weight: 700; font-size: clamp(18px, 1.9vw, 23px); line-height: 1.15; letter-spacing: -0.02em; }
.card p { margin-top: 12px; font-size: 14px; color: var(--mut); }
.card a { display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; font-family: var(--font-tech); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; transition: color 0.25s; }
.card a:hover { color: var(--accent2); }

/* -------- Контакты -------- */
.contact { position: relative; padding: clamp(32px, 6vw, 80px); background: radial-gradient(circle at 85% 0%, color-mix(in srgb, var(--accent) 26%, transparent), transparent 55%), var(--panel); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; }
.contact > p { max-width: 520px; margin-top: 20px; color: var(--mut); }
.socials { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; max-width: 760px; margin-top: 34px; }
.socials a { display: flex; align-items: center; justify-content: space-between; height: 52px; padding: 0 18px; border: 1px solid var(--line); border-radius: 12px; font-family: var(--font-tech); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; transition: 0.25s; }
.socials a:hover { border-color: var(--accent2); color: var(--accent2); }
.contact__mail { display: inline-block; margin-top: 40px; font-family: var(--font-display); font-weight: 700; font-size: clamp(20px, 3.6vw, 46px); letter-spacing: -0.03em; border-bottom: 2px solid var(--accent2); overflow-wrap: anywhere; }

/* -------- Подвал -------- */
.footer { border-top: 1px solid var(--line); padding: 28px 0; font-size: 13px; color: var(--mut); }
.footer__in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px 30px; }
.footer__links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer__links a:hover { color: var(--white); }

/* -------- Мобильная -------- */
@media (max-width: 900px) {
  .nav__btn { display: block; }
  .nav__links { position: absolute; inset: 74px 0 auto; display: none; flex-direction: column; align-items: flex-start; gap: 0; padding: 8px var(--pad) 22px; background: rgba(6, 6, 8, 0.96); border-bottom: 1px solid var(--line); }
  .nav__links.is-open { display: flex; }
  .nav__links a { display: flex; align-items: center; min-height: 48px; }
  .lang { margin-top: 10px; }
  .head { flex-direction: column; align-items: flex-start; gap: 18px; }
  .story, .cards { grid-template-columns: minmax(0, 1fr); }
  .card { min-height: 0; }
  .card h3 { padding-top: 36px; }
  .socials { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .hero--side .hero__bg img { width: 100%; height: 100%; }
  .hero__title span { letter-spacing: 0.2em; }
  .hero__bg::after, .hero--side .hero__bg::after { background: linear-gradient(0deg, var(--bg) 4%, rgba(6, 6, 8, 0.82) 42%, rgba(6, 6, 8, 0.15) 80%); }
  .stats__grid { grid-template-columns: minmax(0, 1fr); }
  .stat, .stat:first-child { padding: 24px 0; border-left: 0; border-top: 1px solid var(--line); }
  .stat:first-child { border-top: 0; }
  .track { grid-template-columns: 34px minmax(0, 1fr) auto; padding: 16px; }
  .track__link span { display: none; }
  .btn { flex: 1 1 auto; justify-content: center; }
}

/* ============================================================
   Раскладка deck (layout: 'deck' в data.js): зеркальный хиро,
   бегущая строка, релизы постерами, каталог в две колонки
   ============================================================ */
.marquee { overflow: hidden; background: var(--accent2); color: #060608; }
.marquee__rail { display: flex; width: max-content; animation: marquee 28s linear infinite; }
.marquee span { display: inline-flex; align-items: center; gap: 28px; padding: 13px 14px; font-family: var(--font-display); font-weight: 800; font-size: 15px; letter-spacing: 0.02em; text-transform: uppercase; white-space: nowrap; }
.marquee span::after { content: ''; width: 8px; height: 8px; background: #060608; transform: rotate(45deg); }
@keyframes marquee { to { transform: translateX(-50%); } }

.hero--mirror .hero__bg img { margin: 0 auto 0 0; }
.hero--mirror .hero__bg::after { background: linear-gradient(270deg, var(--bg) 40%, rgba(6, 6, 8, 0.55) 60%, rgba(6, 6, 8, 0) 84%), linear-gradient(0deg, var(--bg) 0%, rgba(6, 6, 8, 0) 34%); }
.hero--mirror .hero__in { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.hero--mirror .eyebrow, .hero--mirror .hero__note { flex-direction: row-reverse; }
.hero--mirror .hero__cta { justify-content: flex-end; }

.posters { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.poster.track { display: block; padding: 0; }
.poster__img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
.poster:hover .poster__img { transform: scale(1.05); }
.poster__img--none { display: grid; place-items: center; background: radial-gradient(circle at 70% 20%, var(--accent), #0a0c16 70%); font-family: var(--font-display); font-weight: 800; font-size: 64px; color: rgba(244, 245, 247, 0.22); }
.poster__body { position: relative; margin-top: -64px; padding: 64px 16px 14px; background: linear-gradient(0deg, var(--panel) 62%, rgba(12, 13, 18, 0)); }
.poster__no { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-family: var(--font-tech); font-size: 12px; letter-spacing: 0.16em; color: var(--accent2); }
.poster .track__title { min-height: 2.4em; align-items: flex-start; font-size: clamp(14px, 1.25vw, 17px); line-height: 1.2; }
/* подпись в 1-2 строки: ряд кнопок у всех постеров на одной высоте */
.poster .track__meta { min-height: 3.1em; }
.poster .track__actions { margin-top: 10px; justify-content: space-between; }

.tracks--grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.track.has-cover { grid-template-columns: 52px minmax(0, 1fr) auto; gap: 14px; padding: 10px 18px 10px 10px; }
.track__cover { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; }
.tracks--grid .track__title { font-size: 15px; }

.layout-deck .cards { grid-template-columns: minmax(0, 1fr); gap: 0; border-top: 1px solid var(--line); }
.layout-deck .card { display: grid; grid-template-columns: 170px minmax(0, 1fr) minmax(0, 1.2fr) auto; align-items: center; gap: 28px; min-height: 0; padding: 30px 8px; background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.layout-deck .card::before { display: none; }
.layout-deck .card h3 { margin: 0; padding: 0; font-size: clamp(18px, 2.2vw, 28px); text-transform: uppercase; transition: color 0.3s, transform 0.3s; }
.layout-deck .card:hover h3 { color: var(--accent2); transform: translateX(10px); }
.layout-deck .card p, .layout-deck .card a { margin: 0; }

@media (max-width: 900px) {
  .posters { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: calc(var(--pad) * -1); padding-inline: var(--pad); scrollbar-width: none; }
  .posters::-webkit-scrollbar { display: none; }
  .poster.track { flex: 0 0 min(62vw, 250px); scroll-snap-align: center; }
  .tracks--grid { grid-template-columns: minmax(0, 1fr); }
  .layout-deck .card { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 24px 0; }
}
@media (max-width: 640px) {
  .hero--mirror .hero__in { align-items: flex-start; text-align: left; }
  .hero--mirror .eyebrow, .hero--mirror .hero__note { flex-direction: row; }
}

/* ============================================================
   Окно реакций на песню (reactions: true в data.js)
   ============================================================ */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.track__react { position: relative; display: grid; place-items: center; width: 46px; height: 46px; border: 1px solid rgba(244, 245, 247, 0.22); border-radius: 50%; font-size: 18px; transition: 0.25s; }
.track__react:hover, .track__react:focus-visible { border-color: var(--accent2); color: var(--accent2); }
.track__react.is-set { background: var(--accent2); border-color: var(--accent2); color: #060608; }
.track__react.is-set svg path { fill: currentColor; }
.tracks--grid .track__react { width: 40px; height: 40px; font-size: 16px; }

.rx { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; padding: var(--pad); visibility: hidden; opacity: 0; transition: opacity 0.3s ease, visibility 0.3s; }
/* при открытии видимость включается сразу, иначе фокус не встанет на кнопку внутри окна */
.rx.is-open { visibility: visible; opacity: 1; transition: opacity 0.3s ease; }
.rx__back { position: absolute; inset: 0; background: rgba(6, 6, 8, 0.78); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.rx__win { position: relative; width: min(100%, 520px); padding: 34px; background: radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 60%), var(--panel); border: 1px solid rgba(244, 245, 247, 0.2); border-radius: 20px; box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6); transform: translateY(28px) scale(0.97); transition: transform 0.45s cubic-bezier(0.2, 0.9, 0.2, 1.1); }
.rx.is-open .rx__win { transform: none; }
.rx__win > .corner { opacity: 1; }
.rx__x { position: absolute; top: 14px; right: 14px; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; font-size: 20px; color: var(--mut); transition: 0.25s; }
.rx__x:hover, .rx__x:focus-visible { color: var(--accent2); background: rgba(244, 245, 247, 0.06); }
.rx__title { margin: 16px 46px 24px 0; font-family: var(--font-display); font-weight: 800; font-size: clamp(22px, 3vw, 30px); line-height: 1.1; letter-spacing: -0.03em; text-transform: uppercase; }
.rx__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.rx__btn { display: flex; align-items: center; gap: 12px; min-height: 62px; padding: 0 18px; border: 1px solid var(--line); border-radius: 14px; font-family: var(--font-tech); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; text-align: left; transition: border-color 0.25s, background 0.25s, color 0.25s, transform 0.25s; }
.rx__btn svg { font-size: 22px; color: var(--accent2); transition: color 0.25s; }
.rx__btn:hover { border-color: rgba(244, 245, 247, 0.4); transform: translateY(-2px); }
.rx__btn[aria-pressed='true'] { background: var(--accent2); border-color: var(--accent2); color: #060608; }
.rx__btn[aria-pressed='true'] svg { color: #060608; }
.rx__btn:focus-visible, .rx__x:focus-visible, .track__react:focus-visible { outline: 2px solid var(--accent2); outline-offset: 3px; }
.rx__note { margin-top: 20px; font-family: var(--font-tech); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mut); }

@media (max-width: 640px) {
  /* на телефоне окно выезжает снизу, как шторка */
  .rx { place-items: end center; padding: 0; }
  .rx__win { width: 100%; padding: 28px var(--pad) calc(26px + env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; border-bottom: 0; transform: translateY(100%); }
  .rx__grid { grid-template-columns: minmax(0, 1fr); }
  .rx__btn { min-height: 56px; }
}

/* Server-confirmed per-work results in the existing separate reaction popup. */
.rx__win { max-height: calc(100svh - 24px); overflow-y: auto; overscroll-behavior: contain; }
.rx__btn { position: relative; overflow: hidden; padding-block: 12px; }
.rx__label { display: grid; gap: 7px; min-width: 0; }
.rx__metric { font-size: 12px; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.rx__bar { position: absolute; bottom: 0; left: 0; width: var(--rx-percent); height: 3px; background: var(--accent2); transition: width 0.2s; }
.rx__btn[aria-pressed='true'] .rx__bar { background: #060608; }
.rx__btn[aria-disabled='true'] { cursor: wait; }
.rx__results { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.rx__total { font-weight: 700; font-variant-numeric: tabular-nums; }
.rx__basis { margin-top: 8px; color: var(--mut); font-size: 12px; line-height: 1.5; }
.rx__retry { margin-top: 12px; }
.rx__metric[hidden], .rx__bar[hidden], .rx__results[hidden], .rx__retry[hidden] { display: none; }

/* Образы показываем целиком: текст и иллюстрация занимают разные колонки. */
.hero.hero--side {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 5vw, 80px);
  min-height: 760px;
  padding: 122px max(var(--pad), calc((100vw - 1240px) / 2)) 64px;
  background: radial-gradient(ellipse at 85% 45%, color-mix(in srgb, var(--accent) 13%, transparent), transparent 58%);
}
.hero--side .hero__bg {
  position: relative;
  inset: auto;
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  width: 100%;
  justify-self: center;
}
.hero--side .hero__bg picture {
  width: 100%;
  height: auto;
  padding: 10px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent2) 12%, var(--bg)), var(--bg));
  border: 1px solid color-mix(in srgb, var(--accent2) 27%, transparent);
  border-radius: 8px;
  box-shadow: 0 24px 70px #0006;
}
.hero--side .hero__bg img {
  width: 100%;
  height: auto;
  max-height: 590px;
  margin: 0;
  object-fit: contain;
  animation: portrait-arrive 1.1s ease both;
}
@keyframes portrait-arrive { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.hero--side .hero__bg::after { display: none; }
.hero--side .hero__in { grid-column: 1; grid-row: 1; width: 100%; min-width: 0; margin: 0; }
.hero--side .hero__title { font-size: clamp(46px, 7vw, 98px); }
.hero--side .hero__title--long { font-size: clamp(30px, 4.1vw, 59px); letter-spacing: -0.055em; }
.hero--side .hero__title span { line-height: 1.7; letter-spacing: 0.16em; font-size: clamp(14px, 1.4vw, 18px); }
.hero--side .hero__lead { max-width: 30em; font-size: clamp(17px, 1.45vw, 21px); line-height: 1.7; }
.hero--side .eyebrow { letter-spacing: 0.12em; font-size: 11px; }
.hero--side .hero__note { letter-spacing: 0.08em; }
.hero--mirror .hero__bg { grid-column: 1; }
.hero--mirror .hero__in { grid-column: 2; align-items: flex-start; text-align: left; }
.hero--mirror .eyebrow, .hero--mirror .hero__note { flex-direction: row; }
.hero--mirror .hero__cta { justify-content: flex-start; }
.hero--mirror.hero--side { background: radial-gradient(ellipse at 20% 45%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 60%); }
.story__card img { aspect-ratio: auto; height: auto; object-fit: contain; }
.story__copy { max-width: 42em; }
.story__copy p { line-height: 1.85; color: #f4f5f7b3; }
.story__copy p:first-child { line-height: 1.55; }
#story .head h2 { max-width: 19em; text-wrap: balance; }
#story .head h2 mark { line-height: 1.4; }
.section { scroll-margin-top: 94px; }
.nav { background: #060608e8; }
.nav__logo { flex-shrink: 0; }
.btn:focus-visible, .nav a:focus-visible { outline: 2px solid var(--accent2); outline-offset: 5px; }
/* Обложки с надписями: без обрезки и без перекрытия текстом карточки. */
.poster__img { aspect-ratio: 9 / 16; height: auto; object-fit: contain; background: #090b11; }
.poster:hover .poster__img { transform: none; }
.poster__body { margin-top: 0; padding: 18px 16px; background: var(--panel); }
.poster .track__title { min-height: 3.6em; }
.track__cover { width: 52px; height: auto; aspect-ratio: 9 / 16; object-fit: contain; background: #060608; border-radius: 3px; }
.posters { align-items: stretch; }
.poster.track { display: flex; flex-direction: column; }
.poster__body { flex: 1; display: flex; flex-direction: column; }
.poster .track__actions { margin-top: auto; padding-top: 14px; }
.stat__value { overflow-wrap: anywhere; }
/* Каталог: поиск и фильтры работают локально, без запросов к серверу. */
.catalog-tools { display: grid; grid-template-columns: minmax(200px, 1fr) auto; gap: 18px 24px; align-items: end; margin-bottom: 28px; }
.catalog-search { display: grid; gap: 8px; font-size: 12px; color: var(--mut); }
.catalog-search input { width: 100%; min-height: 48px; padding: 10px 16px; font: inherit; font-size: 16px; color: var(--white); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
.catalog-search input:focus-visible { outline: 2px solid var(--accent2); outline-offset: 2px; }
.catalog-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.catalog-filters button { min-height: 48px; padding: 10px 15px; border: 1px solid var(--line); border-radius: 8px; font-size: 12px; }
.catalog-filters button[aria-pressed="true"] { background: var(--accent2); border-color: var(--accent2); color: #060608; }
.catalog-filters button:focus-visible { outline: 2px solid var(--accent2); outline-offset: 3px; }
.catalog-status { grid-column: 1 / -1; font-size: 13px; color: var(--mut); }
.catalog-empty { padding: 32px 0; color: var(--mut); }
.track[hidden], .catalog-empty[hidden] { display: none !important; }
@media (max-width: 1050px) and (min-width: 761px) {
  .hero.hero--side { gap: 28px; min-height: 640px; }
  .hero--side .hero__title--long { font-size: 3.9vw; }
  .hero--side .hero__cta { gap: 8px; }
  .hero--side .btn { padding-inline: 16px; }
}
@media (max-width: 900px) { .catalog-tools { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .hero.hero--side { grid-template-columns: minmax(0, 1fr); min-height: 0; padding: 96px var(--pad) 44px; gap: 28px; }
  .hero--side .hero__bg, .hero--mirror .hero__bg { grid-column: 1; grid-row: 1; max-width: 400px; }
  .hero--side .hero__bg picture { padding: 6px; }
  .hero--side .hero__bg img { width: 100%; height: auto; max-height: 360px; }
  .hero--side .hero__in, .hero--mirror .hero__in { grid-column: 1; grid-row: 2; }
  .hero--side .hero__title { margin-block: 16px; font-size: clamp(46px, 11vw, 74px); }
  .hero--side .hero__title--long { font-size: clamp(27px, 7.4vw, 52px); }
  .hero--side .hero__title span { margin-top: 12px; }
  .hero--side .hero__lead { font-size: 17px; }
  .hero--side .hero__cta { margin-top: 24px; }
  .hero--side .hero__note { margin-top: 24px; }
  .hero--side .eyebrow { font-size: 10px; letter-spacing: 0.08em; }
  .hero--side .eyebrow::before { width: 20px; flex-shrink: 0; }
  .catalog-filters button { flex: 1 1 auto; }
}

/* One portrait rail on every viewport; native video controls stay unobstructed. */
.poster-rail { min-width: 0; }
.poster-rail[hidden], .poster-rail__nav[hidden], .catalog-pagination[hidden], .catalog-pagination [hidden] { display: none !important; }
.poster-rail__nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: -6px 0 14px; }
.poster-rail__hint { color: var(--mut); font-size: 12px; letter-spacing: .04em; }
.poster-rail__buttons { display: flex; flex-shrink: 0; gap: 8px; }
.poster-rail__buttons button { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--accent2) 60%, transparent); background: var(--panel); color: var(--accent2); transition: opacity .2s, background .2s; }
.poster-rail__buttons button:disabled { opacity: .24; cursor: default; }
.poster-rail__buttons button:focus-visible { outline: 2px solid var(--accent2); outline-offset: 3px; }
.poster-rail__buttons svg { width: 20px; height: 20px; }
.poster-rail__prev svg { transform: rotate(180deg); }
.poster-rail__viewport { position: relative; min-width: 0; }
.poster-rail .posters { display: flex; flex-wrap: nowrap; align-items: stretch; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: 0; padding: 3px; scroll-padding-inline: 3px; overscroll-behavior-x: contain; scrollbar-width: none; }
.poster-rail .posters::-webkit-scrollbar { display: none; }
.poster-rail .poster.track { flex: 0 0 clamp(220px, calc((100% - 48px) / 5), 260px); min-width: 0; scroll-snap-align: start; }
video.poster__img { display: block; width: 100%; height: auto; aspect-ratio: 9 / 16; object-fit: contain; }
video.poster__img:focus-visible { outline: 2px solid var(--accent2); outline-offset: -3px; }
.poster-rail__viewport::before, .poster-rail__viewport::after { content: ''; position: absolute; top: 0; bottom: 12px; width: clamp(28px, 4vw, 48px); z-index: 2; pointer-events: none; transition: opacity .2s; }
.poster-rail__viewport::before { left: 0; background: linear-gradient(90deg, var(--bg), transparent); opacity: 0; }
.poster-rail__viewport::after { right: 0; background: linear-gradient(270deg, var(--bg), transparent); }
.poster-rail.is-ready .poster-rail__viewport::after { opacity: 0; }
.poster-rail.can-prev .poster-rail__viewport::before, .poster-rail.can-next .poster-rail__viewport::after { opacity: 1; }
.catalog-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; margin-top: 24px; }
.catalog-pagination button { min-width: 44px; min-height: 44px; max-width: 100%; padding: 10px 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--white); font: inherit; font-size: 13px; }
.catalog-pagination button:disabled { opacity: .4; cursor: default; }
.catalog-pagination button[aria-current="page"] { background: var(--accent2); border-color: var(--accent2); color: #060608; }
.catalog-pagination button:focus-visible { outline: 2px solid var(--accent2); outline-offset: 3px; }
.catalog-pagination__status, .catalog-pagination [role="status"] { color: var(--mut); font-size: 13px; text-align: center; overflow-wrap: anywhere; }
@media (max-width: 900px) {
  .poster-rail__viewport { margin-inline: calc(var(--pad) * -1); }
  .poster-rail .posters { padding-inline: var(--pad); scroll-padding-inline: var(--pad); }
  .poster-rail .poster.track { flex-basis: min(62vw, 250px); }
  .poster-rail__viewport::before, .poster-rail__viewport::after { width: clamp(28px, 9vw, 48px); }
}
@media (prefers-reduced-motion: reduce) {
  .poster-rail__buttons button, .poster-rail__viewport::before, .poster-rail__viewport::after { transition: none; }
}

.hero__author { margin: 0 0 8px; padding: 4px 0 4px 16px; border-left: 2px solid var(--accent2); text-align: left; }
.hero__author-label { display: block; color: var(--accent2); font-size: 11px; letter-spacing: .13em; line-height: 1.7; text-transform: uppercase; }
.hero__author-name { display: block; color: var(--white); font-size: clamp(17px, 1.6vw, 21px); font-weight: 500; line-height: 1.5; }

/* ============================================================
   Карточка песни (songDetails: true в data.js)
   ============================================================ */

/* название и обложка - кнопки открытия карточки, внешне те же, что были */
.track__open { display: inline; padding: 0; font: inherit; letter-spacing: inherit; color: inherit; text-align: inherit; text-transform: inherit; cursor: pointer; transition: color 0.25s; }
.track__title .track__open:hover { color: var(--accent2); }
.track__open--cover { display: block; flex: none; border-radius: 8px; overflow: hidden; }
.poster .track__open--cover { width: 100%; border-radius: 0; }
.track__open:focus-visible { outline: 2px solid var(--accent2); outline-offset: 3px; }
.track__open--cover:focus-visible { outline-offset: -3px; }

.sd { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; padding: var(--pad); visibility: hidden; opacity: 0; transition: opacity 0.3s ease, visibility 0.3s; }
/* при открытии видимость включается сразу, иначе фокус не встанет на кнопку внутри окна */
.sd.is-open { visibility: visible; opacity: 1; transition: opacity 0.3s ease; }
.sd__back { position: absolute; inset: 0; background: rgba(6, 6, 8, 0.8); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.sd__win { position: relative; display: flex; width: min(100%, 860px); max-height: calc(100svh - var(--pad) * 2); background: radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--accent) 28%, transparent), transparent 55%), var(--panel); border: 1px solid rgba(244, 245, 247, 0.2); border-radius: 20px; box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6); overflow: hidden; transform: translateY(28px) scale(0.97); transition: transform 0.45s cubic-bezier(0.2, 0.9, 0.2, 1.1); }
.sd.is-open .sd__win { transform: none; }
.sd__win > .corner { z-index: 2; opacity: 1; }
/* крестик лежит вне прокручиваемой части - остаётся на месте при любой высоте экрана */
.sd__x { position: absolute; top: 12px; right: 12px; z-index: 3; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: rgba(6, 6, 8, 0.7); font-size: 20px; color: var(--white); transition: color 0.25s; /* не all: иначе унаследованная видимость у кнопки включается с задержкой и фокус на неё не встаёт */ }
.sd__x:hover { color: var(--accent2); }
.sd__x:focus-visible, .sd__copy:focus-visible, .sd__link:focus-visible, .sd__url:focus-visible { outline: 2px solid var(--accent2); outline-offset: 3px; }
.sd__body { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); width: 100%; max-height: inherit; overflow-y: auto; overscroll-behavior: contain; }

/* A long title/QR column must not vertically center and clip the portrait on short screens. */
.sd__art { display: grid; place-items: center; align-self: start; min-height: 0; background: #040406; }
.sd__img { width: 100%; height: 100%; max-height: calc(100svh - var(--pad) * 2); object-fit: contain; }
.sd__noart { display: grid; place-items: center; width: 100%; height: 100%; min-height: 300px; padding: 28px; background: radial-gradient(circle at 70% 20%, var(--accent), #0a0c16 72%); font-family: var(--font-display); font-weight: 800; font-size: clamp(20px, 2.4vw, 28px); line-height: 1.15; letter-spacing: -0.03em; text-align: center; text-transform: uppercase; color: rgba(244, 245, 247, 0.9); }
[hidden].sd__img, [hidden].sd__noart { display: none; }

.sd__info { padding: 40px 34px 34px; }
.sd__title { margin: 16px 40px 10px 0; font-family: var(--font-display); font-weight: 800; font-size: clamp(22px, 3vw, 32px); line-height: 1.1; letter-spacing: -0.03em; text-transform: uppercase; }
.sd__meta { color: var(--mut); }
.sd__release { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.sd__release[hidden] { display: none; }
.sd__status { flex: 1 1 100%; min-height: 1.5em; font-size: 13px; color: var(--accent2); }
.sd__url { flex: 1 1 100%; height: 46px; padding: 0 14px; background: rgba(244, 245, 247, 0.06); border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 14px; color: var(--white); }
.sd__qr { display: flex; flex: 1 1 100%; align-items: center; gap: 18px; margin-top: 0; padding-top: 10px; border-top: 1px solid var(--line); }
.sd__qr[hidden] { display: none; }
.sd__qr img { width: 132px; height: 132px; padding: 8px; background: #fff; border-radius: 10px; }
.sd__qr figcaption { font-family: var(--font-tech); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mut); }
.sd__nolink { margin-top: 26px; padding: 16px 18px; border: 1px dashed var(--line); border-radius: 12px; font-size: 14px; color: var(--mut); }

@media (max-width: 760px) {
  /* на телефоне карточка выезжает снизу; обложка сверху, текст под ней, всё прокручивается */
  .sd { place-items: end center; padding: 0; }
  .sd__win { width: 100%; max-height: calc(100svh - 24px); border-radius: 22px 22px 0 0; border-bottom: 0; transform: translateY(100%); }
  /* обычный поток, не сетка: сетка в ограниченной высоте сжимала обложку вместо прокрутки */
  .sd__body { display: block; }
  .sd__art { min-height: 0; }
  .sd__img { height: auto; max-height: 42svh; }
  .sd__noart { min-height: 180px; }
  .sd__info { padding: 24px var(--pad) calc(28px + env(safe-area-inset-bottom)); }
  .sd__release .btn { flex: 1 1 100%; justify-content: center; }
}

/* Reserve the portrait before poster/metadata loads; contain preserves the complete frame. */
.sd__video { display: block; width: 100%; height: auto; aspect-ratio: 9 / 16; max-height: calc(100svh - var(--pad) * 2 - 2px); object-fit: contain; background: #040406; }
.sd__video[hidden], .sd__sample[hidden] { display: none; }
.sd__sample { margin-top: 10px; color: var(--mut); font-size: 12px; }
@media (max-width: 760px) { .sd__video { max-height: 48svh; } }

.sd__audio { width: 100%; margin-top: 18px; color-scheme: dark; }
.sd__audio[hidden] { display: none; }

/* Compact release details keep three-line titles within the portrait height. */
@media (min-width: 761px) {
  .sd__info { padding: 32px 34px 20px; }
  .sd__release { margin-top: 18px; gap: 8px; }
  .sd__status:empty { display: none; }
  .sd__qr { padding-top: 8px; }
}
