/*
 * 8:28 Solutions - Responsive Stylesheet
 * Mobile-first media queries
 */

/* ===================================
   MOBILE (Base styles)
   =================================== */

/* Simplify decorative elements on mobile */
@media (max-width: 47.9375rem) {
  .blob--3 {
    display: none;
  }

  .blob--1,
  .blob--2 {
    width: 300px;
    height: 300px;
    opacity: 0.08;
  }

  .section--decorated::before,
  .section--decorated::after {
    width: 200px;
    height: 200px;
  }

  /* Disable parallax on mobile (doesn't work well on touch devices) */
  .parallax {
    background-attachment: scroll;
    min-height: 400px;
  }

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

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

/* ===================================
   TABLET (768px and up)
   =================================== */
@media (min-width: 48rem) {
  /* Typography scaling */
  h1 {
    font-size: var(--font-size-5xl);
  }

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

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

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

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

  .grid--3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Header - Show desktop navigation */
  .mobile-menu-toggle {
    display: none;
  }

  .nav {
    display: block !important;
  }

  .nav.open {
    position: static;
    box-shadow: none;
    padding: 0;
    background-color: transparent;
  }

  .nav__list {
    flex-direction: row !important;
  }

  .nav.open .nav__link {
    border-bottom: none;
    padding: var(--space-2) 0;
  }

  /* Footer Grid */
  .footer__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Hero Section */
  .hero__title {
    font-size: var(--font-size-5xl);
  }

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

  .hero__cta {
    flex-wrap: nowrap;
  }

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

  /* Enable parallax on larger screens */
  .parallax {
    background-attachment: fixed;
  }

  /* Adjust blob sizes for tablet */
  .blob--1 {
    width: 600px;
    height: 600px;
  }

  .blob--2 {
    width: 500px;
    height: 500px;
  }
}

/* ===================================
   DESKTOP (1024px and up)
   =================================== */
@media (min-width: 64rem) {
  /* Container padding */
  .container {
    padding-left: var(--space-8);
    padding-right: var(--space-8);
  }

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

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

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

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

/* ===================================
   LARGE DESKTOP (1280px and up)
   =================================== */
@media (min-width: 80rem) {
  /* Larger typography on very large screens */
  .hero__title {
    font-size: 3.75rem; /* 60px */
  }

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

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

  a,
  a:visited {
    text-decoration: underline;
  }

  a[href]::after {
    content: " (" attr(href) ")";
  }

  abbr[title]::after {
    content: " (" attr(title) ")";
  }

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

  .container {
    max-width: 100%;
  }

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

  img {
    max-width: 100% !important;
  }

  p, h2, h3 {
    orphans: 3;
    widows: 3;
  }
}

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