/* Responsive Design */

/* Mobile-first approach with breakpoints at 768px and 1024px */

/* Base mobile styles (default) */
@media (max-width: 767px) {
  /* Container adjustments */
  .container {
    padding: 0 1rem;
  }
  
  /* Navigation mobile styles */
  .nav-list {
    position: fixed;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(26, 26, 26, 0.98);
    backdrop-filter: blur(10px);
    flex-direction: column;
    padding: var(--spacing-lg);
    gap: var(--spacing-md);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-medium);
    border-top: 1px solid var(--border-color);
    z-index: 999;
  }
  
  .nav-list.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  
  .nav-toggle {
    display: flex;
  }
  
  .nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  
  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  
  .nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }
  
  /* Hero section mobile */
  .hero {
    min-height: 100vh;
    padding: 0 1rem;
  }
  
  .hero-title {
    font-size: clamp(2.5rem, 10vw, 3.5rem);
  }
  
  .hero-subtitle {
    font-size: clamp(1rem, 4vw, 1.2rem);
  }
  
  .hero-description {
    font-size: 1rem;
  }
  
  .hero-cta {
    padding: var(--spacing-sm) var(--spacing-lg);
    font-size: 1rem;
  }
  
  /* About section mobile */
  .about-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }
  
  .about-card {
    margin-bottom: var(--spacing-lg);
  }
  
  /* Quality section mobile */
  .quality-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }
  
  .quality-card {
    padding: var(--spacing-lg);
  }
  
  /* Timeline mobile */
  .timeline::before {
    left: 30px;
  }
  
  .timeline-item {
    flex-direction: row !important;
    margin-left: 110px;
    margin-bottom: var(--spacing-lg);
    align-items: flex-start;
  }
  
  .timeline-marker {
    left: 30px !important;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    z-index: 1;
  }
  
  .timeline-content {
    margin: 0;
    padding-left: 24px;
    z-index: 3;
  }
  
  /* Features accordion mobile */
  .accordion-header {
    padding: var(--spacing-md);
    font-size: 1rem;
  }
  
  .accordion-content {
    padding: 0 var(--spacing-md) var(--spacing-md);
  }
  
  /* Contact section mobile */
  .contact-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }
  
  .contact-info {
    order: 2;
  }
  
  .contact-form {
    order: 1;
  }
  
  .info-item {
    padding: var(--spacing-md);
  }
  
  /* Footer mobile */
  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
    text-align: center;
  }
  
  .footer-logo p {
    margin: 0 auto;
  }
  
  /* Section padding mobile */
  section {
    padding: var(--spacing-xl) 0;
  }
  
  /* Typography mobile */
  .section-title {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
  }
  
  .section-subtitle {
    font-size: 1rem;
  }
  
  /* Utility classes mobile */
  .mobile-hidden {
    display: none;
  }
  
  .mobile-full {
    width: 100%;
  }
  
  .mobile-text-center {
    text-align: center;
  }
  
  /* Touch targets */
  .nav-link,
  .btn,
  .accordion-header {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  /* Reduce motion for mobile */
  @media (prefers-reduced-motion: reduce) {
    .card-3d:hover {
      transform: none;
    }
    
    .about-card:hover {
      transform: none;
    }
    
    .quality-card:hover {
      transform: none;
    }
  }
}

/* Tablet styles (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
  /* Container adjustments */
  .container {
    padding: 0 1.5rem;
  }
  
  /* Navigation tablet */
  .nav-list {
    gap: var(--spacing-md);
  }
  
  .nav-link {
    padding: var(--spacing-xs);
    font-size: 0.9rem;
  }
  
  /* Hero section tablet */
  .hero-title {
    font-size: clamp(3rem, 8vw, 4.5rem);
  }
  
  .hero-subtitle {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
  }
  
  /* About section tablet */
  .about-content {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
  }
  
  /* Quality section tablet */
  .quality-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
  }
  
  /* Timeline tablet */
  .timeline::before {
    left: 40px;
  }
  
  .timeline-item {
    flex-direction: row !important;
    margin-left: 130px;
    align-items: flex-start;
  }
  
  .timeline-marker {
    left: 40px !important;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    z-index: 1;
  }
  
  .timeline-content {
    margin: 0;
    padding-left: 28px;
    z-index: 3;
  }
  
  /* Contact section tablet */
  .contact-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
  }
  
  /* Footer tablet */
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-xl);
  }
  
  /* Section padding tablet */
  section {
    padding: var(--spacing-xxl) 0;
  }
}

/* Large tablet and small desktop (1024px - 1279px) */
@media (min-width: 1024px) and (max-width: 1279px) {
  /* Container adjustments */
  .container {
    max-width: 960px;
  }
  
  /* Quality section */
  .quality-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* Timeline */
  .timeline::before {
    left: 50%;
  }
  
  .timeline-item:nth-child(odd) {
    flex-direction: row;
  }
  
  .timeline-item:nth-child(even) {
    flex-direction: row-reverse;
  }
  
  .timeline-marker {
    left: 50% !important;
    transform: translateX(-50%);
  }
  
  .timeline-content {
    margin: 0 var(--spacing-xl);
  }
}

