/* Custom CSS for Lexicon - Executive Purple Theme */

:root {
  --primary-brand: #9D4EDD;
  --secondary-brand: #7B2CBF;
  --dark-bg: #050505;
  --card-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.1);
  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
}

/* Force Dark Mode Appearance */
html.dark body {
  background-color: var(--dark-bg) !important;
  color: var(--text-primary);
}


@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

.cursor {
  display: inline-block;
  width: 3px;
  height: 1em;
  background-color: var(--primary-brand);
  margin-left: 5px;
  vertical-align: bottom;
  animation: blink 1s step-end infinite;
}

/* Light Mode Gradient (Dark Text) */
.hextra-hero-headline h1 {
  background: linear-gradient(110deg,
      #000000 0%,
      #292929 20%,
      var(--primary-brand) 40%,
      var(--secondary-brand) 60%,
      #292929 80%,
      #000000 100%) !important;
  background-size: 300% 100% !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  animation: gradient-shift 6s ease-in-out infinite !important;
  filter: drop-shadow(0 0 15px rgba(157, 78, 221, 0.3));
}

/* Dark Mode Gradient (White Text) */
html.dark .hextra-hero-headline h1 {
  background: linear-gradient(110deg,
      #ffffff 0%,
      #e0e0e0 20%,
      var(--primary-brand) 40%,
      #d0d0d0 50%,
      var(--secondary-brand) 60%,
      #e0e0e0 80%,
      #ffffff 100%) !important;
  background-size: 300% 100% !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  animation: gradient-shift 6s ease-in-out infinite !important;
  filter: drop-shadow(0 0 20px rgba(157, 78, 221, 0.5));
}

@keyframes gradient-shift {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.hextra-hero-subtitle p {
  color: var(--text-secondary) !important;
}

/* Feature Cards - Glassmorphism with Enhanced Hover and Spotlight */
.hextra-feature-card {
  background: var(--card-bg);
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  border: 1px solid var(--glass-border);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s ease;
  position: relative;
  overflow: hidden;
  --mouse-x: 0px;
  --mouse-y: 0px;
}

/* Spotlight Effect */
.hextra-feature-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(600px circle at var(--mouse-x) var(--mouse-y), rgba(157, 78, 221, 0.15), transparent 40%);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
  z-index: 1;
}

.hextra-feature-card:hover::after {
  opacity: 1;
}

/* Spotlight Border Glow */
.hextra-feature-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: inherit;
  padding: 1px;
  /* border width */
  background: radial-gradient(500px circle at var(--mouse-x) var(--mouse-y), rgba(157, 78, 221, 0.6), transparent 40%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
  z-index: 2;
}

.hextra-feature-card:hover::before {
  opacity: 1;
}

/* Shine effect on hover */
.hextra-feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
      transparent,
      rgba(157, 78, 221, 0.15),
      transparent);
  transition: left 0.6s ease;
  z-index: 1;
  pointer-events: none;
}

.hextra-feature-card:hover::before {
  left: 100%;
}

/* Light mode borders */
html:not(.dark) .hextra-feature-card {
  border: 1px solid rgba(157, 78, 221, 0.3) !important;
}

/* Dark mode borders */
html.dark .hextra-feature-card {
  border: 1px solid var(--glass-border) !important;
}

.hextra-feature-card:hover {
  background: radial-gradient(ellipse at 50% 80%, rgba(157, 78, 221, 0.08), hsla(0, 0%, 100%, 0)) !important;
  border-color: var(--primary-brand) !important;
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 12px 40px rgba(157, 78, 221, 0.25);
}

.hextra-feature-card:hover h3,
.hextra-feature-card:hover h3 span {
  color: var(--primary-brand) !important;
  text-shadow: none !important;
}

.hextra-feature-card:hover img {
  transform: scale(1.05);
  transition: all 0.5s ease;
}

.hextra-feature-card img {
  transition: all 0.5s ease;
}

/* Feature Card Icons */
.hextra-feature-card svg {
  margin-right: 0.75rem;
  width: 1.25em;
  height: 1.25em;
  stroke-width: 2.5;
}

/* Feature Card Heading & Arrow */
.hextra-feature-card h3 {
  color: #000000 !important;
  transition: all 0.3s ease;
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
}

/* Animated Arrow */
.hextra-feature-card h3::after {
  content: "→";
  opacity: 0;
  margin-left: 0.5rem;
  transition: all 0.3s ease;
  transform: translateX(-10px);
  color: inherit;
}

.hextra-feature-card:hover h3::after {
  opacity: 1;
  transform: translateX(0);
}

html.dark .hextra-feature-card h3 {
  color: #ffffff !important;
}

.hextra-feature-card p {
  color: var(--text-secondary) !important;
  position: relative;
  z-index: 2;
}

/* Reduce card size and improve grid */
.hextra-feature-grid {
  gap: 1.5rem !important;
  max-width: 1400px;
  margin: 0 auto;
}

.hextra-feature-card {
  min-height: 160px !important;
  /* max-height removed to allow content to grow */
}

/* Mobile - stack vertically */
@media (max-width: 640px) {
  .hextra-feature-card {
    min-height: 200px !important;
  }

  .hextra-feature-grid {
    gap: 1rem !important;
  }
}

