/* ==========================================================================
   Контури відновлення. Міжпростір — базові стилі
   ========================================================================== */

@font-face {
  font-family: "Nastup";
  src: url("../fonts/Nastup-Basic.otf") format("opentype");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Nastup Soft";
  src: url("../fonts/Nastup-Soft.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Neue Machina";
  src: url("../fonts/NeueMachina-Regular.woff2") format("woff2"),
       url("../fonts/NeueMachina-Regular.woff") format("woff");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Neue Machina";
  src: url("../fonts/NeueMachina-Medium.woff2") format("woff2"),
       url("../fonts/NeueMachina-Medium.woff") format("woff");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Neue Machina";
  src: url("../fonts/NeueMachina-Black.woff2") format("woff2"),
       url("../fonts/NeueMachina-Black.woff") format("woff");
  font-weight: 900;
  font-display: swap;
}

:root {
  --bg: #060607;
  --bg-panel: #0d0d0f;
  --fg: #f4f4f2;
  --muted: #9a9a9f;
  --line: #2a2a2d;
  --accent-cyan: #37f0e0;
  --accent-magenta: #ff3ea5;
  --accent-lime: #d4ff3d;
  --accent-violet: #8b6bff;
  --gap: clamp(16px, 3vw, 40px);
  --maxw: 1320px;
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Nastup Soft", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--accent-cyan); text-decoration: none; }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gap);
}

h1, h2, h3, .display {
  font-family: "Nastup", "Nastup Soft", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1.02;
  margin: 0;
}

.eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 14px;
}

/* ---------------- intro splash ---------------- */
#splash {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
#splash.hide { opacity: 0; visibility: hidden; pointer-events: none; }
.splash-title {
  font-family: "Nastup", sans-serif;
  font-size: clamp(2.4rem, 9vw, 6rem);
  text-transform: uppercase;
  color: var(--fg);
  text-align: center;
  position: relative;
}
.splash-title .g { display: block; }
.splash-sub {
  font-size: 0.85rem;
  letter-spacing: 0.3em;
  color: var(--accent-cyan);
  text-transform: uppercase;
}
.splash-bar {
  width: min(280px, 60vw);
  height: 2px;
  background: var(--line);
  margin-top: 18px;
  position: relative;
  overflow: hidden;
}
.splash-bar::after {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 0%;
  background: var(--accent-cyan);
  animation: loadbar 1.4s ease forwards;
}
@keyframes loadbar { to { width: 100%; } }

/* ---------------- glitch text ---------------- */
.glitch {
  position: relative;
  display: inline-block;
  overflow: hidden;
}
.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  left: 0; top: 0;
  width: 100%; height: 100%;
  opacity: 0;
  background: var(--bg);
}
.glitch.play::before {
  color: var(--accent-magenta);
  animation: glitchTop 0.5s steps(2, end) 1 forwards;
  opacity: 0.85;
}
.glitch.play::after {
  color: var(--accent-cyan);
  animation: glitchBot 0.5s steps(2, end) 1 forwards;
  opacity: 0.85;
}
@keyframes glitchTop {
  0% { clip-path: inset(0 0 85% 0); transform: translate(0,0); }
  20% { clip-path: inset(10% 0 60% 0); transform: translate(-6px,-2px); }
  40% { clip-path: inset(40% 0 20% 0); transform: translate(6px,1px); }
  60% { clip-path: inset(70% 0 5% 0); transform: translate(-4px,2px); }
  80% { clip-path: inset(20% 0 50% 0); transform: translate(3px,-1px); }
  100% { clip-path: inset(0 0 100% 0); transform: translate(0,0); opacity: 0; }
}
@keyframes glitchBot {
  0% { clip-path: inset(85% 0 0 0); transform: translate(0,0); }
  20% { clip-path: inset(55% 0 15% 0); transform: translate(6px,2px); }
  40% { clip-path: inset(15% 0 55% 0); transform: translate(-6px,-1px); }
  60% { clip-path: inset(5% 0 75% 0); transform: translate(4px,-2px); }
  80% { clip-path: inset(45% 0 25% 0); transform: translate(-3px,1px); }
  100% { clip-path: inset(100% 0 0 0); transform: translate(0,0); opacity: 0; }
}

