/* ==========================================================================
   Responsive Styles - Hayden Creek Luxe Salon
   ========================================================================== */

/* -------------------------------------------------------------------------
   Large Desktop (1400px and below)
   ------------------------------------------------------------------------- */

@media (max-width: 1400px) {
  .container {
    max-width: var(--container-lg);
  }
}

/* -------------------------------------------------------------------------
   Desktop (1200px and below)
   ------------------------------------------------------------------------- */

@media (max-width: 1200px) {
  .footer__grid {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .footer__brand {
    grid-column: 1 / -1;
    max-width: none;
    margin-bottom: var(--space-8);
  }
}

/* -------------------------------------------------------------------------
   Tablet Landscape (1024px and below)
   ------------------------------------------------------------------------- */

@media (max-width: 1024px) {
  :root {
    --text-5xl: 2.5rem;
    --text-6xl: 3rem;
  }

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

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

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

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

  /* Features Section */
  .features {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .features__image-container {
    order: -1;
    max-width: 400px;
  }

  .features__list {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    gap: var(--space-4);
    padding-bottom: var(--space-4);
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .features__list::-webkit-scrollbar {
    display: none;
  }

  .features__item {
    flex: 0 0 280px;
    scroll-snap-align: start;
  }
}

/* -------------------------------------------------------------------------
   Tablet Portrait (768px and below)
   ------------------------------------------------------------------------- */

@media (max-width: 768px) {
  :root {
    --text-4xl: 2rem;
    --text-5xl: 2.25rem;
  }

  /* Navigation - Mobile */
  .nav__menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background-color: var(--color-white);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: var(--space-8);
    transition: right var(--transition-base);
    box-shadow: var(--shadow-xl);
    z-index: var(--z-fixed);
  }

  .nav__menu.active {
    right: 0;
  }

  .nav__menu .nav__link {
    color: var(--color-charcoal);
    font-size: var(--text-lg);
  }

  .nav__toggle {
    display: flex;
    z-index: calc(var(--z-fixed) + 1);
  }

  /* Mobile menu overlay */
  .nav__overlay {
    position: fixed;
    inset: 0;
    background-color: var(--color-overlay);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
    z-index: calc(var(--z-fixed) - 1);
  }

  .nav__overlay.active {
    opacity: 1;
    visibility: visible;
  }

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

  .footer__bottom {
    flex-direction: column;
    gap: var(--space-4);
    text-align: center;
  }

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

  .grid-cols-2 {
    grid-template-columns: 1fr;
  }

  /* Page Hero */
  .page-hero {
    height: 40vh;
    min-height: 300px;
  }

  .page-hero__title {
    font-size: var(--text-4xl);
  }

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

  /* Section Header */
  .section-header__title {
    font-size: var(--text-3xl);
  }

  /* Features Section */
  .features__icon {
    width: 40px;
    height: 40px;
  }

  .features__icon svg {
    width: 20px;
    height: 20px;
  }

  .features__item {
    flex: 0 0 250px;
  }
}

/* -------------------------------------------------------------------------
   Mobile (576px and below)
   ------------------------------------------------------------------------- */

@media (max-width: 576px) {
  :root {
    --text-3xl: 1.5rem;
    --text-4xl: 1.75rem;
    --text-5xl: 2rem;
  }

  html {
    font-size: 15px;
  }

  .container {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }

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

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

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

  /* Cards */
  .grid-cols-3,
  .grid-cols-4 {
    grid-template-columns: 1fr;
  }

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

  .btn--lg {
    padding: var(--space-4) var(--space-6);
  }

  /* Page Hero */
  .page-hero {
    height: 35vh;
    min-height: 250px;
  }

  .page-hero__title {
    font-size: var(--text-3xl);
  }

  .page-hero__subtitle {
    font-size: var(--text-base);
  }

  /* CTA */
  .cta__title {
    font-size: var(--text-2xl);
  }

  .cta__text {
    font-size: var(--text-base);
  }

  /* Gallery */
  .gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-2);
  }

  /* Team Card */
  .team-card__name {
    font-size: var(--text-xl);
  }
}

/* -------------------------------------------------------------------------
   Small Mobile (380px and below)
   ------------------------------------------------------------------------- */

@media (max-width: 380px) {
  html {
    font-size: 14px;
  }

  .container {
    padding-left: var(--space-3);
    padding-right: var(--space-3);
  }

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

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

/* -------------------------------------------------------------------------
   Print Styles
   ------------------------------------------------------------------------- */

@media print {
  .header,
  .footer,
  .nav__toggle {
    display: none;
  }

  body {
    background: white;
    color: black;
  }

  a {
    text-decoration: underline;
  }
}
