/* ============================================================
   Pipenest Landing Page — Styles
   ============================================================ */

/* -- Tokens -------------------------------------------------- */
:root {
  --bg-base: #09090b;
  --bg-surface: #111113;
  --bg-elevated: #18181b;
  --bg-overlay: #1c1c20;
  --bg-hover: #222226;

  --text-primary: #fafafa;
  --text-secondary: #a1a1aa;
  --text-muted: #52525b;

  --border-subtle: #1e1e22;
  --border-default: #27272a;
  --border-strong: #3f3f46;
  --border-focus: #6366f1;

  --accent: #6366f1;
  --accent-hover: #818cf8;
  --accent-subtle: rgba(99, 102, 241, 0.10);
  --accent-muted: rgba(99, 102, 241, 0.06);

  --c-research: #38bdf8;
  --c-research-bg: rgba(56, 189, 248, 0.08);
  --c-building: #fbbf24;
  --c-building-bg: rgba(251, 191, 36, 0.08);
  --c-review: #fb923c;
  --c-review-bg: rgba(251, 146, 60, 0.08);
  --c-ready: #34d399;
  --c-ready-bg: rgba(52, 211, 153, 0.08);
  --c-contacted: #a78bfa;
  --c-contacted-bg: rgba(167, 139, 250, 0.08);
  --c-in_talks: #22d3ee;
  --c-in_talks-bg: rgba(34, 211, 238, 0.08);
  --c-won: #4ade80;
  --c-won-bg: rgba(74, 222, 128, 0.08);
  --c-lost: #94a3b8;
  --c-lost-bg: rgba(148, 163, 184, 0.06);
  --c-paused: #71717a;
  --c-paused-bg: rgba(113, 113, 122, 0.06);

  --success: #34d399;
  --warning: #fbbf24;
  --danger: #ef4444;

  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.55);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;

  --nav-h: 64px;
  --container-max: 1100px;
  --transition: 0.15s ease;
}

/* -- Reset --------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font);
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  font-size: 16px;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* -- Container ----------------------------------------------- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* -- Buttons ------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font);
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
}
.btn--sm { padding: 8px 16px; font-size: 13px; }
.btn--lg { padding: 14px 28px; font-size: 15px; }
.btn--xl { padding: 18px 36px; font-size: 17px; border-radius: var(--radius-lg); }
.btn--full { width: 100%; justify-content: center; }
.btn--primary {
  background: var(--accent);
  color: #fff;
}
.btn--primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-default);
}
.btn--ghost:hover { border-color: var(--border-strong); color: var(--text-primary); }

/* -- Badge --------------------------------------------------- */
.badge {
  display: inline-block;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: var(--radius-full);
  background: var(--accent-subtle);
  color: var(--accent-hover);
  border: 1px solid rgba(99, 102, 241, 0.15);
}
.badge--accent {
  background: var(--accent-subtle);
  color: var(--accent-hover);
}

/* -- Text Utilities ------------------------------------------ */
.text-accent { color: var(--accent-hover); }

/* ============================================================
   Navigation
   ============================================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(9, 9, 11, 0.85);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.3s;
}
.nav__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo-mark {
  width: 22px;
  height: 22px;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  border-radius: var(--radius-xs);
  transform: rotate(45deg);
}
.logo-mark--sm { width: 16px; height: 16px; }
.logo-text {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.logo-text--sm { font-size: 15px; }
.nav__links {
  display: flex;
  gap: 32px;
}
.nav__link {
  font-size: 14px;
  color: var(--text-secondary);
  transition: color var(--transition);
}
.nav__link:hover { color: var(--text-primary); }
.nav__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav__burger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: all 0.3s;
}

/* -- Language Switcher --------------------------------------- */
.lang-switcher {
  position: relative;
  display: inline-flex;
}
.lang-switcher__toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}
.lang-switcher__toggle:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
  background: var(--bg-hover);
}
.lang-switcher__flag {
  font-size: 15px;
  line-height: 1;
}
.lang-switcher__label {
  letter-spacing: 0.02em;
}
.lang-switcher__caret {
  color: var(--text-muted);
  transition: transform 0.2s ease;
}
.lang-switcher.is-open .lang-switcher__caret {
  transform: rotate(180deg);
}
.lang-switcher__menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 160px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5), 0 4px 12px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  z-index: 1000;
}
.lang-switcher.is-open .lang-switcher__menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.lang-switcher__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  background: none;
  border: none;
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: background 0.15s ease, color 0.15s ease;
}
.lang-switcher__item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.lang-switcher__item.is-active {
  background: var(--accent-subtle);
  color: var(--text-primary);
}
.lang-switcher__item .lang-switcher__flag {
  font-size: 16px;
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  padding-top: calc(var(--nav-h) + 80px);
  padding-bottom: 40px;
  text-align: center;
}
.hero__content {
  max-width: 720px;
  margin: 0 auto 60px;
}
.hero__title {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-top: 20px;
}
.hero__sub {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text-secondary);
  max-width: 540px;
  margin: 20px auto 32px;
  line-height: 1.7;
}
.hero__ctas {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.hero__stats {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 32px;
  margin-top: 48px;
}
.hero__stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.hero__stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--accent-hover);
}
.hero__stat-label {
  font-size: 13px;
  color: var(--text-muted);
}
.hero__stat-divider {
  width: 1px;
  height: 36px;
  background: var(--border-default);
}

