:root {
  --gold: #b79a63;
  --gold-light: #d7bd82;
  --dark: #030609;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--dark);
  font-family: Inter, Segoe UI, Arial, sans-serif;
}

.intro-screen {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.bg-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: bgZoom 12s ease-out forwards;
}

.dark-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at center, rgba(0,0,0,0.08), rgba(0,0,0,0.62)),
    linear-gradient(to bottom, rgba(0,0,0,0.08), rgba(0,0,0,0.70));
  z-index: 1;
}

.intro-content {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
}

/* ============================================================
   ЛОГО
   Фаза 1 (0–20% = 0–3с): появляется в центре, вырастает до 1/3
   Фаза 2 (20–47% = 3–7с): плавно уменьшается и уходит вверх
   Фаза 3 (47–100% = 7–15с): держится
   will-change гарантирует GPU-компоузитинг
   ============================================================ */
.logo {
  position: absolute;
  left: 50%;
  width: clamp(210px, 22vw, 390px);
  opacity: 0;
  will-change: transform, opacity;
  filter: drop-shadow(0 18px 44px rgba(0,0,0,0.55));
  animation: logoAnim 15s forwards;
}

@keyframes logoAnim {
  /* старт: центр, крошечное */
  0% {
    top: 50vh;
    transform: translate(-50%, -50%) scale(0.05);
    opacity: 0;
    animation-timing-function: cubic-bezier(0.22, 0, 0.36, 1);
  }
  /* пик: центр, 1/3 экрана — плавное замедление */
  20% {
    top: 50vh;
    transform: translate(-50%, -50%) scale(1.48);
    opacity: 1;
    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  }
  /* финал: верхняя позиция, нормальный размер */
  47% {
    top: 7.5vh;
    transform: translate(-50%, 0%) scale(1);
    opacity: 1;
    animation-timing-function: linear;
  }
  100% {
    top: 7.5vh;
    transform: translate(-50%, 0%) scale(1);
    opacity: 1;
  }
}

/* ============================================================
   ТЕКСТ — 3 строки, каждая появляется отдельно
   ============================================================ */
.title-group {
  position: absolute;
  top: 34vh;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.main-title {
  margin: 0;
  text-align: center;
  color: var(--gold);
  font-size: clamp(24px, 3.4vw, 58px);
  line-height: 1.5;
  letter-spacing: 1.2px;
  font-weight: 800;
  text-shadow:
    0 0 22px rgba(183,154,99,0.38),
    0 8px 36px rgba(0,0,0,0.72);
}

.main-title span {
  display: block;
  opacity: 0;
  transform: translateY(16px);
  will-change: transform, opacity;
}

/* строка 1 */
.main-title span:nth-child(1) {
  animation: lineRevealText 1.4s cubic-bezier(0.22, 0, 0.36, 1) forwards;
  animation-delay: 4.0s;
}

/* строка 2 — "və" */
.main-title span:nth-child(2) {
  font-weight: 400;
  font-style: italic;
  font-size: 0.82em;
  color: var(--gold-light);
  animation: lineRevealText 1.2s cubic-bezier(0.22, 0, 0.36, 1) forwards;
  animation-delay: 5.2s;
}

/* строка 3 */
.main-title span:nth-child(3) {
  animation: lineRevealText 1.4s cubic-bezier(0.22, 0, 0.36, 1) forwards;
  animation-delay: 6.2s;
}

/* ============================================================
   ЗОЛОТАЯ ЛИНИЯ
   ============================================================ */
.progress-bar {
  width: min(580px, 52vw);
  height: 3px;
  background: rgba(183, 154, 99, 0.14);
  border-radius: 999px;
  overflow: hidden;
  opacity: 0;
  will-change: opacity;
  animation: fadeIn 0.6s ease forwards;
  animation-delay: 7.8s;
}

.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    var(--gold),
    var(--gold-light),
    var(--gold)
  );
  box-shadow: 0 0 10px rgba(183,154,99,0.55);
  will-change: width;
  animation: progressFill 6.8s cubic-bezier(0.3, 0, 0.7, 1) forwards;
  animation-delay: 8.1s;
}

@keyframes progressFill {
  0%   { width: 0%; }
  12%  { width: 24%; }
  28%  { width: 46%; }
  52%  { width: 67%; }
  74%  { width: 83%; }
  90%  { width: 94%; }
  100% { width: 100%; }
}

@keyframes fadeIn {
  to { opacity: 1; }
}

/* ============================================================
   KEYFRAMES
   ============================================================ */
@keyframes bgZoom {
  from {
    transform: scale(1.07);
    filter: brightness(0.86) contrast(1.05);
  }
  to {
    transform: scale(1);
    filter: brightness(0.78) contrast(1.09);
  }
}

@keyframes lineRevealText {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

