/* Untrapd Hub - Responsive Styles */
/* Mobile-first responsive design for all devices */

/* Mobile Navigation - Enhanced Professional Design */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    z-index: 1001;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
  }
  
  .hamburger .bar {
    width: 25px;
    height: 3px;
    background-color: #ffffff;
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
  }
  
  .nav-menu {
    position: fixed;
    left: -100%;
    top: 80px;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    width: 100%;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 20px 40px rgba(3, 7, 18, 0.12);
    border-top: 1px solid var(--gray-100);
    padding: 3rem 0;
    z-index: 999;
    height: calc(100vh - 80px);
    overflow-y: auto;
  }
  
  .nav-menu.active {
    left: 0;
    animation: slideInFromLeft 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  @keyframes slideInFromLeft {
    from {
      opacity: 0;
      transform: translateX(-50px);
    }
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }
  
  .nav-menu li {
    margin: 1.5rem 0;
    opacity: 0;
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  }
  
  .nav-menu.active li:nth-child(1) { animation-delay: 0.1s; }
  .nav-menu.active li:nth-child(2) { animation-delay: 0.2s; }
  .nav-menu.active li:nth-child(3) { animation-delay: 0.3s; }
  .nav-menu.active li:nth-child(4) { animation-delay: 0.4s; }
  
  @keyframes fadeInUp {
    from {
      opacity: 0;
      transform: translateY(20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  .nav-cta {
    display: none;
  }
  
  .hamburger.active .bar:nth-child(2) {
    opacity: 0;
  }
  
  .hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  
  .hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
}

/* Tablet Styles */
@media (max-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }
  
  .hero-title {
    font-size: 3rem;
  }
  
  .download-content {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .features-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
  
  .footer-content {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

/* Mobile Styles - Enhanced Typography */
@media (max-width: 768px) {
  /* Typography scaling for better readability */
  h1 { 
    font-size: 2.8rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
  }
  h2 { 
    font-size: 2.2rem;
    line-height: 1.3;
    letter-spacing: -0.01em;
  }
  h3 { 
    font-size: 1.6rem;
    line-height: 1.4;
  }
  
  .hero {
    padding: 7rem 0 5rem;
    text-align: center;
  }
  
  .hero-title {
    font-size: 2.8rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 2rem;
  }
  
  .hero-cta {
    flex-direction: column;
    align-items: center;
  }
  
  .cta-button.large {
    padding: 1.2rem 2.5rem;
    font-size: 1.1rem;
    width: 100%;
    max-width: 320px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(31, 38, 135, 0.2);
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .phone-frame {
    width: 220px;
    height: 440px;
    padding: 15px;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .feature-card {
    padding: 2.5rem 2rem;
    border-radius: 20px;
    margin-bottom: 1rem;
  }
  
  .integration-flow {
    flex-direction: column;
    gap: 1rem;
  }
  
  .integration-arrow {
    transform: rotate(90deg);
    font-size: 1.5rem;
  }
  
  .newsletter-form,
  .waitlist-form {
    flex-direction: column;
  }
  
  .newsletter-form input,
  .waitlist-form input {
    margin-bottom: 1rem;
  }
  
  .download-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .app-store-btn img {
    height: 50px;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .social-links {
    justify-content: center;
  }
}

/* Small Mobile Styles - Ultra Professional */
@media (max-width: 480px) {
  .container {
    padding: 0 1.2rem;
  }
  
  .hero-title {
    font-size: 2.4rem;
    line-height: 1.1;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
    line-height: 1.6;
  }
  
  .section-title {
    font-size: 2rem;
    line-height: 1.2;
  }
  
  body {
    font-size: 16px;
  }
  
  p {
    font-size: 1.1rem;
    line-height: 1.7;
  }
  
  .phone-frame {
    width: 180px;
    height: 360px;
    padding: 12px;
  }
  
  .feature-card {
    padding: 1.5rem;
  }
  
  .feature-icon {
    font-size: 2.5rem;
  }
  
  .coming-soon {
    padding: 1.5rem;
  }
  
  .integration-step {
    padding: 1.5rem;
  }
  
  .step-number {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
}

/* Large Desktop Styles */
@media (min-width: 1400px) {
  .container {
    max-width: 1400px;
  }
  
  .hero-title {
    font-size: 4rem;
  }
  
  .hero-subtitle {
    font-size: 1.4rem;
  }
  
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .phone-frame {
    width: 320px;
    height: 640px;
    padding: 25px;
  }
}

/* High DPI Display Optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .app-store-btn img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  :root {
    --light-color: #111827;
    --dark-color: #f9fafb;
    --gray-50: #1f2937;
    --gray-100: #374151;
  }
  
  body {
    background-color: var(--light-color);
    color: var(--dark-color);
  }
  
  .main-header {
    background: rgba(17, 24, 39, 0.95);
    border-bottom-color: var(--gray-700);
  }
  
  .hero {
    background: linear-gradient(135deg, var(--light-color) 0%, var(--gray-900) 100%);
  }
  
  .features {
    background: var(--gray-900);
  }
  
  .feature-card {
    background: var(--gray-800);
    border-color: var(--gray-700);
    color: var(--gray-200);
  }
  
  .download-section {
    background: var(--gray-800);
  }
  
  .integration {
    background: var(--gray-900);
  }
  
  .integration-step {
    background: var(--gray-800);
    border-color: var(--gray-700);
  }
  
  .coming-soon {
    background: var(--gray-800);
    border-color: var(--primary-color);
  }
  
  .waitlist-form input,
  .newsletter-form input {
    background: var(--gray-700);
    border-color: var(--gray-600);
    color: var(--gray-200);
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .loading::after {
    animation: none;
  }
}

/* Print Styles */
@media print {
  .main-header,
  .hamburger,
  .nav-cta,
  .hero-cta,
  .download-buttons,
  .newsletter,
  .main-footer {
    display: none;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.4;
  }
  
  .hero-title {
    font-size: 24pt;
  }
  
  .section-title {
    font-size: 18pt;
  }
  
  .feature-card {
    box-shadow: none;
    border: 1px solid #ddd;
    page-break-inside: avoid;
  }
}

/* Focus and Accessibility - Enhanced WCAG Compliance */
.nav-link:focus,
.cta-button:focus,
button:focus,
input:focus,
a:focus {
  outline: 3px solid var(--primary-color);
  outline-offset: 2px;
  border-radius: 4px;
  box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
  transition: all 0.2s ease;
}

.nav-link:focus-visible,
.cta-button:focus-visible,
button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 3px solid var(--primary-color);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .nav-link:focus,
  .cta-button:focus,
  button:focus,
  input:focus,
  a:focus {
    transition: none;
  }
}

/* Skip Link for Screen Readers */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--primary-color);
  color: white;
  padding: 8px;
  text-decoration: none;
  z-index: 1001;
}

.skip-link:focus {
  top: 6px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  .feature-card {
    border: 2px solid var(--gray-800);
  }
  
  .cta-button.secondary {
    border-width: 3px;
  }
  
  .nav-link.active::after {
    height: 3px;
  }
}

/* Loading Animation Optimization */
@media (prefers-reduced-motion: no-preference) {
  .feature-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }
  
  .cta-button {
    transition: all 0.2s ease-in-out;
  }
  
  .loading::after {
    animation: spin 1s linear infinite;
  }
}

/* Touch Device Optimizations - Enhanced Accessibility */
@media (pointer: coarse) {
  .nav-link,
  .cta-button,
  .feature-link {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  .hamburger {
    padding: 12px;
    border-radius: 8px;
    transition: background-color 0.3s ease;
    cursor: pointer;
  }
  
  .hamburger:active {
    background-color: rgba(26, 115, 232, 0.1);
  }
  
  .social-link {
    min-width: 48px;
    min-height: 48px;
    border-radius: 12px;
  }
  
  .btn {
    min-height: 48px;
    padding: 12px 24px;
    font-size: 1rem;
  }
}