/* -- Hero Demo Board ----------------------------------------- */
.hero__demo {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}
.demo-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 80%;
  height: 80%;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse, rgba(99, 102, 241, 0.12) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.demo-board {
  position: relative;
  z-index: 1;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 80px rgba(99, 102, 241, 0.08);
}
.demo-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
}
.demo-topbar__left {
  display: flex;
  gap: 6px;
}
.demo-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.demo-dot--red { background: #ef4444; }
.demo-dot--yellow { background: #fbbf24; }
.demo-dot--green { background: #4ade80; }
.demo-topbar__title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}
.demo-topbar__right { width: 40px; }

/* Demo Metrics */
.demo-metrics {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
}
.demo-metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex: 1;
  padding: 6px 0;
}
.dm-val {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent-hover);
}
.dm-lbl {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Demo Kanban */
.demo-kanban {
  display: flex;
  gap: 8px;
  padding: 16px;
  min-height: 200px;
  overflow-x: auto;
}
.demo-col {
  flex: 1;
  min-width: 120px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.demo-col__header {
  font-size: 11px;
  font-weight: 600;
  color: var(--phase-color);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--phase-color) 8%, transparent);
  text-align: center;
}
.demo-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-left: 2px solid var(--phase-color);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  opacity: 0;
  transform: translateY(10px);
  animation: cardIn 0.4s ease forwards;
}
.demo-card__name {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-primary);
}
.demo-card__bar {
  height: 3px;
  background: var(--border-subtle);
  border-radius: 2px;
  overflow: hidden;
}
.demo-card__fill {
  height: 100%;
  background: var(--phase-color);
  border-radius: 2px;
  transition: width 1.5s ease;
}

@keyframes cardIn {
  to { opacity: 1; transform: translateY(0); }
}

.demo-kanban .demo-col:nth-child(1) .demo-card:nth-child(2) { animation-delay: 0.1s; }
.demo-kanban .demo-col:nth-child(1) .demo-card:nth-child(3) { animation-delay: 0.2s; }
.demo-kanban .demo-col:nth-child(2) .demo-card:nth-child(2) { animation-delay: 0.15s; }
.demo-kanban .demo-col:nth-child(2) .demo-card:nth-child(3) { animation-delay: 0.25s; }
.demo-kanban .demo-col:nth-child(3) .demo-card:nth-child(2) { animation-delay: 0.2s; }
.demo-kanban .demo-col:nth-child(4) .demo-card:nth-child(2) { animation-delay: 0.25s; }
.demo-kanban .demo-col:nth-child(5) .demo-card:nth-child(2) { animation-delay: 0.3s; }
.demo-kanban .demo-col:nth-child(6) .demo-card:nth-child(2) { animation-delay: 0.35s; }

/* Card move animation */
.demo-card--moving {
  position: relative;
  z-index: 10;
  transition: transform 1.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s;
  box-shadow: var(--shadow-md), 0 0 20px rgba(99, 102, 241, 0.2);
}
.demo-card--lifted {
  transform: translateY(-4px) scale(1.03);
  box-shadow: var(--shadow-lg), 0 0 30px rgba(99, 102, 241, 0.3);
}

/* ============================================================
   Sections
   ============================================================ */
.section {
  padding: clamp(5rem, 10vw, 9rem) 0;
}
.section--dark {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}
.section__header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 64px;
}
.section__title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-top: 16px;
}
.section__sub {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-top: 12px;
}

/* ============================================================
   Pain Points
   ============================================================ */
.pain-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.pain-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: border-color 0.3s, transform 0.3s;
}
.pain-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}
.pain-card__icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--icon-color) 10%, transparent);
  color: var(--icon-color);
  margin-bottom: 20px;
}
.pain-card__title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.pain-card__text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ============================================================
   Features
   ============================================================ */
.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  margin-bottom: 100px;
}
.feature:last-child { margin-bottom: 0; }
.feature--reverse { direction: rtl; }
.feature--reverse > * { direction: ltr; }
.feature__title {
  font-size: clamp(1.3rem, 3vw, 1.7rem);
  font-weight: 700;
  margin-bottom: 12px;
}
.feature__desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 20px;
}
.feature__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.feature__list li {
  font-size: 0.9rem;
  color: var(--text-secondary);
  padding-left: 20px;
  position: relative;
}
.feature__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* Feature Demo Containers */
.feature__demo {
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 32px;
  position: relative;
  overflow: hidden;
}

