/* ============================================================
   PT INDONESIA SMART SYSTEM
   animation.css — Animations & Effects
   ============================================================ */

/* ============================================================
   1. AOS CUSTOM OVERRIDES
   ============================================================ */
[data-aos] {
  transition-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

[data-aos="fade-up"] {
  transform: translateY(40px);
}

[data-aos="fade-down"] {
  transform: translateY(-40px);
}

[data-aos="slide-up"] {
  transform: translateY(60px);
  opacity: 0;
}

[data-aos="zoom-in-up"] {
  transform: scale(0.9) translateY(30px);
}

/* ============================================================
   2. KEYFRAME ANIMATIONS
   ============================================================ */

/* Floating */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-14px); }
}

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

/* Pulse Glow */
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(13,110,253,0.3); }
  50%       { box-shadow: 0 0 50px rgba(13,110,253,0.6), 0 0 80px rgba(0,184,217,0.2); }
}

@keyframes pulse-glow-orange {
  0%, 100% { box-shadow: 0 0 20px rgba(247,147,30,0.3); }
  50%       { box-shadow: 0 0 50px rgba(247,147,30,0.6); }
}

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

/* Rotate Slow */
@keyframes rotate-slow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Scale In */
@keyframes scale-in {
  from { transform: scale(0.8); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

/* Slide In Left */
@keyframes slide-in-left {
  from { transform: translateX(-60px); opacity: 0; }
  to   { transform: translateX(0);     opacity: 1; }
}

/* Slide In Right */
@keyframes slide-in-right {
  from { transform: translateX(60px); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

/* Gradient Shift */
@keyframes gradient-shift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Bounce subtle */
@keyframes bounce-subtle {
  0%, 100% { transform: translateY(0); }
  25%       { transform: translateY(-6px); }
  75%       { transform: translateY(-3px); }
}

/* Blink Cursor */
@keyframes blink-cursor {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* Draw Line */
@keyframes draw-line {
  from { width: 0; }
  to   { width: 100%; }
}

/* Count Up */
@keyframes count-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   3. ANIMATED ELEMENTS
   ============================================================ */

/* Hero Elements */
.animate-float {
  animation: float 4s ease-in-out infinite;
}

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

.animate-float-delay-1 {
  animation: float 4s ease-in-out infinite 1s;
}

.animate-float-delay-2 {
  animation: float 4s ease-in-out infinite 2s;
}

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

.animate-rotate-slow {
  animation: rotate-slow 20s linear infinite;
}

/* Shimmer Text */
.text-shimmer {
  background: linear-gradient(
    90deg,
    var(--color-accent) 0%,
    var(--color-white) 40%,
    var(--color-accent-light) 70%,
    var(--color-accent) 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s linear infinite;
}

/* Gradient Animated Background */
.bg-animated-gradient {
  background: linear-gradient(-45deg, #050E1A, #0B3C6D, #0D6EFD, #00B8D9);
  background-size: 400% 400%;
  animation: gradient-shift 8s ease infinite;
}

/* ============================================================
   4. HOVER MICRO-ANIMATIONS
   ============================================================ */

/* Icon Bounce on Hover */
.hover-bounce:hover .bi,
.hover-bounce:hover i {
  animation: bounce-subtle 0.5s ease;
}

/* Arrow Slide Right */
.hover-arrow .arrow-icon {
  transition: transform 0.25s ease;
}
.hover-arrow:hover .arrow-icon {
  transform: translateX(5px);
}

/* Scale on Hover */
.hover-scale {
  transition: transform 0.3s ease;
}
.hover-scale:hover {
  transform: scale(1.05);
}

/* Lift on Hover */
.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hover-lift:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(11,60,109,0.15);
}

/* Glow on Hover */
.hover-glow:hover {
  animation: pulse-glow 1.5s ease-in-out infinite;
}

/* ============================================================
   5. PARTICLE ANIMATIONS (CSS Fallback)
   ============================================================ */
.particle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  animation: particle-float linear infinite;
}

@keyframes particle-float {
  0%   { transform: translateY(0) rotate(0deg);   opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translateY(-100vh) rotate(720deg); opacity: 0; }
}

/* ============================================================
   6. SECTION ENTRANCE ANIMATIONS
   ============================================================ */

/* Staggered children */
.stagger-children > *:nth-child(1) { transition-delay: 0.05s; }
.stagger-children > *:nth-child(2) { transition-delay: 0.10s; }
.stagger-children > *:nth-child(3) { transition-delay: 0.15s; }
.stagger-children > *:nth-child(4) { transition-delay: 0.20s; }
.stagger-children > *:nth-child(5) { transition-delay: 0.25s; }
.stagger-children > *:nth-child(6) { transition-delay: 0.30s; }

/* Number counter animation trigger */
.counter-animated {
  animation: count-up 0.6s ease forwards;
}

/* ============================================================
   7. GRADIENT BORDER ANIMATION
   ============================================================ */
.gradient-border-animated {
  position: relative;
}

.gradient-border-animated::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(45deg,
    var(--color-secondary),
    var(--color-accent),
    var(--color-highlight),
    var(--color-cta),
    var(--color-secondary)
  );
  background-size: 300% 300%;
  z-index: -1;
  animation: gradient-shift 4s ease infinite;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gradient-border-animated:hover::before {
  opacity: 1;
}

/* ============================================================
   8. GLASSMORPHISM OVERLAYS
   ============================================================ */
.glass-panel {
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-xl, 1.5rem);
}

.glass-panel-dark {
  background: rgba(5, 14, 26, 0.7);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-xl, 1.5rem);
}

/* ============================================================
   9. LOADING STATES
   ============================================================ */
.skeleton {
  background: linear-gradient(90deg,
    var(--color-gray-200, #E2E8F0) 0%,
    var(--color-gray-100, #F1F5FF) 50%,
    var(--color-gray-200, #E2E8F0) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-md, 0.75rem);
}

/* ============================================================
   10. SWIPER CUSTOM STYLES
   ============================================================ */
.swiper-pagination-iss .swiper-pagination-bullet {
  width: 8px;
  height: 8px;
  background: var(--color-gray-300, #CBD5E1);
  opacity: 1;
  transition: all 0.3s ease;
}

.swiper-pagination-iss .swiper-pagination-bullet-active {
  width: 28px;
  border-radius: 4px;
  background: var(--color-secondary, #0D6EFD);
}

.swiper-button-iss {
  width: 48px;
  height: 48px;
  background: var(--color-white, #fff);
  border: 1px solid var(--color-gray-200, #E2E8F0);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary, #0B3C6D);
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(11,60,109,0.1);
}

.swiper-button-iss:hover {
  background: var(--color-secondary, #0D6EFD);
  color: var(--color-white, #fff);
  border-color: transparent;
  box-shadow: 0 8px 24px rgba(13,110,253,0.3);
}

/* ============================================================
   11. PAGE TRANSITION
   ============================================================ */
.page-transition-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-dark, #050E1A);
  z-index: 9998;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* ============================================================
   12. TYPED.JS CURSOR BLINK
   ============================================================ */
.typed-cursor {
  color: var(--color-accent, #00B8D9);
  font-weight: 300;
  animation: blink-cursor 0.7s step-start infinite;
}

/* ============================================================
   13. NUMBER HIGHLIGHT
   ============================================================ */
.highlight-number {
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum';
}
