/* ==========================================================================
   Phase 3 — Cinematic Animation System
   ========================================================================== */

/* ──────────────────────────────────────────────────────────────────────────
   1. PRELOADER
   ────────────────────────────────────────────────────────────────────────── */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 9500;
  background: #0B0B0B;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
}

#preloader-logo-clip {
  overflow: hidden;
  line-height: 1;
}

#preloader-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2rem, 5vw, 4rem);
  letter-spacing: 0.22em;
  color: #FFFFFF;
  transform: translateY(110%); /* animated by GSAP */
  will-change: transform;
}

#preloader-logo span {
  color: #FF6A00;
}

#preloader-tagline {
  font-family: 'Inter', sans-serif;
  font-size: 0.625rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #9E9E9E;
  opacity: 0; /* animated by GSAP */
}

#preloader-bar-track {
  width: clamp(100px, 18vw, 180px);
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
}

#preloader-bar {
  position: absolute;
  inset: 0;
  width: 0%;
  background: #FF6A00;
  transform-origin: left center;
}

/* ──────────────────────────────────────────────────────────────────────────
   2. SCROLL PROGRESS BAR
   ────────────────────────────────────────────────────────────────────────── */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, #FF6A00, #ff9a4d);
  z-index: 9400;
  pointer-events: none;
  transform-origin: left center;
  will-change: width;
}

/* ──────────────────────────────────────────────────────────────────────────
   3. CUSTOM CURSOR (desktop only)
   ────────────────────────────────────────────────────────────────────────── */
#cursor-dot,
#cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9300;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  will-change: transform;
}

#cursor-dot {
  width: 5px;
  height: 5px;
  background: #FF6A00;
}

#cursor-ring {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 106, 0, 0.45);
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              height 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              background-color 0.35s ease,
              border-color 0.35s ease;
}

/* Hover state — enlarged ring */
body.cursor-hover #cursor-ring {
  width: 54px;
  height: 54px;
  border-color: #FF6A00;
  background-color: rgba(255, 106, 0, 0.07);
}

/* Project card state — even larger */
body.cursor-project #cursor-ring {
  width: 70px;
  height: 70px;
  border-color: rgba(255, 106, 0, 0.6);
  background-color: rgba(255, 106, 0, 0.05);
}

/* Hide on touch / pointer-less devices */
@media (hover: none) {
  #cursor-dot,
  #cursor-ring {
    display: none !important;
  }
}

/* ──────────────────────────────────────────────────────────────────────────
   4. SPLIT-TYPE — char reveal clip (applied by hero-animation.js)
   ────────────────────────────────────────────────────────────────────────── */
.char-wrap {
  overflow: hidden;
  display: inline-block;
  vertical-align: bottom;
  line-height: 1.05;
}

/* ──────────────────────────────────────────────────────────────────────────
   5. TESTIMONIALS SLIDER
   ────────────────────────────────────────────────────────────────────────── */
#testimonials-track {
  position: relative;
  min-height: 200px;
}

/* Individual testimonial articles inside the slider */
#testimonials-track article {
  width: 100%;
}

.testimonial-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  background: transparent;
  color: #9E9E9E;
  cursor: pointer;
  transition: border-color 0.25s ease,
              color 0.25s ease,
              background-color 0.25s ease;
}

.testimonial-nav-btn:hover {
  border-color: #FF6A00;
  color: #FF6A00;
  background-color: rgba(255, 106, 0, 0.06);
}

.testimonial-nav-btn:focus-visible {
  outline: 2px solid #FF6A00;
  outline-offset: 3px;
}

.testimonial-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.testimonial-dot.active,
.testimonial-dot:hover {
  background: #FF6A00;
}

.testimonial-dot.active {
  transform: scale(1.6);
}

/* ──────────────────────────────────────────────────────────────────────────
   6. WORKFLOW — animated connector line baseline
   ────────────────────────────────────────────────────────────────────────── */
.workflow-connector {
  transform-origin: left center;
}

/* ──────────────────────────────────────────────────────────────────────────
   7. REMOVED
   ────────────────────────────────────────────────────────────────────────── */

/* ──────────────────────────────────────────────────────────────────────────
   8. ACCESSIBILITY — prefers-reduced-motion
   ────────────────────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  /* Hide the preloader instantly */
  #preloader {
    display: none !important;
  }

  /* Disable transitions on the testimonial track */
  #testimonials-track article {
    transition: none !important;
  }

  /* Disable all CSS transitions */
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
