/* ============================================================
   Powercoms — Micro-interactions & Cursor
   ============================================================ */

/* ── Custom Cursor ──────────────────────────────────────────── */
/* Only shown on pointer devices */
@media (hover: hover) and (pointer: fine) {

  /* SVG arrow — hot-spot is the tip (top-left), no centering offset */
  .cursor-arrow {
    position: fixed;
    top: 0; left: 0;
    width: 32px; height: 38px;
    pointer-events: none;
    z-index: 10000;
    will-change: left, top;
    /* Smooth scale transitions for hover / click states */
    transition: transform 0.25s cubic-bezier(0.23, 1, 0.32, 1),
                opacity 0.25s ease;
    /* Slight drop-shadow so arrow reads on any background */
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.35));
  }

  /* Hovering interactive element — arrow scales up a touch */
  .cursor-arrow.is-hovering {
    transform: scale(1.18);
  }

  /* Click — arrow compresses */
  .cursor-arrow.is-clicking {
    transform: scale(0.88);
  }

  /* Lagging ring */
  .cursor-ring {
    position: fixed;
    top: 0; left: 0;
    width: 44px; height: 44px;
    border: 1.5px solid rgba(232, 90, 26, 0.5);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    will-change: left, top;
    transition: width  0.4s cubic-bezier(0.23, 1, 0.32, 1),
                height 0.4s cubic-bezier(0.23, 1, 0.32, 1),
                border-color 0.4s ease,
                opacity 0.4s ease;
  }

  /* On hover — ring expands into a softer halo */
  .cursor-ring.is-hovering {
    width: 58px;
    height: 58px;
    border-color: rgba(232, 90, 26, 0.28);
  }

  /* On click — ring pulses inward */
  .cursor-ring.is-clicking {
    width: 32px;
    height: 32px;
    border-color: rgba(232, 90, 26, 0.7);
  }
}

/* ── Nav Link Underline Slide ───────────────────────────────── */
.nav-links a {
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #E85A1A;
  border-radius: 2px;
  transition: width 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-links a:hover::after,
.nav-links a.nav-active::after {
  width: 100%;
}

/* ── Service Card Tilt ──────────────────────────────────────── */
.service-card {
  will-change: transform;
  transform-style: preserve-3d;
}

/* ── Magnetic Buttons ───────────────────────────────────────── */
.btn-primary,
.btn-outline {
  will-change: transform;
}

/* ── Hero Parallax ──────────────────────────────────────────── */
.hero-right video,
.hero-right img {
  will-change: transform;
}

/* ── Subtle orange glow on CTA button hover ─────────────────── */
.btn-primary {
  box-shadow: 0 0 0 0 rgba(232, 90, 26, 0);
  transition: background 0.2s, transform 0.15s,
              box-shadow 0.35s cubic-bezier(0.23, 1, 0.32, 1) !important;
}

.btn-primary:hover {
  box-shadow: 0 8px 32px rgba(232, 90, 26, 0.38) !important;
}

/* ── Service card link arrow nudge ─────────────────────────── */
.service-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: gap 0.25s cubic-bezier(0.23, 1, 0.32, 1),
              color 0.2s ease;
}

/* ── Credibility Click Popup ────────────────────────────────── */
.cred-popup {
  position: fixed;
  z-index: 500;
  /* width set by JS to POPUP_W — max 90vw safety */
  max-width: 90vw;
  background: #13181f;
  border: 1px solid rgba(255,255,255,0.1);
  border-top: 3px solid #E85A1A;
  padding: 2.25rem 2.5rem 2.5rem;
  box-shadow: 0 32px 80px rgba(0,0,0,0.7), 0 0 0 1px rgba(232,90,26,0.08);
  pointer-events: none;

  /* Hidden by default — use opacity+pointer-events, NOT visibility,
     so getBoundingClientRect still works after first render */
  opacity: 0;
  transform: translateY(14px) scale(0.97);
  transition: opacity 0.28s cubic-bezier(0.23,1,0.32,1),
              transform 0.28s cubic-bezier(0.23,1,0.32,1);
}
.cred-popup.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.cred-popup-kicker {
  font-size: 0.63rem; font-weight: 700;
  letter-spacing: 0.24em; text-transform: uppercase;
  color: #E85A1A; margin-bottom: 1rem;
  display: flex; align-items: center; gap: 0.6rem;
}
.cred-popup-kicker::before {
  content: '';
  display: inline-block; width: 20px; height: 1.5px;
  background: #E85A1A; flex-shrink: 0;
}
.cred-popup-title {
  font-family: 'Barlow Semi Condensed', sans-serif;
  font-size: 1.6rem; font-weight: 800;
  color: #fff; line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1.1rem;
}
.cred-popup-body {
  font-size: 0.9rem; line-height: 1.78;
  color: rgba(255,255,255,0.58);
  margin-bottom: 1.4rem;
}
.cred-popup-points {
  list-style: none;
  display: flex; flex-direction: column; gap: 0.6rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 1.25rem;
}
.cred-popup-points li {
  font-size: 0.84rem; color: rgba(255,255,255,0.55);
  padding-left: 1.1rem; position: relative; line-height: 1.5;
}
.cred-popup-points li::before {
  content: '';
  position: absolute; left: 0; top: 0.55em;
  width: 6px; height: 1.5px;
  background: #E85A1A;
}
.cred-popup-dismiss {
  margin-top: 1.5rem;
  font-size: 0.75rem; color: rgba(255,255,255,0.22);
  text-align: right; letter-spacing: 0.05em;
}

/* ── Image fade-in on load ──────────────────────────────────── */
.img-fade {
  opacity: 0;
  transition: opacity 0.55s ease;
}
.img-fade.loaded {
  opacity: 1;
}