/* -- Pipeline Demo ------------------------------------------- */
.pipeline-demo {
  position: relative;
  padding: 40px 0 20px;
}
.pipeline-track {
  position: absolute;
  top: 54px;
  left: 20px;
  right: 20px;
  z-index: 0;
}
.pipeline-line {
  width: 100%;
  height: 8px;
}
.pipeline-line__fill {
  transition: stroke-dashoffset 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.pipeline-nodes {
  display: flex;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}
.pipeline-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.pipeline-node::before {
  content: '';
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 3px solid var(--node-color);
  transition: transform 0.4s, background 0.4s;
}
.pipeline-node.active::before {
  background: var(--node-color);
  transform: scale(1.2);
}
.pipeline-node span {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.3s;
}
.pipeline-node.active span {
  color: var(--node-color);
}
.pipeline-card {
  position: absolute;
  top: 38px;
  left: 0;
  background: var(--accent);
  color: #fff;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-weight: 600;
  opacity: 0;
  transition: left 0.7s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
  z-index: 2;
  white-space: nowrap;
}
.pipeline-card.active {
  opacity: 1;
}

/* -- Tasks Demo ---------------------------------------------- */
.tasks-demo {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.tasks-progress {
  display: flex;
  align-items: center;
  gap: 12px;
}
.tasks-progress__bar {
  flex: 1;
  height: 8px;
  background: var(--border-subtle);
  border-radius: 4px;
  overflow: hidden;
}
.tasks-progress__fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--c-won));
  border-radius: 4px;
  transition: width 0.5s ease;
}
.tasks-progress__label {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-hover);
  min-width: 40px;
  text-align: right;
}
.tasks-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.task-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  transition: border-color 0.3s;
}
.task-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  flex-shrink: 0;
}
.task-item.checked .task-check {
  background: var(--c-won);
  border-color: var(--c-won);
  animation: checkBounce 0.4s ease;
}
.task-item.checked .task-check::after {
  content: '';
  width: 8px;
  height: 5px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translateY(-1px);
}
.task-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.3s;
}
.task-item.checked .task-label {
  color: var(--text-primary);
}

@keyframes checkBounce {
  0% { transform: scale(0); }
  50% { transform: scale(1.25); }
  100% { transform: scale(1); }
}

/* -- Timeline Demo ------------------------------------------- */
.timeline-demo {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  padding-left: 24px;
}
.timeline-demo::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--border-default);
}
.tl-item {
  display: flex;
  gap: 16px;
  padding: 12px 0;
  position: relative;
  opacity: 0;
  transform: translateX(-16px);
  transition: all 0.5s ease;
}
.tl-item.visible {
  opacity: 1;
  transform: translateX(0);
}
.tl-dot {
  position: absolute;
  left: -21px;
  top: 16px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg-elevated);
  z-index: 1;
}
.tl-content {
  flex: 1;
}
.tl-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.tl-date {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}
.tl-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}
.tl-badge--email {
  background: var(--accent-subtle);
  color: var(--accent-hover);
}
.tl-badge--call {
  background: var(--c-building-bg);
  color: var(--c-building);
}
.tl-badge--meeting {
  background: var(--c-ready-bg);
  color: var(--c-ready);
}
.tl-badge--followup {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  animation: urgentPulse 2s ease infinite;
}
.tl-text {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

@keyframes urgentPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* -- Metrics Demo -------------------------------------------- */
.metrics-demo {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.md-cards {
  display: flex;
  gap: 8px;
}
.md-card {
  flex: 1;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 8px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.md-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--mc-color);
  opacity: 0;
  transition: opacity 0.5s;
}
.md-card.visible::before { opacity: 1; }
.md-card__val {
  display: block;
  font-size: 18px;
  font-weight: 800;
  color: var(--mc-color);
}
.md-card__lbl {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2px;
}

/* Funnel Bar */
.md-funnel {
  display: flex;
  height: 10px;
  border-radius: var(--radius-full);
  overflow: hidden;
  gap: 2px;
}
.md-funnel__seg {
  background: var(--seg-color);
  width: 0%;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 2px;
}
.md-funnel__seg.grown {
  width: var(--seg-width);
}

/* ============================================================
   Comparison Table
   ============================================================ */
.compare-table {
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.compare-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  border-bottom: 1px solid var(--border-subtle);
}
.compare-row:last-child { border-bottom: none; }
.compare-row--header {
  background: var(--bg-elevated);
}
.compare-row--header .compare-cell {
  font-weight: 700;
  font-size: 13px;
  color: var(--text-primary);
}
.compare-row--highlight {
  background: var(--accent-muted);
}
.compare-cell {
  padding: 14px 20px;
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.compare-cell--feature {
  font-weight: 600;
  color: var(--text-primary);
  border-right: 1px solid var(--border-subtle);
}
.compare-cell--lf {
  background: var(--accent-muted);
}
.compare-cell--good { color: var(--c-won); font-weight: 600; }
.compare-cell--bad { color: var(--text-muted); }
.compare-check, .compare-x {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* ============================================================
   Testimonials
   ============================================================ */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.testimonial-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  position: relative;
  overflow: hidden;
}
.testimonial-card__accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--tc-color);
}
.testimonial-card__quote {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  font-style: italic;
  margin-bottom: 20px;
}
.testimonial-card__author {
  display: flex;
  align-items: center;
  gap: 12px;
}
.testimonial-card__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--av-color) 15%, transparent);
  color: var(--av-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}
