/**
 * MyMicroApp - Techno Soft Approachable Design
 * Modern, friendly, welcoming tech aesthetic
 */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,700&display=swap');

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

:root {
  /* Soft color palette */
  --bg-primary: #ffffff;
  --bg-secondary: #fafbfc;
  --bg-tertiary: #f5f7fa;

  /* Soft gradients */
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-soft-blue: linear-gradient(135deg, #e0e7ff 0%, #f0f9ff 100%);
  --gradient-soft-purple: linear-gradient(135deg, #f3e8ff 0%, #fae8ff 100%);
  --gradient-mesh: radial-gradient(at 0% 0%, rgba(102, 126, 234, 0.15) 0px, transparent 50%),
                    radial-gradient(at 100% 100%, rgba(118, 75, 162, 0.15) 0px, transparent 50%),
                    radial-gradient(at 100% 0%, rgba(99, 102, 241, 0.1) 0px, transparent 50%);

  /* Text colors */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-tertiary: #94a3b8;

  /* Accent colors */
  --accent-blue: #6366f1;
  --accent-purple: #8b5cf6;
  --accent-pink: #ec4899;

  /* UI colors */
  --border-light: #e2e8f0;
  --border-medium: #cbd5e1;

  /* Typography */
  --font-display: 'Plus Jakarta Sans', sans-serif;
  --font-body: 'DM Sans', sans-serif;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* Border radius - soft and friendly */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-2xl: 32px;

  /* Shadows - soft and layered */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 0 0 1px rgba(99, 102, 241, 0.1), 0 10px 30px -5px rgba(99, 102, 241, 0.15);
}

/* Base styles */
html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

/* Hero Section - Soft gradient background */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  background: var(--gradient-mesh), var(--bg-primary);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
  transform: translateX(-50%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: var(--space-4xl) 0;
  max-width: 900px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  margin-bottom: var(--space-xl);
  background: rgba(99, 102, 241, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-xl);
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent-blue);
  animation: slideDown 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-badge-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-blue);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-lg);
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: slideDown 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s backwards;
}

.hero-description {
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: var(--space-2xl);
  animation: slideDown 1s cubic-bezier(0.16, 1, 0.3, 1) 0.2s backwards;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xl);
  padding: var(--space-xl);
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  animation: slideDown 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.3s backwards;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.stat-number {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}

/* Featured Section */
.section-featured {
  padding: var(--space-4xl) 0;
  background: var(--bg-secondary);
}

.section-header {
  max-width: 700px;
  margin: 0 auto var(--space-3xl) auto;
  text-align: center;
}

.section-label {
  display: inline-block;
  margin-bottom: var(--space-md);
  padding: var(--space-xs) var(--space-md);
  background: var(--gradient-soft-purple);
  border-radius: var(--radius-xl);
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent-purple);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-md);
  color: var(--text-primary);
}

.section-description {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: var(--space-xl);
}

.featured-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  animation-fill-mode: backwards;
}

.featured-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.featured-card:nth-child(1) { animation-delay: 0s; }
.featured-card:nth-child(2) { animation-delay: 0.1s; }
.featured-card:nth-child(3) { animation-delay: 0.2s; }
.featured-card:nth-child(4) { animation-delay: 0.3s; }

.featured-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: rgba(99, 102, 241, 0.3);
}

.featured-card:hover::before {
  opacity: 1;
}

.featured-card-header {
  padding: var(--space-xl);
}

.featured-card-category {
  display: inline-block;
  margin-bottom: var(--space-md);
  padding: var(--space-xs) var(--space-md);
  background: var(--gradient-soft-blue);
  border-radius: var(--radius-md);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-blue);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.featured-card-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