/* Tablet - 2 columns */
@media (min-width: 641px) and (max-width: 1024px) {
  .hextra-feature-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* Desktop - 3 columns */
@media (min-width: 1025px) {
  .hextra-feature-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

/* Icons (if used) */
.hextra-feature-card svg {
  color: var(--text-secondary);
  transition: all 0.3s ease;
  position: relative;
  z-index: 2;
}

/* Navigation Menu - Fix glow issue */
nav a,
.nav-container a,
header a {
  color: var(--text-secondary) !important;
  transition: all 0.2s ease;
  background: transparent !important;
}

nav a:hover,
.nav-container a:hover,
header a:hover {
  color: var(--primary-brand) !important;
  background: transparent !important;
}

/* Active nav link */
nav a[aria-current="page"],
.nav-container a[aria-current="page"],
header a[aria-current="page"] {
  color: var(--primary-brand) !important;
  background: transparent !important;
}

/* General Link Styling */
a {
  transition: color 0.2s ease;
}

a:hover {
  color: var(--primary-brand);
}

/* Ambient Dynamic Background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 15% 50%, rgba(157, 78, 221, 0.08), transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(123, 44, 191, 0.08), transparent 25%);
  z-index: -1;
  pointer-events: none;
  animation: ambient-shift 20s ease-in-out infinite alternate;
}

@keyframes ambient-shift {
  0% {
    background-position: 0% 0%;
    transform: scale(1);
  }

  100% {
    background-position: 10% 10%;
    transform: scale(1.1);
  }
}

/* Navbar - Glassmorphism */
.nav-container,
nav,
header {
  background: rgba(255, 255, 255, 0.7) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
}

html.dark .nav-container,
html.dark nav,
html.dark header {
  background: rgba(10, 10, 10, 0.7) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

/* Fix bright borders on layout elements in dark mode */
html.dark footer,
html.dark .hextra-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
}

html.dark .hextra-sidebar-container>div.sticky,
html.dark aside nav>div.sticky {
  border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
}

/* Typography Enhancements */
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  letter-spacing: -0.01em;
}

h1,
h2,
h3 {
  letter-spacing: -0.02em;
}

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
}

/* Selection colors */
::selection {
  background-color: var(--primary-brand);
  color: #000;
}

::-moz-selection {
  background-color: var(--primary-brand);
  color: #000;
}

/* Fix: Make Projects/Docs sidebars blend with the dark background */
/* html.dark .hextra-sidebar-container,
html.dark .hextra-toc-order-last,
html.dark aside,
html.dark nav { */
/* background-color: transparent !important; */
/* Removes the grey block color */
/* border-right: none !important; */
/* Removes the vertical divider line on the left */
/* border-left: none !important; */
/* Removes the vertical divider line on the right */
/* } */

/* Badge Shortcode */
.badge {
  display: inline-block;
  padding: 0.125rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.25rem;
  border-radius: 9999px;
  margin: 0 0.2rem;
  vertical-align: middle;
}

.badge-neutral {
  background-color: #f3f4f6;
  color: #1f2937;
}

html.dark .badge-neutral {
  background-color: #374151;
  color: #f9fafb;
}

.badge-primary {
  background-color: rgba(157, 78, 221, 0.2);
  color: #9d4edd;
  border: 1px solid rgba(157, 78, 221, 0.3);
}

.badge-secondary {
  background-color: rgba(123, 44, 191, 0.2);
  color: #c77dff;
  border: 1px solid rgba(123, 44, 191, 0.3);
}

.badge-accent {
  background-color: rgba(236, 72, 153, 0.2);
  color: #f472b6;
  border: 1px solid rgba(236, 72, 153, 0.3);
}

.badge-success {
  background-color: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-info {
  background-color: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-warning {
  background-color: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-error {
  background-color: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Typewriter Shortcode */
/* Button Shortcode */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.25rem;
  font-weight: 600;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  text-decoration: none !important;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  background-color: var(--primary-brand);
  color: #fff !important;
  border: 1px solid var(--primary-brand);
  box-shadow: 0 4px 6px -1px rgba(157, 78, 221, 0.2);
}

.button-primary:hover {
  background-color: var(--secondary-brand);
  box-shadow: 0 6px 12px -2px rgba(157, 78, 221, 0.3);
}

.button-outline {
  background-color: transparent;
  color: var(--text-primary) !important;
  border: 1px solid var(--glass-border);
}

html.dark .button-outline {
  border-color: rgba(255, 255, 255, 0.2);
}

.button-outline:hover {
  background-color: rgba(157, 78, 221, 0.1);
  border-color: var(--primary-brand);
  color: var(--primary-brand) !important;
}

/* Glow Button (Hero CTA) */
.button-glow {
  background: var(--primary-brand);
  color: white !important;
  position: relative;
  border: none;
  z-index: 1;
  box-shadow: 0 0 20px rgba(157, 78, 221, 0.4);
}

.button-glow::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, #ff0000, #ff7300, #fffb00, #48ff00, #00ffd5, #002bff, #7a00ff, #ff00c8, #ff0000);
  z-index: -1;
  filter: blur(10px);
  background-size: 400%;
  animation: glowing 20s linear infinite;
  opacity: 0;
  border-radius: 0.6rem;
  transition: opacity 0.3s ease-in-out;
}

.button-glow:hover::before {
  opacity: 1;
}

.button-glow:hover {
  box-shadow: 0 0 40px rgba(157, 78, 221, 0.6);
}

@keyframes glowing {
  0% {
    background-position: 0 0;
  }

  50% {
    background-position: 400% 0;
  }

  100% {
    background-position: 0 0;
  }
}