/* ==========================================================================
   FACTORYFLOW AI — DESIGN SYSTEM & TOKEN SPECIFICATION
   Archetype: Terminal Precision + Blueprint Technical + Obsidian Gold (D4/D9/D7)
   Skill: /premium-ui-studio
   ========================================================================== */

:root {
  /* Color Scheme Lock */
  color-scheme: dark;

  /* Obsidian Spatial Canvas & Surfaces */
  --canvas-void: #050608;
  --canvas-base: #080a0f;
  --surface-raised: #0e121a;
  --surface-card: #131824;
  --surface-card-hover: #182030;
  --surface-glass: rgba(14, 18, 26, 0.72);
  --surface-glass-border: rgba(255, 255, 255, 0.08);

  /* Metallurgy Precision Gold (24K / 18K Spectrum) */
  --gold-primary: #f59e0b;
  --gold-bright: #fbbf24;
  --gold-metallic: #d4af37;
  --gold-light: #fef3c7;
  --gold-glow: rgba(245, 158, 11, 0.16);
  --gold-glow-intense: rgba(245, 158, 11, 0.4);
  --gold-border: rgba(245, 158, 11, 0.28);
  --gold-border-bright: rgba(251, 191, 36, 0.75);

  /* Cybernetic & Diagnostics Accents */
  --laser-cyan: #06b6d4;
  --laser-cyan-glow: rgba(6, 182, 212, 0.25);
  --status-emerald: #10b981;
  --status-emerald-glow: rgba(16, 185, 129, 0.25);
  --status-amber: #f59e0b;
  --status-rose: #f43f5e;

  /* Typography Colors */
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;
  --text-dim: #475569;

  /* Grid & Technical Lines */
  --grid-line: rgba(245, 158, 11, 0.05);
  --grid-crosshair: rgba(255, 255, 255, 0.1);
  --border-subtle: rgba(255, 255, 255, 0.07);

  /* Typography Stack */
  --font-display: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;

  /* Motion Durations & Springs (from premium-ui-studio cookbook) */
  --d-1: 90ms;
  --d-2: 160ms;
  --d-3: 240ms;
  --d-4: 360ms;
  --d-5: 560ms;
  --d-6: 800ms;

  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 9999px;
}

/* ==========================================================================
   RESET & FOUNDATIONS
   ========================================================================== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  scroll-behavior: smooth;
  background-color: var(--canvas-void);
  color: var(--text-primary);
  font-family: var(--font-body);
}

body {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  background: 
    radial-gradient(circle at 50% 0%, rgba(245, 158, 11, 0.12) 0%, transparent 60%),
    radial-gradient(circle at 10% 30%, rgba(6, 182, 212, 0.04) 0%, transparent 45%),
    radial-gradient(circle at 90% 70%, rgba(245, 158, 11, 0.06) 0%, transparent 50%),
    var(--canvas-void);
}

/* Tabular figures for all precision numbers */
.tabular-nums, code, pre, .stat-value, .ticker, .hud-telemetry {
  font-variant-numeric: tabular-nums;
}

/* Blueprint CAD Grid Layer */
.cad-grid-backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-size: 48px 48px;
  background-image: 
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  mask-image: radial-gradient(ellipse at 50% 35%, black 40%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 35%, black 40%, transparent 85%);
}

/* Global Container */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   TOP TELEMETRY FLIGHT HUD
   ========================================================================== */

.telemetry-hud {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 38px;
  background: rgba(5, 6, 8, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}

.hud-group {
  display: flex;
  align-items: center;
  gap: 16px;
}

.hud-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid var(--gold-border);
  color: var(--gold-bright);
  font-weight: 600;
}

.hud-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--status-emerald);
  box-shadow: 0 0 8px var(--status-emerald);
  animation: pulseGreen 2s infinite ease-in-out;
}

@keyframes pulseGreen {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.hud-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--d-2) var(--ease-out);
}

.hud-btn:hover {
  background: rgba(245, 158, 11, 0.1);
  border-color: var(--gold-border);
  color: var(--gold-bright);
}

