/* ClickDialog Premium Design System V6 — World-Class Tech Aesthetic
   Tokens, Typography, Surfaces, Microinteractions and Layout Primitives.
   Built for high conversion, clarity, accessibility and brand differentiation. */

:root {
  /* Color Palette — Brand & Accents */
  --cd-primary-900: #020842;
  --cd-primary-800: #06106b;
  --cd-primary-700: #0b2cbf;
  --cd-primary-600: #1554c9;
  --cd-primary-500: #2563eb;
  --cd-primary-400: #3b82f6;
  --cd-primary-300: #60a5fa;
  --cd-primary-100: #dbeafe;
  --cd-primary-50:  #eff6ff;

  --cd-accent-cyan: #00c2ff;
  --cd-accent-glow: rgba(0, 194, 255, 0.25);
  --cd-accent-warm: #c25e3d;
  --cd-accent-warm-bg: #fff5f2;

  /* Surfaces & Backgrounds */
  --cd-bg-canvas: #ffffff;
  --cd-bg-subtle: #f8fafc;
  --cd-bg-elevated: #ffffff;
  --cd-bg-muted: #f1f5f9;
  --cd-bg-dark: #080e1e;
  --cd-bg-dark-card: #0f172a;
  --cd-bg-dark-border: rgba(255, 255, 255, 0.1);

  /* Typography Colors */
  --cd-text-main: #0f172a;
  --cd-text-body: #334155;
  --cd-text-muted: #64748b;
  --cd-text-light: #94a3b8;
  --cd-text-inverse: #ffffff;
  --cd-text-inverse-muted: #cbd5e1;

  /* Borders & Dividers */
  --cd-border-subtle: #e2e8f0;
  --cd-border-light: #edf2f7;
  --cd-border-strong: #cbd5e1;
  --cd-border-interactive: rgba(21, 84, 201, 0.25);

  /* Shadows */
  --cd-shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --cd-shadow-sm: 0 2px 6px -1px rgba(15, 23, 42, 0.06), 0 1px 4px -1px rgba(15, 23, 42, 0.04);
  --cd-shadow-md: 0 8px 24px -4px rgba(15, 23, 42, 0.08), 0 2px 8px -2px rgba(15, 23, 42, 0.04);
  --cd-shadow-lg: 0 20px 40px -8px rgba(15, 23, 42, 0.12), 0 4px 12px -2px rgba(15, 23, 42, 0.04);
  --cd-shadow-glow: 0 0 30px rgba(37, 99, 235, 0.15);

  /* Radii */
  --cd-radius-xs: 4px;
  --cd-radius-sm: 8px;
  --cd-radius-md: 12px;
  --cd-radius-lg: 18px;
  --cd-radius-xl: 24px;
  --cd-radius-full: 9999px;

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

  /* Layout */
  --cd-container-max: 1180px;
  --cd-container-padding: clamp(20px, 4vw, 40px);

  /* Transitions */
  --cd-transition-fast: 150ms cubic-bezier(0.16, 1, 0.3, 1);
  --cd-transition-base: 240ms cubic-bezier(0.16, 1, 0.3, 1);
  --cd-transition-smooth: 380ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* Global Reset & Base Typography */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  color: var(--cd-text-body);
  background-color: var(--cd-bg-canvas);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Focus Rings */
:focus-visible {
  outline: 2px solid var(--cd-primary-600);
  outline-offset: 3px;
}

/* Reusable Containers */
.cd-container {
  width: min(100% - (var(--cd-container-padding) * 2), var(--cd-container-max));
  margin-inline: auto;
}

.cd-container-narrow {
  width: min(100% - (var(--cd-container-padding) * 2), 840px);
  margin-inline: auto;
}

/* Typography Hierarchy */
.cd-title-hero {
  font-size: clamp(38px, 5.2vw, 68px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.04em;
  color: var(--cd-text-main);
  margin: 0 0 20px 0;
}

.cd-title-hero em, .cd-title-hero span.highlight {
  font-style: normal;
  color: var(--cd-primary-600);
  background: linear-gradient(135deg, var(--cd-primary-700), var(--cd-primary-500));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.cd-lead {
  font-size: clamp(17px, 1.8vw, 21px);
  line-height: 1.55;
  color: var(--cd-text-body);
  margin: 0 0 32px 0;
  max-width: 680px;
}

.cd-section-header {
  margin-bottom: 48px;
}

.cd-section-header.text-center {
  text-align: center;
  max-width: 720px;
  margin-inline: auto;
}

.cd-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cd-primary-600);
  margin-bottom: 12px;
}

.cd-kicker-dark {
  color: var(--cd-accent-cyan);
}

.cd-title-section {
  font-size: clamp(28px, 3.4vw, 44px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--cd-text-main);
  margin: 0 0 16px 0;
}

.cd-subtitle-section {
  font-size: clamp(16px, 1.3vw, 18px);
  color: var(--cd-text-muted);
  line-height: 1.6;
  margin: 0;
}

/* Badges & Tags */
.cd-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--cd-radius-full);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: var(--cd-primary-50);
  color: var(--cd-primary-700);
  border: 1px solid var(--cd-primary-100);
}