/* looping subtle glitch flicker on headings */
.flicker:hover { animation: flicker 1.1s steps(12) 1; }
@keyframes flicker {
  0%,100% { text-shadow: none; transform: translate(0,0); }
  8% { text-shadow: 2px 0 var(--accent-magenta), -2px 0 var(--accent-cyan); transform: translate(1px,0); }
  16% { text-shadow: none; }
  24% { text-shadow: -2px 0 var(--accent-magenta), 2px 0 var(--accent-cyan); transform: translate(-1px,0); }
  32% { text-shadow: none; }
  70% { text-shadow: 1px 0 var(--accent-lime); }
}

/* ---------------- nav ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--gap);
  background: linear-gradient(to bottom, rgba(6,6,7,0.92), rgba(6,6,7,0));
  backdrop-filter: blur(4px);
}
.logo-mark {
  font-family: "Nastup", sans-serif;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--fg);
  text-decoration: none;
}
.logo-mark span { color: var(--accent-cyan); }
.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}
.site-header nav a {
  color: var(--fg);
  margin-left: 22px;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.8;
}
.site-header nav a:first-child { margin-left: 0; }
.site-header nav a:hover { opacity: 1; color: var(--accent-cyan); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--fg);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 680px) {
  .nav-toggle { display: flex; }
  .site-header nav {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--line);
    padding: 8px var(--gap) 16px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: max-height 0.25s ease, opacity 0.2s ease;
  }
  .site-header nav.open {
    max-height: 60vh;
    opacity: 1;
    pointer-events: auto;
  }
  .site-header nav a {
    margin-left: 0;
    padding: 10px 0;
    width: 100%;
    border-bottom: 1px solid var(--line);
  }
  .site-header nav a:last-child { border-bottom: 0; }
}

/* ---------------- hero ---------------- */
.hero {
  position: relative;
  padding: 64px var(--gap) 40px;
  background:
    radial-gradient(circle at 15% 20%, rgba(139,107,255,0.18), transparent 40%),
    radial-gradient(circle at 85% 10%, rgba(55,240,224,0.14), transparent 45%),
    radial-gradient(circle at 60% 90%, rgba(255,62,165,0.12), transparent 45%);
  border-bottom: 1px solid var(--line);
}
.hero-title {
  font-size: clamp(2.6rem, 9vw, 6.4rem);
  color: var(--fg);
}
.hero-title .line2 { color: var(--accent-cyan); }
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin-top: 26px;
  font-size: 0.95rem;
}
.hero-meta strong { display: block; font-size: 1.4rem; font-family: "Nastup", sans-serif; }
.hero-meta .tag { color: var(--muted); font-size: 0.78rem; letter-spacing: 0.15em; text-transform: uppercase; }
.hero-curators {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 22px;
}
.hero-curators .tag { color: var(--muted); font-size: 0.78rem; letter-spacing: 0.15em; text-transform: uppercase; margin-bottom: 4px; }
.hero-curators b { color: var(--fg); font-size: 1.05rem; font-weight: 400; }