/* ==========================================================================
   PRIMARY EXECUTIVE NAVIGATION
   ========================================================================== */

.main-navbar {
  position: sticky;
  top: 38px;
  z-index: 99;
  background: rgba(8, 10, 15, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  height: 72px;
  display: flex;
  align-items: center;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-logo-frame {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25) 0%, rgba(8, 10, 15, 0.8) 100%);
  border: 1px solid var(--gold-border-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 16px var(--gold-glow);
  position: relative;
  overflow: hidden;
}

.brand-logo-frame svg {
  color: var(--gold-bright);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.brand-title span {
  color: var(--gold-primary);
}

.brand-badge {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.nav-links-menu {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-link-item a {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--d-2) var(--ease-out);
  position: relative;
  padding: 6px 0;
}

.nav-link-item a:hover {
  color: var(--gold-bright);
}

.nav-link-item a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--gold-primary);
  transition: width var(--d-3) var(--ease-out-quint);
  border-radius: 2px;
}

.nav-link-item a:hover::after {
  width: 100%;
}

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

/* ==========================================================================
   BUTTONS (Full State Set from premium-ui-studio)
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: 
    transform var(--d-2) var(--ease-out),
    background var(--d-2) var(--ease-out),
    border-color var(--d-2) var(--ease-out),
    box-shadow var(--d-3) var(--ease-out);
  position: relative;
  overflow: hidden;
  user-select: none;
}

.btn:active {
  transform: scale(0.97) translateY(1px);
}

.btn:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 3px;
}

.btn-primary-gold {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #050608;
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.35);
  border-color: rgba(251, 191, 36, 0.4);
}

.btn-primary-gold:hover {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  box-shadow: 0 6px 26px rgba(245, 158, 11, 0.55);
  transform: translateY(-1px);
}

.btn-secondary-dark {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-subtle);
  color: var(--text-primary);
}

.btn-secondary-dark:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--gold-border);
  color: var(--gold-bright);
  transform: translateY(-1px);
}

.btn-outline-gold {
  background: transparent;
  border-color: var(--gold-border);
  color: var(--gold-bright);
}

.btn-outline-gold:hover {
  background: rgba(245, 158, 11, 0.08);
  border-color: var(--gold-border-bright);
  transform: translateY(-1px);
}

/* ==========================================================================
   HERO SECTION & SIGNATURE STACK
   ========================================================================== */

.hero-section {
  padding: 80px 0 60px;
  position: relative;
}

.hero-content {
  text-align: center;
  max-width: 960px;
  margin: 0 auto;
}

.hero-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid var(--gold-border);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--gold-bright);
  margin-bottom: 28px;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.12);
  animation: riseIn var(--d-5) var(--ease-out) both;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(38px, 5.2vw, 68px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.04em;
  color: var(--text-primary);
  margin-bottom: 24px;
  text-wrap: balance;
  animation: riseIn var(--d-5) var(--ease-out) both;
  animation-delay: 80ms;
}

.hero-title .gradient-gold {
  background: linear-gradient(135deg, #fef08a 0%, #f59e0b 50%, #d97706 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.hero-description {
  font-size: clamp(16px, 1.8vw, 20px);
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 780px;
  margin: 0 auto 36px;
  text-wrap: pretty;
  animation: riseIn var(--d-5) var(--ease-out) both;
  animation-delay: 160ms;
}

.hero-cta-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 56px;
  animation: riseIn var(--d-5) var(--ease-out) both;
  animation-delay: 240ms;
}

/* Metric Strip */
.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 24px;
  background: rgba(14, 18, 26, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  margin-bottom: 60px;
  animation: riseIn var(--d-5) var(--ease-out) both;
  animation-delay: 320ms;
}

.metric-item {
  text-align: left;
  border-left: 2px solid var(--gold-border);
  padding-left: 16px;
}

.metric-value {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--gold-bright);
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.metric-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 4px;
}

/* ==========================================================================
   INTERACTIVE 5-AXIS SIMULATOR (SIGNATURE MOMENT)
   ========================================================================== */

