/* ═══════════════════════════════════════════
   Shah Rent A Car — Animations & Effects
   ═══════════════════════════════════════════ */

/* ── Particle Background ── */
.particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.3;
}

/* ── Loading Screen ── */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.preloader.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader__logo {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--gold-500), var(--gold-300));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-weight: 800;
  font-size: 1.75rem;
  color: var(--bg-primary);
  animation: preloader-pulse 1.5s ease-in-out infinite;
  margin-bottom: var(--space-xl);
}

@keyframes preloader-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(212, 160, 23, 0.4); }
  50% { transform: scale(1.05); box-shadow: 0 0 20px 10px rgba(212, 160, 23, 0); }
}

.preloader__bar {
  width: 120px;
  height: 2px;
  background: var(--border-subtle);
  border-radius: 2px;
  overflow: hidden;
}

.preloader__bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-500), var(--gold-300));
  border-radius: 2px;
  animation: preloader-fill 1.5s ease-in-out;
  width: 100%;
}

@keyframes preloader-fill {
  0% { width: 0; }
  100% { width: 100%; }
}

/* ── Ambient Glow ── */
.ambient-glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(80px);
  opacity: 0.08;
}

.ambient-glow--gold {
  background: var(--gold-400);
}

.ambient-glow--1 {
  width: 600px;
  height: 600px;
  top: -200px;
  right: -200px;
}

.ambient-glow--2 {
  width: 400px;
  height: 400px;
  bottom: -100px;
  left: -100px;
}

/* ── Scroll Progress ── */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg, var(--gold-500), var(--gold-300));
  z-index: 1001;
  transition: width 0.1s linear;
}

/* ── Count Up Animation ── */
.count-up {
  display: inline-block;
}

/* ── Smooth Image Reveal ── */
.image-reveal {
  position: relative;
  overflow: hidden;
}

.image-reveal::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--bg-primary);
  transform-origin: right;
  transition: transform 0.8s var(--ease-out);
}

.image-reveal.visible::after {
  transform: scaleX(0);
}

/* ── Hover Card Tilt ── */
.tilt-card {
  transform-style: preserve-3d;
  perspective: 1000px;
}

/* ── Line Animation ── */
.line-draw {
  position: relative;
}

.line-draw::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gold-400);
  transition: width var(--duration-normal) var(--ease-out);
}

.line-draw:hover::after {
  width: 100%;
}

/* ── Glassmorphism Card ── */
.glass-card {
  background: rgba(20, 20, 20, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
}

/* ── Number Counter ── */
.counter-section {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.counter-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.counter-item {
  text-align: center;
  padding: var(--space-2xl) var(--space-xl);
  position: relative;
}

.counter-item:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 25%;
  height: 50%;
  width: 1px;
  background: var(--border-subtle);
}

.counter-item__value {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--gold-400);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.counter-item__label {
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
}

@media (max-width: 768px) {
  .counter-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .counter-item:nth-child(2)::after {
    display: none;
  }

  .counter-item {
    border-bottom: 1px solid var(--border-subtle);
  }

  .counter-item:nth-last-child(-n+2) {
    border-bottom: none;
  }
}

@media (max-width: 480px) {
  .counter-grid {
    grid-template-columns: 1fr 1fr;
  }
}
