/* ===================================================================
   Shaz Vision — 3D Asset & Animation Enhancement System
   =================================================================== */

@keyframes sv3dFloat {
  0% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-12px) rotate(1.5deg);
  }
  100% {
    transform: translateY(0px) rotate(0deg);
  }
}

@keyframes sv3dFloatReverse {
  0% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(10px) rotate(-1.5deg);
  }
  100% {
    transform: translateY(0px) rotate(0deg);
  }
}

@keyframes sv3dGlowPulse {
  0%, 100% {
    filter: drop-shadow(0 10px 20px rgba(141, 124, 218, 0.35)) drop-shadow(0 0 30px rgba(82, 202, 216, 0.25));
  }
  50% {
    filter: drop-shadow(0 15px 30px rgba(141, 124, 218, 0.6)) drop-shadow(0 0 45px rgba(82, 202, 216, 0.45));
  }
}

/* 3D Hero Display Element */
.sv-3d-hero-wrap {
  position: relative;
  width: 100%;
  max-width: 460px;
  margin: 2rem auto 0;
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1200px;
  z-index: 10;
}

.sv-3d-hero-img {
  width: 100%;
  max-width: 420px;
  height: auto;
  object-fit: contain;
  animation: sv3dFloat 6s ease-in-out infinite, sv3dGlowPulse 4s ease-in-out infinite;
  transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), filter 0.4s ease;
  transform-style: preserve-3d;
  cursor: pointer;
}

.sv-3d-hero-img:hover {
  transform: translateY(-18px) rotateX(6deg) rotateY(-8deg) scale(1.04);
  filter: drop-shadow(0 25px 35px rgba(141, 124, 218, 0.7)) drop-shadow(0 0 50px rgba(82, 202, 216, 0.6));
}

/* Floating 3D Card Badges & Visuals */
.sv-3d-card-badge {
  position: relative;
  display: inline-block;
  vertical-align: middle;
  width: 52px;
  height: 52px;
  object-fit: contain;
  animation: sv3dFloat 5s ease-in-out infinite;
  filter: drop-shadow(0 6px 12px rgba(0,0,0,0.3));
  transition: transform 0.3s ease;
}

.sv-3d-card-badge:hover {
  transform: scale(1.2) rotate(6deg);
}

.sv-3d-card-img {
  width: 100%;
  height: 160px;
  object-fit: contain;
  margin-bottom: 1.2rem;
  animation: sv3dFloat 7s ease-in-out infinite;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.25));
  transition: transform 0.4s ease, filter 0.4s ease;
}

.sv-project:hover .sv-3d-card-img,
.aiFeatures__card:hover .sv-3d-card-img {
  transform: translateY(-8px) scale(1.06);
  filter: drop-shadow(0 16px 28px rgba(141, 124, 218, 0.45));
}

/* Glassmorphism 3D Showcase Section */
.sv-3d-showcase-section {
  position: relative;
  padding: 7rem 5vw;
  background: transparent !important;
  border-top: none !important;
  border-bottom: none !important;
  overflow: hidden;
}

.sv-3d-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  max-width: 120rem;
  margin: 3.5rem auto 0;
  position: relative;
  z-index: 2;
}

.sv-3d-grid-item {
  position: relative;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 2.2rem 1.8rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.4s ease, box-shadow 0.4s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.sv-3d-grid-item:hover {
  transform: translateY(-10px) scale(1.02);
  border-color: rgba(141, 124, 218, 0.6);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 25px rgba(141, 124, 218, 0.25);
}

.sv-3d-grid-img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  margin-bottom: 1.4rem;
  animation: sv3dFloat 6s ease-in-out infinite;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.35));
}

.sv-3d-grid-item:nth-child(even) .sv-3d-grid-img {
  animation-name: sv3dFloatReverse;
  animation-duration: 7s;
}

.sv-3d-grid-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 1.8rem;
  color: #ffffff;
  margin: 0 0 0.6rem 0;
}

.sv-3d-grid-desc {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.35rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.5;
  margin: 0;
}

/* Floating 3D Deco Ornaments */
.sv-3d-float-ornament {
  position: absolute;
  pointer-events: none;
  z-index: 3;
  width: 110px;
  height: 110px;
  object-fit: contain;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.3));
  animation: sv3dFloat 8s ease-in-out infinite;
  opacity: 0.85;
}

