/* Responsive Design for Campfire Marketing Site */

/* ===== MOBILE STYLES (<768px) ===== */
@media (max-width: 767px) {
  /* Container adjustments */
  .container {
    padding: 0 var(--space-4);
  }

  /* Typography adjustments */
  h1 {
    font-size: var(--text-3xl);
  }

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

  h3 {
    font-size: var(--text-xl);
  }

  .hero-text h1 {
    font-size: var(--text-4xl);
  }

  .hero-subtitle {
    font-size: var(--text-lg);
  }

  /* Header mobile styles */
  .nav {
    display: none;
  }

  .mobile-menu-toggle {
    display: block;
  }

  /* Hero section mobile */
  .hero {
    padding: var(--space-12) 0;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .hero-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-lg {
    width: 100%;
    text-align: center;
  }

  /* Features mobile */
  .features {
    padding: var(--space-12) 0;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
    margin-top: var(--space-8);
  }

  /* Cards mobile */
  .card {
    padding: var(--space-4);
  }

  /* Grid mobile */
  .grid-cols-2,
  .grid-cols-3 {
    grid-template-columns: 1fr;
  }

  /* Footer mobile */
  .footer {
    padding: var(--space-12) 0 var(--space-6) 0;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  /* Hero text mobile */
  .hero-text {
    padding: 2rem;
  }

  /* Pricing cards mobile */
  .pricing-cards {
    grid-template-columns: 1fr;
  }

  .pricing-card.popular {
    transform: scale(1);
  }

  /* Mobile nav improvements */
  .mobile-nav {
    display: block;
  }

  /* Spacing adjustments */
  .hero,
  .features,
  section {
    padding-top: var(--space-12);
    padding-bottom: var(--space-12);
  }
}

/* ===== TABLET STYLES (768px - 1024px) ===== */
@media (min-width: 768px) and (max-width: 1023px) {
  /* Container adjustments */
  .container {
    padding: 0 var(--space-5);
  }

  /* Hero section tablet */
  .hero-content {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-10);
  }

  .hero-text h1 {
    font-size: var(--text-4xl);
  }

  /* Features tablet */
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
  }

  /* Grid tablet */
  .grid-cols-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Footer tablet */
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Pricing cards tablet */
  .pricing-cards {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin: 0 auto;
  }
}

/* ===== DESKTOP STYLES (>1024px) ===== */
@media (min-width: 1024px) {
  /* Hero section desktop */
  .hero-content {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-16);
  }

  .hero-text {
    align-self: center;
  }

  .hero-text h1 {
    font-size: var(--text-5xl);
  }

  .hero-image {
    align-self: center;
    margin-top: 0;
  }

  .hero-image img {
    max-width: 90%;
    margin: 0 auto;
    display: block;
  }

  /* Features desktop */
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Navigation desktop hover effects */
  .nav-link {
    position: relative;
  }

  .nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-600);
    transition: width 0.3s ease;
  }

  .nav-link:hover::after {
    width: 100%;
  }

  /* Card hover effects enhanced */
  .card:hover {
    transform: translateY(-4px);
  }

  /* Button hover effects enhanced */
  .btn {
    position: relative;
    overflow: hidden;
  }

  .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
  }

  .btn:hover::before {
    left: 100%;
  }
}

/* ===== LARGE DESKTOP STYLES (>1200px) ===== */
@media (min-width: 1200px) {
  /* Container max width */
  .container {
    max-width: var(--container-xl);
  }

  /* Hero section large desktop */
  .hero {
    padding: var(--space-24) 0;
  }

  .features {
    padding: var(--space-24) 0;
  }

  /* Typography enhancements */
  .hero-text h1 {
    font-size: 3.5rem; /* Larger than text-5xl */
  }
}

/* ===== ACCESSIBILITY MEDIA QUERIES ===== */

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .btn::before {
    display: none;
  }

  .card:hover {
    transform: none;
  }

  html {
    scroll-behavior: auto;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --primary-600: #0066cc;
    --primary-700: #0052a3;
    --neutral-700: #000000;
    --neutral-800: #000000;
  }

  .btn {
    border-width: 2px;
  }

  .form-input:focus {
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.3);
    border-width: 2px;
  }
}


/* ===== PRINT STYLES ===== */
@media print {
  * {
    background: white !important;
    color: black !important;
    box-shadow: none !important;
  }

  .header,
  .mobile-menu-toggle,
  .mobile-nav,
  .btn,
  .footer {
    display: none !important;
  }

  .hero {
    padding: var(--space-6) 0;
  }

  .features {
    padding: var(--space-6) 0;
  }

  .hero-text h1,
  h1, h2, h3 {
    page-break-after: avoid;
  }

  .card {
    page-break-inside: avoid;
    border: 1px solid #ccc;
    margin-bottom: var(--space-4);
  }
}

/* ===== FOCUS STYLES FOR KEYBOARD NAVIGATION ===== */
.btn:focus,
.nav-link:focus,
.mobile-nav-link:focus,
.form-input:focus,
.form-select:focus {
  outline: 2px solid var(--primary-600);
  outline-offset: 2px;
}

/* Skip link for screen readers */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--primary-600);
  color: white;
  padding: 8px;
  text-decoration: none;
  border-radius: var(--radius);
  z-index: 9999;
}

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