.cd-badge-warm {
  background: var(--cd-accent-warm-bg);
  color: var(--cd-accent-warm);
  border: 1px solid rgba(194, 94, 61, 0.2);
}

.cd-badge-subtle {
  background: var(--cd-bg-muted);
  color: var(--cd-text-muted);
  border: 1px solid var(--cd-border-subtle);
}

.cd-badge-live {
  background: rgba(34, 197, 94, 0.1);
  color: #15803d;
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.cd-badge-live::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
}

/* Buttons & CTAs */
.cd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: var(--cd-radius-sm);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--cd-transition-base);
  border: 1px solid transparent;
}

.cd-btn-primary {
  background: var(--cd-primary-600);
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(21, 84, 201, 0.25), 0 1px 2px rgba(21, 84, 201, 0.15);
}

.cd-btn-primary:hover {
  background: var(--cd-primary-700);
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(21, 84, 201, 0.35);
}

.cd-btn-primary:active {
  transform: translateY(0);
}

.cd-btn-secondary {
  background: #ffffff;
  color: var(--cd-text-main) !important;
  border-color: var(--cd-border-subtle);
  box-shadow: var(--cd-shadow-xs);
}

.cd-btn-secondary:hover {
  background: var(--cd-bg-subtle);
  border-color: var(--cd-border-strong);
  color: var(--cd-primary-600) !important;
  transform: translateY(-1px);
}

.cd-btn-dark {
  background: var(--cd-bg-dark);
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.15);
}

.cd-btn-dark:hover {
  background: #0f172a;
  border-color: var(--cd-accent-cyan);
  box-shadow: 0 0 16px rgba(0, 194, 255, 0.2);
}

.cd-btn-sm {
  min-height: 38px;
  padding: 8px 16px;
  font-size: 13px;
  border-radius: 6px;
}

.cd-link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--cd-primary-600);
  text-decoration: none;
  transition: gap var(--cd-transition-fast), color var(--cd-transition-fast);
}

.cd-link-arrow:hover {
  color: var(--cd-primary-700);
  gap: 9px;
  text-decoration: none;
}

.cd-link-arrow span.arrow {
  font-size: 16px;
  transition: transform var(--cd-transition-fast);
}

.cd-link-arrow:hover span.arrow {
  transform: translateX(3px);
}

/* Card Primitives */
.cd-card {
  background: var(--cd-bg-elevated);
  border: 1px solid var(--cd-border-subtle);
  border-radius: var(--cd-radius-md);
  padding: 32px;
  transition: border-color var(--cd-transition-base), box-shadow var(--cd-transition-base), transform var(--cd-transition-base);
}

.cd-card:hover {
  border-color: var(--cd-border-interactive);
  box-shadow: var(--cd-shadow-md);
  transform: translateY(-2px);
}

.cd-card-dark {
  background: var(--cd-bg-dark-card);
  border: 1px solid var(--cd-bg-dark-border);
  color: var(--cd-text-inverse);
}

.cd-card-dark:hover {
  border-color: rgba(0, 194, 255, 0.35);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 194, 255, 0.1);
}

/* Value Engine / Interactive Pipeline Component */
.cd-pipeline-showcase {
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  border: 1px solid var(--cd-border-subtle);
  border-radius: var(--cd-radius-lg);
  padding: 32px;
  box-shadow: var(--cd-shadow-lg);
  position: relative;
  overflow: hidden;
}

.cd-pipeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--cd-border-light);
}

.cd-pipeline-tabs {
  display: flex;
  gap: 8px;
  background: var(--cd-bg-muted);
  padding: 4px;
  border-radius: var(--cd-radius-sm);
}

.cd-pipeline-tab {
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  background: transparent;
  color: var(--cd-text-muted);
  cursor: pointer;
  transition: all var(--cd-transition-fast);
}

.cd-pipeline-tab[aria-selected="true"] {
  background: #ffffff;
  color: var(--cd-primary-600);
  box-shadow: var(--cd-shadow-xs);
}

.cd-pipeline-flow {
  display: grid;
  grid-template-columns: 1fr auto 1.1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
}

.cd-pipeline-step {
  background: #ffffff;
  border: 1px solid var(--cd-border-subtle);
  border-radius: var(--cd-radius-sm);
  padding: 20px;
  box-shadow: var(--cd-shadow-sm);
  position: relative;
  transition: transform var(--cd-transition-base);
}

.cd-pipeline-step:hover {
  transform: translateY(-2px);
  border-color: var(--cd-primary-300);
}

.cd-step-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cd-text-muted);
  margin-bottom: 8px;
}