.testimonial-card__name {
  font-size: 13px;
  font-weight: 600;
}
.testimonial-card__role {
  font-size: 12px;
  color: var(--text-muted);
}

/* ============================================================
   Pricing
   ============================================================ */
.pricing-card {
  max-width: 440px;
  margin: 0 auto;
  position: relative;
  border-radius: var(--radius-xl);
  padding: 2px;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover), var(--c-won));
  display: flex;
}
.pricing-card__glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120%;
  height: 120%;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
  pointer-events: none;
}
.pricing-card__inner {
  background: var(--bg-surface);
  border-radius: calc(var(--radius-xl) - 2px);
  padding: 48px 40px;
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  width: 100%;
}
.pricing-card__inner .btn {
  margin-top: auto;
}
.pricing-card__price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  margin-bottom: 32px;
}
.pricing-card__currency {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-muted);
}
.pricing-card__amount {
  font-size: 4rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}
.pricing-card__period {
  font-size: 0.9rem;
  color: var(--text-muted);
}
.pricing-card__features {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
  flex: 1 1 auto;
}
.pricing-card__features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.pricing-card__features svg {
  flex-shrink: 0;
}

/* -- Pricing Grid (3 columns) -------------------------------- */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  max-width: 960px;
  margin: 0 auto;
}
@media (min-width: 768px) {
  .pricing-grid {
    grid-template-columns: repeat(3, 1fr);
    align-items: stretch;
  }
}
.pricing-grid .pricing-card {
  max-width: none;
  margin: 0;
}
.pricing-card--popular {
  background: linear-gradient(135deg, var(--accent), var(--accent-hover), var(--c-won));
  z-index: 2;
}
.pricing-card--popular .pricing-card__inner {
  padding-top: 60px;
}
.pricing-card--business {
  background: linear-gradient(135deg, #7c3aed, #a78bfa, #6366f1);
}
.pricing-card__badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  padding: 7px 18px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #818cf8, #6366f1);
  color: #ffffff;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.12) inset;
  z-index: 3;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}
.pricing-card__name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 4px;
}
.pricing-card__desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 20px;
}
.pricing-card__features--muted li {
  color: var(--text-muted);
  font-size: 0.82rem;
}
.pricing-card__divider {
  border: none;
  height: 1px;
  background: var(--border-subtle);
  margin: 16px 0;
}

/* -- Feature Badge Grid -------------------------------------- */
.feature-badge-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}
.feature-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-full);
  background: var(--accent-muted);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}
.feature-badge svg { flex-shrink: 0; }

/* -- Pricing Toggle ------------------------------------------ */
.pricing-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 40px;
}
.pricing-toggle__label {
  font-size: 14px;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition);
}
.pricing-toggle__label.active { color: var(--text-primary); font-weight: 600; }
.pricing-toggle__switch {
  width: 44px;
  height: 24px;
  border-radius: var(--radius-full);
  background: var(--border-default);
  position: relative;
  cursor: pointer;
  transition: background var(--transition);
}
.pricing-toggle__switch.active { background: var(--accent); }
.pricing-toggle__dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--text-primary);
  position: absolute;
  top: 3px;
  left: 3px;
  transition: transform var(--transition);
}
.pricing-toggle__switch.active .pricing-toggle__dot { transform: translateX(20px); }

/* ============================================================
   CTA Section
   ============================================================ */
.cta-section {
  position: relative;
  padding: clamp(5rem, 10vw, 9rem) 0;
  overflow: hidden;
}
.cta-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(99, 102, 241, 0.08) 0%, transparent 60%),
    repeating-linear-gradient(90deg, var(--border-subtle) 0, var(--border-subtle) 1px, transparent 1px, transparent 60px),
    repeating-linear-gradient(0deg, var(--border-subtle) 0, var(--border-subtle) 1px, transparent 1px, transparent 60px);
  opacity: 0.4;
}
.cta-content {
  position: relative;
  text-align: center;
}
.cta-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 16px;
}
.cta-sub {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 36px;
}
.cta-btn {
  animation: ctaGlow 3s ease infinite;
}

