/* ==============================================
   Technology Globe — Animations
   ============================================== */

/* ── Keyframes ───────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes pulse-ring {
  0%   { transform: scale(0.8); opacity: 1; }
  100% { transform: scale(2); opacity: 0; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-12px); }
}
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}
@keyframes drawLine {
  from { stroke-dashoffset: 1000; }
  to   { stroke-dashoffset: 0; }
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}
@keyframes rotateSlow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes particleFloat {
  0%   { transform: translateY(0) translateX(0); opacity: 0.6; }
  25%  { transform: translateY(-20px) translateX(10px); opacity: 1; }
  50%  { transform: translateY(-10px) translateX(20px); opacity: 0.8; }
  75%  { transform: translateY(-30px) translateX(5px); opacity: 0.4; }
  100% { transform: translateY(-50px) translateX(15px); opacity: 0; }
}
@keyframes counterUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ── Scroll Reveal ───────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal.reveal-left {
  transform: translateX(-28px);
}
.reveal.reveal-right {
  transform: translateX(28px);
}
.reveal.reveal-scale {
  transform: scale(0.93);
}
.reveal.visible {
  opacity: 1;
  transform: none;
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* ── Hero Entrance ───────────────────────────── */
.hero-animate-1 {
  animation: fadeInUp 0.9s cubic-bezier(0.4, 0, 0.2, 1) both;
  animation-delay: 0.15s;
}
.hero-animate-2 {
  animation: fadeInUp 0.9s cubic-bezier(0.4, 0, 0.2, 1) both;
  animation-delay: 0.3s;
}
.hero-animate-3 {
  animation: fadeInUp 0.9s cubic-bezier(0.4, 0, 0.2, 1) both;
  animation-delay: 0.45s;
}
.hero-animate-4 {
  animation: fadeInUp 0.9s cubic-bezier(0.4, 0, 0.2, 1) both;
  animation-delay: 0.6s;
}
.hero-animate-5 {
  animation: fadeInUp 0.9s cubic-bezier(0.4, 0, 0.2, 1) both;
  animation-delay: 0.75s;
}
.hero-visual-animate {
  animation: fadeInRight 1s cubic-bezier(0.4, 0, 0.2, 1) both;
  animation-delay: 0.5s;
}

/* ── Float elements ──────────────────────────── */
.float-anim { animation: float 4s ease-in-out infinite; }
.float-anim-slow { animation: float 6s ease-in-out infinite; }
.float-anim-fast { animation: float 3s ease-in-out infinite; }
.float-delay-1 { animation-delay: -1s; }
.float-delay-2 { animation-delay: -2s; }
.float-delay-3 { animation-delay: -3s; }

/* ── Particle Canvas ─────────────────────────── */
#hero-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

/* ── Orbit ───────────────────────────────────── */
.orbit-container {
  position: relative;
  width: 380px;
  height: 380px;
  margin: 0 auto;
}
.orbit-core {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 80px; height: 80px;
  background: linear-gradient(135deg, #0a3d62, #1565c0);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-size: 1.75rem;
  z-index: 3;
  box-shadow: 0 0 40px rgba(0,180,216,0.4);
}
.orbit-ring {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(0,180,216,0.2);
}
.orbit-ring-1 { width: 160px; height: 160px; animation: rotateSlow 8s linear infinite; }
.orbit-ring-2 { width: 260px; height: 260px; animation: rotateSlow 14s linear infinite reverse; }
.orbit-ring-3 { width: 360px; height: 360px; animation: rotateSlow 22s linear infinite; }
.orbit-dot {
  position: absolute;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--color-accent);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}
.orbit-ring-1 .orbit-dot { top: 0; left: 50%; margin-top: -6px; }
.orbit-ring-2 .orbit-dot { top: 50%; left: 0; margin-left: -6px; background: var(--color-primary-light); }
.orbit-ring-3 .orbit-dot { top: 0; left: 50%; margin-top: -6px; background: rgba(0,180,216,0.7); }
.orbit-node {
  position: absolute;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(0,180,216,0.3);
  display: flex; align-items: center; justify-content: center;
  color: var(--color-accent);
  font-size: 1rem;
  backdrop-filter: blur(4px);
}

/* ── Typed text ──────────────────────────────── */
.typed-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--color-accent);
  margin-left: 2px;
  vertical-align: middle;
  animation: blink 1s step-end infinite;
}

/* ── Gradient Text ───────────────────────────── */
.gradient-text {
  background: linear-gradient(135deg, #00b4d8, #48cae4, #90e0ef);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 4s ease infinite;
}

/* ── Loading skeleton ────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}

/* ── Pulse dots ──────────────────────────────── */
.pulse-dot {
  position: relative;
  width: 10px; height: 10px;
  background: var(--color-success);
  border-radius: 50%;
  display: inline-block;
}
.pulse-dot::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: var(--color-success);
  opacity: 0.3;
  animation: pulse-ring 1.5s ease-out infinite;
}

/* ── Step line animation ─────────────────────── */
.step-line {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: drawLine 2s ease forwards;
}

/* ── Counter number animation ────────────────── */
.counter-wrap {
  animation: counterUp 0.6s ease both;
}

/* ── Hover lift ──────────────────────────────── */
.hover-lift { transition: transform 0.25s ease, box-shadow 0.25s ease; }
.hover-lift:hover { transform: translateY(-5px); box-shadow: 0 16px 40px rgba(0,0,0,0.12); }

/* ── Progress bar animation ──────────────────── */
.progress-bar-anim {
  height: 6px;
  border-radius: 100px;
  background: var(--color-border);
  overflow: hidden;
  margin-bottom: 0.5rem;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-accent), var(--color-primary-light));
  border-radius: 100px;
  width: 0;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Tab slide ───────────────────────────────── */
.tab-content-slide {
  animation: fadeInUp 0.4s ease both;
}

/* ── Quiz result bar ─────────────────────────── */
.result-bar {
  height: 8px;
  border-radius: 100px;
  background: rgba(255,255,255,0.1);
  margin-top: 1rem;
  overflow: hidden;
}
.result-fill {
  height: 100%;
  border-radius: 100px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-2));
  width: 0;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Background animated shapes ─────────────── */
.bg-shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.06;
  pointer-events: none;
}
.bg-shape-1 {
  width: 600px; height: 600px;
  background: var(--color-accent);
  animation: float 10s ease-in-out infinite;
}
.bg-shape-2 {
  width: 400px; height: 400px;
  background: var(--color-primary-light);
  animation: float 14s ease-in-out infinite reverse;
}

/* ── SVG Dividers ────────────────────────────── */
.divider-wave {
  display: block;
  width: 100%;
  overflow: hidden;
  line-height: 0;
}
.divider-wave svg { display: block; width: 100%; }

/* ── Micro hover effects ─────────────────────── */
.btn-primary, .btn-accent { position: relative; overflow: hidden; }
.btn-primary::after, .btn-accent::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background 0.2s ease;
}
.btn-primary:hover::after, .btn-accent:hover::after {
  background: rgba(255,255,255,0.08);
}

/* ── Tilt cards (JS-driven) ──────────────────── */
.tilt-card {
  transition: transform 0.3s ease;
  will-change: transform;
}

/* ── Page transitions ────────────────────────── */
.page-enter {
  animation: fadeInUp 0.5s ease both;
}

/* ── Smooth image load ───────────────────────── */
img {
  transition: opacity 0.3s ease;
}
img[loading="lazy"] {
  opacity: 0;
}
img.loaded {
  opacity: 1;
}
