:root {
  --bg: #07060f;
  --fg: #f4f1ff;
  --muted: rgba(244, 241, 255, .68);
  --accent: #ff8a3d;
  --accent-2: #ff4fa3;
  --line: rgba(255, 255, 255, .14);
  --glass: rgba(14, 10, 30, .5);
  --display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --pad: clamp(20px, 5vw, 72px);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  /* fallback, если WebGL недоступен */
  background-image:
    radial-gradient(60vmax 50vmax at 15% 10%, rgba(40, 70, 170, .45), transparent 60%),
    radial-gradient(50vmax 45vmax at 85% 80%, rgba(255, 110, 70, .35), transparent 60%);
  background-attachment: fixed;
  color: var(--fg);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }

#bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  opacity: 0;
  transition: opacity 1.2s ease;
}
#bg.is-ready { opacity: 1; }

.grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- NAV ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px var(--pad);
}
.nav { transition: background .3s, backdrop-filter .3s; }
.nav.is-scrolled {
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--fg);
  color: #12091f;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: transform .3s var(--ease), background .3s, color .3s;
}
.btn:hover { transform: translateY(-2px) scale(1.03); background: var(--accent); color: #fff; }

/* ---------- HERO (один экран) ---------- */
.hero {
  flex: 1;
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 104px var(--pad) 12px;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(28px, 5vw, 80px);
  align-items: center;
}

.venue {
  margin: 0 0 10px;
  font-family: var(--display);
  font-size: clamp(13px, 1.2vw, 16px);
  font-weight: 900;
  letter-spacing: .22em;
  color: var(--accent);
}

.eyebrow {
  margin: 0 0 20px;
  font-family: var(--display);
  font-size: clamp(16px, 1.7vw, 22px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: .02em;
  color: var(--fg);
  text-shadow: 0 2px 14px rgba(7, 6, 15, .4);
}

.hero__title {
  margin: 0 0 24px;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(44px, min(9.5vw, 17vh), 150px);
  line-height: .98;
  letter-spacing: -.01em;
  text-transform: uppercase;
}
.line { display: block; overflow: hidden; padding: .04em .06em .04em 0; } /* запас справа: overflow:hidden не должен подрезать край последней буквы */
.line__inner {
  display: block;
  transform: translateY(110%) rotate(3deg);
  transform-origin: left bottom;
  animation: rise 1.2s var(--ease) var(--d, 0s) forwards;
}
.line:nth-child(2) .line__inner {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-right: .1em;
}
@keyframes rise { to { transform: none; } }

.hero__lead { max-width: 40ch; margin: 0 0 clamp(20px, 4vh, 40px); font-size: clamp(16px, 1.4vw, 19px); color: var(--muted); }

/* ---------- PLAYER ---------- */
.player {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 clamp(18px, 3vh, 32px);
  padding: 8px 20px 8px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--fg);
  font: 600 15px/1 var(--body);
  cursor: pointer;
  transition: border-color .3s, transform .3s var(--ease);
}
/* заголовок + плеер (index.html): блок по ширине заголовка, кнопка по центру под ним */
.title-block { width: fit-content; max-width: 100%; margin: 0 0 clamp(10px, 2vh, 20px); }
.title-block .hero__title { margin-bottom: clamp(14px, 2.4vh, 24px); }
.player-row { display: flex; justify-content: center; }
.player-row .player { margin: 0; }
.player:hover { border-color: rgba(255, 255, 255, .45); transform: translateY(-2px); }
.player:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.player__label { letter-spacing: .12em; text-transform: uppercase; font-size: 13px; }
.player__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #1a0d05;
  transition: background .3s;
}
.player__icon svg { width: 20px; height: 20px; fill: currentColor; grid-area: 1 / 1; }
.player .i-pause { display: none; }
.player.is-playing .i-play { display: none; }
.player.is-playing .i-pause { display: block; }
.player__bars { display: flex; align-items: flex-end; gap: 3px; height: 18px; }
.player__bars i { width: 3px; height: 4px; border-radius: 2px; background: var(--fg); opacity: .5; transition: opacity .3s; }
.player.is-playing .player__bars i { opacity: 1; animation: eq 1s ease-in-out infinite; }
.player.is-playing .player__bars i:nth-child(2) { animation-delay: -.3s; }
.player.is-playing .player__bars i:nth-child(3) { animation-delay: -.6s; }
.player.is-playing .player__bars i:nth-child(4) { animation-delay: -.15s; }
.player.is-loading .player__icon { animation: pulse 1s ease-in-out infinite; }
@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 18px; } }
@keyframes pulse { 50% { opacity: .55; } }

