/*
Theme Name: Core Intel
Theme URI: https://coreintel.com
Author: Core Intel Team
Author URI: https://coreintel.com
Description: A custom theme for Core Intel - Operational Intelligence Platform.
Version: 1.0
License: UNLICENSED
*/

/* Core Intel - Main Stylesheet */
:root {
  /* Color Palette - Updated from Reference */
  --color-primary-blue: #3b82f6;
  --color-primary-cyan: #06b6d4;
  --color-action-orange: #f97316;
  --color-accent-lime: #84cc16;
  --color-accent-yellow: #eab308;

  --color-dark-purple: #0f172a;
  /* Slate 900 */
  --color-black: #0f172a;
  --color-white: #ffffff;
  --color-off-white: #f8fafc;
  /* Slate 50 */
  --color-gray-light: #e2e8f0;
  /* Slate 200 */
  --color-text-secondary: #475569;
  /* Slate 600 */

  /* Gradients */
  --gradient-hero: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  --gradient-accent: linear-gradient(to right, var(--color-primary-cyan), var(--color-primary-blue), var(--color-action-orange));
  --gradient-glow-blue: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
  --gradient-glow-cyan: radial-gradient(circle, rgba(6, 182, 212, 0.15) 0%, transparent 70%);

  /* Typography */
  --font-primary: 'Inter', sans-serif;
  --font-heading: 'Rajdhani', sans-serif;

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 8rem;

  /* Spacing Utilities */
  .mb-sm {
    margin-bottom: var(--spacing-sm);
  }

  .mb-md {
    margin-bottom: var(--spacing-md);
  }

  .mb-lg {
    margin-bottom: var(--spacing-lg);
  }

  .mt-sm {
    margin-top: var(--spacing-sm);
  }

  .mt-md {
    margin-top: var(--spacing-md);
  }

  .mt-lg {
    margin-top: var(--spacing-lg);
  }

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1),
  0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1),
  0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-glow: 0 0 20px rgba(6, 182, 212, 0.3);
}

/* Animations */
@keyframes spin-slow {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-20px);
  }
}

@keyframes pulse-glow {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.7;
  }
}

.animate-spin-slow {
  animation: spin-slow 20s linear infinite;
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

.animate-pulse {
  animation: pulse-glow 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Reset & Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-primary);
  background-color: var(--color-off-white);
  color: var(--color-black);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Material Icons Support */
.material-symbols-outlined {
  font-variation-settings:
    'FILL' 0,
    'wght' 400,
    'GRAD' 0,
    'opsz' 24;
  vertical-align: middle;
}

/* Typography Utility */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.1;
  color: var(--color-black);
  margin-bottom: var(--spacing-sm);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* Hide Mobile CTA on Desktop */
.mobile-sticky-cta {
  display: none;
}

h1 {
  font-size: 3.5rem;
}

h2 {
  font-size: 2.5rem;
}

h3 {
  font-size: 1.5rem;
}

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

.text-balance {
  text-wrap: balance;
}

.text-center {
  text-align: center;
}

.text-white {
  color: var(--color-white);
}

.text-secondary {
  color: var(--color-text-secondary);
}

/* Layout Utility */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
  position: relative;
}

.section {
  padding: var(--spacing-xl) 0;
  position: relative;
}

.grid {
  display: grid;
  gap: var(--spacing-md);
}

