/**
 * ==============================================================================
 * MYSTERIOUSPRO GLOBAL DESIGN SYSTEM — CORE ARCHITECTURE
 * Unified Enterprise Design Language for MysteriousPro & Rizvis Global
 * 
 * Target: Dark Premium Engineering & Enterprise Technology
 * Primary Accent: Signature Red (#D92832) / Technical Blue (#2E6BFF)
 * ==============================================================================
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Manrope:wght@500;600;700;800;900&display=swap');

:root {
  /* Surface & Canvas Hierarchy */
  --bg-base: #050B14;
  --bg-deep: #07111F;
  --bg-surface: #0A1625;
  --bg-panel: #0B1728;
  --bg-panel-elevated: #0E1D31;
  --bg-glass: rgba(11, 23, 40, 0.85);

  /* Typography Colors */
  --text-main: #F5F8FC;
  --text-muted: #93A4B8;
  --text-subtle: #5B6D82;

  /* Accent Palette */
  --accent-red: #D92832;
  --accent-red-hover: #FF4B52;
  --accent-red-glow: rgba(217, 40, 50, 0.28);
  --accent-blue: #2E6BFF;
  --accent-blue-hover: #4D82FF;
  --accent-gold: #D4AF37;

  /* Status Colors */
  --status-success: #16A34A;
  --status-warning: #D97706;
  --status-danger: #DC2626;
  --status-info: #2563EB;

  /* Borders & Dividers */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.14);
  --border-focus: rgba(217, 40, 50, 0.50);

  /* Typography Configuration */
  --font-family-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-family-heading: 'Manrope', 'Inter', sans-serif;

  /* Spacing Scale (8pt System) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;
  --space-30: 120px;

  /* Elevation & Radius */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  --shadow-panel: 0 10px 30px -10px rgba(0, 0, 0, 0.6);
  --shadow-hover: 0 20px 40px -12px rgba(0, 0, 0, 0.8), 0 0 24px var(--accent-red-glow);

  /* Layout Widths */
  --container-max: 1280px;
}

/* Base Document Reset */
html {
  scroll-behavior: smooth;
  box-sizing: border-box;
}

*, *::before, *::after {
  box-sizing: inherit;
}

body {
  background-color: var(--bg-base) !important;
  color: var(--text-main) !important;
  font-family: var(--font-family-primary);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-heading);
  color: var(--text-main);
  margin: 0 0 var(--space-4);
  letter-spacing: -0.02em;
  font-weight: 800;
}

p {
  color: var(--text-muted);
  margin: 0 0 var(--space-4);
  font-size: 15px;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Global Container */
.container, .mp-container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-12);
  padding-right: var(--space-12);
  box-sizing: border-box;
}

@media (max-width: 1024px) {
  .container, .mp-container {
    padding-left: var(--space-8);
    padding-right: var(--space-8);
  }
}

@media (max-width: 640px) {
  .container, .mp-container {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }
}

/* Standardized Button System */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 12px 26px;
  font-family: var(--font-family-primary);
  font-size: 13.5px;
  font-weight: 700;
  border-radius: var(--radius-full);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--accent-red) !important;
  color: #FFFFFF !important;
  box-shadow: 0 4px 16px var(--accent-red-glow) !important;
  border: 1px solid transparent !important;
}
.btn-primary:hover {
  background-color: var(--accent-red-hover) !important;
  box-shadow: 0 6px 24px rgba(255, 75, 82, 0.45) !important;
  transform: translateY(-2px);
  color: #FFFFFF !important;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.04) !important;
  color: var(--text-main) !important;
  border: 1px solid var(--border-medium) !important;
}
.btn-secondary:hover {
  border-color: var(--text-main) !important;
  background: rgba(255, 255, 255, 0.09) !important;
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent !important;
  color: var(--text-muted) !important;
  padding-left: 0;
  padding-right: 0;
  border: none !important;
}
.btn-ghost:hover {
  color: var(--accent-red) !important;
}

