/* Qubix Solutions Final Premium Design System */
:root {
  --primary: #8B5CF6;
  /* Violet 500 */
  --primary-glow: rgba(139, 92, 246, 0.5);
  --secondary: #3B82F6;
  /* Blue 500 */
  --accent: #EC4899;
  /* Pink 500 */
  --bg-deep: #020817;
  /* Ultra Deep Navy */
  --bg-glass: rgba(15, 23, 42, 0.6);
  --text-main: #FFFFFF;
  --text-dim: #94A3B8;
  --border-glass: rgba(255, 255, 255, 0.08);
}

html {
  font-size: 15px;
}

body {
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

/* Stunning Cyber Background with Animated Glows */
.cyber-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--bg-deep);
  overflow: hidden;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.15;
  pointer-events: none;
}

.orb-1 {
  width: 600px;
  height: 600px;
  top: -10%;
  left: -5%;
  background: var(--primary);
  animation: float-orb 15s infinite alternate;
}

.orb-2 {
  width: 500px;
  height: 500px;
  bottom: -10%;
  right: -5%;
  background: var(--secondary);
  animation: float-orb 20s infinite alternate-reverse;
}

.orb-3 {
  width: 400px;
  height: 400px;
  top: 40%;
  right: 10%;
  background: var(--accent);
  opacity: 0.1;
}

@keyframes float-orb {
  from {
    transform: translate(0, 0) scale(1);
  }

  to {
    transform: translate(50px, 30px) scale(1.1);
  }
}

/* Premium Navigation */
.glass-header {
  background: rgba(2, 8, 23, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-glass);
  transition: all 0.4s ease;
}

.nav-link-premium {
  font-size: 0.875rem;
  font-weight: 700;
  color: #94A3B8;
  transition: all 0.3s;
  position: relative;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.nav-link-premium::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary);
  transition: all 0.3s;
}

.nav-link-premium:hover::after {
  width: 100%;
}

.nav-link-premium:hover {
  color: white;
}

/* Colorful Qubix Cards */
.qubix-box {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: 2rem;
  padding: 2.5rem;
  transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.qubix-box:hover {
  transform: translateY(-12px);
  border-color: rgba(139, 92, 246, 0.4);
  box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.5);
}

.qubix-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at top left, rgba(139, 92, 246, 0.05), transparent 70%);
  opacity: 0;
  transition: opacity 0.5s;
  pointer-events: none;
}

.qubix-box:hover::before {
  opacity: 1;
}

/* Tech Icon Wrappers */
.icon-wrap {
  width: 72px;
  height: 72px;
  border-radius: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 2rem;
  position: relative;
}

.icon-wrap::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 1.5rem;
  background: currentColor;
  opacity: 0.1;
}

/* Gradient Text (Enhanced) */
.gradient-text-vibrant {
  background: linear-gradient(135deg, #A855F7 0%, #6366F1 50%, #3B82F6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* Progress Bars */
.progress-rail {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 99px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(to right, #8B5CF6, #3B82F6);
  border-radius: 99px;
  transition: width 1.5s cubic-bezier(0.1, 0, 0.3, 1);
}

/* Tech Badges */
.badge-tech {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.4rem 1rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #94A3B8;
  transition: all 0.3s;
}

.badge-tech:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* Buttons */
.btn-qubix-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #8B5CF6 0%, #6366F1 100%);
  color: #FFFFFF !important;
  padding: 1.25rem 2.5rem;
  border-radius: 1.25rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.875rem;
  transition: all 0.4s;
  box-shadow: 0 20px 40px -10px rgba(139, 92, 246, 0.4);
  cursor: pointer;
  border: none;
  min-width: 180px;
}

.btn-qubix-primary:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 30px 60px -10px rgba(139, 92, 246, 0.6);
  color: #FFFFFF !important;
}

/* Fix for Outfit Font Spacing */
.font-heading {
  letter-spacing: -0.01em;
  line-height: 1.2;
}

/* Contact Inputs */
.qubix-input {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.25rem;
  padding: 1.25rem 1.75rem;
  color: white;
  width: 100%;
  transition: all 0.3s;
}

.qubix-input:focus {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1);
}

/* Scroll Animations */
[data-animate] {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

[data-animate].animate-visible {
  opacity: 1;
  transform: translateY(0);
}

/* 3D Sliding Hero Image */
.hero-3d-wrap {
  perspective: 2000px;
  position: relative;
}

.hero-3d-card {
  width: 100%;
  aspect-ratio: 4/5;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(59, 130, 246, 0.1));
  border-radius: 4rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  transform: rotateY(-20deg) rotateX(10deg);
  transition: all 1s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: -30px 40px 100px -20px rgba(0, 0, 0, 0.7);
}

.hero-3d-card:hover {
  transform: rotateY(-5deg) rotateX(0deg) scale(1.05);
  box-shadow: 0 60px 120px -30px rgba(0, 0, 0, 0.8);
}

.hero-slider-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: hero-ken-burns 20s infinite alternate ease-in-out;
}

@keyframes hero-ken-burns {
  0% {
    transform: scale(1) translate(0, 0);
  }

  50% {
    transform: scale(1.2) translate(-2%, -5%);
  }

  100% {
    transform: scale(1.1) translate(2%, 2%);
  }
}

/* Service Text Color Fix */
.service-text-fix h1,
.service-text-fix h3 {
  color: white !important;
}

