
/* ==========================================================================
   SPRYQ — animations.css
   Responsive animations, scroll reveals and premium marquee.
   Desktop / Tablet / Mobile optimized.
   ========================================================================== */


/* ==========================================================================
   KEYFRAMES
   ========================================================================== */

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(253, 77, 18, 0.45);
  }

  70% {
    box-shadow: 0 0 0 10px rgba(253, 77, 18, 0);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}


/* ==========================================================================
   SCROLL REVEALS
   ========================================================================== */

.motion [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
}

.motion [data-reveal-media] {
  clip-path: inset(10% 6% 0 6% round var(--r-xl));
}

.motion [data-reveal-media] img {
  transform: scale(1.12);
}

.motion .work-card {
  opacity: 0;
  transform: translateY(48px);
}

.motion .hero__title { visibility: hidden; }
.motion .hero__title.is-split { visibility: visible; }
.motion .h3d__bob { opacity: 0; }

.motion .hero__meta,
.motion .hero__foot {
  opacity: 0;
  transform: translateY(20px);
}

.motion .split-line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.06em;
  margin-bottom: -0.06em;
}

.motion .split-line > span {
  display: inline-block;
  transform: translateY(105%);
}


/* Revealed states */

.is-revealed[data-reveal],
.is-revealed.work-card {
  opacity: 1 !important;
  transform: none !important;
}

.is-revealed[data-reveal-media] {
  clip-path: none !important;
}

.is-revealed[data-reveal-media] img {
  transform: none !important;
}

html.reveal-all [data-reveal],
html.reveal-all .work-card,
html.reveal-all .hero__meta,
html.reveal-all .hero__foot,
html.reveal-all .h3d__bob,
html.reveal-all .hero__title .ch {
  opacity: 1;
  transform: none;
}

html.reveal-all [data-reveal-media] {
  clip-path: none;
}

html.reveal-all .hero__title { visibility: visible; }

html.reveal-all [data-reveal-media] img,
html.reveal-all .hero__title .line > span,
html.reveal-all .split-line > span {
  transform: none;
}


/* ==========================================================================
   PREMIUM MARQUEE — BASE
   ========================================================================== */

.marquee {
  position: relative;
  overflow: hidden;
  white-space: nowrap;

  border-block: 1px solid var(--line);

  padding-block: clamp(14px, 1.6vw, 24px);

  perspective: 1000px;
  transform-style: preserve-3d;

  transition:
    background 0.5s ease,
    box-shadow 0.5s ease,
    transform 0.5s cubic-bezier(.2, .8, .2, 1);
}


/* Moving track */

.marquee__track {
  display: inline-flex;
  align-items: center;

  gap: 3rem;
  padding-right: 3rem;

  animation: marquee 38s linear infinite;

  transform-style: preserve-3d;
  will-change: transform;
}


/* Marquee typography */

.marquee__track span {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;

  gap: 3rem;

  font-size: clamp(1.4rem, 2.6vw, 2.8rem);
  font-weight: 650;
  letter-spacing: -0.04em;
  text-transform: uppercase;

  transform: translateZ(0);

  transition:
    transform 0.5s cubic-bezier(.2, .8, .2, 1),
    color 0.4s ease,
    text-shadow 0.4s ease;
}


/* Orange separator */

.marquee__track span::after {
  content: '';

  width: 0.4em;
  height: 0.4em;

  flex-shrink: 0;
  border-radius: 50%;

  background: var(--accent);

  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);

  transition:
    transform 0.4s ease,
    box-shadow 0.4s ease;
}


/* ==========================================================================
   DESKTOP HOVER EFFECTS
   ========================================================================== */

@media (hover: hover) and (pointer: fine) {

  .marquee:hover {
    transform: perspective(1000px) rotateX(1.5deg);

    box-shadow:
      0 10px 25px rgba(0, 0, 0, 0.045),
      inset 0 1px 0 rgba(255, 255, 255, 0.1);
  }

  .marquee:hover .marquee__track span {
    transform: translateZ(12px) rotateY(-1.5deg);

    text-shadow:
      0 5px 12px rgba(0, 0, 0, 0.08);
  }

  .marquee:hover .marquee__track span::after {
    transform: scale(1.2);

    box-shadow:
      0 0 4px rgba(253, 77, 18, 0.25);
  }

  .marquee:hover::after {
    transform: translateX(100%);
  }
}


