:root {
  --bg-black: #000000;
  --panel-bg: rgba(9, 13, 17, 0.38);
  --panel-line: rgba(255, 255, 255, 0.12);
  --panel-hover: rgba(14, 20, 28, 0.52);
  --text-primary: rgba(255, 255, 255, 0.94);
  --shadow-soft: rgba(0, 0, 0, 0.5);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  width: 100%;
  min-height: 100%;
  background: var(--bg-black);
}

body {
  width: 100%;
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-black);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.video-container {
  height: 100vh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  scrollbar-width: none;
}

.video-container::-webkit-scrollbar {
  display: none;
}

.video-section {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  background: var(--bg-black);
}

.bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  background: var(--bg-black);
  transition: opacity 0.5s ease;
}

.bg-video.wait-play {
  opacity: 0;
}

.bg-video.is-playing {
  opacity: 1;
}

.top-bar {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.clock,
.telegram-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 170px;
  min-height: 42px;
  padding-inline: 18px;
  color: var(--text-primary);
  background: var(--panel-bg);
  border: 1px solid var(--panel-line);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  line-height: 1;
}

.clock {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  border-radius: 4px;
  text-shadow: 0 2px 4px var(--shadow-soft);
}

.telegram-link {
  gap: 8px;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  border-radius: 4px;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.telegram-icon {
  display: block;
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.9);
}

.telegram-link:hover,
.telegram-link:focus-visible {
  background: var(--panel-hover);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.scene-nav {
  position: fixed;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.scene-dot {
  display: block;
  width: 16px;
  height: 6px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: background 0.2s ease, border-color 0.2s ease, width 0.2s ease;
}

.scene-dot:hover,
.scene-dot:focus-visible {
  background: rgba(255, 255, 255, 0.36);
  border-color: rgba(255, 255, 255, 0.24);
}

.scene-dot:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: 4px;
}

.scene-dot.is-active {
  background: var(--text-primary);
  border-color: transparent;
}

@media (max-width: 640px) {
  .scene-nav {
    right: 12px;
    gap: 10px;
  }

  .top-bar {
    top: 12px;
    right: 12px;
    gap: 6px;
  }

  .clock,
  .telegram-link {
    min-width: 148px;
    min-height: 36px;
    padding-inline: 14px;
  }

  .clock {
    font-size: 0.96rem;
    letter-spacing: 0.06em;
  }

  .telegram-link {
    font-size: 0.7rem;
    letter-spacing: 0.07em;
  }

  .telegram-icon {
    width: 11px;
    height: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .video-container {
    scroll-behavior: auto;
  }

  .telegram-link,
  .scene-dot {
    transition: none;
  }
}

/* Без JavaScript: видео не запускаются (остаются пустыми тёмными),
   а scroll-snap-сглаживание и автоскролл не нужны. */
html:not(.js) .video-container {
  scroll-behavior: auto;
}

html:not(.js) .video-section {
  display: block;
}