@keyframes ctaGlow {
  0%, 100% { box-shadow: 0 0 20px rgba(99, 102, 241, 0.2); }
  50% { box-shadow: 0 0 40px rgba(99, 102, 241, 0.4); }
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
  border-top: 1px solid var(--border-subtle);
  padding: 40px 0 32px;
}
.footer__inner {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.footer__brand {
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer__tagline {
  font-size: 13px;
  color: var(--text-muted);
}

/* ============================================================
   Scroll Animations
   ============================================================ */
.animate-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  transition-delay: var(--delay, 0ms);
}
.animate-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 768px) {
  .nav__links { display: none; }
  .nav__burger { display: flex; }
  .nav__links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: rgba(9, 9, 11, 0.95);
    backdrop-filter: blur(16px);
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid var(--border-default);
  }

  /* Hide "Log in" text button on mobile but keep language switcher */
  .nav__actions .btn--ghost { display: none; }
  .lang-switcher__toggle {
    padding: 6px 8px;
  }
  .lang-switcher__label { display: none; }

  .hero__stats { gap: 20px; }
  .hero__stat-value { font-size: 22px; }

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

  .feature {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .feature--reverse { direction: ltr; }
  .feature__demo { order: -1; }

  .compare-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .compare-cell--feature {
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 14px;
    padding: 12px 20px 8px;
  }
  .compare-cell--lf,
  .compare-cell--other {
    padding: 8px 20px;
  }
  .compare-row--header { display: none; }

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

  .demo-kanban { overflow-x: auto; }
  .demo-col { min-width: 100px; }

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

  .md-cards { flex-wrap: wrap; }
  .md-card { min-width: calc(50% - 4px); }

  .footer__inner {
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .hero__title { font-size: 1.8rem; }
  .hero__stats { flex-direction: column; gap: 16px; }
  .hero__stat-divider { width: 36px; height: 1px; }
  .demo-kanban { padding: 12px 8px; gap: 4px; }
  .demo-col { min-width: 80px; }
  .demo-card__name { font-size: 9px; }
  .pipeline-nodes { flex-wrap: wrap; gap: 8px; justify-content: center; }
  .pipeline-track { display: none; }
  .md-card { min-width: 100%; }
}

/* ============================================================
   Process Flow Section
   ============================================================ */
.process-section {
  position: relative;
  overflow: hidden;
}
.process-stage {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 0;
}
.process-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 85%;
  height: 90%;
  transform: translate(-50%, -50%);
  background:
    radial-gradient(ellipse 60% 50% at 20% 50%, rgba(56, 189, 248, 0.10) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 50% 60%, rgba(167, 139, 250, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 85% 50%, rgba(74, 222, 128, 0.10) 0%, transparent 60%);
  pointer-events: none;
  filter: blur(20px);
  z-index: 0;
}

.process-svg {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  max-height: 460px;
}

/* Node animation states */
.process-node .pn-disc {
  transition: fill 0.5s ease, stroke-width 0.5s ease;
}
.process-node .pn-ring {
  transform-origin: center;
  transform-box: fill-box;
  transition: opacity 0.5s ease;
  animation: pnRingSpin 20s linear infinite;
}
.process-node[data-step="2"] .pn-ring--ai {
  animation: pnRingSpin 12s linear infinite reverse;
}
.process-node .pn-halo {
  transition: opacity 0.6s ease, r 0.6s ease;
}
.process-node .pn-icon {
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-box: fill-box;
  transform-origin: center;
}

.process-node.is-active .pn-halo {
  opacity: 0.18;
}
.process-node.is-active .pn-ring {
  opacity: 0.9;
}
.process-node.is-active .pn-icon {
  transform: scale(1.12);
}

.pn-label, .pn-sub {
  font-family: var(--font);
  transition: fill 0.4s ease;
}

@keyframes pnRingSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Mobile fallback list */
.process-steps-mobile {
  display: none;
  flex-direction: column;
  gap: 16px;
  counter-reset: ps;
  margin: 0;
  padding: 0;
  max-width: 560px;
  margin-inline: auto;
}
.process-steps-mobile li {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-left: 3px solid var(--ps-color);
  border-radius: var(--radius-lg);
}
.ps-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--ps-color) 15%, transparent);
  color: var(--ps-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
}
.ps-body h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-primary);
}
.ps-body p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ============================================================
   App Showcase Section
   ============================================================ */
.showcase-section { position: relative; overflow: hidden; }
.showcase-wrap {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
}

.showcase-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 32px;
  padding: 6px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-full);
  width: fit-content;
  margin-inline: auto;
}
.showcase-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.showcase-tab svg { opacity: 0.7; transition: opacity var(--transition); }
.showcase-tab:hover {
  color: var(--text-primary);
}
.showcase-tab:hover svg { opacity: 1; }
.showcase-tab.is-active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}
.showcase-tab.is-active svg { opacity: 1; }