.countdown { display: flex; gap: clamp(16px, 2.6vw, 36px); }
.countdown div { display: flex; flex-direction: column; min-width: 52px; }
.countdown b {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(26px, 3.4vw, 46px);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.countdown span { margin-top: 8px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* ---------- LINE UP ---------- */
.lineup {
  padding: clamp(20px, 2.4vw, 32px) clamp(20px, 2.6vw, 36px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.day + .day { margin-top: 18px; }
.day h2 { margin: 0 0 6px; font-family: var(--display); font-size: 16px; font-weight: 700; }
.schedule { list-style: none; margin: 0; padding: 0; }
.schedule li {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  padding: 7px 0;
  border-top: 1px solid var(--line);
  font-size: 16px;
  font-weight: 500;
}
.lineup__note {
  margin: 12px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  font-style: italic;
  color: var(--muted);
}
.schedule time { color: var(--accent); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- FOOTER ---------- */
.footer {
  display: flex;
  justify-content: flex-end;
  padding: 4px var(--pad) 14px;
}
.footer__group { display: flex; align-items: center; gap: 14px; }
.logo-org {
  height: 64px;
  width: auto;
  display: block;
  filter: drop-shadow(0 2px 14px rgba(7, 6, 15, .85));
}
.logo-partner {
  display: block;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  transition: transform .3s var(--ease), opacity .3s;
}
.logo-partner { box-shadow: 0 0 0 2px rgba(255, 255, 255, .28), 0 6px 24px rgba(7, 6, 15, .6); }
.logo-partner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.logo-partner:hover { transform: translateY(-2px) scale(1.08); opacity: 1; }
.nav__partners { display: flex; align-items: center; gap: 14px; flex: none; }
span.logo-partner:hover { transform: none; } /* логотип без ссылки — без hover-эффекта */

/* ---------- TEXT SPLIT / REVEAL ---------- */
.js [data-split] .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .12em; margin-bottom: -.12em; }
.js [data-split] .c {
  display: inline-block;
  transform: translateY(105%);
  opacity: 0;
  transition: transform .9s var(--ease), opacity .6s ease;
  transition-delay: calc(var(--i) * var(--step, 30ms) + var(--base, 0s));
}
.js [data-split].is-in .c { transform: none; opacity: 1; }

.js [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s ease var(--d, 0s), transform 1s var(--ease) var(--d, 0s);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; align-items: start; padding-top: 96px; gap: 28px; }
  .hero__title { font-size: clamp(44px, 16vw, 110px); }
  .hero__title { margin-bottom: 18px; }
  .hero__lead { display: none; }
  .footer { justify-content: center; padding-top: 24px; }
  .logo-org { height: 48px; }
  .logo-partner { width: 68px; height: 68px; }
  .schedule li { padding: 7px 0; font-size: 15px; }
  .day + .day { margin-top: 14px; }
}

/* невысокие десктопные окна: ужимаем, чтобы всё влезло без прокрутки */
@media (min-width: 901px) and (max-height: 700px) {
  .schedule li { padding: 6px 0; font-size: 15px; }
  .day + .day { margin-top: 14px; }
  .hero__lead { display: none; }
  .hero { padding-top: 96px; }
  .logo-org { height: 52px; }
  .logo-partner { width: 64px; height: 64px; }
}

/* ---------- REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .line__inner { animation-duration: .01s; }
  .js [data-split] .c, .js [data-reveal] { transition-duration: .01s; transition-delay: 0s; }
  .player.is-playing .player__bars i { animation: none; height: 12px; }
}

/* ---------- Скрытые элементы (атрибут hidden должен побеждать display из классов) ---------- */
[hidden] { display: none !important; }

/* ---------- LINE UP: переключатель дней с fade ---------- */
.lineup--tabs { width: 100%; }
.lineup__tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 14px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .07);
}
.lineup__tab {
  flex: 1;
  padding: 11px 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: 700 12px/1 var(--display);
  letter-spacing: .04em;
  white-space: nowrap;
  cursor: pointer;
  transition: background .45s var(--ease), color .45s var(--ease);
}
.lineup__tab:hover { color: var(--fg); }
.lineup__tab.is-active { background: var(--fg); color: #12091f; }
.lineup__tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* обе панели лежат в одной ячейке сетки: высота = высота самой длинной (суббота), ничего не прыгает */
.lineup__panels { display: grid; }
.lineup__panels > .day {
  grid-area: 1 / 1;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .7s ease, transform .8s var(--ease), visibility 0s linear .7s;
}
.lineup__panels > .day + .day { margin-top: 0; }
.lineup__panels > .day.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0s;
}
.lineup__panels .schedule li {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .6s ease, transform .7s var(--ease);
}
.lineup__panels > .day.is-active .schedule li { opacity: 1; transform: none; }
.lineup__panels > .day.is-active .schedule li:nth-child(1) { transition-delay: .12s; }
.lineup__panels > .day.is-active .schedule li:nth-child(2) { transition-delay: .18s; }
.lineup__panels > .day.is-active .schedule li:nth-child(3) { transition-delay: .24s; }
.lineup__panels > .day.is-active .schedule li:nth-child(4) { transition-delay: .30s; }
.lineup__panels > .day.is-active .schedule li:nth-child(5) { transition-delay: .36s; }
.lineup__panels > .day.is-active .schedule li:nth-child(6) { transition-delay: .42s; }

/* ---------- POSTER: заголовки и читаемый текст ---------- */
.poster .venue,
.poster .eyebrow {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(22px, 2.8vw, 38px);
  line-height: 1.15;
  letter-spacing: .03em;
  text-shadow: 0 2px 14px rgba(7, 6, 15, .35);
}
.poster .venue { font-weight: 900; color: var(--accent); }
.poster .eyebrow { margin-bottom: 18px; font-weight: 700; color: var(--fg); }

.poster .hero__lead {
  max-width: 34ch;
  font-size: clamp(18px, 1.7vw, 22px);
  font-weight: 500;
  line-height: 1.55;
  color: rgba(244, 241, 255, .95);
  text-shadow: 0 1px 16px rgba(7, 6, 15, .85), 0 0 2px rgba(7, 6, 15, .4);
}

/* ---------- POSTER: прозрачная карточка, расписание в две колонки ---------- */
.poster .lineup {
  background: rgba(14, 10, 30, .24);
  border-color: rgba(255, 255, 255, .22);
  backdrop-filter: blur(18px) saturate(1.25);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
  text-shadow: 0 1px 10px rgba(7, 6, 15, .6), 0 0 2px rgba(7, 6, 15, .3);
}
.poster .lineup__tabs { background: rgba(7, 6, 15, .28); }
.poster .lineup__panels { container-type: inline-size; }
.poster .lineup__panels .schedule li { padding: 9px 0; font-size: 17px; font-weight: 600; }
.poster .lineup__panels .schedule time { font-size: 15px; }
/* приписка про обновление Line Up: заметная плашка с пульсирующей точкой */
.poster .lineup__note {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 0;
  padding: 13px 16px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 138, 61, .14);
  color: var(--fg);
  font-size: 14px;
  font-style: normal;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.poster .lineup__note::before {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(255, 138, 61, .6);
  animation: note-pulse 2s ease-out infinite;
}
@keyframes note-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255, 138, 61, .6); }
  70%  { box-shadow: 0 0 0 10px rgba(255, 138, 61, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 138, 61, 0); }
}

