const { useState, useEffect, useRef, useCallback } = React;

// ─── Icons ───
const ChevronDown = ({ size = 16 }) => (
  <svg width={size} height={size} viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"><path d="m6 9 6 6 6-6"/></svg>
);
const ArrowRight = ({ size = 16 }) => (
  <svg width={size} height={size} viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"><path d="M5 12h14"/><path d="m12 5 7 7-7 7"/></svg>
);
const Check = ({ size = 16 }) => (
  <svg width={size} height={size} viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5" strokeLinecap="round" strokeLinejoin="round"><path d="M20 6 9 17l-5-5"/></svg>
);
const ExternalLink = ({ size = 14 }) => (
  <svg width={size} height={size} viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"/><polyline points="15 3 21 3 21 9"/><line x1="10" y1="14" x2="21" y2="3"/></svg>
);
const Menu = () => (
  <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round"><line x1="3" y1="6" x2="21" y2="6"/><line x1="3" y1="12" x2="21" y2="12"/><line x1="3" y1="18" x2="21" y2="18"/></svg>
);
const X = () => (
  <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>
);

// Module icons as simple SVG components
const IconWorkspace = () => (
  <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5"><rect x="3" y="3" width="7" height="7" rx="1.5"/><rect x="14" y="3" width="7" height="7" rx="1.5"/><rect x="3" y="14" width="7" height="7" rx="1.5"/><rect x="14" y="14" width="7" height="7" rx="1.5"/></svg>
);
const IconHRIS = () => (
  <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5"><circle cx="12" cy="8" r="4"/><path d="M20 21a8 8 0 0 0-16 0"/></svg>
);
const IconTalent = () => (
  <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5"><path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"/></svg>
);
const IconEngagement = () => (
  <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"/></svg>
);
const IconAI = () => (
  <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5"><circle cx="12" cy="12" r="3"/><path d="M12 2v4"/><path d="M12 18v4"/><path d="m4.93 4.93 2.83 2.83"/><path d="m16.24 16.24 2.83 2.83"/><path d="M2 12h4"/><path d="M18 12h4"/><path d="m4.93 19.07 2.83-2.83"/><path d="m16.24 7.76 2.83-2.83"/></svg>
);
const IconInsights = () => (
  <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5"><path d="M3 3v18h18"/><path d="m7 16 4-8 4 5 5-9"/></svg>
);

