/**
 * Responsive Styles
 * Mobile-first media queries
 */

/* ============================================
   MOBILE (BASE STYLES)
   Default: 320px - 639px
   ============================================ */

/* Mobile-specific adjustments are in base styles */

/* ============================================
   SMALL TABLETS & LARGE PHONES
   640px and up
   ============================================ */

@media (min-width: 640px) {
  /* Typography */
  h1 {
    font-size: var(--font-size-5xl);
  }

  h2 {
    font-size: var(--font-size-4xl);
  }

  /* Hero */
  .hero__cta {
    flex-direction: row;
    justify-content: center;
  }

  /* Benefits - 2 columns */
  .benefits {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Devices - 2 columns */
  .devices {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Container */
  .container {
    padding-left: var(--space-6);
    padding-right: var(--space-6);
  }
}

/* ============================================
   TABLETS
   768px and up
   ============================================ */

@media (min-width: 768px) {
  /* Typography */
  .hero__title {
    font-size: var(--font-size-5xl);
  }

  .section__title {
    font-size: var(--font-size-4xl);
  }

  .hero__subtitle {
    font-size: var(--font-size-xl);
  }

  /* Header */
  .nav {
    padding: var(--space-5) 0;
  }

  /* Plans - 2 columns */
  .plans__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* About */
  .about__stats {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Footer */
  .footer__content {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

/* ============================================
   DESKTOP
   1024px and up
   ============================================ */

@media (min-width: 1024px) {
  /* Typography */
  h1,
  .hero__title {
    font-size: var(--font-size-6xl);
  }

  h2,
  .section__title {
    font-size: var(--font-size-4xl);
  }

  /* Container */
  .container {
    padding-left: var(--container-padding-desktop);
    padding-right: var(--container-padding-desktop);
  }

  /* Section padding */
  .section {
    padding-top: var(--section-padding-desktop);
    padding-bottom: var(--section-padding-desktop);
  }

  /* Header */
  .nav__logo svg {
    height: 50px;
  }

  /* Navigation menu - horizontal */
  .nav__menu {
    position: static;
    width: auto;
    height: auto;
    background: transparent;
    border: none;
    flex-direction: row;
    align-items: center;
    padding: 0;
    gap: var(--space-6);
  }

  /* Benefits - 4 columns */
  .benefits {
    grid-template-columns: repeat(4, 1fr);
  }

  /* Plans - 3 columns */
  .plans__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Devices - 3 columns */
  .devices {
    grid-template-columns: repeat(3, 1fr);
  }

  /* About */
  .about__content {
    grid-template-columns: 1.5fr 1fr;
    gap: var(--space-16);
  }

  .about__stats {
    grid-template-columns: 1fr;
  }

  /* Contact */
  .contact__content {
    grid-template-columns: 1.2fr 1fr;
    gap: var(--space-16);
  }

  /* Hero - horizontal layout if needed */
  .hero__content {
    max-width: 900px;
  }

  /* Section headers */
  .section__header {
    margin-bottom: var(--space-16);
  }
}

/* ============================================
   LARGE DESKTOP
   1280px and up
   ============================================ */

@media (min-width: 1280px) {
  /* Typography */
  .hero__title {
    font-size: var(--font-size-7xl);
  }

  /* Container max width enforced */
  .container {
    max-width: var(--container-max-width);
  }

  /* Enhanced spacing */
  .section {
    padding-top: calc(var(--section-padding-desktop) + var(--space-8));
    padding-bottom: calc(var(--section-padding-desktop) + var(--space-8));
  }

  /* Hero */
  .hero {
    min-height: 100vh;
  }

  /* Benefits spacing */
  .benefits {
    gap: var(--space-8);
  }

  /* Plans spacing */
  .plans__grid {
    gap: var(--space-10);
  }

  /* Devices spacing */
  .devices {
    gap: var(--space-8);
  }
}

/* ============================================
   EXTRA LARGE SCREENS
   1536px and up
   ============================================ */

@media (min-width: 1536px) {
  /* Optional enhancements for very large screens */
  .hero__content {
    max-width: 1000px;
  }

  .section__header {
    max-width: 800px;
  }
}

/* ============================================
   LANDSCAPE ORIENTATION
   ============================================ */

@media (max-height: 700px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding-top: calc(var(--header-height) + var(--space-12));
    padding-bottom: var(--space-12);
  }

  .section {
    padding-top: var(--space-12);
    padding-bottom: var(--space-12);
  }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
  .header,
  .nav,
  .btn,
  .footer {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  .section {
    page-break-inside: avoid;
  }
}

/* ============================================
   HIGH RESOLUTION DISPLAYS
   ============================================ */

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  /* Optimize for retina displays if needed */
  body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
}

/* ============================================
   DARK MODE (if system preference changes)
   ============================================ */

/* Site is already dark by default, but this ensures consistency */
@media (prefers-color-scheme: dark) {
  /* Force dark mode variables if needed */
}

/* ============================================
   TOUCH DEVICES
   ============================================ */

@media (hover: none) and (pointer: coarse) {
  /* Enhance touch targets */
  .btn {
    min-height: 44px;
    min-width: 44px;
  }

  .nav__link {
    padding: var(--space-3) 0;
  }

  .faq__question {
    padding: var(--space-5);
  }

  /* Remove hover effects on touch devices */
  .card:hover,
  .device:hover,
  .benefit:hover,
  .plan-card:hover {
    transform: none;
  }
}
