/* ═══════════════════════════════════════════════════════════════
   Persona-x — Brightpath Technologies
   Clean, modern design system
   ═══════════════════════════════════════════════════════════════ */

/* ── Reset & Base ────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --brand-deep: #0f172a;
  --brand-dark: #1e293b;
  --brand-mid: #334155;
  --brand-slate: #64748b;
  --brand-light: #94a3b8;
  --brand-pale: #e2e8f0;
  --brand-white: #f8fafc;
  --accent-primary: #3b82f6;
  --accent-hover: #2563eb;
  --accent-subtle: #dbeafe;
  --accent-warm: #f59e0b;
  --accent-green: #10b981;
  --accent-red: #ef4444;
  --accent-purple: #8b5cf6;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --transition: 0.2s ease;
  --max-width: 1200px;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  color: var(--brand-dark);
  background: var(--brand-white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ── Typography ──────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--brand-deep);
}

h1 { font-size: 3rem; letter-spacing: -0.03em; }
h2 { font-size: 2rem; letter-spacing: -0.02em; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1rem; font-weight: 600; }

p {
  color: var(--brand-mid);
  max-width: 680px;
}

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover { color: var(--accent-hover); }

code, pre {
  font-family: var(--font-mono);
  font-size: 0.875rem;
}

/* ── Layout ──────────────────────────────────────────────────── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

section {
  padding: 6rem 0;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: 0.75rem;
}

.section-title {
  margin-bottom: 1.25rem;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--brand-slate);
  margin-bottom: 3rem;
  max-width: 640px;
}

/* ── Navigation ──────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(248, 250, 252, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--brand-pale);
  transition: box-shadow var(--transition);
}

.nav.scrolled {
  box-shadow: var(--shadow-sm);
}

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

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--brand-deep);
}

.nav-brand .brand-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-primary);
}

.nav-brand span {
  font-weight: 400;
  color: var(--brand-slate);
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--brand-mid);
  transition: color var(--transition);
}

.nav-links a:hover { color: var(--brand-deep); }

.nav-cta {
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.5rem 1.25rem;
  background: var(--brand-deep);
  color: white !important;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}

.nav-cta:hover { background: var(--brand-mid); color: white !important; }

.nav-mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--brand-dark);
  margin: 4px 0;
  transition: var(--transition);
}

/* ── Hero ────────────────────────────────────────────────────── */
.hero {
  padding: 10rem 0 6rem;
  background: linear-gradient(135deg, var(--brand-white) 0%, var(--accent-subtle) 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59,130,246,0.06) 0%, transparent 70%);
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  max-width: 700px;
}

.hero h1 .highlight {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2.5rem;
  max-width: 560px;
  color: var(--brand-slate);
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: none;
  transition: all var(--transition);
}

.btn-primary {
  background: var(--brand-deep);
  color: white;
}

.btn-primary:hover {
  background: var(--brand-mid);
  color: white;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: white;
  color: var(--brand-deep);
  border: 1px solid var(--brand-pale);
}