// ─── Styles ───
const styles = `
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=DM+Sans:wght@400;500;600&display=swap');

:root {
  --primary: #5271FF;
  --primary-hover: #4563F5;
  --primary-deep: #3754DA;
  --accent: #14B8A6;
  --text: #0F172A;
  --text-secondary: #475569;
  --text-tertiary: #64748B;
  --border: #E2E8F0;
  --border-strong: #CBD5E1;
  --white: #FFFFFF;
  --muted: #F8FAFC;
  --brand-soft: #F5F7FF;
  --accent-soft: #F0FDFA;
  --font-heading: 'Plus Jakarta Sans', sans-serif;
  --font-body: 'DM Sans', sans-serif;

  /* Responsive breakpoints (reference only) */
  --bp-tablet: 640px;
  --bp-laptop: 1024px;
  --bp-desktop: 1440px;

  /* Fluid typography scale */
  --fs-h1: clamp(2rem, 4vw + 1rem, 3.5rem);
  --fs-h2: clamp(1.5rem, 3vw + 0.5rem, 2.5rem);
  --fs-h3: clamp(1.25rem, 2vw + 0.5rem, 1.75rem);
  --fs-h4: clamp(1.125rem, 1.5vw + 0.5rem, 1.375rem);
  --fs-body: clamp(0.95rem, 0.5vw + 0.85rem, 1.0625rem);
  --fs-small: clamp(0.8125rem, 0.25vw + 0.75rem, 0.875rem);
  --fs-micro: clamp(0.75rem, 0.2vw + 0.7rem, 0.8125rem);

  /* Fluid spacing scale */
  --space-xs: clamp(0.25rem, 0.5vw, 0.5rem);
  --space-sm: clamp(0.5rem, 1vw, 0.75rem);
  --space-md: clamp(0.75rem, 1.5vw, 1rem);
  --space-lg: clamp(1rem, 2vw, 1.5rem);
  --space-xl: clamp(1.5rem, 3vw, 2.5rem);
  --space-2xl: clamp(2rem, 4vw, 4rem);
  --space-3xl: clamp(3rem, 6vw, 6rem);

  /* Wrapper max-width (Stage 2D.2) */
  --wrapper-max: 1200px;

  --radius-btn: 14px;
  --radius-card: 20px;
  --radius-sm: 10px;
}

/* Stage 2D.2 — Wrapper max-width responsive scaling */
@media (min-width: 1440px) {
  :root {
    --wrapper-max: 1280px;
  }
}

@media (min-width: 1920px) {
  :root {
    --wrapper-max: 1440px;
  }
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}

@supports not (overflow: clip) {
  html {
    overflow-x: hidden;
  }
}

body {
  min-width: 320px;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

img, video, svg {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ============================================
   Responsive utility classes (Stage 1 foundation)
   ============================================ */
.container {
  width: 100%;
  max-width: var(--wrapper-max);
  margin-inline: auto;
  padding-inline: 1rem;
  box-sizing: border-box;
}

@media (min-width: 640px) {
  .container {
    padding-inline: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .container {
    padding-inline: 2rem;
  }
}

@media (min-width: 1440px) {
  .container {
    padding-inline: 2.5rem;
  }
}

/* Fade-in animation */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-up {
  opacity: 0;
  animation: fadeUp 0.6s ease forwards;
}

.fade-up-d1 { animation-delay: 0.1s; }
.fade-up-d2 { animation-delay: 0.2s; }
.fade-up-d3 { animation-delay: 0.3s; }
.fade-up-d4 { animation-delay: 0.4s; }

/* Gradient text */
.gradient-text {
  background: linear-gradient(135deg, #5271FF 0%, #4563F5 30%, #3754DA 60%, #2D3A8C 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--wrapper-max);
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 22px;
  color: var(--text);
  letter-spacing: -0.5px;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.nav-logo span {
  color: var(--primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-item {
  position: relative;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
  user-select: none;
  background: none;
  border: none;
  font-family: var(--font-body);
}

.nav-item:hover {
  color: var(--text);
  background: var(--muted);
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-signin {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 8px 16px;
  border-radius: var(--radius-btn);
  transition: all 0.15s;
  background: none;
  border: none;
  font-family: var(--font-body);
}

.nav-signin:hover { color: var(--text); }

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: var(--radius-btn);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(82,113,255,0.25); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background: var(--white);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-secondary:hover { border-color: var(--border-strong); background: var(--muted); }

.btn-text {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: none;
  font-family: var(--font-body);
  transition: all 0.15s;
  text-decoration: none;
}

.btn-text:hover { gap: 10px; }

/* Dropdown */
.dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 8px;
  min-width: 220px;
  box-shadow: 0 8px 32px rgba(15,23,42,0.08), 0 2px 8px rgba(15,23,42,0.04);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(4px);
  transition: all 0.15s ease;
}

.dropdown.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.1s;
  font-weight: 500;
}

.dropdown-item:hover {
  background: var(--brand-soft);
  color: var(--primary);
}

.dropdown-item .badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 2px 8px;
  border-radius: 20px;
}

/* Sections */
.section {
  max-width: var(--wrapper-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* Hero */
.hero {
  padding: 80px 0 60px;
  background:
    radial-gradient(ellipse 80% 60% at 20% 50%, rgba(82,113,255,0.08) 0%, transparent 70%),
    radial-gradient(ellipse 60% 80% at 80% 30%, rgba(55,84,218,0.06) 0%, transparent 70%),
    radial-gradient(ellipse 50% 50% at 60% 80%, rgba(20,184,166,0.04) 0%, transparent 70%),
    linear-gradient(180deg, #F8FAFC 0%, #F0F2FF 40%, #F5F7FF 70%, #FAFBFF 100%);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -10%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(82,113,255,0.05) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -5%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(20,184,166,0.04) 0%, transparent 70%);
  pointer-events: none;
}

.hero-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  max-width: var(--wrapper-max);
  margin: 0 auto;
  padding: 0 24px;
}

.hero-text {
  text-align: left;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  background: var(--brand-soft);
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 24px;
  letter-spacing: 0.3px;
  border: 1px solid rgba(82,113,255,0.1);
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4.5vw, 3.75rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1.5px;
  color: var(--text);
  margin: 0 0 20px;
  text-wrap: balance;
}

.hero-sub {
  font-size: clamp(0.95rem, 1.5vw + 0.4rem, 1.125rem);
  color: var(--text-secondary);
  margin: 0 0 32px;
  line-height: 1.7;
}

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

.hero-visual {
  position: relative;
}

/* Product Mockup (compact) */

.mockup-inner {
  background: var(--white);
  border-radius: 14px;
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(15,23,42,0.06);
}

.mockup-topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--muted);
}

.mockup-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-strong);
}

.mockup-urlbar {
  flex: 1;
  margin-left: 8px;
  height: 24px;
  background: var(--white);
  border-radius: 6px;
  border: 1px solid var(--border);
}

.mockup-body {
  display: grid;
  grid-template-columns: 200px 1fr 260px;
  min-height: 340px;
}

.mockup-sidebar {
  border-right: 1px solid var(--border);
  padding: 16px;
}

.mockup-sidebar-item {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 2px;
  font-weight: 500;
}

.mockup-sidebar-item.active {
  background: var(--brand-soft);
  color: var(--primary);
  font-weight: 600;
}

.mockup-main {
  padding: 20px;
}

.mockup-main-title {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text);
}

.mockup-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.mockup-card {
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
}

.mockup-card-label {
  font-size: 10px;
  color: var(--text-tertiary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mockup-card-val {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  margin-top: 4px;
}

.mockup-chart {
  margin-top: 16px;
  height: 120px;
  background: var(--muted);
  border-radius: 10px;
  border: 1px solid var(--border);
  display: flex;
  align-items: flex-end;
  padding: 12px;
  gap: 6px;
}

.mockup-bar {
  flex: 1;
  border-radius: 4px 4px 0 0;
  background: var(--primary);
  opacity: 0.15;
  transition: all 0.3s;
}

.mockup-bar:nth-child(odd) { opacity: 0.25; }
.mockup-bar:nth-child(3) { background: var(--accent); opacity: 0.35; }
.mockup-bar:nth-child(5) { background: var(--primary); opacity: 0.45; }

.mockup-panel {
  border-left: 1px solid var(--border);
  padding: 16px;
}

.mockup-panel-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.mockup-panel-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-secondary);
}

.mockup-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--brand-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--primary);
}

/* Section headers */
.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 3.5vw, 3rem);
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.15;
}

.section-header p {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* Cards grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 28px;
  transition: all 0.2s;
}

.card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 4px 20px rgba(15,23,42,0.05);
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.card-icon.blue { background: var(--brand-soft); color: var(--primary); }
.card-icon.teal { background: var(--accent-soft); color: var(--accent); }

.card h3 {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* Tabbed section */
.tabs-section {
  padding: 80px 0;
  background: var(--muted);
}

.tabs-nav {
  display: flex;
  gap: 4px;
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 4px;
  margin-bottom: 40px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tab-btn {
  flex: 1;
  min-width: 140px;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-body);
  color: var(--text-secondary);
  background: none;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.tab-btn:hover { color: var(--text); }

.tab-btn.active {
  background: var(--white);
  color: var(--primary);
  box-shadow: 0 1px 4px rgba(15,23,42,0.06);
}

.tab-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: stretch;
}

.tab-text {
  min-height: 460px;
  display: flex;
  flex-direction: column;
}

.tab-text h3 {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 14px;
  color: var(--text);
}

.tab-text p {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 20px;
}

.tab-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  min-height: 88px;
  align-content: flex-start;
}

.tab-feature {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--muted);
  padding: 6px 14px;
  border-radius: 100px;
  border: 1px solid var(--border);
}

.tab-feature svg { color: var(--primary); }

.tab-outcome {
  display: flex;
  align-items: center;
  font-size: 14px;
  color: var(--text-tertiary);
  font-style: italic;
  margin-bottom: 20px;
  padding-left: 14px;
  border-left: 2px solid var(--primary);
  min-height: 50px;
}

.tab-visual {
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 24px;
  min-height: 460px;
  display: flex;
  flex-direction: column;
  justify-content: stretch;
}

.tab-visual-inner {
  background: var(--white);
  border-radius: 14px;
  border: 1px solid var(--border);
  padding: 20px;
  box-shadow: 0 2px 12px rgba(15,23,42,0.04);
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.tab-visual-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  min-height: 52px;
  border-bottom: 1px solid var(--border);
}

.tab-visual-row:last-child {
  border-bottom: none;
}

.tab-text .btn-primary {
  margin-top: 6px;
  align-self: flex-start;
}

/* Why section */
.why-section {
  padding: 80px 0;
  background: var(--white);
}

/* Steps */
.steps-section {
  padding: 80px 0;
  background: var(--white);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  position: relative;
}

.step-card {
  text-align: center;
  padding: 28px 20px;
  position: relative;
}

.step-number {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--brand-soft);
  color: var(--primary);
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.step-card h3 {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.step-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* Interface showcase */
.showcase-section {
  padding: 80px 0;
  background: var(--muted);
}

.showcase-scroll-wrap {
  position: relative;
}

.showcase-split {
  position: sticky;
  top: 64px;
  min-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  padding: 18px 0;
}

.showcase-intro {
  text-align: left;
  max-width: 420px;
  margin: 0 0 28px;
}

.showcase-intro h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 3.5vw, 3rem);
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.15;
}

.showcase-intro p {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 100%;
  margin: 0;
  line-height: 1.7;
}

.showcase-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 44px;
  align-items: center;
  flex: 0 0 auto;
}

.showcase-list-col {
  align-self: stretch;
  position: static;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transform: translateY(-22px);
}

.showcase-list {
  position: relative;
  padding-left: 36px;
  max-width: 420px;
}

.showcase-list::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  border-radius: 999px;
  background: #d9e1ef;
}

.showcase-list-progress {
  position: absolute;
  left: 10px;
  width: 2px;
  border-radius: 999px;
  background: linear-gradient(180deg, #8fb2ff 0%, #5271ff 100%);
  transition: top 0.28s ease, height 0.28s ease;
}

.showcase-item {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  color: #8090a6;
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.3;
  cursor: pointer;
  transition: all 0.22s ease;
}

.showcase-item.active {
  font-size: 24px;
  color: var(--text);
  font-weight: 800;
}

.showcase-item-dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid #c8d3e7;
  background: #f9fbff;
  flex-shrink: 0;
  transition: all 0.22s ease;
}

.showcase-item.active .showcase-item-dot {
  border-color: var(--primary);
  background: rgba(82,113,255,0.18);
  box-shadow: 0 0 0 4px rgba(82,113,255,0.16);
}

.showcase-stage {
  position: relative;
  min-height: 560px;
  width: min(100%, 760px);
  max-width: 760px;
  margin: 0 auto;
}

.showcase-stage-card {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: none;
}

.showcase-stage-card.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.showcase-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(15,23,42,0.08);
}

.showcase-card-visual {
  position: relative;
  min-height: 380px;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.showcase-card-visual.workspace {
  background: linear-gradient(135deg, #e5ecff 0%, #e7f3ff 52%, #eef8ff 100%);
}

.showcase-card-visual.operations {
  background: linear-gradient(135deg, #e8f2ff 0%, #e6fcff 56%, #f0eeff 100%);
}

.showcase-card-visual.talent {
  background: linear-gradient(135deg, #efeaff 0%, #f9ecff 56%, #e9f2ff 100%);
}

.showcase-card-visual.insights {
  background: linear-gradient(135deg, #e6ebff 0%, #e7faff 48%, #efe9ff 100%);
}

.showcase-video-frame {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.showcase-video-canvas {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  border: 1px solid rgba(148,163,184,0.32);
  box-shadow: 0 10px 24px rgba(15,23,42,0.08);
  background: linear-gradient(180deg, rgba(255,255,255,0.96) 0%, rgba(248,250,252,0.98) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.showcase-video-play {
  width: 88px;
  height: 88px;
  border-radius: 999px;
  background: rgba(255,255,255,0.96);
  border: 1px solid rgba(203,213,225,0.9);
  box-shadow: 0 8px 24px rgba(15,23,42,0.16);
  display: flex;
  align-items: center;
  justify-content: center;
}

.showcase-video-play::before {
  content: "";
  width: 0;
  height: 0;
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
  border-left: 18px solid #5271ff;
  margin-left: 4px;
}

.showcase-mockup-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(226,232,240,0.9);
  background: rgba(248,250,252,0.92);
}

.showcase-mockup-top span {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #c7d2e2;
}

.showcase-metric-grid {
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.showcase-metric-grid div {
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(226,232,240,0.9);
  background: #f8fafc;
}

.showcase-metric-grid small {
  display: block;
  font-size: 10px;
  letter-spacing: 0.4px;
  font-weight: 700;
  color: #64748b;
}

.showcase-metric-grid strong {
  display: block;
  margin-top: 5px;
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
}

.showcase-mockup-list {
  padding: 10px;
  display: grid;
  gap: 8px;
}

.showcase-mockup-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid rgba(226,232,240,0.9);
  background: #f8fafc;
}

.showcase-mockup-row strong {
  display: block;
  font-size: 12px;
  color: var(--text);
}

.showcase-mockup-row small {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  color: #64748b;
}

.showcase-status {
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  color: #2f53e7;
  background: rgba(82,113,255,0.12);
}

.showcase-progress-mockup {
  width: 110px;
  height: 8px;
  border-radius: 999px;
  background: #dfe7f5;
  overflow: hidden;
  margin-top: 5px;
}

.showcase-progress-mockup span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #5271ff 0%, #14b8a6 100%);
}

.showcase-insight-head {
  display: flex;
  justify-content: space-between;
  padding: 12px 12px 8px;
}

.showcase-insight-head strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.showcase-insight-head small {
  font-size: 10px;
  color: #64748b;
}

.showcase-insight-chart {
  margin: 0 12px;
  height: 120px;
  display: flex;
  align-items: flex-end;
  gap: 5px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(226,232,240,0.9);
  background: #f8fafc;
}

.showcase-insight-chart span {
  flex: 1;
  border-radius: 4px 4px 2px 2px;
  background: rgba(82,113,255,0.24);
}

.showcase-insight-chart span:nth-child(3n) {
  background: rgba(20,184,166,0.24);
}

.showcase-card-body {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 18px;
}

.showcase-card-copy h3 {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.2px;
  margin-bottom: 6px;
  color: var(--text);
}

.showcase-card-copy p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 440px;
}

.showcase-learn-pill {
  border: none;
  border-radius: var(--radius-btn);
  padding: 10px 22px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s;
}

.showcase-learn-pill:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(82,113,255,0.25);
}

.showcase-mobile-stack {
  display: none;
}

.showcase-mobile-intro {
  display: none;
}

/* CTA section */
.cta-section {
  padding: 0;
}

.cta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  padding: 64px 0;
  max-width: var(--wrapper-max);
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.cta-bar-wrap {
  background: linear-gradient(135deg, var(--brand-soft) 0%, #EEF2FF 50%, var(--accent-soft) 100%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

@keyframes ctaGradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes ctaMeshBase {
  0% {
    background-position: 0% 30%;
  }
  50% {
    background-position: 100% 70%;
  }
  100% {
    background-position: 0% 30%;
  }
}

@keyframes ctaMeshLayerOne {
  0% {
    transform: translate3d(-10%, -4%, 0) scale(1);
    opacity: 0.62;
  }
  50% {
    transform: translate3d(8%, 3%, 0) scale(1.1);
    opacity: 0.78;
  }
  100% {
    transform: translate3d(-6%, 10%, 0) scale(1.02);
    opacity: 0.66;
  }
}

@keyframes ctaMeshLayerTwo {
  0% {
    transform: translate3d(12%, -8%, 0) scale(1.05);
    opacity: 0.46;
  }
  50% {
    transform: translate3d(-8%, 10%, 0) scale(1.16);
    opacity: 0.62;
  }
  100% {
    transform: translate3d(6%, -6%, 0) scale(1.08);
    opacity: 0.5;
  }
}

@keyframes ctaOrbOrbit {
  0% {
    transform: translate(-50%, -50%) rotate(0deg) translateX(var(--orb-radius)) scale(0.94);
    opacity: 0.4;
  }
  25% {
    transform: translate(-50%, -50%) rotate(90deg) translateX(var(--orb-radius)) scale(1.08);
    opacity: 0.62;
  }
  50% {
    transform: translate(-50%, -50%) rotate(180deg) translateX(var(--orb-radius)) scale(0.86);
    opacity: 0.46;
  }
  75% {
    transform: translate(-50%, -50%) rotate(270deg) translateX(var(--orb-radius)) scale(1.1);
    opacity: 0.64;
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg) translateX(var(--orb-radius)) scale(0.95);
    opacity: 0.42;
  }
}

.cta-bar-wrap-home {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-top: 0;
  border-bottom: 0;
  background: linear-gradient(115deg, #4d43de 0%, #605df3 28%, #8b79ff 58%, #7eb5ff 100%);
  background-size: 180% 180%;
  animation: ctaMeshBase 9s ease-in-out infinite;
}

.cta-bar-wrap-home::before {
  content: "";
  position: absolute;
  inset: -30%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(42% 46% at 20% 20%, rgba(78, 70, 229, 0.85) 0%, rgba(78, 70, 229, 0) 72%),
    radial-gradient(40% 45% at 80% 24%, rgba(109, 163, 255, 0.78) 0%, rgba(109, 163, 255, 0) 72%),
    radial-gradient(44% 48% at 50% 84%, rgba(189, 143, 255, 0.76) 0%, rgba(189, 143, 255, 0) 75%);
  filter: blur(34px) saturate(116%);
  mix-blend-mode: screen;
  transform-origin: center;
  animation: ctaMeshLayerOne 7s ease-in-out infinite alternate;
}

.cta-bar-wrap-home::after {
  content: "";
  position: absolute;
  inset: -34%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(35% 40% at 30% 72%, rgba(83, 118, 255, 0.62) 0%, rgba(83, 118, 255, 0) 70%),
    radial-gradient(36% 42% at 72% 66%, rgba(132, 108, 255, 0.62) 0%, rgba(132, 108, 255, 0) 70%),
    radial-gradient(32% 36% at 58% 30%, rgba(160, 214, 255, 0.48) 0%, rgba(160, 214, 255, 0) 72%);
  filter: blur(46px) saturate(124%);
  mix-blend-mode: soft-light;
  animation: ctaMeshLayerTwo 10s ease-in-out infinite alternate;
}

.cta-bar-wrap-home .cta-bar {
  position: relative;
  z-index: 1;
}

.cta-bar-wrap-home .cta-bar > * {
  position: relative;
  z-index: 2;
}

.cta-bar-wrap-home .cta-bar-text {
  position: relative;
  overflow: visible;
}

.cta-bar-wrap-home .cta-orbit-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.cta-bar-wrap-home .cta-orb {
  position: absolute;
  left: var(--orb-center-x);
  top: var(--orb-center-y);
  width: var(--orb-size);
  height: var(--orb-size);
  border-radius: 999px;
  filter: blur(10px) saturate(126%);
  transform-origin: center;
  animation: ctaOrbOrbit var(--orb-duration) linear infinite;
}

.cta-bar-wrap-home .cta-orb-1 {
  --orb-size: 276px;
  --orb-radius: 304px;
  --orb-duration: 20.8s;
  --orb-center-x: 18%;
  --orb-center-y: 52%;
  background: radial-gradient(circle at 50% 50%, rgba(238, 228, 255, 0.78) 0%, rgba(196, 167, 255, 0.4) 42%, rgba(196, 167, 255, 0) 72%);
  mix-blend-mode: screen;
  filter: blur(8px) saturate(118%);
}

.cta-bar-wrap-home .cta-orb-2 {
  --orb-size: 276px;
  --orb-radius: 304px;
  --orb-duration: 21.6s;
  --orb-center-x: 50%;
  --orb-center-y: 48%;
  background: radial-gradient(circle at 52% 52%, rgba(74, 88, 228, 0.72) 0%, rgba(74, 88, 228, 0.44) 44%, rgba(74, 88, 228, 0) 74%);
  mix-blend-mode: difference;
  animation-direction: reverse;
}

.cta-bar-wrap-home .cta-orb-3 {
  --orb-size: 276px;
  --orb-radius: 304px;
  --orb-duration: 21.2s;
  --orb-center-x: 82%;
  --orb-center-y: 52%;
  background: radial-gradient(circle at 50% 50%, rgba(165, 232, 255, 0.82) 0%, rgba(147, 222, 255, 0.42) 44%, rgba(147, 222, 255, 0) 74%);
  mix-blend-mode: screen;
}

.cta-bar-wrap-home .cta-bar-text h2,
.cta-bar-wrap-home .cta-bar-text p {
  color: rgba(255, 255, 255, 0.96);
  background: none;
  -webkit-text-fill-color: currentColor;
}

.cta-bar-wrap-home .cta-bar-text p {
  color: rgba(255, 255, 255, 0.9);
}

.cta-bar-wrap-home .btn-primary {
  background: rgba(255, 255, 255, 0.95);
  color: #1f2a44;
  box-shadow: 0 8px 24px rgba(9, 18, 44, 0.24);
}

.cta-bar-wrap-home .btn-primary:hover {
  background: #ffffff;
}

.cta-bar-text h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #5271FF 0%, #4563F5 35%, #3754DA 70%, #14B8A6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 6px;
}

.cta-bar-text p {
  font-size: 15px;
  background: linear-gradient(135deg, #5B6A8B 0%, #4A5C83 55%, #3E7E8E 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.7;
  max-width: 520px;
}

@media (max-width: 639px) {
  .cta-bar { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .cta-bar-wrap-home {
    animation: none;
  }
  .cta-bar-wrap-home::before {
    animation: none;
  }
  .cta-bar-wrap-home::after {
    animation: none;
  }
  .cta-bar-wrap-home .cta-orb {
    animation: none;
  }
}

@media (max-width: 900px) {
  .cta-bar-wrap-home .cta-orb-1 { --orb-size: 194px; --orb-radius: 204px; --orb-duration: 18.2s; --orb-center-x: 18%; --orb-center-y: 56%; }
  .cta-bar-wrap-home .cta-orb-2 { --orb-size: 194px; --orb-radius: 204px; --orb-duration: 19s; --orb-center-x: 50%; --orb-center-y: 50%; }
  .cta-bar-wrap-home .cta-orb-3 { --orb-size: 194px; --orb-radius: 204px; --orb-duration: 18.6s; --orb-center-x: 82%; --orb-center-y: 56%; }
}

/* Footer */
footer {
  background: var(--text);
  color: rgba(255,255,255,0.7);
  padding: 60px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr;
  gap: 36px;
  max-width: var(--wrapper-max);
  margin: 0 auto;
  padding: 0 24px;
}

.footer-brand-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer-logo {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 22px;
  color: var(--white);
  letter-spacing: -0.5px;
  cursor: pointer;
}

.footer-logo span { color: var(--primary); }

.footer-brand-desc {
  font-size: 14px;
  color: rgba(255,255,255,0.45);
  line-height: 1.65;
  max-width: 240px;
}

.footer-brand-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--font-body);
  transition: all 0.15s;
  padding: 0;
  margin-top: 4px;
}

.footer-brand-cta:hover { color: var(--white); gap: 10px; }

.footer-col h4 {
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.45);
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  font-size: 14px;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  padding: 4px 0;
  cursor: pointer;
  transition: color 0.15s;
}

.footer-col a:hover { color: var(--white); }

.footer-bottom {
  max-width: var(--wrapper-max);
  margin: 48px auto 0;
  padding: 20px 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}

.footer-bottom-links {
  display: flex;
  gap: 20px;
}

.footer-bottom-links a {
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  transition: color 0.15s;
  cursor: pointer;
}

.footer-bottom-links a:hover { color: var(--white); }

/* Sub-pages */
.page-hero {
  padding: 60px 0 48px;
  border-bottom: 1px solid var(--border);
  background: 
    radial-gradient(ellipse 70% 60% at 15% 50%, rgba(82,113,255,0.06) 0%, transparent 70%),
    radial-gradient(ellipse 50% 70% at 85% 40%, rgba(55,84,218,0.04) 0%, transparent 70%),
    linear-gradient(180deg, #F8FAFC 0%, #F2F4FF 50%, #F8FAFC 100%);
  position: relative;
  overflow: hidden;
}

.page-hero-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  max-width: var(--wrapper-max);
  margin: 0 auto;
  padding: 0 24px;
}

.page-hero-text {
  text-align: left;
}

.page-hero .breadcrumb {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-bottom: 16px;
}

.page-hero .breadcrumb a {
  color: var(--primary);
  text-decoration: none;
  cursor: pointer;
}

.page-hero-text h1 {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 4vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--text);
  margin: 0 0 14px;
  line-height: 1.15;
}

.page-hero-text p {
  font-size: 16px;
  color: var(--text-secondary);
  margin: 0 0 24px;
  line-height: 1.7;
}

.page-hero-visual {
  background: linear-gradient(135deg, var(--brand-soft) 0%, var(--muted) 100%);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.page-hero-visual-inner {
  background: var(--white);
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 20px;
  box-shadow: 0 4px 16px rgba(15,23,42,0.04);
}

.page-hero-visual .visual-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.page-hero-visual .visual-row:last-child { border-bottom: none; }

.page-hero-visual .visual-dot {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.page-hero-visual .visual-dot.blue { background: var(--brand-soft); color: var(--primary); }
.page-hero-visual .visual-dot.teal { background: var(--accent-soft); color: var(--accent); }

.page-hero-visual .visual-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.page-hero-visual .visual-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.page-hero-visual .visual-bar {
  height: 6px;
  border-radius: 3px;
  background: var(--primary);
  opacity: 0.2;
}

.page-hero-visual .visual-metric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.page-hero-visual .visual-metric {
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
}

.page-hero-visual .visual-metric-label {
  font-size: 10px;
  color: var(--text-tertiary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.page-hero-visual .visual-metric-val {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  margin-top: 2px;
}

.page-body { padding: 0; }

.page-body > .section {
  max-width: none;
  margin: 0;
  padding: 0;
}

.page-section {
  margin: 0;
  padding: 56px 0;
  border-top: 1px solid var(--border);
}

.page-body .page-section:nth-child(odd) {
  background: var(--white);
}

.page-body .page-section:nth-child(even) {
  background: linear-gradient(180deg, #F8FAFC 0%, #F2F4FF 100%);
}

.page-body .page-section > * {
  max-width: var(--wrapper-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

.page-section h2 {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
  color: var(--text);
}

.page-section > p {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: min(760px, 100%);
  line-height: 1.7;
  margin-bottom: 28px;
}

/* Feature cards for sub-pages */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.feature-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  transition: all 0.2s;
}

.feature-card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 2px 12px rgba(15,23,42,0.04);
}

.feature-card h3 {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

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

/* Module detail flow sections */
.module-flow {
  display: grid;
  gap: 0;
}

.module-flow-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
  gap: 42px;
  align-items: center;
  padding: 34px 0;
}

.module-flow-item.reverse {
  grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1fr);
}

.module-feature-section {
  padding: 56px 0;
}

.module-feature-section.light {
  background: var(--white);
}

.module-feature-section.muted {
  background: linear-gradient(180deg, #F8FAFC 0%, #F2F4FF 100%);
}

.module-feature-section .section {
  max-width: var(--wrapper-max);
  margin: 0 auto;
  padding: 0 24px;
}

.module-intro-section {
  margin: 0;
  padding: 56px 0;
  border-top: 0;
}

.module-flow-text h3 {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.6px;
  color: var(--text);
  margin-bottom: 10px;
}

.module-flow-text p {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.module-flow-visual {
  background: linear-gradient(135deg, var(--brand-soft), var(--accent-soft));
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
}

.module-flow-visual-inner {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 2px 12px rgba(15,23,42,0.04);
}

.module-flow-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.module-flow-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  background: var(--brand-soft);
  border: 1px solid rgba(82,113,255,0.12);
  border-radius: 999px;
  padding: 5px 10px;
}

.module-flow-bars {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 6px;
  align-items: end;
  height: 80px;
}

.module-flow-bars span {
  border-radius: 4px 4px 0 0;
  background: var(--primary);
  opacity: 0.16;
}

.module-flow-bars span:nth-child(odd) { opacity: 0.24; }
.module-flow-bars span:nth-child(3) { background: var(--accent); opacity: 0.36; }
.module-flow-bars span:nth-child(6) { opacity: 0.32; }
.module-flow-bars span:nth-child(1) { height: 52%; }
.module-flow-bars span:nth-child(2) { height: 40%; }
.module-flow-bars span:nth-child(3) { height: 72%; }
.module-flow-bars span:nth-child(4) { height: 50%; }
.module-flow-bars span:nth-child(5) { height: 66%; }
.module-flow-bars span:nth-child(6) { height: 78%; }
.module-flow-bars span:nth-child(7) { height: 58%; }
.module-flow-bars span:nth-child(8) { height: 70%; }

/* FAQ */
.faq-item {
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 8px;
  overflow: hidden;
  transition: all 0.15s;
}

.faq-item:hover { border-color: var(--border-strong); }

.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  background: none;
  border: none;
  width: 100%;
  text-align: left;
}

.faq-a {
  padding: 0 22px 18px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Pricing cards */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.pricing-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 32px;
  transition: all 0.2s;
}

.pricing-card:hover { box-shadow: 0 8px 32px rgba(15,23,42,0.06); }

.pricing-card.featured {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
  position: relative;
}

.pricing-card.featured::before {
  content: 'Popular';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 100px;
}

.pricing-card h3 {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
}

.pricing-card .desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
}

.pricing-includes {
  margin-bottom: 24px;
}

.pricing-include-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 6px 0;
  font-size: 14px;
  color: var(--text-secondary);
}

.pricing-include-item svg { color: var(--accent); margin-top: 2px; flex-shrink: 0; }

/* Contact form */
.contact-form-block {
  max-width: min(760px, 100%);
  margin-top: 28px;
}

.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 100%;
}

.contact-form .full { grid-column: 1 / -1; }

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  transition: border-color 0.15s;
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(82,113,255,0.1);
}

.form-group textarea { resize: vertical; min-height: 100px; }

/* Responsive */
@media (max-width: 900px) {
  .hero-card { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .hero-text { text-align: center; }
  .hero-actions { justify-content: center; }
  .page-hero-card { grid-template-columns: 1fr; }
  .page-hero-visual { display: none; }
  .page-hero-text { text-align: center; }
  .page-hero-text .hero-actions { justify-content: center; }
  .mockup-body { grid-template-columns: 1fr; }
  .mockup-sidebar, .mockup-panel { display: none; }
  .tab-content { grid-template-columns: 1fr; }
  .tab-text {
    min-height: auto;
    display: block;
  }
  .tab-features { min-height: 0; }
  .tab-outcome { min-height: 0; }
  .tab-visual { display: none; }
  .module-flow-item,
  .module-flow-item.reverse {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 24px 0;
  }
  .module-flow-item.reverse .module-flow-visual {
    order: 2;
  }
  .module-flow-item.reverse .module-flow-text {
    order: 1;
  }
  .steps-grid { grid-template-columns: repeat(2, 1fr); }
  .showcase-scroll-wrap { display: none; }
  .showcase-mobile-intro {
    display: block;
    text-align: center;
    max-width: 700px;
    margin: 0 auto 16px;
  }
  .showcase-mobile-stack {
    display: grid;
    gap: 16px;
    margin-top: 0;
  }
  .showcase-list-col { transform: none; }
  .showcase-card-body {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-brand-col { grid-column: 1 / -1; }
  .pricing-grid { grid-template-columns: 1fr; }
  .contact-form { grid-template-columns: 1fr; }
  .contact-form .full { grid-column: 1; }

}

/* ============================================
   Tablet in-between range (901-1023px)
   Stage 2B refinements for sections that look
   cramped at this width
   ============================================ */
@media (min-width: 901px) and (max-width: 1023px) {
  .mockup-body {
    grid-template-columns: 200px 1fr;
  }
  .mockup-panel {
    display: none;
  }
}

@media (min-width: 901px) and (max-width: 1023px) {
  .tab-content {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .tab-text {
    min-height: auto;
    display: block;
  }
  .tab-features { min-height: 0; }
  .tab-outcome { min-height: 0; }
  .tab-visual { display: none; }
}

@media (min-width: 901px) and (max-width: 1023px) {
  .module-flow-item,
  .module-flow-item.reverse {
    gap: 28px;
    padding: 28px 0;
  }
}

/* ============================================
   Stage 2C - Tablet in-between range (901-1023px)
   Steps: 2 cols (was 4)
   CTA: tighter padding
   ============================================ */
@media (min-width: 901px) and (max-width: 1023px) {
  .steps-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}

@media (min-width: 901px) and (max-width: 1023px) {
  .cta-bar {
    padding-top: 48px;
    padding-bottom: 48px;
  }
}

/* ============================================
   Stage 2C continued — 4-card grid fix (901-1067px)
   Targets only grids with exactly 4 cards (via
   .cards-grid-4 class) to prevent 3+1 asymmetric
   wrap. 3-card and 6-card grids using .cards-grid
   are intentionally left untouched.
   ============================================ */
@media (min-width: 901px) and (max-width: 1067px) {
  .cards-grid-4 {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* ============================================
   Stage 2D.1 — Contact + Footer
   Footer-grid tighter gap at 901-1067 in-between range.
   Footer-bottom stacks vertically at mobile (<640px).
   Contact form: no changes needed (max-width: 640px caps
   width, existing 900px rule handles mobile collapse).
   ============================================ */
@media (min-width: 901px) and (max-width: 1067px) {
  .footer-grid {
    gap: 24px;
  }
}

@media (max-width: 639px) {
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

@media (min-width: 640px) and (max-width: 1023px) {
  .hero {
    padding: 56px 0 48px;
  }
  .hero-card {
    gap: 2rem;
  }
  .page-hero {
    padding: 48px 0 40px;
  }
  .page-hero-card {
    gap: 2rem;
  }
}

@media (max-width: 639px) {
  .nav-links { display: none; }
  .nav-signin { display: none; }
  .steps-grid { grid-template-columns: 1fr; }
  .hero { padding: 48px 0 40px; }
  .hero-card { gap: 1.5rem; }
  .page-hero {
    padding: 40px 0 32px;
  }
  .page-hero-card { gap: 1.5rem; }
}

/* Mobile menu */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  padding: 4px;
}

@media (max-width: 639px) {
  .mobile-menu-btn { display: block; }
}

.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.4);
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.mobile-overlay.open { opacity: 1; pointer-events: auto; }

.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 300px;
  background: var(--white);
  z-index: 301;
  padding: 20px;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  overflow-y: auto;
}

.mobile-drawer.open { transform: translateX(0); }

.mobile-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.mobile-drawer-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
}

.mobile-nav-item {
  display: block;
  padding: 12px 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
}

.mobile-nav-section {
  border-bottom: 1px solid var(--border);
}

.mobile-nav-parent {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--font-body);
  text-align: left;
}

.mobile-nav-parent svg {
  transition: transform 0.2s ease;
  flex-shrink: 0;
  color: var(--text-tertiary);
}

.mobile-nav-parent.open svg {
  transform: rotate(180deg);
}

.mobile-nav-children {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.25s ease;
}

.mobile-nav-children.open {
  max-height: 500px;
}

.mobile-nav-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0 10px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
}

.mobile-nav-child:hover {
  color: var(--text);
}

.mobile-nav-child.active {
  color: var(--primary);
  font-weight: 600;
}

.mobile-nav-child .badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 100px;
  background: var(--brand-soft);
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.coming-soon-badge {
  display: inline-flex;
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 2px 10px;
  border-radius: 100px;
  margin-left: 8px;
  vertical-align: middle;
}
`;

