:root {
  --surface: #141312;
  --text: #fff;
  --text-secondary: #a8a8a8;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100svh;
  overflow: hidden;
  color: var(--text);
  background-color: var(--surface);
  background-image: url("/ritual/assets/mora-background-v1.webp");
  background-position: center;
  background-size: cover;
  font-family: "Inter Display", Inter, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  z-index: 2;
  inset: 0 0 auto;
  height: 145px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.62) 34.76%, transparent);
  content: "";
  pointer-events: none;
}

.header {
  position: fixed;
  z-index: 4;
  top: 0;
  left: 0;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: 20px 80px;
}

.brand {
  display: inline-flex;
  width: 112px;
  min-height: 40px;
  align-items: center;
}

.brand img {
  display: block;
  width: 100%;
  height: auto;
}

.login,
.ritual-action {
  min-height: 44px;
  border-radius: 8px;
  color: var(--text);
  font: 400 16px/24px "Inter Display", Inter, Arial, sans-serif;
  cursor: pointer;
  transition-property: transform, background-color, border-color, box-shadow;
  transition-duration: 250ms;
  transition-timing-function: var(--ease);
}

.login {
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: transparent;
  font-size: 14px;
}

.ritual-action {
  width: 216px;
  padding: 10px 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 9px rgba(201, 169, 110, 0.08);
}

.login:hover,
.login:focus-visible,
.ritual-action:hover,
.ritual-action:focus-visible {
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.12);
  outline: none;
}

.login:active,
.ritual-action:active {
  transform: scale(0.96);
}

.hero {
  position: relative;
  min-height: 100svh;
}

.card-snake {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.card-snake picture {
  display: contents;
}

.card-snake img {
  position: absolute;
  top: -256px;
  left: -110px;
  display: block;
  width: min(98.051vw, 1410px);
  height: auto;
  user-select: none;
}

.welcome-entering:not(.welcome-ready) .card-snake img,
.welcome-entering:not(.welcome-ready) .hero-copy {
  opacity: 0;
}

.welcome-entering:not(.welcome-ready) .card-snake img {
  filter: blur(50px);
  transform: translateX(-50px);
}

.welcome-entering.welcome-ready .card-snake img {
  animation: welcome-art-reveal 667ms var(--ease) both;
  will-change: transform, opacity, filter;
}

.welcome-entering.welcome-ready .hero-copy {
  animation: welcome-copy-reveal 500ms var(--ease) 667ms both;
  will-change: opacity;
}

@keyframes welcome-art-reveal {
  from {
    opacity: 0;
    filter: blur(50px);
    transform: translateX(-50px);
  }

  to {
    opacity: 1;
    filter: blur(0);
    transform: translateX(0);
  }
}

@keyframes welcome-copy-reveal {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.hero-copy {
  position: absolute;
  z-index: 3;
  top: 51.22%;
  left: 58.75%;
  display: flex;
  width: min(514px, 36vw);
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

.hero-copy h1 {
  margin: 0;
  font-family: "Spectral SC", Georgia, serif;
  font-size: clamp(42px, 3.43vw, 49.4px);
  font-weight: 500;
  line-height: 1.116;
  text-shadow: 0 2px 34px rgba(0, 0, 0, 0.82);
  text-wrap: balance;
}

.hero-copy p {
  width: min(435px, 100%);
  margin: -8px 0 0;
  color: var(--text-secondary);
  font-size: 20px;
  font-weight: 400;
  line-height: 28px;
  text-wrap: pretty;
}

@media (max-width: 900px) {
  body {
    overflow: hidden;
  }

  .header {
    position: relative;
    min-height: 80px;
    padding: 16px 24px;
  }

  .brand {
    width: 112px;
  }

  .login {
    height: 48px;
    min-height: 48px;
    padding: 12px 24px;
    font-size: 16px;
  }

  .hero {
    display: flex;
    min-height: calc(100svh - 80px);
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
  }

  .hero-copy {
    position: relative;
    top: auto;
    bottom: auto;
    left: auto;
    width: 100%;
    max-width: 354px;
  }

  .hero-copy h1 {
    font-size: clamp(36px, 12vw, 48px);
    line-height: 1.125;
  }

  .hero-copy p {
    width: 100%;
    margin-top: -8px;
    font-size: 20px;
    line-height: 28px;
  }

  .ritual-action {
    height: 48px;
    min-height: 48px;
  }

  .card-snake {
    display: none;
  }

  .welcome-entering.welcome-ready .hero-copy {
    animation-delay: 0ms;
  }

}

@media (prefers-reduced-motion: reduce) {
  .login,
  .ritual-action {
    transition-duration: 150ms;
  }

  .welcome-entering.welcome-ready .card-snake img,
  .welcome-entering.welcome-ready .hero-copy {
    animation-delay: 0ms;
    animation-duration: 300ms;
    animation-name: welcome-reduced-reveal;
    will-change: opacity;
  }

  @keyframes welcome-reduced-reveal {
    from {
      opacity: 0;
    }

    to {
      opacity: 1;
    }
  }

}
