/* NexusWorks Production-Grade Design System
   Refined 75% curvature (14-16px modern radius), disciplined color harmony, zero rainbow clashing.
*/
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  --primary-navy: #091428;
  --navy-surface: #0e1e38;
  --navy-border: #1e3256;
  --accent-emerald: #10b981;
  --accent-emerald-dark: #059669;
  --accent-blue: #2563eb;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --bg-slate: #f8fafc;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text-main);
  background-color: #f8fafc; /* Professional warm slate base — eliminates flat blinding pure white glare */
  overflow-x: hidden;
}

/* Architectural Subtle Background Layering */
.bg-subtle-mesh {
  background-color: #f8fafc;
  background-image: 
    radial-gradient(at 15% 15%, rgba(16, 185, 129, 0.045) 0px, transparent 50%),
    radial-gradient(at 85% 10%, rgba(37, 99, 235, 0.04) 0px, transparent 50%),
    radial-gradient(at 50% 90%, rgba(15, 23, 42, 0.02) 0px, transparent 60%);
}

.bg-grid-hairline {
  background-size: 40px 40px;
  background-image: 
    linear-gradient(to right, rgba(226, 232, 240, 0.4) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(226, 232, 240, 0.4) 1px, transparent 1px);
}

.font-mono {
  font-family: 'JetBrains Mono', monospace;
}

/* Ambient Radial Lighting */
.ambient-glow-top {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 1200px;
  height: 520px;
  background: radial-gradient(circle at 50% 15%, rgba(37, 99, 235, 0.09) 0%, rgba(16, 185, 129, 0.06) 45%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  filter: blur(55px);
}

.ambient-glow-tool {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.08) 0%, transparent 70%);
  pointer-events: none;
  filter: blur(50px);
}

/* Glassmorphism Header */
.glass-header {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.glass-dropdown {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(24px);
  box-shadow: 0 20px 50px -12px rgba(9, 20, 40, 0.14), 0 0 0 1px rgba(9, 20, 40, 0.05);
}

/* Mega Menu Dropdowns */
.mega-menu {
  visibility: hidden;
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.group:hover .mega-menu,
.mega-menu.active {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Mega-Menu Interactive Tile UX (SS1 Fix) */
.mega-menu-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  cursor: pointer;
  position: relative;
}

.mega-menu-item:hover {
  background: #f8fafc;
  border-color: #e2e8f0;
  transform: translateX(3px);
  box-shadow: 0 4px 12px -2px rgba(15, 23, 42, 0.05);
}

.mega-menu-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.mega-menu-item:hover .mega-menu-icon {
  transform: scale(1.06);
}

.mega-arrow {
  opacity: 0;
  transform: translateX(-4px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.mega-menu-item:hover .mega-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* Subtle Gradient Card Borders */
.card-gradient-border {
  position: relative;
  background: #ffffff;
  border-radius: 1rem; /* 16px */
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-gradient-border::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 1.05rem;
  padding: 1px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.2), rgba(16, 185, 129, 0.25), rgba(226, 232, 240, 0.7));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.card-gradient-border:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 32px -8px rgba(15, 23, 42, 0.08);
}

/* Number Ninjas Style Logo Marquee */
.marquee-container {
  display: flex;
  overflow: hidden;
  user-select: none;
  gap: 1.25rem;
  mask-image: linear-gradient(to right, transparent, black 12%, black 88%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 12%, black 88%, transparent);
}

.marquee-row {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 1.25rem;
  min-width: 100%;
}

.marquee-left {
  animation: scroll-left 32s linear infinite;
}

.marquee-right {
  animation: scroll-right 36s linear infinite;
}

.marquee-container:hover .marquee-left,
.marquee-container:hover .marquee-right {
  animation-play-state: paused;
}

@keyframes scroll-left {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-100% - 1.25rem)); }
}

@keyframes scroll-right {
  from { transform: translateX(calc(-100% - 1.25rem)); }
  to { transform: translateX(0); }
}

.logo-badge {
  filter: grayscale(100%);
  opacity: 0.65;
  transition: all 0.25s ease;
}