// ─── Data ───
const modules = [
  {
    key: "workspace",
    name: "Workspace Management",
    icon: <IconWorkspace />,
    desc: "Go beyond task tracking with a workspace built for execution visibility, operational structure and team alignment.",
    features: ["Project Management", "Task Management", "Build Activity Log", "Overview Interface", "Notes & Library"],
    outcome: "Keep work structured, progress visible and execution connected across teams.",
    h1: "Run execution in one connected workspace",
    subtitle: "Manage projects, tasks and execution in a shared operational system built for visibility, structure and team alignment.",
    intro_title: "Project and task management with more operational context",
    intro_copy: "Dragoon Workspace Management helps teams organize projects, track tasks and monitor execution from one connected workspace. Instead of switching between disconnected tools, teams can manage progress, activity and context in one system.",
    feature_details: [
      { title: "Project Management", copy: "Structure projects with clearer ownership, better visibility and stronger coordination across teams." },
      { title: "Task Management", copy: "Track work in board and list views that support flexible execution without losing visibility." },
      { title: "Build Activity Log", copy: "Follow build outcomes and project changes through a clear activity history." },
      { title: "Overview Interface", copy: "See priorities, progress and active work at a glance." },
      { title: "Notes & Library", copy: "Keep supporting knowledge and project context close to the work itself." },
    ],
    cta_title: "Give teams a more connected way to execute",
  },
  {
    key: "hris",
    name: "HRIS",
    icon: <IconHRIS />,
    desc: "Build a people operations foundation that works with the rest of the business, not beside it.",
    features: ["Employee Management", "Leave Management", "Overtime Management", "Asset Management", "Organization Groups"],
    outcome: "Create a more scalable HR backbone with cleaner structure, stronger control and connected workflows.",
    h1: "Build a people operations backbone that works with the business",
    subtitle: "Manage employee data, approvals and operational workflows in one connected HRIS system.",
    intro_title: "HRIS software built for structure, control and scale",
    intro_copy: "Dragoon HRIS centralizes employee records, leave workflows, overtime processes, asset tracking and organization structures in one system. It gives teams a more reliable foundation for everyday people operations.",
    feature_details: [
      { title: "Employee Management", copy: "Keep employee information structured, centralized and easier to manage." },
      { title: "Leave Management", copy: "Create dynamic leave workflows with approval-based processes and clearer policy control." },
      { title: "Overtime Management", copy: "Track overtime requests through more structured and visible approval flows." },
      { title: "Asset Management", copy: "Manage assigned equipment and inventory status with stronger operational visibility." },
      { title: "Organization Groups", copy: "Support matrix structures and more flexible organizational design." },
    ],
    cta_title: "Run people operations with more clarity and control",
  },
  {
    key: "talenthub",
    name: "TalentHub",
    icon: <IconTalent />,
    desc: "Connect reviews, goals and capability development in one system instead of managing performance in fragments.",
    features: ["Reviews", "360 Performance Reviews", "OKR / Goals", "Competency Framework"],
    outcome: "Turn performance, alignment and development into one connected growth system.",
    h1: "Connect performance, goals and growth in one system",
    subtitle: "Bring reviews, OKRs and competency frameworks together to support clearer expectations and stronger development.",
    intro_title: "A more connected talent management system",
    intro_copy: "Dragoon TalentHub helps organizations manage performance, alignment and capability development in one place. Instead of running reviews, goals and competency frameworks separately, teams can connect them in one structured system.",
    feature_details: [
      { title: "Reviews", copy: "Run performance review cycles with more structure and consistency." },
      { title: "360 Performance Reviews", copy: "Collect feedback from self, managers, peers and direct reports in one review flow." },
      { title: "OKR / Goals", copy: "Align company, team and individual goals with clearer visibility into progress." },
      { title: "Competency Framework", copy: "Define role- and level-based expectations that support stronger development decisions." },
    ],
    cta_title: "Turn performance and development into one connected system",
  },
  {
    key: "engagementhub",
    name: "EngagementHub",
    icon: <IconEngagement />,
    desc: "Capture employee voice continuously and connect it to the broader context of how teams actually work.",
    features: ["Surveys", "Instant Feedback", "1:1 Meetings"],
    outcome: "Spot signals earlier, support better conversations and build a stronger feedback culture.",
    h1: "Make employee voice part of the system",
    subtitle: "Capture feedback continuously through surveys, instant feedback and 1:1 meetings.",
    intro_title: "Continuous listening for healthier teams",
    intro_copy: "Dragoon EngagementHub helps organizations understand employee experience through connected feedback workflows. By combining surveys, instant feedback and 1:1 meetings, teams can spot signals earlier and strengthen feedback culture over time.",
    feature_details: [
      { title: "Surveys", copy: "Measure engagement, sentiment and employee experience through structured survey workflows." },
      { title: "Instant Feedback", copy: "Support faster, lighter feedback in the flow of work." },
      { title: "1:1 Meetings", copy: "Create stronger manager-employee dialogue through recurring one-on-one conversations." },
    ],
    cta_title: "Build stronger feedback loops across the employee experience",
  },
  {
    key: "cortex",
    name: "Cortex AI",
    icon: <IconAI />,
    desc: "Use AI where it creates real workflow value — from creation to summarization to decision support.",
    features: ["OKRGenAI", "CompetencyGenAI", "SurveyAI", "360 Review AI", "AI Assistant Chatbot"],
    outcome: "Reduce manual effort, improve consistency and move faster with AI built into the work itself.",
    h1: "AI built into the workflows teams already use",
    subtitle: "Use AI to create, summarize and support key workflows across planning, development and decision-making.",
    intro_title: "Practical AI for real workflows",
    intro_copy: "Cortex AI brings AI directly into the Dragoon ecosystem. From OKR generation to competency design and review summarization, it helps teams move faster with more consistency and less manual work.",
    feature_details: [
      { title: "OKRGenAI", copy: "Generate stronger objectives and key results with less drafting effort." },
      { title: "CompetencyGenAI", copy: "Accelerate competency framework creation for roles, teams and levels." },
      { title: "SurveyAI", copy: "Summarize survey input and surface important patterns faster." },
      { title: "360 Review AI", copy: "Make large volumes of review feedback easier to interpret and act on." },
      { title: "AI Assistant Chatbot", copy: "Provide instant answers, guidance and support across the platform." },
    ],
    cta_title: "Bring AI into the workflows where it creates real value",
  },
  {
    key: "insights",
    name: "Dragoon Insights",
    icon: <IconInsights />,
    comingSoon: true,
    desc: "A new intelligence layer designed to turn connected people and operational data into actionable insight.",
    features: ["Interactive Dashboards", "Predictive Analytics", "Sentiment & Topic Analysis", "AI Chatbot", "Unified Data Layer"],
    outcome: "Move from disconnected metrics to clearer, more decision-ready organizational intelligence.",
    h1: "Turn connected system data into organizational intelligence",
    subtitle: "Dragoon Insights connects people, performance and operational data to support clearer, more actionable decisions.",
    intro_title: "A new intelligence layer for deeper organizational understanding",
    intro_copy: "Dragoon Insights is designed to transform connected system data into a more meaningful analytics layer. By bringing together signals from across the platform, it helps organizations move from disconnected metrics to decision-ready insight.",
    feature_details: [
      { title: "Interactive Dashboards", copy: "Explore workforce and HR metrics through connected, real-time dashboards." },
      { title: "Predictive Analytics", copy: "Identify emerging risks and future patterns through forward-looking analytics." },
      { title: "Sentiment & Topic Analysis", copy: "Understand employee sentiment and recurring themes across written feedback." },
      { title: "AI Chatbot", copy: "Ask questions in natural language and explore insights faster." },
      { title: "Unified Data Layer", copy: "Connect employee, talent and operational signals in one analytics system." },
    ],
    cta_title: "See how Dragoon is building a more intelligent decision layer",
  },
];

