.fancy-word {
  display: inline-block;
  filter: drop-shadow(0 0 4px #000);
  font-weight: 800;
  line-height: 1;
  font-family:
    "Segoe UI",
    Roboto,
    system-ui,
    -apple-system,
    "Helvetica Neue",
    Arial,
    sans-serif;
  margin: 0;
  text-transform: uppercase;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.fancy-word span {
  display: inline-block;
  --r: 0deg; /* per-letter rotation variable */
  transform: rotate(var(--r));
  transition:
    transform 330ms cubic-bezier(0.2, 0.9, 0.2, 1),
    filter 220ms ease,
    text-shadow 220ms ease;
  will-change: transform;
}

/* Color + rotation pattern repeated every 6 letters */
.fancy-word span:nth-child(6n + 1) {
  /* Strawberry (Red) */
  color: #ff3b3b;
  --r: -8deg;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.03);
}
.fancy-word span:nth-child(6n + 2) {
  /* Blueberry (Blue) - moved to separate red/orange */
  color: #4da6ff;
  --r: 6deg;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.03);
}
.fancy-word span:nth-child(6n + 3) {
  /* Orange (Orange) */
  color: #ff7a00;
  --r: -4deg;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.03);
}
.fancy-word span:nth-child(6n + 4) {
  /* Grape (Purple) */
  color: #b84dff;
  --r: 5deg;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.03);
}
.fancy-word span:nth-child(6n + 5) {
  /* Banana (Yellow) */
  color: #ffd800;
  --r: -6deg;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.03);
}
.fancy-word span:nth-child(6n + 6) {
  /* Lime (Green) */
  color: #b7ff4d;
  --r: 7deg;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.03);
}

/* Slight variation for smaller screens */
@media (max-width: 640px) {
  :root {
    --fancy-size: 3.2rem;
  }
}