.service-text-fix p,
.service-text-fix li {
  color: #94A3B8 !important;
}

.service-text-fix .glass-card {
  background: rgba(15, 23, 42, 0.6) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Section Fit & Scaling */
.section-padding {
  padding-top: 8rem;
  padding-bottom: 8rem;
}

@keyframes bounce-slow {

  0%,
  100% {
    transform: translateY(-50%) translateY(0);
  }

  50% {
    transform: translateY(-50%) translateY(-20px);
  }
}

/* ========================================
   RESPONSIVE DESIGN - MOBILE FIRST
   ======================================== */

/* Tablet and Below (1024px) */
@media (max-width: 1024px) {
  .hero-3d-card {
    transform: none;
    aspect-ratio: 16/9;
    margin-top: 3rem;
  }

  /* Header/Nav adjustments */
  .glass-header {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  /* Services & Stats Grid: 4 → 2 columns */
  .grid-cols-1.md\:grid-cols-2.lg\:grid-cols-4,
  .grid-cols-2.lg\:grid-cols-4 {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Section padding reduction */
  .section-padding {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }

  /* Hero text sizing */
  h1 {
    font-size: 3.5rem !important;
  }
}

/* Tablet Portrait and Below (768px) */
@media (max-width: 768px) {

  /* Typography adjustments */
  h1 {
    font-size: 2.5rem !important;
    line-height: 1.2;
  }

  h2 {
    font-size: 2rem !important;
  }

  h3 {
    font-size: 1.5rem !important;
  }

  /* Hero section */
  .hero-3d-card {
    margin-top: 2rem;
  }

  /* All stats/services grids: 2 → 1 column */
  .grid-cols-2.lg\:grid-cols-4,
  .grid-cols-1.md\:grid-cols-2.lg\:grid-cols-4 {
    grid-template-columns: 1fr !important;
  }

  /* Portfolio grid: 3 → 1 column */
  .grid-cols-1.md\:grid-cols-2.lg\:grid-cols-3 {
    grid-template-columns: 1fr !important;
  }

  /* Reduce card padding */
  .qubix-box {
    padding: 1.5rem;
  }

  /* Footer grid */
  .grid-cols-1.md\:grid-cols-2.lg\:grid-cols-4 {
    grid-template-columns: 1fr !important;
  }

  /* Section spacing */
  .section-padding {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }
}

/* Mobile Landscape and Below (640px) */
@media (max-width: 640px) {

  /* CRITICAL FIX: Mobile menu background */
  #mobile-menu {
    background: rgba(2, 8, 23, 0.98) !important;
    backdrop-filter: blur(20px) !important;
  }

  /* Header size reduction */
  .glass-header {
    padding: 0.75rem 1rem !important;
    border-radius: 1.25rem !important;
  }

  /* Logo sizing */
  .glass-header .w-10.h-10 {
    width: 2rem;
    height: 2rem;
  }

  .glass-header .text-2xl {
    font-size: 1.25rem;
  }

  /* Hero title */
  h1 {
    font-size: 2rem !important;
  }

  /* Hero stats - Stack vertically */
  .flex.items-center.gap-16 {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }

  .flex.items-center.gap-16 .w-px {
    display: none;
  }

  /* Button adjustments */
  .btn-qubix-primary {
    padding: 1rem 1.5rem;
    font-size: 0.75rem;
    min-width: auto;
    width: 100%;
  }

  /* Icon wrappers */
  .icon-wrap {
    width: 56px;
    height: 56px;
    font-size: 1.5rem;
  }

  /* Reduce glow orb size for performance */
  .glow-orb {
    filter: blur(80px);
  }

  .orb-1,
  .orb-2 {
    width: 300px;
    height: 300px;
  }

  .orb-3 {
    width: 200px;
    height: 200px;
  }
}

/* Mobile Portrait (480px and below) */
@media (max-width: 480px) {
  html {
    font-size: 14px;
  }

  /* CRITICAL: Stack hero buttons vertically */
  .flex.flex-wrap.gap-8 {
    flex-direction: column;
    gap: 1rem;
  }

  .flex.flex-wrap.gap-8 a {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  /* Hero title even smaller */
  h1 {
    font-size: 1.75rem !important;
  }

  /* Qubix box extreme padding reduction */
  .qubix-box {
    padding: 1.25rem;
    border-radius: 1.25rem;
  }

  /* Contact form padding */
  .qubix-box.p-16 {
    padding: 1.5rem !important;
  }

  .qubix-box.p-12 {
    padding: 1.25rem !important;
  }

  /* Input sizing */
  .qubix-input {
    padding: 1rem 1.25rem;
    font-size: 1rem;
  }

  /* Reduce section padding more */
  .section-padding {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }

  /* Footer spacing */
  footer {
    padding-top: 3rem !important;
  }

  /* Badge text */
  .badge-tech {
    font-size: 0.65rem;
    padding: 0.3rem 0.75rem;
  }
}

/* Extra small devices (360px and below) */
@media (max-width: 360px) {
  html {
    font-size: 13px;
  }

  h1 {
    font-size: 1.5rem !important;
  }

  .glass-header .text-2xl {
    font-size: 1rem;
  }

  .btn-qubix-primary {
    padding: 0.875rem 1.25rem;
    font-size: 0.7rem;
  }
}