/* ================================
   Turnstone LTD - Responsive Styles
   Mobile-First Media Queries
   Dense Design with Always-Visible Menu
   ================================ */

/* ================================
   All Screens - Menu Toggle Animation
   ================================ */

/* Mobile menu toggle animation - applies to all screen sizes */
.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* ================================
   Mobile (Default)
   < 768px
   ================================ */

@media (max-width: 767px) {
  /* Hero adjustments */
  .hero h1 {
    font-size: var(--font-size-2xl);
  }

  .hero p {
    font-size: var(--font-size-base);
  }

  /* Button adjustments */
  .btn-group {
    flex-direction: column;
    align-items: stretch;
  }

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

  /* Section spacing - more compact on mobile */
  .section {
    padding: var(--space-lg) 0;
  }

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

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

  h3 {
    font-size: var(--font-size-lg);
  }

  /* Container padding */
  .container,
  .container-narrow {
    padding: 0 var(--space-sm);
  }

  /* Card grid - single column on mobile */
  .card-grid {
    grid-template-columns: 1fr;
  }
}

/* ================================
   Tablet
   768px - 1023px
   ================================ */

@media (min-width: 768px) and (max-width: 1023px) {
  /* Hero adjustments */
  .hero h1 {
    font-size: var(--font-size-3xl);
  }

  /* Card grid - 2 columns on tablet */
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Container padding */
  .container,
  .container-narrow {
    padding: 0 var(--space-md);
  }
}

/* ================================
   Desktop
   >= 1024px
   ================================ */

@media (min-width: 1024px) {
  /* Larger hero text */
  .hero h1 {
    font-size: var(--font-size-4xl);
  }

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

  /* Card grid - 3 columns on desktop */
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Button group - horizontal on desktop */
  .btn-group {
    flex-direction: row;
    justify-content: center;
  }

  /* Hover effects only on devices that support hover */
  @media (hover: hover) {
    .card:hover {
      transform: translateY(-4px);
    }
  }
}

/* ================================
   Large Desktop
   >= 1440px
   ================================ */

@media (min-width: 1440px) {
  :root {
    --font-size-base: 16px;
  }

  .container {
    max-width: 1400px;
  }
}

/* ================================
   Print Styles
   ================================ */

@media print {
  .header,
  .footer,
  .menu-toggle,
  .btn {
    display: none;
  }

  .section {
    padding: var(--space-sm) 0;
  }

  body {
    color: black;
  }

  a {
    color: black;
    text-decoration: underline;
  }
}

/* ================================
   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;
  }
}

/* ================================
   Dark Mode Support (Future)
   ================================ */

@media (prefers-color-scheme: dark) {
  /* Uncomment to enable dark mode in the future */
  /*
  :root {
    --color-primary: #f5f5f5;
    --color-secondary: #d4d4d4;
    --color-background: #1a1a1a;
    --color-background-alt: #2a2a2a;
    --color-border: #404040;
    --color-text: #f5f5f5;
    --color-text-light: #a3a3a3;
  }

  .header {
    background-color: var(--color-background);
  }

  .card {
    background-color: var(--color-background-alt);
  }
  */
}
