/* --- Общие стили --- */
:root {
  --gold: #d4af37;
  --gold-light: #f7e6b0;
  --dark: #1e1a16;
  --panel: #fffdfa;
  --text: #2c2620;
  --overlay-dark: rgba(0, 0, 0, 0.65);
  --glass: rgba(255, 255, 255, 0.06);
}

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

html, body {
  height: 100%;
  font-family: "Playfair Display", serif;
  color: var(--text);
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  -webkit-font-smoothing: antialiased;
}

/* --- Фон страницы (градиент) --- */
.page-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: linear-gradient(135deg, #1e1a16, #2c2620);
  animation: bgflow 12s ease-in-out infinite alternate;
}

@keyframes bgflow {
  0% {
    background: linear-gradient(135deg, #1e1a16, #2c2620);
  }
  50% {
    background: linear-gradient(135deg, #2c2620, #3a322a);
  }
  100% {
    background: linear-gradient(135deg, #1e1a16, #2c2620);
  }
}

/* --- Заголовки и текст --- */
h1, h2, h3 {
  color: var(--gold);
  font-family: "Playfair Display", serif;
}

.dyn-line {
  font-style: italic;
  color: rgba(255, 255, 255, 0.95);
  font-size: 1.05rem;
  min-height: 1.4em;
  transition: opacity 0.4s ease;
}

/* --- Контейнеры и блоки --- */
main {
  flex: 1;
  margin-top: 0;
}

.hero-slider {
  position: relative;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  display: block;
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  padding: 20px;
  gap: 12px;
}

/* --- Кнопки --- */
.cta {
  padding: 12px 22px;
  border-radius: 12px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  color: #1a1208;
  font-weight: 700;
  border: none;
  cursor: pointer;
  box-shadow: 0 20px 70px rgba(212, 175, 55, 0.14);
  transition: transform 0.14s ease;
}

.cta:hover {
  transform: translateY(-4px);
}

/* --- Адаптивный дизайн --- */

/* для мобильных устройств */
@media (max-width: 480px) {
  /* Уменьшаем размеры текста и изображений */
  .logo-svg {
    width: 160px;
  }

  .hero-content h1 {
    font-size: 28px;
  }

  .side-menu {
    width: 72%;
  }

  .menu-toggle {
    width: 48px;
    height: 40px;
  }

  /* Модалки */
  .modal-close {
    width: 44px;
    height: 44px;
    top: 8px;
    right: 8px;
  }

  .modal-box {
    margin-top: 28px;
    padding: 14px;
  }
}

/* для планшетов (от 481px до 900px) */
@media (max-width: 900px) {
  .logo-svg {
    width: 180px;
  }

  .hero-content h1 {
    font-size: 40px;
  }

  .menu-toggle {
    width: 54px;
    height: 46px;
  }

  .modal-close {
    width: 46px;
    height: 46px;
  }
}

/* для десктопов и больших экранов (900px и выше) */
@media (min-width: 901px) {
  .hero-content h1 {
    font-size: 56px;
  }

  .menu-toggle {
    width: 60px;
    height: 50px;
  }
}

/* --- Модалки --- */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 28px;
  visibility: hidden;
  opacity: 0;
  transition: opacity .25s ease;
  z-index: 1600;
}

.modal.show {
  visibility: visible;
  opacity: 1;
}

.modal-box {
  width: 100%;
  max-width: 820px;
  margin-top: 48px;
  border-radius: 14px;
  overflow: hidden;
  padding: 18px;
  position: relative;
  box-shadow: 0 30px 120px rgba(0, 0, 0, 0.55);
  border: 2px solid rgba(212, 175, 55, 0.12);
  background: linear-gradient(180deg, #fffefb, #fffbf5);
  transform: translateY(-6px);
  transition: transform .28s ease, opacity .28s ease;
}

.modal.show .modal-box {
  transform: translateY(0);
}

.modal-inner {
  padding: 18px;
  border-radius: 10px;
  background: transparent;
}

.modal-inner h3 {
  margin: 0;
  color: var(--gold);
  font-size: 1.4rem;
}

.gold-line {
  height: 3px;
  border-radius: 4px;
  margin: 10px 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* Кастомная кнопка закрытия */
.modal-close {
  position: absolute;
  top: 10px;
  right: 14px;
  width: 46px;
  height: 46px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--gold);
  transition: transform .15s ease;
}

.modal-close:hover {
  transform: rotate(-10deg) scale(1.08);
}

.modal-close svg {
  width: 30px;
  height: 30px;
  display: block;
}
/* --- Заставка --- */
.intro-screen {
  position: fixed;
  inset: 0;
  background: #1e1a16;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  transition: opacity 1s ease;
}

.intro-logo {
  opacity: 0;
  transform: scale(0.7);
  animation: fadeInZoom 2s forwards;
  animation-delay: 0.5s; /* Задержка анимации */
}

/* Анимация появления логотипа */
@keyframes fadeInZoom {
  0% {
    opacity: 0;
    transform: scale(0.7);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Добавление задержки для других элементов на странице */
.fade-in {
  opacity: 0;
  animation: fadeIn 1s forwards;
}

.fade-in-delay {
  animation-delay: 0.5s;
}

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

/* Скрытие заставки */
.intro-screen.hide {
  opacity: 0;
  pointer-events: none;
}