/* ===================================================
   ROYAL CREST INTERIOR & CONSTRUCTION
   Animations Stylesheet
   =================================================== */

/* ===== KEYFRAMES ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(40px); }
  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 fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-12px); }
}

/* ===== HERO ANIMATIONS ===== */
.hero-label  { animation: fadeInLeft 0.9s ease 0.2s both; }
.hero h1     { animation: fadeInUp   1s ease 0.4s both; }
.hero-subtitle { animation: fadeInUp 1s ease 0.6s both; }
.hero-actions  { animation: fadeInUp 1s ease 0.8s both; }
.hero-dots     { animation: fadeIn   1s ease 1s both; }

/* ===== STATS ===== */
.stat-item {
  animation: fadeInUp 0.7s ease both;
}
.stat-item:nth-child(1) { animation-delay: 0.1s; }
.stat-item:nth-child(2) { animation-delay: 0.2s; }
.stat-item:nth-child(3) { animation-delay: 0.3s; }
.stat-item:nth-child(4) { animation-delay: 0.4s; }

/* ===== FLOATING BADGE ===== */
.why-badge { animation: floatY 4s ease infinite; }

/* ===== GOLD SHIMMER BUTTON ===== */
.btn-gold {
  background: linear-gradient(
    90deg,
    var(--gold) 0%,
    #e8c96d 45%,
    var(--gold) 55%,
    #b8913d 100%
  );
  background-size: 200% auto;
  animation: shimmer 3s linear infinite;
}

/* ===== NAV LOGO FLOAT ===== */
.nav-logo img {
  transition: filter 0.4s, height 0.4s, transform 0.3s;
}
.nav-logo:hover img { transform: scale(1.05); }

/* ===== CARD HOVER LIFT ===== */
.service-card,
.testimonial-card,
.value-card,
.contact-card {
  will-change: transform;
}

/* ===== PAGE TRANSITIONS ===== */
body {
  animation: fadeIn 0.5s ease;
}

/* ===== COUNTER ANIMATION ===== */
.stat-number { transition: color 0.5s; }

/* ===== PROCESS CONNECTOR LINE ANIMATION ===== */
.process-steps::before {
  background: linear-gradient(
    to right,
    var(--accent-color),
    var(--gold),
    var(--primary-color)
  );
  background-size: 200% 100%;
  animation: shimmer 4s linear infinite;
}

/* ===== LOADING PULSE ===== */
.loading-pulse {
  animation: pulse 1.5s ease infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}

/* ===== SCROLL PROGRESS BAR ===== */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  background: var(--gold);
  z-index: 9999;
  width: 0%;
  transition: width 0.1s linear;
}

/* ===== SECTION REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.reveal.from-left  { transform: translateX(-40px); }
.reveal.from-right { transform: translateX(40px); }
.reveal.scale-in   { transform: scale(0.93); }

.reveal.visible {
  opacity: 1;
  transform: translate(0) scale(1);
}

/* ===== RIPPLE EFFECT ===== */
.btn {
  position: relative;
  overflow: hidden;
}
.btn .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  transform: scale(0);
  animation: rippleAnim 0.6s linear;
  pointer-events: none;
}
@keyframes rippleAnim {
  to { transform: scale(4); opacity: 0; }
}

/* ===== HOVER UNDERLINE ANIMATE ===== */
.animated-link {
  position: relative;
  display: inline-block;
}
.animated-link::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 1.5px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}
.animated-link:hover::after { transform: scaleX(1); }