.featured-card-description {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.featured-card-body {
  padding: 0 var(--space-xl) var(--space-xl);
  flex: 1;
}

.featured-card-features {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.feature-item {
  display: flex;
  align-items: start;
  gap: var(--space-sm);
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.feature-item::before {
  content: '✓';
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: var(--gradient-soft-blue);
  color: var(--accent-blue);
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
}

.featured-card-footer {
  padding: var(--space-xl);
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.price-tag {
  display: flex;
  align-items: baseline;
  gap: var(--space-xs);
}

.price-amount {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
}

.price-period {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-tertiary);
}

.button-group {
  display: flex;
  gap: var(--space-sm);
}

/* Buttons - Soft and approachable */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-primary);
  color: var(--bg-primary);
  box-shadow: 0 4px 12px -2px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -4px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
  background: var(--bg-primary);
  color: var(--text-primary);
  border: 1.5px solid var(--border-medium);
}

.btn-secondary:hover {
  background: var(--bg-secondary);
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}

.btn-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* App Catalog - Clean grid */
.section-catalog {
  padding: var(--space-4xl) 0;
  background: var(--bg-primary);
}

.category-section {
  margin-bottom: var(--space-3xl);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.category-section.visible {
  opacity: 1;
  transform: translateY(0);
}

.category-header {
  margin-bottom: var(--space-xl);
  padding: var(--space-lg);
  background: var(--gradient-soft-blue);
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--accent-blue);
}

/* Category-specific colors */
.category-personal-productivity .category-header {
  background: linear-gradient(135deg, #e0e7ff 0%, #f0f9ff 100%);
  border-left-color: #6366f1;
}

.category-business-tools .category-header {
  background: linear-gradient(135deg, #f3e8ff 0%, #fae8ff 100%);
  border-left-color: #a855f7;
}

.category-pet-care .category-header {
  background: linear-gradient(135deg, #fce7f3 0%, #fff1f2 100%);
  border-left-color: #ec4899;
}

.category-garden-plants .category-header {
  background: linear-gradient(135deg, #d1fae5 0%, #ecfdf5 100%);
  border-left-color: #10b981;
}

.category-hvac-refrigeration .category-header {
  background: linear-gradient(135deg, #cffafe 0%, #f0fdfa 100%);
  border-left-color: #06b6d4;
}

.category-plumbing-backflow .category-header {
  background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 100%);
  border-left-color: #3b82f6;
}

.category-electrical .category-header {
  background: linear-gradient(135deg, #fef3c7 0%, #fffbeb 100%);
  border-left-color: #f59e0b;
}

.category-construction-safety .category-header {
  background: linear-gradient(135deg, #fed7aa 0%, #ffedd5 100%);
  border-left-color: #f97316;
}

.category-permits-licensing .category-header {
  background: linear-gradient(135deg, #e5e7eb 0%, #f9fafb 100%);
  border-left-color: #6b7280;
}

.category-general-tools .category-header {
  background: linear-gradient(135deg, #f1f5f9 0%, #f8fafc 100%);
  border-left-color: #64748b;
}

.category-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: var(--space-xs);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.category-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 var(--space-sm);
  background: var(--bg-primary);
  color: var(--accent-blue);
  font-size: 0.875rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.category-subtitle {
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: var(--space-lg);
}

.app-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.app-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(99, 102, 241, 0.2);
}

.app-card-header {
  padding: var(--space-lg);
}

.app-name {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: var(--space-xs);
  color: var(--text-primary);
}

.app-description {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.app-card-body {
  padding: 0 var(--space-lg) var(--space-lg);
  flex: 1;
}

.app-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.tag {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border-radius: var(--radius-md);
}

.tag-price {
  background: var(--gradient-soft-purple);
  color: var(--accent-purple);
}

.app-card-footer {
  padding: var(--space-lg);
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-light);
}

.app-buttons {
  display: flex;
  gap: var(--space-sm);
}

.app-buttons .btn {
  flex: 1;
  font-size: 0.875rem;
  padding: 0.625rem 1rem;
}

/* Coming Soon badge */
.badge-coming-soon {
  display: inline-block;
  margin-left: var(--space-sm);
  padding: 0.25rem 0.625rem;
  background: var(--gradient-soft-blue);
  color: var(--accent-blue);
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius-sm);
}

.app-card.coming-soon {
  opacity: 0.6;
}

/* Values Section */
.section-values {
  padding: var(--space-4xl) 0;
  background: var(--gradient-mesh), var(--bg-secondary);
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: var(--space-xl);
  margin-top: var(--space-2xl);
}

.value-item {
  padding: var(--space-xl);
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.value-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: rgba(99, 102, 241, 0.3);
}

.value-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-primary);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
  font-size: 1.5rem;
}

.value-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

.value-description {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

/* Footer */
.site-footer {
  padding: var(--space-3xl) 0 var(--space-xl);
  background: var(--bg-primary);
  border-top: 1px solid var(--border-light);
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

.footer-brand {
  max-width: 400px;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: var(--space-md);
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-tagline {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.footer-links {
  display: flex;
  gap: var(--space-2xl);
}

.footer-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer-section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.875rem;
  margin-bottom: var(--space-xs);
  color: var(--text-primary);
}

.footer-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9375rem;
  transition: color 0.2s;
}

.footer-link:hover {
  color: var(--accent-blue);
}

.footer-bottom {
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.footer-copyright {
  font-size: 0.875rem;
  color: var(--text-tertiary);
}

/* Animations */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* Responsive */
@media (max-width: 768px) {
  :root {
    --space-xl: 1.5rem;
    --space-2xl: 2rem;
    --space-3xl: 3rem;
    --space-4xl: 4rem;
  }

  .hero {
    min-height: auto;
  }

  .hero-stats {
    flex-direction: column;
  }

  .featured-grid {
    grid-template-columns: 1fr;
  }

  .apps-grid {
    grid-template-columns: 1fr;
  }

  .button-group {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .footer-content {
    flex-direction: column;
  }

  .footer-links {
    flex-direction: column;
  }
}

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