/* Dev Box - GitHub Pages Styles */
/* Optimized for Lighthouse CI performance */

:root {
  --primary-color: #2c3e50;
  --secondary-color: #3498db;
  --accent-color: #e74c3c;
  --text-color: #333;
  --bg-color: #fff;
  --light-bg: #f8f9fa;
  --border-color: #dee2e6;
  --shadow: 0 2px 4px rgba(0,0,0,0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header and Navigation */
header {
  background-color: var(--primary-color);
  color: white;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-links a {
  color: white;
  text-decoration: none;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: var(--secondary-color);
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 4rem 0;
  text-align: center;
}

.hero h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.cta-button {
  display: inline-block;
  background-color: var(--accent-color);
  color: white;
  padding: 12px 24px;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.cta-button:hover {
  background-color: #c0392b;
  transform: translateY(-2px);
}

/* Sections */
.section {
  padding: 3rem 0;
}

.section:nth-child(even) {
  background-color: var(--light-bg);
}

.section h3 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
}

.section p {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.feature-card {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.feature-card h4 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

/* Getting Started List */
#getting-started ol {
  font-size: 1.1rem;
  margin-left: 2rem;
}

#getting-started li {
  margin-bottom: 0.5rem;
  padding: 0.5rem 0;
}

/* Footer */
footer {
  background-color: var(--primary-color);
  color: white;
  text-align: center;
  padding: 2rem 0;
  margin-top: 3rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .nav-links {
    flex-direction: column;
    gap: 1rem;
  }
  
  .hero h2 {
    font-size: 2rem;
  }
  
  nav .container {
    flex-direction: column;
    gap: 1rem;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  /* Improved mobile touch targets */
  .nav-links a,
  .cta-button {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  :root {
    --primary-color: #1a202c;
    --secondary-color: #4299e1;
    --accent-color: #e53e3e;
    --text-color: #e2e8f0;
    --bg-color: #2d3748;
    --light-bg: #4a5568;
    --border-color: #4a5568;
    --shadow: 0 2px 4px rgba(0,0,0,0.3);
  }
  
  .feature-card {
    background: var(--light-bg);
    color: var(--text-color);
  }
}

/* Screen reader only content */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Performance Optimizations for Lighthouse */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 1000;
  background-color: var(--primary-color);
  color: white;
  padding: 8px 16px;
  text-decoration: none;
  font-weight: bold;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.skip-link:focus {
  left: 8px;
  top: 8px;
  width: auto;
  height: auto;
  clip: auto;
  overflow: visible;
  outline: 3px solid var(--accent-color);
  outline-offset: 2px;
}

/* Enhanced accessibility focus states */
a:focus,
button:focus,
[role="menuitem"]:focus,
[role="listitem"]:focus {
  outline: 3px solid var(--accent-color);
  outline-offset: 2px;
  background-color: rgba(52, 152, 219, 0.1);
  border-radius: 3px;
}

/* Improved focus for navigation */
.nav-links a:focus {
  background-color: rgba(255, 255, 255, 0.2);
  padding: 4px 8px;
  margin: -4px -8px;
  border-radius: 4px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --primary-color: #000;
    --secondary-color: #0066cc;
    --accent-color: #cc0000;
    --text-color: #000;
    --bg-color: #fff;
    --border-color: #000;
  }
  
  .feature-card {
    border: 2px solid var(--border-color);
  }
  
  .cta-button {
    border: 2px solid var(--accent-color);
  }
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Loading animation for better perceived performance */
.loading {
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}

/* Print styles */
@media print {
  header, footer {
    display: none;
  }
  
  .hero {
    background: none;
    color: black;
  }
  
  .cta-button {
    display: none;
  }
}