/* Browser frame */
.browser-frame {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 80px rgba(99, 102, 241, 0.10);
}
.browser-glow {
  position: absolute;
  inset: -40px;
  background: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.12) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.browser-chrome {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-subtle);
}
.browser-dots {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.browser-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}
.browser-dot--red { background: #ef4444; }
.browser-dot--yellow { background: #fbbf24; }
.browser-dot--green { background: #4ade80; }
.browser-url {
  flex: 1;
  max-width: 420px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 12px;
  color: var(--text-muted);
}
.browser-url svg { color: var(--c-won); flex-shrink: 0; }
.browser-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.browser-action-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-muted);
}

.browser-body {
  position: relative;
  z-index: 1;
  height: 520px;
  background: var(--bg-base);
  overflow: hidden;
}

/* Screens */
.screen {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.screen.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* ---- Screen 1: Dashboard ---- */
.screen[data-screen="dashboard"] {
  display: flex;
}
.app-sidebar {
  width: 52px;
  flex-shrink: 0;
  background: var(--bg-elevated);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 0;
  gap: 6px;
}
.sb-logo {
  width: 22px;
  height: 22px;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  border-radius: var(--radius-xs);
  transform: rotate(45deg);
  margin-bottom: 14px;
}
.sb-item {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}
.sb-item:hover { color: var(--text-secondary); background: var(--bg-hover); }
.sb-item.is-active {
  background: var(--accent-subtle);
  color: var(--accent-hover);
}

.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.app-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
}
.app-search {
  flex: 1;
  max-width: 240px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 11px;
  color: var(--text-muted);
}
.app-presence {
  display: flex;
  gap: -4px;
  margin-left: auto;
}
.presence-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--pa-color) 20%, transparent);
  color: var(--pa-color);
  border: 2px solid var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  margin-left: -6px;
}
.presence-avatar:first-child { margin-left: 0; }
.app-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 12px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
.app-btn:hover { background: var(--accent-hover); }

.app-metrics {
  display: flex;
  gap: 10px;
  padding: 14px 20px 10px;
}
.am-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 6px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}
.am-val {
  font-size: 17px;
  font-weight: 800;
  color: var(--accent-hover);
}
.am-lbl {
  font-size: 9px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.app-funnel {
  display: flex;
  gap: 2px;
  height: 6px;
  margin: 0 20px 12px;
  border-radius: var(--radius-full);
  overflow: hidden;
}
.af-seg {
  background: var(--af-color);
  border-radius: 2px;
}

.app-kanban {
  flex: 1;
  display: flex;
  gap: 10px;
  padding: 6px 20px 16px;
  overflow-x: auto;
  overflow-y: hidden;
}
.ak-col {
  flex-shrink: 0;
  width: 150px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ak-head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  font-size: 10px;
  font-weight: 700;
  color: var(--ak-color);
  background: color-mix(in srgb, var(--ak-color) 8%, transparent);
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ak-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ak-color);
}
.ak-count {
  margin-left: auto;
  padding: 1px 6px;
  background: color-mix(in srgb, var(--ak-color) 15%, transparent);
  border-radius: var(--radius-full);
  font-size: 9px;
}
.ak-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-top: 2px solid var(--ak-color);
  border-radius: var(--radius-md);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.ak-card:hover { transform: translateY(-1px); border-color: var(--border-default); }
.ak-card__title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}
.ak-card__meta {
  display: flex;
  align-items: center;
  gap: 6px;
}
.ak-avatar {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--ak-color) 20%, transparent);
  color: var(--ak-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: 700;
}
.ak-tag {
  font-size: 9px;
  padding: 1px 6px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-muted);
}
.ak-card__bar {
  height: 3px;
  background: var(--bg-surface);
  border-radius: 2px;
  overflow: hidden;
}
.ak-card__fill {
  height: 100%;
  background: var(--ak-color);
  border-radius: 2px;
}
.ak-card__foot {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ak-val {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-primary);
}
.ak-score, .ak-reminder {
  margin-left: auto;
  font-size: 9px;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  background: var(--accent-subtle);
  color: var(--accent-hover);
  font-weight: 600;
}
.ak-reminder {
  background: rgba(239, 68, 68, 0.12);
  color: var(--danger);
  animation: urgentPulse 2s ease infinite;
}