/* ---------------- intro / about ---------------- */
.section { padding: 70px var(--gap); }
.section-tight { padding: 40px var(--gap); }
.section-title {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  margin-bottom: 22px;
}
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: var(--gap);
  align-items: start;
}
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } }
.about-text p { color: #d8d8d6; max-width: 640px; }

/* дизайнерка фестивалю — текст зліва, картка учасника (той самий дизайн/перехід) справа */
.designer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: var(--gap);
  align-items: center;
}
.designer-card {
  max-width: 320px;
  justify-self: end;
}
@media (max-width: 860px) {
  .designer-grid { grid-template-columns: 1fr; }
  .designer-card { justify-self: start; max-width: 280px; }
}
.themes {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.themes li {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 14px;
  color: #d8d8d6;
}
.themes li::before {
  content: "";
  width: 8px; height: 8px;
  margin-top: 7px;
  flex-shrink: 0;
  background: var(--accent-cyan);
  transform: rotate(45deg);
}

/* ---------------- video ---------------- */
.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  border: 1px solid var(--line);
  overflow: hidden;
}
.video-frame iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
}
.video-frame::before {
  content: "";
  position: absolute; inset: 0;
  border: 1px solid rgba(55,240,224,0.25);
  pointer-events: none;
  z-index: 2;
}

/* ---------------- map ---------------- */
.map-panel {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  padding: var(--gap);
}
.map-info {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  margin-bottom: 22px;
  font-size: 0.9rem;
}
.map-info .map-label { display: block; color: var(--muted); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 4px; }

.map-zoom-trigger {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line);
  background: none;
  cursor: zoom-in;
}
.map-zoom-trigger img {
  display: block;
  width: 100%;
  transition: filter 0.2s ease;
}
#map .map-zoom-trigger:hover img { filter: brightness(1.05); }

/* мапа + перелік учасників — безкінечна стрічка, що їде зліва праворуч по колу */
.map-marquee-wrap {
  overflow: hidden;
  border: 1px solid var(--line);
  background: #0a0a0b;
}
.map-marquee {
  display: flex;
  width: max-content;
  animation: mapMarquee 34s linear infinite;
}
.map-marquee-wrap:hover .map-marquee { animation-play-state: paused; }
.map-marquee-item {
  flex-shrink: 0;
  display: block;
  height: clamp(200px, 30vw, 420px);
  padding: 0;
  border: 0;
  border-right: 1px solid var(--line);
  background: none;
  cursor: zoom-in;
}
.map-marquee-item img {
  display: block;
  height: 100%;
  width: auto;
  max-width: none;
  transition: filter 0.2s ease;
}
.map-marquee-item:hover img { filter: brightness(1.06); }
@keyframes mapMarquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.map-zoom-hint--static {
  position: static;
  display: inline-block;
  margin-top: 14px;
  background: none;
  border: 0;
  color: var(--muted);
  padding: 0;
  opacity: 1;
}
@media (prefers-reduced-motion: reduce) {
  .map-marquee { animation: none; }
}

