/**
 * UI Redesign – design tokens and optional classes (New User Interface Design.txt).
 * Additive only: does not override existing .btn-primary or layout unless you apply these classes.
 * Use .btn-cta-primary / .btn-cta-secondary for hero and marketing CTAs.
 */

:root {
  /* Spacing – responsive-friendly */
  --ui-section-padding: clamp(2rem, 5vw, 5rem);
  --ui-section-padding-y: clamp(2.5rem, 5vw, 4rem);
  --ui-card-padding: 24px;
  --ui-card-padding-sm: 16px;
  /* Radius & shadow */
  --ui-radius: 12px;
  --ui-radius-sm: 8px;
  --ui-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  --ui-shadow-hover: 0 8px 24px rgba(102, 126, 234, 0.15);
  /* Primary gradient (CTA) – align with brand */
  --ui-primary-from: #6a5af9;
  --ui-primary-to: #8364ff;
  --ui-primary-gradient: linear-gradient(135deg, var(--ui-primary-from), var(--ui-primary-to));
}

/* Optional utility classes */
.ui-section-padding {
  padding-top: var(--ui-section-padding-y);
  padding-bottom: var(--ui-section-padding-y);
  padding-left: var(--ui-section-padding);
  padding-right: var(--ui-section-padding);
}

.ui-card-padding {
  padding: var(--ui-card-padding);
}

@media (max-width: 767.98px) {
  .ui-card-padding {
    padding: var(--ui-card-padding-sm);
  }
}

/* CTA buttons – use on hero/marketing; does not replace .btn-primary elsewhere */
.btn-cta-primary,
a.btn-cta-primary {
  background: var(--ui-primary-gradient);
  color: #fff !important;
  border: none;
  border-radius: 10px;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  font-size: 1.05rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-cta-primary:hover,
a.btn-cta-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(106, 90, 249, 0.4);
  color: #fff;
}

.btn-cta-secondary,
a.btn-cta-secondary {
  background: transparent;
  color: inherit;
  border: 2px solid currentColor;
  border-radius: 10px;
  padding: 0.6rem 1.35rem;
  font-weight: 500;
  transition: background 0.2s ease, transform 0.2s ease;
}

.btn-cta-secondary:hover,
a.btn-cta-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

/* Trust badges row – layout only; content from component */
.ui-trust-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.ui-trust-badges img {
  max-height: 40px;
  width: auto;
  object-fit: contain;
  opacity: 0.9;
}

@media (max-width: 575.98px) {
  .ui-trust-badges {
    gap: 1rem;
  }
  .ui-trust-badges img {
    max-height: 32px;
  }
}

/* Hero: secondary CTAs with white border/text on gradient background */
.hero-section .btn-cta-secondary,
.hero-section a.btn-cta-secondary {
  border-color: rgba(255, 255, 255, 0.85);
  color: #fff;
}
.hero-section .btn-cta-secondary:hover,
.hero-section a.btn-cta-secondary:hover {
  border-color: #fff;
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
}

/* Dashboard stat cards – icon, number, optional trend */
.dashboard-stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}
.dashboard-stat-card {
  padding: var(--ui-card-padding);
  border-radius: var(--ui-radius);
  box-shadow: var(--ui-shadow);
  background: var(--bs-body-bg, #fff);
  transition: box-shadow 0.2s ease;
}
.dashboard-stat-card:hover {
  box-shadow: var(--ui-shadow-hover);
}
.dashboard-stat-card .stat-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--ui-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}
.dashboard-stat-card .stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
}
.dashboard-stat-card .stat-label {
  font-size: 0.875rem;
  color: var(--bs-secondary-color);
  margin-top: 0.25rem;
}
.dashboard-stat-card .stat-meta {
  font-size: 0.75rem;
  color: var(--bs-secondary-color);
  margin-top: 0.5rem;
}
@media (max-width: 767.98px) {
  .dashboard-stat-cards {
    grid-template-columns: 1fr 1fr;
  }
  .dashboard-stat-card .stat-value {
    font-size: 1.5rem;
  }
}

