/* ==========================================================================
   TrustIQ Labs - Design System & Brand Palette (#803D63 Signature Brand)
   ========================================================================== */

:root {
  /* ==========================================
     LIGHT THEME (Default - #803D63 Plum Brand)
     ========================================== */
  --bg-base: #fdfbfd;
  --bg-surface: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.9);
  --bg-card-hover: #ffffff;
  --bg-card-subtle: #fbf5fa;
  --bg-glass-border: rgba(128, 61, 99, 0.12);
  --bg-glass-border-hover: rgba(128, 61, 99, 0.38);
  --bg-nav: rgba(253, 251, 253, 0.92);
  --bg-nav-scrolled: rgba(255, 255, 255, 0.98);

  /* Primary Brand Color: #803D63 (Hex requested by client) */
  --primary-plum: #803D63;
  --primary-plum-dark: #632c4b;
  --primary-plum-light: #9c4d7b;
  --primary-rose: #ad578b;
  --primary-magenta: #c765a0;
  --primary-gold: #d97706;
  --primary-emerald: #059669;
  --primary-cyan: #803D63;
  
  --gradient-primary: linear-gradient(135deg, #803D63 0%, #a24b7e 60%, #c765a0 100%);
  --gradient-accent: linear-gradient(135deg, #632c4b 0%, #803D63 100%);
  --gradient-subtle: linear-gradient(135deg, rgba(128, 61, 99, 0.06) 0%, rgba(199, 101, 160, 0.03) 100%);
  --gradient-glow: linear-gradient(180deg, rgba(128, 61, 99, 0.08) 0%, rgba(199, 101, 160, 0) 100%);

  /* Typography Colors */
  --text-white: #240e1d;
  --text-light: #3d1b32;
  --text-muted: #64495c;
  --text-dim: #8c7384;
  --text-inverse: #ffffff;

  /* Typography Fonts */
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Elevation / Glass Shadows */
  --shadow-sm: 0 2px 8px rgba(128, 61, 99, 0.05);
  --shadow-md: 0 10px 30px rgba(128, 61, 99, 0.07), 0 2px 6px rgba(128, 61, 99, 0.04);
  --shadow-lg: 0 20px 45px rgba(128, 61, 99, 0.12), 0 4px 12px rgba(128, 61, 99, 0.06);
  --shadow-glow: 0 0 35px rgba(128, 61, 99, 0.18);

  /* Transitions */
  --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 200ms;
  --duration-normal: 350ms;
  --duration-slow: 600ms;

  /* Layout */
  --max-width: 1240px;
  --header-height: 80px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-pill: 9999px;
}

/* ==========================================
   DARK THEME (Deep Midnight Plum & Neon Glow)
   ========================================== */
[data-theme="dark"] {
  --bg-base: #0f060e;
  --bg-surface: #170a16;
  --bg-card: rgba(26, 12, 24, 0.82);
  --bg-card-hover: rgba(38, 18, 36, 0.92);
  --bg-card-subtle: rgba(255, 255, 255, 0.04);
  --bg-glass-border: rgba(199, 101, 160, 0.18);
  --bg-glass-border-hover: rgba(199, 101, 160, 0.45);
  --bg-nav: rgba(15, 6, 14, 0.88);
  --bg-nav-scrolled: rgba(15, 6, 14, 0.98);

  --primary-plum: #c765a0;
  --primary-plum-dark: #803D63;
  --primary-plum-light: #e082b9;
  --primary-rose: #d66ba8;
  --primary-magenta: #e082b9;
  --primary-cyan: #e082b9;

  --text-white: #ffffff;
  --text-light: #faedf7;
  --text-muted: #c9b3c4;
  --text-dim: #947a8f;
  --text-inverse: #170a16;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 0 40px rgba(199, 101, 160, 0.3);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
  background-color: var(--bg-base);
  color: var(--text-light);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--duration-normal) ease, color var(--duration-normal) ease;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  background-color: var(--bg-base);
  color: var(--text-light);
}

::selection {
  background: rgba(128, 61, 99, 0.25);
  color: var(--primary-plum);
}

/* Neural Network Background Canvas */
.neural-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
}

[data-theme="dark"] .neural-canvas {
  opacity: 0.65;
}

/* Ambient Glowing Background Orbs */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
  transition: transform 8s ease-in-out;
}

.orb-1 {
  top: -10%;
  left: -5%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(128, 61, 99, 0.22) 0%, rgba(128, 61, 99, 0) 70%);
  animation: floatOrb1 18s ease-in-out infinite alternate;
}

.orb-2 {
  top: 35%;
  right: -10%;
  width: 650px;
  height: 650px;
  background: radial-gradient(circle, rgba(173, 87, 139, 0.18) 0%, rgba(173, 87, 139, 0) 70%);
  animation: floatOrb2 22s ease-in-out infinite alternate;
}

.orb-3 {
  bottom: -15%;
  left: 20%;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(199, 101, 160, 0.15) 0%, rgba(199, 101, 160, 0) 70%);
  animation: floatOrb3 20s ease-in-out infinite alternate;
}

@keyframes floatOrb1 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(80px, 120px) scale(1.15); }
}

@keyframes floatOrb2 {
  0% { transform: translate(0, 0) scale(1.1); }
  100% { transform: translate(-100px, -80px) scale(0.95); }
}

@keyframes floatOrb3 {
  0% { transform: translate(0, 0) scale(0.9); }
  100% { transform: translate(60px, -60px) scale(1.2); }
}

/* Container */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
  position: relative;
  z-index: 1;
}

/* Typography Helpers */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--text-white);
  font-weight: 700;
  line-height: 1.2;
}

.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

