:root {
  color-scheme: dark;
  --home-bg: #060f1e;
  --home-cream: #fff0cf;
  --brand-serif: Georgia, "Times New Roman", serif;
  --home-logo-width: min(1250px, 94vw);
  --home-logo-min-height: clamp(190px, 35vw, 390px);
  --home-logo-padding: clamp(54px, 8vw, 100px) clamp(18px, 3vw, 34px) clamp(30px, 5vw, 58px);
  --title-shine-duration: 2400ms;
  --title-shine-size: 200% 100%;
  --title-shine-start: 110% 0;
  --title-shine-end: -10% 0;
  --title-shine-angle: 105deg;
  --title-shine-reverse-angle: 75deg;
  --title-shine-reverse-delay: 0ms;
  --title-shine-reverse-start: 0% 0;
  --title-shine-reverse-end: 100% 0;
  --title-base-color: rgba(255, 240, 207, 0.82);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 46%, rgba(255, 227, 166, 0.05), transparent 34%),
    radial-gradient(circle at 16% 18%, rgba(255, 255, 255, 0.028), transparent 28%),
    var(--home-bg);
  color: var(--home-cream);
  font-family: var(--brand-serif);
}

.home-lang {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 240, 207, 0.18);
  border-radius: 10px;
  background: rgba(2, 8, 18, 0.48);
  color: rgba(255, 240, 207, 0.88);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  line-height: 1;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.home-lang__label {
  font-weight: 600;
  opacity: 0.86;
}

#homeLangSelect {
  min-width: 58px;
  padding: 4px 8px;
  border: 1px solid rgba(255, 240, 207, 0.2);
  border-radius: 8px;
  background: rgba(255, 240, 207, 0.08);
  color: var(--home-cream);
  font: inherit;
  outline: none;
}

#homeLangSelect option {
  color: #060f1e;
}

.coming-soon {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: max(24px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(28px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
  isolation: isolate;
}

.coming-soon::before {
  content: "";
  position: absolute;
  inset: -16%;
  z-index: -1;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.16) 0 1px, transparent 1.7px),
    radial-gradient(circle, rgba(246, 215, 137, 0.1) 0 1px, transparent 1.5px);
  background-position: 0 0, 56px 38px;
  background-size: 138px 138px, 184px 184px;
  opacity: 0.12;
  transform: rotate(-7deg);
}

.coming-soon__stage {
  width: var(--home-logo-width);
  display: grid;
  justify-items: center;
  gap: clamp(18px, 3.2vh, 36px);
  transform: translateY(clamp(-18px, -2vh, 0px));
}

.coming-soon__logo-frame {
  position: relative;
  width: var(--home-logo-width);
  min-height: var(--home-logo-min-height);
  display: grid;
  place-items: center;
  opacity: 0;
  transform: scale(0.50);
  transform-origin: 50% 50%;
  filter: drop-shadow(0 22px 42px rgba(0, 0, 0, 0.28));
  will-change: opacity, transform;
}

body.is-home-ready .coming-soon__logo-frame {
  /*animation: logoReveal 9000ms cubic-bezier(0.14, 0.88, 0.2, 1) 180ms forwards;*/
  animation: logoReveal 4300ms ease-out 190ms forwards;
}

.brand-logo {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--home-logo-width);
  height: auto;
  display: block;
  padding: var(--home-logo-padding);
  user-select: none;
  -webkit-user-drag: none;
  filter:
    drop-shadow(0 0 15px rgba(255, 240, 207, 0.12))
    drop-shadow(0 0 46px rgba(246, 215, 137, 0.08));
}