const solutions = [
  {
    key: "hr",
    name: "For HR Teams",
    card_desc: "Centralize people operations, performance, engagement and core employee workflows in one structured system.",
    h1: "A connected system for modern HR teams",
    subtitle: "Dragoon helps HR teams manage people operations, performance, engagement and talent workflows in one structured platform. Instead of switching between disconnected tools, teams can work with more clarity, consistency and control.",
    intro_title: "More than HR software",
    intro_copy: "HR teams do more than manage records. They support growth, structure performance processes, improve employee experience and help the organization operate more effectively. Dragoon brings these workflows together in one connected system so HR can move faster, reduce fragmentation and work from a stronger operational foundation.",
    values: [
      { title: "Centralize people operations", desc: "Manage employee data, leave, overtime, assets and organizational structure in one operational backbone." },
      { title: "Connect performance and development", desc: "Bring reviews, OKRs and competency frameworks together in one talent system." },
      { title: "Strengthen employee experience", desc: "Capture employee voice through surveys, instant feedback and 1:1 workflows." },
      { title: "Reduce manual effort with AI", desc: "Use AI to support drafting, summarization and workflow guidance across key HR processes." },
    ],
  },
  {
    key: "managers",
    name: "For Managers",
    card_desc: "Support alignment, feedback, growth and day-to-day team visibility from one connected platform.",
    h1: "Give managers more clarity, structure and visibility",
    subtitle: "Dragoon helps managers stay aligned on goals, support employee growth, run better feedback loops and keep a clearer view of team execution in one connected platform.",
    intro_title: "Management works better with connected context",
    intro_copy: "Managers are expected to support performance, growth, feedback and execution at the same time. Dragoon brings these workflows together in one system, helping managers reduce fragmentation, improve follow-through and make better day-to-day decisions with broader context.",
    values: [
      { title: "Keep goals visible", desc: "Track OKRs, priorities and progress with clearer alignment across the team." },
      { title: "Support growth consistently", desc: "Use reviews, competencies and feedback workflows to guide development with more structure." },
      { title: "Strengthen team conversations", desc: "Run more meaningful 1:1s and feedback loops with better continuity." },
      { title: "See more across the team", desc: "Connect execution, people signals and performance context in one place." },
    ],
  },
  {
    key: "leadership",
    name: "For Leadership",
    card_desc: "Gain broader visibility across execution, people signals and organizational decisions.",
    h1: "See the organization with more clarity",
    subtitle: "Dragoon helps leadership teams connect execution, people operations, talent signals and organizational visibility in one platform.",
    intro_title: "Better decisions start with connected visibility",
    intro_copy: "Leadership teams need more than isolated reports from separate tools. They need a clearer view of how work is moving, how teams are operating and where performance, engagement or operational risks may be building. Dragoon brings these signals together in one connected system.",
    values: [
      { title: "See across functions", desc: "Connect work, people operations and talent workflows instead of managing them in separate systems." },
      { title: "Improve organizational visibility", desc: "Gain clearer line of sight into execution, employee signals and operational structure." },
      { title: "Reduce fragmentation", desc: "Replace disconnected workflows with one platform that supports alignment across teams." },
      { title: "Build toward stronger decisions", desc: "Create a better foundation for organizational clarity today and deeper intelligence over time." },
    ],
  },
  {
    key: "growing",
    name: "For Growing Organizations",
    card_desc: "Replace fragmented tools with a more scalable system built for connected operations.",
    h1: "Scale with a more connected operating system",
    subtitle: "Dragoon helps growing organizations replace fragmented tools with one platform for execution, people operations, talent workflows and organizational visibility.",
    intro_title: "Growth becomes harder when systems stay disconnected",
    intro_copy: "As organizations grow, operational complexity grows with them. More people, more processes and more dependencies make it harder to manage work, people operations and performance through separate tools. Dragoon brings these workflows together in one connected platform.",
    values: [
      { title: "Replace disconnected systems", desc: "Bring execution, HR workflows, talent processes and employee signals into one platform." },
      { title: "Create stronger operational structure", desc: "Run approvals, reviews, goals and team workflows with more consistency." },
      { title: "Improve visibility as complexity grows", desc: "See more across work, people and performance instead of managing isolated data points." },
      { title: "Build for scale", desc: "Support growth with a system designed to stay connected as the organization evolves." },
    ],
  },
];

const faqData = {
  general: [
    { q: "What is Dragoon?", a: "Dragoon is a connected platform for work, people operations, talent development, engagement and AI-supported workflows." },
    { q: "Who is Dragoon built for?", a: "Dragoon is built for organizations that want to manage execution, people workflows and performance in a more connected system." },
    { q: "Is Dragoon just an HR platform?", a: "No. Dragoon goes beyond standalone HR software by connecting people operations with execution, talent workflows, engagement and AI-supported workflows." },
    { q: "What makes Dragoon different?", a: "Dragoon brings work, people and intelligence into one platform instead of separating them across disconnected tools." },
  ],
  platform: [
    { q: "What modules does Dragoon include?", a: "Dragoon includes Workspace Management, HRIS, TalentHub, EngagementHub, Cortex AI and Dragoon Insights." },
    { q: "What is Cortex AI?", a: "Cortex AI is Dragoon's embedded AI layer for drafting, summarization and workflow support." },
    { q: "What is Dragoon Insights?", a: "Dragoon Insights is the future analytics and organizational intelligence layer of the platform. It is currently positioned as a coming soon capability." },
  ],
  buying: [
    { q: "Can I book a demo?", a: "Yes. You can book a demo to explore how Dragoon fits your organization." },
    { q: "Do I need every module to use Dragoon?", a: "No. Organizations can explore the platform based on their needs, while still benefiting from the value of a connected system." },
    { q: "Can different teams use Dragoon together?", a: "Yes. Dragoon is built as a connected platform, so different teams can operate from shared workflows and broader organizational context." },
  ],
};

// ─── Components ───

