body {
  font-family: var(--font-primary);
  font-weight: var(--font-weight-light);
  color: var(--color-rose);
  background: var(--color-bg-base);
}

.chamber {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100svh;
  height: 100dvh;
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(
      180deg,
      var(--color-bg-hero-top) 0%,
      #4e0c0b 33%,
      var(--color-bg-hero-bottom) 70%,
      var(--color-bg-floor-top) 100%
    );
}

.scene-bg,
.scene-bg::before,
.scene-bg::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.scene-bg {
  z-index: 0;
  background:
    radial-gradient(120% 92% at 46% 64%, rgba(146, 23, 18, 0.38), transparent 60%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.18), transparent 24%, rgba(0, 0, 0, 0.14) 100%);
}

.scene-bg::before {
  content: "";
  opacity: 0.18;
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 104px 104px;
  mix-blend-mode: soft-light;
  mask-image: linear-gradient(180deg, black 0%, transparent 82%);
}

.scene-bg::after {
  content: "";
  background:
    linear-gradient(180deg, transparent 65%, rgba(40, 24, 13, 0.6) 100%),
    radial-gradient(120% 100% at 50% 50%, transparent 42%, rgba(0, 0, 0, 0.42) 100%);
}

.kicker {
  position: absolute;
  z-index: 70;
  top: calc(var(--safe-top) + 1.65vh);
  left: 50%;
  transform: translateX(-50%);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  padding: 0 18px;
  color: rgba(242, 210, 210, 0.72);
  font-size: clamp(0.68rem, 0.74vw, 0.9rem);
  letter-spacing: 0.48em;
  text-transform: uppercase;
  white-space: nowrap;
}

.stage-space {
  position: absolute;
  z-index: 10;
  left: 50%;
  top: 50%;
  width: max(100vw, 177.7778dvh);
  height: max(100dvh, 56.25vw);
  container-type: size;
  transform: translate(-50%, -50%);
  transform-origin: center;
}

.layer,
.eye,
.orbit-field,
.dust {
  position: absolute;
}

.layer {
  --layer-x: 0px;
  --layer-y: 0px;
  --character-x: 0px;
  --character-y: 0px;
  --anchor-transform: translate3d(0, 0, 0);
  z-index: 30;
  max-width: none;
  height: auto;
  user-select: none;
  pointer-events: none;
  transform: var(--anchor-transform) translate3d(
    calc(var(--layer-x) + var(--character-x)),
    calc(var(--layer-y) + var(--character-y)),
    0
  );
  transform-origin: var(--origin-x, 50%) var(--origin-y, 50%);
  will-change: transform;
}

.layer-astronaut {
  z-index: 47;
}

.layer-sage {
  z-index: 47;
}

.layer-table {
  z-index: 46;
}

.brand-mark {
  position: absolute;
  z-index: 68;
  top: 17.65vh;
  left: 50%;
  width: clamp(22rem, 41.1vw, 49.5rem);
  height: auto;
  transform: translateX(-50%);
  color: var(--color-cream);
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 10px 14px rgba(32, 4, 3, 0.18));
}

.tagline {
  position: absolute;
  z-index: 69;
  top: calc(17.65vh + clamp(4.93rem, 9.22vw, 11.1rem) + clamp(0.75rem, 2vh, 2rem));
  left: auto;
  right: calc(50% - clamp(22rem, 41.1vw, 49.5rem) / 2);
  margin: 0;
  color: rgba(242, 210, 210, 0.82);
  font-size: clamp(0.95rem, 1.16vw, 1.35rem);
  line-height: 1.34;
  letter-spacing: 0;
  pointer-events: none;
  text-wrap: balance;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.ripple-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 200;
  pointer-events: none;
  user-select: none;
}

.loader {
  position: fixed;
  left: 50%;
  bottom: 14vh;
  transform: translateX(-50%);
  z-index: 260;
  width: min(220px, 50vw);
  pointer-events: none;
  user-select: none;
  opacity: 1;
  transition: opacity 500ms cubic-bezier(0.22, 1, 0.36, 1);
}

.loader.is-done {
  opacity: 0;
}

.loader-bar {
  width: 100%;
  height: 1px;
  background: rgba(240, 229, 193, 0.16);
  overflow: hidden;
}

.loader-fill {
  width: 0%;
  height: 100%;
  background: rgba(240, 229, 193, 0.9);
  transition: width 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-reduced-motion: reduce) {
  .loader,
  .loader-fill {
    transition-duration: 200ms;
  }
}

.cursor-moth {
  position: fixed;
  top: 0;
  left: 0;
  width: 36px;
  height: 36px;
  z-index: 210;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  opacity: 0;
  transition: opacity 220ms ease-out;
  will-change: transform;
  display: none;
}

.cursor-moth.is-visible {
  opacity: 1;
}

.cursor-shadow {
  position: fixed;
  top: 0;
  left: 0;
  width: 36px;
  height: 36px;
  z-index: 95;
  pointer-events: none;
  user-select: none;
  background-color: rgba(20, 5, 4, 0.42);
  -webkit-mask-image: url("../assets/cursor_moth.webp");
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-image: url("../assets/cursor_moth.webp");
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  filter: blur(14px);
  mix-blend-mode: multiply;
  opacity: 0;
  transition: opacity 220ms ease-out;
  will-change: transform;
  display: none;
}

.cursor-shadow.is-visible {
  opacity: 1;
}

@media (hover: hover) and (pointer: fine) {
  .cursor-moth,
  .cursor-shadow {
    display: block;
  }

  *,
  *::before,
  *::after {
    cursor: none !important;
  }
}

.mobile-note {
  display: none;
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 2.4vh);
  transform: translateX(-50%);
  z-index: 71;
  margin: 0;
  padding: 0 14px;
  color: rgba(242, 210, 210, 0.5);
  font-family: var(--font-primary);
  font-size: clamp(0.62rem, 2.6vw, 0.78rem);
  font-weight: var(--font-weight-light);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}

@media (max-aspect-ratio: 4 / 3) {
  .brand-mark {
    width: min(86vw, 28rem);
  }

  .tagline {
    left: 50%;
    right: auto;
    width: min(86vw, 28rem);
    text-align: center;
    transform: translateX(-50%);
  }
}