.simulator-card {
  background: var(--surface-raised);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 
    0 24px 60px -12px rgba(0, 0, 0, 0.7),
    0 0 30px rgba(245, 158, 11, 0.08);
  margin-bottom: 100px;
  position: relative;
}

.simulator-header {
  padding: 18px 24px;
  background: rgba(8, 10, 15, 0.95);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.simulator-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sim-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--status-emerald);
  box-shadow: 0 0 10px var(--status-emerald);
}

.sim-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.sim-subtitle {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

/* Segmented Tab Controls */
.segmented-control {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.05);
  padding: 3px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  position: relative;
}

.seg-btn {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 6px 14px;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--d-2) var(--ease-out);
}

.seg-btn.active {
  background: var(--gold-primary);
  color: #050608;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

.seg-btn:hover:not(.active) {
  color: var(--gold-bright);
}

/* Main Simulator Stage */
.simulator-body {
  display: grid;
  grid-template-columns: 1fr 380px;
  min-height: 520px;
  background: #040507;
}

@media (max-width: 960px) {
  .simulator-body {
    grid-template-columns: 1fr;
  }
}

.canvas-viewport {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: radial-gradient(circle at 50% 50%, #0d121c 0%, #040507 80%);
}

#kinematics-canvas {
  width: 100%;
  height: 100%;
  min-height: 520px;
  display: block;
}

.canvas-overlay-hud {
  position: absolute;
  top: 16px;
  left: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
  background: rgba(8, 10, 15, 0.82);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  backdrop-filter: blur(8px);
  pointer-events: none;
  line-height: 1.6;
}

.canvas-overlay-hud span {
  color: var(--gold-bright);
}

.canvas-controls-bar {
  position: absolute;
  bottom: 16px;
  left: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(8, 10, 15, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  backdrop-filter: blur(10px);
}

/* Simulator Telemetry & G-Code Terminal */
.simulator-sidebar {
  border-left: 1px solid var(--border-subtle);
  background: rgba(10, 13, 20, 0.95);
  display: flex;
  flex-direction: column;
}

.terminal-header {
  padding: 12px 16px;
  background: rgba(5, 6, 8, 0.7);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.terminal-stream {
  flex: 1;
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.7;
  color: #94a3b8;
  overflow-y: auto;
  max-height: 340px;
}

.g-code-line {
  display: flex;
  gap: 12px;
}

.g-code-num {
  color: var(--text-dim);
  user-select: none;
  width: 44px;
}

.g-code-cmd {
  color: var(--laser-cyan);
}

.g-code-coord {
  color: var(--gold-bright);
}

.g-code-feed {
  color: var(--status-emerald);
}

.telemetry-readout-panel {
  padding: 16px;
  background: rgba(5, 6, 8, 0.9);
  border-top: 1px solid var(--border-subtle);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
}

.tel-cell-label {
  color: var(--text-dim);
  font-size: 10px;
  text-transform: uppercase;
}

.tel-cell-val {
  color: var(--text-primary);
  font-weight: 700;
  margin-top: 2px;
}

/* ==========================================================================
   BENTO FEATURE GRID (4 PILLARS)
   ========================================================================== */

.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 56px;
}

.section-pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid var(--gold-border);
  color: var(--gold-bright);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 16px;
  text-wrap: balance;
}

.section-desc {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
  margin-bottom: 100px;
}

.bento-card {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
  position: relative;
  overflow: hidden;
  transition: 
    transform var(--d-3) var(--ease-out),
    border-color var(--d-3) var(--ease-out),
    box-shadow var(--d-3) var(--ease-out);
}

.bento-card:hover {
  transform: translateY(-3px);
  border-color: var(--gold-border);
  box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.5), 0 0 20px rgba(245, 158, 11, 0.08);
}

.bento-col-7 {
  grid-column: span 7;
}

.bento-col-5 {
  grid-column: span 5;
}

.bento-col-6 {
  grid-column: span 6;
}

.bento-col-4 {
  grid-column: span 4;
}

@media (max-width: 900px) {
  .bento-col-7, .bento-col-5, .bento-col-6, .bento-col-4 {
    grid-column: span 12;
  }
}