/* ---- Screen 2: AI Pitch Detail ---- */
.detail-wrap {
  height: 100%;
  padding: 20px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.detail-lead {
  display: flex;
  align-items: center;
  gap: 12px;
}
.detail-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--da-color) 20%, transparent);
  color: var(--da-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
}
.detail-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}
.detail-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}
.detail-phase {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: color-mix(in srgb, var(--dp-color) 12%, transparent);
  color: var(--dp-color);
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.dp-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--dp-color); }
.detail-sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-muted);
}
.detail-type {
  font-size: 11px;
  color: var(--text-muted);
}
.detail-kpis {
  display: flex;
  gap: 12px;
}
.detail-kpi {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
}
.dk-lbl {
  font-size: 9px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.dk-val {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.ai-box {
  background: linear-gradient(180deg, rgba(167, 139, 250, 0.06) 0%, rgba(99, 102, 241, 0.04) 100%);
  border: 1px dashed rgba(167, 139, 250, 0.45);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  overflow: hidden;
}
.ai-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: -50%;
  width: 200%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(167, 139, 250, 0.6), transparent);
  animation: aiShimmer 4s ease-in-out infinite;
}
@keyframes aiShimmer {
  0%, 100% { transform: translateX(-30%); }
  50% { transform: translateX(30%); }
}
.ai-box__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.ai-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}
.ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  background: linear-gradient(135deg, #a78bfa, #6366f1);
  color: #fff;
  border-radius: var(--radius-full);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.ai-actions {
  display: flex;
  gap: 6px;
}
.ai-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
.ai-chip:hover { color: var(--text-primary); border-color: var(--border-strong); }

.ai-box__subject {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}
.ai-label {
  font-size: 9px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}
.ai-subject-text {
  font-size: 12px;
  color: var(--text-primary);
  font-weight: 600;
}

.ai-box__body {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
  padding: 10px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  position: relative;
}
.ai-box__body p {
  margin-bottom: 6px;
}
.ai-box__body p:last-of-type { margin-bottom: 0; }
.ai-hl {
  color: var(--accent-hover);
  font-weight: 600;
}
.ai-cursor {
  display: inline-block;
  width: 2px;
  height: 12px;
  background: var(--accent);
  vertical-align: -2px;
  margin-left: 2px;
  animation: aiCursor 1s ease-in-out infinite;
}
@keyframes aiCursor {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.ai-box__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.ai-progress {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: var(--text-muted);
}
.ai-progress__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  animation: aiDot 1.4s ease-in-out infinite;
}
.ai-progress__dot:nth-child(2) { animation-delay: 0.2s; }
.ai-progress__dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes aiDot {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1.1); opacity: 1; }
}
.ai-send {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
.ai-send:hover { background: var(--accent-hover); }

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.detail-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}
.dc-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.dc-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  font-size: 10px;
  color: var(--text-secondary);
}
.dc-row span { flex-shrink: 0; width: 90px; }
.dc-bar {
  flex: 1;
  height: 5px;
  background: var(--bg-base);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.dc-fill {
  height: 100%;
  background: var(--dcf);
  border-radius: var(--radius-full);
  transition: width 1s ease;
}
.dc-task {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-secondary);
  padding: 4px 0;
}
.dc-check {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  flex-shrink: 0;
  position: relative;
}
.dc-task.is-done .dc-check {
  background: var(--c-won);
  border-color: var(--c-won);
}
.dc-task.is-done .dc-check::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 5px;
  height: 3px;
  border-left: 1.5px solid #fff;
  border-bottom: 1.5px solid #fff;
  transform: rotate(-45deg);
}
.dc-task.is-done { color: var(--text-primary); }

/* ---- Screen 3: Analytics ---- */
.analytics-wrap {
  height: 100%;
  padding: 20px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.an-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.an-head h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}
.an-period {
  font-size: 11px;
  padding: 4px 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-muted);
}

.an-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.an-kpi {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}
.an-kpi__val {
  font-size: 20px;
  font-weight: 800;
  color: var(--accent-hover);
}
.an-kpi__lbl {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.an-kpi__trend {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-full);
}
.an-kpi__trend--up {
  background: rgba(74, 222, 128, 0.15);
  color: var(--c-won);
}

.an-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  flex: 1;
}
.an-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.an-panel__title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.an-funnel {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.anf-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.anf-lbl {
  font-size: 10px;
  color: var(--text-muted);
  width: 60px;
  flex-shrink: 0;
}
.anf-bar {
  flex: 1;
  height: 20px;
  background: color-mix(in srgb, var(--anf-c) 8%, transparent);
  border-radius: var(--radius-sm);
  position: relative;
  overflow: hidden;
}
.anf-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--anf-w);
  background: var(--anf-c);
  border-radius: var(--radius-sm);
  opacity: 0.9;
}
.anf-bar span {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 10px;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  mix-blend-mode: normal;
}

.an-bars {
  flex: 1;
  display: flex;
  gap: 10px;
  align-items: flex-end;
  padding-top: 10px;
}
.an-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  height: 100%;
}
.an-bar__col {
  width: 100%;
  height: var(--ab-h);
  background: var(--ab-c);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  min-height: 10px;
  opacity: 0.85;
}
.an-bar span {
  font-size: 9px;
  color: var(--text-muted);
}
.an-panel__foot {
  padding-top: 6px;
  border-top: 1px solid var(--border-subtle);
}
.an-trend {
  font-size: 10px;
  color: var(--c-won);
  font-weight: 700;
}

/* ---- Screen 4: Activity ---- */
.activity-wrap {
  height: 100%;
  padding: 20px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.av-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.av-head h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}
.av-filter {
  display: flex;
  gap: 4px;
}
.av-chip {
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
}
.av-chip.is-active {
  background: var(--accent-subtle);
  color: var(--accent-hover);
  border-color: transparent;
}
.av-list {
  display: flex;
  flex-direction: column;
  position: relative;
  padding-left: 18px;
}
.av-list::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 12px;
  bottom: 12px;
  width: 1px;
  background: var(--border-default);
}
.av-item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  position: relative;
}
.av-av {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--av-c) 20%, transparent);
  color: var(--av-c);
  border: 2px solid var(--bg-base);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  flex-shrink: 0;
  position: absolute;
  left: -19px;
  top: 10px;
  z-index: 1;
}
.av-body {
  flex: 1;
  padding-left: 18px;
}
.av-text {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.av-text strong { color: var(--text-primary); font-weight: 600; }
.av-tag {
  display: inline-block;
  padding: 1px 7px;
  border-radius: var(--radius-full);
  font-size: 9px;
  font-weight: 700;
  background: color-mix(in srgb, var(--av-c) 15%, transparent);
  color: var(--av-c);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.av-mention {
  color: var(--accent-hover);
  font-weight: 600;
}
.av-time {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Highlights row below frame */
.showcase-highlights {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
}
.sh-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}
.sh-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--sh-c) 15%, transparent);
  color: var(--sh-c);
}