/* Mobile responsive optimizations and layout fixes */
@media (min-width: 801px) {
  /* On desktop: split layout to put the 3D PC to the right side */
  .patch-ai .aiHero {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0 8vw !important;
    box-sizing: border-box !important;
    height: 94rem !important;
    max-height: 100vh !important;
    overflow: visible !important;
  }
  .patch-ai .aiHero__heading {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    text-align: left !important;
    width: 58% !important;
    max-width: 76rem !important;
    z-index: 10 !important;
    margin: 0 !important;
  }
  .sv-3d-hero-wrap {
    position: relative !important;
    margin: 0 !important;
    width: 38% !important;
    max-width: 440px !important;
    z-index: 9 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
  }
  .patch-ai .aiHero__bottom {
    position: absolute !important;
    bottom: 3.5rem !important;
    left: 8vw !important;
    width: calc(100% - 16vw) !important;
  }
}

@media (max-width: 800px) {
  /* On mobile: stack elements cleanly without absolute positioning overlap */
  .patch-ai .aiHero {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 10rem 2rem 14rem !important;
    height: auto !important;
    min-height: 100vh !important;
    box-sizing: border-box !important;
  }
  .patch-ai .aiHero__heading {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    text-align: center !important;
    width: 100% !important;
    margin: 0 0 2rem 0 !important;
  }
  .sv-3d-hero-wrap {
    position: relative !important;
    margin: 1.5rem auto 3rem !important;
    width: 85% !important;
    max-width: 320px !important;
    z-index: 9 !important;
  }
  .patch-ai .aiHero__bottom {
    position: relative !important;
    bottom: auto !important;
    left: auto !important;
    width: 100% !important;
    margin-top: 2rem !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 1.2rem !important;
  }
  .patch-ai .aiHero__sub {
    max-width: 100% !important;
  }
  
  .sv-3d-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
    gap: 1.4rem !important;
  }
  .sv-3d-float-ornament {
    width: 70px !important;
    height: 70px !important;
    opacity: 0.6 !important;
  }
}

/* ===================================================================
   Ultra-Smooth Hero Neon Glow Enhancement
   Fixes the clipped / striped duplicate text blur artifact on "Solutions."
   =================================================================== */

.patch-ai .aiHero__heading .h-line {
  overflow: visible !important;
}

.patch-ai .aiHero__heading .h-line:nth-child(3),
.patch-ai .aiHero__heading .h-line:nth-child(3) .h-word {
  position: relative;
  text-shadow:
    0 0 10px rgba(255, 148, 129, 0.9),
    0 0 22px rgba(255, 148, 129, 0.75),
    0 0 40px rgba(255, 137, 196, 0.65),
    0 0 65px rgba(255, 137, 196, 0.45),
    0 0 95px rgba(255, 137, 196, 0.3) !important;
}

/* Disable the old glitchy pseudo-element duplicate blur text */
.patch-ai .aiHero__heading .h-line:nth-child(3) .h-word::before,
.patch-ai .aiHero__heading .h-line:nth-child(3) .h-word::after,
.aiHero__heading .h-line:nth-child(3) .h-word::before,
.aiHero__heading .h-line:nth-child(3) .h-word::after {
  display: none !important;
  content: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
}

/* Also smooth out .aiText benefits cards */
.patch-ai .aiText {
  text-shadow:
    0 0 8px rgba(255, 148, 129, 0.85),
    0 0 20px rgba(255, 137, 196, 0.6),
    0 0 40px rgba(255, 137, 196, 0.4) !important;
}

.patch-ai .aiText::before,
.patch-ai .aiText::after,
.aiText::before,
.aiText::after {
  display: none !important;
  content: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
}

/* ===================================================================
   Fix Initial Load Text Reveal Artifacts (Eliminates Initial Lines / Stripes)
   Replaces the 3D edge-on rotateX(-88deg) sliver artifact with a clean
   fade + translateY animation so text doesn't look like lines before entering.
   =================================================================== */

.h-anim .h-line {
  overflow: visible !important;
  perspective: none !important;
  -webkit-perspective: none !important;
  transform-style: flat !important;
  -webkit-transform-style: flat !important;
}

.h-anim .h-word {
  opacity: 0 !important;
  transform: translateY(28px) !important;
  -webkit-transform: translateY(28px) !important;
  transform-style: flat !important;
  -webkit-transform-style: flat !important;
  will-change: transform, opacity;
}

.h-anim.in .h-word {
  opacity: 1 !important;
  transform: translateY(0) !important;
  -webkit-transform: translateY(0) !important;
  transition-property: transform, opacity, -webkit-transform !important;
  transition-duration: 0.65s, 0.5s, 0.65s !important;
  transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1) !important;
}


