:root {
  --welcome-image: url("./assets/1-welcome-page/43-crashing-acid-sea.jpg");
  color-scheme: dark;
  font-family: Helvetica, "Helvetica Neue", Arial, sans-serif;
  background: #070707;
  color: #f2f0e9;
}

* { box-sizing: border-box; }

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

body { overflow: hidden; }

.welcome {
  isolation: isolate;
  min-height: 100svh;
  overflow: hidden;
  position: relative;
}

.background,
.background::before,
#chair-motion,
.grain {
  inset: 0;
  position: absolute;
}

.background {
  background-image:
    linear-gradient(0deg, rgba(5, 5, 5, .73) 0%, transparent 42%),
    var(--welcome-image);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  filter: saturate(.58) contrast(1.08) brightness(.83);
  transform: scale(1.025);
  animation: background-drift 18s ease-in-out infinite alternate;
  z-index: -4;
}

.background::before {
  background: radial-gradient(circle at 68% 59%, rgba(204, 199, 177, .08), transparent 27%);
  content: "";
  mix-blend-mode: screen;
}

#chair-motion {
  height: 100%;
  pointer-events: none;
  width: 100%;
  z-index: -2;
}

.grain {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.65'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
  opacity: .13;
  pointer-events: none;
  z-index: -1;
}

.hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100svh;
  padding: clamp(2rem, 6vw, 7rem);
  position: relative;
}

.access {
  font-size: clamp(1rem, 1.8vw, 1.36rem);
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.2;
  text-transform: none;
}

.access {
  animation: enter 800ms 230ms both cubic-bezier(.16, 1, .3, 1);
  color: rgba(242, 240, 233, .7);
  display: inline-block;
  margin: 0;
  text-decoration: none;
}

.access span { color: rgba(242, 240, 233, .3); padding: 0 .3em; }

.access:hover,
.access:focus-visible { color: rgba(242, 240, 233, .98); }

.access:focus-visible { outline: 1px solid rgba(242, 240, 233, .72); outline-offset: .55rem; }

h1 {
  animation: enter 1000ms 170ms both cubic-bezier(.16, 1, .3, 1);
  font-size: clamp(1rem, 5.7vw, 7rem);
  font-weight: 700;
  left: clamp(2rem, 6vw, 7rem);
  letter-spacing: -.025em;
  line-height: 1;
  margin: 0;
  position: absolute;
  top: clamp(2.2rem, 6vw, 5.4rem);
  max-width: none;
  white-space: nowrap;
}

footer {
  bottom: clamp(1.3rem, 3vw, 2.6rem);
  left: clamp(2rem, 6vw, 7rem);
  position: absolute;
}

.copyright {
  bottom: clamp(1.3rem, 3vw, 2.6rem);
  color: rgba(242, 240, 233, .72);
  font-size: clamp(.82rem, 1.08vw, 1.18rem);
  font-weight: 700;
  letter-spacing: -.035em;
  line-height: .98;
  margin: 0;
  position: absolute;
  right: clamp(1.15rem, 3vw, 2.6rem);
}

.games-promo {
  animation: enter 900ms 310ms both cubic-bezier(.16, 1, .3, 1);
  bottom: calc(clamp(1.3rem, 3vw, 2.6rem) + clamp(2rem, 4.8vw, 3.8rem));
  color: rgba(242, 240, 233, .62);
  font-size: clamp(1rem, 1.45vw, 1.18rem);
  left: 50%;
  letter-spacing: -.018em;
  line-height: 1.38;
  position: absolute;
  text-align: center;
  translate: -50% 0;
  white-space: nowrap;
}

.games-promo p { margin: 0; }

.games-promo a {
  color: #800000;
  text-decoration: none;
}

.games-promo a:hover,
.games-promo a:focus-visible { color: #f2f0e9; }

.games-promo a:focus-visible {
  outline: 1px solid rgba(242, 240, 233, .72);
  outline-offset: .2rem;
}

@keyframes enter {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes background-drift {
  from { transform: scale(1.025) translate3d(-.35%, 0, 0); }
  to { transform: scale(1.055) translate3d(.35%, -.2%, 0); }
}

@media (max-width: 640px) {
  .background {
    background-position: center;
  }

  .hero { justify-content: flex-start; }

  h1 {
    left: 1.15rem;
    top: 2.2rem;
  }

  .games-promo {
    bottom: 4.5rem;
    color: rgba(242, 240, 233, .86);
    font-size: 14px;
    left: 50%;
    letter-spacing: -.018em;
    line-height: 1.36;
    scale: 1;
    white-space: normal;
    width: calc(100vw - 2.3rem);
  }

  footer { left: 1.15rem; }
  .copyright { bottom: 3.7rem; left: 1.15rem; right: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; }
}
