:root {
  --bg-ink: #081014;
  --bg-shadow: #1d1811;
  --stone-dark: #1a1f1c;
  --stone-mid: #28302b;
  --stone-light: #3d463e;
  --moss: #4c6b47;
  --torch: #ffb85c;
  --ember: #ff7a2f;
  --glow-cyan: #4ad7db;
  --glow-gold: #f4c66a;
  --frame: #69533a;
  --frame-shadow: rgba(0, 0, 0, 0.52);
}

* {
  box-sizing: border-box;
}

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

body {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #05090b;
  color: #f2eee3;
  font-family: "Trebuchet MS", Verdana, sans-serif;
}

.wall-film {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: #05090b url("./assets/wall-frames-v2/frame-01.webp") center / cover no-repeat;
}

.wall-film img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  transform: translate(0.22%, 0.37%) scaleX(1.067);
  transform-origin: center;
  filter: brightness(1.3) saturate(1.14) contrast(1.02);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse at 50% 96%, rgba(64, 168, 160, 0.1), transparent 43%),
    radial-gradient(ellipse at center, transparent 62%, rgba(1, 3, 5, 0.16) 100%);
  pointer-events: none;
}

.shell {
  width: min(75.6vw, 1112px, calc(72vh * 16 / 9));
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: #05090b;
  box-shadow:
    0 0 0 1px rgba(176, 123, 63, 0.42),
    inset 0 0 18px rgba(0, 0, 0, 0.58);
  overflow: hidden;
}

.shell::before {
  display: none;
}

.shell::after {
  display: none;
}

canvas {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: none;
  aspect-ratio: 16 / 9;
  display: block;
  image-rendering: auto;
  border-radius: 0;
  border: 0;
  box-shadow: none;
  background: #05070c;
}

@keyframes torchFlicker {
  0% {
    opacity: 0.72;
    transform: scale(1) translateY(0);
  }
  100% {
    opacity: 1;
    transform: scale(1.015) translateY(-2px);
  }
}

@keyframes shellDrift {
  0% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(8px, 4px, 0);
  }
  100% {
    transform: translate3d(0, 0, 0);
  }
}

@keyframes shellPulse {
  0%,
  100% {
    opacity: 0.9;
  }
  50% {
    opacity: 1;
  }
}

@keyframes wallParallax {
  0% {
    transform: scale(1.025) translate3d(-0.35%, -0.2%, 0);
  }
  50% {
    transform: scale(1.04) translate3d(0.25%, 0.15%, 0);
  }
  100% {
    transform: scale(1.03) translate3d(0.45%, -0.1%, 0);
  }
}

@keyframes lanternBreathe {
  0% {
    opacity: 0.72;
    filter: saturate(0.9) brightness(0.9);
  }
  43% {
    opacity: 0.93;
    filter: saturate(1.08) brightness(1.03);
  }
  71% {
    opacity: 0.8;
    filter: saturate(0.98) brightness(0.94);
  }
  100% {
    opacity: 1;
    filter: saturate(1.12) brightness(1.08);
  }
}

@keyframes wallMist {
  0% {
    opacity: 0.58;
    background-position: center 12px, center -8px, center;
  }
  100% {
    opacity: 0.92;
    background-position: center -10px, center 10px, center;
  }
}

@keyframes lanternSway {
  0%, 52%, 78%, 100% {
    transform: rotate(0deg);
  }
  58% {
    transform: rotate(1.35deg);
  }
  63% {
    transform: rotate(-0.9deg);
  }
  68% {
    transform: rotate(0.5deg);
  }
  73% {
    transform: rotate(-0.2deg);
  }
}

@keyframes lanternGlow {
  0% {
    opacity: 0.7;
    transform: translate(-50%, -50%) scale(0.94);
  }
  47% {
    opacity: 0.98;
    transform: translate(-50%, -50%) scale(1.04);
  }
  72% {
    opacity: 0.82;
    transform: translate(-50%, -50%) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.07);
  }
}

@keyframes lanternFlame {
  0% {
    filter: drop-shadow(0 4px 3px rgba(0, 0, 0, 0.62)) brightness(0.94) saturate(0.96);
  }
  100% {
    filter: drop-shadow(0 4px 3px rgba(0, 0, 0, 0.62)) brightness(1.14) saturate(1.12);
  }
}