function Nav({ page, setPage }) {
  const [openDropdown, setOpenDropdown] = useState(null);
  const [mobileOpen, setMobileOpen] = useState(false);
  const [openMobileSection, setOpenMobileSection] = useState(null);
  const dropdownRef = useRef(null);

  useEffect(() => {
    const handler = (e) => {
      if (dropdownRef.current && !dropdownRef.current.contains(e.target)) {
        setOpenDropdown(null);
      }
    };
    document.addEventListener("mousedown", handler);
    return () => document.removeEventListener("mousedown", handler);
  }, []);

  const toggleDropdown = (name) => setOpenDropdown(openDropdown === name ? null : name);
  const toggleMobileSection = (key) => {
    setOpenMobileSection(prev => (prev === key ? null : key));
  };
  const closeMobileDrawer = () => {
    setMobileOpen(false);
    setOpenMobileSection(null);
  };

  return (
    <>
      <nav className="nav">
        <div className="nav-inner">
          <div className="nav-logo" onClick={() => { setPage("home"); setOpenDropdown(null); }}>
            Drag<span>oo</span>n
          </div>

          <div className="nav-links" ref={dropdownRef}>
            <div style={{ position: "relative" }}>
              <button className={`nav-item ${["platform","workspace","hris","talenthub","engagementhub","cortex","insights"].includes(page) ? "active" : ""}`} onClick={() => toggleDropdown("platform")}>
                Platform <ChevronDown />
              </button>
              <div className={`dropdown ${openDropdown === "platform" ? "open" : ""}`}>
                <div className="dropdown-item" onClick={() => { setPage("platform"); setOpenDropdown(null); }}>Overview</div>
                {modules.map(m => (
                  <div key={m.key} className="dropdown-item" onClick={() => { setPage(m.key); setOpenDropdown(null); }}>
                    {m.name}
                    {m.comingSoon && <span className="badge">Soon</span>}
                  </div>
                ))}
              </div>
            </div>

            <div style={{ position: "relative" }}>
              <button className={`nav-item ${["solutions","hr","managers","leadership","growing"].includes(page) ? "active" : ""}`} onClick={() => toggleDropdown("solutions")}>
                Solutions <ChevronDown />
              </button>
              <div className={`dropdown ${openDropdown === "solutions" ? "open" : ""}`}>
                <div className="dropdown-item" onClick={() => { setPage("solutions"); setOpenDropdown(null); }}>Overview</div>
                {solutions.map(s => (
                  <div key={s.key} className="dropdown-item" onClick={() => { setPage(s.key); setOpenDropdown(null); }}>
                    {s.name}
                  </div>
                ))}
              </div>
            </div>

            <div style={{ position: "relative" }}>
              <button className={`nav-item ${["resources","blog","guides","faqs","updates"].includes(page) ? "active" : ""}`} onClick={() => toggleDropdown("resources")}>
                Resources <ChevronDown />
              </button>
              <div className={`dropdown ${openDropdown === "resources" ? "open" : ""}`}>
                <div className="dropdown-item" onClick={() => { setPage("resources"); setOpenDropdown(null); }}>Overview</div>
                <div className="dropdown-item" onClick={() => { setPage("blog"); setOpenDropdown(null); }}>Blog</div>
                <div className="dropdown-item" onClick={() => { setPage("guides"); setOpenDropdown(null); }}>Guides</div>
                <div className="dropdown-item" onClick={() => { setPage("faqs"); setOpenDropdown(null); }}>FAQs</div>
                <div className="dropdown-item" onClick={() => { setPage("updates"); setOpenDropdown(null); }}>Product Updates</div>
              </div>
            </div>

            <button className={`nav-item ${page === "pricing" ? "active" : ""}`} onClick={() => { setPage("pricing"); setOpenDropdown(null); }}>Pricing</button>

            <div style={{ position: "relative" }}>
              <button className={`nav-item ${["about","contact"].includes(page) ? "active" : ""}`} onClick={() => toggleDropdown("about")}>
                About <ChevronDown />
              </button>
              <div className={`dropdown ${openDropdown === "about" ? "open" : ""}`}>
                <div className="dropdown-item" onClick={() => { setPage("about"); setOpenDropdown(null); }}>About Dragoon</div>
                <div className="dropdown-item" onClick={() => { setPage("contact"); setOpenDropdown(null); }}>Contact</div>
              </div>
            </div>
          </div>

          <div className="nav-actions">
            <button className="nav-signin">Sign in</button>
            <button className="btn-primary" style={{ padding: "8px 18px", fontSize: "13px" }} onClick={() => setPage("contact")}>Book a demo</button>
            <button className="mobile-menu-btn" onClick={() => setMobileOpen(true)}><Menu /></button>
          </div>
        </div>
      </nav>

      {/* Mobile drawer */}
      <div className={`mobile-overlay ${mobileOpen ? "open" : ""}`} onClick={closeMobileDrawer} />
      <div className={`mobile-drawer ${mobileOpen ? "open" : ""}`}>
        <div className="mobile-drawer-header">
          <div className="nav-logo">Drag<span>oo</span>n</div>
          <button className="mobile-drawer-close" onClick={closeMobileDrawer}><X /></button>
        </div>

        <div className="mobile-nav-section">
          <div className="mobile-nav-item" onClick={() => { setPage("home"); closeMobileDrawer(); }}>Home</div>
        </div>

        <div className="mobile-nav-section">
          <button className={`mobile-nav-parent ${openMobileSection === "platform" ? "open" : ""}`} onClick={() => toggleMobileSection("platform")}>
            Platform <ChevronDown />
          </button>
          <div className={`mobile-nav-children ${openMobileSection === "platform" ? "open" : ""}`}>
            <div className={`mobile-nav-child ${page === "platform" ? "active" : ""}`} onClick={() => { setPage("platform"); closeMobileDrawer(); }}>
              <span>Overview</span>
            </div>
            {modules.map((m) => (
              <div key={m.key} className={`mobile-nav-child ${page === m.key ? "active" : ""}`} onClick={() => { setPage(m.key); closeMobileDrawer(); }}>
                <span>{m.name}</span>
                {m.comingSoon && <span className="badge">Soon</span>}
              </div>
            ))}
          </div>
        </div>

        <div className="mobile-nav-section">
          <button className={`mobile-nav-parent ${openMobileSection === "solutions" ? "open" : ""}`} onClick={() => toggleMobileSection("solutions")}>
            Solutions <ChevronDown />
          </button>
          <div className={`mobile-nav-children ${openMobileSection === "solutions" ? "open" : ""}`}>
            <div className={`mobile-nav-child ${page === "solutions" ? "active" : ""}`} onClick={() => { setPage("solutions"); closeMobileDrawer(); }}>
              <span>Overview</span>
            </div>
            {solutions.map((s) => (
              <div key={s.key} className={`mobile-nav-child ${page === s.key ? "active" : ""}`} onClick={() => { setPage(s.key); closeMobileDrawer(); }}>
                <span>{s.name}</span>
              </div>
            ))}
          </div>
        </div>

        <div className="mobile-nav-section">
          <button className={`mobile-nav-parent ${openMobileSection === "resources" ? "open" : ""}`} onClick={() => toggleMobileSection("resources")}>
            Resources <ChevronDown />
          </button>
          <div className={`mobile-nav-children ${openMobileSection === "resources" ? "open" : ""}`}>
            <div className={`mobile-nav-child ${page === "resources" ? "active" : ""}`} onClick={() => { setPage("resources"); closeMobileDrawer(); }}>
              <span>Overview</span>
            </div>
            <div className={`mobile-nav-child ${page === "blog" ? "active" : ""}`} onClick={() => { setPage("blog"); closeMobileDrawer(); }}>
              <span>Blog</span>
            </div>
            <div className={`mobile-nav-child ${page === "guides" ? "active" : ""}`} onClick={() => { setPage("guides"); closeMobileDrawer(); }}>
              <span>Guides</span>
            </div>
            <div className={`mobile-nav-child ${page === "faqs" ? "active" : ""}`} onClick={() => { setPage("faqs"); closeMobileDrawer(); }}>
              <span>FAQs</span>
            </div>
            <div className={`mobile-nav-child ${page === "updates" ? "active" : ""}`} onClick={() => { setPage("updates"); closeMobileDrawer(); }}>
              <span>Product Updates</span>
            </div>
          </div>
        </div>

        <div className="mobile-nav-section">
          <div className="mobile-nav-item" onClick={() => { setPage("pricing"); closeMobileDrawer(); }}>Pricing</div>
        </div>

        <div className="mobile-nav-section">
          <button className={`mobile-nav-parent ${openMobileSection === "about" ? "open" : ""}`} onClick={() => toggleMobileSection("about")}>
            About <ChevronDown />
          </button>
          <div className={`mobile-nav-children ${openMobileSection === "about" ? "open" : ""}`}>
            <div className={`mobile-nav-child ${page === "about" ? "active" : ""}`} onClick={() => { setPage("about"); closeMobileDrawer(); }}>
              <span>About Dragoon</span>
            </div>
            <div className={`mobile-nav-child ${page === "contact" ? "active" : ""}`} onClick={() => { setPage("contact"); closeMobileDrawer(); }}>
              <span>Contact</span>
            </div>
          </div>
        </div>

        <div style={{ marginTop: 24 }}>
          <button className="btn-primary" style={{ width: "100%" }} onClick={() => { setPage("contact"); closeMobileDrawer(); }}>Book a demo</button>
        </div>
      </div>
    </>
  );
}

function Footer({ setPage }) {
  return (
    <footer>
      <div className="footer-grid">
        <div className="footer-brand-col">
          <div className="footer-logo" onClick={() => setPage("home")}>Drag<span>oo</span>n</div>
          <p className="footer-brand-desc">Explore how connected workflows, people operations and AI come together in one platform.</p>
          <button className="footer-brand-cta" onClick={() => setPage("contact")}>Talk to us <ArrowRight size={14} /></button>
        </div>
        <div className="footer-col">
          <h4>Platform</h4>
          <a onClick={() => setPage("platform")}>Overview</a>
          {modules.map(m => <a key={m.key} onClick={() => setPage(m.key)}>{m.name}</a>)}
        </div>
        <div className="footer-col">
          <h4>Solutions</h4>
          {solutions.map(s => <a key={s.key} onClick={() => setPage(s.key)}>{s.name}</a>)}
        </div>
        <div className="footer-col">
          <h4>Resources</h4>
          <a onClick={() => setPage("blog")}>Blog</a>
          <a onClick={() => setPage("guides")}>Guides</a>
          <a onClick={() => setPage("faqs")}>FAQs</a>
          <a onClick={() => setPage("updates")}>Product Updates</a>
        </div>
        <div className="footer-col">
          <h4>Company</h4>
          <a onClick={() => setPage("about")}>About Dragoon</a>
          <a onClick={() => setPage("pricing")}>Pricing</a>
          <a onClick={() => setPage("contact")}>Contact</a>
          <a>Privacy Policy</a>
          <a>Terms of Service</a>
        </div>
      </div>
      <div className="footer-bottom">
        <div style={{ display: "flex", alignItems: "center", gap: 12 }}>
          <span style={{ fontFamily: "var(--font-heading)", fontWeight: 800, fontSize: 16, color: "var(--white)", letterSpacing: "-0.3px" }}>Drag<span style={{ color: "var(--primary)" }}>oo</span>n</span>
          <span style={{ color: "rgba(255,255,255,0.3)" }}>·</span>
          <span>© {new Date().getFullYear()} All rights reserved.</span>
        </div>
        <div className="footer-bottom-links">
          <a>LinkedIn</a>
          <a>Sign in</a>
        </div>
      </div>
    </footer>
  );
}

// ─── Reusable Page Hero Visual ───
function PageHeroVisual({ type, items, metrics }) {
  if (type === "features") {
    return (
      <div className="page-hero-visual">
        <div className="page-hero-visual-inner">
          {items && items.map((item, i) => (
            <div className="visual-row" key={i}>
              <div className={`visual-dot ${i % 2 === 0 ? "blue" : "teal"}`}>
                <Check size={14} />
              </div>
              <span className="visual-label">{item}</span>
            </div>
          ))}
        </div>
      </div>
    );
  }

  if (type === "metrics") {
    return (
      <div className="page-hero-visual">
        <div className="page-hero-visual-inner">
          <div className="visual-metric-grid">
            {metrics && metrics.map((m, i) => (
              <div className="visual-metric" key={i}>
                <div className="visual-metric-label">{m.label}</div>
                <div className="visual-metric-val">{m.val}</div>
              </div>
            ))}
          </div>
          <div style={{ display: "flex", alignItems: "flex-end", gap: 4, height: 60, marginTop: 12, padding: "0 4px" }}>
            {[40, 65, 50, 80, 55, 70, 45, 85, 60, 75].map((h, i) => (
              <div key={i} style={{ flex: 1, height: `${h}%`, borderRadius: "3px 3px 0 0", background: i % 3 === 0 ? "var(--accent)" : "var(--primary)", opacity: 0.15 + (h / 300) }} />
            ))}
          </div>
        </div>
      </div>
    );
  }

  if (type === "cards") {
    return (
      <div className="page-hero-visual">
        <div className="page-hero-visual-inner">
          {items && items.map((item, i) => (
            <div key={i} style={{ display: "flex", alignItems: "center", gap: 12, padding: "12px 0", borderBottom: i < items.length - 1 ? "1px solid var(--border)" : "none" }}>
              <div style={{ width: 36, height: 36, borderRadius: 10, background: i % 2 === 0 ? "var(--brand-soft)" : "var(--accent-soft)", display: "flex", alignItems: "center", justifyContent: "center", flexShrink: 0 }}>
                {item.icon || <Check size={16} />}
              </div>
              <div>
                <div style={{ fontSize: 13, fontWeight: 600, color: "var(--text)" }}>{item.title}</div>
                {item.sub && <div style={{ fontSize: 11, color: "var(--text-tertiary)", marginTop: 1 }}>{item.sub}</div>}
              </div>
            </div>
          ))}
        </div>
      </div>
    );
  }

  return null;
}

// ─── Page: Home ───
function ShowcaseSection() {
  const sectionRef = useRef(null);
  const itemRefs = useRef([]);
  const [activeIdx, setActiveIdx] = useState(0);
  const [progressStyle, setProgressStyle] = useState({ top: 10, height: 24 });
  const items = [
    {
      title: "Workspace visibility",
      desc: "Preview project and task views designed for execution clarity.",
      variant: "workspace",
      render: () => (
        <>
          <div className="showcase-mockup-top"><span /><span /><span /></div>
          <div className="showcase-metric-grid">
            <div><small>ACTIVE PROJECTS</small><strong>24</strong></div>
            <div><small>TEAM MEMBERS</small><strong>148</strong></div>
            <div><small>OKR PROGRESS</small><strong>73%</strong></div>
            <div><small>ENGAGEMENT</small><strong>4.2</strong></div>
          </div>
        </>
      ),
    },
    {
      title: "People operations",
      desc: "See employee, leave and overtime workflows in a more structured system.",
      variant: "operations",
      render: () => (
        <div className="showcase-mockup-list">
          {[
            ["Annual Leave", "Approved"],
            ["Overtime Entry", "Pending"],
            ["Sick Leave", "Approved"],
            ["Policy Update", "Review"],
          ].map((row) => (
            <div className="showcase-mockup-row" key={row[0]}>
              <div>
                <strong>{row[0]}</strong>
                <small>People Operations</small>
              </div>
              <span className="showcase-status">{row[1]}</span>
            </div>
          ))}
        </div>
      ),
    },
    {
      title: "Talent and growth",
      desc: "Explore reviews, goals and development workflows in one connected experience.",
      variant: "talent",
      render: () => (
        <div className="showcase-mockup-list">
          {[
            ["Q2 Performance Reviews", 78],
            ["Leadership Goals", 62],
            ["Skills Progress", 84],
            ["Succession Plan", 57],
          ].map((row) => (
            <div className="showcase-mockup-row" key={row[0]}>
              <div>
                <strong>{row[0]}</strong>
                <small>TalentHub</small>
              </div>
              <div className="showcase-progress-mockup"><span style={{ width: `${row[1]}%` }} /></div>
            </div>
          ))}
        </div>
      ),
    },
    {
      title: "Dragoon insights",
      desc: "A future analytics layer designed to turn connected system data into clearer decisions.",
      variant: "insights",
      render: () => (
        <>
          <div className="showcase-insight-head">
            <strong>Connected Signals</strong>
            <small>Last 30 days</small>
          </div>
          <div className="showcase-insight-chart">
            {[36, 48, 42, 66, 58, 72, 64, 80, 76].map((h, i) => (
              <span key={i} style={{ height: `${h}%` }} />
            ))}
          </div>
        </>
      ),
    },
  ];

  useEffect(() => {
    const handleScroll = () => {
      if (window.innerWidth <= 900) return;
      if (!sectionRef.current) return;

      const rect = sectionRef.current.getBoundingClientRect();
      const sectionHeight = rect.height;
      const viewportOffset = -rect.top;
      const maxScrollable = Math.max(sectionHeight - window.innerHeight, 1);
      const progress = Math.max(0, Math.min(1, viewportOffset / maxScrollable));
      const idx = Math.min(
        items.length - 1,
        Math.max(0, Math.floor(progress * items.length * 0.999)),
      );
      setActiveIdx((prev) => (prev === idx ? prev : idx));
    };

    handleScroll();
    window.addEventListener("scroll", handleScroll, { passive: true });
    window.addEventListener("resize", handleScroll);
    return () => {
      window.removeEventListener("scroll", handleScroll);
      window.removeEventListener("resize", handleScroll);
    };
  }, [items.length]);

  useEffect(() => {
    const el = itemRefs.current[activeIdx];
    if (!el) return;
    setProgressStyle({
      top: el.offsetTop + 6,
      height: Math.max(el.offsetHeight - 12, 18),
    });
  }, [activeIdx]);

  const handleItemClick = (i) => {
    if (!sectionRef.current) return;
    if (window.innerWidth <= 900) {
      setActiveIdx(i);
      return;
    }

    const sectionTop = sectionRef.current.offsetTop;
    const sectionHeight = sectionRef.current.offsetHeight;
    const targetProgress = i / items.length + 0.05;
    window.scrollTo({
      top: sectionTop + (sectionHeight - window.innerHeight) * targetProgress,
      behavior: "smooth",
    });
  };

  return (
    <div className="showcase-section">
      <div className="section">
        <div className="showcase-scroll-wrap" ref={sectionRef} style={{ height: `${items.length * 80}vh` }}>
          <div className="showcase-split">
            <div className="showcase-layout">
              <div className="showcase-list-col">
                <div className="showcase-intro">
                  <h2>See Dragoon in action</h2>
                  <p>A connected platform is easier to understand when you can see how workflows, people operations and talent processes come together in practice.</p>
                </div>
                <div className="showcase-list">
                  <span className="showcase-list-progress" style={progressStyle} />
                  {items.map((item, i) => (
                    <button
                      key={item.title}
                      type="button"
                      className={`showcase-item ${activeIdx === i ? "active" : ""}`}
                      ref={(el) => { itemRefs.current[i] = el; }}
                      onClick={() => handleItemClick(i)}
                    >
                      <span className="showcase-item-dot" />
                      <span>{item.title}</span>
                    </button>
                  ))}
                </div>
              </div>

              <div className="showcase-stage">
                {items.map((item, i) => (
                  <article className={`showcase-stage-card ${activeIdx === i ? "active" : ""}`} key={`showcase-stage-${item.title}`}>
                    <div className="showcase-card">
                      <div className={`showcase-card-visual ${item.variant}`}>
                        <div className="showcase-video-frame" aria-hidden="true">
                          <div className="showcase-video-canvas">
                            <div className="showcase-video-play" />
                          </div>
                        </div>
                      </div>
                      <div className="showcase-card-body">
                        <div className="showcase-card-copy">
                          <h3>{item.title}</h3>
                          <p>{item.desc}</p>
                        </div>
                        <button className="showcase-learn-pill">Learn more <ArrowRight size={14} /></button>
                      </div>
                    </div>
                  </article>
                ))}
              </div>
            </div>
          </div>
        </div>

        <div className="showcase-mobile-intro">
          <h2>See Dragoon in action</h2>
          <p>A connected platform is easier to understand when you can see how workflows, people operations and talent processes come together in practice.</p>
        </div>

        <div className="showcase-mobile-stack">
          {items.map((item) => (
            <article className="showcase-card" key={`showcase-mobile-${item.title}`}>
              <div className={`showcase-card-visual ${item.variant}`}>
                <div className="showcase-video-frame" aria-hidden="true">
                  <div className="showcase-video-canvas">
                    <div className="showcase-video-play" />
                  </div>
                </div>
              </div>
              <div className="showcase-card-body">
                <div className="showcase-card-copy">
                  <h3>{item.title}</h3>
                  <p>{item.desc}</p>
                </div>
                <button className="showcase-learn-pill">Learn more <ArrowRight size={14} /></button>
              </div>
            </article>
          ))}
        </div>
      </div>
    </div>
  );
}

