/* ============================================
   RENOVAPRO — Animation Styles
   ============================================ */

/* ============================================
   KEYFRAMES
   ============================================ */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes floatBadge {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  33%       { transform: translateY(-12px) rotate(2deg); }
  66%       { transform: translateY(6px) rotate(-1deg); }
}

@keyframes floatSlow {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-20px); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.05); opacity: 0.8; }
}

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

@keyframes scrollDot {
  0%   { transform: translateX(-50%) translateY(0); opacity: 1; }
  100% { transform: translateX(-50%) translateY(16px); opacity: 0; }
}

@keyframes rotateSlow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes morphBlob {
  0%, 100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
  50%       { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
}

@keyframes countUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutLeft {
  from { transform: translateX(0); opacity: 1; }
  to   { transform: translateX(-100%); opacity: 0; }
}

@keyframes progressBar {
  from { width: 0%; }
  to   { width: var(--target-width, 100%); }
}

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

@keyframes typewriter {
  from { width: 0; }
  to   { width: 100%; }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

@keyframes borderRotate {
  from { --angle: 0deg; }
  to   { --angle: 360deg; }
}

@keyframes wave {
  0%, 100% { transform: scaleY(1); }
  50%       { transform: scaleY(0.4); }
}

@keyframes ripple {
  0%   { transform: scale(0); opacity: 1; }
  100% { transform: scale(4); opacity: 0; }
}

@keyframes tilt3d {
  0%, 100% { transform: perspective(600px) rotateX(0deg) rotateY(0deg); }
  25%       { transform: perspective(600px) rotateX(3deg) rotateY(3deg); }
  50%       { transform: perspective(600px) rotateX(0deg) rotateY(0deg); }
  75%       { transform: perspective(600px) rotateX(-3deg) rotateY(-3deg); }
}

/* ============================================
   HERO SECTION ANIMATIONS
   ============================================ */
.hero-title-line {
  display: block;
  overflow: hidden;
}

.hero-title-line span {
  display: block;
  animation: fadeInUp 0.9s cubic-bezier(0.16,1,0.3,1) both;
}

.hero-title-line:nth-child(1) span { animation-delay: 0.5s; }
.hero-title-line:nth-child(2) span { animation-delay: 0.7s; }
.hero-title-line:nth-child(3) span { animation-delay: 0.9s; }

.hero-badge {
  animation: fadeInDown 0.7s 0.3s cubic-bezier(0.16,1,0.3,1) both;
}

.hero-subtitle {
  animation: fadeInUp 0.7s 1.1s cubic-bezier(0.16,1,0.3,1) both;
}

.hero-actions {
  animation: fadeInUp 0.7s 1.3s cubic-bezier(0.16,1,0.3,1) both;
}

.hero-stats {
  animation: fadeInUp 0.7s 1.5s cubic-bezier(0.16,1,0.3,1) both;
}

.hero-scroll {
  animation: fadeIn 1s 2s both;
}

/* ============================================
   SCROLL INDICATOR
   ============================================ */
.scroll-indicator {
  width: 28px;
  height: 44px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 14px;
  display: flex;
  justify-content: center;
  padding: 6px 0;
  margin: 0 auto var(--sp-2);
}

.scroll-dot {
  width: 4px;
  height: 8px;
  background: var(--primary);
  border-radius: 2px;
  animation: scrollDot 1.8s ease-in-out infinite;
}

/* ============================================
   FLOATING ELEMENTS
   ============================================ */
.float-1 { animation: float 6s ease-in-out infinite; }
.float-2 { animation: float 8s ease-in-out infinite 1s; }
.float-3 { animation: floatSlow 10s ease-in-out infinite 2s; }
.pulse    { animation: pulse 3s ease-in-out infinite; }
.rotate-slow { animation: rotateSlow 20s linear infinite; }
.morph-blob  { animation: morphBlob 8s ease-in-out infinite; }

/* ============================================
   SHIMMER EFFECT (loading / highlight)
   ============================================ */
.shimmer {
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255,255,255,0.4) 50%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: shimmer 2.5s linear infinite;
}

/* ============================================
   DECORATIVE SHAPES
   ============================================ */
.deco-circle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.deco-dot-grid {
  position: absolute;
  background-image: radial-gradient(circle, var(--primary) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.15;
  pointer-events: none;
}

.deco-line {
  position: absolute;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  pointer-events: none;
}

/* ============================================
   PARTICLE CANVAS (Three.js container)
   ============================================ */
#hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* ============================================
   SLIDE TRANSITION
   ============================================ */
.slide-enter  { animation: slideInRight 0.5s cubic-bezier(0.16,1,0.3,1) both; }
.slide-exit   { animation: slideOutLeft 0.5s cubic-bezier(0.16,1,0.3,1) both; }

/* ============================================
   TESTIMONIAL SLIDER
   ============================================ */
.slider-wrapper {
  position: relative;
  overflow: hidden;
}
.slider-track {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.16,1,0.3,1);
}
.slider-slide {
  min-width: 100%;
  padding: 0 var(--sp-2);
}
.slider-nav {
  display: flex;
  justify-content: center;
  gap: var(--sp-2);
  margin-top: var(--sp-8);
}
.slider-dot {
  width: 8px; height: 8px;
  border-radius: var(--r-full);
  background: var(--gray-300);
  cursor: none;
  transition: width var(--t-base), background var(--t-base);
}
.slider-dot.active { width: 28px; background: var(--primary); }
.slider-arrows {
  display: flex;
  gap: var(--sp-3);
  justify-content: center;
  margin-top: var(--sp-6);
}
.slider-arrow {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: var(--shadow-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  cursor: none;
  transition: background var(--t-base), transform var(--t-spring), box-shadow var(--t-base);
  color: var(--secondary);
  border: 2px solid var(--gray-200);
}
.slider-arrow:hover { background: var(--primary); color: var(--dark); transform: scale(1.1); box-shadow: var(--shadow-gold); border-color: var(--primary); }

/* ============================================
   PORTFOLIO FILTER
   ============================================ */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  justify-content: center;
  margin-bottom: var(--sp-10);
}
.filter-btn {
  padding: 8px 20px;
  border-radius: var(--r-full);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: none;
  transition: all var(--t-base);
  border: 2px solid var(--gray-200);
  background: var(--white);
  color: var(--gray-600);
}
.filter-btn:hover { border-color: var(--primary-light); color: var(--primary); background: rgba(201,168,76,0.05); }
.filter-btn.active { border-color: var(--primary); background: var(--primary); color: var(--dark); font-weight: 600; }

/* Portfolio grid */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-6);
}
.portfolio-grid .portfolio-card.large {
  grid-column: span 2;
}

