/* =====================================================
   FONTS
   ===================================================== */
@font-face {
  font-family: 'Bim';
  src: url('fonts/Bim.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Monumental';
  src: url('fonts/Monumental.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* =====================================================
   TOKENS  (mirrors Figma 611-wide artboard at scale)
   ===================================================== */
:root {
  --bg-blue: #0e00bf;
  --bg-blue-dark: #0e0079;
  --bg-blue-light: #1d1bd6;
  --fg: #ffffff;
  --fg-soft: rgba(255, 255, 255, 0.85);
  --fg-muted: rgba(255, 255, 255, 0.6);
  --panel: rgba(0, 0, 0, 0.35);

  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 48px;
  --space-6: 72px;
  --space-7: 96px;

  --container: 540px;
  --gutter: 24px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* =====================================================
   RESET
   ===================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg-blue);
  color: var(--fg);
  font-family: 'Bim', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

/* BACKGROUND — fixed in viewport, content scrolls over it (depth parallax) */
.bg-texture {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(160deg, rgba(29, 27, 214, 0.5) 0%, rgba(14, 0, 191, 0.65) 40%, rgba(14, 0, 121, 0.85) 100%),
    url("images/texture-bg.jpg") center center / cover no-repeat;
}

/* FILM GRAIN — subtle noise across the whole page */
.bg-grain {
  position: fixed;
  inset: -50%;
  z-index: 1;
  pointer-events: none;
  opacity: 0.18;
  mix-blend-mode: screen;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.92' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.25 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-repeat: repeat;
  animation: grain-shift 2s steps(6) infinite;
}

@keyframes grain-shift {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-3%, 2%); }
  40%  { transform: translate(2%, -2%); }
  60%  { transform: translate(-2%, -1%); }
  80%  { transform: translate(1%, 2%); }
  100% { transform: translate(0, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .bg-grain { animation: none; }
}

a { color: inherit; text-decoration: none; }
button { background: none; border: none; color: inherit; font: inherit; cursor: pointer; }
img, svg { display: block; max-width: 100%; }

/* =====================================================
   PAGE CONTAINER
   ===================================================== */
.page {
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--space-5) var(--gutter) var(--space-6);
  position: relative;
  z-index: 2;
}

/* =====================================================
   HEAD (top: meta text + planet)
   ===================================================== */
.head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.head__meta { flex: 1 1 auto; }

.head__title {
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: 0.01em;
  margin-bottom: 6px;
}

.head__subtitle {
  font-size: 12px;
  opacity: 0.85;
  letter-spacing: 0.02em;
}

.head__planet {
  flex: 0 0 auto;
  width: 90px;
  height: auto;
  opacity: 0.95;
}

/* =====================================================
   NAV
   ===================================================== */
.nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: var(--space-4);
}

.nav__link {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-size: 28px;
  letter-spacing: 0.01em;
  transition: opacity 0.2s ease;
}
.nav__link:hover { opacity: 0.65; }

.nav__plus {
  font-size: 22px;
  opacity: 0.85;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

/* =====================================================
   SEPARATOR
   ===================================================== */
.separator {
  margin: var(--space-4) auto var(--space-3);
  text-align: center;
}
.separator img {
  display: block;
  margin: 0 auto;
  width: 100%;
  max-width: 460px;
  height: auto;
  opacity: 0.85;
}

/* =====================================================
   LOGO HERO (melted star + LUMINO + date)
   ===================================================== */
.logo-hero {
  text-align: center;
  position: relative;
  padding: 0 0 var(--space-5);
}

.logo-hero__star {
  display: block;
  margin: 0 auto -8px;
  width: auto;
  height: clamp(150px, 32vw, 220px);
}

.logo-hero__name {
  display: block;
  margin: 0 auto var(--space-1);
  width: 100%;
  max-width: 300px;
  height: auto;
}

.logo-hero__date {
  font-size: 14px;
  letter-spacing: 0.06em;
  opacity: 0.9;
}

/* =====================================================
   BLOCKS (section common)
   ===================================================== */
.block {
  padding: var(--space-5) 0;
  position: relative;
}

.block__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-3);
}

.block__title {
  font-family: 'Bim', sans-serif;
  font-size: 32px;
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1;
}

.block__decal {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  object-fit: contain;
  object-position: center;
  opacity: 0;
  transition: opacity 0.7s var(--ease-out);
}
.block__decal.in-view { opacity: 0.9; }

/* =====================================================
   ПОТОК (lineup)
   ===================================================== */
.lineup {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.lineup__item { }
.lineup__name {
  font-size: 22px;
  letter-spacing: 0.01em;
  margin-bottom: 4px;
}
.lineup__time {
  font-size: 15px;
  opacity: 0.7;
  letter-spacing: 0.02em;
}

/* =====================================================
   ГОЛОСА (accordion)
   ===================================================== */
.voices {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.voice__head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--space-4);
  padding: 8px 0;
  text-align: left;
  font-size: 22px;
  letter-spacing: 0.01em;
  transition: opacity 0.2s ease;
}
.voice__head:hover { opacity: 0.7; }

