:root {
  --color-bg: #94451A;
  --color-accent: #6B3222;
  --color-white: #FFF;
  --color-light: #F2EFE6;
  --color-grey: #C2BDAB;
  --color-yellow: #FFF59F;
  --color-hover: #799cb2;

  --circle-width: 95.2dvw;
  /* --circle-height: 82.9dvh; */
  --circle-height: 78.9dvh;

  --viewport-unit: 1vh;

  /* ИНТРО */
  --intro-stage2-delay: 1s; /* задержка перед анимацией звезды */
  --intro-stage2-duration: 1600ms; /* длительность */
  --intro-stage2-ease: cubic-bezier(0.68, -0.6, 0.32, 1.6);
  --intro-hide-duration: .8s; /* скрытие интро по клику */


  @media (min-width: 768px) {
    --circle-width: 91.8dvw;
    --circle-height: 87.8dvh;
  }
  @media (min-width: 1024px) {
    --circle-width: 93.8dvw;
    --circle-height: 74.1dvh;
  }
  @media (min-width: 1440px) {
    --circle-width: 89.1dvw;
    --circle-height: 84.1dvh;
  }
  @media (min-width: 1850px) {
    --circle-width: 66.8dvw;
    --circle-height: 80.3dvh;
  }
}
@supports (height: 100dvh) {
  :root { --viewport-unit: 1dvh; }
}


*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html, body {
  width: 100%;
  height: 100%;
  touch-action: manipulation;
  background-color: var(--color-bg);
}
html {
  overflow: hidden;
  scrollbar-width: none;
}
html.scene-playing { overflow-y: auto; }
body {
  margin: 0;
  min-height: calc(var(--viewport-unit) * 100 + 160px);
  font-family: 'Bona Nova';
  font-weight: 400 !important;
}
img, svg {
  display: block;
  flex-shrink: 0;
}
button, input {
  font: inherit;
  cursor: pointer;
  border: none;
  outline: none;
}
::-webkit-scrollbar { display: none; }


.h1 {
  font-family: 'Bona Nova';
  font-size: 64px;
  font-weight: 400;
  line-height: 130%;
}
.h2 {
  font-family: 'Bona Nova';
  font-size: 20px;
  font-weight: 400;
  line-height: 130%;

  @media (min-width: 768px) { font-size: 24px; }
}
.h3 {
  font-family: 'Bona Nova';
  font-size: 20px;
  font-weight: 400;
  line-height: 130%;
  text-transform: uppercase;

  @media (min-width: 768px) { font-size: 32px; }
  @media (min-width: 1024px) { font-size: 44px; }
}
.p1 {
  font-family: 'Bona Nova';
  font-size: 16px;
  font-weight: 400;
  text-transform: uppercase;

  @media (min-width: 768px) { font-size: 20px; }
  @media (min-width: 1440px) { font-size: 26px; }
}
.p2 {
  font-family: 'Bona Nova';
  font-size: 16px;
  font-weight: 400;
  line-height: 160%;
  
  @media (min-width: 768px) { font-size: 24px; }
}



#stageSpacer {
  position: fixed;
  inset: 0;
  height: calc(var(--viewport-unit) * 100);
}

.stage {
  position: relative;
  touch-action: manipulation;
  width: 100%;
  height: calc(var(--viewport-unit) * 100);
  overflow: hidden;
  background-color: var(--color-accent);
}
.scene {
  position: absolute;
  inset: 0;
  z-index: 1;
  transform-origin: 0 0;
  will-change: transform;
}
.scene::before {
  content: '';
  position: absolute;
  top: var(--bg-top, 0px);
  left: var(--bg-left, 0px);
  width: var(--bg-width, 100%);
  height: var(--bg-height, 100%);
  background: url('../img/main-bg.png') no-repeat center / 100% 100%;
}
.frame {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  overflow: visible;
  background: var(--color-accent);
}
.slide {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.slide__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-position: center;
  background-size: cover;
}

