/* ============================================================================
   AUBURY & CO — RESPONSIVE DESIGN
   Mobile-first breakpoints and adaptive layouts
   ============================================================================ */

/* ============================================================================
   MOBILE (xs: 375px - 640px)
   Base mobile styles are in other files (mobile-first)
   ============================================================================ */

@media (max-width: 375px) {
  :root {
    --text-6xl: 2.25rem;
    --text-5xl: 1.875rem;
    --text-4xl: 1.5rem;
    --space-8: 1.5rem;
    --space-10: 2rem;
  }

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

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

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

  .section {
    padding: var(--space-8) var(--space-4);
  }

  .navbar {
    padding: var(--space-3) var(--space-4);
  }

  .navbar-menu {
    gap: var(--space-4);
  }

  .btn {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
  }
}

/* ============================================================================
   SMALL TABLETS (sm: 640px - 768px)
   ============================================================================ */

@media (min-width: 640px) {
  .container {
    padding: 0 var(--space-8);
  }

  .section {
    padding: var(--space-16) var(--space-8);
  }

  .hero {
    height: 90vh;
  }

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

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-8);
  }

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

  .image-strip-item:nth-child(3) {
    display: none;
  }

  .about-preview {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-10);
  }

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

  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-8);
  }

  .cta-section-contact {
    flex-wrap: wrap;
    gap: var(--space-6);
  }

  .footer-content {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-10);
  }
}

/* ============================================================================
   TABLETS (md: 768px - 1024px)
   ============================================================================ */

@media (min-width: 768px) {
  .container {
    padding: 0 var(--space-8);
  }

  .section {
    padding: var(--space-20) var(--space-8);
  }

  .hero {
    height: 100vh;
  }

  .navbar-toggle {
    display: none;
  }

  .navbar-menu {
    flex-direction: row;
    gap: var(--space-8);
    padding: 0;
    background: transparent;
    max-height: auto;
    position: static;
  }

  .navbar-menu--open {
    max-height: auto;
  }

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

  .split-image {
    order: 2;
  }

  .split-content {
    order: 1;
  }

  .split-reverse .split-image {
    order: 1;
  }

  .split-reverse .split-content {
    order: 2;
  }

  .services-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-10);
  }

  .image-strip {
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
  }

  .image-strip-item {
    height: 400px;
  }

  .image-strip-item:nth-child(3) {
    display: block;
  }

  .project-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-8);
  }

  .about-preview {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12);
  }

  .about-preview-image {
    order: 1;
  }

  .about-preview-content {
    order: 2;
  }

  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-10);
  }

  .footer-content {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-12);
  }

  .footer-bottom {
    justify-content: space-between;
  }

  .card {
    height: 100%;
  }

  .split-content h2 {
    font-size: var(--text-4xl);
  }
}

/* ============================================================================
   LARGE SCREENS (lg: 1024px - 1280px)
   ============================================================================ */

@media (min-width: 1024px) {
  :root {
    --text-6xl: 3.75rem;
  }

  .container {
    max-width: 1200px;
    padding: 0 var(--space-8);
    margin: 0 auto;
  }

  .section {
    padding: var(--space-24) var(--space-8);
  }

  .hero {
    height: 100vh;
  }

  .hero-brand {
    font-size: var(--text-6xl);
  }

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

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

  .split {
    gap: var(--space-16);
    align-items: center;
  }

  .split-content h2 {
    font-size: var(--text-5xl);
  }

  .services-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-12);
  }

  .service-icon {
    width: 100px;
    height: 100px;
    font-size: var(--text-5xl);
  }

  .project-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-10);
  }

  .about-preview {
    gap: var(--space-16);
  }

  .about-preview-content h2 {
    font-size: var(--text-5xl);
  }

  .testimonials-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-12);
  }

  .footer-content {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-16);
  }

  .image-divider {
    height: 60vh;
  }

  .cta-section {
    padding: var(--space-24) var(--space-16);
    border-radius: var(--radius-2xl);
  }

  .cta-section h2 {
    font-size: var(--text-5xl);
  }
}

/* ============================================================================
   EXTRA LARGE SCREENS (xl: 1280px - 1536px)
   ============================================================================ */

@media (min-width: 1280px) {
  .container {
    max-width: 1280px;
  }

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

  .section {
    padding: var(--space-32) var(--space-8);
  }

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

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

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

/* ============================================================================
   ULTRA WIDE SCREENS (2xl: 1536px+)
   ============================================================================ */

@media (min-width: 1536px) {
  .container {
    max-width: 1400px;
  }

  :root {
    --text-6xl: 4.5rem;
  }

  .hero-brand {
    font-size: var(--text-6xl);
  }

  .section {
    padding: var(--space-32) var(--space-16);
  }

  .footer-content {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* ============================================================================
   DEVICE-SPECIFIC ADJUSTMENTS
   ============================================================================ */

/* iPad / Tablet landscape */
@media (min-width: 1024px) and (max-width: 1366px) and (orientation: landscape) {
  .hero {
    height: 80vh;
  }

  .image-divider {
    height: 50vh;
  }
}

/* iPhone X+ notch support */
@supports (padding: max(0px)) {
  body {
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
  }

  .navbar {
    padding-left: max(var(--space-8), env(safe-area-inset-left));
    padding-right: max(var(--space-8), env(safe-area-inset-right));
  }

  .footer {
    padding-bottom: max(var(--space-16), env(safe-area-inset-bottom));
  }
}

/* ============================================================================
   TOUCH DEVICE OPTIMIZATIONS
   ============================================================================ */

@media (hover: none) and (pointer: coarse) {
  /* Larger touch targets */
  .btn {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
  }

  .navbar-menu a,
  .footer a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  /* No hover effects on touch */
  .card:hover {
    transform: none;
  }

  .btn:hover {
    transform: none;
  }

  /* Active state instead */
  .btn:active {
    opacity: 0.8;
  }
}

/* ============================================================================
   LANDSCAPE MODE ADJUSTMENTS
   ============================================================================ */

@media (max-height: 600px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    height: auto;
    padding: var(--space-12) var(--space-8);
  }

  .hero-brand {
    font-size: var(--text-4xl);
  }

  .hero-scroll {
    display: none;
  }

  .image-divider {
    height: 40vh;
  }

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

/* ============================================================================
   PRINT STYLESHEET
   ============================================================================ */

@media print {
  * {
    background: transparent !important;
    color: #000 !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) ")";
  }

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

  @page {
    margin: 0.5cm;
  }

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

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

  .navbar,
  .footer,
  .btn,
  .cta-section {
    display: none !important;
  }

  body {
    padding: 0;
    margin: 0;
  }
}

/* ============================================================================
   DARK MODE (if needed in future)
   ============================================================================ */

@media (prefers-color-scheme: dark) {
  /* Currently set for light theme only */
  /* Add dark mode overrides here if needed */
}

/* ============================================================================
   HIGH CONTRAST MODE
   ============================================================================ */

@media (prefers-contrast: more) {
  :root {
    --forest: #1a2e1f;
    --forest-deep: #0d1810;
    --sage: #7aae7a;
  }

  * {
    border-width: 1px;
  }
}
