/* ==========================================================================
   2357 Photography — responsive.css
   Mobile-first breakpoint overrides.
   Breakpoints: 480px | 768px | 1024px | 1440px
   ========================================================================== */

/* --------------------------------------------------------------------------
   Base styles in style.css are written for desktop-first for readability,
   but the responsive overrides here bring it to full mobile-first behaviour.
   -------------------------------------------------------------------------- */

/* ==========================================================================
   SMALL MOBILE — max-width: 479px
   ========================================================================== */
@media (max-width: 479px) {
  /* Nav — hamburger visible, links stacked */
  .nav__hamburger { display: flex; }

  .nav__links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--color-bg-dark);
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .nav__links.is-open {
    transform: translateX(0);
  }

  .nav__link {
    font-size: 1rem;
    letter-spacing: 0.12em;
  }

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

  .hero__content h1 {
    font-size: 2rem;
  }

  /* Teasers: stacked on tiny screens */
  .teasers {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .teaser {
    aspect-ratio: 3 / 2;
  }

  /* Featured grid: 1 col */
  .featured-grid {
    grid-template-columns: 1fr;
  }

  /* Masonry: 1 column */
  .masonry-grid {
    column-count: 1;
  }

  /* About layout: stacked */
  .about-layout {
    grid-template-columns: 1fr;
  }

  .about-portrait {
    position: static;
  }

  .about-portrait img {
    aspect-ratio: 4 / 3;
  }

  /* External cards: stacked */
  .external-links {
    grid-template-columns: 1fr;
  }

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

  /* Contact: stacked */
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  /* Footer: stacked */
  .footer__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer__external {
    text-align: center;
  }

  .footer__nav ul {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }

  /* Lightbox: smaller controls on tiny screens */
  .lightbox__prev { left: 0.5rem; width: 40px; height: 40px; font-size: 1.1rem; }
  .lightbox__next { right: 0.5rem; width: 40px; height: 40px; font-size: 1.1rem; }
}

/* ==========================================================================
   TABLET — max-width: 767px
   ========================================================================== */
@media (max-width: 767px) {
  /* Nav */
  .nav__hamburger { display: flex; }

  .nav__links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--color-bg-dark);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2.25rem;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 99;
  }

  .nav__links.is-open {
    transform: translateX(0);
  }

  .nav__link {
    font-size: 0.9rem;
    letter-spacing: 0.15em;
  }

  /* Teasers: 1 column */
  .teasers {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .teaser {
    aspect-ratio: 16 / 9;
  }

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

  /* Masonry: 2 columns */
  .masonry-grid {
    column-count: 2;
  }

  /* About */
  .about-layout {
    grid-template-columns: 1fr;
  }

  .about-portrait {
    position: static;
    max-width: 360px;
    margin-inline: auto;
  }

  /* External links */
  .external-links {
    grid-template-columns: 1fr;
  }

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

  /* Contact */
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  /* Footer */
  .footer__inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }

  .footer__external {
    text-align: center;
  }

  .footer__nav ul {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* ==========================================================================
   TABLET LANDSCAPE / SMALL DESKTOP — max-width: 1023px
   ========================================================================== */
@media (max-width: 1023px) {
  /* Teasers: 1 row of 3 — preserve, or go 1×3 stacked */
  /* At this size, still 3-column teasers but reduce aspect ratio */
  .teasers {
    grid-template-columns: repeat(3, 1fr);
  }

  .teaser {
    aspect-ratio: 3 / 4;
  }

  /* Featured grid: 3 cols still fine */

  /* About: 2 col but narrower portrait */
  .about-layout {
    grid-template-columns: 1fr 1.8fr;
    gap: 2.5rem;
  }

  /* Pricing: 2×2 grid — keep gap tighter on mid screens */
  .pricing-grid {
    gap: 1rem;
  }

  .pricing-card {
    padding: 2rem 1.5rem;
  }

  /* Contact: stacked on narrow-ish landscape */
  .contact-layout {
    gap: 3rem;
  }
}

/* ==========================================================================
   768–1023 range (tablet portrait, overrides on top of max-767 block)
   ========================================================================== */
@media (min-width: 768px) and (max-width: 1023px) {
  /* Teasers: 2 columns at tablet portrait */
  .teasers {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  /* Pricing: 2 columns at tablet */
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Contact: 2 col at tablet */
  .contact-layout {
    grid-template-columns: 1fr 1.4fr;
  }

  /* Footer: 2 col grid (brand + nav left, external right) */
  .footer__inner {
    grid-template-columns: 1fr auto;
    text-align: left;
  }

  .footer__nav {
    grid-row: 1 / span 2;
    grid-column: 2;
    align-self: start;
  }

  .footer__external {
    text-align: left;
    grid-column: 1;
  }
}

/* ==========================================================================
   LARGE DESKTOP — min-width: 1440px
   ========================================================================== */
@media (min-width: 1440px) {
  /* Masonry: 4 columns on very wide screens */
  .masonry-grid {
    column-count: 4;
  }

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

  /* Hero text larger */
  .hero__content h1 {
    font-size: 5.5rem;
  }
}

/* ==========================================================================
   REDUCED MOTION — respect user preference
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }

  .hero__image {
    transition: none;
  }
}

/* ==========================================================================
   PRINT — basic print styles
   ========================================================================== */
@media print {
  .site-header,
  .site-footer,
  .lightbox,
  .filter-bar {
    display: none;
  }

  .page-body {
    padding-top: 0;
  }

  .masonry-grid {
    column-count: 2;
  }
}