.slide--photo-1 .slide__media { background-image: url("../img/slide-1.jpg"); }
.slide--photo-2 .slide__media { background-image: url("../img/slide-2.jpg"); }
.slide--photo-3 .slide__media { background-image: url("../img/slide-3.jpg"); }
.slide--photo-4 .slide__media { background-image: url("../img/slide-4.jpg"); }
.slide--photo-5 .slide__media { background-image: url("../img/slide-5.jpg"); }
.slide--photo-6 .slide__media { background-image: url("../img/slide-1.jpg"); }
.slide--photo-7 .slide__media { background-image: url("../img/slide-2.jpg"); }
.slide--photo-8 .slide__media { background-image: url("../img/slide-3.jpg"); }
.slide--photo-9 .slide__media { background-image: url("../img/slide-4.jpg"); }
.slide--photo-10 .slide__media { background-image: url("../img/slide-5.jpg"); }
.slide--photo-11 .slide__media { background-image: url("../img/slide-1.jpg"); }
.slide--photo-12 .slide__media { background-image: url("../img/slide-2.jpg"); }
.slide--photo-13 .slide__media { background-image: url("../img/slide-3.jpg"); }
.slide--photo-14 .slide__media { background-image: url("../img/slide-4.jpg"); }
.slide--photo-15 .slide__media { background-image: url("../img/slide-5.jpg"); }
.slide--photo-16 .slide__media { background-image: url("../img/slide-1.jpg"); }
.slide--photo-17 .slide__media { background-image: url("../img/slide-2.jpg"); }
.slide--photo-18 .slide__media { background-image: url("../img/slide-3.jpg"); }

.slide__media iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  border: 0;
  transform: translate(-50%, -50%);
  pointer-events: none;
  user-select: none;
}


/* ИНТРО */
.intro {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;

  inset: 0;
  z-index: 5;
  overflow: hidden;
  pointer-events: none;
  opacity: 1;
  visibility: visible;
  background-color: var(--color-bg);
}
.intro.is-hiding {
  animation: intro-bg var(--intro-hide-duration) cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  will-change: opacity, visibility;
}
@keyframes intro-bg {
  from { opacity: 1; visibility: visible; }
  to { opacity: 0; visibility: hidden; }
}

.intro::before {
  content: '';
  position: absolute;
  width: var(--circle-width);
  height: var(--circle-height);
  border: 1px solid var(--color-white);
  border-radius: 2000px;
}
.circle-bg {
  --mix: color-mix(in srgb, var(--color-bg) 50%, transparent);

  position: absolute;
  width: calc( var(--circle-width) + 1% );
  height: calc( var(--circle-height) + 1% );
  background: linear-gradient(to right, var(--mix), var(--color-bg));
}

.intro__content {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  width: max-content;
  max-width: 90vw;
  gap: 24px;
  color: var(--color-light);
  z-index: 6;
}
.intro__content--top,
.intro__content--bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 20px;
}

/* Появление блоков */
.intro__content--bottom,
.intro__content .h3,
.intro__line,
.intro__content button,
.visible-interfase {
  opacity: 0;
  animation: intro-fade var(--intro-stage2-duration) var(--intro-stage2-ease) var(--intro-stage2-delay) forwards;
}
@keyframes intro-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

#STAR {
  position: relative;
  z-index: 7;
  width: 20px;
  height: 20px;
  transform: translate(0%, 300%) scale(3.6);
  animation: intro-star var(--intro-stage2-duration) var(--intro-stage2-ease) var(--intro-stage2-delay) forwards;
  will-change: transform;
}
@keyframes intro-star {
  from { transform: translate(0%, 300%) scale(3.6); }
  to { transform: translate(0%, 0%) scale(1); }
}

.intro__line {
  max-width: 290px;
  width: 100%;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--color-white));
}
.intro__line.revers {
  transform: scaleX(-1);
}
.intro__content button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
  pointer-events: auto;
  padding: 0 24px;
  height: 38px;
  border-radius: 100px;
  background-color: var(--color-yellow);
  transition: color 0.3s ease, background-color 0.3s ease;
}
.intro__content button:hover {
  color: var(--color-white);
  background-color: var(--color-hover);
}


.visible-interfase {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}
.visible-interfase p:nth-child(1) { top: 16px; left: 16px; }
.visible-interfase p:nth-child(2) { top: 16px; right: 16px; }
.visible-interfase p:nth-child(3) { bottom: 32px; right: 16px; }
.visible-interfase p:nth-child(4) { bottom: 32px; left: 16px; }
.visible-interfase p {
  position: absolute;
  color: var(--color-light);
}
.visible-interfase span { color: var(--color-yellow); }

/* Прогрессбар */
#progress-bar {
  opacity: 0;
  visibility: hidden;
  transition: opacity .6s ease, visibility .6s ease;
}
body.intro-done #progress-bar {
  opacity: 1;
  visibility: visible;
}
.progress {
  position: absolute;
  bottom: 16px;
  left: 16px;
  right: 16px;
  width: auto;
  height: 2px;
  background: var(--color-accent);
  text-align: center;
}
.progress > div {
  height: 100%;
  width: 0%;
  background: var(--color-yellow);
  will-change: width;
}
.progress > span {
  position: absolute;
  bottom: 10px;
  color: var(--color-yellow);
  font-variant-numeric: tabular-nums;
}


