/* ============================================================
   LexAra — Premium Design System
   Palette: Obsidian / Black / White / Gold
   AODA / WCAG 2.1 AA Compliant
   ============================================================ */

/* ── Design Tokens ─────────────────────────────────────────── */
:root {
  /* Core */
  --black:       #0A0A0B;
  --obsidian:    #111113;
  --surface:     #18181C;
  --surface-2:   #1E1E24;
  --surface-3:   #26262E;
  --border:      #2A2A34;
  --border-2:    #383844;

  /* Gold */
  --gold:        #D4AF37;
  --gold-light:  #E8C84A;
  --gold-dark:   #B8960C;
  --gold-muted:  rgba(212,175,55,0.12);

  /* Text */
  --text-primary:   #F5F5F0;
  --text-secondary: #A0A0AA;
  --text-muted:     #6A6A78;
  --text-inverse:   #0A0A0B;

  /* Semantic */
  --critical: #FF4D4D;
  --high:     #FF8C42;
  --medium:   #FFD166;
  --low:      #06D6A0;
  --info:     #4ECDC4;

  /* Typography */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Radii */
  --radius-sm: 4px;
  --radius:    8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.4);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.5);
  --shadow-lg:  0 8px 32px rgba(0,0,0,0.6);
  --shadow-gold: 0 0 24px rgba(212,175,55,0.2);

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --duration: 200ms;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--black);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ── Accessibility ─────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  background: var(--gold);
  color: var(--text-inverse);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius);
  font-weight: 600;
  z-index: 9999;
  transition: top var(--duration) var(--ease);
}
.skip-link:focus { top: var(--space-4); outline: 3px solid var(--text-primary); outline-offset: 2px; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Focus styles — WCAG 2.1 AA */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ── Layout ────────────────────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

@media (max-width: 768px) {
  .container { padding: 0 var(--space-4); }
}

/* ── Typography ────────────────────────────────────────────── */
.gradient-text {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 50%, var(--gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: all var(--duration) var(--ease);
  border: 2px solid transparent;
  white-space: nowrap;
  text-decoration: none;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-gold {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: var(--text-inverse);
  border-color: var(--gold);
  box-shadow: 0 2px 12px rgba(212,175,55,0.3);
}
.btn-gold:hover {
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 100%);
  box-shadow: 0 4px 20px rgba(212,175,55,0.45);
  color: var(--text-inverse);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border-2);
}
.btn-ghost:hover { background: var(--surface-2); color: var(--text-primary); border-color: var(--border-2); }

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-2);
}
.btn-outline:hover { background: var(--surface-2); border-color: var(--gold); color: var(--gold); }

.btn-lg { padding: var(--space-4) var(--space-8); font-size: 1rem; }
.btn-full { width: 100%; justify-content: center; }

/* ── Navigation ────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 11, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-6);
  height: 68px;
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}

.brand-icon { width: 32px; height: 32px; }
.brand-icon--sm { width: 28px; height: 28px; }

.brand-name {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

nav[aria-label="Main navigation"] { margin-left: auto; }

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.nav-link {
  padding: var(--space-2) var(--space-4);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius);
  transition: color var(--duration) var(--ease), background var(--duration) var(--ease);
}
.nav-link:hover { color: var(--text-primary); background: var(--surface-2); }

.nav-cta { margin-left: var(--space-4); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: var(--space-2);
  margin-left: auto;
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text-primary); border-radius: 2px; transition: all var(--duration) var(--ease); }

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-inner { padding: 0 var(--space-4); }
  nav[aria-label="Main navigation"] { 
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--obsidian);
    border-bottom: 1px solid var(--border);
    padding: var(--space-4);
    margin-left: 0;
  }
  nav[aria-label="Main navigation"].nav-open { display: block; }
  .nav-links { flex-direction: column; align-items: flex-start; gap: var(--space-1); }
  .nav-cta { display: none; }
}

/* ── Hero ──────────────────────────────────────────────────── */
.hero {
  position: relative;
  padding: var(--space-24) 0;
  overflow: hidden;
  min-height: 90vh;
  display: flex;
  align-items: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(212,175,55,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212,175,55,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
}

.hero-glow {
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(212,175,55,0.07) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--gold-muted);
  border: 1px solid rgba(212,175,55,0.25);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--gold);
  margin-bottom: var(--space-6);
  width: fit-content;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: var(--space-6);
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 480px;
  margin-bottom: var(--space-8);
}

.hero-actions {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-10);
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.stat { text-align: left; }
.stat-value {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 2px;
}
.stat-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-weight: 500;
}
.stat-divider {
  width: 1px;
  height: 32px;
  background: var(--border);
}

