/* StretchStrong - Original Design Aesthetic Enhanced */

:root {
  /* Original StretchStrong Colors */
  --primary-color: #2563eb;
  --primary-light: #3b82f6;
  --primary-dark: #1d4ed8;
  --accent-color: #10b981;
  --accent-light: #34d399;

  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;

  --bg-primary: #ffffff;
  --bg-secondary: #f9fafb;
  --bg-tertiary: #f3f4f6;

  --border-light: #e5e7eb;
  --border-medium: #d1d5db;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

  /* Spacing scale (4px base) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;

  /* Font sizes */
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;

  /* Gray palette */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;

  /* Aliases used in inline styles & components */
  --primary-blue: #2563eb;
  --secondary-color: #10b981;
  --gradient-primary: linear-gradient(135deg, #2563eb, #10b981);
  --gradient-card: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);

  /* Border radii */
  --border-radius-sm: 6px;
  --border-radius-md: 8px;
  --border-radius-lg: 12px;
  --radius-xl: 16px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.2s ease;
  --transition-slow: 0.3s ease;

  /* Status colors */
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-error: #ef4444;
  --color-info: #3b82f6;
}

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

html {
  overflow-x: hidden;
}

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

/* Auth Banner */
.auth-banner {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  color: white;
  padding: 12px 20px;
  text-align: center;
  font-size: 14px;
  position: relative;
  z-index: 100;
}

.auth-cta {
  color: white;
  text-decoration: none;
  font-weight: 600;
  margin-left: 12px;
  padding: 4px 12px;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 20px;
  transition: all 0.2s ease;
}

.auth-cta:hover {
  background: rgba(255,255,255,0.1);
  transform: translateY(-1px);
}

/* Navigation */
.navbar {
  background: white;
  border-bottom: 1px solid var(--border-light);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
}

.nav-brand i {
  font-size: 28px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
  text-decoration: none;
}

.nav-item:hover {
  color: var(--primary-color);
  background: var(--bg-secondary);
}

.nav-item.active {
  color: var(--primary-color);
  background: var(--bg-secondary);
}

.nav-innovation {
  position: relative;
}

.nav-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--accent-color);
  color: white;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 10px;
  line-height: 1;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

.btn:active {
  transform: scale(0.96);
  opacity: 0.9;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--border-medium);
}

/* Main Content */
.main-content {
  min-height: calc(100vh - 140px);
}

.section {
  display: none;
  padding: 60px 20px;
  overflow-x: hidden;
}

h1, h2, h3, h4, p, span, a, li {
  overflow-wrap: break-word;
  word-break: break-word;
}

.section.active {
  display: block;
}

/* Hero Section */
.hero {
  max-width: 1200px;
  margin: 0 auto;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  min-height: 600px;
}

.hero-text {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.hero-title {
  font-size: 48px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-primary);
}

.highlight {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 20px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin: 32px 0;
}

.stat {
  text-align: center;
}

.stat-number {
  font-size: 32px;
  font-weight: 700;
  color: var(--primary-color);
}

.stat-label {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  align-items: center;
}

.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Injury Grid */
.injury-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 400px;
  margin: 0 auto;
}

