/* ================================================================
   img2figma Design System
   Semantic tokens, animations, utilities, and component styles
   ================================================================ */

/* ── Color Tokens ─────────────────────────────────────────────── */
:root {
  /* Primary – Purple (creativity, innovation, AI) */
  --primary: 258 90% 66%;
  --primary-light: 258 90% 76%;
  --primary-dark: 258 90% 50%;

  /* Accent – Indigo (trust, technology) */
  --accent: 234 89% 74%;
  --accent-dark: 234 89% 58%;

  /* Secondary – Pink (energy, creativity) */
  --secondary: 330 81% 60%;
  --secondary-light: 330 81% 72%;

  /* Backgrounds */
  --bg-primary: #07070b;
  --bg-elevated: #0c0c12;
  --bg-card: #111118;
  --bg-card-hover: #16161f;
  --bg-surface: #1a1a24;
  --bg-footer: #050508;

  /* Text */
  --text-primary: #eeeef2;
  --text-secondary: #9398a8;
  --text-muted: #5d6272;

  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.04);
  --border-default: rgba(255, 255, 255, 0.07);
  --border-hover: rgba(255, 255, 255, 0.14);
  --border-active: rgba(139, 92, 246, 0.35);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 48px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px hsl(258 90% 66% / 0.12);
  --shadow-glow-hover: 0 0 60px hsl(258 90% 66% / 0.22);

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 400ms;
}

/* ── Animations ───────────────────────────────────────────────── */

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

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(3deg); }
}

@keyframes float-reverse {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-16px) rotate(-3deg); }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px hsl(258 90% 66% / 0.12); }
  50% { box-shadow: 0 0 40px hsl(258 90% 66% / 0.28); }
}

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

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

@keyframes scale-in {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

@keyframes arrow-bounce {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(8px); }
}

@keyframes glow-ring {
  0%, 100% {
    box-shadow: 0 0 20px hsl(258 90% 66% / 0.15), 0 0 48px hsl(258 90% 66% / 0.05);
  }
  50% {
    box-shadow: 0 0 32px hsl(258 90% 66% / 0.3), 0 0 72px hsl(258 90% 66% / 0.1);
  }
}

/* Pricing card glows */
@keyframes glow-cyan {
  0%, 100% { box-shadow: 0 0 20px rgba(6,182,212,.2), 0 0 48px rgba(6,182,212,.06); }
  50% { box-shadow: 0 0 36px rgba(6,182,212,.36), 0 0 72px rgba(6,182,212,.12); }
}
@keyframes glow-indigo {
  0%, 100% { box-shadow: 0 0 20px rgba(99,102,241,.24), 0 0 50px rgba(99,102,241,.08); }
  50% { box-shadow: 0 0 36px rgba(99,102,241,.42), 0 0 75px rgba(99,102,241,.14); }
}
@keyframes glow-purple {
  0%, 100% { box-shadow: 0 0 22px rgba(168,85,247,.26), 0 0 55px rgba(168,85,247,.08); }
  50% { box-shadow: 0 0 40px rgba(168,85,247,.45), 0 0 82px rgba(168,85,247,.16); }
}

/* Toast animations */
@keyframes toast-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes toast-out {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(12px); }
}

/* ── Utility Classes ──────────────────────────────────────────── */

.animate-gradient {
  background-size: 200% 200%;
  animation: gradient-shift 8s ease infinite;
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

.animate-float-reverse {
  animation: float-reverse 8s ease-in-out infinite;
}

.animate-glow {
  animation: pulse-glow 3s ease-in-out infinite;
}

.animate-glow-ring {
  animation: glow-ring 3s ease-in-out infinite;
}

.animate-glow-cyan { animation: glow-cyan 3s ease-in-out infinite; }
.animate-glow-indigo { animation: glow-indigo 3s ease-in-out infinite; }
.animate-glow-purple { animation: glow-purple 3s ease-in-out infinite; }

.arrow-bounce {
  animation: arrow-bounce 2s ease-in-out infinite;
}

/* Background patterns */
.grid-bg {
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.04) 1px, transparent 0);
  background-size: 40px 40px;
}

.grid-bg-sm {
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.03) 1px, transparent 0);
  background-size: 32px 32px;
}

/* Gradient text */
.gradient-text {
  background: linear-gradient(135deg, #a78bfa, #ec4899, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.shimmer-text {
  background: linear-gradient(90deg, #a855f7, #ec4899, #6366f1, #a855f7);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s linear infinite;
}

/* Glass card */
.glass-card {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.06) 0%,
    rgba(255, 255, 255, 0.015) 100%
  );
  border: 1px solid var(--border-default);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.glass-card-hover {
  transition: border-color var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out),
              transform var(--duration-normal) var(--ease-out);
}

.glass-card-hover:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

/* Strikethrough pricing */
.strike {
  position: relative;
  display: inline-block;
}
.strike::after {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  height: 2px;
  background: #f87171;
  transform: rotate(-7deg);
}

/* ── Entrance Animations ──────────────────────────────────────── */

.fade-in-up {
  animation: fade-in-up 0.6s var(--ease-out) both;
}

.fade-in {
  animation: fade-in 0.5s var(--ease-out) both;
}

.scale-in {
  animation: scale-in 0.5s var(--ease-out) both;
}

/* Stagger delays */
.delay-1 { animation-delay: 0.08s; }
.delay-2 { animation-delay: 0.16s; }
.delay-3 { animation-delay: 0.24s; }
.delay-4 { animation-delay: 0.32s; }
.delay-5 { animation-delay: 0.40s; }
.delay-6 { animation-delay: 0.48s; }

/* Logo grayscale */
.logo-grayscale {
  filter: grayscale(100%) brightness(0.6);
  opacity: 0.5;
  transition: all 0.4s var(--ease-out);
}
.logo-grayscale:hover {
  filter: grayscale(0%) brightness(1);
  opacity: 1;
}

/* Toast */
.toast-enter { animation: toast-in 0.32s ease forwards; }
.toast-exit { animation: toast-out 0.32s ease forwards; }

/* ── Focus States ─────────────────────────────────────────────── */

:focus-visible {
  outline: 2px solid hsl(var(--primary) / 0.6);
  outline-offset: 2px;
}

/* ── Scroll-triggered reveal (JS adds .is-visible) ────────────── */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ── Reduced Motion ───────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