/* Terminal */
.terminal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(212,175,55,0.08);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot-red    { background: #FF5F57; }
.dot-yellow { background: #FEBC2E; }
.dot-green  { background: #28C840; }

.terminal-title {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.terminal-body {
  padding: var(--space-6);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.8;
  overflow-x: auto;
}

.t-key    { color: #7DD3FC; }
.t-str    { color: #A3E635; }
.t-num    { color: #FB923C; }
.t-crit   { color: var(--critical); }
.t-warn   { color: var(--high); }
.t-colon, .t-comma { color: var(--text-muted); }
.t-bracket, .t-brace { color: var(--gold); }

@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; gap: var(--space-12); }
  .hero-visual { order: -1; }
  .hero-subtitle { max-width: 100%; }
}

@media (max-width: 640px) {
  .hero { padding: var(--space-16) 0; min-height: auto; }
  .hero-actions { flex-direction: column; }
  .hero-stats { gap: var(--space-6); }
}

/* ── Section Headers ───────────────────────────────────────── */
.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto var(--space-16);
}

.section-eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--space-3);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1.15;
  margin-bottom: var(--space-4);
}

.section-subtitle {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ── Features ──────────────────────────────────────────────── */
.features {
  padding: var(--space-24) 0;
  background: var(--obsidian);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}

@media (max-width: 1024px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .features-grid { grid-template-columns: 1fr; } }

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  transition: border-color var(--duration) var(--ease), transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}
.feature-card:hover {
  border-color: var(--border-2);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.feature-card--gold {
  background: linear-gradient(135deg, var(--surface) 0%, rgba(212,175,55,0.06) 100%);
  border-color: rgba(212,175,55,0.25);
}
.feature-card--gold:hover { border-color: rgba(212,175,55,0.5); box-shadow: var(--shadow-gold); }
.feature-card--dark { background: var(--black); }

.feature-icon {
  width: 44px; height: 44px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-5);
  color: var(--text-secondary);
}
.feature-icon svg { width: 22px; height: 22px; }
.feature-icon--gold { background: var(--gold-muted); border-color: rgba(212,175,55,0.3); color: var(--gold); }
.feature-icon--warn { color: var(--high); }
.feature-icon--green { color: var(--low); }

.feature-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-3);
  letter-spacing: -0.01em;
}

.feature-desc {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: var(--space-5);
}

.feature-tag {
  display: inline-block;
  padding: 2px var(--space-3);
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}
.feature-tag--gold {
  background: var(--gold-muted);
  border-color: rgba(212,175,55,0.3);
  color: var(--gold);
}

/* ── Demo ──────────────────────────────────────────────────── */
.demo {
  padding: var(--space-24) 0;
  background: var(--black);
}

.demo-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.demo-input-area {
  padding: var(--space-8);
  border-bottom: 1px solid var(--border);
}

/* Upload zone */
.upload-zone {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-6);
  background: var(--surface-2);
  border: 2px dashed var(--border-2);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color var(--duration) var(--ease), background var(--duration) var(--ease);
  position: relative;
  margin-bottom: var(--space-4);
  color: var(--text-secondary);
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--gold);
  background: rgba(212,175,55,0.04);
  color: var(--text-primary);
}
.upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.upload-label { font-size: 0.9375rem; font-weight: 500; margin-bottom: 2px; }
.upload-link { color: var(--gold); text-decoration: underline; }
.upload-hint { font-size: 0.8125rem; color: var(--text-muted); }
.upload-zone.upload-success { border-color: var(--low); border-style: solid; }
.upload-zone.upload-success svg { color: var(--low); }

.input-divider {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
  color: var(--text-muted);
  font-size: 0.8125rem;
}
.input-divider::before, .input-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.input-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--space-3);
  letter-spacing: 0.02em;
}

.contract-textarea {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9375rem;
  line-height: 1.65;
  padding: var(--space-4);
  resize: vertical;
  min-height: 180px;
  transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}
.contract-textarea::placeholder { color: var(--text-muted); }
.contract-textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212,175,55,0.15); }

.input-hint {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: var(--space-2);
}

.demo-meta {
  display: flex;
  gap: var(--space-6);
  margin-top: var(--space-5);
  flex-wrap: wrap;
}

.meta-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.meta-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
}

.meta-select {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 0.875rem;
  padding: var(--space-2) var(--space-4);
  cursor: pointer;
  transition: border-color var(--duration) var(--ease);
}
.meta-select:focus { outline: none; border-color: var(--gold); }

/* Toolbar */
.demo-toolbar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-6);
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.btn-sm { padding: var(--space-2) var(--space-4); font-size: 0.8125rem; }

/* Tabs */
.demo-tabs {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.demo-tabs::-webkit-scrollbar { display: none; }

.tab-btn {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-6);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color var(--duration) var(--ease), border-color var(--duration) var(--ease), background var(--duration) var(--ease);
  margin-bottom: -1px;
}
.tab-btn:hover { color: var(--text-primary); background: rgba(255,255,255,0.04); }
.tab-active {
  color: var(--gold);
  border-bottom-color: var(--gold);
  background: rgba(212,175,55,0.06);
}