/* больше воздуха: широкие поля, чтобы шейдер был виден вокруг контента */
.poster { --pad: clamp(24px, 7vw, 120px); }
.poster .nav { align-items: flex-start; padding-top: 32px; padding-bottom: 0; }
.poster .hero { padding-top: 136px; padding-bottom: 64px; }
.poster .logo-partner { flex: none; }

/* когда в карточке достаточно места: время над названием, 3 + 3 в две колонки */
@container (min-width: 360px) {
  .poster .lineup__panels .schedule {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(3, auto);
    grid-auto-flow: column;
    column-gap: 32px;
  }
  .poster .lineup__panels .schedule li {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 0 14px;
  }
  .poster .lineup__panels .schedule time { font-size: 14px; letter-spacing: .08em; }
}

/* десктоп: карточка шире, заголовок чуть меньше, чтобы они не пересекались */
@media (min-width: 901px) {
  .poster .hero { grid-template-columns: 1fr 1fr; }
  .poster .hero__title { font-size: clamp(44px, min(7.8vw, 15vh), 130px); }
}

@media (prefers-reduced-motion: reduce) {
  .lineup__panels > .day,
  .lineup__panels .schedule li,
  .lineup__tab { transition-duration: .01s; transition-delay: 0s !important; }
  .poster .lineup__note::before { animation: none; }
}

/* POSTER: адаптация новых отступов */
@media (max-width: 900px) {
  .poster .nav { padding-top: 24px; }
  .poster .hero { padding-top: 112px; padding-bottom: 40px; }
  .poster .hero__title { font-size: clamp(40px, 14.2vw, 110px); }
  .poster .venue, .poster .eyebrow { font-size: clamp(18px, 5.2vw, 30px); }
}
@media (min-width: 901px) and (max-height: 700px) {
  .poster .hero { padding-top: 112px; padding-bottom: 32px; }
}

