/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background: #fff;
}

/* Container */
.wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
header {
  background: #fff;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.95);
}

nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: flex-end;
  gap: 2rem;
}

nav a {
  text-decoration: none;
  color: #666;
  font-weight: 500;
  transition: color 0.3s;
}

nav a:hover {
  color: #007AFF;
}

/* Main Content */
main {
  flex: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

/* Hero Section */
.hero {
  padding: 3rem 0;
  text-align: center;
}

.badge {
  display: inline-block;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.lead {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: #666;
  max-width: 800px;
  margin: 0 auto 3rem;
  line-height: 1.8;
}

/* Screenshots Section - Mobile First */
.screens {
  margin: 3rem 0;
  padding: 0;
}

.step {
  margin-bottom: 3rem;
}

.step h4 {
  font-size: 1.125rem;
  color: #333;
  margin-bottom: 1.5rem;
  font-weight: 600;
  text-align: center;
}

.shot {
  position: relative;
  max-width: 400px;
  margin: 0 auto;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}

.shot:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.shot img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  background: #f8f9fa;
}

/* Tablet Styles (768px+) */
@media (min-width: 768px) {
  .screens {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin: 4rem 0;
  }
  
  .step {
    margin-bottom: 0;
  }
  
  .hero {
    padding: 4rem 0;
  }
}

/* Desktop Styles (1024px+) */
@media (min-width: 1024px) {
  .screens {
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
  }
  
  .shot {
    max-width: none;
  }
  
  .step h4 {
    font-size: 0.95rem;
    min-height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.5rem;
  }
}

/* Large Desktop (1440px+) */
@media (min-width: 1440px) {
  .wrap {
    max-width: 1400px;
    margin: 0 auto;
  }
  
  .screens {
    gap: 2.5rem;
  }
}

/* Support Section */
.section {
  padding: 4rem 0;
  text-align: center;
  border-top: 1px solid #eee;
}

.section h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #333;
}

.muted {
  color: #666;
  margin-bottom: 1.5rem;
}

.section a {
  color: #007AFF;
  text-decoration: none;
  font-size: 1.125rem;
  font-weight: 500;
  transition: opacity 0.3s;
}

.section a:hover {
  opacity: 0.8;
}

/* Footer */
footer {
  background: #f8f9fa;
  padding: 2rem;
  text-align: center;
  color: #666;
  font-size: 0.875rem;
  margin-top: auto;
}

/* Modal Styles */
.modal-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-backdrop.active {
  display: flex;
  opacity: 1;
}

.modal {
  background: white;
  border-radius: 1rem;
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal header {
  padding: 1.5rem;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: static;
  background: white;
}

.modal h3 {
  margin: 0;
  font-size: 1.5rem;
}

.close {
  color: #666;
  text-decoration: none;
  font-size: 1rem;
  padding: 0.5rem;
  transition: color 0.3s;
}

.close:hover {
  color: #333;
}

.modal .content {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s;
  cursor: pointer;
  border: none;
  font-size: 1rem;
}

.btn:not(.secondary) {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.btn:not(.secondary):hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.btn.secondary {
  background: transparent;
  color: #667eea;
  border: 2px solid #667eea;
}

.btn.secondary:hover {
  background: #667eea;
  color: white;
}

.cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 3rem;
  flex-wrap: wrap;
}

/* Accessibility */
:focus {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}

/* Print Styles */
@media print {
  .modal-backdrop,
  nav,
  .cta {
    display: none;
  }
  
  .screens {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Loading State */
.loading {
  opacity: 0.5;
  pointer-events: none;
}

/* Smooth Transitions */
* {
  transition: color 0.3s, background-color 0.3s, border-color 0.3s;
}

/* Fade-in animation for scroll reveal */
.fade-in-ready {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-ready.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Loaded image animation */
.shot img {
  opacity: 0;
  transition: opacity 0.5s ease;
}

.shot img.loaded {
  opacity: 1;
}

/* Button interaction improvements */
button {
  cursor: pointer;
}

.close {
  cursor: pointer;
  background: none;
  border: none;
  font-size: 1.2rem;
  color: #666;
  padding: 0.5rem;
  transition: color 0.3s;
}

.close:hover {
  color: #333;
}

/* Smooth scroll behavior for the entire page */
html {
  scroll-behavior: smooth;
}
