:root {
  --morado: #4a3ca9;
  --marino: #213567;
  --dorado: #efb33f;
  --turquesa: #5ac2b9;
  --carmin: #d54151;
  --rosa: #e85a9b;
  --naranja: #f07828;
  --azul: #3b82f6;
  --hueso: #f8f6f0;
  --font-sans: "DM Sans", system-ui, sans-serif;
  --font-display: "Fraunces", Georgia, serif;
  --font-brand: "Nunito", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body.work {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--marino);
  font-family: var(--font-sans);
  background:
    radial-gradient(900px 520px at 12% 18%, rgba(90, 194, 185, 0.22), transparent 55%),
    radial-gradient(820px 480px at 88% 22%, rgba(213, 65, 81, 0.14), transparent 52%),
    radial-gradient(700px 420px at 50% 100%, rgba(239, 179, 63, 0.2), transparent 48%),
    linear-gradient(180deg, #fffdf9 0%, var(--hueso) 48%, #efe8dc 100%);
}

.work__stage {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 999px;
  filter: blur(48px);
  opacity: 0.38;
  animation: float 12s ease-in-out infinite;
}

.blob--1 {
  width: 28vmax;
  height: 28vmax;
  left: -8vmax;
  top: 10vh;
  background: var(--turquesa);
  animation-duration: 14s;
}

.blob--2 {
  width: 22vmax;
  height: 22vmax;
  right: -6vmax;
  top: 18vh;
  background: var(--carmin);
  animation-duration: 11s;
  animation-delay: -2s;
}

.blob--3 {
  width: 18vmax;
  height: 18vmax;
  left: 18vw;
  bottom: -4vmax;
  background: var(--dorado);
  animation-duration: 13s;
  animation-delay: -4s;
}

.blob--4 {
  width: 14vmax;
  height: 14vmax;
  right: 18vw;
  bottom: 8vh;
  background: var(--rosa);
  animation-duration: 10s;
  animation-delay: -1s;
}

.blob--5 {
  width: 12vmax;
  height: 12vmax;
  left: 42vw;
  top: 8vh;
  background: var(--azul);
  opacity: 0.35;
  animation-duration: 16s;
  animation-delay: -6s;
}

.work__spark {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.work__main {
  position: relative;
  z-index: 2;
  width: min(40rem, calc(100% - 2.5rem));
  text-align: center;
  padding: 2rem 0 5.5rem;
}

.work__mark-wrap {
  position: relative;
  width: clamp(9rem, 30vw, 13.5rem);
  height: clamp(9rem, 30vw, 13.5rem);
  margin: 0 auto 1.75rem;
  display: grid;
  place-items: center;
  opacity: 0;
  animation: rise 0.9s ease forwards 0.15s;
}

.work__mark-wrap::before {
  content: "";
  position: absolute;
  inset: 8%;
  border-radius: 999px;
  background: #fff;
  box-shadow:
    0 18px 40px -22px rgba(33, 53, 103, 0.35),
    0 0 0 1px rgba(33, 53, 103, 0.06);
  z-index: 1;
}

.work__mark {
  position: relative;
  z-index: 2;
  width: 72%;
  height: 72%;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(33, 53, 103, 0.18));
  animation: bob 4.5s ease-in-out infinite;
}

.work__ring {
  position: absolute;
  inset: -12%;
  border-radius: 999px;
  border: 2px solid transparent;
  border-top-color: var(--dorado);
  border-right-color: var(--turquesa);
  animation: spin 8s linear infinite;
}

.work__ring--b {
  inset: -22%;
  border-top-color: var(--carmin);
  border-right-color: var(--naranja);
  border-bottom-color: transparent;
  border-left-color: transparent;
  animation-duration: 12s;
  animation-direction: reverse;
  opacity: 0.75;
}

.work__ring--c {
  inset: -32%;
  border-top-color: var(--azul);
  border-right-color: var(--rosa);
  animation-duration: 18s;
  opacity: 0.45;
}

.work__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.6rem, 9vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
}

.work__word {
  display: inline-block;
  opacity: 0;
  transform: translateY(1.1rem) rotate(-2deg);
  animation: pop 0.85s cubic-bezier(0.2, 0.9, 0.2, 1.15) forwards;
}

.work__word[data-delay="0"] {
  animation-delay: 0.45s;
}

.work__word[data-delay="1"] {
  animation-delay: 0.68s;
}

.work__word--accent {
  background: linear-gradient(105deg, var(--dorado), var(--turquesa) 45%, var(--carmin));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.work__lema {
  margin: 1.2rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3.2vw, 1.7rem);
  font-weight: 680;
  letter-spacing: -0.02em;
  color: var(--marino);
  opacity: 0;
  animation: rise 0.8s ease forwards 0.95s;
}

.work__lead {
  margin: 0.85rem auto 0;
  max-width: 28rem;
  color: #4a5a86;
  font-size: 1.05rem;
  line-height: 1.5;
  opacity: 0;
  animation: rise 0.8s ease forwards 1.1s;
}

.work__pulse {
  display: inline-flex;
  gap: 0.45rem;
  margin-top: 1.75rem;
  opacity: 0;
  animation: rise 0.8s ease forwards 1.25s;
}

.work__pulse span {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: var(--dorado);
  animation: blink 1.2s ease-in-out infinite;
}

.work__pulse span:nth-child(2) {
  background: var(--turquesa);
  animation-delay: 0.15s;
}

.work__pulse span:nth-child(3) {
  background: var(--carmin);
  animation-delay: 0.3s;
}

.work__marquee {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 3.1rem;
  z-index: 2;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.work__copy {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0.85rem;
  z-index: 3;
  margin: 0;
  text-align: center;
  font-family: var(--font-brand);
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: -0.01em;
  color: rgba(33, 53, 103, 0.62);
  opacity: 0;
  animation: rise 0.8s ease forwards 1.3s;
}

.work__track {
  display: flex;
  width: max-content;
  padding: 0.35rem 0;
  font-family: var(--font-brand);
  font-weight: 800;
  font-size: clamp(0.95rem, 2.4vw, 1.15rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(33, 53, 103, 0.45);
  animation: marquee 32s linear infinite;
}

.work__group {
  display: flex;
  flex-shrink: 0;
  gap: 1.5rem;
  padding-right: 1.5rem;
}

.work__group span:nth-child(3n) {
  color: #c48f12;
}

.work__group span:nth-child(3n + 1) {
  color: #2f9a90;
}

.work__group span:nth-child(3n + 2) {
  color: rgba(33, 53, 103, 0.55);
}

@keyframes float {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  33% {
    transform: translate3d(4vw, -3vh, 0) scale(1.08);
  }
  66% {
    transform: translate3d(-3vw, 2vh, 0) scale(0.94);
  }
}

@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes pop {
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-0.55rem);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes blink {
  0%,
  100% {
    transform: scale(0.75);
    opacity: 0.45;
  }
  50% {
    transform: scale(1.15);
    opacity: 1;
  }
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

@media (max-width: 720px) {
  .work__main {
    padding-bottom: 6rem;
  }

  .blob {
    filter: blur(36px);
    opacity: 0.28;
  }
}

@media (prefers-reduced-motion: reduce) {
  .blob,
  .work__mark,
  .work__ring,
  .work__pulse span,
  .work__track {
    animation: none !important;
  }

  .work__mark-wrap,
  .work__word,
  .work__lema,
  .work__lead,
  .work__pulse,
  .work__copy {
    opacity: 1;
    transform: none;
    animation: none !important;
  }
}
