/* Responsive Styles for Appalachian North Technologies Website */

/* ===== RESPONSIVE BREAKPOINTS ===== */
/* 
  Mobile-first approach:
  - Base styles are for mobile (320px+)
  - sm: 480px and up (small phones landscape, large phones portrait)
  - md: 768px and up (tablets portrait)
  - lg: 1024px and up (tablets landscape, small laptops)
  - xl: 1280px and up (laptops, desktops)
  - 2xl: 1536px and up (large desktops)
*/

/* ===== BASE MOBILE STYLES (320px+) ===== */
/* Most styles are already mobile-first in main.css */

/* Mobile-specific background image adjustments */
@media (max-width: 767px) {
    body {
        background-size: cover;
        background-attachment: fixed;
        background-repeat: no-repeat;
        background-position: center;
    }
}

/* ===== SMALL MOBILE ADJUSTMENTS (480px+) ===== */
@media (min-width: 480px) {
    :root {
        --container-padding: var(--space-xl);
    }
    
    .hero-headline {
        font-size: var(--text-6xl);
    }
    
    .hero-subheadline {
        font-size: var(--text-2xl);
    }
}

/* ===== TABLET PORTRAIT (768px+) ===== */
@media (min-width: 768px) {
    :root {
        --container-padding: var(--space-2xl);
    }
    
    /* Desktop background image - restore original cover behavior */
    body {
        background-size: cover;
        background-attachment: fixed;
        background-position: center 40%;
    }
    
    /* Hero Section */
    .hero-section {
        padding: var(--space-5xl) 0 var(--space-5xl);
        background-attachment: scroll; /* Better performance on mobile */
    }
    
    .hero-headline {
        font-size: 4rem; /* 64px */
        line-height: 1.1;
    }
    
    .hero-subheadline {
        font-size: var(--text-2xl);
    }
    
    /* Sections */
    section {
        margin-bottom: var(--space-5xl);
    }
    
    .section-heading {
        font-size: var(--text-4xl);
    }
    
    /* Typography adjustments */
    .approach-description,
    .bio-text {
        font-size: var(--text-xl);
    }
    
    .contact-description {
        font-size: var(--text-xl);
    }
    
    .contact-email {
        font-size: var(--text-2xl);
        padding: var(--space-lg) var(--space-2xl);
    }
}

/* ===== TABLET LANDSCAPE / SMALL LAPTOP (1024px+) ===== */
@media (min-width: 1024px) {
    :root {
        --container-padding: var(--space-3xl);
    }
    
    /* Hero Section */
    .hero-section {
        padding: var(--space-5xl) 0 var(--space-5xl);
    }
    
    .hero-content {
        max-width: 800px;
    }
    
    .hero-headline {
        font-size: 4.5rem; /* 72px */
        margin-bottom: var(--space-2xl);
    }
    
    /* Sections get more spacing */
    section {
        margin-bottom: 8rem; /* 128px */
    }
    
    .approach-section,
    .team-section,
    .contact-section {
        padding: var(--space-3xl) 0;
    }
    
    /* Team Section - Side-by-side layout optimization */
    .team-content {
        max-width: 900px;
    }
    
    .team-member-image {
        width: 160px;
        height: 160px;
    }
    
    /* Contact section */
    .contact-content {
        max-width: 600px;
    }
}

/* ===== DESKTOP (1280px+) ===== */
@media (min-width: 1280px) {
    :root {
        --container-max-width: 900px;
    }
    
    /* Hero Section */
    .hero-section {
        padding: 8rem 0 10rem; /* 128px 0 160px */
    }
    
    .hero-headline {
        font-size: 5rem; /* 80px */
        margin-bottom: var(--space-2xl);
    }
    
    .hero-subheadline {
        font-size: var(--text-3xl);
    }
    
    /* Enhanced spacing for desktop */
    .approach-section,
    .team-section,
    .contact-section {
        padding: var(--space-4xl) 0;
    }
    
    /* Team Section */
    .team-content {
        max-width: 950px;
    }
    
    .team-member {
        gap: var(--space-4xl);
    }
    
    .team-member-image {
        width: 180px;
        height: 180px;
    }
}

/* ===== LARGE DESKTOP (1536px+) ===== */
@media (min-width: 1536px) {
    :root {
        --container-max-width: 1000px;
    }
    
    /* Ultra-wide desktop optimizations */
    .hero-section {
        padding: 10rem 0 12rem; /* 160px 0 192px */
    }
    
    .hero-content {
        max-width: 900px;
    }
    
    .hero-headline {
        font-size: 5.5rem; /* 88px */
    }
}

/* ===== HIGH-DPI DISPLAYS ===== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Ensure images and graphics are crisp on high-DPI displays */
    .team-member-image {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* ===== MOBILE-SPECIFIC ADJUSTMENTS ===== */

/* Very small screens */
@media (max-width: 360px) {
    :root {
        --container-padding: var(--space-md);
    }
    
    .hero-headline {
        font-size: var(--text-4xl);
        line-height: var(--leading-tight);
    }
    
    .hero-subheadline {
        font-size: var(--text-lg);
    }
    
    .section-heading {
        font-size: var(--text-2xl);
    }
}

/* Mobile landscape orientation */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-section {
        padding: var(--space-2xl) 0 var(--space-3xl);
    }
    
    section {
        margin-bottom: var(--space-3xl);
    }
    
    .approach-section,
    .team-section,
    .contact-section {
        padding: var(--space-xl) 0;
    }
}

/* ===== MOBILE TEAM SECTION STACK ===== */
@media (max-width: 640px) {
    .team-member {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: var(--space-xl);
    }
    
    .team-member-image {
        width: 120px;
        height: 120px;
    }
    
    .team-member-bio {
        text-align: center;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    body {
        background: white;
        color: black;
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .hero-section,
    .approach-section,
    .team-section,
    .contact-section {
        padding: 1rem 0;
        margin-bottom: 1.5rem;
        page-break-inside: avoid;
    }
    
    .hero-headline {
        font-size: 24pt;
        margin-bottom: 0.5rem;
    }
    
    .section-heading {
        font-size: 18pt;
        margin-bottom: 0.5rem;
    }
    
    .team-member-image {
        width: 80px;
        height: 80px;
        filter: grayscale(100%);
    }
    
    .contact-email {
        border: 1px solid black;
        padding: 0.25rem 0.5rem;
        color: black;
        text-decoration: underline;
    }
    
    .site-footer {
        margin-top: 2rem;
        padding-top: 1rem;
        border-top: 1px solid black;
    }
    
    /* Hide elements not useful in print */
    .skip-link {
        display: none;
    }
}

/* ===== ACCESSIBILITY ENHANCEMENTS ===== */

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --color-background: #ffffff;
        --color-text-primary: #000000;
        --color-text-secondary: #333333;
        --color-accent: #0066cc;
        --color-border: #000000;
    }
    
    .contact-email {
        border-width: 3px;
    }
    
    .team-member-image {
        filter: contrast(1.2);
    }
}

/* Dark mode support (if user prefers) */
@media (prefers-color-scheme: dark) {
    :root {
        --color-background: #1a1a1a;
        --color-text-primary: #f0f0f0;
        --color-text-secondary: #cccccc;
        --color-accent: #66b3ff;
        --color-accent-hover: #4da6ff;
        --color-border: #333333;
    }
    
    .team-member-image {
        filter: grayscale(100%) brightness(0.9);
    }
    
    .team-member-image:hover {
        filter: grayscale(0%) brightness(1);
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .contact-email:hover {
        transform: none;
    }
    
    .team-member-image {
        transition: none;
    }
}
