/* ============================================================
   SacurryCraft.net - Animations & Effects
   ============================================================ */

/* ---------- Keyframes ---------- */
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(0.8); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(34,211,238,0.2); }
  50%      { box-shadow: 0 0 40px rgba(34,211,238,0.4), 0 0 80px rgba(34,211,238,0.15); }
}

@keyframes rotate-slow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes slide-up {
  from { transform: translateY(30px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

@keyframes slide-in-left {
  from { transform: translateX(-30px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

@keyframes slide-in-right {
  from { transform: translateX(30px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes scale-in {
  from { transform: scale(0.9); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

@keyframes border-flow {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes loader-fill {
  from { width: 0%; }
  to   { width: 100%; }
}

@keyframes particle-float {
  0%   { transform: translateY(0) translateX(0); opacity: 0.4; }
  25%  { transform: translateY(-25vh) translateX(10px); opacity: 0.6; }
  50%  { transform: translateY(-50vh) translateX(-5px); opacity: 0.4; }
  75%  { transform: translateY(-75vh) translateX(15px); opacity: 0.2; }
  100% { transform: translateY(-100vh) translateX(0); opacity: 0; }
}

@keyframes typing {
  from { width: 0; }
  to   { width: 100%; }
}

@keyframes blink-caret {
  from, to { border-color: transparent; }
  50% { border-color: var(--cyan); }
}

@keyframes ripple {
  0%   { transform: scale(0); opacity: 0.6; }
  100% { transform: scale(4); opacity: 0; }
}

@keyframes orbit {
  from { transform: rotate(0deg) translateX(120px) rotate(0deg); }
  to   { transform: rotate(360deg) translateX(120px) rotate(-360deg); }
}

@keyframes gradient-shift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ---------- Scroll Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.4,0,0.2,1), transform 0.6s cubic-bezier(0.4,0,0.2,1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-24px);
  transition: opacity 0.6s cubic-bezier(0.4,0,0.2,1), transform 0.6s cubic-bezier(0.4,0,0.2,1);
}
.reveal-left.visible { opacity: 1; transform: translateX(0); }

.reveal-right {
  opacity: 0;
  transform: translateX(24px);
  transition: opacity 0.6s cubic-bezier(0.4,0,0.2,1), transform 0.6s cubic-bezier(0.4,0,0.2,1);
}
.reveal-right.visible { opacity: 1; transform: translateX(0); }

.reveal-scale {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.5s cubic-bezier(0.4,0,0.2,1), transform 0.5s cubic-bezier(0.4,0,0.2,1);
}
.reveal-scale.visible { opacity: 1; transform: scale(1); }

/* Stagger delays */
.delay-1 { transition-delay: 0.05s; }
.delay-2 { transition-delay: 0.1s; }
.delay-3 { transition-delay: 0.15s; }
.delay-4 { transition-delay: 0.2s; }
.delay-5 { transition-delay: 0.25s; }
.delay-6 { transition-delay: 0.3s; }

/* ---------- Hero Entrance ---------- */
.hero-content > * {
  animation: slide-up 0.6s cubic-bezier(0.4,0,0.2,1) both;
}

.hero-content > *:nth-child(1) { animation-delay: 0.1s; }
.hero-content > *:nth-child(2) { animation-delay: 0.2s; }
.hero-content > *:nth-child(3) { animation-delay: 0.3s; }
.hero-content > *:nth-child(4) { animation-delay: 0.4s; }
.hero-content > *:nth-child(5) { animation-delay: 0.5s; }

/* ---------- Glow effects ---------- */
.glow-border {
  position: relative;
}

.glow-border::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--cyan), var(--purple), var(--cyan));
  background-size: 200% 200%;
  animation: border-flow 4s linear infinite;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s;
}

.glow-border:hover::before { opacity: 1; }

/* ---------- Particle Canvas ---------- */
#particle-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* ---------- Animated gradient text ---------- */
.gradient-text-animated {
  background: linear-gradient(90deg, var(--cyan), var(--purple), var(--cyan));
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s linear infinite;
}

/* ---------- Card hover glow ---------- */
.card-glow {
  position: relative;
}

.card-glow::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(ellipse at center, rgba(34,211,238,0.04) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.card-glow:hover::after { opacity: 1; }

/* ---------- Button ripple ---------- */
.btn-ripple {
  position: relative;
  overflow: hidden;
}

.btn-ripple::after {
  content: '';
  position: absolute;
  width: 100px; height: 100px;
  top: 50%; left: 50%;
  margin: -50px 0 0 -50px;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  transform: scale(0);
  opacity: 0;
}

.btn-ripple:active::after {
  animation: ripple 0.6s ease-out;
}

/* ---------- Smooth counter ---------- */
.counter-animate {
  display: inline-block;
  animation: slide-up 0.4s ease both;
}

/* ---------- Swirl background for CTA ---------- */
.swirl-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.swirl-bg::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  top: 50%; left: 50%;
  margin: -300px 0 0 -300px;
  background: conic-gradient(from 0deg, transparent 0%, rgba(34,211,238,0.06) 25%, transparent 50%, rgba(168,85,247,0.06) 75%, transparent 100%);
  border-radius: 50%;
  animation: rotate-slow 20s linear infinite;
}

.swirl-bg::after {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  top: 50%; left: 50%;
  margin: -200px 0 0 -200px;
  background: conic-gradient(from 180deg, transparent 0%, rgba(168,85,247,0.05) 25%, transparent 50%, rgba(34,211,238,0.05) 75%, transparent 100%);
  border-radius: 50%;
  animation: rotate-slow 15s linear infinite reverse;
}

/* ---------- Nav progress line ---------- */
.nav-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  background: var(--gradient-main);
  z-index: 1001;
  width: 0%;
  transition: width 0.1s linear;
}

/* ---------- Hover lift ---------- */
.hover-lift {
  transition: transform var(--transition), box-shadow var(--transition);
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.4);
}

/* ---------- Subtle float animation ---------- */
.float-animation {
  animation: float 4s ease-in-out infinite;
}

/* ---------- Typing effect ---------- */
.typing-text {
  overflow: hidden;
  white-space: nowrap;
  border-right: 2px solid var(--cyan);
  animation: typing 3s steps(30) forwards, blink-caret 0.75s step-end infinite;
}


/* ---------- Terminal cursor blink ---------- */
@keyframes terminal-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.terminal-body .terminal-line:last-child .t-dim {
  animation: terminal-blink 1s step-end infinite;
}

/* ---------- Marquee scroll ---------- */
@keyframes marquee-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ---------- Card entrance stagger (on page load) ---------- */
@keyframes card-enter {
  0% { opacity: 0; transform: translateY(20px) scale(0.97); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------- Glow orb ambient ---------- */
@keyframes orb-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -20px) scale(1.05); }
  50% { transform: translate(-20px, 20px) scale(0.95); }
  75% { transform: translate(15px, 10px) scale(1.02); }
}

/* ---------- Status bar pulse ---------- */
.status-bar .status-item.main::before {
  animation: pulse-dot 2s ease-in-out infinite;
}

/* ---------- Hero stat count-up entrance ---------- */
.hero-stat {
  animation: slide-up 0.6s cubic-bezier(0.4,0,0.2,1) both;
}

.hero-stat:nth-child(1) { animation-delay: 0.6s; }
.hero-stat:nth-child(2) { animation-delay: 0.7s; }
.hero-stat:nth-child(3) { animation-delay: 0.8s; }
.hero-stat:nth-child(4) { animation-delay: 0.9s; }

/* ---------- Roadmap item line connector pulse ---------- */
.roadmap-status.active {
  animation: glow-pulse 2.5s ease-in-out infinite;
}

/* ---------- Network card image subtle animation ---------- */
.network-card-img {
  transition: transform 0.4s ease;
}

.network-card:hover .network-card-img {
  transform: scale(1.05) translateY(-4px);
}

/* ---------- Button glow on hover ---------- */
.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--gradient-main);
  opacity: 0;
  filter: blur(16px);
  transition: opacity 0.3s;
  z-index: -1;
}

.btn-primary:hover::after {
  opacity: 0.4;
}

/* ---------- Featured pricing card shine ---------- */
.pricing-card.featured {
  position: relative;
  overflow: hidden;
}

.pricing-card.featured::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg, transparent 0%, rgba(34,211,238,0.03) 25%, transparent 50%);
  animation: rotate-slow 8s linear infinite;
  pointer-events: none;
}

/* ---------- Scroll-triggered parallax layers ---------- */
.hero-bg, .hero-grid {
  will-change: transform;
}

/* ---------- Terminal window glow ---------- */
.terminal-window {
  position: relative;
}

.terminal-window::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(34,211,238,0.1) 0%, rgba(168,85,247,0.05) 50%, rgba(34,211,238,0.1) 100%);
  z-index: -1;
  opacity: 0.5;
  filter: blur(1px);
}

/* ---------- Smooth page transitions ---------- */
body {
  animation: fade-in 0.3s ease both;
}

/* ---------- Interactive hover states ---------- */
.nav-links a::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at center, rgba(34,211,238,0.08) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.2s;
}

.nav-links a:hover::before { opacity: 1; }

/* ---------- Footer link hover underline ---------- */
.footer-col ul li a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 1px;
  background: var(--cyan);
  transition: width 0.3s;
}

.footer-col ul li a {
  position: relative;
  display: inline-block;
}

.footer-col ul li a:hover::after { width: 100%; }
