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

html {
  scroll-behavior: smooth;
}

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

/* Design Tokens */
:root {
  --container: 1400px;
  --space-1: .25rem;
  --space-2: .5rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2rem;
  --space-6: 3rem;
  --space-8: 4rem;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(0,0,0,.08);
  --bg: #ffffff;
  --text: #000000;
  --muted: #6b7280;
  --primary: #000000;
  --accent: #059669;
}

/* CSS Custom Properties Fallbacks */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.btn {
  display: inline-block;
  padding: 1rem 2rem;
  border: none;
  border-radius: 16px;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.btn-primary {
  background-color: #059669;
  color: white;
}

.btn-primary:hover {
  background-color: #333333;
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: transparent;
  color: #000000;
  border: 2px solid #000000;
}

.btn-secondary:hover {
  background-color: #000000;
  color: white;
}

.card {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0,0,0,.08);
}

/* Utility Classes */
.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;
}

/* Card Styles */
.card {
  background: white;
  border-radius: var(--radius);
  padding: var(--space-5);
  box-shadow: var(--shadow);
}

/* Benefits Cards */
.benefits {
  padding: 4rem 0;
  background: #f8fafc;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.benefits-grid {
  /* Fallback for browsers that don't support grid */
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-top: 3rem;
}

/* CSS Grid support detection */
@supports (display: grid) {
  .benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
  }
}

/* Image optimization and fallbacks */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Feature card images */
.feature-card img {
  width: 300px;
  height: 300px;
  object-fit: cover;
  border-radius: var(--radius);
  transition: transform 0.3s ease;
}

.feature-card img:hover {
  transform: scale(1.05);
}

/* How it works image */
.works-image {
  width: 322px;
  height: 700px;
  object-fit: cover;
  border-radius: var(--radius);
  transition: transform 0.3s ease;
}

.works-image:hover {
  transform: scale(1.02);
}

/* Mobile image optimizations */
@media (max-width: 768px) {
  .feature-card img {
    width: 200px;
    height: 200px;
  }
  
  .works-image {
    width: 280px;
    height: 600px;
  }
}

@media (max-width: 480px) {
  .feature-card img {
    width: 150px;
    height: 150px;
  }
  
  .works-image {
    width: 250px;
    height: 500px;
  }
}

.benefit-card {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,.08);
  border: 1px solid #e5e7eb;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.benefit-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #059669, #10b981);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.benefit-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
  border-color: #059669;
}

.benefit-card:hover::before {
  transform: scaleX(1);
}

.benefit-icon {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  display: block;
  transition: transform 0.3s ease;
}

.benefit-card:hover .benefit-icon {
  transform: scale(1.1);
}

.benefit-card h3 {
  color: #000000;
  margin-bottom: 1rem;
  font-weight: 600;
}

.benefit-card p {
  color: #6b7280;
  line-height: 1.6;
  margin-bottom: 0;
}



/* Responsive Grid */
.grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.grid-1 { flex-direction: column; }
.grid-2 { flex-direction: row; }
.grid-3 { flex-direction: row; }

/* CSS Grid support detection */
@supports (display: grid) {
  .grid {
    display: grid;
    gap: 2rem;
  }
  
  .grid-1 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

/* Ensure proper mobile stacking for features */
@media (max-width: 768px) {
  .grid-3 {
    display: flex !important;
    flex-direction: column !important;
    align-items: center;
  }
}

/* Text Utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

@media (max-width: 768px) {
  .grid-2, .grid-3 {
    flex-direction: column;
    align-items: center;
  }
  
  .grid-3 .feature-card {
    width: 100%;
    max-width: 400px;
    margin-bottom: 2rem;
  }
  
  .benefits-grid {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }
  
  .benefit-card {
    padding: 1.5rem;
    width: 100%;
    max-width: 400px;
    margin-bottom: 1.5rem;
  }
  
  .benefit-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
  }
}

/* Additional mobile optimizations */
@media (max-width: 480px) {
  .benefit-card {
    padding: 1rem;
    margin-bottom: 1rem;
  }
  
  .benefit-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
  }
  
  .benefit-card h3 {
    font-size: 1.25rem;
  }
  
  .benefit-card p {
    font-size: 0.9rem;
  }
}

/* Spacing Utilities */
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }

.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-5 { margin-bottom: var(--space-5); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

.pt-1 { padding-top: var(--space-1); }
.pt-2 { padding-top: var(--space-2); }
.pt-3 { padding-top: var(--space-3); }
.pt-4 { padding-top: var(--space-4); }
.pt-5 { padding-top: var(--space-5); }
.pt-6 { padding-top: var(--space-6); }
.pt-8 { padding-top: var(--space-8); }

.pb-1 { padding-bottom: var(--space-1); }
.pb-2 { padding-bottom: var(--space-2); }
.pb-3 { padding-bottom: var(--space-3); }
.pb-4 { padding-bottom: var(--space-4); }
.pb-5 { padding-bottom: var(--space-5); }
.pb-6 { padding-bottom: var(--space-6); }
.pb-8 { padding-bottom: var(--space-8); } 