:root {
  --text-width: 150px;
  --text-height: 120px;
  --text-x: 5px;
  --text-y: 42px;

  --text-width-after: 135px;
  --text-height-after: 108px;
  --text-x-after: 7px;
  --text-y-after: 42px;
}

body {
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.container {
  position: relative;
  width: 300px;
  height: 250px;
  overflow: hidden;
  background-color: #ffffff; /* Or whatever your background color should be */
}

#model-canvas {
  position: absolute;
  top: 50%;
  left: 60%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  z-index: 3;
}

/* Position your text and CTA elements appropriately */
.text {
  position: absolute;
  top: var(--text-y);
  left: var(--text-x);
  width: var(--text-width);
  height: var(--text-height);
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  transform-origin: center;
  animation: textTransform 4s ease-in-out infinite;
  z-index: 2;
}

.cta {
  position: absolute;
  bottom: 50px;
  left: 25%;
  transform: translateX(-50%);
  width: 30%;
  max-width: 100%;
  z-index: 4;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.cta:hover {
  transform: translateX(-50%) scale(1.05);
  filter: brightness(1.1);
}

/* You might consider adding this style for the background */
.background {
  position: absolute;
  top: -5px;
  left: -5px;
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  z-index: 1;
}

@keyframes textTransform {
  0%, 25% {
    width: var(--text-width);
    height: var(--text-height);
    top: var(--text-y);
    left: var(--text-x);
  }
  50%, 75% {
    width: var(--text-width-after);
    height: var(--text-height-after);
    top: var(--text-y-after);
    left: var(--text-x-after);
  }
  100% {
    width: calc(var(--text-width-after) * 1.0);
    height: calc(var(--text-height-after) * 1.0);
    top: var(--text-y-after);
    left: var(--text-x-after);
  }
}