/* ФОРМА */
.form-overlay {
  position: fixed;
  inset: 0;
  height: calc(var(--viewport-unit) * 100);
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  opacity: 0;
  pointer-events: auto;
}
.form-box {
  position: relative;
  width: 100%;
  max-width: 560px;
  margin-top: calc(var(--viewport-unit) * -30);
  text-align: center;
  margin-left: 24px;
  margin-right: 24px;
}
.form-box > h1 {
  position: absolute;
  top: 50%;
  left: 50%;
  margin: 0;
  white-space: nowrap;
  color: var(--color-yellow);
  will-change: transform, opacity;
}
.form-box__body {
  position: absolute;
  top: calc(50% + 48px);
  right: 0;
  left: 0;
}
.form-box__body > h2 {
  margin: 0 0 48px;
  color: var(--color-light);
}
.form-box__body > form {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 12px;
}
.form-box__body > form input,
.form-box__body > form button {
  max-width: 427px;
  width: 100%;
  height: 56px;
  font-size: 20px;
  line-height: 160%;
}
.form-box__body > form input {
  padding: 0 24px;
  color: var(--color-white);
  border: 1px solid var(--color-grey);
  border-radius: 16px;
  background: transparent;
  transition: border-color 0.3s ease;
}
.form-box__body > form input::placeholder {
  color: var(--color-grey);
  transition: color 0.3s ease;
}
.form-box__body > form input:hover,
.form-box__body > form input:hover::placeholder,
.form-box__body > form input:focus::placeholder,
.form-box__body > form input:focus {
  border-color: var(--color-white);
  color: var(--color-white);
}
.form-box__body > form button {
  color: #000;
  background: var(--color-yellow);
  border-radius: 100px;
  transition: color 0.3s ease, background-color 0.3s ease;
}
.form-box__body > form button:hover {
  color: var(--color-white);
  background: var(--color-hover);
}


@media (max-width: 767px) { .form-box__body { top: calc(50% + 24px); } }





@media (min-width: 768px) {
  #STAR {
    width: 40px;
    height: 40px;
  }
  .intro__content button {
    padding: 0 32px;
    height: 54px;
  }
  .intro__content--top,
  .intro__content--bottom { gap: 24px; }
  .visible-interfase p:nth-child(1) { top: 32px; left: 32px; }
  .visible-interfase p:nth-child(2) { top: 32px; right: 32px; }
  .visible-interfase p:nth-child(3) { bottom: 64px; right: 32px; }
  .visible-interfase p:nth-child(4) { bottom: 64px; left: 32px; }
  .progress {
    bottom: 32px;
    left: 32px;
    right: 32px;
  }
}
@media (min-width: 1024px) {
  .intro__content { gap: 48px; }
}
@media (min-width: 1440px) {
  .intro__content { gap: 32px; }
}


html.keyboard-open {
  overflow: hidden;
  overscroll-behavior: none;
}
html.keyboard-open body {
  position: fixed;
  min-height: 100%;
  top: var(--scroll-lock-top, 0px);
  left: 0;
  right: 0;
  touch-action: none;
}
html.keyboard-open .form-overlay {
  inset: auto;
  top: var(--form-top, 0px);
  left: var(--form-left, 0px);
  width: var(--form-width, 100%);
  height: var(--form-height, 100%);
  align-items: flex-end;
  padding: 12px 24px 24px;
  overflow: hidden;
}
html.keyboard-open .form-box {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 16px;
  max-height: 100%;
  min-height: 0;
  margin: 0;
}
html.keyboard-open .form-box > h1 {
  position: static;
  flex-shrink: 0;
  font-size: 64px !important;
  line-height: 110%;
  transform: none !important;
}
html.keyboard-open .form-box__body {
  position: static;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 124px;
}
html.keyboard-open .form-box__body > h2 {
  min-height: 0;
  margin: 0;
  overflow: hidden;
  font-size: 18px;
  line-height: 120%;
}
html.keyboard-open .form-box__body > form {
  flex-shrink: 0;
  transform: none !important;
}
html.keyboard-open .form-overlay.is-compact .form-box > h1,
html.keyboard-open .form-overlay.is-short .form-box__body > h2 { display: none; }
html.keyboard-open .form-overlay.is-short .form-box__body { gap: 0; }

.thanks, .thanks * { color: var(--color-white); }


.grecaptcha-badge {
  visibility: hidden !important;
}