/* Before/After Slider */
.before-after {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-xl);
  cursor: ew-resize;
  user-select: none;
}
.before-after img { width: 100%; height: 450px; object-fit: cover; display: block; }
.before-after .after-img {
  position: absolute;
  inset: 0;
  overflow: hidden;
  width: 50%;
}
.before-after .after-img img { width: 100%; min-width: 100%; }
.before-after-line {
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 4px;
  background: var(--white);
  transform: translateX(-50%);
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
}
.before-after-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px; height: 48px;
  background: var(--white);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  font-size: 18px;
  color: var(--secondary);
}
.before-after-label {
  position: absolute;
  top: var(--sp-4);
  font-size: var(--text-xs); font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase;
  background: rgba(0,0,0,0.5);
  color: var(--white);
  padding: 4px 12px;
  border-radius: var(--r-full);
}
.before-label { left: var(--sp-4); }
.after-label  { right: var(--sp-4); }

/* ============================================
   LIGHTBOX
   ============================================ */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t-base), visibility var(--t-base);
  backdrop-filter: blur(8px);
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  transform: scale(0.92);
  transition: transform var(--t-slow);
}
.lightbox.open .lightbox-content { transform: scale(1); }
.lightbox-content img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-2xl);
}
.lightbox-close {
  position: absolute;
  top: -48px; right: -8px;
  width: 40px; height: 40px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  font-size: 20px;
  cursor: none;
  transition: background var(--t-fast), transform var(--t-spring);
}
.lightbox-close:hover { background: var(--primary); color: var(--dark); transform: rotate(90deg) scale(1.1); }
.lightbox-caption {
  text-align: center;
  margin-top: var(--sp-4);
  color: rgba(255,255,255,0.7);
  font-size: var(--text-sm);
}
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: 0;
  width: calc(100% + 120px);
  left: -60px;
  justify-content: space-between;
  pointer-events: none;
}
.lightbox-nav button {
  pointer-events: all;
  width: 48px; height: 48px;
  background: rgba(255,255,255,0.12);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  font-size: 22px;
  cursor: none;
  transition: background var(--t-fast);
}
.lightbox-nav button:hover { background: var(--primary); color: var(--dark); }