/* Results */
.demo-results {
  min-height: 300px;
  padding: var(--space-8);
  position: relative;
}

.tab-panel { display: none; }
.tab-panel--active { display: block; }

.demo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  min-height: 240px;
  color: var(--text-muted);
}
.demo-placeholder p { font-size: 0.9375rem; }

/* Loading */
.loading-state {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--text-secondary);
  font-size: 0.9375rem;
}
.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Result Cards */
.result-summary .summary-text {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--surface-2);
  border-left: 3px solid var(--gold);
  padding: var(--space-5) var(--space-6);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin-bottom: var(--space-5);
}
.result-meta { display: flex; gap: var(--space-4); flex-wrap: wrap; }
.meta-chip {
  font-size: 0.8125rem;
  padding: var(--space-1) var(--space-3);
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
}

/* Risk Score */
.risk-score-display {
  display: flex;
  align-items: flex-start;
  gap: var(--space-8);
  flex-wrap: wrap;
  margin-bottom: var(--space-6);
}
.score-circle {
  flex-shrink: 0;
  width: 120px; height: 120px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 4px solid;
  gap: 2px;
}
.score-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}
.score-label { font-size: 0.75rem; color: var(--text-muted); }

.score-circle--low    { border-color: var(--low);      color: var(--low); }
.score-circle--medium { border-color: var(--medium);   color: var(--medium); }
.score-circle--high   { border-color: var(--high);     color: var(--high); }
.score-circle--critical { border-color: var(--critical); color: var(--critical); }

.score-categories { flex: 1; display: flex; flex-direction: column; gap: var(--space-3); min-width: 200px; }
.score-cat-row { display: flex; flex-direction: column; gap: 4px; }
.score-cat-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}
.score-cat-val { font-weight: 600; color: var(--text-primary); }
.score-bar-track {
  height: 4px;
  background: var(--surface-3);
  border-radius: 2px;
  overflow: hidden;
}
.score-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.6s var(--ease);
}
.score-interpretation {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.65;
  background: var(--surface-2);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-md);
}

/* Risk Items */
.risks-list { display: flex; flex-direction: column; gap: var(--space-4); }
.risk-item {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-5) var(--space-6);
  border-left: 4px solid;
}
.risk-item--critical { border-left-color: var(--critical); }
.risk-item--high     { border-left-color: var(--high); }
.risk-item--medium   { border-left-color: var(--medium); }
.risk-item--low      { border-left-color: var(--low); }

.risk-header { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-3); }
.risk-badge {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px var(--space-2);
  border-radius: var(--radius-sm);
}
.badge--critical { background: rgba(255,77,77,0.15); color: var(--critical); }
.badge--high     { background: rgba(255,140,66,0.15); color: var(--high); }
.badge--medium   { background: rgba(255,209,102,0.15); color: var(--medium); }
.badge--low      { background: rgba(6,214,160,0.15); color: var(--low); }

.risk-title { font-size: 0.9375rem; font-weight: 600; color: var(--text-primary); }
.risk-desc { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.65; margin-bottom: var(--space-3); }
.risk-rec {
  font-size: 0.8125rem;
  color: var(--text-muted);
  background: var(--surface-3);
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-4);
  border-left: 2px solid var(--gold);
}
.risk-rec strong { color: var(--gold); }
.risk-section { font-size: 0.75rem; color: var(--text-muted); font-family: var(--font-mono); }

/* Missing Clauses */
.clauses-list { display: flex; flex-direction: column; gap: var(--space-3); }
.clause-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
}
.clause-importance {
  flex-shrink: 0;
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-top: 6px;
}
.imp--critical { background: var(--critical); }
.imp--high     { background: var(--high); }
.imp--medium   { background: var(--medium); }
.imp--low      { background: var(--low); }
.clause-name { font-size: 0.9375rem; font-weight: 600; color: var(--text-primary); margin-bottom: 3px; }
.clause-rationale { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.6; }

/* Extracted Clauses */
.extract-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-4); }
@media (max-width: 640px) { .extract-list { grid-template-columns: 1fr; } }
.extract-item {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
}
.extract-type {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--space-2);
}
.extract-summary { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.6; }
.extract-meta { display: flex; justify-content: space-between; margin-top: var(--space-3); }
.extract-section { font-size: 0.75rem; color: var(--text-muted); font-family: var(--font-mono); }
.extract-confidence { font-size: 0.75rem; color: var(--low); }