/* галерея постерів — ч/б, кольорові й крупніше при наведенні */
.poster-gallery {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}
.poster-thumb {
  position: relative;
  display: block;
  padding: 0;
  border: 1px solid var(--line);
  background: #0a0a0b;
  cursor: zoom-in;
  overflow: visible;
  aspect-ratio: 1220 / 1350;
  z-index: 1;
}
.poster-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.02);
  transform: scale(1);
  transition: filter 0.35s ease, transform 0.35s ease, box-shadow 0.35s ease;
}
.poster-thumb:hover {
  z-index: 5;
}
.poster-thumb:hover img {
  filter: grayscale(0) saturate(1.15) contrast(1.05);
  transform: scale(1.22);
  box-shadow: 0 18px 40px rgba(0,0,0,0.55);
}
@media (max-width: 1000px) {
  .poster-gallery { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 620px) {
  .poster-gallery { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .poster-thumb:hover img { transform: scale(1.12); }
}

/* на дотикових екранах :hover недоступний — постери самі "дихають" ч/б ↔ кольором */
@media (hover: none) {
  .poster-thumb img {
    animation: posterPulse 3s ease-in-out infinite;
  }
  .poster-thumb:hover img { animation-play-state: paused; }
  .poster-thumb:nth-child(1) img { animation-delay: 0s; }
  .poster-thumb:nth-child(2) img { animation-delay: 0.25s; }
  .poster-thumb:nth-child(3) img { animation-delay: 0.5s; }
  .poster-thumb:nth-child(4) img { animation-delay: 0.75s; }
  .poster-thumb:nth-child(5) img { animation-delay: 1s; }
  .poster-thumb:nth-child(6) img { animation-delay: 1.25s; }
  .poster-thumb:nth-child(7) img { animation-delay: 1.5s; }
  .poster-thumb:nth-child(8) img { animation-delay: 1.75s; }
  .poster-thumb:nth-child(9) img { animation-delay: 2s; }
  .poster-thumb:nth-child(10) img { animation-delay: 2.25s; }
}
@keyframes posterPulse {
  0%, 100% { filter: grayscale(1) contrast(1.02); }
  50% { filter: grayscale(0) saturate(0.7) contrast(1.03); }
}
.map-zoom-hint {
  position: absolute;
  right: 14px;
  bottom: 14px;
  background: rgba(6,6,7,0.85);
  color: var(--fg);
  border: 1px solid var(--accent-cyan);
  padding: 8px 14px;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.9;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.map-zoom-trigger:hover .map-zoom-hint { opacity: 1; transform: translateY(-2px); }

/* ---------------- lightbox (pan / zoom viewer) ---------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(4,4,5,0.94);
  display: none;
}
.lightbox.open { display: block; }
.pz-hint {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 901;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(6,6,7,0.75);
  padding: 8px 16px;
  border: 1px solid var(--line);
  white-space: nowrap;
  pointer-events: none;
}
.pz-viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  touch-action: none;
}
.pz-viewport.dragging { cursor: grabbing; }
.pz-image {
  /* розмір повністю рахує JS (js/main.js: computeBaseSize/applyTransformSize) —
     так браузер перерендерює растер під фактичний масштаб замість розтягування
     закешованої маленької версії через transform:scale.
     max-width:none обов'язково — інакше глобальне правило `img { max-width:100% }`
     знову притискає зображення до ширини контейнера. */
  max-width: none;
  max-height: none;
  flex-shrink: 0;
  border: 1px solid var(--line);
  user-select: none;
  -webkit-user-drag: none;
  will-change: transform, width, height;
}
.pz-image--invert { filter: invert(1) hue-rotate(180deg) contrast(1.05); }
.lightbox-close {
  position: fixed;
  top: 18px;
  right: 22px;
  z-index: 902;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: var(--bg-panel);
  color: var(--fg);
  font-size: 1.1rem;
  cursor: pointer;
}
.lightbox-close:hover { color: var(--accent-cyan); border-color: var(--accent-cyan); }

/* ---------------- participants grid ---------------- */
.participants-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 30px;
}
.participants-count { color: var(--muted); font-size: 0.85rem; }
.p-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  background: var(--line);
  border: 1px solid var(--line);
}
@media (max-width: 1000px) { .p-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px) { .p-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 440px) { .p-grid { grid-template-columns: 1fr 1fr; } }

.p-card {
  background: var(--bg);
  position: relative;
  display: block;
  padding: 0;
  cursor: pointer;
  color: inherit;
}
.p-card.disabled { cursor: default; }
.p-photo {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 4/5;
  overflow: hidden;
  background: #111;
}
.p-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(0.15) contrast(1.05);
  transition: filter 0.25s ease, transform 0.4s ease;
}
.p-card:hover .p-photo img {
  filter: invert(1) grayscale(0.1) contrast(1.1);
  transform: scale(1.03);
}
.p-photo .scan {
  position: absolute; left: 0; right: 0; top: -20%;
  height: 20%;
  background: linear-gradient(to bottom, rgba(55,240,224,0), rgba(55,240,224,0.35), rgba(55,240,224,0));
  opacity: 0;
  pointer-events: none;
}
.p-card:hover .p-photo .scan {
  opacity: 1;
  animation: scan 0.9s linear infinite;
}
@keyframes scan { from { top: -20%; } to { top: 100%; } }

