/**
 * Tellr.in Visual Effects
 * Animations, gradients, glass, and motion utilities
 */

@keyframes tellr-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

@keyframes tellr-fade-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes tellr-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes tellr-shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes tellr-gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes tellr-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.tellr-animate {
  animation: tellr-fade-up var(--tellr-duration-slow) var(--tellr-ease-out) both;
}

.tellr-animate--delay-1 { animation-delay: 100ms; }
.tellr-animate--delay-2 { animation-delay: 200ms; }
.tellr-animate--delay-3 { animation-delay: 300ms; }
.tellr-animate--delay-4 { animation-delay: 400ms; }
.tellr-animate--delay-5 { animation-delay: 500ms; }

@media (prefers-reduced-motion: reduce) {
  .tellr-animate,
  .tellr-animate--delay-1,
  .tellr-animate--delay-2,
  .tellr-animate--delay-3,
  .tellr-animate--delay-4,
  .tellr-animate--delay-5 {
    animation: none;
  }

  .tellr-hero__badge-dot {
    animation: none;
  }
}

.tellr-text-gradient {
  background: linear-gradient(135deg, var(--tellr-foreground) 0%, var(--tellr-brand) 50%, oklch(0.6 0.15 280) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: tellr-gradient-shift 8s ease infinite;
}

.tellr-glass {
  background: oklch(from var(--tellr-background) l c h / 60%);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid oklch(from var(--tellr-border) l c h / 50%);
}

.tellr-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}

.tellr-orb--primary {
  width: 400px;
  height: 400px;
  background: oklch(0.55 0.2 250 / 28%);
  top: -100px;
  right: -100px;
}

.tellr-orb--secondary {
  width: 300px;
  height: 300px;
  background: oklch(0.62 0.17 280 / 22%);
  bottom: -50px;
  left: -50px;
}

.dark .tellr-orb--primary,
[data-theme="dark"] .tellr-orb--primary {
  background: oklch(0.55 0.18 250 / 20%);
}

.dark .tellr-orb--secondary,
[data-theme="dark"] .tellr-orb--secondary {
  background: oklch(0.6 0.15 280 / 15%);
}

.tellr-noise {
  position: absolute;
  inset: 0;
  opacity: 0.03;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

.dark .tellr-noise,
[data-theme="dark"] .tellr-noise {
  opacity: 0.05;
}

.tellr-card__shine {
  position: absolute;
  inset: 0;
  background: var(--tellr-gradient-card-shine);
  opacity: 0;
  transition: opacity var(--tellr-duration-normal) var(--tellr-ease-out);
  pointer-events: none;
}

.tellr-card:hover .tellr-card__shine {
  opacity: 1;
}

.tellr-skeleton {
  background: linear-gradient(
    90deg,
    var(--tellr-muted) 25%,
    oklch(from var(--tellr-muted) calc(l + 0.03) c h) 50%,
    var(--tellr-muted) 75%
  );
  background-size: 200% 100%;
  animation: tellr-shimmer 1.5s infinite;
  border-radius: var(--tellr-radius-md);
}

.tellr-divider {
  height: 1px;
  border: none;
  background: var(--tellr-gradient-border);
  margin-block: var(--tellr-space-8);
}

:focus-visible {
  outline: 2px solid var(--tellr-ring);
  outline-offset: 2px;
}

::selection {
  background: var(--tellr-brand-muted);
  color: var(--tellr-foreground);
}