.text-cyan { color: var(--primary-plum) !important; }
.text-indigo { color: var(--primary-rose) !important; }
.text-emerald { color: var(--primary-emerald) !important; }
.text-gold { color: var(--primary-gold) !important; }
.text-red { color: #e11d48 !important; }
.text-center { text-align: center; }
.mono { font-family: var(--font-mono); }

/* Section Header Shared Styles */
.section-intro {
  margin-bottom: 56px;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(128, 61, 99, 0.08);
  border: 1px solid rgba(128, 61, 99, 0.22);
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-plum);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 18px;
  box-shadow: 0 2px 10px rgba(128, 61, 99, 0.06);
}

[data-theme="dark"] .badge-pill {
  background: rgba(199, 101, 160, 0.12);
  border-color: rgba(199, 101, 160, 0.3);
  color: var(--primary-rose);
  box-shadow: 0 0 15px rgba(199, 101, 160, 0.15);
}

.badge-dot {
  width: 7px;
  height: 7px;
  background: var(--primary-rose);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--primary-rose);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.6; }
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  color: var(--text-white);
}

.section-subtitle {
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  color: var(--text-muted);
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.65;
}

/* Breadcrumb Navigation */
.breadcrumbs-nav {
  padding-top: 24px;
  padding-bottom: 8px;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.breadcrumbs-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
}

.breadcrumbs-list li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumbs-list a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--duration-fast) ease;
}

.breadcrumbs-list a:hover {
  color: var(--primary-plum);
}

.breadcrumbs-separator {
  color: var(--text-dim);
}

.breadcrumbs-current {
  color: var(--primary-plum);
  font-weight: 600;
}

/* Glassmorphism Card Utility */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: transform var(--duration-normal) var(--ease-smooth),
              border-color var(--duration-normal) var(--ease-smooth),
              box-shadow var(--duration-normal) var(--ease-smooth),
              background var(--duration-normal) ease;
}

.glass-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--bg-glass-border-hover);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

/* Sections Common Spacing */
section {
  padding-top: 90px;
  padding-bottom: 90px;
  position: relative;
  z-index: 1;
}

/* Header & Nav */
.header-nav {
  height: var(--header-height);
  background: var(--bg-nav);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--bg-glass-border);
  display: flex;
  align-items: center;
  transition: all var(--duration-normal) ease;
}

.header-nav.scrolled {
  background: var(--bg-nav-scrolled);
  border-bottom-color: var(--bg-glass-border-hover);
  box-shadow: var(--shadow-md);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-white);
}

.logo-icon-wrapper {
  position: relative;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(128, 61, 99, 0.25));
}

.logo-pulse {
  position: absolute;
  inset: -3px;
  border-radius: 12px;
  background: var(--gradient-primary);
  z-index: -1;
  opacity: 0.25;
  filter: blur(6px);
  animation: pulseGlow 3s ease-in-out infinite alternate;
}

@keyframes pulseGlow {
  0% { transform: scale(0.95); opacity: 0.2; }
  100% { transform: scale(1.1); opacity: 0.45; }
}

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

.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: 0.02em;
  color: var(--primary-plum);
}

[data-theme="dark"] .brand-name {
  color: #ffffff;
}

.brand-highlight {
  color: var(--primary-rose);
}

.brand-tag {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--text-dim);
  text-transform: uppercase;
}

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

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  position: relative;
  transition: color var(--duration-fast) ease;
  padding: 6px 0;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary-plum);
}

[data-theme="dark"] .nav-link:hover,
[data-theme="dark"] .nav-link.active {
  color: var(--primary-rose);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: 2px;
  transition: width var(--duration-normal) var(--ease-smooth);
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

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

/* Theme Switcher Button */
.theme-toggle-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--bg-glass-border);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all var(--duration-fast) ease;
}

.theme-toggle-btn:hover {
  color: var(--primary-plum);
  border-color: var(--bg-glass-border-hover);
  transform: translateY(-1px);
}

.theme-toggle-btn svg {
  width: 18px;
  height: 18px;
}

.theme-toggle-btn .sun-icon {
  display: none;
}
.theme-toggle-btn .moon-icon {
  display: block;
}

[data-theme="dark"] .theme-toggle-btn .sun-icon {
  display: block;
}
[data-theme="dark"] .theme-toggle-btn .moon-icon {
  display: none;
}

.mobile-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  background: var(--bg-card);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 8px;
}

.hamburger-line {
  width: 100%;
  height: 2px;
  background-color: var(--text-white);
  border-radius: 2px;
  transition: transform var(--duration-normal) ease, opacity var(--duration-normal) ease;
}

.mobile-toggle.active .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.mobile-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
}
.mobile-toggle.active .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Drawer */
.mobile-drawer {
  position: fixed;
  top: var(--header-height);
  left: 0;
  width: 100%;
  height: calc(100vh - var(--header-height));
  background: var(--bg-base);
  backdrop-filter: blur(25px);
  border-bottom: 1px solid var(--bg-glass-border);
  transform: translateY(-100%);
  opacity: 0;
  visibility: hidden;
  transition: transform var(--duration-normal) var(--ease-smooth),
              opacity var(--duration-normal) var(--ease-smooth),
              visibility var(--duration-normal);
  z-index: 40;
  overflow-y: auto;
}

.mobile-drawer.open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.drawer-inner {
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100%;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mobile-nav-link {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-light);
  text-decoration: none;
  padding: 8px 0;
  border-bottom: 1px solid var(--bg-glass-border);
  transition: color var(--duration-fast) ease, padding-left var(--duration-fast) ease;
}

.mobile-nav-link:hover {
  color: var(--primary-plum);
  padding-left: 8px;
}

.mobile-drawer-footer {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--bg-glass-border);
}

.drawer-contact-link {
  display: flex;
  align-items: center;
  color: var(--primary-plum);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
}
