/* ============================================
   RISE ON - Premium Animations
   ============================================ */

/* ---------- PARTICLE CANVAS ---------- */
#particleCanvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: opacity 1s ease;
}
#particleCanvas.active { opacity: 1; }

/* ---------- HERO ENTRANCE ANIMATIONS ---------- */
.anim-badge {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeSlideUp 0.8s cubic-bezier(0.22,1,0.36,1) 0.3s forwards;
}
.anim-title {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeSlideUp 0.9s cubic-bezier(0.22,1,0.36,1) 0.55s forwards;
}
.anim-subtitle {
  opacity: 0;
  transform: translateY(24px);
  animation: fadeSlideUp 0.9s cubic-bezier(0.22,1,0.36,1) 0.75s forwards;
}
.anim-buttons {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeSlideUp 0.8s cubic-bezier(0.22,1,0.36,1) 0.95s forwards;
}
.anim-stats {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeSlideUp 0.8s cubic-bezier(0.22,1,0.36,1) 1.15s forwards;
}

@keyframes fadeSlideUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- SCROLL REVEAL ---------- */
.reveal {
  opacity: 0;
  transform: translateY(48px);
  transition: opacity 0.75s cubic-bezier(0.22,1,0.36,1),
              transform 0.75s cubic-bezier(0.22,1,0.36,1);
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}
.reveal-left {
  opacity: 0;
  transform: translateX(-48px);
  transition: opacity 0.75s cubic-bezier(0.22,1,0.36,1),
              transform 0.75s cubic-bezier(0.22,1,0.36,1);
}
.reveal-left.revealed {
  opacity: 1;
  transform: translateX(0);
}
.reveal-right {
  opacity: 0;
  transform: translateX(48px);
  transition: opacity 0.75s cubic-bezier(0.22,1,0.36,1),
              transform 0.75s cubic-bezier(0.22,1,0.36,1);
}
.reveal-right.revealed {
  opacity: 1;
  transform: translateX(0);
}
.reveal-scale {
  opacity: 0;
  transform: scale(0.88);
  transition: opacity 0.7s cubic-bezier(0.22,1,0.36,1),
              transform 0.7s cubic-bezier(0.22,1,0.36,1);
}
.reveal-scale.revealed {
  opacity: 1;
  transform: scale(1);
}

/* ---------- STAGGER DELAYS ---------- */
.reveal-d1 { transition-delay: 0.05s; }
.reveal-d2 { transition-delay: 0.15s; }
.reveal-d3 { transition-delay: 0.25s; }
.reveal-d4 { transition-delay: 0.35s; }
.reveal-d5 { transition-delay: 0.45s; }
.reveal-d6 { transition-delay: 0.55s; }

/* ---------- FLOATING ANIMATION ---------- */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-10px); }
}
@keyframes floatSlow {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50%       { transform: translateY(-16px) rotate(2deg); }
}

/* ---------- SHIMMER (gold line sweep) ---------- */
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}
.shimmer-text {
  background: linear-gradient(90deg,
    var(--accent) 0%,
    var(--gold-light) 40%,
    var(--accent-light) 60%,
    var(--accent) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3.5s linear infinite;
}

/* ---------- PULSE RING ---------- */
@keyframes pulseRing {
  0%   { transform: scale(1);   opacity: 0.6; }
  100% { transform: scale(1.6); opacity: 0;   }
}
.pulse-btn {
  position: relative;
}
.pulse-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 2px solid var(--accent);
  animation: pulseRing 1.8s cubic-bezier(0.4,0,0.6,1) infinite;
  pointer-events: none;
}

/* ---------- GRADIENT BORDER CARD ---------- */
.glow-card {
  position: relative;
  border-radius: var(--radius-lg);
  background: var(--white);
}
.glow-card::before {
  content: '';
  position: absolute;
  inset: -1.5px;
  border-radius: calc(var(--radius-lg) + 2px);
  background: linear-gradient(135deg, var(--accent), var(--primary), var(--gold));
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -1;
}
.glow-card:hover::before { opacity: 1; }