/* Desktop and larger (1280px+) */
@media (min-width: 1280px) {
  /* Container adjustments */
  .container {
    max-width: 1200px;
  }
  
  /* Hero section desktop */
  .hero-content {
    max-width: 900px;
  }
  
  .hero-title {
    font-size: clamp(4rem, 8vw, 6rem);
  }
  
  /* Quality section desktop */
  .quality-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* About section desktop */
  .about-content {
    grid-template-columns: repeat(3, 1fr);
  }
  
  /* Timeline desktop */
  .timeline::before {
    left: 50%;
  }
  
  .timeline-item:nth-child(odd) {
    flex-direction: row;
  }
  
  .timeline-item:nth-child(even) {
    flex-direction: row-reverse;
  }
  
  .timeline-marker {
    left: 50% !important;
    transform: translateX(-50%);
  }
  
  .timeline-content {
    margin: 0 var(--spacing-xl);
  }
}

/* Extra large screens (1440px+) */
@media (min-width: 1440px) {
  /* Container adjustments */
  .container {
    max-width: 1400px;
  }
  
  /* Typography scaling */
  html {
    font-size: 18px;
  }
  
  /* Hero section extra large */
  .hero-content {
    max-width: 1000px;
  }
  
  /* Quality section extra large */
  .quality-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Ultra wide screens (1920px+) */
@media (min-width: 1920px) {
  /* Container adjustments */
  .container {
    max-width: 1600px;
  }
  
  /* Typography scaling */
  html {
    font-size: 20px;
  }
  
  /* Hero section ultra wide */
  .hero-content {
    max-width: 1200px;
  }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  /* Ensure crisp text and borders */
  body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
  
  /* Adjust border widths for high DPI */
  .main-nav {
    border-bottom-width: 0.5px;
  }
  
  .card,
  .quality-card,
  .about-card {
    border-width: 0.5px;
  }
}

/* Orientation specific styles */
@media (orientation: landscape) and (max-width: 767px) {
  /* Landscape mobile adjustments */
  .hero {
    min-height: 100vh;
    padding: var(--spacing-lg) 1rem;
  }
  
  .hero-title {
    font-size: clamp(2rem, 8vh, 3rem);
  }
  
  .hero-subtitle {
    font-size: clamp(0.9rem, 3vh, 1.1rem);
  }
  
  .nav-list {
    max-height: 60vh;
    overflow-y: auto;
  }
}

/* Print styles */
@media print {
  /* Hide navigation and interactive elements */
  .main-nav,
  .scroll-indicator,
  .hero-cta,
  .nav-toggle {
    display: none;
  }
  
  /* Adjust colors for print */
  body {
    background: white;
    color: black;
  }
  
  .hero {
    background: none;
    color: black;
  }
  
  .section-title {
    background: none;
    color: black;
    -webkit-text-fill-color: black;
  }
  
  /* Ensure content is visible */
  .fade-in,
  .slide-in-left,
  .slide-in-right,
  .scale-in {
    opacity: 1;
    transform: none;
  }
  
  /* Hide animations */
  .particle-canvas {
    display: none;
  }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  /* Disable animations */
  .fade-in,
  .slide-in-left,
  .slide-in-right,
  .scale-in,
  .card-3d,
  .hero-title,
  .hero-subtitle,
  .hero-description,
  .hero-cta {
    animation: none;
    transition: none;
  }
  
  .scroll-arrow {
    animation: none;
  }
  
  .moon-phase {
    animation: none;
  }
  
  .meter-fill {
    animation: none;
  }
  
  .quality-card::before {
    animation: none;
  }
  
  .progress-fill::after {
    animation: none;
  }
  
  .skeleton {
    animation: none;
  }
  
  .loading::after {
    animation: none;
  }
  
  /* Simplify hover effects */
  .card-3d:hover {
    transform: none;
  }
  
  .about-card:hover {
    transform: none;
  }
  
  .quality-card:hover {
    transform: none;
  }
  
  .info-item:hover {
    transform: none;
  }
  
  .hero-cta:hover {
    transform: none;
  }
  
  .submit-btn:hover {
    transform: none;
  }
}

/* Dark mode support (system preference) */
@media (prefers-color-scheme: dark) {
  /* These styles are already implemented in the main CSS */
  /* This media query ensures compatibility with system dark mode */
  :root {
    color-scheme: dark;
  }
}

/* Light mode support (system preference) */
@media (prefers-color-scheme: light) {
  /* Override dark theme for users who prefer light mode */
  :root {
    color-scheme: light;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  /* Increase contrast */
  :root {
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --border-color: #666666;
  }
  
  .main-nav {
    background: rgba(0, 0, 0, 0.95);
  }
  
  .card,
  .quality-card,
  .about-card {
    border-width: 2px;
  }
  
  /* Keep nav links clean: underline only, no border box */
  .nav-link { border: none; }
  .nav-link:hover::after,
  .nav-link.active::after { width: 0; }
}

/* Focus visible for accessibility */
@media (prefers-reduced-motion: no-preference) {
  :focus-visible {
    outline: 2px solid var(--accent-gold);
    outline-offset: 2px;
  }
}

/* Override focus outline for navigation links */
.nav-link:focus,
.nav-link:focus-visible {
  outline: none;
}

/* Custom scrollbar for webkit browsers */
@media (min-width: 768px) {
  ::-webkit-scrollbar {
    width: 8px;
  }
  
  ::-webkit-scrollbar-track {
    background: var(--primary-bg);
  }
  
  ::-webkit-scrollbar-thumb {
    background: var(--accent-gold);
    border-radius: 4px;
  }
  
  ::-webkit-scrollbar-thumb:hover {
    background: var(--accent-copper);
  }
}

/* Selection styles */
::selection {
  background: rgba(212, 175, 55, 0.3);
  color: var(--text-primary);
}

::-moz-selection {
  background: rgba(212, 175, 55, 0.3);
  color: var(--text-primary);
}