/* ========== Step 6: Global typography & spacing ========== */
html, body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
h1, h2, h3, h4, h5, h6 {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 700;
}
.text-muted, .stat-meta, .stat-label {
  font-weight: 400;
}

/* Section padding using design tokens */
.features-section {
  padding-top: var(--ui-section-padding-y);
  padding-bottom: var(--ui-section-padding-y);
  padding-left: var(--ui-section-padding);
  padding-right: var(--ui-section-padding);
}
.main-content {
  padding-top: 1.5rem;
  padding-bottom: 2rem;
}
.main-content .container-fluid {
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}

/* ========== Step 7: Funnel step list – visual flow ========== */
.funnel-steps-list {
  position: relative;
  padding-left: 0;
  list-style: none;
}
.funnel-step-item {
  position: relative;
  padding-left: 2.25rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}
.funnel-step-item::before {
  content: "";
  position: absolute;
  left: 0.6rem;
  top: 2rem;
  bottom: -0.25rem;
  width: 2px;
  background: var(--bs-primary);
  opacity: 0.35;
  border-radius: 1px;
}
.funnel-step-item:last-child::before {
  display: none;
}
.funnel-step-item::after {
  content: attr(data-order);
  position: absolute;
  left: 0;
  top: 0.6rem;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  background: var(--bs-primary);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.35rem;
}
.funnel-flow-hint {
  font-size: 0.8rem;
  color: var(--bs-secondary-color);
  margin-bottom: 0.75rem;
}

/* ========== Step 8: Mobile – hero & touch targets ========== */
@media (max-width: 575.98px) {
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-actions .btn,
  .hero-actions a.btn {
    min-width: 100%;
    padding: 0.875rem 1rem;
    min-height: 44px;
  }
}
/* Touch targets (accessibility) – buttons and nav links */
.hero-actions .btn,
.hero-actions a.btn,
.nav-link {
  min-height: 44px;
  box-sizing: border-box;
}

/* ========== Step 9: Subtle animations ========== */
@keyframes ui-fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Button micro-interactions – smooth feedback */
.btn,
.btn-cta-primary,
.btn-cta-secondary,
a.btn,
a.btn-cta-primary,
a.btn-cta-secondary {
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.btn:active:not(:disabled),
.btn-cta-primary:active,
.btn-cta-secondary:active,
a.btn:active {
  transform: scale(0.98);
}
.btn-cta-primary:hover,
a.btn-cta-primary:hover {
  transform: translateY(-2px);
}
.btn-cta-primary:active,
a.btn-cta-primary:active {
  transform: translateY(-1px) scale(0.98);
}

/* Section fade-in (features, dashboard cards) – minimal, no layout shift */
@media (prefers-reduced-motion: no-preference) {
  .feature-card {
    animation: ui-fade-in 0.45s ease-out backwards;
  }
  .features-section .feature-card:nth-child(1) { animation-delay: 0.05s; }
  .features-section .feature-card:nth-child(2) { animation-delay: 0.12s; }
  .features-section .feature-card:nth-child(3) { animation-delay: 0.19s; }
  .dashboard-stat-card {
    animation: ui-fade-in 0.35s ease-out backwards;
  }
  .dashboard-stat-cards .dashboard-stat-card:nth-child(1) { animation-delay: 0.03s; }
  .dashboard-stat-cards .dashboard-stat-card:nth-child(2) { animation-delay: 0.07s; }
  .dashboard-stat-cards .dashboard-stat-card:nth-child(3) { animation-delay: 0.11s; }
  .dashboard-stat-cards .dashboard-stat-card:nth-child(4) { animation-delay: 0.15s; }
  .dashboard-stat-cards .dashboard-stat-card:nth-child(5) { animation-delay: 0.19s; }
  .dashboard-stat-cards .dashboard-stat-card:nth-child(6) { animation-delay: 0.23s; }
}
@media (prefers-reduced-motion: reduce) {
  .feature-card,
  .dashboard-stat-card {
    animation: none;
  }
}