.logo-badge:hover {
  filter: grayscale(0%);
  opacity: 1;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -5px rgba(37, 99, 235, 0.12);
}

/* Tool Tab Styling */
.tool-tab-btn {
  transition: all 0.2s ease;
}

.tool-tab-btn.active {
  background: #ffffff;
  color: #091428;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

/* Custom Range Input */
input[type=range] {
  accent-color: #10b981;
}

/* Radial Progress Animation */
.score-circle-bg {
  stroke: #e2e8f0;
}

.score-circle-val {
  stroke-dasharray: 502.65;
  stroke-dashoffset: 502.65;
  transition: stroke-dashoffset 1s ease-out, stroke 0.3s ease;
}

/* Slide-over Drawer */
.drawer-backdrop {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.drawer-panel {
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.drawer-backdrop.open .drawer-panel {
  transform: translateX(0);
}

/* Gradient Accents */
.hero-gradient-text {
  background: linear-gradient(135deg, #091428 20%, #1e3a8a 65%, #059669 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Dual Card Design Treatments (16px radius) */
.dual-card-gradient-us {
  background: linear-gradient(180deg, #f8faff 0%, #ffffff 100%);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.dual-card-gradient-pk {
  background: linear-gradient(180deg, #f2fbf7 0%, #ffffff 100%);
  border: 1px solid rgba(16, 185, 129, 0.22);
}

/* Elevated Hover Cards */
.hover-lift {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease;
}

.hover-lift:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 30px -8px rgba(15, 23, 42, 0.08);
}

/* Pulsing Status Ping */
.status-ping {
  position: relative;
  display: inline-flex;
}

.status-ping::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  background-color: currentColor;
  opacity: 0.6;
  animation: ping 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ping {
  75%, 100% {
    transform: scale(2);
    opacity: 0;
  }
}

/* Floating WhatsApp / Quick Contact Widget */
.floating-contact-pill {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 45;
  box-shadow: 0 12px 28px -5px rgba(16, 185, 129, 0.35);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.floating-contact-pill:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 16px 32px -5px rgba(16, 185, 129, 0.45);
}

/* Disciplined Corporate Accent CPA Cards (SS3: Not rainbow, but subtle, rich color accents) */
.cpa-card-pro {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.cpa-card-pro:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 30px -8px rgba(15, 23, 42, 0.08);
}

.cpa-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.cpa-card-pro:hover .cpa-icon-box {
  transform: scale(1.06);
}

/* Specific Accent Tones (Emerald, Blue, Indigo, Teal, Sky) */
.cpa-card-emerald:hover { border-color: #10b981; }
.cpa-icon-emerald { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.cpa-card-emerald:hover .cpa-icon-emerald { background: #059669; color: #ffffff; border-color: #059669; box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25); }

.cpa-card-blue:hover { border-color: #3b82f6; }
.cpa-icon-blue { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.cpa-card-blue:hover .cpa-icon-blue { background: #2563eb; color: #ffffff; border-color: #2563eb; box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25); }

.cpa-card-indigo:hover { border-color: #6366f1; }
.cpa-icon-indigo { background: #eef2ff; color: #4338ca; border: 1px solid #c7d2fe; }
.cpa-card-indigo:hover .cpa-icon-indigo { background: #4f46e5; color: #ffffff; border-color: #4f46e5; box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25); }

.cpa-card-teal:hover { border-color: #14b8a6; }
.cpa-icon-teal { background: #f0fdfa; color: #0f766e; border: 1px solid #99f6e4; }
.cpa-card-teal:hover .cpa-icon-teal { background: #0d9488; color: #ffffff; border-color: #0d9488; box-shadow: 0 4px 12px rgba(13, 148, 136, 0.25); }

.cpa-card-sky:hover { border-color: #0284c7; }
.cpa-icon-sky { background: #f0f9ff; color: #0369a1; border: 1px solid #bae6fd; }
.cpa-card-sky:hover .cpa-icon-sky { background: #0284c7; color: #ffffff; border-color: #0284c7; box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25); }
