/* ================================================================
   Ace Technologies — custom.css
   ================================================================ */

/* ============================================================
   NAV — color flip on scroll
   ============================================================ */
#siteNav {
  background: transparent;
  color: #f4f1ea;
  transition: background .35s, color .35s, box-shadow .35s, border-color .35s, backdrop-filter .35s, -webkit-backdrop-filter .35s;
}

#siteNav.scrolled {
  background: rgba(244, 241, 234, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(13, 13, 15, 0.06);
  box-shadow: 0 10px 40px rgba(13, 13, 15, 0.05);
  color: #0d0d0f;
}

#siteNav .nav-link {
  position: relative;
  color: inherit;
  transition: color .25s, opacity .25s;
}
#siteNav .nav-link:hover { color: #ff5a1f; }
#siteNav .nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: -6px;
  height: 2px; width: 0;
  background: #ff5a1f;
  transition: width .3s cubic-bezier(.3,.7,.3,1);
}
#siteNav .nav-link:hover::after { width: 100%; }

#siteNav .nav-cta {
  background: #f4f1ea;
  color: #0d0d0f;
}
#siteNav .nav-cta:hover { background: #ff5a1f; color: #fff; }

#siteNav.scrolled .nav-cta {
  background: #0d0d0f;
  color: #f4f1ea;
}
#siteNav.scrolled .nav-cta:hover { background: #ff5a1f; color: #fff; }

/* Logo Swapping */
#siteNav .site-logo-light { display: block; }
#siteNav .site-logo-dark  { display: none; }
#siteNav.scrolled .site-logo-light { display: none; }
#siteNav.scrolled .site-logo-dark  { display: block; }
#siteNav .site-logo { filter: none !important; }

/* ============================================================
   Animated mesh blobs
   ============================================================ */