/* ---------- LINE DRAW (section divider) ---------- */
.line-draw {
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  transition: width 1.2s cubic-bezier(0.22,1,0.36,1);
  border-radius: 2px;
}
.line-draw.active { width: 64px; }

/* ---------- TYPING CURSOR ---------- */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}
.cursor {
  display: inline-block;
  width: 3px;
  height: 1em;
  background: var(--accent-light);
  vertical-align: middle;
  margin-left: 4px;
  animation: blink 1s step-end infinite;
}

/* ---------- HERO IMAGE PARALLAX ---------- */
/* (style.css에서 통합 처리) */

/* ---------- NUMBER COUNTER GLOW ---------- */
.number-count {
  transition: text-shadow 0.3s ease;
}
.number-count.counting {
  text-shadow: 0 0 24px rgba(74,154,186,0.6), 0 0 48px rgba(74,154,186,0.3);
}

/* ---------- CARD 3D TILT ---------- */
.tilt-card {
  transform-style: preserve-3d;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* ---------- SCROLL PROGRESS BAR ---------- */
#progressBar {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--gold-light), var(--accent-light));
  z-index: 9999;
  transition: width 0.1s linear;
  box-shadow: 0 0 8px rgba(74,154,186,0.6);
}

/* ---------- NAV ACTIVE INDICATOR ---------- */
.nav-link.active {
  color: var(--white) !important;
  background: rgba(74,154,186,0.2);
}
#header.scrolled .nav-link.active {
  color: var(--accent) !important;
  background: rgba(74,154,186,0.1);
}

/* ---------- SECTION LABEL ANIMATED LINE ---------- */
.section-label-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.section-label-wrap .label-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
  max-width: 60px;
}

/* ---------- BACKGROUND GRID PATTERN ---------- */
.bg-grid {
  background-image:
    linear-gradient(rgba(74,154,186,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74,154,186,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* ---------- GLASSMORPHISM ---------- */
.glass {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.15);
}

/* ---------- GRADIENT TEXT ---------- */
.grad-text {
  background: linear-gradient(135deg, var(--accent), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---------- SERVICE CARD ICON HOVER ---------- */
.service-card:hover .service-icon-wrap i {
  animation: iconBounce 0.5s cubic-bezier(0.22,1,0.36,1);
}
@keyframes iconBounce {
  0%   { transform: scale(1);    }
  40%  { transform: scale(1.25); }
  70%  { transform: scale(0.92); }
  100% { transform: scale(1);    }
}

/* ---------- WHY CARD NUMBER FLOAT ---------- */
.why-card:hover .why-number {
  animation: floatSlow 2s ease-in-out infinite;
  color: rgba(255,255,255,0.12);
}

/* ---------- HERO SCROLL INDICATOR ---------- */
.hero-scroll {
  animation: scrollFade 2.5s ease-in-out infinite;
}
@keyframes scrollFade {
  0%, 100% { opacity: 0.4; transform: translateY(0); }
  50%       { opacity: 0.9; transform: translateY(6px); }
}

/* ---------- ABOUT SECTION IMAGE FLOAT ---------- */
.img-main { animation: floatSlow 6s ease-in-out infinite; }

/* ---------- CONTACT FORM FOCUS GLOW ---------- */
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  animation: inputGlow 0.3s ease forwards;
}
@keyframes inputGlow {
  to {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(74,154,186,0.15);
  }
}

/* ---------- FOOTER BRAND GLOW ---------- */
.footer-since {
  animation: pulseSince 3s ease-in-out infinite;
}
@keyframes pulseSince {
  0%, 100% { box-shadow: 0 0 0 0 rgba(74,154,186,0); }
  50%       { box-shadow: 0 0 16px 4px rgba(74,154,186,0.25); }
}

/* ---------- MOBILE ---------- */
@media (max-width: 768px) {
  .img-main { animation: none; }
  .hero-img { transform: scale(1); filter: brightness(0.65) saturate(0.85); }
}
