/* ============================================
   Animations & Visual Effects
   — Tailwind PostCSS pipeline 우회 (public/ 디렉토리)
   — 빌드 시 그대로 복사됨 (no tree-shaking)
   ============================================ */

/* ============================================
   Glassmorphism
   ============================================ */
.glass {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}

.glass:hover {
  border-color: var(--border-hover);
  box-shadow: 0 0 40px rgba(99, 102, 241, 0.06);
}

/* ============================================
     Animated Badge + Pulse Ring
     ============================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  background: var(--accent-glow);
  color: var(--accent-lighter);
  border: 1px solid rgba(99, 102, 241, 0.2);
  position: relative;
  overflow: hidden;
}

.badge .pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  position: relative;
}

.badge .pulse::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: var(--success);
  opacity: 0.4;
  animation: pulse-ring 2s ease-out infinite;
}

/* ============================================
     Hero Background — Animated Orbs
     ============================================ */
.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-bg .orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  animation: orb-float 20s ease-in-out infinite;
  will-change: transform;
}

.hero-bg .orb-1 {
  width: 500px;
  height: 500px;
  top: -10%;
  left: 20%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.5), transparent 70%);
  animation-delay: 0s;
}

.hero-bg .orb-2 {
  width: 400px;
  height: 400px;
  top: 30%;
  right: 10%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.4), transparent 70%);
  animation-delay: -7s;
  animation-duration: 25s;
}

.hero-bg .orb-3 {
  width: 350px;
  height: 350px;
  bottom: 0;
  left: 40%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.25), transparent 70%);
  animation-delay: -14s;
  animation-duration: 22s;
}

/* ============================================
     Hero Grid Overlay
     ============================================ */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 60% 50% at 50% 40%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 40%, black 20%, transparent 70%);
  pointer-events: none;
}

/* ============================================
     Hero Gradient Text + Shimmer
     ============================================ */
.hero-gradient-text {
  background: linear-gradient(135deg, #f1f5f9 0%, #c7d2fe 40%, #818cf8 70%, #a78bfa 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: text-shimmer 4s ease-in-out infinite alternate;
}

/* ============================================
     Hero Screenshot — Perspective
     ============================================ */
.hero-screenshot {
  position: relative;
  max-width: 1020px;
  margin: 0 auto;
  perspective: 1200px;
}

.hero-screenshot-inner {
  transform: rotateX(2deg);
  transition: transform 0.6s ease;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 80px rgba(99, 102, 241, 0.1), 0 30px 80px rgba(0, 0, 0, 0.6), inset 0 1px 0
    rgba(255, 255, 255, 0.05);
  will-change: transform;
}

.hero-screenshot:hover .hero-screenshot-inner {
  transform: rotateX(0);
}

.hero-screenshot::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 160px;
  background: linear-gradient(transparent, var(--bg-base));
  pointer-events: none;
}

/* ============================================
     Floating Indicators
     ============================================ */
.float-indicator {
  position: absolute;
  z-index: 3;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: rgba(17, 21, 32, 0.9);
  border: 1px solid var(--border-hover);
  backdrop-filter: blur(12px);
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  animation: float-bounce 6s ease-in-out infinite;
  will-change: transform;
}

.float-indicator .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.float-1 {
  top: 20%;
  left: -8%;
  animation-delay: 0s;
}

.float-2 {
  top: 40%;
  right: -6%;
  animation-delay: -2s;
}

.float-3 {
  bottom: 25%;
  left: 2%;
  animation-delay: -4s;
}

@media (max-width: 768px) {
  .float-indicator {
    display: none;
  }
}

/* ============================================
     Scroll Reveal Animations
     ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s
    cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Stagger delays for child elements */
.stagger > .reveal:nth-child(1) {
  transition-delay: 0ms;
}
.stagger > .reveal:nth-child(2) {
  transition-delay: 60ms;
}
.stagger > .reveal:nth-child(3) {
  transition-delay: 120ms;
}
.stagger > .reveal:nth-child(4) {
  transition-delay: 180ms;
}
.stagger > .reveal:nth-child(5) {
  transition-delay: 240ms;
}
.stagger > .reveal:nth-child(6) {
  transition-delay: 300ms;
}
.stagger > .reveal:nth-child(7) {
  transition-delay: 360ms;
}
.stagger > .reveal:nth-child(8) {
  transition-delay: 420ms;
}
.stagger > .reveal:nth-child(9) {
  transition-delay: 480ms;
}

/* Reveal from left / right */
.reveal-left {
  opacity: 0;
  transform: translateX(-32px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s
    cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-right {
  opacity: 0;
  transform: translateX(32px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s
    cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-left.visible,
.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* ============================================
     CTA Button Styles — shared across Hero, CTA, Navbar
     ============================================ */
.btn-cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius-sm);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 600;
  font-size: 15px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  box-shadow: 0 0 30px var(--accent-glow), 0 4px 16px rgba(0, 0, 0, 0.4);
  transition: all 0.25s ease;
  cursor: pointer;
  border: none;
}
.btn-cta-primary:hover {
  box-shadow: 0 0 50px var(--accent-glow-md), 0 8px 24px rgba(0, 0, 0, 0.5);
  transform: translateY(-2px);
}

.btn-cta-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius-sm);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 600;
  font-size: 15px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-2);
  border: 1px solid var(--border);
  transition: all 0.25s ease;
  cursor: pointer;
}
.btn-cta-ghost:hover {
  color: var(--text-1);
  border-color: var(--border-hover);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}

/* ============================================
   Keyframes
   ============================================ */
@keyframes pulse-ring {
  0% {
    transform: scale(1);
    opacity: 0.4;
  }
  100% {
    transform: scale(2.5);
    opacity: 0;
  }
}

@keyframes orb-float {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(30px, -40px) scale(1.05);
  }
  50% {
    transform: translate(-20px, 30px) scale(0.95);
  }
  75% {
    transform: translate(40px, 20px) scale(1.02);
  }
}

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

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

/* ============================================
   Noise Overlay (texture)
   ============================================ */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.025;
  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");
  background-repeat: repeat;
}

/* ============================================
   Stat Value — gradient text for TextStat
   ============================================ */
.stat-value {
  background: linear-gradient(135deg, var(--text-1), var(--accent-lighter));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800;
  line-height: 1;
}

/* Subtle pulse for text stats */
.animate-pulse-subtle {
  animation: pulse-subtle 2s ease-in-out infinite;
}
@keyframes pulse-subtle {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}