.injury-card {
  aspect-ratio: 1;
  background: var(--bg-secondary);
  border: 2px solid var(--border-light);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.injury-card:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.injury-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.injury-card:hover:before {
  opacity: 0.1;
}

/* Features Section */
.features {
  background: var(--bg-secondary);
  padding: 80px 20px;
}

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

.features-header {
  text-align: center;
  margin-bottom: 60px;
}

.features-header h2 {
  font-size: 36px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.features-header p {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 40px;
}

.feature-card {
  background: white;
  padding: 32px;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  transition: all 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.feature-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: white;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 20px;
}

.feature-card h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.feature-card p {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Progress Display */
.progress-display {
  background: white;
  padding: 40px;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  margin: 40px 0;
}

.progress-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  text-align: center;
}

.progress-item h3 {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 8px;
}

.progress-item p {
  color: var(--text-secondary);
  font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .nav-menu {
    gap: 4px;
  }
  
  .nav-item span {
    display: none;
  }
  
  .hero-content {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
  
  .hero-title {
    font-size: 36px;
  }
  
  .hero-subtitle {
    font-size: 18px;
  }
  
  .hero-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
  
  .hero-actions {
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .feature-card {
    padding: 24px;
  }
  
  .progress-stats {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-text > * {
  animation: fadeInUp 0.6s ease forwards;
}

.hero-text > *:nth-child(2) {
  animation-delay: 0.1s;
}

.hero-text > *:nth-child(3) {
  animation-delay: 0.2s;
}

.hero-text > *:nth-child(4) {
  animation-delay: 0.3s;
}

/* ============================================
   Accessibility
   ============================================ */

/* Focus-visible styles for all interactive elements */
.nav-item:focus-visible,
.btn:focus-visible,
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Remove outline for mouse users, keep for keyboard */
.nav-item:focus:not(:focus-visible),
.btn:focus:not(:focus-visible),
a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
  outline: none;
}

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

/* Skip to content link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary-color);
  color: white;
  padding: 12px 24px;
  border-radius: 0 0 8px 8px;
  font-weight: 600;
  z-index: 10000;
  transition: top 0.2s ease;
  text-decoration: none;
}

.skip-link:focus {
  top: 0;
}

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

  .hero-text > * {
    animation: none;
  }

  .feature-card:hover,
  .injury-card:hover,
  .btn-primary:hover,
  .auth-cta:hover {
    transform: none;
  }
}

/* Prefers high contrast */
@media (prefers-contrast: high) {
  :root {
    --border-light: #000;
    --border-medium: #000;
    --text-secondary: #333;
    --text-muted: #555;
  }
}

/* Loading states */
.loading {
  opacity: 0.7;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid transparent;
  border-top: 2px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Social Proof / Testimonials */
.social-proof {
  padding: var(--space-24) 0;
  background: linear-gradient(135deg, var(--gray-50) 0%, white 100%);
}

.social-proof-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: var(--space-8);
  margin-bottom: var(--space-16);
}

.testimonial {
  padding: var(--space-8);
  position: relative;
}

.quote-icon {
  font-size: 24px;
  color: var(--primary-blue);
  margin-bottom: var(--space-4);
}

.testimonial p {
  font-size: 18px;
  line-height: 1.6;
  color: var(--gray-700);
  margin-bottom: var(--space-6);
  font-style: italic;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.author-avatar {
  width: 50px;
  height: 50px;
  background: var(--gradient-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
}

.author-name {
  font-weight: 600;
  color: var(--gray-800);
}

.author-title {
  font-size: 14px;
  color: var(--gray-600);
}

.stats-row {
  margin: var(--space-16) 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-6);
}

.stat-item {
  text-align: center;
  padding: var(--space-6);
}

.stat-icon {
  font-size: 36px;
  color: var(--primary-blue);
  margin-bottom: var(--space-4);
}

.stat-value {
  font-size: 48px;
  font-weight: 800;
  color: var(--gray-800);
  line-height: 1;
  margin-bottom: var(--space-2);
}

.cta-section {
  text-align: center;
  padding: var(--space-16) 0;
  background: var(--gradient-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--gray-200);
}

.cta-section h3 {
  font-size: 32px;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: var(--space-4);
}

.cta-section p {
  font-size: 18px;
  color: var(--gray-600);
  margin-bottom: var(--space-8);
}

.cta-actions {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
}

/* Footer */
.site-footer {
  background: #1a1a2e;
  color: white;
  padding: 48px 24px 24px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  margin-bottom: 32px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.footer-brand i {
  color: #3b82f6;
  font-size: 24px;
}

.footer-brand span {
  font-size: 20px;
  font-weight: 700;
}

.footer-desc {
  color: #9ca3af;
  font-size: 14px;
  line-height: 1.6;
}

.footer-heading {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
  color: #d1d5db;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  color: #9ca3af;
  text-decoration: none;
  font-size: 14px;
}

.footer-bottom {
  border-top: 1px solid #374151;
  padding-top: 24px;
  text-align: center;
}

.footer-bottom p {
  color: #6b7280;
  font-size: 13px;
}