/* ---------- POSTER 2: поочерёдное появление надписей (fade) ---------- */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.fade-words {
  display: grid;           /* все надписи в одной ячейке: блок не прыгает по высоте */
  align-items: center;
  min-height: 1px;
  font-family: var(--display);
  text-shadow: 0 2px 24px rgba(7, 6, 15, .65);
}
.fw__item {
  grid-area: 1 / 1;
  font-size: clamp(34px, 4vw, 68px);
  font-weight: 900;
  white-space: nowrap;
  line-height: 1.05;
  letter-spacing: -.005em;
  text-transform: uppercase;
  color: var(--fg);
}
.fw__item--intro {
  font-size: clamp(26px, 3.3vw, 52px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: .01em;
  text-transform: none;
  color: var(--accent);
}
.js .fw__item {
  opacity: 0;
  transform: translateY(14px);
  filter: blur(8px);
  /* уход: быстрее */
  transition: opacity .4s ease, transform .4s var(--ease), filter .4s ease;
}
.js .fw__item.is-active {
  opacity: 1;
  transform: none;
  filter: none;
  /* появление: стартует, когда предыдущая надпись уже почти погасла */
  transition: opacity .8s ease .45s, transform .9s var(--ease) .45s, filter .8s ease .45s;
}
/* без анимации (prefers-reduced-motion): показываем все строки списком */
.fade-words.is-static { gap: 10px; align-content: center; }
.fade-words.is-static .fw__item { grid-area: auto; opacity: 1 !important; transform: none !important; filter: none !important; transition: none !important; }

@media (max-width: 900px) {
  .fw__item { font-size: clamp(28px, 8.6vw, 64px); white-space: normal; } /* 8.6vw: GETINGETOUT помещается в одну строку */
  .fw__item--intro { font-size: clamp(26px, 8vw, 44px); }
  .fade-words { min-height: 96px; }
}

/* ---------- screen.html: только заголовок поверх шейдера ---------- */
.screen { min-height: 100vh; min-height: 100dvh; }
.screen__main {
  flex: 1;
  display: grid;
  place-items: center;
  padding: var(--pad);
}
.screen .hero__title {
  margin: 0;
  text-align: center;
  font-size: clamp(44px, min(15vw, 26vh), 280px);
  filter: drop-shadow(0 4px 28px rgba(7, 6, 15, .35)); /* не text-shadow: он даёт прямоугольное «пятно» из-за overflow:hidden у строк */
}
.screen .line:nth-child(2) .line__inner { padding-right: 0; }

/* ---------- index.html: светлый шейдер Tunnel — затемняем подложку под текстом ---------- */
.bg-tunnel::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(7, 6, 15, .5) 0%, rgba(7, 6, 15, .34) 55%, rgba(7, 6, 15, .16) 100%),
    radial-gradient(120% 90% at 50% 50%, transparent 45%, rgba(7, 6, 15, .38) 100%); /* виньетка */
}
@media (max-width: 900px) {
  .bg-tunnel::before { background: rgba(7, 6, 15, .38); }
}

/* ---------- Телефон в альбомной ориентации (низкий экран): две колонки, заголовок поменьше ---------- */
@media (max-width: 900px) and (max-height: 520px) and (orientation: landscape) {
  .hero, .poster .hero { grid-template-columns: 1fr 1fr; align-items: center; gap: 24px; padding-top: 68px; padding-bottom: 20px; }
  /* «WINTER» ≈ 5.3em: в половину экрана (минус поля и зазор) помещается при шрифте ≈ 7.2vw */
  .hero__title, .poster .hero__title { font-size: clamp(30px, min(7.2vw, 22vh), 90px); }
  .title-block .hero__title { margin-bottom: 10px; }
  .poster .venue, .poster .eyebrow { font-size: clamp(15px, 3.4vw, 22px); }
  .poster .eyebrow { margin-bottom: 10px; }
  .nav, .poster .nav { padding-top: 14px; }
  .logo-org { height: 40px; }
  .logo-partner { width: 52px; height: 52px; }
  .nav__partners { gap: 10px; }
  .countdown b { font-size: 24px; }
  .schedule li, .poster .lineup__panels .schedule li { padding: 4px 0; font-size: 14px; }
  .lineup { padding: 10px 18px; }
  .poster .lineup__note { margin-top: 10px; padding: 9px 12px; font-size: 12px; }
  .hero > * { min-width: 0; }
  .fw__item { font-size: clamp(20px, 3.9vw, 44px); white-space: nowrap; } /* GETINGETOUT (~9.2em) помещается в половину экрана */
  .fw__item--intro { font-size: clamp(16px, 3.3vw, 30px); white-space: normal; }
  .fade-words { min-height: 1px; }
}
