@import url('https://fonts.googleapis.com/css2?family=Jost:wght@300;400;500;600&display=swap');

:root {
  --cream: #F5F2EB;
  --gold: #D4AF37;
  --vh: 1vh;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  overscroll-behavior: none;
  -webkit-overflow-scrolling: touch;
  height: 100%;
  overflow: hidden;
  width: 100%;
  background: #0d0b0a;
  font-family: 'Jost', sans-serif;
  color: var(--cream);
}

/* ===== LUXURY PRELOADER ===== */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  inset: 0;
  z-index: 100;
  background: radial-gradient(circle at 50% 48%, #A39690 0%, #7A6F68 55%, #473F3B 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity .75s cubic-bezier(0.25, 1, 0.5, 1), transform .75s cubic-bezier(0.25, 1, 0.5, 1), filter .75s ease;
  overflow: hidden;
}

#preloader.hide {
  opacity: 0;
  -webkit-transform: scale(1.05);
  transform: scale(1.05);
  filter: blur(6px);
  -webkit-filter: blur(6px);
  pointer-events: none;
}

.pl-glow {
  position: absolute;
  width: clamp(260px, 60vw, 420px);
  height: clamp(160px, 35vw, 240px);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255, 255, 255, 0.22) 0%, rgba(201, 168, 118, 0.12) 50%, transparent 75%);
  filter: blur(30px);
  -webkit-filter: blur(30px);
  pointer-events: none;
  opacity: 0;
  -webkit-animation: plGlowIn 1.6s ease-out 0.15s forwards;
  animation: plGlowIn 1.6s ease-out 0.15s forwards;
}

@-webkit-keyframes plGlowIn {
  to { opacity: 1; }
}
@keyframes plGlowIn {
  to { opacity: 1; }
}

.pl-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.pl-logo {
  width: clamp(200px, 50vw, 320px);
  height: auto;
  max-height: 120px;
  object-fit: contain;
  opacity: 0;
  -webkit-transform: translateY(16px) scale(.94);
  transform: translateY(16px) scale(.94);
  -webkit-animation: plLogoIn 1.4s cubic-bezier(.22, 1, .36, 1) .1s forwards;
  animation: plLogoIn 1.4s cubic-bezier(.22, 1, .36, 1) .1s forwards;
  filter: drop-shadow(0 6px 20px rgba(0, 0, 0, 0.35)) drop-shadow(0 0 16px rgba(255, 255, 255, 0.18));
  -webkit-filter: drop-shadow(0 6px 20px rgba(0, 0, 0, 0.35)) drop-shadow(0 0 16px rgba(255, 255, 255, 0.18));
  user-select: none;
  -webkit-user-drag: none;
  display: block;
}

@-webkit-keyframes plLogoIn {
  0% {
    opacity: 0;
    -webkit-transform: translateY(16px) scale(.94);
    transform: translateY(16px) scale(.94);
    -webkit-filter: blur(4px) drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
    filter: blur(4px) drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
  }
  100% {
    opacity: 1;
    -webkit-transform: translateY(0) scale(1);
    transform: translateY(0) scale(1);
    -webkit-filter: blur(0) drop-shadow(0 6px 20px rgba(0, 0, 0, 0.35)) drop-shadow(0 0 16px rgba(255, 255, 255, 0.18));
    filter: blur(0) drop-shadow(0 6px 20px rgba(0, 0, 0, 0.35)) drop-shadow(0 0 16px rgba(255, 255, 255, 0.18));
  }
}

@keyframes plLogoIn {
  0% {
    opacity: 0;
    -webkit-transform: translateY(16px) scale(.94);
    transform: translateY(16px) scale(.94);
    -webkit-filter: blur(4px) drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
    filter: blur(4px) drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
  }
  100% {
    opacity: 1;
    -webkit-transform: translateY(0) scale(1);
    transform: translateY(0) scale(1);
    -webkit-filter: blur(0) drop-shadow(0 6px 20px rgba(0, 0, 0, 0.35)) drop-shadow(0 0 16px rgba(255, 255, 255, 0.18));
    filter: blur(0) drop-shadow(0 6px 20px rgba(0, 0, 0, 0.35)) drop-shadow(0 0 16px rgba(255, 255, 255, 0.18));
  }
}

.pl-track {
  margin-top: 26px;
  width: 150px;
  height: 2.5px;
  background: rgba(255, 255, 255, .15);
  border-radius: 999px;
  overflow: hidden;
  opacity: 0;
  -webkit-animation: plSubIn .7s ease .45s forwards;
  animation: plSubIn .7s ease .45s forwards;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

.pl-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #E8D3B1 0%, #FFFFFF 100%);
  border-radius: 999px;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.7), 0 0 3px #C9A876;
  -webkit-animation: plBar 1.2s cubic-bezier(.35, 0, .25, 1) .55s forwards;
  animation: plBar 1.2s cubic-bezier(.35, 0, .25, 1) .55s forwards;
}