function HomePage({ setPage }) {
  const [activeTab, setActiveTab] = useState(0);
  const mod = modules[activeTab];
  const TAB_VISUAL_ROW_COUNT = 6;
  const visualRows = [
    ...mod.features,
    ...Array(Math.max(0, TAB_VISUAL_ROW_COUNT - mod.features.length)).fill(null),
  ];

  return (
    <>
      {/* Hero */}
      <div className="hero">
        <div className="hero-card fade-up">
            <div className="hero-text">
              <div className="hero-eyebrow">
                <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5"><circle cx="12" cy="12" r="3"/><path d="M12 2v4M12 18v4M4.93 4.93l2.83 2.83M16.24 16.24l2.83 2.83M2 12h4M18 12h4M4.93 19.07l2.83-2.83M16.24 7.76l2.83-2.83"/></svg>
                Connected Work, People & AI Platform
              </div>
              <h1>Run work, people and performance in<br/><span className="gradient-text">one connected system</span></h1>
              <p className="hero-sub">Dragoon brings project execution, people operations, talent development, engagement and AI into one connected platform. Instead of stitching together disconnected tools, teams can manage workflows, support growth and make better decisions from a shared system.</p>
              <div className="hero-actions">
                <button className="btn-primary" onClick={() => setPage("contact")}>Book a demo <ArrowRight size={16} /></button>
                <button className="btn-secondary" onClick={() => setPage("platform")}>Explore the platform</button>
              </div>
            </div>

            <div className="hero-visual">
              {/* Product mockup */}
              <div className="mockup-inner" style={{ borderRadius: 16, border: "1px solid var(--border)", overflow: "hidden", boxShadow: "0 8px 40px rgba(15,23,42,0.06)" }}>
                <div className="mockup-topbar">
                  <div className="mockup-dot" /><div className="mockup-dot" /><div className="mockup-dot" />
                  <div className="mockup-urlbar" />
                </div>
                <div style={{ padding: 16 }}>
                  <div style={{ fontSize: 13, fontWeight: 700, fontFamily: "var(--font-heading)", color: "var(--text)", marginBottom: 12 }}>Organization Overview</div>
                  <div style={{ display: "grid", gridTemplateColumns: "1fr 1fr", gap: 8, marginBottom: 12 }}>
                    <div className="mockup-card"><div className="mockup-card-label">Active Projects</div><div className="mockup-card-val">24</div></div>
                    <div className="mockup-card"><div className="mockup-card-label">Team Members</div><div className="mockup-card-val">148</div></div>
                    <div className="mockup-card"><div className="mockup-card-label">OKR Progress</div><div className="mockup-card-val">73%</div></div>
                    <div className="mockup-card"><div className="mockup-card-label">Engagement</div><div className="mockup-card-val">4.2</div></div>
                  </div>
                  <div className="mockup-chart" style={{ marginTop: 0 }}>
                    {[65, 45, 80, 55, 90, 60, 75, 50, 85, 70].map((h, i) => (
                      <div key={i} className="mockup-bar" style={{ height: `${h}%` }} />
                    ))}
                  </div>
                  <div style={{ marginTop: 10 }}>
                    {[{ name: "AK", text: "Completed Q2 review" }, { name: "BT", text: "Updated project status" }, { name: "CS", text: "Submitted OKR draft" }].map((item, i) => (
                      <div key={i} className="mockup-panel-item" style={{ borderBottom: i < 2 ? "1px solid var(--border)" : "none" }}>
                        <div className="mockup-avatar">{item.name}</div>
                        <span>{item.text}</span>
                      </div>
                    ))}
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>

      {/* Value Pillars */}
      <div style={{ padding: "80px 0", background: "var(--white)" }}>
        <div className="section">
          <div className="section-header">
            <h2>One platform. More connected decisions.</h2>
            <p>Built for organizations that need more than separate tools for execution, people operations and performance.</p>
          </div>
          <div className="cards-grid" style={{ maxWidth: 900, margin: "0 auto" }}>
            {[
              { title: "Connected by design", desc: "Projects, people operations and talent workflows live in one system instead of separate stacks.", color: "blue" },
              { title: "Built for operational clarity", desc: "Track execution, approvals, feedback and performance with stronger visibility across the organization.", color: "teal" },
              { title: "AI where it adds real value", desc: "Use AI to generate, summarize and support decisions across everyday workflows.", color: "blue" },
            ].map((item, i) => (
              <div className="card" key={i}>
                <div className={`card-icon ${item.color}`}><Check size={20} /></div>
                <h3>{item.title}</h3>
                <p>{item.desc}</p>
              </div>
            ))}
          </div>
        </div>
      </div>

      {/* Tabbed Product Architecture */}
      <div className="tabs-section">
        <div className="section">
          <div className="section-header">
            <h2>A platform built around connected workflows</h2>
            <p>Explore the core layers of Dragoon, from execution and people operations to talent, engagement, AI and analytics.</p>
          </div>

          <div className="tabs-nav">
            {modules.map((m, i) => (
              <button key={m.key} className={`tab-btn ${activeTab === i ? "active" : ""}`} onClick={() => setActiveTab(i)}>
                {m.name}
              </button>
            ))}
          </div>

          <div className="tab-content">
            <div className="tab-text">
              <h3>{mod.name} {mod.comingSoon && <span className="coming-soon-badge">Coming soon</span>}</h3>
              <p>{mod.desc}</p>
              <div className="tab-features">
                {mod.features.map(f => (
                  <span className="tab-feature" key={f}><Check size={12} /> {f}</span>
                ))}
              </div>
              <div className="tab-outcome">{mod.outcome}</div>
              <button className="btn-primary" onClick={() => setPage(mod.key)}>Learn more <ArrowRight size={16} /></button>
            </div>
            <div className="tab-visual">
              <div className="tab-visual-inner">
                <div style={{ fontSize: 12, fontWeight: 700, color: "var(--text-tertiary)", textTransform: "uppercase", letterSpacing: 0.5, marginBottom: 16 }}>{mod.name}</div>
                {visualRows.map((f, i) => (
                  <div className="tab-visual-row" key={`${mod.key}-row-${i}`}>
                    <div style={{ width: 32, height: 32, borderRadius: 8, background: f ? (i % 2 === 0 ? "var(--brand-soft)" : "var(--accent-soft)") : "transparent", display: "flex", alignItems: "center", justifyContent: "center" }}>
                      {f ? <Check size={14} /> : null}
                    </div>
                    <span style={{ fontSize: 14, fontWeight: 500, color: "var(--text-secondary)", visibility: f ? "visible" : "hidden" }}>{f || "placeholder"}</span>
                  </div>
                ))}
              </div>
            </div>
          </div>
        </div>
      </div>

      {/* Why Dragoon */}
      <div className="why-section">
        <div className="section">
          <div className="section-header">
            <h2>Why teams choose Dragoon</h2>
            <p>Dragoon is built for organizations that want more than disconnected HR, performance and workflow tools.</p>
          </div>
          <div className="cards-grid cards-grid-4" style={{ gridTemplateColumns: "repeat(auto-fit, minmax(240px, 1fr))" }}>
            {[
              { title: "Work and people in one system", desc: "Bring project execution, people operations and talent workflows together instead of managing them across separate platforms." },
              { title: "Operational context, not isolated processes", desc: "Make better decisions with broader visibility across work, people and performance signals." },
              { title: "Embedded AI, not AI as a label", desc: "Apply AI where teams need real leverage: creation, summarization and guided action." },
              { title: "Built for connected intelligence", desc: "Create the foundation for stronger analytics by bringing system-wide signals together over time." },
            ].map((item, i) => (
              <div className="card" key={i}>
                <div className={`card-icon ${i % 2 === 0 ? "blue" : "teal"}`}>
                  {[<IconWorkspace />, <IconHRIS />, <IconAI />, <IconInsights />][i]}
                </div>
                <h3>{item.title}</h3>
                <p>{item.desc}</p>
              </div>
            ))}
          </div>
        </div>
      </div>

      {/* Interface Showcase */}
      <ShowcaseSection />

      {/* How It Works */}
      <div className="steps-section">
        <div className="section">
          <div className="section-header">
            <h2>How Dragoon works</h2>
            <p>Dragoon connects execution, people workflows and intelligence in a system designed to scale with the organization.</p>
          </div>
          <div className="steps-grid">
            {[
              { n: 1, title: "Connect workflows", desc: "Bring work, people operations and performance processes into one shared system." },
              { n: 2, title: "Capture signals", desc: "Track goals, feedback, approvals, activity and operational changes across teams." },
              { n: 3, title: "Support action", desc: "Use structured workflows and embedded AI to reduce manual effort and improve consistency." },
              { n: 4, title: "Turn data into insight", desc: "Build toward clearer decisions through connected, system-level intelligence." },
            ].map(step => (
              <div className="step-card" key={step.n}>
                <div className="step-number">{step.n}</div>
                <h3>{step.title}</h3>
                <p>{step.desc}</p>
              </div>
            ))}
          </div>
        </div>
      </div>

      {/* Final CTA */}
      <div className="cta-bar-wrap cta-bar-wrap-home">
        <div className="cta-bar">
          <div className="cta-orbit-layer" aria-hidden="true">
            <span className="cta-orb cta-orb-1" />
            <span className="cta-orb cta-orb-2" />
            <span className="cta-orb cta-orb-3" />
          </div>
          <div className="cta-bar-text">
            <h2>See how Dragoon fits your organization</h2>
            <p>Explore how Dragoon connects work, people operations, talent and AI in one platform built for modern teams.</p>
          </div>
          <button className="btn-primary" onClick={() => setPage("contact")}>Talk to us <ArrowRight size={16} /></button>
        </div>
      </div>
    </>
  );
}

// ─── Page: Platform Overview ───
function PlatformPage({ setPage }) {
  return (
    <>
      <div className="page-hero">
        <div className="page-hero-card fade-up">
            <div className="page-hero-text">
              <h1>One connected platform for work, people and intelligence</h1>
              <p>Dragoon connects execution, people operations, talent, engagement and AI in one shared system.</p>
              <div className="hero-actions">
                <button className="btn-primary" onClick={() => setPage("contact")}>Book a demo</button>
                <button className="btn-primary">Explore modules</button>
              </div>
            </div>
            <PageHeroVisual type="cards" items={modules.map(m => ({ title: m.name, sub: m.features.length + " capabilities", icon: m.icon }))} />
          </div>
      </div>
      <div className="page-body">
        <div className="section">
          <div className="page-section">
            <h2>Built around connected workflows</h2>
            <p>Dragoon brings work, people and performance processes together in one platform, helping teams reduce fragmentation and operate with more clarity.</p>
          </div>

          <div className="page-section">
            <h2>Explore the platform</h2>
            <div className="cards-grid" style={{ gridTemplateColumns: "repeat(auto-fit, minmax(280px, 1fr))" }}>
              {modules.map(m => (
                <div className="card" key={m.key} style={{ cursor: "pointer" }} onClick={() => setPage(m.key)}>
                  <div className="card-icon blue">{m.icon}</div>
                  <h3>{m.name} {m.comingSoon && <span className="coming-soon-badge">Coming soon</span>}</h3>
                  <p>{m.desc}</p>
                  <div style={{ marginTop: 14 }}><button className="btn-primary">Learn more <ArrowRight size={16} /></button></div>
                </div>
              ))}
            </div>
          </div>

          <div className="page-section">
            <h2>How it works</h2>
            <div className="steps-grid" style={{ marginTop: 24 }}>
              {[
                { n: 1, title: "Connect workflows", desc: "Bring core processes into one shared platform." },
                { n: 2, title: "Capture signals", desc: "Track goals, feedback, approvals and activity." },
                { n: 3, title: "Support action", desc: "Use workflows and AI to reduce manual effort." },
                { n: 4, title: "Build toward insight", desc: "Turn connected data into better decisions." },
              ].map(s => (
                <div className="step-card" key={s.n}>
                  <div className="step-number">{s.n}</div>
                  <h3>{s.title}</h3>
                  <p>{s.desc}</p>
                </div>
              ))}
            </div>
          </div>
        </div>
      </div>
      <div className="cta-bar-wrap cta-bar-wrap-home">
        <div className="cta-bar">
          <div className="cta-orbit-layer" aria-hidden="true">
            <span className="cta-orb cta-orb-1" />
            <span className="cta-orb cta-orb-2" />
            <span className="cta-orb cta-orb-3" />
          </div>
          <div className="cta-bar-text">
            <h2>See how Dragoon fits your organization</h2>
            <p>Explore how Dragoon connects work, people operations, talent and AI in one platform built for modern teams.</p>
          </div>
          <button className="btn-primary" onClick={() => setPage("contact")}>Talk to us <ArrowRight size={16} /></button>
        </div>
      </div>
    </>
  );
}

