html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100vh;
  background: #111;
  overflow: hidden;
  font-family: "Inter", sans-serif;
  perspective: 1000px;
}

.container {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.name-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2em;
  position: relative;
}

.name-line {
  position: relative;
  font-size: clamp(4rem, 12vw, 10rem);
  color: #fff;
  text-transform: uppercase;
  white-space: nowrap;
  display: inline-block;
  letter-spacing: 0.1em;
  text-align: center;
  font-weight: 900;
  will-change: transform, opacity, font-family;
}

.name-line span {
  display: inline-block;
  will-change: transform, opacity, font-family;
  backface-visibility: hidden;
  transition: font-family 0.3s ease;
}

/* Cube effect styles (Stacked Dice) */
.pov {
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tray {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.die {
  width: 400px;
  height: 55px;
  padding-bottom: 9px;
  perspective: 999px;
  position: relative;
}

.cube {
  position: absolute;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}

.cube .face {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 60px;
  color: #fff;
  text-transform: uppercase;
  white-space: nowrap;
  font-weight: 900;
  backface-visibility: hidden;
}

/* SVG Skew animation styles */
.skew-svg {
  width: 100%;
  height: 100vh;
}

.left,
.right {
  transform-origin: center center;
}

/* Striped reveal styles */
.text-wrapper {
  position: relative;
  overflow: hidden;
}

.src-txt {
  visibility: hidden;
  position: absolute;
}

.top-txt {
  position: relative;
}

.top-txt > div {
  position: absolute;
  white-space: nowrap;
  font-weight: 900;
  font-size: inherit;
}

/* Clone floating styles */
.stage {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
}

.word {
  position: relative;
  background: #111;
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: 1.2;
  padding-top: 5px;
  box-shadow: 0px 0px 15px #111;
  color: #fff;
  text-transform: uppercase;
  text-align: center;
  font-weight: 900;
  white-space: nowrap;
  z-index: 10;
}

.clone {
  position: absolute;
  background: #111;
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: 1.2;
  padding-top: 5px;
  box-shadow: 0px 0px 15px #111;
  color: #fff;
  text-transform: uppercase;
  text-align: center;
  font-weight: 900;
  white-space: nowrap;
  opacity: 0.6;
  pointer-events: none;
}

.glow {
  text-shadow: 0 0 10px #fff, 0 0 20px #ff0080, 0 0 30px #ff0080,
    0 0 40px #ff0080;
}

.grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  /* fixed row height to prevent overlapping grid items during animations */
  grid-auto-rows: 220px;
  place-items: center;
  gap: 3rem;
  padding: 4rem;
}

.grid .name-line {
  font-size: clamp(1.8rem, 3.6vw, 3.5rem);
  opacity: 0.95;
  line-height: 1;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* SVG path animation styles */
.svg-anim-container {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  perspective: 1000px;
}

.svg-char {
  width: 500px;
  height: 500px;
}

.svg-char__path {
  stroke: none;
  stroke-width: 0;
}

.char-layer {
  position: absolute;
  inset: 0;
  display: block;
}

.char-layer .char {
  position: absolute;
  color: #fff;
  font-size: 16px;
  pointer-events: none;
  white-space: pre;
  font-weight: 900;
}