.revision-item { flex-direction: column; }
.revision-label { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-right: var(--space-2); }
.revision-original { font-size: .875rem; color: var(--critical); background: rgba(255,77,77,.06); border-left: 3px solid var(--critical); padding: var(--space-3); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin-bottom: var(--space-2); }
.revision-original .revision-label { color: var(--critical); }
.revision-revised  { font-size: .875rem; color: var(--low); background: rgba(6,214,160,.06); border-left: 3px solid var(--low); padding: var(--space-3); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.revision-revised .revision-label { color: var(--low); }
.revision-disclaimer { font-size: .8125rem; color: var(--text-muted); background: var(--surface-3); border-radius: var(--radius-md); padding: var(--space-4); margin-top: var(--space-4); border-left: 3px solid var(--gold); }

/* Error */
.result-error {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: rgba(255,77,77,0.08);
  border: 1px solid rgba(255,77,77,0.25);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  color: var(--critical);
  font-size: 0.9375rem;
}

/* Tokens used footer */
.result-footer {
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--text-muted);
  display: flex;
  gap: var(--space-4);
}

/* ── Pricing ───────────────────────────────────────────────── */
.pricing {
  padding: var(--space-24) 0;
  background: var(--obsidian);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
}

@media (max-width: 1024px) { .pricing-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .pricing-grid { grid-template-columns: 1fr; } }

.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  position: relative;
  transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}
.pricing-card:hover { border-color: var(--border-2); box-shadow: var(--shadow-md); }

.pricing-card--featured {
  background: linear-gradient(160deg, var(--surface) 0%, rgba(212,175,55,0.05) 100%);
  border-color: rgba(212,175,55,0.35);
}
.pricing-card--featured:hover { border-color: rgba(212,175,55,0.6); box-shadow: var(--shadow-gold); }

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--text-inverse);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px var(--space-4);
  border-radius: 999px;
  white-space: nowrap;
}

.plan-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 2px;
  margin: var(--space-2) 0;
}
.price-amt {
  font-family: var(--font-display);
  font-size: 2.75rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}
.price-per { font-size: 0.9375rem; color: var(--text-muted); }
.plan-desc { font-size: 0.875rem; color: var(--text-muted); line-height: 1.5; }

.plan-features {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  flex: 1;
}
.plan-features li {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 0.9375rem;
  color: var(--text-secondary);
}
.check { color: var(--low); font-weight: 700; }
.check--gold { color: var(--gold); }
.plan-feat--off { color: var(--text-muted); text-decoration: line-through; opacity: 0.5; }

/* ── CTA ───────────────────────────────────────────────────── */
.cta {
  padding: var(--space-24) 0;
  background: var(--black);
  position: relative;
  overflow: hidden;
}

.cta-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
}

.cta-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 700px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(212,175,55,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.cta-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: var(--space-4);
}

.cta-sub {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-8);
}

.cta-form-row {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  margin-bottom: var(--space-4);
}

.cta-input {
  flex: 1;
  max-width: 300px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 0.9375rem;
  padding: var(--space-3) var(--space-5);
  transition: border-color var(--duration) var(--ease);
}
.cta-input::placeholder { color: var(--text-muted); }
.cta-input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212,175,55,0.15); }

.cta-note {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.cta-note a { color: var(--text-secondary); text-decoration: underline; }
.cta-note a:hover { color: var(--gold); }

@media (max-width: 480px) {
  .cta-form-row { flex-direction: column; align-items: center; }
  .cta-input { max-width: 100%; width: 100%; }
  .btn-lg { width: 100%; justify-content: center; }
}

/* ── Footer ────────────────────────────────────────────────── */
.footer {
  background: var(--obsidian);
  border-top: 1px solid var(--border);
}

.footer-inner {
  padding: var(--space-16) var(--space-6);
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: var(--space-10);
  align-items: start;
}


@media (max-width: 1024px) { .footer-inner { grid-template-columns: 1fr 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 640px)  { .footer-inner { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

.footer-tagline {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-top: var(--space-4);
  line-height: 1.6;
  max-width: 260px;
}

.footer-heading {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: var(--space-5);
}

.footer-col ul { display: flex; flex-direction: column; gap: var(--space-2); }
.footer-col a {
  font-size: 0.9375rem;
  color: var(--text-muted);
  transition: color var(--duration) var(--ease);
}
.footer-col a:hover { color: var(--gold); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: var(--space-5) 0;
}

.footer-bottom-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.footer-bottom p { font-size: 0.875rem; color: var(--text-muted); }
.footer-compliance { font-size: 0.8125rem; }

/* ── Procurement page nav logo (nav-logo / logo-mark / logo-text / logo-accent) ── */
/* Used by procurement.html, procurement-ai.html, procurement-intelligence.html     */
/* Mirrors the .brand / .brand-name pattern from index.html                         */
.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
  text-decoration: none;
}

.logo-mark {
  font-size: 1.375rem;
  line-height: 1;
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.logo-accent {
  color: var(--gold);
}

/* ── Utilities ─────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
