/* ============================================
   UI DEV - Responsive Stylesheet
   ============================================ */

/* ============================================
   Tablet (768px and below)
   ============================================ */
@media (max-width: 768px) {
  /* Typography */
  h1 { font-size: var(--text-4xl); }
  h2 { font-size: var(--text-3xl); }
  h3 { font-size: var(--text-2xl); }
  
  .hero-title {
    font-size: var(--text-4xl);
  }
  
  .section-title {
    font-size: var(--text-3xl);
  }
  
  /* Container */
  .container {
    padding: 0 var(--space-4);
  }
  
  /* Sections */
  .section {
    padding: var(--space-12) 0;
  }
  
  .section-lg {
    padding: var(--space-16) 0;
  }
  
  /* Grid */
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  
  /* Navigation */
  .nav-links {
    display: none;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: var(--space-6);
    box-shadow: var(--shadow-lg);
    gap: var(--space-4);
  }
  
  .nav-links.active {
    display: flex;
  }
  
  .mobile-menu-toggle {
    display: flex;
  }
  
  .mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  
  .mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  
  .mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }
  
  /* Hero */
  .hero {
    min-height: auto;
    padding: var(--space-20) 0 var(--space-12);
  }
  
  .hero-cta {
    flex-direction: column;
  }
  
  .hero-cta .btn {
    width: 100%;
  }
  
  /* Features */
  .feature-card {
    padding: var(--space-6);
  }
  
  /* Stats */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
  }
  
  /* CTA */
  .cta-buttons {
    flex-direction: column;
  }
  
  .cta-buttons .btn {
    width: 100%;
  }
  
  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
  
  /* Contact */
  .contact-item {
    flex-direction: column;
    text-align: center;
  }
  
  /* Screenshots */
  .screenshots-grid {
    grid-template-columns: 1fr;
  }
  
  /* Process Steps */
  .process-steps {
    grid-template-columns: 1fr;
  }
  
  /* Blog */
  .blog-card {
    margin-bottom: var(--space-6);
  }
}

/* ============================================
   Mobile (480px and below)
   ============================================ */
@media (max-width: 480px) {
  /* Typography */
  h1 { font-size: var(--text-3xl); }
  h2 { font-size: var(--text-2xl); }
  h3 { font-size: var(--text-xl); }
  
  .hero-title {
    font-size: var(--text-3xl);
  }
  
  .hero-subtitle {
    font-size: var(--text-base);
  }
  
  .section-title {
    font-size: var(--text-2xl);
  }
  
  .section-subtitle {
    font-size: var(--text-base);
  }
  
  /* Buttons */
  .btn-lg {
    padding: var(--space-3) var(--space-6);
    font-size: var(--text-base);
  }
  
  /* Stats */
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .stat-number {
    font-size: var(--text-4xl);
  }
  
  /* Cards */
  .card {
    padding: var(--space-6);
  }
  
  .feature-card {
    padding: var(--space-4);
  }
  
  /* Forms */
  .form-input,
  .form-textarea {
    font-size: 16px; /* Prevents zoom on iOS */
  }
  
  /* Footer */
  .social-links {
    gap: var(--space-3);
  }
  
  .social-link {
    width: 36px;
    height: 36px;
  }
}

/* ============================================
   Large Desktop (1440px and above)
   ============================================ */
@media (min-width: 1440px) {
  .hero-title {
    font-size: 4.5rem;
  }
  
  .section-title {
    font-size: 3.5rem;
  }
  
  .container {
    max-width: 1400px;
  }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
  .header,
  .footer,
  .mobile-menu-toggle,
  .cta-section,
  .btn {
    display: none;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.5;
    color: #000;
  }
  
  a {
    text-decoration: underline;
    color: #000;
  }
  
  h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
  }
  
  img {
    max-width: 100%;
    page-break-inside: avoid;
  }
}

/* ============================================
   Accessibility
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  :root {
    --primary: #0000ff;
    --gray-600: #000000;
  }
  
  .btn {
    border: 2px solid currentColor;
  }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
  /* Uncomment to enable dark mode
  :root {
    --dark: #f8fafc;
    --gray-800: #e2e8f0;
    --gray-700: #cbd5e1;
    --gray-600: #94a3b8;
    --white: #0f172a;
    --gray-100: #1e293b;
  }
  
  body {
    background-color: var(--dark);
    color: var(--gray-100);
  }
  */
}

/* ============================================
   Touch Device Optimizations
   ============================================ */
@media (hover: none) and (pointer: coarse) {
  /* Larger touch targets */
  .btn {
    min-height: 44px;
    min-width: 44px;
  }
  
  .nav-link {
    padding: var(--space-3) 0;
  }
  
  .faq-question {
    min-height: 60px;
  }
  
  /* Remove hover effects on touch devices */
  .card:hover,
  .feature-card:hover,
  .blog-card:hover {
    transform: none;
  }
}

/* ============================================
   Landscape Mobile
   ============================================ */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding: var(--space-12) 0;
  }
  
  .hero-title {
    font-size: var(--text-3xl);
  }
}