* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --header-bg: rgba(26,26,26,.95);
  --header-ink: #f0ece4;
  --footer-bg: #1a1a1a;
  --footer-ink: #f0ece4;
  --bg: #1a1a1a;
  --page-ink: #f0ece4;
  --text-secondary: #a8a4a0;
  --text-muted: #6b6763;
}

body { padding-bottom: var(--footer-h, 80px); }
html, body {
  font-family: 'Georgia', 'Times New Roman', serif;
  background: #1a1a1a;
  color: #f0ece4;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

.scroll-space { position: relative; }

/* === НАВИГАЦИЯ === */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  z-index: 20;
  background: var(--header-bg);
  color: var(--header-ink);
}
.nav__logo {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 18px;
  letter-spacing: 4px;
  color: inherit;
  text-transform: uppercase;
  text-decoration: none;
}
.nav__logo[hidden] { display: none; }
.nav__logo small {
  color: var(--text-muted);
  font-weight: normal;
  letter-spacing: 2px;
  text-transform: none;
  font-size: 12px;
}
.nav__menu {
  display: flex;
  gap: 30px;
  list-style: none;
}
.nav__menu a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: color 0.3s;
}
.nav__menu a:hover { color: var(--header-ink); }

/* === СЦЕНА С КАДРАМИ === */
.scene {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  z-index: 10;
  background: #1a1a1a;
}

.frame {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  opacity: 0;
  background: linear-gradient(155deg, #2d2d2d, #1a1a1a);
  transition: opacity 0.6s ease;
  will-change: opacity;
}
.frame picture { display: block; width: 100%; height: 100%; }
.frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.05);
  transition: transform 8s ease;
}
.frame.active img { transform: scale(1.0); }

.overlay-top {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 120px;
  background: linear-gradient(180deg, rgba(26,26,26,0.9) 0%, transparent 100%);
  z-index: 5;
  pointer-events: none;
}
.overlay-bottom {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 200px;
  background: linear-gradient(0deg, rgba(26,26,26,0.95) 0%, transparent 100%);
  z-index: 5;
  pointer-events: none;
}
.overlay-sides {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(26,26,26,0.5) 100%);
  z-index: 4;
  pointer-events: none;
}

/* === ТОЧКИ-ИНДИКАТОРЫ КАДРОВ === */
.frame-dots {
  position: fixed;
  right: 30px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 20;
}
.frame-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #3a3a3a;
  border: 1px solid var(--text-muted);
  cursor: pointer;
  transition: all 0.3s;
}
.frame-dot.active {
  background: #f0ece4;
  border-color: #f0ece4;
  transform: scale(1.3);
}
.frame-dot:hover { background: var(--text-secondary); }

/* === ТЕКСТЫ НА КАДРАХ === */
.frame-text {
  position: absolute;
  z-index: 15;
  bottom: calc(var(--footer-h, 80px) + 8%); left: 8%;
  max-width: 500px;
  padding: 24px 28px;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 6px;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
  pointer-events: none;
}
.frame-text.visible {
  opacity: 1;
  transform: translateY(0);
}
.frame-text.pos-0 { bottom: calc(var(--footer-h, 80px) + 8%); left: 8%; }
.frame-text.pos-1 { top: 15%; bottom: auto; right: 8%; left: auto; text-align: right; }
.frame-text.pos-2 { bottom: calc(var(--footer-h, 80px) + 8%); right: 8%; left: auto; text-align: right; }
.frame-text.pos-3 { top: 15%; bottom: auto; left: 8%; }
.frame-text.pos-4 { top: 42%; bottom: auto; right: 8%; left: auto; text-align: right; }
.frame-text.pos-5 { top: 42%; bottom: auto; left: 8%; }
.frame-text__label {
  font-size: 11px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.frame-text__title {
  font-size: 44px;
  font-weight: normal;
  line-height: 1.2;
  color: #f0ece4;
  margin-bottom: 20px;
  letter-spacing: 1px;
}
.frame-text__desc {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-secondary);
  font-style: italic;
  white-space: pre-line;
}
.frame-text__desc:empty { display: none; }

/* === ПОДСКАЗКА СКРОЛЛА === */
.scroll-hint {
  position: fixed;
  bottom: calc(var(--footer-h, 80px) + 20px); left: 50%;
  transform: translateX(-50%);
  color: var(--text-muted);
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  z-index: 20;
  opacity: 0.7;
  animation: pulse 2s infinite;
  transition: opacity 0.5s;
}
.scroll-hint::after {
  content: '↓';
  display: block;
  font-size: 18px;
  margin-top: 6px;
  animation: bounce 1.5s infinite;
}
@keyframes pulse { 0%, 100% { opacity: 0.3; } 50% { opacity: 0.8; } }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }

/* === СЧЁТЧИК КАДРОВ === */
.frame-counter {
  position: fixed;
  bottom: 30px; right: 30px;
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--text-muted);
  z-index: 20;
  font-family: 'Courier New', monospace;
}
.frame-counter__current {
  color: #f0ece4;
  font-size: 24px;
}

/* === ФИНАЛЬНЫЙ КОНТЕНТ === */
.content {
  position: relative;
  z-index: 5;
  background: var(--bg);
  color: var(--page-ink);
  padding: 120px 40px 100px;
  min-height: 100vh;
  display: flex;
  align-items: center;
}
body.no-frames .content { padding-top: 190px; }
.content__inner {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}
.content__title {
  font-size: 52px;
  font-weight: normal;
  margin-bottom: 30px;
  letter-spacing: 3px;
}
.content__text {
  font-size: 18px;
  line-height: 1.8;
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 50px;
  white-space: pre-line;
}
.content__cta {
  display: inline-block;
  padding: 18px 50px;
  border: 1px solid currentColor;
  color: inherit;
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
  transition: all 0.3s;
}
.content__cta:hover { background: currentColor; color: var(--bg); }
.content__cta[hidden] { display: none; }

/* === ПОДВАЛ === */
.footer {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 25;
  background: var(--footer-bg);
  color: var(--footer-ink);
  padding: 16px 40px;
}
.footer__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  letter-spacing: 1px;
}
.footer__inner strong {
  display: block;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.footer__inner small { color: var(--text-muted); }
.footer__contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.footer__contacts a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.footer__contacts a:hover { border-bottom-color: currentColor; }

/* Адаптив */
@media (max-width: 768px) {
  .frame-text__title { font-size: 26px; }
  .frame-text__desc { font-size: 14px; }
  .nav { padding: 0 20px; }
  .nav__menu { display: none; }
  .frame-dots { right: 15px; }
  .frame-text { left: 5%; right: 5%; }
  .frame-text[class*="pos-"] {
    top: 0; bottom: var(--footer-h, 80px);
    left: 5%; right: 5%;
    margin: auto 0;
    height: fit-content;
    max-width: none;
    text-align: center;
  }
  .content__title { font-size: 30px; }
  .footer { padding: 10px 20px; }
  .footer__inner { flex-direction: column; align-items: flex-start; gap: 6px; font-size: 11px; }
  .footer__contacts { gap: 10px; }
}
