/* Mobile-First Enhancements */

/* Custom viewport height for mobile browsers */
:root {
  --vh: 1vh;
}

/* Touch-friendly interactions */
@media (hover: none) and (pointer: coarse) {
  .hover-lift:hover {
    transform: none;
  }
  
  .hover-lift:active {
    transform: translateY(-2px) scale(0.98);
  }
  
  .btn-solid:hover {
    transform: none;
  }
  
  .btn-solid:active {
    transform: translateY(-1px) scale(0.98);
  }
  
  /* Enhanced touch targets */
  .nav-links a,
  .btn-primary,
  .btn-solid,
  button {
    -webkit-tap-highlight-color: rgba(168, 85, 247, 0.2);
    touch-action: manipulation;
  }
}

/* Improved mobile performance */
.gpu-accelerated {
  transform: translateZ(0);
  backface-visibility: hidden;
  perspective: 1000px;
}

/* Better mobile scrolling */
.container {
  scroll-behavior: smooth;
}

/* Mobile-optimized animations */
@media (max-width: 768px) {
  .animate-bounce-in {
    animation-duration: 0.6s;
  }
  
  .animate-float {
    animation-duration: 4s;
  }
  
  .background-blobs .blob {
    animation-duration: 8s;
  }
}

/* Swipe gestures support */
.swipe-container {
  touch-action: pan-x;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Enhanced mobile focus states */
@media (max-width: 768px) {
  button:focus,
  input:focus,
  textarea:focus,
  select:focus,
  a:focus {
    outline: 2px solid var(--clr-accent-1);
    outline-offset: 2px;
  }
}

/* Mobile-specific utilities */
.mobile-only {
  display: none;
}

.desktop-only {
  display: block;
}

@media (max-width: 768px) {
  .mobile-only {
    display: block;
  }
  
  .desktop-only {
    display: none;
  }
}

/* Mobile-optimized spacing */
@media (max-width: 768px) {
  .section-padding {
    padding: 60px 0;
  }
  
  .section-padding-large {
    padding: 80px 0;
  }
}

@media (max-width: 480px) {
  .section-padding {
    padding: 40px 0;
  }
  
  .section-padding-large {
    padding: 60px 0;
  }
}

/* Mobile-first grid improvements */
@media (max-width: 768px) {
  .mobile-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
  
  .mobile-center {
    text-align: center;
    align-items: center;
    justify-content: center;
  }
}

/* Thumb-friendly interaction zones */
@media (max-width: 768px) {
  .thumb-zone {
    padding: 12px;
    margin: 8px 0;
    min-height: 44px;
    min-width: 44px;
  }
  
  .interactive-element {
    min-height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* Mobile-optimized images */
@media (max-width: 768px) {
  .responsive-image {
    width: 100%;
    height: auto;
    object-fit: cover;
  }
  
  .hero-image {
    max-width: 100%;
    height: auto;
  }
  
  /* Optimize phone mockup for mobile */
  .phone-mockup {
    width: 240px !important;
    height: 480px !important;
    margin: 0 auto;
  }
  
  .floating-card {
    font-size: 0.875rem;
    padding: 0.75rem 1rem;
    position: static !important;
    margin: 0.5rem auto;
    display: block;
    width: fit-content;
  }
  
  /* Better mobile hero layout */
  .hero .container {
    gap: 2rem !important;
    display: flex;
    flex-direction: column;
  }
  
  .hero-visual {
    order: 1;
    margin-bottom: 1rem;
  }
  
  .hero-content {
    order: 2;
  }
  
  /* Mobile navigation improvements */
  .nav-links {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100vh;
    background: rgba(15, 15, 23, 0.98);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transition: left 0.3s ease, visibility 0.3s ease;
    z-index: 1000;
    visibility: hidden;
    opacity: 0;
  }
  
  .nav-links.active {
    left: 0;
    visibility: visible;
    opacity: 1;
  }
  
  .nav-links a {
    font-size: 1.5rem;
    padding: 1rem;
    color: white;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
  }
  
  .nav-links a:hover,
  .nav-links a.active {
    border-bottom-color: var(--clr-accent-1);
  }
  
  .nav-toggle {
    display: flex;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    z-index: 1001;
  }
  
  .nav-toggle span {
    width: 25px;
    height: 3px;
    background: white;
    transition: all 0.3s ease;
  }
  
  .nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
  }
  
  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  
  .nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }
}

/* Enhanced mobile typography */
@media (max-width: 768px) {
  .mobile-text-sm {
    font-size: 0.875rem;
    line-height: 1.5;
  }
  
  .mobile-text-base {
    font-size: 1rem;
    line-height: 1.6;
  }
  
  .mobile-text-lg {
    font-size: 1.125rem;
    line-height: 1.6;
  }
  
  .mobile-heading {
    font-size: 1.5rem;
    line-height: 1.3;
    margin-bottom: 1rem;
  }
  
  /* Mobile hero typography */
  .hero h1 {
    font-size: 2rem !important;
    line-height: 1.2;
    margin-bottom: 1.5rem;
  }
  
  .hero-description {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
  }
  
  /* Mobile button improvements */
  .btn-primary,
  .btn-solid {
    font-size: 1rem;
    padding: 14px 24px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
  }
  
  .cta-group {
    gap: 1rem;
    width: 100%;
  }
  
  .cta-group .btn-primary,
  .cta-group .btn-solid {
    flex: 1;
    min-width: 0;
  }
}

/* Mobile-first form enhancements */
@media (max-width: 768px) {
  .mobile-form-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
  
  .mobile-form-group {
    width: 100%;
  }
  
  .mobile-form-group input,
  .mobile-form-group textarea,
  .mobile-form-group select {
    width: 100%;
    min-height: 44px;
    font-size: 16px;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid var(--clr-border);
    background: var(--clr-surface);
    color: var(--clr-text-high);
  }
}

/* Mobile loading states */
.mobile-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  font-size: 1rem;
  color: var(--clr-text-muted);
}