.grid-2 {
  grid-template-columns: 1fr 1fr;
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.flex {
  display: flex;
  gap: var(--spacing-md);
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-center {
  justify-content: center;
}

.flex-col {
  flex-direction: column;
}

.items-start {
  align-items: flex-start;
}

/* Components */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  font-family: var(--font-primary);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-primary {
  background-color: var(--color-primary-blue);
  color: var(--color-white);
}

.btn-action {
  background: var(--gradient-accent);
  color: var(--color-white);
}

.btn-outline {
  border: 1px solid var(--color-gray-light);
  color: var(--color-black);
  background: transparent;
}

.btn-outline:hover {
  background-color: var(--color-off-white);
  border-color: var(--color-primary-blue);
  color: var(--color-primary-blue);
}

.card {
  background: var(--color-white);
  border-radius: 1rem;
  padding: var(--spacing-md);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  border: 1px solid var(--color-gray-light);
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary-blue);
}

.icon {
  font-size: 2rem;
  margin-bottom: var(--spacing-sm);
  color: var(--color-primary-cyan);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  background-color: rgba(59, 130, 246, 0.1);
  color: var(--color-primary-blue);
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: var(--spacing-sm);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

/* Glassmorphism */
.glass-effect {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Specific Section Styles */

/* Specific Section Styles */

.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-gray-light);
  padding: 1rem 0;
  transition: all 0.3s ease;
}

.mobile-menu-btn {
  display: none;
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: white;
  z-index: 1000;
  flex-direction: column;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Add padding to body to account for fixed navbar */
body {
  padding-top: 100px;
}

.hero {
  min-height: 80vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background-color: var(--color-white);
  padding-top: var(--spacing-md);
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .hero {
    min-height: auto;
    padding: var(--spacing-lg) 0;
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  :root {
    --spacing-xl: 4rem;
    --spacing-lg: 3rem;
    --spacing-md: 1.5rem;
  }

  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 2rem;
  }

  .navbar {
    padding: 0.75rem 0;
  }

  .navbar .container {
    padding: 0 1rem;
  }

  body {
    padding-top: 80px;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .hero .grid-2 {
    display: flex;
    flex-direction: column-reverse;
    /* Stack image on top or bottom as preferred, usually content first on mobile */
    gap: var(--spacing-lg);
  }

  .hero-content {
    text-align: center;
  }

  .hero-content .flex {
    justify-content: center;
    flex-direction: column;
    width: 100%;
  }

  .hero-content .btn {
    width: 100%;
  }

  .tabs-header {
    flex-direction: column;
    width: 100%;
  }

  .tabs-header .btn {
    width: 100%;
  }

  .footer .grid-4 {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
    text-align: center;
  }

  .footer .flex {
    justify-content: center;
  }
}

/* Background Blurs */
.bg-blur-blue {
  position: absolute;
  width: 600px;
  height: 600px;
  background: var(--gradient-glow-blue);
  border-radius: 50%;
  filter: blur(80px);
  z-index: 0;
  pointer-events: none;
}

.bg-blur-cyan {
  position: absolute;
  width: 600px;
  height: 600px;
  background: var(--gradient-glow-cyan);
  border-radius: 50%;
  filter: blur(80px);
  z-index: 0;
  pointer-events: none;
}

.hero-visual {
  position: relative;
  z-index: 1;
  width: 100%;
}

/* Footer */
.footer {
  background-color: var(--color-dark-purple);
  color: var(--color-gray-light);
  padding: var(--spacing-lg) 0;
}

.footer h4 {
  color: var(--color-white);
  margin-bottom: 1.5rem;
}

.footer a {
  color: var(--color-gray-light) !important;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer a:hover {
  color: var(--color-primary-blue);
}

/* AI Services Page Specifics */
.hero-ai {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: var(--color-white);
  padding-top: var(--spacing-xl);
}

.hero-ai h1 {
  color: var(--color-white);
}

.hero-ai p {
  color: var(--color-gray-light);
}

.timeline-item {
  border-left: 2px solid var(--color-gray-light);
  padding-left: 2rem;
  padding-bottom: 2rem;
  position: relative;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -9px;
  top: 0;
  width: 16px;
  height: 16px;
  background: var(--color-primary-blue);
  border-radius: 50%;
  border: 2px solid var(--color-white);
}

/* =========================================
   Page Specific: Payroll Module
   ========================================= */
.hero-payroll {
  background-color: var(--color-off-white);
  overflow: hidden;
  position: relative;
}

.hero-payroll::before {
  content: '';
  position: absolute;
  top: -10%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: var(--gradient-glow-blue);
  border-radius: 50%;
  filter: blur(80px);
  z-index: 0;
  pointer-events: none;
}

.hero-payroll::after {
  content: '';
  position: absolute;
  bottom: -10%;
  left: -10%;
  width: 600px;
  height: 600px;
  background: var(--gradient-glow-cyan);
  border-radius: 50%;
  filter: blur(80px);
  z-index: 0;
  pointer-events: none;
}

.feature-icon-wrapper {
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  transition: transform 0.3s ease;
}

.card:hover .feature-icon-wrapper {
  transform: scale(1.1);
}

.bg-blue-light {
  background-color: rgba(59, 130, 246, 0.1);
  color: var(--color-primary-blue);
}

.bg-cyan-light {
  background-color: rgba(6, 182, 212, 0.1);
  color: var(--color-primary-cyan);
}

.bg-orange-light {
  background-color: rgba(249, 115, 22, 0.1);
  color: var(--color-action-orange);
}

.bg-lime-light {
  background-color: rgba(132, 204, 22, 0.1);
  color: var(--color-accent-lime);
}

.integration-card {
  background: var(--color-white);
  border: 1px solid var(--color-gray-light);
  border-radius: 0.75rem;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.integration-status {
  font-size: 0.75rem;
  font-weight: 700;
  color: #22c55e;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.stat-box {
  background: var(--color-off-white);
  padding: 1rem;
  border-radius: 0.5rem;
  border: 1px solid var(--color-gray-light);
}

/* =========================================
   Page Specific: Agriculture Industry
   ========================================= */
.hero-agri {
  background-color: var(--color-black);
  color: white;
  overflow: hidden;
  position: relative;
}

.hero-agri::before {
  content: '';
  position: absolute;
  top: -20%;
  right: 0;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(132, 204, 22, 0.2) 0%, rgba(0, 0, 0, 0) 70%);
  border-radius: 50%;
  filter: blur(60px);
  z-index: 0;
  pointer-events: none;
}

.agri-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.agri-card:hover {
  border-color: var(--color-accent-lime);
  transform: translateY(-5px);
}

.stat-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 8px solid var(--color-accent-lime);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Rajdhani', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-accent-lime);
  position: relative;
}

.stat-circle::after {
  content: '';
  position: absolute;
  top: -8px;
  left: -8px;
  right: -8px;
  bottom: -8px;
  border-radius: 50%;
  border: 1px solid rgba(132, 204, 22, 0.3);
  animation: pulse-glow 2s infinite;
}

.problem-item {
  display: flex;
  align-items: start;
  gap: 1rem;
  margin-bottom: 2rem;
}

.problem-icon {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  padding: 0.5rem;
  border-radius: 0.5rem;
}

/* =========================================
   Page Specific: Blog
   ========================================= */
.blog-hero {
  padding: 8rem 0 4rem;
  background: linear-gradient(135deg, var(--color-off-white) 0%, white 100%);
}

.featured-post {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 2rem;
  margin-bottom: 4rem;
  border-radius: 1rem;
  overflow: hidden;
  background: white;
  box-shadow: var(--shadow-lg);
  transition: transform 0.3s ease;
}

.featured-post:hover {
  transform: translateY(-5px);
}

.featured-image {
  height: 100%;
  min-height: 400px;
  background-size: cover;
  background-position: center;
}

.featured-content {
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.post-card {
  background: white;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.post-image {
  height: 200px;
  background-size: cover;
  background-position: center;
}

.post-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-meta {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tag {
  padding: 0.2rem 0.6rem;
  border-radius: 2rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
}

.tag-ai {
  background: rgba(59, 130, 246, 0.1);
  color: var(--color-primary-blue);
}

.tag-ops {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.tag-payroll {
  background: rgba(249, 115, 22, 0.1);
  color: var(--color-action-orange);
}

@media (max-width: 768px) {
  .featured-post {
    grid-template-columns: 1fr;
  }

  .featured-image {
    min-height: 250px;
  }



  /* Animation Utilities */
  .fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
  }

  .delay-100 {
    animation-delay: 0.1s;
  }

  .delay-200 {
    animation-delay: 0.2s;
  }

  .delay-300 {
    animation-delay: 0.3s;
  }

  @keyframes fadeInUp {
    from {
      opacity: 0;
      transform: translateY(20px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }


  /* Blog Post Specifics */
  .post-header {
    padding: 8rem 0 4rem;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
  }

  .post-cover {
    height: 500px;
    width: 100%;
    object-fit: cover;
    border-radius: 1rem;
    margin-bottom: 4rem;
  }

  .article-content {
    max-width: 720px;
    margin: 0 auto;
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--color-text-primary);
  }

  .article-content h2 {
    font-size: 2rem;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
  }

  .article-content h3 {
    font-size: 1.5rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
  }

  .article-content p {
    margin-bottom: 1.5rem;
  }

  .article-content ul,
  .article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
  }

  .article-content li {
    margin-bottom: 0.5rem;
    list-style-type: disc;
  }

  .article-content blockquote {
    border-left: 4px solid var(--color-primary-blue);
    padding-left: 1.5rem;
    font-style: italic;
    font-size: 1.25rem;
    color: var(--color-text-secondary);
    margin: 2rem 0;
  }

  .author-bio {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-gray-light);
    display: flex;
    align-items: center;
    gap: 1.5rem;
  }

  .author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #ccc;
    background-size: cover;
  }


  /* =========================================
   Mobile Navigation
   ========================================= */
  .mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
  }

  .mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: white;
    z-index: 1000;
    display: none;
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  .mobile-menu.active {
    display: flex;
    opacity: 1;
  }

  .mobile-menu-header {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--color-gray-light);
  }

  .mobile-menu-content {
    padding: 2rem;
    overflow-y: auto;
  }

  .mobile-nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    font-size: 1.5rem;
    text-align: center;
  }

  .mobile-nav-links a {
    color: var(--color-text-primary);
    font-weight: 600;
    text-decoration: none;
  }

  .mobile-nav-links a {
    color: var(--color-black);
  }

  .mobile-nav-links a:hover {
    color: var(--color-primary-blue);
  }

  /* Footer links color */
  .footer a,
  .footer li,
  .footer p,
  .footer h4 {
    color: var(--color-gray-light) !important;
  }

  .footer h4 {
    color: var(--color-white) !important;
  }

  .footer a:hover {
    color: var(--color-primary-blue) !important;
  }



  .desktop-menu {
    display: none !important;
    /* Hidden on mobile */
  }

  .mobile-menu-btn {
    display: block !important;
  }

  .container.grid-2,
  .container.grid-3,
  .container.grid-4 {
    display: grid !important;
    gap: 1.5rem !important;
    grid-template-columns: 1fr !important;
  }

  .hero h1 {
    font-size: 2.5rem !important;
  }

  .section {
    padding: 4rem 0;
  }

  /* Mobile Sticky CTA */
  /* Mobile Sticky CTA */
  .mobile-sticky-cta {
    display: block !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    background-color: var(--color-white);
    padding: 1rem;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 2147483647 !important;
    /* Maximum z-index */
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
  }

  .mobile-sticky-cta .btn {
    width: 100%;
    justify-content: center;
    font-size: 1.1rem;
    padding: 1rem;
  }

  /* Add padding to footer so it's not covered by sticky CTA */
  .footer {
    padding-bottom: 100px;
  }

  /* Solution Cards Mobile Layout */
  .solution-card {
    min-height: auto !important;
    /* Remove fixed height constraint */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100% !important;
    margin-bottom: 1.5rem;
  }

  .solution-card .btn {
    margin-top: 1.5rem;
    /* Add spacing above button */
    width: 100% !important;
    /* Full width button on mobile */
  }

  /* Adjust specific components for mobile */
  .hero-visual {
    display: none;
    /* Hide complex hero 3D/visuals on mobile to save space */
  }

  .hero-content {
    text-align: center;
  }

  .hero-content .flex {
    justify-content: center;
  }

  /* Tabs on Homepage */
  .tabs-header {
    flex-direction: column;
    gap: 10px;
  }

  .feature-card,
  .service-card,
  .col-visual {
    margin-bottom: 1rem;
  }
}

/* Contrast Fixes */
.bg-blue-dark {
  background-color: var(--color-dark-purple);
  color: var(--color-white);
}

.bg-white {
  background-color: var(--color-white);
}

.text-blue {
  color: var(--color-primary-blue) !important;
}

.font-bold {
  font-weight: 700;
}

.text-green {
  color: var(--color-accent-lime);
}

@media (max-width: 768px) {
  .order-2-mobile {
    order: 2;
  }

  .grid-2 {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* =========================================
   DARK MODE — Automatically activated when
   the OS / browser is set to dark mode.
   ========================================= */
@media (prefers-color-scheme: dark) {

  /* ---- 1. Redesign CSS variables for dark surfaces ---- */
  :root {
    --color-white: #1e293b;
    /* dark card surface  */
    --color-off-white: #0f172a;
    /* dark page bg       */
    --color-black: #f1f5f9;
    /* primary text (light on dark) */
    --color-dark-purple: #0d1628;
    /* even darker for footer */
    --color-gray-light: #334155;
    /* slate-700 borders  */
    --color-text-secondary: #94a3b8;
    /* slate-400           */

    /* Glow gradients stay vivid */
    --gradient-glow-blue: radial-gradient(circle, rgba(59, 130, 246, 0.25) 0%, transparent 70%);
    --gradient-glow-cyan: radial-gradient(circle, rgba(6, 182, 212, 0.25) 0%, transparent 70%);

    /* Shadows need to be darker on dark bg */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.4);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.5), 0 2px 4px -2px rgb(0 0 0 / 0.4);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.6), 0 4px 6px -4px rgb(0 0 0 / 0.5);
  }

  /* ---- 2. Body & document background ---- */
  body {
    background-color: #0f172a;
    color: #f1f5f9;
  }

  /* ---- 3. Headings ---- */
  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    color: #f1f5f9;
  }

  /* ---- 4. Navbar ---- */
  .navbar {
    background: rgba(15, 23, 42, 0.95);
    border-bottom-color: #334155;
  }

  /* Desktop nav links */
  .navbar a,
  .desktop-menu a {
    color: #cbd5e1;
  }

  .navbar a:hover,
  .desktop-menu a:hover {
    color: var(--color-primary-cyan);
  }

  /* ---- 5. Hero section (light bg variant) ---- */
  .hero {
    background-color: #0f172a;
  }

  /* ---- 6. Cards (generic .card) ---- */
  .card {
    background: #1e293b;
    border-color: #334155;
    color: #f1f5f9;
  }

  .card:hover {
    border-color: var(--color-primary-blue);
  }

  /* ---- 7. Glass effect ---- */
  .glass-effect {
    background: rgba(30, 41, 59, 0.7);
    border-color: rgba(255, 255, 255, 0.08);
  }

  /* ---- 8. Buttons ---- */
  .btn-outline {
    border-color: #475569;
    color: #f1f5f9;
  }

  .btn-outline:hover {
    background-color: #1e293b;
    border-color: var(--color-primary-blue);
    color: var(--color-primary-blue);
  }

  /* ---- 9. Badge ---- */
  .badge {
    background-color: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
  }

  /* ---- 10. Stat-box (used in payroll section) ---- */
  .stat-box {
    background: #1e293b;
    border-color: #334155;
    color: #f1f5f9;
  }

  /* ---- 11. Integration card ---- */
  .integration-card {
    background: #1e293b;
    border-color: #334155;
    color: #f1f5f9;
  }

  /* ---- 12. Payroll hero (light variant) ---- */
  .hero-payroll {
    background-color: #0f172a;
  }

  /* ---- 13. Blog elements ---- */
  .blog-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #f1f5f9;
  }

  .featured-post {
    background: #1e293b;
    box-shadow: var(--shadow-lg);
  }

  .post-card {
    background: #1e293b;
    color: #f1f5f9;
  }

  .post-meta {
    color: #94a3b8;
  }

  /* ---- 14. Timeline ---- */
  .timeline-item {
    border-left-color: #475569;
  }

  .timeline-item::before {
    background: var(--color-primary-blue);
    border-color: #1e293b;
  }

  /* ---- 15. Mobile menu ---- */
  .mobile-menu {
    background: #0f172a;
  }

  .mobile-menu-header {
    border-bottom-color: #334155;
  }

  .mobile-nav-links a {
    color: #f1f5f9;
  }

  /* ---- 16. Mobile sticky CTA ---- */
  .mobile-sticky-cta {
    background-color: #1e293b;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
  }

  /* ---- 17. Author bio divider ---- */
  .author-bio {
    border-top-color: #334155;
  }

  /* ---- 18. Bg utility ---- */
  .bg-white {
    background-color: #1e293b !important;
  }

  /* ---- 19. Section backgrounds used inline ---- */
  /* Sections that explicitly set white backgrounds via inline style or class */
  section[style*="background-color: #ffffff"],
  section[style*="background-color:#ffffff"],
  section[style*="background-color: white"],
  .section.bg-white {
    background-color: #1e293b !important;
  }

  /* ---- 20. Feature icon wrapper tints stay vivid ---- */
  .bg-blue-light {
    background-color: rgba(59, 130, 246, 0.2);
  }

  .bg-cyan-light {
    background-color: rgba(6, 182, 212, 0.2);
  }

  .bg-orange-light {
    background-color: rgba(249, 115, 22, 0.2);
  }

  .bg-lime-light {
    background-color: rgba(132, 204, 22, 0.2);
  }

  /* ---- 21. Footer adjustments (dark already, just tweak tones) ---- */
  .footer {
    background-color: #0d1628;
  }

  /* ---- 22. Tag chips in blog ---- */
  .tag-ai {
    background: rgba(59, 130, 246, 0.2);
  }

  .tag-ops {
    background: rgba(16, 185, 129, 0.2);
  }

  .tag-payroll {
    background: rgba(249, 115, 22, 0.2);
  }

  /* ---- 23. Problem icon ---- */
  .problem-icon {
    background: rgba(239, 68, 68, 0.2);
  }

  /* ---- 24. Blue-dark bg utility ---- */
  .bg-blue-dark {
    background-color: #0d1628;
  }

  /* ---- 25. INLINE-STYLE white background override ----
     Cards and divs with hardcoded white/off-white backgrounds via inline
     style attributes — these can't be caught by CSS variable reassignment,
     so we use attribute selectors to force a dark surface + light text.  */

  /* background: white / #fff / #ffffff */
  [style*="background: white"],
  [style*="background:white"],
  [style*="background-color: white"],
  [style*="background-color:white"],
  [style*="background: #fff"],
  [style*="background:#fff"],
  [style*="background: #ffffff"],
  [style*="background:#ffffff"],
  [style*="background: #FFFFFF"],
  [style*="background:#FFFFFF"],
  [style*="background-color: #fff"],
  [style*="background-color:#fff"],
  [style*="background-color: #ffffff"],
  [style*="background-color:#ffffff"] {
    background: #1e293b !important;
    color: #f1f5f9 !important;
    border-color: #334155 !important;
  }

  /* background: var(--color-white) — the variable is already remapped in dark
     mode, but some browsers may have cached the compiled value. This ensures
     any element explicitly referencing the variable also gets the dark surface. */
  [style*="background: var(--color-white)"],
  [style*="background:var(--color-white)"],
  [style*="background-color: var(--color-white)"],
  [style*="background-color:var(--color-white)"] {
    background: #1e293b !important;
    color: #f1f5f9 !important;
    border-color: #334155 !important;
  }

  /* var(--color-off-white) inline usage */
  [style*="background: var(--color-off-white)"],
  [style*="background:var(--color-off-white)"],
  [style*="background-color: var(--color-off-white)"],
  [style*="background-color:var(--color-off-white)"] {
    background: #0f172a !important;
  }

  /* Ensure text children inside forced-dark containers stay readable.
     Sections with an inline bg that is off-white need dark treatment too. */
  section[style*="background: var(--color-off-white)"],
  section[style*="background-color: var(--color-off-white)"] {
    background-color: #0f172a !important;
    color: #f1f5f9 !important;
  }

  /* Pricing cards on front page specifically get white bg via inline style */
  .pricing-card[style*="background: var(--color-white)"],
  .pricing-card[style*="background:var(--color-white)"] {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #f1f5f9 !important;
  }

  /* Text forced to color-text-primary (which becomes light in dark mode) */
  [style*="color: var(--color-text-primary)"] {
    color: #f1f5f9 !important;
  }

  /* Fix any remaining light section backgrounds used via inline style */
  section[style*="background: white"],
  section[style*="background:white"],
  section[style*="background-color: white"],
  section[style*="background-color:white"],
  div[style*="background: white"],
  div[style*="background:white"],
  div[style*="background-color: white"],
  div[style*="background-color:white"] {
    background: #1e293b !important;
    color: #f1f5f9 !important;
  }
}