:root {
  color-scheme: only light;
  --bg: #0c0a0a;
  --text: #f7f2ea;
  --hud-bg: rgba(10, 8, 8, 0.55);
  --hud-border: rgba(247, 242, 234, 0.18);
  --shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
  --fade-duration: 420ms;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Baskerville", "Palatino", "Book Antiqua", "Times New Roman", serif;
  overflow: hidden;
}

body {
  touch-action: none;
  cursor: none;
}

.stage {
  position: relative;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(1200px 800px at 20% 20%, rgba(255, 255, 255, 0.08), transparent 60%),
    radial-gradient(900px 600px at 80% 10%, rgba(255, 255, 255, 0.05), transparent 55%),
    linear-gradient(130deg, #0b0a0a 0%, #141010 45%, #1b1414 100%);
  display: grid;
  place-items: center;
  user-select: none;
}

.stack {
  position: absolute;
  inset: 0;
  overflow: hidden;
  transform: translateZ(0);
}

.frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity var(--fade-duration) ease;
  will-change: opacity, filter;
}

.frame.is-current {
  opacity: 1;
}

.frame.is-liquify {
  filter: url(#liquify);
}

.filters {
  position: absolute;
  width: 0;
  height: 0;
  pointer-events: none;
}

.cursor {
  position: fixed;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.95);
  box-shadow:
    0 0 18px rgba(255, 255, 255, 0.6),
    0 0 40px rgba(255, 255, 255, 0.35),
    inset 0 0 10px rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 200ms ease;
  mix-blend-mode: screen;
  z-index: 5;
}

body.is-pointer-active .cursor {
  opacity: 1;
}

@media (pointer: coarse) {
  body {
    cursor: auto;
  }

  .cursor {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --fade-duration: 200ms;
  }
}