/* Never pause the animation */

.marquee:hover .marquee__track {
  animation-play-state: running;
}


/* Metallic shine */

.marquee::after {
  content: '';

  position: absolute;
  inset: 0;
  z-index: 2;

  pointer-events: none;

  background: linear-gradient(
    110deg,
    transparent 30%,
    rgba(255, 255, 255, 0.09) 48%,
    transparent 66%
  );

  transform: translateX(-100%);

  transition: transform 1s ease;
}


/* ==========================================================================
   TABLET RESPONSIVENESS
   ========================================================================== */

@media (max-width: 1024px) {

  .marquee {
    padding-block: 16px;
    perspective: 800px;
  }

  .marquee__track {
    gap: 2.2rem;
    padding-right: 2.2rem;

    animation-duration: 34s;
  }

  .marquee__track span {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    gap: 2.2rem;
  }

  .marquee__track span::after {
    width: 0.34em;
    height: 0.34em;
  }
}


/* ==========================================================================
   MOBILE RESPONSIVENESS
   ========================================================================== */

@media (max-width: 768px) {

  /* Scroll reveal adjustments */

  .motion [data-reveal] {
    transform: translateY(20px);
  }

  .motion .work-card {
    transform: translateY(30px);
  }

  .motion [data-reveal-media] {
    clip-path: inset(5% 3% 0 3% round var(--r-xl));
  }

  .motion [data-reveal-media] img {
    transform: scale(1.06);
  }

  .motion .hero__meta,
  .motion .hero__foot {
    transform: translateY(12px);
  }


  /* Marquee container */

  .marquee {
    padding-block: 14px;

    perspective: none;
    transform: none !important;

    box-shadow: none;
  }


  /* Faster and tighter marquee */

  .marquee__track {
    gap: 1.5rem;
    padding-right: 1.5rem;

    animation-duration: 30s;

    transform-style: flat;
  }


  /* Mobile text */

  .marquee__track span {
    font-size: clamp(1.25rem, 4vw, 1.8rem);

    gap: 1.5rem;

    letter-spacing: -0.035em;

    transform: none !important;
    text-shadow: none !important;
  }


  /* Smaller orange dots */

  .marquee__track span::after {
    width: 0.32em;
    height: 0.32em;

    box-shadow: none;

    transform: none !important;
  }


  /* Remove desktop shine on mobile */

  .marquee::after {
    display: none;
  }


  /* Never pause on touch devices */

  .marquee:hover .marquee__track {
    animation-play-state: running;
  }
}


/* ==========================================================================
   SMALL MOBILE DEVICES
   ========================================================================== */

@media (max-width: 480px) {

  .marquee {
    padding-block: 12px;
  }

  .marquee__track {
    gap: 1.1rem;
    padding-right: 1.1rem;

    animation-duration: 26s;
  }

  .marquee__track span {
    font-size: clamp(1.1rem, 4.5vw, 1.4rem);

    gap: 1.1rem;
    letter-spacing: -0.03em;
  }

  .marquee__track span::after {
    width: 0.3em;
    height: 0.3em;
  }

  .motion [data-reveal] {
    transform: translateY(16px);
  }

  .motion .work-card {
    transform: translateY(24px);
  }

  .motion .hero__meta,
  .motion .hero__foot {
    transform: translateY(10px);
  }
}


/* ==========================================================================
   EXTRA SMALL DEVICES
   ========================================================================== */

@media (max-width: 360px) {

  .marquee {
    padding-block: 10px;
  }

  .marquee__track {
    gap: 0.85rem;
    padding-right: 0.85rem;

    animation-duration: 24s;
  }

  .marquee__track span {
    font-size: 1rem;
    gap: 0.85rem;
  }
}


/* ==========================================================================
   REDUCED MOTION ACCESSIBILITY
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {

  html {
    scroll-behavior: auto !important;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .marquee,
  .marquee__track,
  .marquee__track span,
  .marquee__track span::after {
    transform: none !important;
  }

  .marquee__track {
    animation: none !important;
  }

  .marquee::after {
    display: none;
  }

  .stage-canvas {
    transition: none;
  }
}