.cd-step-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--cd-text-main);
  margin: 0 0 6px 0;
}

.cd-step-body {
  font-size: 13px;
  color: var(--cd-text-muted);
  line-height: 1.45;
  margin: 0;
}

.cd-pipeline-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--cd-primary-500);
  font-size: 18px;
}

.cd-connector-line {
  width: 32px;
  height: 2px;
  background: linear-gradient(90deg, var(--cd-primary-300), var(--cd-primary-500));
  position: relative;
}

.cd-connector-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cd-primary-500);
  box-shadow: 0 0 8px var(--cd-primary-500);
  animation: cdPulse 2s infinite ease-in-out;
}

@keyframes cdPulse {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.3); }
}

/* Feature Grid Primitives */
.cd-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.cd-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

/* Comparison Matrix (Disconnected vs Integrated) */
.cd-contrast-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-block: 32px;
}

.cd-contrast-card {
  padding: 32px;
  border-radius: var(--cd-radius-md);
}

.cd-contrast-card.problem {
  background: #fdfaf9;
  border: 1px solid #f2ded8;
}

.cd-contrast-card.solution {
  background: #f5f9ff;
  border: 1px solid #c7dcff;
}

.cd-contrast-card h3 {
  margin: 0 0 16px 0;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cd-contrast-card.problem h3 { color: #9c3b28; }
.cd-contrast-card.solution h3 { color: var(--cd-primary-700); }

.cd-contrast-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cd-contrast-list li {
  font-size: 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.5;
}

.cd-contrast-card.problem li::before {
  content: "×";
  color: #dc2626;
  font-weight: 700;
  font-size: 18px;
  line-height: 1;
}

.cd-contrast-card.solution li::before {
  content: "✓";
  color: #16a34a;
  font-weight: 700;
  font-size: 16px;
  line-height: 1;
}

/* Integrations Logos / Ecosystem */
.cd-ecosystem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 16px;
  margin-top: 32px;
}

.cd-ecosystem-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 18px;
  background: #ffffff;
  border: 1px solid var(--cd-border-subtle);
  border-radius: var(--cd-radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--cd-text-main);
  box-shadow: var(--cd-shadow-xs);
  transition: all var(--cd-transition-fast);
}

.cd-ecosystem-pill:hover {
  border-color: var(--cd-primary-300);
  box-shadow: var(--cd-shadow-sm);
  transform: translateY(-1px);
}

/* Process Timeline (01, 02, 03) */
.cd-timeline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  position: relative;
  margin-block: 40px;
}

.cd-timeline-step {
  position: relative;
  padding-top: 24px;
  border-top: 2px solid var(--cd-border-subtle);
  transition: border-color var(--cd-transition-base);
}

.cd-timeline-step:hover {
  border-color: var(--cd-primary-500);
}

.cd-timeline-num {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--cd-primary-600);
  margin-bottom: 8px;
}

.cd-timeline-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--cd-text-main);
  margin: 0 0 10px 0;
}

.cd-timeline-desc {
  font-size: 14px;
  color: var(--cd-text-muted);
  margin: 0;
  line-height: 1.55;
}

/* Final Conversion Banner */
.cd-final-cta-section {
  background: linear-gradient(135deg, #080e1e 0%, #0f1e3d 100%);
  color: #ffffff;
  border-radius: var(--cd-radius-xl);
  padding: clamp(48px, 6vw, 84px) clamp(24px, 5vw, 64px);
  margin-block: 80px 40px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--cd-shadow-lg);
}

.cd-final-cta-section::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.25) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.cd-final-cta-inner {
  position: relative;
  z-index: 1;
  max-width: 680px;
}

.cd-final-cta-inner h2 {
  font-size: clamp(30px, 3.8vw, 48px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 0 0 18px 0;
}

.cd-final-cta-inner p {
  font-size: clamp(16px, 1.4vw, 19px);
  color: #cbd5e1;
  margin: 0 0 32px 0;
  line-height: 1.55;
}

.cd-final-cta-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.cd-final-cta-note {
  display: block;
  font-size: 13px;
  color: #94a3b8;
  margin-top: 18px;
}

/* Responsive Overrides */
@media (max-width: 960px) {
  .cd-grid-3, .cd-timeline {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .cd-contrast-grid {
    grid-template-columns: 1fr;
  }
  .cd-pipeline-flow {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .cd-pipeline-connector {
    transform: rotate(90deg);
    padding: 8px 0;
  }
  .cd-connector-line {
    width: 24px;
  }
}

@media (max-width: 640px) {
  .cd-grid-2 {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .cd-pipeline-showcase {
    padding: 20px 16px;
  }
  .cd-final-cta-section {
    border-radius: var(--cd-radius-lg);
    padding: 40px 20px;
    margin-block: 50px 30px;
  }
}

/* Reduced Motion Override */
@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;
  }
}