.coming-soon__title {
  position: relative;
  margin: 0;
  opacity: 0;
  transform: translateY(17px);
  /*color: var(--home-cream);*/
  color: var(--title-base-color);
  font-size: clamp(1.15rem, 1.5vw + 0.8rem, 2.2rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0.16em;
  text-align: center;
  text-transform: uppercase;
  text-shadow:
    0 0 18px rgba(246, 215, 137, 0.22),
    0 0 38px rgba(255, 255, 255, 0.1);
  isolation: isolate;
}

body.is-home-ready .coming-soon__title {
  animation: titleReveal 1800ms ease 3500ms forwards;
}

.coming-soon__title::before,
.coming-soon__title::after {
  content: attr(data-title);
  position: absolute;
  inset: 0;
  opacity: 0;
  color: transparent;
  font: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  text-align: inherit;
  text-transform: inherit;
  /* background: linear-gradient(
    105deg,
    rgba(255, 240, 207, 0) 0%,
    rgba(255, 240, 207, 0) 28%,
    rgba(255, 240, 207, 0.34) 40%,
    rgba(255, 255, 255, 1) 49%,
    rgba(255, 226, 158, 0.98) 54%,
    rgba(255, 240, 207, 0.36) 66%,
    rgba(255, 240, 207, 0) 78%,
    rgba(255, 240, 207, 0) 100%
  ); */
  background: linear-gradient(
    var(--title-shine-angle),
    rgba(255, 240, 207, 0) 0%,
    rgba(255, 240, 207, 0) 38%,
    rgba(255, 240, 207, 0.24) 45%,
    rgba(255, 255, 255, 1) 50%,
    rgba(255, 226, 158, 0.95) 53%,
    rgba(255, 240, 207, 0.24) 58%,
    rgba(255, 240, 207, 0) 66%,
    rgba(255, 240, 207, 0) 100%
  );
  background-size: var(--title-shine-size);
  background-position: var(--title-shine-start);
  background-repeat: no-repeat;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  pointer-events: none;
  z-index: 1;
  text-shadow: none;
  white-space: inherit;
  filter: brightness(1.28) saturate(1.08);
}

.coming-soon__title::before {
  --title-shine-angle: var(--title-shine-reverse-angle);
}

.coming-soon__title.is-shining::after {
  animation: titleShine var(--title-shine-duration) ease-in-out;
}

/* .coming-soon__title.is-shining::before {
  animation: titleShineReverse var(--title-shine-duration) ease-in-out var(--title-shine-reverse-delay);
} */

.logo-star {
  position: absolute;
  z-index: 2;
  left: var(--star-x);
  top: var(--star-y);
  width: var(--star-size);
  height: auto;
  aspect-ratio: 1 / 1;
  pointer-events: none;
  transform: translate(-50%, -50%) rotate(var(--star-rotate, 0deg)) scale(var(--star-scale, 1));
  opacity: var(--star-opacity, 1);
  will-change: opacity, filter, transform;
}

.logo-star img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  filter:
    brightness(var(--star-brightness, 1))
    saturate(var(--star-saturation, 1.02));
}

.logo-star.is-active {
  animation: starPulse 1180ms ease-out;
}

.logo-star.is-active img {
  animation: starImageFlare 1180ms ease-out;
}

@keyframes logoReveal {
  from {
    opacity: 0;
    transform: scale(0.50);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes titleReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes titleShine {
  0% {
    background-position: var(--title-shine-start);
    opacity: 0;
  }
  12%,
  81% {
    opacity: 1;
  }
  100% {
    background-position: var(--title-shine-end);
    opacity: 0;
  }
}

/* @keyframes titleShineReverse {
  0% {
    background-position: var(--title-shine-end);
    opacity: 0;
  }
  12%,
  81% {
    opacity: 0.72;
  }
  100% {
    background-position: var(--title-shine-start);
    opacity: 0;
  }
} */
@keyframes titleShineReverse {
  0% {
    background-position: var(--title-shine-reverse-start);
    opacity: 0;
  }
  12%,
  81% {
    opacity: 0.92;
  }
  100% {
    background-position: var(--title-shine-reverse-end);
    opacity: 0;
  }
}

@keyframes starPulse {
  0% {
    opacity: var(--star-opacity, 1);
  }
  25% {
    opacity: 1;
  }
  100% {
    opacity: var(--star-opacity, 1);
  }
}

@keyframes starImageFlare {
  0% {
    filter: brightness(var(--star-brightness, 1)) saturate(var(--star-saturation, 1.02));
    transform: scale(1);
  }
  28% {
    filter: brightness(1.42) saturate(1.18) drop-shadow(0 0 14px rgba(255, 244, 216, 0.42));
    transform: scale(var(--star-flare-scale, 1.1));
  }
  100% {
    filter: brightness(var(--star-brightness, 1)) saturate(var(--star-saturation, 1.02));
    transform: scale(1);
  }
}

@media (max-width: 700px) {
  :root {
    --home-logo-width: min(98vw, 1120px);
    --home-logo-min-height: clamp(160px, 44vw, 250px);
    --home-logo-padding: clamp(54px, 8vw, 100px) 8px clamp(30px, 5vw, 58px);
  }

  .coming-soon__stage {
    gap: 18px;
    transform: translateY(-8px);
  }

  .coming-soon__title {
    font-size: clamp(0.9rem, 4.3vw, 1.35rem);
    letter-spacing: 0.12em;
  }

  .home-lang {
    top: max(10px, env(safe-area-inset-top));
    right: max(10px, env(safe-area-inset-right));
    padding: 5px 7px;
    gap: 0;
  }

  .home-lang__label {
    display: none;
  }

  #homeLangSelect {
    min-width: 52px;
    padding: 4px 6px;
    font-size: 12px;
  }
}

@media (max-width: 900px) and (orientation: landscape) {
  :root {
    --home-logo-width: min(84vw, 920px);
    --home-logo-min-height: clamp(150px, 34vw, 260px);
  }

  .coming-soon {
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .coming-soon__stage {
    gap: 8px;
    transform: none;
  }
}
