/* ============================================================
   LaptopChipLevel — Animations
   lcl-animations.css
   ============================================================ */

/* ── Keyframes ────────────────────────────────────────────── */

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

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

@keyframes lcl-glow-neon {
  0%, 100% { box-shadow: 0 0 20px rgba(0, 212, 255, 0.15); }
  50%       { box-shadow: 0 0 40px rgba(0, 212, 255, 0.35), 0 0 80px rgba(0, 212, 255, 0.1); }
}

@keyframes lcl-slide-up {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

@keyframes lcl-circuit-draw {
  from { stroke-dashoffset: 800; }
  to   { stroke-dashoffset: 0; }
}

@keyframes lcl-spin-slow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

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

@keyframes lcl-scan-line {
  0%   { top: -2px; }
  100% { top: 100%; }
}

@keyframes lcl-counter-count {
  from { opacity: 0; transform: translateY(15px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

/* ── Utility animation classes ────────────────────────────── */

.lcl-anim-float { animation: lcl-float 4s ease-in-out infinite; }
.lcl-anim-glow  { animation: lcl-glow-neon 3s ease-in-out infinite; }
.lcl-anim-spin-slow { animation: lcl-spin-slow 20s linear infinite; }

/* ── Scroll-reveal base ───────────────────────────────────── */

.lcl-reveal {
  opacity: 0;
  transform: translateY(25px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.lcl-reveal.lcl-revealed {
  opacity: 1;
  transform: translateY(0);
}

.lcl-reveal-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.lcl-reveal-left.lcl-revealed {
  opacity: 1;
  transform: translateX(0);
}

.lcl-reveal-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.lcl-reveal-right.lcl-revealed {
  opacity: 1;
  transform: translateX(0);
}

/* stagger delays for child elements */
.lcl-stagger > * { transition-delay: calc(var(--i, 0) * 0.12s); }

/* ── Hero animated circuit SVG ────────────────────────────── */

.lcl-circuit-svg-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.06;
}

.lcl-circuit-svg-bg path,
.lcl-circuit-svg-bg line,
.lcl-circuit-svg-bg polyline {
  stroke: var(--lcl-neon);
  stroke-width: 1.5;
  fill: none;
  stroke-dasharray: 800;
  stroke-dashoffset: 800;
  animation: lcl-circuit-draw 3s ease forwards;
}

.lcl-circuit-svg-bg path:nth-child(2) { animation-delay: 0.5s; }
.lcl-circuit-svg-bg path:nth-child(3) { animation-delay: 1s; }
.lcl-circuit-svg-bg circle {
  fill: var(--lcl-neon);
  opacity: 0;
  animation: lcl-fade-in 0.3s ease 2.5s forwards;
}

/* ── Page load entrance ───────────────────────────────────── */

.lcl-hero-content > * {
  opacity: 0;
  animation: lcl-slide-up 0.7s ease forwards;
}

.lcl-hero-content > *:nth-child(1) { animation-delay: 0.1s; }
.lcl-hero-content > *:nth-child(2) { animation-delay: 0.25s; }
.lcl-hero-content > *:nth-child(3) { animation-delay: 0.4s; }
.lcl-hero-content > *:nth-child(4) { animation-delay: 0.55s; }
.lcl-hero-content > *:nth-child(5) { animation-delay: 0.7s; }

.lcl-hero-image-wrap {
  opacity: 0;
  animation: lcl-scale-in 0.8s ease 0.3s forwards;
}

/* ── Timeline step animation ──────────────────────────────── */

.lcl-timeline-step {
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.lcl-timeline-step.lcl-active-step {
  opacity: 1;
  transform: translateX(0);
}

.lcl-timeline-step.lcl-active-step .lcl-timeline-dot {
  animation: lcl-glow-neon 2s ease-in-out infinite;
}

/* ── Gallery transition ───────────────────────────────────── */

.lcl-gallery-track { will-change: transform; }

/* ── Scan line effect on tech images ─────────────────────── */

.lcl-scan-effect {
  position: relative;
  overflow: hidden;
}

.lcl-scan-effect::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--lcl-neon), transparent);
  opacity: 0.3;
  animation: lcl-scan-line 4s linear infinite;
  pointer-events: none;
}

/* ── Gradient text shimmer ────────────────────────────────── */

.lcl-shimmer-text {
  background: linear-gradient(
    90deg,
    var(--lcl-white) 0%,
    var(--lcl-neon) 30%,
    var(--lcl-white) 60%,
    var(--lcl-neon) 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: lcl-shimmer 4s linear infinite;
}

/* ── Floating cards in hero ───────────────────────────────── */

.lcl-hero-float-card-1 { animation: lcl-float 5s ease-in-out 0.5s infinite; }
.lcl-hero-float-card-2 { animation: lcl-float 4s ease-in-out 1s infinite; }

/* ── Navbar scroll shadow ─────────────────────────────────── */

.lcl-navbar.lcl-nav-scrolled {
  box-shadow: 0 4px 30px rgba(0,0,0,0.5);
}

/* ── Button press effect ──────────────────────────────────── */

.lcl-btn-primary:active,
.lcl-btn-outline:active {
  transform: scale(0.97);
}

/* ── Quiz option bounce on select ────────────────────────── */

.lcl-quiz-option.selected {
  animation: lcl-scale-in 0.2s ease;
}

/* ── Counter animation ────────────────────────────────────── */

.lcl-counter-num.lcl-counting {
  animation: lcl-counter-count 0.4s ease;
}

/* ── Progress bars ────────────────────────────────────────── */

.lcl-quiz-progress-bar,
.lcl-complexity-bar,
.lcl-test-result-fill {
  will-change: width;
}