.mesh-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  animation: meshFloat 18s ease-in-out infinite;
  pointer-events: none;
}
.mesh-1 { width: 500px; height: 500px; background: #ff5a1f; top: -100px; left: -100px; }
.mesh-2 { width: 400px; height: 400px; background: #ff8a4f; bottom: -80px; right: 10%; animation-delay: -6s; }
.mesh-3 { width: 350px; height: 350px; background: #ff5a1f; top: 30%; right: -80px; animation-delay: -12s; }

@keyframes meshFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(40px, -30px) scale(1.08); }
  66%      { transform: translate(-30px, 40px) scale(0.95); }
}

/* ============================================================
   Slow orbits
   ============================================================ */
.animate-spin-slow   { animation: spin 30s linear infinite; }
.animate-spin-slower { animation: spin 45s linear infinite reverse; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   Marquee
   ============================================================ */
.marquee-row {
  display: flex;
  gap: 60px;
  padding-left: 60px;
  white-space: nowrap;
  width: max-content;
  animation: marqueeLeft 32s linear infinite;
}
.marquee-row span {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 1rem;
  color: #6b6660;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 60px;
}
.marquee-row span::after { content: "◆"; color: #ff5a1f; font-size: 0.7rem; }
@keyframes marqueeLeft { to { transform: translateX(-50%); } }

.marquee-row.reverse { animation: marqueeRight 32s linear infinite; }
@keyframes marqueeRight { from { transform: translateX(-50%); } to { transform: translateX(0); } }

/* ============================================================
   Service card spotlight
   ============================================================ */
.spotlight {
  background: radial-gradient(400px circle at var(--x, 50%) var(--y, 50%), rgba(255, 90, 31, 0.12), transparent 60%);
}

/* ============================================================
   Scroll reveal
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s cubic-bezier(.2,.7,.2,1), transform 0.9s cubic-bezier(.2,.7,.2,1);
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* ============================================================
   Custom cursor
   ============================================================ */
.cursor-dot {
  position: fixed; top: 0; left: 0;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1.5px solid #ff5a1f;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width .3s, height .3s, background .3s, opacity .3s;
  mix-blend-mode: difference;
}
.cursor-dot.hover {
  width: 60px; height: 60px;
  background: rgba(255, 90, 31, 0.15);
}
@media (hover: none) { .cursor-dot { display: none; } }

/* ============================================================
   Flip cards (projects)
   ============================================================ */
.flip-card {
  perspective: 1400px;
  flex: 0 0 clamp(280px, 34vw, 400px);
  aspect-ratio: 4 / 5;
  scroll-snap-align: start;
}
.flip-card-inner {
  position: relative; width: 100%; height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.9s cubic-bezier(.4,.2,.2,1);
}
.flip-card:hover .flip-card-inner { transform: rotateY(180deg) scale(1.02); }
.flip-face {
  position: absolute; inset: 0;
  border-radius: 24px; overflow: hidden;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.5);
}
.flip-front img { width: 100%; height: 100%; object-fit: cover; }
.flip-back {
  background: linear-gradient(135deg, #ff5a1f, #ff8a4f);
  color: #fff; transform: rotateY(180deg);
  padding: 32px 28px;
  display: flex; flex-direction: column; justify-content: space-between;
}

/* ============================================================
   Inner-page hero helper
   ============================================================ */
.page-hero { position: relative; padding: 9rem 0 6rem; overflow: hidden; background: #0d0d0f; color: #f4f1ea; }

/* ============================================================
   Testimonials
   ============================================================ */
.t-slide {
  position: absolute; inset: 0; opacity: 0; transform: translateY(20px);
  transition: opacity .7s, transform .7s cubic-bezier(.3,.7,.3,1);
  pointer-events: none;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center; padding: 0 20px;
}
.t-slide.active { opacity: 1; transform: translateY(0); pointer-events: auto; position: relative; }

/* ============================================================
   Scrollbar polish
   ============================================================ */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { scrollbar-width: none; -ms-overflow-style: none; }

/* ============================================================
   HERO BACKGROUND IMAGE SLIDER
   ============================================================ */
.hero-bg-stack { position: absolute; inset: 0; overflow: hidden; z-index: 0; }
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0; transform: scale(1.05);
  transition: opacity 1.2s ease, transform 8s ease-out;
  will-change: opacity, transform; z-index: 1;
}
.hero-bg.active { opacity: 1; transform: scale(1); }
.hero-bg-stack > .absolute { z-index: 2; }

.hero-bg-dots .hero-bg-dot {
  width: 8px; height: 8px; border-radius: 50%; border: none;
  background: rgba(244, 241, 234, 0.35); padding: 0; cursor: pointer;
  transition: width 0.4s cubic-bezier(.3,.7,.3,1), background .3s;
}
.hero-bg-dots .hero-bg-dot.active { background: #ff5a1f; width: 28px; border-radius: 99px; }

.hero-slide-content { transition: opacity 0.3s ease, transform 0.3s ease; min-height: 300px; }
.hero-slide-content.is-swapping { opacity: 0; transform: translateY(10px); }
.hero-title-text { display: block; will-change: transform, opacity; }

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .mesh-blob, .animate-spin-slow, .animate-spin-slower, .marquee-row, .hero-bg {
    animation: none !important; transition: none !important; transform: none !important;
  }
  .reveal { opacity: 1; transform: none; }
  .cursor-dot { display: none; }
}

/* ============================================================
   MODERN SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 90, 31, 0.4); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 90, 31, 0.8); }
* { scrollbar-width: thin; scrollbar-color: rgba(255, 90, 31, 0.5) transparent; }

/* ============================================================
   MOBILE APP UI FEEL (STRICT)
   ============================================================ */
@media (max-width: 768px) {
  /* Disable web scrollbar completely on mobile */
  ::-webkit-scrollbar { display: none; }
  * { scrollbar-width: none; }

  /* Disable tap highlight */
  * { -webkit-tap-highlight-color: transparent; }

  /* Native scrolling mechanics */
  html, body {
    overscroll-behavior-y: none;
    -webkit-overflow-scrolling: touch;
  }

  /* Press effect for buttons and cards */
  a.magnetic, button, .service-card, .flip-card {
    transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.15s;
  }
  a.magnetic:active, button:active, .service-card:active, .flip-card:active {
    transform: scale(0.96);
    opacity: 0.8;
  }

  /* Hide custom cursor */
  .cursor-dot { display: none !important; }

  /* Native App Safe Area (for iPhone notch) */
  .pb-safe { padding-bottom: env(safe-area-inset-bottom); }
}