/* ================================================================
   JUSTIN OLDMIXON PHOTOGRAPHY — RESPONSIVE STYLESHEET
   Mobile-first breakpoints:
   - Base: mobile (<768px)
   - Tablet: 768px
   - Desktop: 1024px
   - Large desktop: 1400px
   ================================================================ */

/* ----------------------------------------------------------------
   TABLET — 768px+
   ---------------------------------------------------------------- */
@media (min-width: 768px) {

  /* Portfolio Grid: show descriptions on large tiles */
  .portfolio__tile--large .portfolio__tile-desc {
    display: block;
  }

  /* Gallery: 2 columns */
  .gallery__grid {
    columns: 2;
  }

}

/* ----------------------------------------------------------------
   DESKTOP — 1024px+
   ---------------------------------------------------------------- */
@media (min-width: 1024px) {

  /* Portfolio tile descriptions always shown on hover */
  .portfolio__tile:hover .portfolio__tile-desc {
    display: block;
  }

  /* Gallery: 3 columns */
  .gallery__grid {
    columns: 3;
  }

}

/* ----------------------------------------------------------------
   LARGE DESKTOP — 1400px+
   ---------------------------------------------------------------- */
@media (min-width: 1400px) {
  .portfolio__tile-title {
    font-size: 2rem;
  }
}

/* ================================================================
   MAX-WIDTH BREAKPOINTS (overrides for smaller screens)
   ================================================================ */

/* ----------------------------------------------------------------
   BELOW DESKTOP — <1024px
   ---------------------------------------------------------------- */
@media (max-width: 1023px) {

  /* Nav: hide desktop links and social, show hamburger */
  .nav__links,
  .nav__social,
  .nav__cta {
    display: none;
  }

  .nav__hamburger {
    display: flex;
  }

  /* About: stack vertically */
  .about__grid {
    grid-template-columns: 1fr;
  }

  .about__photo {
    max-width: 480px;
    margin-inline: auto;
  }

  /* Contact: stack vertically */
  .contact__grid {
    grid-template-columns: 1fr;
  }

}

/* ----------------------------------------------------------------
   BELOW TABLET — <768px
   ---------------------------------------------------------------- */
@media (max-width: 767px) {

  /* Global */
  :root {
    --space-3xl: 4rem;
    --space-2xl: 2.5rem;
  }

  .container {
    padding-inline: var(--space-md);
  }

  /* Hero */
  .hero__headline {
    font-size: clamp(1.75rem, 8vw, 2.5rem);
  }

  .hero__sub {
    font-size: 0.9375rem;
  }

  .hero__br {
    display: none;
  }

  .hero__props {
    flex-direction: column;
    gap: var(--space-sm);
  }

  .hero__ctas {
    flex-direction: column;
  }

  .hero__ctas .btn {
    width: 100%;
    justify-content: center;
  }

  /* Portfolio grid: single column on mobile */
  .portfolio__grid {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .portfolio__tile--large {
    grid-column: span 1;
    aspect-ratio: 3 / 2;
  }

  .portfolio__tile:not(.portfolio__tile--large),
  .portfolio__tile--small {
    aspect-ratio: 4 / 3;
  }

  /* Always show desc on mobile (no hover) */
  .portfolio__tile-desc,
  .portfolio__tile-link {
    display: block !important;
    opacity: 1 !important;
    transform: none !important;
  }

  /* Pricing: single column */
  .pricing__cards {
    grid-template-columns: 1fr;
  }

  /* Gallery: single column */
  .gallery__grid {
    columns: 1;
  }

  /* FAQ */
  .faq__question {
    padding: var(--space-sm) var(--space-md);
  }

  .faq__answer {
    padding: var(--space-sm) var(--space-md) var(--space-md);
  }

  /* Footer */
  .footer__social {
    flex-wrap: wrap;
    justify-content: center;
  }

  /* Lightbox */
  .lightbox__prev,
  .lightbox__next {
    height: 48px;
    width: 36px;
  }

  .lightbox__prev {
    left: var(--space-xs);
  }

  .lightbox__next {
    right: var(--space-xs);
  }

  /* Safe space */
  .safespace__values {
    grid-template-columns: repeat(2, 1fr);
    display: grid;
  }

  /* Contact */
  .contact__socials {
    flex-direction: column;
  }

  /* Buttons full width in mobile form */
  .contact__form .btn {
    width: 100%;
  }

}

/* ----------------------------------------------------------------
   VERY SMALL SCREENS — <400px
   ---------------------------------------------------------------- */
@media (max-width: 399px) {

  .pricing__filter {
    gap: 4px;
  }

  .pricing__filter-btn {
    padding: 6px 12px;
    font-size: 0.625rem;
  }

  .hero__badge {
    font-size: 0.625rem;
  }

}

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

  .hero__scroll {
    animation: none;
  }
}

/* ----------------------------------------------------------------
   HIGH CONTRAST PREFERENCES
   ---------------------------------------------------------------- */
@media (prefers-contrast: high) {
  :root {
    --color-border: rgba(255, 255, 255, 0.3);
    --color-text-secondary: #cccccc;
    --color-text-tertiary: #aaaaaa;
  }
}
