/*
------------------------------------------------

Project Omnistic

Build XXXIV.2 — The Threshold

------------------------------------------------
*/

html.ceremony-active,
html.ceremony-active body {
  overflow: hidden;
}

.opening-ceremony {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 24px;
  color: #eee4d7;
  opacity: 1;
  visibility: visible;
  transition:
    opacity 1.35s ease,
    visibility 1.35s ease;
}

.opening-ceremony::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(7, 6, 5, 0.98),
      rgba(7, 6, 5, 0.91)
    );
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  transition:
    background 2.2s ease,
    backdrop-filter 2.2s ease;
}

.opening-ceremony.is-revealing::before {
  background:
    linear-gradient(
      180deg,
      rgba(7, 6, 5, 0.78),
      rgba(7, 6, 5, 0.54)
    );
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.opening-ceremony.is-open::before {
  background:
    linear-gradient(
      180deg,
      rgba(7, 6, 5, 0.54),
      rgba(7, 6, 5, 0.28)
    );
  backdrop-filter: blur(0);
  -webkit-backdrop-filter: blur(0);
}

.opening-ceremony.is-closing {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.opening-ceremony[hidden] {
  display: none;
}

.opening-ceremony__stage {
  position: relative;
  z-index: 2;
  width: min(920px, 100%);
  min-height: min(660px, calc(100vh - 48px));
  display: grid;
  place-items: center;
  text-align: center;
}

.opening-ceremony__scene {
  grid-area: 1 / 1;
  width: 100%;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition:
    opacity 1.3s ease,
    transform 1.3s ease,
    visibility 1.3s ease;
}

.opening-ceremony__scene.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.opening-ceremony__seal {
  position: relative;
  width: clamp(140px, 19vw, 210px);
  aspect-ratio: 1;
  margin: 0 auto 30px;
  border: 1px solid rgba(183, 138, 82, 0.9);
  border-radius: 50%;
  outline: 1px solid rgba(183, 138, 82, 0.32);
  outline-offset: -11px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(
      circle at 34% 28%,
      rgba(250, 220, 169, 0.22),
      transparent 18%
    ),
    radial-gradient(
      circle,
      rgba(144, 91, 42, 0.18),
      rgba(8, 6, 5, 0.98)
    );
  box-shadow:
    0 0 80px rgba(151, 96, 42, 0.22),
    inset 0 0 40px rgba(221, 177, 108, 0.08);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(62px, 9vw, 96px);
  color: #dfc18d;
}

.opening-ceremony__seal::after {
  content: "";
  position: absolute;
  inset: -30%;
  background:
    linear-gradient(
      110deg,
      transparent 38%,
      rgba(255, 229, 177, 0.16) 48%,
      transparent 58%
    );
  transform: translateX(-70%);
  animation:
    threshold-seal-light
    5.5s ease-in-out infinite;
}

@keyframes threshold-seal-light {
  0%, 28% {
    transform: translateX(-70%);
  }

  72%, 100% {
    transform: translateX(70%);
  }
}

.opening-ceremony__name {
  margin: 0;
  color: #dfc18d;
  font-size: 12px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

.opening-ceremony__inscription {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(28px, 5vw, 58px);
  line-height: 1.62;
}

.opening-ceremony__inscription span {
  display: block;
  opacity: 0;
  transform: translateY(10px);
}

.opening-ceremony__scene.is-visible
.opening-ceremony__inscription span {
  animation:
    threshold-line-reveal
    1.2s ease forwards;
}

.opening-ceremony__scene.is-visible
.opening-ceremony__inscription span:nth-child(2) {
  animation-delay: 1.7s;
}

.opening-ceremony__scene.is-visible
.opening-ceremony__inscription span:nth-child(3) {
  animation-delay: 3.4s;
}

@keyframes threshold-line-reveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.opening-ceremony__welcome {
  padding: clamp(28px, 5vw, 58px);
  border: 1px solid rgba(183, 138, 82, 0.42);
  background:
    linear-gradient(
      145deg,
      rgba(31, 23, 17, 0.5),
      rgba(8, 7, 6, 0.66)
    );
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(245, 218, 174, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.opening-ceremony__welcome h1 {
  margin: 0;
  color: #eee4d7;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(48px, 9vw, 96px);
  font-weight: 400;
  line-height: 0.98;
}

.opening-ceremony__welcome p {
  max-width: 760px;
  margin: 24px auto 0;
  color: #c9bcac;
  font-size: clamp(17px, 2.4vw, 24px);
  line-height: 1.65;
}

.opening-ceremony__enter {
  min-height: 54px;
  margin-top: 38px;
  padding: 14px 28px;
  border: 1px solid #b78a52;
  background:
    linear-gradient(
      145deg,
      rgba(100, 66, 33, 0.24),
      rgba(10, 8, 7, 0.9)
    );
  color: #dfc18d;
  font: inherit;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    background 0.25s ease,
    color 0.25s ease,
    transform 0.25s ease;
}

.opening-ceremony__enter:hover,
.opening-ceremony__enter:focus-visible {
  background: #b78a52;
  color: #090705;
  transform: translateY(-2px);
}

.opening-ceremony__founder {
  position: absolute;
  left: 22px;
  bottom: 18px;
  z-index: 3;
  margin: 0;
  color: #8f8375;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.opening-ceremony__skip {
  position: absolute;
  right: 22px;
  bottom: 18px;
  z-index: 3;
  border: 0;
  background: transparent;
  color: #8f8375;
  font: inherit;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}

.opening-ceremony__skip:hover,
.opening-ceremony__skip:focus-visible {
  color: #d4c4af;
}

@media (max-width: 620px) {

  .opening-ceremony {
    padding: 16px;
  }

  .opening-ceremony__stage {
    min-height: calc(100vh - 32px);
  }

  .opening-ceremony__founder {
    left: 14px;
    bottom: 12px;
  }

  .opening-ceremony__skip {
    right: 14px;
    bottom: 12px;
  }

}

@media (prefers-reduced-motion: reduce) {

  .opening-ceremony,
  .opening-ceremony::before,
  .opening-ceremony__scene,
  .opening-ceremony__seal::after,
  .opening-ceremony__inscription span,
  .opening-ceremony__enter {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }

  .opening-ceremony__inscription span {
    opacity: 1;
  }

}