/* Standardized Card Primitives */
.card, .product-card, .service-card, .software-card, .project-card, .pricing-card, .network-card {
  background-color: var(--bg-panel) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: var(--radius-lg) !important;
  padding: var(--space-8);
  box-shadow: var(--shadow-panel) !important;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.card:hover, .product-card:hover, .service-card:hover, .software-card:hover, .project-card:hover, .pricing-card:hover, .network-card:hover {
  border-color: var(--border-medium) !important;
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover) !important;
}

/* Section Shell System */
.section {
  padding-top: var(--space-20);
  padding-bottom: var(--space-20);
  border-bottom: 1px solid var(--border-subtle);
  background-color: var(--bg-base);
}

.section-alt {
  background-color: var(--bg-deep) !important;
}

.section-surface {
  background-color: var(--bg-surface) !important;
}

/* Global Header Component */
.mp-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  transition: all 0.3s ease;
}

.mp-header-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-8);
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
}

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

.mp-brand-logo {
  height: 38px;
  width: auto;
  object-fit: contain;
}

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

.mp-brand-title {
  font-family: var(--font-family-heading);
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.1;
}

.mp-brand-sub {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--accent-red);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.mp-nav-menu {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  list-style: none;
  margin: 0;
  padding: 0;
}

.mp-nav-link {
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
  position: relative;
  padding: 6px 0;
}

.mp-nav-link:hover, .mp-nav-link.active {
  color: var(--text-main);
}

.mp-nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent-red);
}

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

/* Global Footer Component */
.mp-footer {
  background-color: #03070E;
  border-top: 1px solid var(--border-subtle);
  padding: var(--space-20) 0 var(--space-8) 0;
  color: var(--text-muted);
}

.mp-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1.5fr;
  gap: var(--space-8);
  margin-bottom: var(--space-16);
}

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

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

.mp-footer-col h4 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-main);
  margin-bottom: var(--space-4);
}

.mp-footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mp-footer-links a {
  color: var(--text-muted);
  font-size: 13.5px;
  text-decoration: none;
  transition: color 0.2s ease;
}

.mp-footer-links a:hover {
  color: var(--accent-red);
}

.mp-footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--space-6);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  font-size: 12.5px;
  color: var(--text-subtle);
}

/* Badge System */
.mp-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(217, 40, 50, 0.1);
  border: 1px solid rgba(217, 40, 50, 0.3);
  color: var(--accent-red-hover);
}

/* Compatibility & Inconsistency Elimination */
/* Ensure no white cards, light mode leaks, or clashing bright colors survive */
.emrill-cap-card,
.emrill-cap-card[data-category],
.service-feature-card,
.project-card-item,
.it-feat-card {
  background-color: var(--bg-panel) !important;
  border: 1px solid var(--border-subtle) !important;
  color: var(--text-main) !important;
}

.emrill-section-light,
.bg-light,
.section-light,
.light-mode-surface {
  background-color: var(--bg-deep) !important;
  color: var(--text-main) !important;
}

.emrill-cap-title,
.emrill-section-title,
.it-feat-title,
.it-hero-title {
  color: var(--text-main) !important;
}

.emrill-cap-desc,
.emrill-section-subtitle,
.it-feat-desc,
.it-hero-sub {
  color: var(--text-muted) !important;
}

.emrill-cap-icon-box {
  background: rgba(217, 40, 50, 0.1) !important;
  color: var(--accent-red) !important;
  border: 1px solid rgba(217, 40, 50, 0.25) !important;
  border-radius: 12px;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
}

/* Replace any remaining QuickBooks Green with MysteriousPro Red */
.btn-qbo, .qbo-button {
  background-color: var(--accent-red) !important;
  border-color: var(--accent-red) !important;
}

/* Responsive Utilities */
@media (max-width: 900px) {
  .mp-nav-menu {
    display: none;
  }
}