/* ============================================================
   Process + Showcase Responsive
   ============================================================ */
@media (max-width: 860px) {
  .process-svg { display: none; }
  .process-steps-mobile { display: flex; }

  .browser-body { height: 560px; }
  .ak-col { width: 140px; }
  .detail-grid { grid-template-columns: 1fr; }
  .an-grid { grid-template-columns: 1fr; }
  .an-kpis { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .showcase-tabs {
    width: 100%;
    border-radius: var(--radius-lg);
    padding: 4px;
  }
  .showcase-tab {
    padding: 8px 12px;
    font-size: 12px;
    flex: 1;
    justify-content: center;
  }
  .showcase-tab span { display: none; }
  .browser-body { height: 500px; }
  .detail-head {
    flex-direction: column;
    align-items: flex-start;
  }
  .detail-kpis {
    width: 100%;
    justify-content: space-between;
  }
  .detail-kpi { align-items: flex-start; }
  .ai-box__head {
    flex-direction: column;
    align-items: flex-start;
  }
  .ai-box__foot {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* -- Reduced Motion ------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .animate-in {
    opacity: 1;
    transform: none;
  }
  #processFlowFill { stroke-dashoffset: 0 !important; }
  .process-node .pn-halo { opacity: 0.15 !important; }
}

/* ============================================================
   Legal pages (Imprint / Privacy)
   ============================================================ */
.legal {
  position: relative;
  padding: calc(var(--nav-h) + 80px) 0 100px;
  min-height: 100vh;
  overflow: hidden;
}
.legal::before {
  content: '';
  position: absolute;
  top: -200px;
  left: 50%;
  width: 600px;
  height: 600px;
  transform: translateX(-50%);
  background: radial-gradient(circle, var(--accent-muted) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.legal .container {
  max-width: 860px;
  position: relative;
  z-index: 1;
}

.legal__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  transition: all var(--transition);
  margin-bottom: 40px;
}
.legal__back:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
  transform: translateX(-3px);
}

.legal__header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 56px;
}
.legal__title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-top: 16px;
  color: var(--text-primary);
}
.legal__lead {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-top: 12px;
  line-height: 1.6;
}

.legal__card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: 48px 56px;
  box-shadow: var(--shadow-md);
}
.legal__section + .legal__section {
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid var(--border-subtle);
}
.legal__section h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.legal__section p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.75;
  margin-bottom: 14px;
}
.legal__section p:last-child { margin-bottom: 0; }
.legal__section ul {
  list-style: none;
  padding: 0;
  margin: 8px 0 14px;
}
.legal__section li {
  color: var(--text-secondary);
  font-size: 0.9rem;
  padding-left: 22px;
  position: relative;
  margin-bottom: 8px;
  line-height: 1.65;
}
.legal__section li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 10px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.5);
}
.legal__section a {
  color: var(--accent-hover);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition);
}
.legal__section a:hover {
  border-bottom-color: var(--accent-hover);
}
.legal__section strong {
  color: var(--text-primary);
  font-weight: 600;
}

.legal__address {
  display: block;
  padding: 20px 24px;
  margin: 8px 0 4px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.95rem;
  line-height: 1.8;
}

/* Highlighted placeholder chip — signals to the user that these fields need to be filled */
.legal__placeholder {
  display: inline-block;
  padding: 2px 10px;
  font-family: 'SF Mono', Menlo, Monaco, 'Cascadia Code', monospace;
  font-size: 0.82em;
  font-style: normal;
  color: var(--accent-hover);
  background: var(--accent-subtle);
  border: 1px dashed rgba(99, 102, 241, 0.4);
  border-radius: var(--radius-xs);
  letter-spacing: 0.01em;
}

.legal__updated {
  max-width: 860px;
  margin: 24px auto 0;
  padding: 16px 24px;
  text-align: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  color: var(--text-muted);
  position: relative;
  z-index: 1;
}

/* ============================================================
   Footer — extended for legal links
   ============================================================ */
.footer__main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.footer__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
}
.footer__copy {
  font-size: 12px;
  color: var(--text-muted);
}
.footer__legal {
  display: flex;
  gap: 24px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer__legal a {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition);
}
.footer__legal a:hover {
  color: var(--text-primary);
}

@media (max-width: 768px) {
  .legal {
    padding: calc(var(--nav-h) + 48px) 0 64px;
  }
  .legal__card {
    padding: 32px 28px;
  }
  .legal__section + .legal__section {
    margin-top: 28px;
    padding-top: 28px;
  }
  .legal__address {
    padding: 16px 20px;
  }
  .footer__main,
  .footer__meta {
    flex-direction: column;
    text-align: center;
  }
  .footer__legal {
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .legal__card {
    padding: 24px 20px;
  }
  .legal__section h2 {
    font-size: 1.1rem;
  }
}