/* ============================================
   TIMELINE (Process page)
   ============================================ */
.timeline {
  position: relative;
  padding-left: 80px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 27px;
  top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary), var(--primary-light), transparent);
}
.timeline-item {
  position: relative;
  padding-bottom: var(--sp-12);
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute;
  left: -80px;
  top: 4px;
  width: 56px; height: 56px;
  background: var(--secondary);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--primary);
  border: 3px solid var(--light);
  box-shadow: 0 0 0 4px var(--primary-glow);
  transition: transform var(--t-spring), background var(--t-base);
  z-index: 1;
}
.timeline-item:hover .timeline-dot { transform: scale(1.15); background: var(--primary); color: var(--dark); }
.timeline-content {
  background: var(--white);
  border-radius: var(--r-xl);
  padding: var(--sp-6) var(--sp-8);
  box-shadow: var(--shadow-md);
  border-left: 4px solid var(--primary);
  transition: box-shadow var(--t-base), transform var(--t-base);
}
.timeline-item:hover .timeline-content { box-shadow: var(--shadow-xl); transform: translateX(6px); }
.timeline-date {
  font-size: var(--text-xs); font-weight: 600;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--primary); margin-bottom: var(--sp-2);
}
.timeline-content h3 { font-size: var(--text-xl); color: var(--secondary); margin-bottom: var(--sp-2); }
.timeline-content p { font-size: var(--text-sm); color: var(--gray-500); line-height: 1.7; }

/* ============================================
   COUNTER ANIMATION
   ============================================ */
.counter-num {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--primary);
}

/* ============================================
   PROGRESS BARS
   ============================================ */
.progress-bar-wrap {
  margin-bottom: var(--sp-4);
}
.progress-bar-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: var(--sp-2);
}
.progress-bar-header span { font-size: var(--text-sm); font-weight: 500; color: var(--secondary); }
.progress-bar-header .percent { color: var(--primary); font-weight: 600; }
.progress-track {
  height: 6px;
  background: var(--gray-200);
  border-radius: var(--r-full);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-dark), var(--primary));
  border-radius: var(--r-full);
  width: 0%;
  transition: width 1.5s cubic-bezier(0.4,0,0.2,1);
}

/* ============================================
   GLASSMORPHISM COMPONENTS
   ============================================ */
.glass {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--r-xl);
}

.glass-dark {
  background: rgba(13,21,32,0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--r-xl);
}

/* ============================================
   3D HOVER EFFECT (via JS tilt)
   ============================================ */
[data-tilt] {
  transform-style: preserve-3d;
  will-change: transform;
}
[data-tilt] .tilt-inner {
  transform: translateZ(20px);
}

/* ============================================
   NOTIFICATION TOAST
   ============================================ */
.toast {
  position: fixed;
  bottom: var(--sp-6);
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--secondary);
  color: var(--white);
  padding: var(--sp-4) var(--sp-6);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-2xl);
  z-index: var(--z-toast);
  display: flex; align-items: center; gap: var(--sp-3);
  font-size: var(--text-sm);
  transition: transform var(--t-slow);
  border-left: 4px solid var(--primary);
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast-icon { font-size: 20px; }

/* ============================================
   HERO DECORATION ORBS
   ============================================ */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  animation: floatSlow 12s ease-in-out infinite;
}
.orb-1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(201,168,76,0.15) 0%, transparent 70%);
  top: -100px; right: -100px;
}
.orb-2 {
  width: 350px; height: 350px;
  background: radial-gradient(circle, rgba(44,62,106,0.4) 0%, transparent 70%);
  bottom: 0; left: -80px;
  animation-delay: 4s;
}
.orb-3 {
  width: 250px; height: 250px;
  background: radial-gradient(circle, rgba(201,168,76,0.08) 0%, transparent 70%);
  top: 40%; left: 40%;
  animation-delay: 8s;
}

/* ============================================
   PAGE TRANSITION OVERLAY
   ============================================ */
.page-transition {
  position: fixed;
  inset: 0;
  background: var(--dark);
  z-index: calc(var(--z-preloader) - 1);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.page-transition.active { opacity: 1; pointer-events: all; }