.card-icon-frame {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid var(--gold-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-bright);
  margin-bottom: 20px;
}

.card-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 10px;
}

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

/* ==========================================================================
   INTERACTIVE ROI & SWARF RECOVERY CALCULATOR
   ========================================================================== */

.calc-section-frame {
  background: linear-gradient(180deg, #0d111a 0%, #080a0f 100%);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-xl);
  padding: 48px;
  margin-bottom: 100px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.calc-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}

@media (max-width: 900px) {
  .calc-grid {
    grid-template-columns: 1fr;
  }
}

.slider-group {
  margin-bottom: 28px;
}

.slider-label-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.slider-label-row span.val-display {
  font-family: var(--font-mono);
  color: var(--gold-bright);
  font-weight: 700;
}

input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  transition: background var(--d-2);
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--gold-primary);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.7);
  transition: transform var(--d-2) var(--ease-out);
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* Calculator Output Panel */
.calc-results-card {
  background: rgba(5, 6, 8, 0.85);
  border: 1px solid var(--gold-border-bright);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.15);
}

.results-hero-metric {
  margin-bottom: 24px;
}

.results-hero-val {
  font-family: var(--font-display);
  font-size: clamp(36px, 4vw, 54px);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--gold-bright);
}

.results-hero-sub {
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--font-mono);
  margin-top: 4px;
}

.results-sub-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
}

.res-sub-val {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
}

.res-sub-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ==========================================================================
   BENCHMARK TABLE / SPECIFICATION LEDGER
   ========================================================================== */

.table-frame {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  margin-bottom: 100px;
}

.benchmark-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.benchmark-table th {
  padding: 16px 24px;
  background: rgba(5, 6, 8, 0.8);
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
}

.benchmark-table td {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.benchmark-table tr:hover td {
  background: rgba(245, 158, 11, 0.03);
}

.highlight-row td {
  color: var(--gold-bright);
  font-weight: 600;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-family: var(--font-mono);
}

.status-badge.ok {
  background: rgba(16, 185, 129, 0.12);
  color: var(--status-emerald);
}

.status-badge.fail {
  background: rgba(244, 63, 94, 0.12);
  color: var(--status-rose);
}

/* ==========================================================================
   ENTERPRISE PILOT MODAL & FORM
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(5, 6, 8, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--d-3) var(--ease-out);
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background: #0d111a;
  border: 1px solid var(--gold-border-bright);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 540px;
  padding: 36px;
  position: relative;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(245, 158, 11, 0.15);
  transform: translateY(20px) scale(0.97);
  transition: transform var(--d-3) var(--ease-out);
}

.modal-backdrop.active .modal-box {
  transform: translateY(0) scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--d-2);
}

.modal-close-btn:hover {
  color: var(--text-primary);
  border-color: var(--gold-border);
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-family: var(--font-display);
}

.form-input {
  width: 100%;
  padding: 12px 14px;
  background: rgba(5, 6, 8, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 13px;
  outline: none;
  transition: border-color var(--d-2) var(--ease-out), box-shadow var(--d-2);
}

.form-input:focus {
  border-color: var(--gold-bright);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.25);
}

/* ==========================================================================
   FOOTER (100% FACTORYFLOW BRANDING)
   ========================================================================== */

.main-footer {
  background: rgba(5, 6, 8, 0.98);
  border-top: 1px solid var(--border-subtle);
  padding: 60px 0 30px;
  position: relative;
  z-index: 1;
}

.footer-top-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

@media (max-width: 900px) {
  .footer-top-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .footer-top-grid {
    grid-template-columns: 1fr;
  }
}

.footer-brand-bio {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
  margin-top: 14px;
  max-width: 320px;
}

.footer-col-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.footer-col-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col-links a {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--d-2);
}

.footer-col-links a:hover {
  color: var(--gold-bright);
}

.footer-bottom-bar {
  border-top: 1px solid var(--border-subtle);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 12px;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

/* ==========================================================================
   ANIMATIONS & MOTION
   ========================================================================== */

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