.voice__name {
  min-width: 180px;
  flex-shrink: 0;
}

.voice__chevron {
  width: 24px;
  height: 12px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--fg);
  transition: transform 0.3s var(--ease-out);
}
.voice__chevron svg {
  width: 100%;
  height: 100%;
  display: block;
}
.voice.is-open .voice__chevron {
  transform: rotate(180deg);
}

.voice__panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s var(--ease-out);
}
.voice.is-open .voice__panel {
  max-height: 900px;
}

.voice__inner {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: var(--space-3);
  padding: var(--space-2) 0 var(--space-3);
  align-items: start;
}

.voice__photo {
  display: block;
  width: 160px;
  height: 240px;
  object-fit: cover;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.voice__bio {
  font-size: 15px;
  opacity: 0.85;
  line-height: 1.6;
}
.voice__bio p + p { margin-top: 10px; }

/* =====================================================
   ЛОКАЦИЯ
   ===================================================== */
.location-text {
  font-size: 18px;
  line-height: 1.55;
}
.location-text__name {
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  padding-bottom: 1px;
  transition: border-color 0.2s ease;
}
.location-text__name:hover { border-color: var(--fg); }
.location-text__addr { opacity: 0.85; }

/* =====================================================
   ХРОНИКА (reel — stays within block, no gaps)
   ===================================================== */
.reel {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
  border-radius: 8px;
}
.reel::-webkit-scrollbar { display: none; }
.reel:active { cursor: grabbing; }

.reel__track {
  display: flex;
  gap: 0;
  width: max-content;
}

.reel__item {
  flex-shrink: 0;
  height: 280px;
  width: auto;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

/* =====================================================
   ДОСТУП (form)
   ===================================================== */
.form {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.form__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form__label {
  font-size: 16px;
  opacity: 0.85;
}

.form__field input {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--fg);
  font: inherit;
  font-size: 16px;
  padding: 12px 14px;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.form__field input:focus {
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.14);
}

.form__submit {
  margin-top: var(--space-2);
  background: rgba(255, 255, 255, 0.85);
  color: #0e00bf;
  padding: 14px 24px;
  border-radius: 999px;
  font-size: 16px;
  letter-spacing: 0.04em;
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
.form__submit:hover {
  background: #fff;
  transform: translateY(-1px);
}

/* =====================================================
   ANIMATIONS — fade in/out only, no rotation/pulsing
   ===================================================== */
.rotate-anim, .fade-anim { /* legacy classes — now no-op */ }

@media (prefers-reduced-motion: reduce) {
  .head__planet { animation: none; }
}

/* Fade-in on viewport entry for any element with data-parallax */
[data-parallax] {
  opacity: 0;
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  transform: translate3d(0, 12px, 0);
}
[data-parallax].in-view {
  opacity: 0.9;
  transform: translate3d(0, 0, 0);
}
.head__planet[data-parallax] { opacity: 0.95; transform: none; } /* always visible (above the fold) */

/* =====================================================
   SCROLL TO MENU button
   ===================================================== */
.to-top {
  position: fixed;
  right: var(--space-3);
  bottom: var(--space-3);
  z-index: 50;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--fg);
  color: var(--bg-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(20px) scale(0.85);
  pointer-events: none;
  transition: opacity 0.25s var(--ease-out), transform 0.25s var(--ease-out), background 0.2s ease;
}
.to-top.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.to-top:hover { background: #f0f0ff; transform: translateY(-2px) scale(1.05); }
.to-top svg { width: 22px; height: 22px; }

/* =====================================================
   MOBILE TWEAKS
   ===================================================== */
@media (max-width: 480px) {
  :root {
    --gutter: 20px;
  }

  .page { padding-top: var(--space-3); }

  .head__title { font-size: 13px; }
  .head__subtitle { font-size: 11px; }
  .head__planet { width: 60px; }

  .nav__link { font-size: 24px; }
  .nav__plus { font-size: 19px; }

  .separator img { max-width: 320px; }

  .logo-hero__star { height: clamp(160px, 42vw, 220px); }
  .logo-hero__name { max-width: 260px; }

  .block__title { font-size: 26px; }
  .block__decal { width: 38px; }

  .lineup__name { font-size: 19px; }
  .lineup__time { font-size: 13px; }

  .voice__head { font-size: 19px; gap: var(--space-3); }
  .voice__name { min-width: 140px; }
  .voice__inner {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }
  .voice__photo {
    width: 100%;
    max-width: 280px;
    height: auto;
    aspect-ratio: 2 / 3;
    margin: 0 auto;
  }
  .voice__bio { font-size: 14px; }
  .voice.is-open .voice__panel { max-height: 1200px; }

  .location-text { font-size: 16px; }

  .reel__item { height: 220px; }
}