.btn-secondary:hover {
  border-color: var(--brand-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* ── Problem Section ─────────────────────────────────────────── */
.problem {
  background: white;
}

.problem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.problem-card {
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--brand-pale);
  transition: all var(--transition);
}

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

.problem-card .card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

.problem-card:nth-child(1) .card-icon { background: #fef3c7; }
.problem-card:nth-child(2) .card-icon { background: #dbeafe; }
.problem-card:nth-child(3) .card-icon { background: #fce7f3; }

.problem-card h3 {
  margin-bottom: 0.75rem;
}

.problem-card p {
  font-size: 0.9375rem;
}

/* ── How It Works ────────────────────────────────────────────── */
.how-it-works {
  background: var(--brand-deep);
  color: white;
}

.how-it-works .section-label { color: var(--accent-warm); }
.how-it-works .section-title { color: white; }
.how-it-works .section-subtitle { color: var(--brand-light); }

.stages {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.stage {
  padding: 2.5rem 2rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  transition: all var(--transition);
}

.stage:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.15);
}

.stage-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.stage:nth-child(1) .stage-number { background: var(--accent-primary); color: white; }
.stage:nth-child(2) .stage-number { background: var(--accent-warm); color: var(--brand-deep); }
.stage:nth-child(3) .stage-number { background: var(--accent-green); color: white; }

.stage h3 {
  color: white;
  margin-bottom: 1rem;
}

.stage p {
  color: var(--brand-light);
  font-size: 0.9375rem;
}

.stage-features {
  list-style: none;
  margin-top: 1.25rem;
}

.stage-features li {
  font-size: 0.875rem;
  color: var(--brand-light);
  padding: 0.375rem 0;
  padding-left: 1.25rem;
  position: relative;
}

.stage-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.75rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-primary);
}

/* ── Rubric Section ──────────────────────────────────────────── */
.rubric {
  background: white;
}

.rubric-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.rubric-info h2 {
  margin-bottom: 1rem;
}

.rubric-info p {
  margin-bottom: 2rem;
}

.rubric-key {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.rubric-key-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.rubric-key-item .key-score {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  background: var(--accent-subtle);
  color: var(--accent-primary);
}

.rubric-key-item .key-label {
  font-size: 0.875rem;
  color: var(--brand-mid);
}

.rubric-visualiser {
  background: var(--brand-white);
  border: 1px solid var(--brand-pale);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.rubric-persona-name {
  font-weight: 700;
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
  color: var(--brand-deep);
}

.rubric-persona-role {
  font-size: 0.875rem;
  color: var(--brand-slate);
  margin-bottom: 2rem;
}

.rubric-bar-group {
  margin-bottom: 1.25rem;
}

.rubric-bar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.rubric-bar-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--brand-dark);
}

.rubric-bar-score {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--accent-primary);
}

.rubric-bar-track {
  height: 8px;
  background: var(--brand-pale);
  border-radius: 4px;
  overflow: hidden;
}

.rubric-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  width: 0;
}

.rubric-bar-note {
  font-size: 0.75rem;
  color: var(--brand-slate);
  margin-top: 0.375rem;
  font-style: italic;
}

/* Bar colours by score range */
.bar-low { background: var(--accent-primary); }
.bar-mid { background: var(--accent-warm); }
.bar-high { background: var(--accent-green); }

/* ── Persona Explorer ────────────────────────────────────────── */
.personas {
  background: var(--brand-white);
}

.persona-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.persona-tab {
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid var(--brand-pale);
  border-radius: var(--radius-md);
  background: white;
  color: var(--brand-mid);
  cursor: pointer;
  transition: all var(--transition);
}

.persona-tab:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.persona-tab.active {
  background: var(--brand-deep);
  border-color: var(--brand-deep);
  color: white;
}

.persona-detail {
  display: none;
  background: white;
  border: 1px solid var(--brand-pale);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.persona-detail.active {
  display: block;
}

.persona-header {
  padding: 2rem;
  border-bottom: 1px solid var(--brand-pale);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
}

.persona-title-group h3 {
  font-size: 1.5rem;
  margin-bottom: 0.375rem;
}

.persona-meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.persona-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 100px;
  background: var(--accent-subtle);
  color: var(--accent-primary);
}

.persona-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.persona-section {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--brand-pale);
}

.persona-section:nth-child(even) {
  border-left: 1px solid var(--brand-pale);
}

.persona-section h4 {
  margin-bottom: 0.75rem;
  color: var(--brand-deep);
}

.persona-section p {
  font-size: 0.875rem;
}

.persona-section ul {
  list-style: none;
  padding: 0;
}

.persona-section li {
  font-size: 0.875rem;
  color: var(--brand-mid);
  padding: 0.25rem 0;
  padding-left: 1rem;
  position: relative;
}

.persona-section li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--brand-light);
}

/* ── Decision Engine ─────────────────────────────────────────── */
.decision-engine {
  background: white;
  border-top: 1px solid var(--brand-pale);
}

.pipeline-visual {
  display: flex;
  gap: 0;
  margin-bottom: 3rem;
  overflow-x: auto;
}