.p-photo .rgb {
  position: absolute; inset: 0;
  opacity: 0;
  pointer-events: none;
  background-size: cover;
  background-position: center;
}
.p-card:hover .p-photo .rgb.r { opacity: 0.35; mix-blend-mode: screen; background-color: #ff3ea5; mix-blend-mode: multiply; }

.p-name {
  margin-top: 10px;
  padding: 16px 14px 18px;
  border-top: 1px solid var(--line);
  background: var(--bg-panel);
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 52px;
}
.p-name .arrow { color: var(--accent-cyan); opacity: 0; transform: translateX(-4px); transition: all 0.2s ease; }
.p-card:hover .p-name .arrow { opacity: 1; transform: translateX(0); }
.p-card.disabled .p-name .arrow { display: none; }
.p-card.disabled .p-name { color: var(--muted); }

/* click glitch burst */
.p-card.glitching .p-photo img {
  animation: burst 0.45s steps(6, end);
}
@keyframes burst {
  0% { filter: invert(1) contrast(1.1); transform: translate(0,0) scale(1.03); }
  15% { filter: invert(0) saturate(3) hue-rotate(90deg); transform: translate(4px,-2px) scale(1.05); }
  30% { filter: invert(1) contrast(1.4); transform: translate(-5px,2px) scale(1.02); }
  45% { filter: invert(0) contrast(1.2) hue-rotate(-60deg); transform: translate(3px,3px) scale(1.06); }
  60% { filter: invert(1); transform: translate(-3px,-1px) scale(1.01); }
  80% { filter: invert(1) contrast(1.1); transform: translate(2px,0) scale(1.03); }
  100% { filter: invert(1); transform: translate(0,0) scale(1.03); }
}

/* ---------------- footer / logos ---------------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 40px var(--gap) 50px;
  text-align: center;
}
.footer-note { color: var(--muted); font-size: 0.8rem; margin-bottom: 26px; letter-spacing: 0.06em; }
.logos-plate {
  width: 65%;
  margin: 0 auto;
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 22px var(--gap);
  border-radius: 2px;
}
.logos-plate img { margin: 0 auto; width: 100%; max-width: 100%; }
.footer-bottom { margin-top: 22px; color: var(--muted); font-size: 0.75rem; }

/* мобільна версія — плашка з логотипами від краю до краю вікна */
@media (max-width: 680px) {
  .logos-plate {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    border-left: 0;
    border-right: 0;
    border-radius: 0;
    padding: 18px 16px;
  }
}

/* ---------------- participant detail page ---------------- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 22px var(--gap) 0;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.back-link:hover { color: var(--accent-cyan); }

.detail-hero {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: var(--gap);
  padding: 30px var(--gap) 60px;
  align-items: start;
}
@media (max-width: 800px) { .detail-hero { grid-template-columns: 1fr; } }
.detail-photo {
  position: relative;
  aspect-ratio: 4/5;
  overflow: hidden;
  border: 1px solid var(--line);
}
.detail-photo img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(0.1) contrast(1.05);
  transition: filter 0.3s ease;
}
.detail-photo:hover img { filter: invert(1) contrast(1.1); }
.detail-photo.glitching img { animation: burst 0.45s steps(6, end); }
.detail-name { font-size: clamp(2rem, 5vw, 3.4rem); margin-bottom: 6px; }
.detail-location { color: var(--accent-cyan); font-size: 0.9rem; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 20px; }
.detail-role { color: var(--muted); font-size: 0.85rem; letter-spacing: 0.04em; margin: -8px 0 10px; font-style: italic; }

.detail-instagram {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  padding: 8px 14px 8px 10px;
  border: 1px solid var(--line);
  color: var(--fg);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.detail-instagram img { width: 18px; height: 18px; opacity: 0.9; }
.detail-instagram:hover { border-color: var(--accent-cyan); color: var(--accent-cyan); }
.detail-instagram:hover img { opacity: 1; }
.detail-bio p { color: #d8d8d6; max-width: 680px; }

.lang-toggle {
  display: inline-flex;
  border: 1px solid var(--line);
  flex-shrink: 0;
}
.lang-toggle button {
  background: transparent;
  border: 0;
  color: var(--muted);
  padding: 5px 12px;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  cursor: pointer;
  font-family: inherit;
}
.lang-toggle button.active { background: var(--accent-cyan); color: #041313; }

[data-lang="en"] { display: none; }

span[data-lang="ua"] { display: inline; }
span[data-lang="en"] { display: none; }

.lang-en [data-lang="ua"] { display: none; }
.lang-en [data-lang="en"] { display: block; }
.lang-en span[data-lang="ua"] { display: none; }
.lang-en span[data-lang="en"] { display: inline; }

.work-block {
  border-top: 1px solid var(--line);
  padding: 40px var(--gap) 70px;
}
.work-head {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}
.work-title { font-size: clamp(1.5rem, 3.6vw, 2.2rem); }
.work-meta { color: var(--muted); font-size: 0.85rem; align-self: end; }
.work-body p { color: #d8d8d6; max-width: 760px; }

/* декілька робіт одного учасника під спільним відео */
.work-entry {
  border-top: 1px solid var(--line);
  padding-top: 32px;
  margin-top: 32px;
}
.work-entry:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }

.next-nav {
  border-top: 1px solid var(--line);
  padding: 30px var(--gap) 60px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.85rem;
}
.next-nav .disabled-note { opacity: 0.55; }

/* ---------------- gateway / portal (root index) ---------------- */
.gateway-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px var(--gap);
}
.gateway-main {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  position: relative;
}
.gateway-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--line) 15%, var(--line) 85%, transparent);
  z-index: 1;
}
.gateway-col {
  position: relative;
  display: flex;
  padding: 140px var(--gap) 70px;
}
.gateway-col--metanoia { align-items: flex-start; justify-content: flex-start; flex-direction: column; }
.gateway-col--kontury { align-items: flex-end; justify-content: flex-end; }

.gateway-link {
  position: relative;
  z-index: 2;
  display: block;
  text-align: right;
  text-decoration: none;
}
.gateway-col--metanoia .gateway-link { text-align: left; }
.gateway-link--soon { cursor: default; }

.gateway-title {
  font-family: "Nastup", sans-serif;
  color: var(--fg);
  font-size: clamp(2.4rem, 7vw, 5.6rem);
  line-height: 1.05;
  text-transform: uppercase;
  transition: opacity 0.2s ease;
}
.gateway-year { color: var(--accent-cyan); }
.gateway-link:hover .gateway-title { opacity: 0.88; }