.mobile-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--clr-border);
  border-top: 2px solid var(--clr-accent-1);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 0.5rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Mobile-specific performance optimizations */
@media (max-width: 768px) {
  * {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
  
  /* Reduce animation complexity on mobile */
  .background-blobs .blob {
    will-change: transform;
    transform: translateZ(0);
  }
  
  /* Optimize scrolling */
  body {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
  }
  
  /* Prevent zoom on input focus */
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="password"],
  textarea,
  select {
    font-size: 16px !important;
  }
  
  /* Better mobile modal handling */
  .modal {
    padding: 1rem;
  }
  
  .modal-content {
    max-height: calc(var(--vh, 1vh) * 90);
    overflow-y: auto;
  }
}

/* Landscape orientation optimizations */
@media (max-width: 768px) and (orientation: landscape) {
  .hero {
    padding: 80px 0 40px;
  }
  
  .nav-wrap {
    top: 5px;
  }
  
  .hero-features {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* Ultra-wide mobile screens */
@media (max-width: 480px) and (min-height: 800px) {
  .hero {
    padding: 120px 0 80px;
  }
  
  .section-padding {
    padding: 60px 0;
  }
}

/* Mobile grid improvements */
@media (max-width: 768px) {
  .benefits-grid,
  .metrics-grid,
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .hero-features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
  }
  
  .feature-item {
    width: 100%;
    max-width: 280px;
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  /* Channel matrix mobile optimization */
  .channels-visual {
    padding: 2rem 1rem;
  }
  
  .channel-nodes {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 2rem;
  }
  
  .channel-node {
    font-size: 0.9rem;
    padding: 0.75rem;
    text-align: center;
  }
  
  /* Steps container mobile */
  .steps-container {
    gap: 3rem;
  }
  
  .step {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }
  
  .step-visual {
    width: 80px;
    height: 80px;
    margin: 0 auto;
  }
  
  .step-content {
    text-align: center;
  }
  
  .step-features {
    justify-content: center;
    flex-wrap: wrap;
  }
}

/* Small mobile screens optimization */
@media (max-width: 360px) {
  .container {
    padding: 0 0.75rem;
  }
  
  .hero h1 {
    font-size: 1.75rem;
  }
  
  .btn-primary,
  .btn-solid {
    padding: 12px 20px;
    font-size: 0.95rem;
  }
  
  .benefit-card,
  .solution-card {
    padding: 1.5rem 1rem;
  }
  
  .channel-nodes {
    grid-template-columns: 1fr;
  }
  
  .hero-features .feature-item {
    max-width: 100%;
  }
}
/* Mobile Enhancements CSS */

/* Responsive adjustments for mobile devices */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .hero-features {
        flex-direction: column;
        gap: 1rem;
    }
    
    .feature-item {
        padding: 0.75rem 1rem;
    }
    
    .cta-group {
        flex-direction: column;
        gap: 1rem;
    }
    
    .btn-solid,
    .btn-primary {
        width: 100%;
        justify-content: center;
    }
    
    .benefits-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .steps-container {
        gap: 2rem;
    }
    
    .step {
        flex-direction: column;
        text-align: center;
    }
    
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .pricing-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .solutions-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .faq-grid {
        grid-template-columns: 1fr;
    }
}

/* Touch-friendly enhancements */
@media (hover: none) and (pointer: coarse) {
    .btn-solid,
    .btn-primary {
        min-height: 48px;
        font-size: 1rem;
    }
    
    .nav-links a {
        padding: 1rem;
        font-size: 1.1rem;
    }
    
    .service-option {
        padding: 1.5rem 1rem;
        min-height: 80px;
    }
}

/* Prevent horizontal scrolling */
body {
    overflow-x: hidden;
}

/* Improve text readability on mobile */
@media (max-width: 480px) {
    .hero-description {
        font-size: 1rem;
        line-height: 1.5;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .benefit-card h3 {
        font-size: 1.25rem;
    }
}
