/* === ШРИФТ === */
@font-face {
  font-family: 'Magestic';
  src: url('../font/majestic_0-0.ttf');
  src: local('Magestic Regular'), local('Magestic'),
       url('../font/majestic_0.ttf') format('truetype');
}

/* === БАЗОВЫЙ ФОН === */
body {
  background-color: #ffe6f2; /* светло-розовый */
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}

/* === ФОН (появляется из краёв) === */
.bg-img {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill; /* contain = вся картинка видна; cover = заполнит экран, обрежет */
  object-position: center center;
  z-index: 0;
  pointer-events: none; /* чтобы клики проходили к элементам сверху */
  user-select: none;
  display: block;
}

.bg-video {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
  pointer-events: none; /* чтобы не мешал кликам */
}



@keyframes bgZoomIn {
  0% {
    transform: scale(2);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* === РИСУНОК ПЛОВА (выезжает из правого нижнего края) === */
.plov {
  position: fixed;
  bottom: -50px;
  right: -50px;
  width: 400px;
  opacity: 0;
  z-index: 1;
  animation: plovSlideIn 2.5s ease forwards 2s;
}

@keyframes plovSlideIn {
  0% {
    transform: translate(200px, 200px) rotate(20deg);
    opacity: 0;
  }
  100% {
    transform: translate(0, 0) rotate(0deg);
    opacity: 1;
  }
}

/* === ТЕКСТОВОЕ ОФОРМЛЕНИЕ === */
h1 {
  font-family: 'Magestic', serif;
  text-align: center;
  color: #c96c00;
  font-size: 60px;
  opacity: 0;
  animation: fadeIn 2s ease forwards 3s;
}

h2 {
  font-size: 50px;
  text-align: center;
}

p {
  font-family: 'Times New Roman', Times, serif;
  text-align: center;
  font-size: larger;
  font-style: italic;
  margin-top: auto !important;
  opacity: 0;
  animation: fadeIn 2s ease forwards 3.5s;
}

p span {
  font-weight: bold;
  color: #c96c00;
}

.main {
  margin-top: 20%;
  opacity: 0;
  animation: fadeIn 2s ease forwards 3s;
  z-index: 2;
}

.body {
  margin-top: 10%;
  margin-left: 15%;
  margin-right: 15%;
  opacity: 0;
  animation: fadeIn 2s ease forwards 3.5s;
  z-index: 2;
}

.map {
  z-index: 2;
}

.flipcontent {
  z-index: 2;
}

/* Затемнение */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* полупрозрачное затемнение */
    z-index: 1;
}

/* === ЭФФЕКТЫ ПОЯВЛЕНИЯ === */
@keyframes fadeIn {
  0% { opacity: 0; transform: translateY(15px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* === ЭЛЕМЕНТ "&" === */
.ampersand {
  height: 50px;
  width: auto;
  opacity: 0;
  animation: fadeIn 2s ease forwards 3s;
}

/* === КОНВЕРТ === */
.envelope {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10;
  height: 100%;
  width: 100%;
  text-align: center;
  background-color: #ffe6f2;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 1s ease;
}

.envelope img {
  height: 100%;
  width: 100%;
  object-fit: cover;
  transition: transform 1s ease;
}

.close-envelope {
  animation: fadeoutint 2s linear forwards;
}

@keyframes fadeoutint {
  0% { opacity: 1; }
  100% { opacity: 0; display: none; }
}

/* === КНОПКА КАРТЫ === */
.map-button {
  opacity: 0;
  animation: fadeIn 2s ease forwards 4s;
}

/* === АДАПТИВНОСТЬ === */
@media screen and (max-width: 996px) {
  .main { margin-top: 10%; }
  .body { margin-top: 10%; }
}

@media screen and (max-width: 771px) {
  .main { margin-top: 15%; }
  .body {
    margin-top: 10%;
    margin-left: 5%;
    margin-right: 5%;
  }
  p {
    font-size: medium;
  }
  .plov {
    width: 250px;
    bottom: -50px;
    right: -50px;
  }
}

@media screen and (max-width: 600px) {
  .main { margin-top: 15%; }
  .body {
    margin-top: 10%;
    margin-left: 5%;
    margin-right: 5%;
  }
  p {
    font-size: medium;
  }
  .plov {
    width: 200px;
    bottom: -50px;
    right: -50px;
  }
}