/* OPEN CALL під «Метаноя 2026» — жовто-блакитний переливчастий напис */
.gateway-opencall {
  position: relative;
  z-index: 2;
  display: inline-block;
  margin-top: 16px;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: "Neue Machina", "Nastup", sans-serif;
  font-weight: 900;
  font-size: clamp(1.19rem, 3.36vw, 2.71rem);
  background: linear-gradient(100deg, #ffe066 0%, #ffd23f 22%, #6ec7ff 48%, #3fa9ff 62%, #ffe066 84%, #6ec7ff 100%);
  background-size: 280% 280%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: metalShift 7s linear infinite;
  filter: drop-shadow(0 0 16px rgba(255,255,255,0.16));
  transition: filter 0.3s ease;
}
.gateway-col--metanoia .gateway-opencall { display: block; }
.gateway-opencall:hover {
  filter: saturate(1.8) brightness(1.15) drop-shadow(0 0 22px rgba(255,255,255,0.3));
}

/* металізований текст «Метаноя» з дзеркальним переливанням-блиском зверху (без глітчу) */
.gateway-holo {
  font-family: "Neue Machina", "Nastup", sans-serif;
  font-weight: 900;
  font-size: clamp(calc(2.4rem + 2pt), calc(7vw + 2pt), calc(5.6rem + 2pt));
  position: relative;
  display: inline-block;
  overflow: hidden;
  background: linear-gradient(
    100deg,
    #9a9aa4 0%,
    #eef0f4 10%,
    #7b7b85 22%,
    #d7dde3 34%,
    #8ec9ff 44%,
    #d7a8ff 54%,
    #ffd9a0 64%,
    #9adfc7 74%,
    #c9c9d1 86%,
    #f2f2f6 100%
  );
  background-size: 280% 280%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: metalShift 7s linear infinite;
  filter: saturate(1) drop-shadow(0 0 20px rgba(255,255,255,0.26));
  transition: filter 0.35s ease;
}
@keyframes metalShift {
  0% { background-position: 0% 50%; }
  100% { background-position: 280% 50%; }
}
/* при наведенні — максимальна насиченість кольору + пробіг «блискавки» по тексту */
.gateway-holo:hover {
  filter: saturate(2.8) brightness(1.14) drop-shadow(0 0 26px rgba(255,255,255,0.4));
}
.gateway-holo:hover::after {
  animation: boltFlash 0.55s ease-out 1;
}
@keyframes boltFlash {
  0% { background-position: -90% 50%; }
  100% { background-position: 280% 50%; }
}
/* дзеркальний блиск, що пробігає по тексту зверху */
.gateway-holo::before {
  content: attr(data-text);
  position: absolute;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,0.95) 48%, transparent 66%);
  background-size: 220% 220%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  mix-blend-mode: screen;
  pointer-events: none;
  animation: sheenSweep 3.6s linear infinite;
}
@keyframes sheenSweep {
  0% { background-position: -60% 50%; }
  100% { background-position: 220% 50%; }
}
/* другий, тонший і яскравіший глянцевий блиск — для більш «полірованого» ефекту */
.gateway-holo::after {
  content: attr(data-text);
  position: absolute;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background: linear-gradient(108deg, transparent 42%, rgba(255,255,255,0.5) 48%, #ffffff 50%, rgba(255,255,255,0.5) 52%, transparent 58%);
  background-size: 260% 260%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  mix-blend-mode: screen;
  pointer-events: none;
  animation: glossGlint 2.4s linear infinite;
}
@keyframes glossGlint {
  0% { background-position: -80% 50%; }
  100% { background-position: 260% 50%; }
}

/* 3D-сфера — тепер супроводжує «Контури відновлення 2025» */
.gateway-orb {
  position: absolute;
  left: 6%;
  top: 12%;
  width: min(44vw, 400px);
  height: min(44vw, 400px);
  z-index: 1;
  cursor: grab;
}
.gateway-orb canvas { display: block; width: 100%; height: 100%; }

/* органічна рідинна голограма біля «Метаноя» */
.gateway-deco {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.9;
}
.gateway-liquid {
  position: absolute;
  right: -4%;
  bottom: -2%;
  width: min(84vw, 900px);
  height: min(56vw, 520px);
  z-index: 1;
  cursor: grab;
}
.gateway-liquid canvas { display: block; width: 100%; height: 100%; }

@media (max-width: 860px) {
  .gateway-main { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; }
  .gateway-divider { left: 0; right: 0; top: 50%; bottom: auto; width: auto; height: 1px;
    background: linear-gradient(to right, transparent, var(--line) 15%, var(--line) 85%, transparent); }
  .gateway-col { min-height: 50vh; padding: 90px 20px 40px; }
  .gateway-orb { width: min(52vw, 260px); height: min(52vw, 260px); left: 6%; top: 10%; }
  .gateway-liquid { width: min(96vw, 480px); height: min(64vw, 320px); right: -4%; bottom: -2%; }
}
@media (max-width: 560px) {
  .gateway-col { padding: 80px 20px 30px; }
}

/* ---------------- metanoia 2026 page ---------------- */
.metanoia-page {
  font-family: "Neue Machina", "Nastup Soft", sans-serif;
}
.metanoia-page .section-title,
.metanoia-page .open-call-btn {
  font-family: "Neue Machina", "Nastup", sans-serif;
  font-weight: 900;
}
.metanoia-page .section-title {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
}
/* назва фестивалю «Метаноя» — на 20% більша за базовий hero-title */
.metanoia-page .hero-title {
  font-size: clamp(3.12rem, 10.8vw, 7.68rem);
  margin-bottom: 28px;
}
/* .gateway-holo несе власний (більший) font-size для плашки на головній —
   тут він завжди має успадковувати розмір від реального контейнера (h1/h2/кнопка) */
.metanoia-page .gateway-holo {
  font-size: inherit;
}
.metanoia-page .gateway-holo:hover {
  filter: saturate(2.8) brightness(1.14) url(#textDistort) drop-shadow(0 0 26px rgba(255,255,255,0.4));
}
.metanoia-page .hero-curators b {
  font-family: "Neue Machina", sans-serif;
  font-weight: 500;
}
.metanoia-page .eyebrow,
.metanoia-page .tag,
.metanoia-page .hero-meta strong {
  font-family: "Neue Machina", sans-serif;
  font-weight: 500;
}
.metanoia-page .logo-mark,
.metanoia-page .splash-title {
  font-family: "Neue Machina", sans-serif;
  font-weight: 900;
}

.metanoia-banner {
  position: relative;
  width: 100%;
  aspect-ratio: 1470 / 630;
  overflow: hidden;
  background: #000;
}
.metanoia-banner video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.metanoia-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.15) 60%, rgba(0,0,0,0.55) 100%);
  pointer-events: none;
}
.open-call-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  padding: 18px 44px;
  border: 2px solid var(--fg);
  background: rgba(6,6,7,0.35);
  backdrop-filter: blur(6px);
  color: var(--fg);
  font-size: clamp(1rem, 2.2vw, 1.5rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  animation: openCallPulse 2.6s ease-in-out infinite;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}