// ─── Page: Module Detail ───
function ModulePage({ moduleKey, setPage }) {
  const mod = modules.find(m => m.key === moduleKey);
  if (!mod) return null;

  return (
    <>
      <div className="page-hero">
        <div className="page-hero-card fade-up">
            <div className="page-hero-text">
              <div className="breadcrumb"><a onClick={() => setPage("platform")}>Platform</a> / {mod.name}</div>
              <h1>{mod.h1}</h1>
              <p>{mod.subtitle}</p>
              {mod.comingSoon && <div style={{ marginBottom: 16 }}><span className="coming-soon-badge" style={{ fontSize: 12, padding: "4px 14px" }}>Coming soon</span></div>}
              <div className="hero-actions">
                <button className="btn-primary" onClick={() => setPage("contact")}>{mod.comingSoon ? "Talk to us" : "Book a demo"}</button>
              </div>
            </div>
            <PageHeroVisual type="features" items={mod.features} />
          </div>
      </div>
      <div className="page-body">
        <section className="module-feature-section light">
          <div className="section">
            <div className="page-section module-intro-section">
              <h2>{mod.intro_title}</h2>
              <p>{mod.intro_copy}</p>
            </div>
          </div>
        </section>
        {mod.feature_details.map((f, i) => (
          <section className={`module-feature-section ${i % 2 === 0 ? "muted" : "light"}`} key={f.title}>
            <div className="section">
              <div className="module-flow">
                <div className={`module-flow-item ${i % 2 === 1 ? "reverse" : ""}`}>
                  {i % 2 === 1 && (
                    <div className="module-flow-visual" aria-hidden="true">
                      <div className="module-flow-visual-inner">
                        <div className="module-flow-badges">
                          <span className="module-flow-badge"><Check size={12} /> {f.title}</span>
                          <span className="module-flow-badge"><Check size={12} /> Connected</span>
                        </div>
                        <div className="module-flow-bars">
                          <span></span><span></span><span></span><span></span>
                          <span></span><span></span><span></span><span></span>
                        </div>
                      </div>
                    </div>
                  )}
                  <div className="module-flow-text">
                    <h3>{f.title}</h3>
                    <p>{f.copy}</p>
                  </div>
                  {i % 2 === 0 && (
                    <div className="module-flow-visual" aria-hidden="true">
                      <div className="module-flow-visual-inner">
                        <div className="module-flow-badges">
                          <span className="module-flow-badge"><Check size={12} /> {f.title}</span>
                          <span className="module-flow-badge"><Check size={12} /> Connected</span>
                        </div>
                        <div className="module-flow-bars">
                          <span></span><span></span><span></span><span></span>
                          <span></span><span></span><span></span><span></span>
                        </div>
                      </div>
                    </div>
                  )}
                </div>
              </div>
            </div>
          </section>
        ))}
      </div>
      <div className="cta-bar-wrap cta-bar-wrap-home">
        <div className="cta-bar">
          <div className="cta-orbit-layer" aria-hidden="true">
            <span className="cta-orb cta-orb-1" />
            <span className="cta-orb cta-orb-2" />
            <span className="cta-orb cta-orb-3" />
          </div>
          <div className="cta-bar-text">
            <h2>{mod.cta_title}</h2>
          </div>
          <button className="btn-primary" onClick={() => setPage("contact")}>Talk to us <ArrowRight size={16} /></button>
        </div>
      </div>
    </>
  );
}

// ─── Page: Solutions Overview ───
function SolutionsPage({ setPage }) {
  return (
    <>
      <div className="page-hero">
        <div className="page-hero-card fade-up">
            <div className="page-hero-text">
              <h1>Built for teams that need more than disconnected tools</h1>
              <p>Dragoon supports the workflows behind execution, people operations, talent development and organizational visibility in one connected platform.</p>
              <div className="hero-actions">
                <button className="btn-primary" onClick={() => setPage("contact")}>Book a demo</button>
                <button className="btn-primary">Explore solutions</button>
              </div>
            </div>
            <PageHeroVisual type="cards" items={solutions.map(s => ({ title: s.name, sub: s.card_desc.split(" ").slice(0, 6).join(" ") + "..." }))} />
          </div>
      </div>
      <div className="page-body">
        <div className="section">
          <div className="page-section">
            <h2>One platform, different needs, shared visibility</h2>
            <p>Different teams need different workflows, but they should not have to operate in disconnected systems. Dragoon helps organizations bring work, people and performance processes into one platform.</p>
          </div>
          <div className="page-section">
            <div className="cards-grid cards-grid-4" style={{ gridTemplateColumns: "repeat(auto-fit, minmax(260px, 1fr))" }}>
              {solutions.map(s => (
                <div className="card" key={s.key} style={{ cursor: "pointer" }} onClick={() => setPage(s.key)}>
                  <h3>{s.name}</h3>
                  <p>{s.card_desc}</p>
                  <div style={{ marginTop: 14 }}><button className="btn-primary">Learn more <ArrowRight size={16} /></button></div>
                </div>
              ))}
            </div>
          </div>
        </div>
      </div>
      <div className="cta-bar-wrap cta-bar-wrap-home">
        <div className="cta-bar">
          <div className="cta-orbit-layer" aria-hidden="true">
            <span className="cta-orb cta-orb-1" />
            <span className="cta-orb cta-orb-2" />
            <span className="cta-orb cta-orb-3" />
          </div>
          <div className="cta-bar-text">
            <h2>See how Dragoon fits your organization</h2>
            <p>Explore how Dragoon connects work, people operations, talent and AI in one platform built for modern teams.</p>
          </div>
          <button className="btn-primary" onClick={() => setPage("contact")}>Talk to us <ArrowRight size={16} /></button>
        </div>
      </div>
    </>
  );
}

// ─── Page: Solution Detail ───
function SolutionDetailPage({ solutionKey, setPage }) {
  const sol = solutions.find(s => s.key === solutionKey);
  if (!sol) return null;

  return (
    <>
      <div className="page-hero">
        <div className="page-hero-card fade-up">
            <div className="page-hero-text">
              <div className="breadcrumb"><a onClick={() => setPage("solutions")}>Solutions</a> / {sol.name}</div>
              <h1>{sol.h1}</h1>
              <p>{sol.subtitle}</p>
              <div className="hero-actions">
                <button className="btn-primary" onClick={() => setPage("contact")}>Book a demo</button>
                <button className="btn-secondary" onClick={() => setPage("contact")}>Talk to us</button>
              </div>
            </div>
            <PageHeroVisual type="features" items={sol.values.map(v => v.title)} />
          </div>
      </div>
      <div className="page-body">
        <div className="section">
          <div className="page-section">
            <h2>{sol.intro_title}</h2>
            <p>{sol.intro_copy}</p>
          </div>
          <div className="page-section">
            <div className="cards-grid cards-grid-4" style={{ gridTemplateColumns: "repeat(auto-fit, minmax(240px, 1fr))" }}>
              {sol.values.map((v, i) => (
                <div className="card" key={i}>
                  <div className={`card-icon ${i % 2 === 0 ? "blue" : "teal"}`}><Check size={20} /></div>
                  <h3>{v.title}</h3>
                  <p>{v.desc}</p>
                </div>
              ))}
            </div>
          </div>
        </div>
      </div>
      <div className="cta-bar-wrap cta-bar-wrap-home">
        <div className="cta-bar">
          <div className="cta-orbit-layer" aria-hidden="true">
            <span className="cta-orb cta-orb-1" />
            <span className="cta-orb cta-orb-2" />
            <span className="cta-orb cta-orb-3" />
          </div>
          <div className="cta-bar-text">
            <h2>See how Dragoon supports {sol.name.toLowerCase().replace("for ", "")}</h2>
          </div>
          <button className="btn-primary" onClick={() => setPage("contact")}>Talk to us <ArrowRight size={16} /></button>
        </div>
      </div>
    </>
  );
}

// ─── Page: Resources / Blog / Guides / Updates ───
function ResourcePage({ type, setPage }) {
  const config = {
    resources: {
      h1: "Resources for teams building more connected ways of working",
      sub: "Explore practical content on people operations, performance, engagement, AI workflows and connected organizational systems.",
      intro_title: "Learn how Dragoon works — and why it matters",
      categories: [
        { name: "Blog", desc: "Perspectives on work, people operations, performance, AI and connected organizational systems.", link: "blog" },
        { name: "Guides", desc: "Practical content to help teams improve workflows, structure processes and make better operational decisions.", link: "guides" },
        { name: "FAQs", desc: "Quick answers about Dragoon, its modules and how the platform works.", link: "faqs" },
        { name: "Product Updates", desc: "See what's new across the platform, from workflow improvements to new product capabilities.", link: "updates" },
      ],
    },
    blog: {
      h1: "Ideas, insights and perspectives on connected work",
      sub: "Read articles on people operations, performance, employee engagement, AI workflows and the systems modern organizations need.",
      intro_title: "Where product thinking meets operational reality",
      categories: [
        { name: "Work & Operations", desc: "Perspectives on execution, operational structure, workflows and organizational clarity." },
        { name: "People Operations", desc: "Ideas on employee workflows, HR structure and modern operating models for HR teams." },
        { name: "Performance & Growth", desc: "Articles on reviews, goals, competencies and development systems." },
        { name: "AI & Organizational Intelligence", desc: "Perspectives on AI-supported workflows, decision support and connected intelligence." },
      ],
    },
    guides: {
      h1: "Practical guides for connected work, people and performance",
      sub: "Explore practical content on people operations, performance management, employee engagement, AI-supported workflows and connected organizational systems.",
      intro_title: "Useful guidance for teams building stronger systems",
      categories: [
        { name: "People Operations", desc: "Practical guidance on employee management, leave, overtime, structure and day-to-day HR workflows." },
        { name: "Performance & Growth", desc: "Content on reviews, goals, competencies and development workflows." },
        { name: "Employee Engagement", desc: "Guides on surveys, feedback loops, 1:1s and employee listening practices." },
        { name: "AI Workflows & Insights", desc: "Content on AI-assisted workflows, summarization, organizational signals and future intelligence layers." },
      ],
    },
    updates: {
      h1: "What's new in Dragoon",
      sub: "Follow the latest updates across Dragoon, from workflow improvements and module enhancements to new platform capabilities.",
      intro_title: "Track how the platform evolves",
      categories: [
        { name: "Platform Improvements", desc: "See updates that improve the overall Dragoon experience, structure and navigation." },
        { name: "Workflow Enhancements", desc: "Follow changes to approvals, task flows, reviews, feedback loops and operational processes." },
        { name: "New Features", desc: "Explore newly released capabilities across Dragoon modules." },
        { name: "AI & Insights", desc: "Track developments across Cortex AI and the future Dragoon Insights layer." },
      ],
    },
  };

  const c = config[type];

  return (
    <>
      <div className="page-hero">
        <div className="page-hero-card fade-up">
            <div className="page-hero-text">
              {type !== "resources" && <div className="breadcrumb"><a onClick={() => setPage("resources")}>Resources</a> / {type.charAt(0).toUpperCase() + type.slice(1)}</div>}
              <h1>{c.h1}</h1>
              <p>{c.sub}</p>
              <div className="hero-actions">
                <button className="btn-primary" onClick={() => setPage("contact")}>Book a demo</button>
              </div>
            </div>
            <PageHeroVisual type="cards" items={c.categories.map(cat => ({ title: cat.name, sub: cat.desc.split(" ").slice(0, 5).join(" ") + "..." }))} />
          </div>
      </div>
      <div className="page-body">
        <div className="section">
          <div className="page-section">
            <h2>{c.intro_title}</h2>
          </div>
          <div className="page-section">
            <div className="cards-grid cards-grid-4" style={{ gridTemplateColumns: "repeat(auto-fit, minmax(260px, 1fr))" }}>
              {c.categories.map((cat, i) => (
                <div className="card" key={i} style={{ cursor: cat.link ? "pointer" : "default" }} onClick={() => cat.link && setPage(cat.link)}>
                  <h3>{cat.name}</h3>
                  <p>{cat.desc}</p>
                  {cat.link && <div style={{ marginTop: 14 }}><button className="btn-primary">Explore <ArrowRight size={16} /></button></div>}
                </div>
              ))}
            </div>
          </div>
        </div>
      </div>
      <div className="cta-bar-wrap cta-bar-wrap-home">
        <div className="cta-bar">
          <div className="cta-orbit-layer" aria-hidden="true">
            <span className="cta-orb cta-orb-1" />
            <span className="cta-orb cta-orb-2" />
            <span className="cta-orb cta-orb-3" />
          </div>
          <div className="cta-bar-text">
            <h2>See how Dragoon fits your organization</h2>
            <p>Explore how Dragoon connects work, people operations, talent and AI in one platform built for modern teams.</p>
          </div>
          <button className="btn-primary" onClick={() => setPage("contact")}>Talk to us <ArrowRight size={16} /></button>
        </div>
      </div>
    </>
  );
}

