/* Подключение кастомного шрифта */
@font-face {
  font-family: 'Karst';
  src: url('/fonts/Karst-ExtraBold.woff2') format('woff2'),
       url('/fonts/Karst-ExtraBold.woff') format('woff'),
       url('/fonts/Karst-ExtraBold.otf') format('opentype'),
       url('/fonts/Karst-ExtraBold.ttf') format('truetype');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Floriena';
  src: url('/fonts/FlorienaPersonalUseOnly-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Targa';
  src: url('/fonts/Targa.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Kollektif family */
@font-face {
  font-family: 'Kollektif';
  src: url('/fonts/Kollektif.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Kollektif';
  src: url('/fonts/Kollektif-Italic.ttf') format('truetype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Kollektif';
  src: url('/fonts/Kollektif-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Kollektif';
  src: url('/fonts/Kollektif-BoldItalic.ttf') format('truetype');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

/* Базовая тема и сетка */
:root {
  --bg-top: #1a0f1e; /* глубокий фиолет из референса */
  --bg-bottom: #333333; /* тёмно‑серый низ для тёмной темы */
  --text: #ffffff; /* базовый текст — белый */
  --muted: #5a5a63;
  --accent: #000; /* чёрные элементы */
  --neon: #7CFF4C; /* ярко‑салатовый */
  --radius: 16px;
  --container-w: 800px;
  --header-h: 80px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Kollektif', 'Targa', 'Floriena', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  /* белая база + верхний градиент, который не повторяется */
  background-color: var(--bg-bottom);
  background-image: linear-gradient(
    to bottom,
    var(--bg-top) 0,
    var(--bg-top) calc(var(--header-h) + 0px),
    var(--bg-bottom) 95%
  );
  background-repeat: no-repeat;
  background-size: 100% 70svh;
  background-attachment: scroll;
  transition: background-image .35s ease, background-color .35s ease;
}

/* Home page text white for better contrast */
body[data-no-parallax="1"] .heading-display,
body[data-no-parallax="1"] .lead,
body[data-no-parallax="1"] .about-details,
body[data-no-parallax="1"] .section,
body[data-no-parallax="1"] .releases .card .title {
  color: #fff;
}
body[data-no-parallax="1"] .form-card { background: rgba(0,0,0,.4); border-color: rgba(255,255,255,.2); }
body[data-no-parallax="1"] .form-label { color: #fff; }
body[data-no-parallax="1"] .form-input, body[data-no-parallax="1"] .form-textarea { background: rgba(255,255,255,.92); }

/* Home only: animated morphing gradient background under content */
.gradient-bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.gradient-bg .ball { position: absolute; width: 56vmax; height: 56vmax; left: var(--x); top: var(--y); translate: -50% -50%; filter: blur(80px); opacity: .45; border-radius: 50%; background: var(--ball-color, var(--home-grad-start, var(--bg-top))); animation: gb-float var(--d) ease-in-out infinite alternate; mix-blend-mode: normal; }
/* Явно распределяем до 4-х цветов по шарам */
.gradient-bg .ball:nth-child(1) { --ball-color: var(--home-grad-c1, var(--home-grad-start, var(--bg-top))); }
.gradient-bg .ball:nth-child(2) { --ball-color: var(--home-grad-c2, var(--home-grad-end, #ffffff)); }
.gradient-bg .ball:nth-child(3) { --ball-color: var(--home-grad-c3, var(--home-grad-start, var(--bg-top))); }
.gradient-bg .ball:nth-child(4) { --ball-color: var(--home-grad-c4, var(--home-grad-end, #ffffff)); }
@keyframes gb-float { from { left: var(--x); top: var(--y); } to { left: var(--tx); top: var(--ty); } }
@media (prefers-reduced-motion: reduce) { .gradient-bg .ball { animation: none; } }

/* Насильно применяем шрифт к элементам форм, где наследование может не сработать */
button, input, select, textarea {
  font-family: inherit;
  border-radius: 12px;
}

/* Декоративные заголовки Karst ExtraBold */
h1, h2, h3, .heading-display {
  font-family: 'Karst', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  font-weight: 800;
}

/* Прилипающая шапка */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: flex-start;
  /* однотонный фон хедера */
  background: transparent;
  transition: background .25s ease, backdrop-filter .25s ease;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between; /* mobile: logo left, burger right */
  gap: 16px;
  padding: 8px 16px 0;
}
.site-header .logo {
  width: clamp(120px, 12vw, 120px);
  height: auto;
}
.site-header .site-nav {
  display: none;
  gap: 16px;
  margin-left: auto;
}
.site-header .site-nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.3em;
  padding: 6px 10px;
  border-radius: 999px;
  transition: color .2s ease, background-color .2s ease, box-shadow .2s ease;
}
.site-header .burger {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.site-header .burger span,
.site-header .burger::before,
.site-header .burger::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
}
.site-header .burger::before { top: 12px; }
.site-header .burger span { top: 21px; display: block; }
.site-header .burger::after { top: 30px; }

/* Mobile nav (drawer) */
.mobile-nav {
  position: fixed;
  top: var(--header-h);
  left: 0; right: 0;
  max-height: calc(100svh - var(--header-h));
  overflow: auto;
  display: grid;
  gap: 8px;
  padding: 16px;
  background: var(--bg-top);
  justify-items: center;
  text-align: center;
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: transform .2s ease, opacity .2s ease;
}
.mobile-nav a { color: #fff; text-decoration: none; font-weight: 700; padding: 6px 0; }
.mobile-nav a { border-radius: 999px; padding: 8px 12px; transition: color .2s ease, background-color .2s ease; }
.mobile-nav a:is(:hover,:focus-visible) { background: var(--neon); color: #0b0b0b; }
.mobile-nav.open { transform: translateY(0); opacity: 1; pointer-events: auto; }

/* Social links in mobile menu */
.mobile-nav svg { display:block; }
.mobile-nav a[aria-label] { display:inline-flex; align-items:center; justify-content:center; width:40px; height:40px; border-radius:999px; background: rgba(255,255,255,.12); }
.mobile-nav a[aria-label]:is(:hover,:focus-visible) { background: var(--neon); color:#0b0b0b; }

html.no-scroll, body.no-scroll { overflow: hidden; }

/* Desktop layout */
@media (min-width: 900px) {
  .site-header .container { justify-content: flex-start; }
  .site-header .site-nav { display: inline-flex; }
  .site-header .burger { display: none !important; }
  .mobile-nav { display: none !important; }
}

/* Home: transparent header until scrolled */
.site-header.is-scrolled,
body[data-no-parallax="1"] .site-header.is-scrolled {
  background: color-mix(in srgb, var(--bg-top) 85%, transparent);
  backdrop-filter: blur(6px);
}
/* На главной при открытом бургер-меню затемняем независимо от положения скролла */
body[data-no-parallax="1"] .site-header.is-menu-open {
  background: color-mix(in srgb, var(--bg-top) 92%, transparent);
  backdrop-filter: blur(8px);
}
/* Всегда затемнять хедер при открытом мобильном меню */
.site-header.is-menu-open {
  background: color-mix(in srgb, var(--bg-top) 92%, transparent);
  backdrop-filter: blur(8px);
}

/* Чуть плотнее стыкуем герой с контентом на мобильном */
section.hero + .container { margin-top: 12px; }

/* Боковые кнопки-переключатели релизов */
.nav-arrow {
  position: absolute; /* центр относительно hero */
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: color-mix(in srgb, var(--bg-top) 75%, rgba(0,0,0,0.6));
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
  backdrop-filter: blur(6px);
  cursor: pointer;
  user-select: none;
  font-size: 36px;
  line-height: 1;
  transition: transform .15s ease, opacity .2s ease, background .2s ease;
}
.nav-arrow.prev { left: 8px; }
.nav-arrow.next { right: 8px; }
.nav-arrow:is(:hover,:focus-visible) { transform: translateY(-50%) scale(1.06); background: var(--neon); color: #0b0b0b; }
.nav-arrow.is-disabled { opacity: .35; pointer-events: none; }

/* Hide arrows on pages that mark no-arrows */
body[data-no-arrows="1"] .nav-arrow { display: none !important; }

/* Контентная колонка */
.page {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

.container {
  width: min(var(--container-w), 100%);
  margin-inline: auto;
  padding-inline: 16px;
}

/* Make form card align to container width visually */
.container .form-card { width: 100%; }

/* Home hero mobile paddings */
.home-hero { padding: 24px 20px; }
@media (max-width: 640px) {
  .home-hero { padding: 24px 20px; grid-template-columns: 1fr; text-align: left; }
  .home-hero .heading-display { margin-left: 0; }
}

.section { margin: 36px 0 56px; }

/* Герой‑блок с постером */
.hero {
  position: relative;
  /* padding-top: clamp(24px, 6vw, 56px); */
  /* padding-bottom: clamp(8px, 3vw, 24px); */
  text-align: center;
  min-height: 420px;
}
.hero .container { position: relative; }
.hero .bg-title {
  position: absolute;
  z-index: 0;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  pointer-events: none;
  color: rgba(255,255,255,.5);
  text-align: center;
  line-height: .9;
  letter-spacing: 2px;
  font-size: clamp(48px, 14vw, 220px);
  user-select: none;
  transform: none;
  padding-top: 20%;
  will-change: transform;
  white-space: nowrap;
}
/* Per-letter blur control */
.hero .bg-title span { display:inline-block; filter: blur(var(--b, 0px)); padding: 0 .03em; transition: filter .45s ease, opacity .45s ease; }
.hero .brand {
  position: absolute;
  top: clamp(12px, 3vw, 24px);
  left: clamp(12px, 3vw, 24px);
  width: clamp(108px, 18vw, 180px); /* увеличено в 1.5 раза */
  height: auto;
  filter: none; /* логотип остаётся белым */
  opacity: 0.9;
}
.hero .flower {
  position: relative;
  z-index: 1;
  display: block;
  margin: 0 auto;
  width: min(720px, 95%);
  height: auto;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,.25));
  will-change: transform, filter, opacity;
}

.hero .overlay {
  position: static;
  z-index: 2;
  left: auto;
  right: auto;
  bottom: auto;
  padding: 0 16px;
  margin: 12px auto 0;
  max-width: var(--container-w);
  text-align: center;
  color: var(--text);
  font-size: clamp(19px, 2.2vw, 25px);
  line-height: 1.5;
  white-space: pre-line;
}

/* Описание превью */
.lead {
  margin: 24px auto 16px;
  line-height: 1.5;
  font-size: clamp(21px, 2.2vw, 25px);
  color: var(--text);
}

/* Встраиваемые блоки */
.embed {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  filter: grayscale(100%) contrast(110%);
  height: 120px;
  z-index: 12; /* выше героя, если мы его подтягиваем */
}
.embed + .embed { margin-top: 12px; }
.embed iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%; border: 0;
}

/* Responsive video (YouTube embed) */
.video-embed {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  aspect-ratio: 16 / 9;
  background: #000;
  margin-bottom: 28px;
}
.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Кнопки действий */
.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 20px 0 28px;
}
.btn {
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 16px 20px;
  font-weight: 700;
  font-size: clamp(21px, 2vw, 23px);
  cursor: pointer;
  transition: transform .1s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
}
.btn-buy { background: #111; color: #fff; }
.btn-stream { background: #2d2d2d; color: #fff; }
.btn-buy, .btn-stream { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:is(:hover,:focus-visible) { background: var(--neon); color: #0e0e10; box-shadow: 0 0 0 2px var(--neon), 0 8px 24px rgba(0,0,0,.18); }

/* Modal for stream platform selection */
.modal { position: fixed; inset: 0; display: grid; place-items: center; z-index: 200; }
.modal[hidden] { display: none; }
.modal .modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.5); backdrop-filter: blur(4px); opacity: 0; transition: opacity .15s ease; }
.modal .modal-dialog { position: relative; z-index: 1; width: min(520px, 92vw); border-radius: 12px; background: #fff; box-shadow: 0 12px 36px rgba(0,0,0,.22); transform: translateY(8px); opacity: 0; transition: transform .15s ease, opacity .15s ease; }
.modal.open .modal-backdrop { opacity: 1; }
.modal.open .modal-dialog { transform: translateY(0); opacity: 1; }
.modal .modal-header { display:flex; align-items:center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid #eee; }
.modal .modal-close { appearance: none; border: 0; background: transparent; font-size: 20px; cursor: pointer; }
.modal .modal-body { padding: 16px; }
.modal .link-list { display: grid; gap: 8px; }
.modal .stream-link { display:block; padding: 12px 14px; border-radius: 8px; text-decoration: none; background: #111; color: #fff; font-weight: 700; }
.modal .stream-link:is(:hover,:focus-visible) { background: var(--neon); color: #0b0b0b; }
/* Brand colors */
.modal .stream-link.brand-sc { background: #ff5500; }
.modal .stream-link.brand-spotify { background: #1DB954; }
.modal .stream-link.brand-ytm { background: #FF0033; }

/* Видео (заглушка/встраивание) */
.video {
  border-radius: 8px;
  background: #b83434;
  color: #fff;
  padding: clamp(24px, 6vw, 48px);
  text-align: center;
  font-size: clamp(20px, 3vw, 36px);
  line-height: 1.3;
  margin-bottom: 28px;
}

/* Детальное описание */
.details {
  margin: 24px 0 48px;
  line-height: 1.6;
  font-size: clamp(17px, 2vw, 25px);
  white-space: pre-line;
}

.about-details {
  margin: 24px 0 48px;
  line-height: 1.6;
  font-size: clamp(17px, 2vw, 25px);
  white-space: pre-line;
}
/* Картинки в тексте details */
.details img { display:block; max-width:100%; height:auto; border-radius: 8px; margin: 12px auto; }

/* About text on home: keep user line breaks */
.about-details { white-space: pre-line; color: var(--text); }

/* Simple form UI (no Tailwind) */
.form-card {
  margin-top: 12px;
  width: 100%;
  max-width: none;
  background: rgba(255,255,255,0.85);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 6px 18px rgba(0,0,0,.06);
}
.form-group { margin-bottom: 12px; }
.form-label { display:block; font-weight: 700; margin-bottom: 6px; color: #fff; }
.form-input,
.form-textarea {
  width: 100%;
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: 12px;
  padding: 12px 14px;
  background: #fff;
  color: #111;
  font-size: 16px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.form-input:focus,
.form-textarea:focus {
  border-color: var(--neon, #7CFF4C);
  box-shadow: 0 0 0 3px rgba(124,255,76,.35);
}
.form-actions { display:flex; align-items:center; gap:12px; margin-top: 6px; }
.btn-primary { background:#111; color:#fff; }
.btn-primary:hover { background: var(--neon, #7CFF4C); color: #0e0e10; }

/* Адаптивность */
@media (min-width: 1024px) {
  .container { padding-inline: 24px; }
}

/* Мобильные правки для уменьшения зазора между описанием и плеером */
@media (max-width: 640px) {
  .hero { min-height: auto; }
  /* Текст ниже картинки, без наложения */
  .hero .overlay {
    position: static;
    bottom: auto;
    left: auto; right: auto;
    margin: 12px auto 0;
    padding: 0 16px;
    text-align: center;
  }
  .hero .flower { /* max-width: 72vw; */ }
  /* Не подтягиваем следующий контейнер вверх на мобилке, чтобы не было пересечений */
  section.hero + .container { margin-top: 12px; }
}

/* Горизонтальная галерея релизов внизу */
.releases { margin: 24px 0 32px; }
.releases .rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 40%;
  gap: 16px;
  padding-bottom: 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -ms-overflow-style: none; /* IE/Edge */
  scrollbar-width: none;    /* Firefox */
}
.releases .rail::-webkit-scrollbar { display: none; } /* WebKit */
.releases .rail-wrap { position: relative; }
.releases .rail-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 999px; border:0; background: rgba(0,0,0,.6); color:#fff; cursor:pointer; display:none; }
.releases .rail-btn.prev { left: -8px; }
.releases .rail-btn.next { right: -8px; }
.releases.has-overflow .rail-btn { display:inline-flex; align-items:center; justify-content:center; }
.releases .card {
  scroll-snap-align: start;
  display: block;
  background: #fff;
  border-radius: 16px;
  color: #111;
  text-decoration: none;
  border: 2px solid transparent;
  padding: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
  transition: transform .15s ease, box-shadow .2s ease, border-color .15s ease;
}
.releases .card .art { width: 100%; aspect-ratio: 1 / 1; overflow: hidden; border-radius: 12px; display:grid; place-items:center; background:#fff; }
.releases .card .art img { display:block; max-width:100%; height:auto; object-fit: contain; }
.releases .card .title { padding: 12px 14px 4px; font-weight: 700; }
.releases .card:is(:hover,:focus-visible) { border-color: var(--neon); box-shadow: 0 10px 22px rgba(0,0,0,.12); transform: translateY(-2px); }

/* Общие hover для ссылок по сайту */
a { transition: color .2s ease; }
a:is(:hover,:focus-visible) { color: var(--neon); }

/* Ховер для пунктов меню в шапке */
.site-header .site-nav a:is(:hover,:focus-visible) { background: var(--neon); color: #0b0b0b; }

/* Ховер для иконки бургера */
.site-header .burger:is(:hover,:focus-visible)::before,
.site-header .burger:is(:hover,:focus-visible) span,
.site-header .burger:is(:hover,:focus-visible)::after { background: var(--neon); }

@media (min-width: 768px) {
  .releases .rail { grid-auto-columns: 240px; }
}

/* Переходы между страницами */
::view-transition-old(root),
::view-transition-new(root) { animation-duration: .45s; }

/* Доп. блюр-анимация для появления/исчезновения */
::view-transition-old(root) {
  animation-name: vt-blur-out;
}
::view-transition-new(root) {
  animation-name: vt-blur-in;
}

@keyframes vt-blur-in {
  from { filter: blur(12px) opacity(0.6); }
  to { filter: blur(0) opacity(1); }
}
@keyframes vt-blur-out {
  from { filter: blur(0) opacity(1); }
  to { filter: blur(12px) opacity(0.6); }
}