.open-call-btn:hover {
  background: rgba(6,6,7,0.6);
  border-color: var(--accent-cyan);
  transform: translate(-50%, -50%) scale(1.06);
}
@keyframes openCallPulse {
  0%, 100% { box-shadow: 0 0 0 rgba(244,244,242,0); }
  50% { box-shadow: 0 0 0 10px rgba(244,244,242,0.08); }
}

.metanoia-location {
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 640px;
  margin-top: 18px;
}
.metanoia-contact {
  border-top: 1px solid var(--line);
  padding: 40px var(--gap) 10px;
}
.metanoia-contact .eyebrow { margin-bottom: 10px; }
.metanoia-contact a.mail-link {
  display: block;
  color: var(--fg);
  font-size: 1.05rem;
  margin-bottom: 6px;
}
.metanoia-contact a.mail-link:hover { color: var(--accent-cyan); }

@media (max-width: 680px) {
  .metanoia-banner { aspect-ratio: auto; height: 62vh; min-height: 320px; }
  .open-call-btn { padding: 14px 28px; }
}

/* лінза локального дисторшн-ефекту, що йде за курсором (лише на сторінці Метаноя) */
.distort-lens {
  position: fixed;
  left: 0;
  top: 0;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 500;
  opacity: 0;
  backdrop-filter: url(#textDistort);
  -webkit-backdrop-filter: url(#textDistort);
  /* асиметричний "воблячий" край замість рівного кола (SVG-маска з turbulence) */
  mask-image: url(#lensMask);
  -webkit-mask-image: url(#lensMask);
  mask-size: 100% 100%;
  -webkit-mask-size: 100% 100%;
  mask-repeat: no-repeat;
  -webkit-mask-repeat: no-repeat;
  transition: opacity 0.25s ease;
  will-change: transform;
}
@media (max-width: 680px) {
  .distort-lens { width: 260px; height: 260px; }
}
