/* Вариант 4 — «Афиша». Референс: Digital Design Days — розовый узор из полупрозрачных диагональных плоскостей,
   огромные прописные «лесенкой», моноширинные строки сведений рядом с квадратной плашкой-логотипом,
   слова, разнесённые на всю ширину, гигантское слово-место справа внизу, карточка «следующее событие» слева. */

:root {
  --grot: "Golos Text", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --gutter: clamp(12px, 1vw + 8px, 22px);
  --pink: #f15bb5;
  --violet: #8a4fe0;
  --swap-out: 340ms;
}
body { font-family: var(--grot); }

/* ——— розовый узор ——— */
.tint {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(130deg, #7b3fe0 0%, #e04fb3 42%, #f06ab8 60%, #8e5be8 100%);
  mix-blend-mode: soft-light; opacity: .9; transition: opacity .6s;
}
.planes { position: absolute; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; mix-blend-mode: screen; transition: opacity .6s; }
.planes i {
  position: absolute; left: 36%; top: -36%;
  width: 92vmax; height: 30vmax; border-radius: 3px;
  background: linear-gradient(115deg, rgba(255, 110, 205, .22) 0%, rgba(214, 80, 220, .14) 45%, rgba(140, 80, 235, .06) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 190, 240, .22);
  transform-origin: 0 0;
  transform: rotate(-38deg) translate(calc((var(--k) + var(--shift, 0) * .35) * -4.6vmax), calc(var(--k) * 4.2vmax + 30vmax));
  transition: transform 1.8s var(--ease-film);
}
body.is-sky .tint, body.is-sky .planes { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .planes i { transition: none; } }

/* ——— верх ——— */
.top {
  position: fixed; z-index: 30; top: 0; left: 0; right: 0;
  display: flex; align-items: flex-start; gap: clamp(14px, 8vw, 180px);
  padding: calc(var(--gutter) + var(--sat)) calc(var(--gutter) + var(--sar)) 0 calc(var(--gutter) + var(--sal));
}
.tile {
  flex: none; display: flex; flex-direction: column; justify-content: center;
  width: clamp(66px, 7vw, 100px); aspect-ratio: 1; padding: 0 8px;
  background: #2a1838; color: #fff; text-align: left;
  font: 500 clamp(10.5px, 1vw, 14px)/1 var(--mono); letter-spacing: -.02em;
}
.tile b { font-weight: 500; color: var(--pink); }
.info { display: flex; flex-direction: column; gap: 3px; margin: 2px 0 0; font: 400 clamp(11px, 1vw, 15px)/1.25 var(--mono); text-transform: uppercase; letter-spacing: .02em; color: #fff; }
.info u { text-decoration-thickness: 1px; text-underline-offset: 2px; color: #ffc8ec; }
.nav { display: flex; gap: clamp(22px, 3vw, 60px); margin: 14px 0 0 auto; }
.nav button { font: 500 clamp(16px, 1.35vw, 22px)/1 var(--grot); color: #fff; }
.nav button:hover { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
.nav button[aria-pressed="true"] { color: #ffc8ec; }
.ticket {
  flex: none; display: inline-flex; align-items: center; gap: 22px;
  height: clamp(46px, 4.6vw, 62px); padding: 0 18px 0 30px; border-radius: 999px;
  background: rgba(246, 240, 250, .92); color: #1b1220;
  font: 500 clamp(13px, 1.05vw, 16px)/1 var(--mono); text-transform: uppercase; letter-spacing: .02em; text-decoration: none;
}
.top .ticket { margin-top: 0; }
.dots { position: relative; width: 22px; height: 22px; display: inline-block; }
.dots i { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.dots i:nth-child(1) { left: 9px; top: 0; } .dots i:nth-child(2) { right: 0; top: 9px; } .dots i:nth-child(3) { left: 9px; bottom: 0; } .dots i:nth-child(4) { left: 0; top: 9px; }
.ticket:hover .dots { animation: spin 1.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.ticket--big { height: 60px; font-size: 15px; }

/* ——— экраны ——— */
.screen {
  position: fixed; inset: 0; z-index: 10;
  padding: calc(clamp(100px, 18vh, 200px) + var(--sat)) calc(var(--gutter) + var(--sar)) calc(70px + var(--sab)) calc(var(--gutter) + var(--sal));
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .62fr); grid-template-rows: auto minmax(0, 1fr) auto auto; column-gap: 4vw; overflow: hidden;
}
.mega {
  grid-column: 1; grid-row: 1; margin: 0;
  font: 800 clamp(40px, 11vw, 200px)/.86 var(--grot); letter-spacing: -.035em; text-transform: uppercase; color: #fff;
  text-shadow: 0 2px 40px rgba(60, 0, 60, .25);
}
.ml { display: block; white-space: nowrap; }
.ml--in { padding-left: .62em; }
.ml--in2 { padding-left: .62em; }
.mt { display: block; }
.mega sup { font-size: .5em; vertical-align: top; position: relative; top: .05em; margin-left: .02em; }
.para { grid-column: 2; grid-row: 1; align-self: start; margin: clamp(10px, 6vh, 90px) 0 0; max-width: 30ch; font: 400 clamp(16px, 1.45vw, 23px)/1.42 var(--grot); color: #fff; text-shadow: 0 1px 16px rgba(60, 0, 60, .3); }
.spread {
  grid-column: 1 / -1; grid-row: 3; display: flex; justify-content: space-between; gap: 12px; margin: 0 0 clamp(10px, 2vh, 22px);
  font: 400 clamp(11px, 1vw, 15px)/1.2 var(--mono); text-transform: uppercase; letter-spacing: .03em; color: #fff;
}
.next-card {
  grid-column: 1; grid-row: 4; justify-self: start; align-self: end;
  display: flex; align-items: stretch; height: clamp(76px, 8vw, 122px); width: min(100%, 510px);
  background: rgba(246, 240, 250, .2); color: #fff; text-align: left;
}
.nc-thumb { flex: none; aspect-ratio: 1; height: 100%; background: #2a1838 var(--next-photo) center / cover no-repeat; }
.nc-text { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 0 18px; font: 400 clamp(11px, 1vw, 15px)/1.5 var(--mono); text-transform: uppercase; letter-spacing: .02em; }
.nc-text b { font-weight: 500; }
.next-card i { align-self: center; padding: 0 22px 0 6px; font: 400 26px/1 var(--mono); font-style: normal; }
.next-card:hover { background: rgba(246, 240, 250, .3); }
.place-big {
  grid-column: 2; grid-row: 4; justify-self: end; align-self: end; width: 100%; text-align: right;
  font: 800 clamp(34px, 9vw, 170px)/.8 var(--grot); letter-spacing: -.035em; text-transform: uppercase; color: #fff;
}
.place-big [data-fit-line] { display: block; white-space: nowrap; overflow: hidden; }
.place-big:hover { color: #ffd9f2; }
.intro .para { margin-top: clamp(10px, 8vh, 120px); }
.intro .spread { grid-row: 3; }
.intro .ticket--big { grid-column: 1; grid-row: 4; justify-self: start; }
.finale .mega { grid-column: 1 / -1; }
.finale .ticket--big { grid-column: 1; grid-row: 4; justify-self: start; }

/* положение текста: лесенка может стоять справа или ниже */
body[data-ty="bottom"] .scene .mega { grid-row: 2; align-self: end; margin-bottom: clamp(10px, 3vh, 30px); }
body[data-tx="right"] .scene .mega { grid-column: 1 / -1; justify-self: end; text-align: right; }
body[data-tx="right"] .scene .ml--in, body[data-tx="right"] .scene .ml--in2 { padding: 0 .62em 0 0; }
body[data-tx="right"] .scene .para { grid-column: 1; grid-row: 1; }

[data-swap].is-out { transform: translateX(-18px); }
body[data-dir="prev"] [data-swap].is-out { transform: translateX(18px); }

.credit { position: fixed; z-index: 20; right: calc(var(--gutter) + var(--sar)); top: calc(clamp(100px, 18vh, 200px) - 30px + var(--sat)); margin: 0; }
.credit button { font: 400 10.5px/1.2 var(--mono); text-transform: uppercase; color: rgba(255, 255, 255, .7); }
body[data-mode="intro"] .credit, body[data-mode="finale"] .credit { top: auto; bottom: calc(14px + var(--sab)); }

/* ——— таймлайн ——— */
.tl { position: fixed; z-index: 20; left: 0; right: 0; bottom: calc(10px + var(--sab)); padding: 0 calc(var(--gutter) + var(--sar)) 0 calc(var(--gutter) + var(--sal)); }
.tl-line { display: none; }
.tl-track { gap: 0; }
.tl-dot { flex: 1 0 auto; display: flex; align-items: center; gap: 10px; min-height: 40px; padding-right: 26px; color: rgba(255, 255, 255, .66); }
.tl-dot::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(255, 220, 245, .5); }
.tl-pin { position: relative; z-index: 1; flex: none; width: 10px; height: 10px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgba(42, 24, 56, .55); transition: transform .3s var(--ease), background .3s; }
.tl-label { position: relative; z-index: 1; padding: 3px 8px; background: rgba(42, 24, 56, .55); font: 400 11.5px/1 var(--mono); text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; }
.tl-date { margin-right: 6px; color: #ffc8ec; }
.tl-dot.is-active { color: #fff; }
.tl-dot.is-active .tl-pin { background: var(--pink); transform: scale(1.3); }
.tl-dot.is-active .tl-label { background: #2a1838; }

/* ——— панели ——— */
.panel {
  left: 8px; right: 8px; bottom: calc(8px + var(--sab));
  max-height: calc(100svh - 80px - var(--sat)); overflow: auto; overscroll-behavior: contain;
  padding: 18px 20px 20px; background: #f6f0fa; color: #1b1220; font: 400 15px/1.45 var(--grot);
  box-shadow: 0 30px 80px -20px rgba(40, 0, 50, .6);
}
.panel-close { position: absolute; top: 16px; right: 18px; font: 500 12px/1 var(--mono); letter-spacing: .02em; padding: 6px 0; }
.panel-mono { margin: 0 90px 10px 0; font: 400 12px/1.3 var(--mono); text-transform: uppercase; color: #8a4f8f; }
.panel-title { margin: 0 0 10px; font: 800 30px/.95 var(--grot); letter-spacing: -.03em; text-transform: uppercase; }
.panel-lead { margin: 0 0 4px; font-weight: 600; }
.panel-small { margin: 0 0 12px; color: #5f5367; font-size: 14px; }
.panel-list { display: grid; grid-template-columns: 112px 1fr; gap: 7px 12px; margin: 12px 0 16px; font-size: 14px; }
.panel-list dt { font: 400 11.5px/1.6 var(--mono); text-transform: uppercase; color: #7e7285; }
.panel-list dd { margin: 0; }
.panel .ticket { background: #2a1838; color: #fff; height: 50px; padding: 0 16px 0 24px; }
.panel--where canvas { width: min(240px, 64vw); margin: 4px auto 10px; --globe-bg: #2a1838; --globe-ink: rgba(255, 240, 250, .92); --globe-line: rgba(255, 220, 245, .18); --globe-accent: #f15bb5; }
.panel-coords { font-size: 12.5px; margin-bottom: 0; }
@media (min-width: 760px) {
  .panel { left: auto; right: calc(var(--gutter) + var(--sar)); top: calc(96px + var(--sat)); bottom: auto; width: 440px; }
  .panel--where { width: 340px; }
}

/* ——— телефон ——— */
@media (max-width: 760px) {
  .top { gap: 12px; flex-wrap: wrap; }
  .nav { order: 5; flex-basis: 100%; margin: 2px 0 0; gap: 18px; }
  .nav button { font: 400 11.5px/1 var(--mono); text-transform: uppercase; letter-spacing: .02em; padding: 6px 0; }
  .top .ticket { margin-left: auto; height: 44px; padding: 0 12px 0 18px; gap: 12px; font-size: 12.5px; }
  .info-l1 { display: none; }
  .info { flex: 1 1 0; min-width: 0; }
  .screen { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto 1fr auto auto auto; padding-top: calc(134px + var(--sat)); padding-bottom: calc(60px + var(--sab)); }
  .mega { grid-column: 1; }
  .para { grid-column: 1; grid-row: 2; margin: 16px 0 0; font-size: 16px; max-width: 34ch; }
  .spread { grid-row: 4; margin-bottom: 12px; gap: 6px; flex-wrap: wrap; }
  .place-big { grid-column: 1; grid-row: 5; margin-bottom: 12px; }
  .next-card { grid-row: 6; height: 70px; }
  .nc-text { padding: 0 12px; font-size: 11px; }
  .next-card i { padding: 0 14px 0 4px; font-size: 22px; }
  body[data-ty="bottom"] .scene .mega { grid-row: 1; margin-bottom: 0; }
  body[data-tx="right"] .scene .para { grid-column: 1; grid-row: 2; }
  .intro .ticket--big, .finale .ticket--big { grid-column: 1; grid-row: 5; }
  .intro .spread { grid-row: 4; }
  .credit { top: auto; bottom: calc(52px + var(--sab)); }
  .credit button { font-size: 10px; }
  body[data-mode="scene"] .credit { display: none; }
}
@media (max-height: 520px) {
  .screen { padding-top: calc(78px + var(--sat)); padding-bottom: calc(50px + var(--sab)); }
  .tile { width: 56px; font-size: 9.5px; }
  .para { font-size: 14px; margin-top: 6px; }
  .next-card { height: 58px; }
  .spread { display: none; }
}