.pipeline-stage {
  flex: 1;
  min-width: 200px;
  padding: 2rem 1.5rem;
  background: var(--brand-white);
  border: 1px solid var(--brand-pale);
  position: relative;
  cursor: pointer;
  transition: all var(--transition);
}

.pipeline-stage:first-child {
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.pipeline-stage:last-child {
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}

.pipeline-stage:not(:first-child) {
  border-left: none;
}

.pipeline-stage:hover {
  background: white;
  box-shadow: var(--shadow-sm);
  z-index: 1;
}

.pipeline-stage.active {
  background: var(--brand-deep);
  border-color: var(--brand-deep);
  color: white;
  z-index: 2;
}

.pipeline-stage.active .stage-name,
.pipeline-stage.active .stage-desc {
  color: white;
}

.pipeline-stage.active .stage-desc {
  color: var(--brand-light);
}

.stage-name {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.375rem;
  color: var(--brand-deep);
}

.stage-desc {
  font-size: 0.8125rem;
  color: var(--brand-slate);
}

.pipeline-detail {
  background: var(--brand-white);
  border: 1px solid var(--brand-pale);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
}

.pipeline-detail h3 {
  margin-bottom: 1rem;
}

.pipeline-detail p {
  margin-bottom: 1.5rem;
}

.panel-personas {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}

.panel-persona-card {
  padding: 1.25rem;
  background: white;
  border: 1px solid var(--brand-pale);
  border-radius: var(--radius-md);
  text-align: center;
  transition: all var(--transition);
}

.panel-persona-card:hover {
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-sm);
}

.panel-persona-card .persona-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.75rem;
  font-size: 1.25rem;
}

.panel-persona-card h4 {
  font-size: 0.8125rem;
  margin-bottom: 0.25rem;
}

.panel-persona-card p {
  font-size: 0.75rem;
  color: var(--brand-slate);
}

/* ── Use Cases ───────────────────────────────────────────────── */
.use-cases {
  background: var(--brand-white);
}

.use-case-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.use-case-card {
  padding: 2rem;
  background: white;
  border: 1px solid var(--brand-pale);
  border-radius: var(--radius-lg);
  transition: all var(--transition);
}

.use-case-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.use-case-category {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-primary);
  margin-bottom: 0.75rem;
}

.use-case-card h3 {
  font-size: 1.0625rem;
  margin-bottom: 0.5rem;
}

.use-case-card p {
  font-size: 0.875rem;
}

.use-case-score {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: 1rem;
  padding: 0.25rem 0.625rem;
  background: var(--accent-subtle);
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-primary);
}

/* ── Footer ──────────────────────────────────────────────────── */
.footer {
  background: var(--brand-deep);
  color: var(--brand-light);
  padding: 3rem 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-brand {
  font-weight: 700;
  font-size: 1rem;
  color: white;
}

.footer-brand span {
  font-weight: 400;
  color: var(--brand-light);
}

.footer-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--brand-light);
  transition: color var(--transition);
}

.footer-links a:hover { color: white; }

.footer-copy {
  font-size: 0.8125rem;
  color: var(--brand-slate);
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .rubric-layout { grid-template-columns: 1fr; gap: 2rem; }
  .persona-body { grid-template-columns: 1fr; }
  .persona-section:nth-child(even) { border-left: none; }
  .panel-personas { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.5rem; }
  section { padding: 4rem 0; }

  .hero { padding: 8rem 0 4rem; }
  .hero h1 { font-size: 2.5rem; }
  .hero p { font-size: 1.0625rem; }

  .nav-links { display: none; }
  .nav-mobile-toggle { display: block; }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: white;
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--brand-pale);
    box-shadow: var(--shadow-md);
  }

  .problem-grid { grid-template-columns: 1fr; }
  .stages { grid-template-columns: 1fr; }
  .use-case-grid { grid-template-columns: 1fr; }
  .pipeline-visual { flex-direction: column; }
  .pipeline-stage:first-child { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
  .pipeline-stage:last-child { border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
  .pipeline-stage:not(:first-child) { border-left: 1px solid var(--brand-pale); border-top: none; }
  .panel-personas { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; }
  .btn { justify-content: center; }
}