// ─── Page: FAQs ───
function FAQsPage({ setPage }) {
  const [openFaq, setOpenFaq] = useState(null);

  const renderSection = (title, items, prefix) => (
    <div style={{ marginBottom: 32 }}>
      <h3 style={{ fontFamily: "var(--font-heading)", fontSize: 18, fontWeight: 700, marginBottom: 12 }}>{title}</h3>
      {items.map((item, i) => {
        const key = `${prefix}-${i}`;
        const isOpen = openFaq === key;
        return (
          <div className="faq-item" key={key}>
            <button className="faq-q" onClick={() => setOpenFaq(isOpen ? null : key)}>
              {item.q}
              <ChevronDown size={16} />
            </button>
            {isOpen && <div className="faq-a">{item.a}</div>}
          </div>
        );
      })}
    </div>
  );

  return (
    <>
      <div className="page-hero">
        <div className="page-hero-card fade-up">
            <div className="page-hero-text">
              <div className="breadcrumb"><a onClick={() => setPage("resources")}>Resources</a> / FAQs</div>
              <h1>Frequently asked questions about Dragoon</h1>
              <p>Find quick answers about the platform, its modules, how it works and how different teams use it.</p>
              <div className="hero-actions">
                <button className="btn-primary" onClick={() => setPage("contact")}>Book a demo</button>
                <button className="btn-secondary" onClick={() => setPage("contact")}>Talk to us</button>
              </div>
            </div>
            <PageHeroVisual type="cards" items={[
              { title: "General", sub: "What is Dragoon, who it's for" },
              { title: "Platform & Modules", sub: "6 connected modules" },
              { title: "Use Cases", sub: "HR, Managers, Leadership" },
              { title: "AI & Insights", sub: "Cortex AI, Dragoon Insights" },
              { title: "Getting Started", sub: "Demo, setup, onboarding" },
            ]} />
          </div>
      </div>
      <div className="page-body">
        <div className="section" style={{ maxWidth: 760 }}>
          {renderSection("General", faqData.general, "gen")}
          {renderSection("Platform & Modules", faqData.platform, "plat")}
          {renderSection("Buying & Getting Started", faqData.buying, "buy")}

        </div>
      </div>
      <div className="cta-bar-wrap cta-bar-wrap-home">
        <div className="cta-bar">
          <div className="cta-orbit-layer" aria-hidden="true">
            <span className="cta-orb cta-orb-1" />
            <span className="cta-orb cta-orb-2" />
            <span className="cta-orb cta-orb-3" />
          </div>
          <div className="cta-bar-text">
            <h2>Still have questions?</h2>
            <p>Talk to our team and explore how Dragoon can support your workflows, team structure and growth goals.</p>
          </div>
          <button className="btn-primary" onClick={() => setPage("contact")}>Talk to us <ArrowRight size={16} /></button>
        </div>
      </div>
    </>
  );
}

// ─── Page: Pricing ───
function PricingPage({ setPage }) {
  return (
    <>
      <div className="page-hero">
        <div className="page-hero-card fade-up">
            <div className="page-hero-text">
              <h1>Pricing built around your organization's needs</h1>
              <p>Dragoon is designed as a connected platform. Pricing depends on the modules, scope and structure that best fit your organization.</p>
              <div className="hero-actions">
                <button className="btn-primary" onClick={() => setPage("contact")}>Book a demo</button>
                <button className="btn-secondary" onClick={() => setPage("contact")}>Talk to us</button>
              </div>
            </div>
            <PageHeroVisual type="features" items={["Platform-based pricing", "Module-aware packaging", "Scaled to fit your team", "Guided by use case"]} />
          </div>
      </div>
      <div className="page-body">
        <div className="section">
          <div className="page-section">
            <h2>Flexible pricing for a connected platform</h2>
            <p>Different organizations need different combinations of workflows, modules and levels of support. Dragoon pricing is built to reflect that.</p>
            <h2 style={{ marginTop: 40 }}>What shapes pricing</h2>
            <div className="cards-grid cards-grid-4" style={{ gridTemplateColumns: "repeat(auto-fit, minmax(240px, 1fr))", marginTop: 20 }}>
              {[
                { title: "Team or organization size", desc: "The number of users or organizational scale can affect the recommended setup." },
                { title: "Module selection", desc: "Pricing depends on which parts of the platform your team wants to use." },
                { title: "Workflow complexity", desc: "Organizations with broader process and structure needs may require a more tailored setup." },
                { title: "Support and rollout needs", desc: "Implementation, onboarding or rollout scope may also shape the final plan." },
              ].map((item, i) => (
                <div className="feature-card" key={i}>
                  <h3>{item.title}</h3>
                  <p>{item.desc}</p>
                </div>
              ))}
            </div>
          </div>

          <div className="page-section">
            <div className="pricing-grid">
              <div className="pricing-card">
                <h3>Platform Starter</h3>
                <p className="desc">For teams looking to create a stronger operational foundation across key workflows.</p>
                <div className="pricing-includes">
                  {["Workspace Management", "HRIS core", "Basic approvals", "Team onboarding"].map((item, i) => (
                    <div className="pricing-include-item" key={i}><Check size={16} />{item}</div>
                  ))}
                </div>
                <button className="btn-secondary" style={{ width: "100%" }} onClick={() => setPage("contact")}>Talk to us</button>
              </div>
              <div className="pricing-card featured">
                <h3>Growth Platform</h3>
                <p className="desc">For organizations connecting people operations, talent workflows and engagement in one system.</p>
                <div className="pricing-includes">
                  {["Everything in Starter", "TalentHub", "EngagementHub", "Advanced workflows", "Priority support"].map((item, i) => (
                    <div className="pricing-include-item" key={i}><Check size={16} />{item}</div>
                  ))}
                </div>
                <button className="btn-primary" style={{ width: "100%" }} onClick={() => setPage("contact")}>Talk to us</button>
              </div>
              <div className="pricing-card">
                <h3>Connected Intelligence</h3>
                <p className="desc">For teams building toward broader workflow coverage, AI support and future analytics.</p>
                <div className="pricing-includes">
                  {["Everything in Growth", "Cortex AI", "Dragoon Insights (when available)", "Custom integrations", "Dedicated support"].map((item, i) => (
                    <div className="pricing-include-item" key={i}><Check size={16} />{item}</div>
                  ))}
                </div>
                <button className="btn-secondary" style={{ width: "100%" }} onClick={() => setPage("contact")}>Talk to us</button>
              </div>
            </div>
          </div>
        </div>
      </div>
      <div className="cta-bar-wrap cta-bar-wrap-home">
        <div className="cta-bar">
          <div className="cta-orbit-layer" aria-hidden="true">
            <span className="cta-orb cta-orb-1" />
            <span className="cta-orb cta-orb-2" />
            <span className="cta-orb cta-orb-3" />
          </div>
          <div className="cta-bar-text">
            <h2>Find the right plan for your organization</h2>
            <p>Talk to the Dragoon team to shape the right module mix, rollout scope and support model for your needs.</p>
          </div>
          <button className="btn-primary" onClick={() => setPage("contact")}>Talk to us <ArrowRight size={16} /></button>
        </div>
      </div>
    </>
  );
}

// ─── Page: About ───
function AboutPage({ setPage }) {
  return (
    <>
      <div className="page-hero">
        <div className="page-hero-card fade-up">
            <div className="page-hero-text">
              <h1>Built for more connected organizations</h1>
              <p>Dragoon is designed for teams that want to move beyond fragmented tools and build a stronger system for work, people operations, talent and organizational visibility.</p>
              <div className="hero-actions">
                <button className="btn-primary" onClick={() => setPage("contact")}>Book a demo</button>
                <button className="btn-secondary" onClick={() => setPage("contact")}>Talk to us</button>
              </div>
            </div>
            <PageHeroVisual type="metrics" metrics={[
              { label: "Modules", val: "6" },
              { label: "Connected Layers", val: "5" },
              { label: "AI Capabilities", val: "5" },
              { label: "Solutions", val: "4" },
            ]} />
          </div>
      </div>
      <div className="page-body">
        <div className="section">
          <div className="page-section">
            <h2>Why Dragoon exists</h2>
            <p>Most organizations still manage critical workflows across separate systems. Work happens in one tool, people operations in another, performance somewhere else, and visibility gets lost between them. Dragoon was built to bring these layers together in one connected platform — helping teams operate with more clarity, consistency and context.</p>
          </div>

          <div className="page-section">
            <h2>A connected operating system for work, people and intelligence</h2>
            <p>Dragoon brings project execution, people operations, talent development, employee engagement and AI-supported workflows into one platform. The goal is not to add another isolated tool to the stack, but to help organizations create a stronger operational foundation across teams.</p>
          </div>

          <div className="page-section">
            <h2>What we believe</h2>
            <div className="cards-grid cards-grid-4" style={{ gridTemplateColumns: "repeat(auto-fit, minmax(240px, 1fr))", marginTop: 20 }}>
              {[
                { title: "Better systems create better decisions", desc: "When work, people and performance signals stay connected, organizations can make clearer decisions with less guesswork." },
                { title: "Operational clarity matters", desc: "Teams need more than isolated workflows. They need stronger visibility across the systems they rely on every day." },
                { title: "AI should support real work", desc: "AI creates value when it is embedded into workflows that teams already use — not when it exists as a disconnected feature." },
                { title: "Scale needs structure", desc: "As organizations grow, connected systems become more important, not less." },
              ].map((item, i) => (
                <div className="card" key={i}>
                  <h3>{item.title}</h3>
                  <p>{item.desc}</p>
                </div>
              ))}
            </div>
          </div>
        </div>
      </div>
      <div className="cta-bar-wrap cta-bar-wrap-home">
        <div className="cta-bar">
          <div className="cta-orbit-layer" aria-hidden="true">
            <span className="cta-orb cta-orb-1" />
            <span className="cta-orb cta-orb-2" />
            <span className="cta-orb cta-orb-3" />
          </div>
          <div className="cta-bar-text">
            <h2>See how Dragoon fits your organization</h2>
            <p>Explore how Dragoon connects work, people operations, talent and AI in one platform built for modern teams.</p>
          </div>
          <button className="btn-primary" onClick={() => setPage("contact")}>Talk to us <ArrowRight size={16} /></button>
        </div>
      </div>
    </>
  );
}

// ─── Page: Contact ───
function ContactPage({ setPage }) {
  return (
    <>
      <div className="page-hero">
        <div className="page-hero-card fade-up">
            <div className="page-hero-text">
              <h1>Talk to the Dragoon team</h1>
              <p>Whether you are exploring the platform, looking for a demo or want to learn how Dragoon could fit your organization, we would love to hear from you.</p>
              <div className="hero-actions">
                <button className="btn-primary" onClick={() => setPage("contact")}>Book a demo</button>
                <button className="btn-secondary">Talk to us</button>
              </div>
            </div>
            <PageHeroVisual type="cards" items={[
              { title: "Book a demo", sub: "See the platform in action" },
              { title: "Talk to sales", sub: "Discuss your workflows" },
              { title: "General inquiries", sub: "Partnerships & questions" },
            ]} />
          </div>
      </div>
      <div className="page-body">
        <div className="section">
          <div className="page-section">
            <h2>Start the conversation</h2>
            <p>Dragoon is built for teams that want a more connected way to manage work, people operations, talent and organizational visibility. Reach out to explore the platform, ask questions or discuss how Dragoon could support your team.</p>
            <div className="contact-form-block">
              <h3 style={{ fontFamily: "var(--font-heading)", fontSize: 18, fontWeight: 700, marginBottom: 20 }}>Tell us a bit about your team</h3>
              <div className="contact-form">
                <div className="form-group"><label>Name</label><input type="text" placeholder="Your name" /></div>
                <div className="form-group"><label>Work email</label><input type="email" placeholder="you@company.com" /></div>
                <div className="form-group"><label>Company</label><input type="text" placeholder="Company name" /></div>
                <div className="form-group"><label>Team size</label>
                  <select><option>Select...</option><option>1–25</option><option>26–100</option><option>101–500</option><option>500+</option></select>
                </div>
                <div className="form-group"><label>What are you interested in?</label>
                  <select><option>Select...</option><option>Platform overview</option><option>Workspace Management</option><option>HRIS</option><option>TalentHub</option><option>EngagementHub</option><option>Cortex AI</option><option>Dragoon Insights</option><option>Pricing</option><option>Partnership / other</option></select>
                </div>
                <div className="form-group full"><label>Message</label><textarea placeholder="Tell us about your team and what you're looking for..." /></div>
                <div className="full"><button className="btn-primary" style={{ width: "100%" }}>Send message</button></div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <div className="cta-bar-wrap cta-bar-wrap-home">
        <div className="cta-bar">
          <div className="cta-orbit-layer" aria-hidden="true">
            <span className="cta-orb cta-orb-1" />
            <span className="cta-orb cta-orb-2" />
            <span className="cta-orb cta-orb-3" />
          </div>
          <div className="cta-bar-text">
            <h2>See how Dragoon fits your organization</h2>
            <p>Explore how Dragoon connects work, people operations, talent and AI in one platform built for modern teams.</p>
          </div>
          <button className="btn-primary" onClick={() => setPage("contact")}>Talk to us <ArrowRight size={16} /></button>
        </div>
      </div>
    </>
  );
}

// ─── App ───
function App() {
  const [page, setPage] = useState("home");

  const navigate = useCallback((p) => {
    setPage(p);
    window.scrollTo({ top: 0, behavior: "smooth" });
  }, []);

  const renderPage = () => {
    switch (page) {
      case "home": return <HomePage setPage={navigate} />;
      case "platform": return <PlatformPage setPage={navigate} />;
      case "workspace": case "hris": case "talenthub": case "engagementhub": case "cortex": case "insights":
        return <ModulePage moduleKey={page} setPage={navigate} />;
      case "solutions": return <SolutionsPage setPage={navigate} />;
      case "hr": case "managers": case "leadership": case "growing":
        return <SolutionDetailPage solutionKey={page} setPage={navigate} />;
      case "resources": return <ResourcePage type="resources" setPage={navigate} />;
      case "blog": return <ResourcePage type="blog" setPage={navigate} />;
      case "guides": return <ResourcePage type="guides" setPage={navigate} />;
      case "updates": return <ResourcePage type="updates" setPage={navigate} />;
      case "faqs": return <FAQsPage setPage={navigate} />;
      case "pricing": return <PricingPage setPage={navigate} />;
      case "about": return <AboutPage setPage={navigate} />;
      case "contact": return <ContactPage setPage={navigate} />;
      default: return <HomePage setPage={navigate} />;
    }
  };

  return (
    <>
      <style>{styles}</style>
      <Nav page={page} setPage={navigate} />
      <main>{renderPage()}</main>
      <Footer setPage={navigate} />
    </>
  );
}

const root = ReactDOM.createRoot(document.getElementById("app"));
root.render(<App />);