@-webkit-keyframes plBar { to { width: 100%; } }
@keyframes plBar { to { width: 100%; } }

@-webkit-keyframes plSubIn {
  from {
    opacity: 0;
    -webkit-transform: translateY(5px);
    transform: translateY(5px);
  }
  to {
    opacity: 0.85;
    -webkit-transform: translateY(0);
    transform: translateY(0);
  }
}

@keyframes plSubIn {
  from {
    opacity: 0;
    -webkit-transform: translateY(5px);
    transform: translateY(5px);
  }
  to {
    opacity: 0.85;
    -webkit-transform: translateY(0);
    transform: translateY(0);
  }
}

.home-container {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  height: calc(var(--vh, 1vh) * 100);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
}

/* ===== FULLSCREEN VIDEO BACKGROUND ===== */
.video-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  inset: 0;
  overflow: hidden;
  z-index: 1;
  background: #000;
}

.bg-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  -webkit-transition: opacity 0.9s ease-out;
  transition: opacity 0.9s ease-out;
}

.bg-video.ready {
  opacity: 1;
}

/* Мягкая легкая виньетка сверху для логотипа */
.home-top-vignette {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 130px;
  background: linear-gradient(to bottom,
      rgba(0, 0, 0, 0.45) 0%,
      rgba(0, 0, 0, 0.12) 65%,
      transparent 100%);
  z-index: 2;
  pointer-events: none;
}

/* Мягкая легкая виньетка внизу для контраста кнопки */
.home-vignette {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 180px;
  background: linear-gradient(to top,
      rgba(0, 0, 0, 0.55) 0%,
      rgba(0, 0, 0, 0.18) 60%,
      transparent 100%);
  z-index: 2;
  pointer-events: none;
}

/* ===== TOP BAR (LOGO TOP-LEFT) ===== */
.home-top-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 5;
  padding: clamp(24px, 3.5vw, 36px) clamp(22px, 3.5vw, 44px) 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  pointer-events: none;
}

.home-logo {
  height: clamp(28px, 4vw, 38px);
  width: auto;
  max-width: 170px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.7));
  -webkit-filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.7));
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: auto;
}

/* ===== BOTTOM AREA ===== */
.home-bottom-area {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 10;
  padding: 0 20px calc(48px + env(safe-area-inset-bottom));
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
}

/* ===== УТОНЧЕННАЯ КНОПКА (СТЕКЛО / ЗОЛОТО) ===== */
.enter-menu-btn {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 44px;
  border-radius: 999px;
  background: rgba(22, 19, 17, 0.42);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(235, 215, 180, 0.38);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45),
              inset 0 1px 1px rgba(255, 255, 255, 0.2),
              0 0 20px rgba(212, 175, 55, 0.12);
  color: var(--cream);
  text-decoration: none;
  font-family: 'Jost', sans-serif;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.enter-menu-btn:hover {
  background: rgba(35, 30, 26, 0.65);
  border-color: rgba(235, 215, 180, 0.75);
  color: #FFFFFF;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6),
              inset 0 1px 1px rgba(255, 255, 255, 0.35),
              0 0 28px rgba(212, 175, 55, 0.28);
}

.enter-menu-btn:active {
  transform: translateY(0) scale(0.97);
  background: rgba(22, 19, 17, 0.6);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

/* ===== SAFE AREA ===== */
@supports (padding-top: env(safe-area-inset-top)) {
  .home-top-bar {
    padding-top: max(clamp(24px, 3.5vw, 36px), calc(env(safe-area-inset-top) + 14px));
    padding-left: max(clamp(22px, 3.5vw, 44px), calc(env(safe-area-inset-left) + 14px));
  }
}

@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .home-bottom-area {
    padding-bottom: max(40px, calc(env(safe-area-inset-bottom) + 24px));
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 375px) {
  .enter-menu-btn {
    padding: 13px 32px;
    font-size: 12.5px;
    letter-spacing: 2.8px;
  }
}

@media (min-width: 1025px) {
  .enter-menu-btn {
    padding: 16px 52px;
    font-size: 14.5px;
    letter-spacing: 4px;
  }
}

@media (max-height: 500px) and (orientation: landscape) {
  .home-bottom-area {
    padding-bottom: 20px;
  }
  .enter-menu-btn {
    padding: 11px 28px;
    font-size: 12px;
    letter-spacing: 2.5px;
  }
}
