/* Kerno Lab — High-Precision Dark Neon Design System */
:root {
  --bg-main: #07080C;
  --bg-card: #0F1219;
  --border-subtle: #1E2433;
  --accent-cyan: #00E5FF;
  --accent-violet: #C084FC;
  --halo-violet: #7C3AED;
  --halo-blue: #1D4ED8;
  --text-primary: #FFFFFF;
  --text-secondary: #94A3B8;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
  background-color: var(--bg-main);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, .font-display {
  font-family: 'Space Grotesk', system-ui, sans-serif;
}

/* Signature Gradient */
.text-gradient {
  background: linear-gradient(135deg, #00E5FF 0%, #C084FC 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bg-gradient-signature {
  background: linear-gradient(135deg, #00E5FF 0%, #C084FC 100%);
}

/* Background Radial Halos */
.bg-halo-hero {
  background:
    radial-gradient(circle at 50% 18%, rgba(124, 58, 237, 0.18) 0%, rgba(29, 78, 216, 0.08) 38%, transparent 70%),
    radial-gradient(circle at 20% 45%, rgba(0, 229, 255, 0.06) 0%, transparent 50%),
    radial-gradient(circle at 80% 35%, rgba(192, 132, 252, 0.07) 0%, transparent 50%);
}

.bg-halo-section {
  background:
    radial-gradient(circle at 50% 50%, rgba(29, 78, 216, 0.12) 0%, rgba(124, 58, 237, 0.07) 45%, transparent 75%);
}

/* Subtle Tech Grid Overlay */
.bg-grid-pattern {
  background-image:
    linear-gradient(to right, rgba(30, 36, 51, 0.35) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(30, 36, 51, 0.35) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 50% 30%, black 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, black 20%, transparent 75%);
}

/* Card Styling */
.kerno-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.25s ease,
              box-shadow 0.25s ease,
              opacity 0.25s ease;
}

.kerno-card:hover {
  border-color: rgba(0, 229, 255, 0.4);
  box-shadow: 0 0 28px -6px rgba(0, 229, 255, 0.16), 0 12px 32px -12px rgba(0, 0, 0, 0.7);
  transform: translateY(-2px);
}

.kerno-card-violet:hover {
  border-color: rgba(192, 132, 252, 0.45);
  box-shadow: 0 0 28px -6px rgba(192, 132, 252, 0.18), 0 12px 32px -12px rgba(0, 0, 0, 0.7);
}

/* Central Noyau Gradient Border */
.noyau-core-card {
  position: relative;
  background: linear-gradient(160deg, rgba(15, 18, 25, 0.98) 0%, rgba(18, 22, 34, 0.98) 100%);
  border: 1px solid transparent;
  background-clip: padding-box;
  box-shadow: 0 0 40px -10px rgba(0, 229, 255, 0.25), 0 0 50px -15px rgba(192, 132, 252, 0.22);
}

.noyau-core-card::before {
  content: "";
  position: absolute;
  inset: -1.5px;
  border-radius: inherit;
  padding: 1.5px;
  background: linear-gradient(135deg, #00E5FF, #7C3AED, #C084FC);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* Architecture Interactive Nodes */
.arch-node {
  cursor: pointer;
  user-select: none;
  position: relative;
  z-index: 10;
}

.arch-node.is-dimmed {
  opacity: 0.42;
}

.arch-node.is-selected {
  border-color: #00E5FF !important;
  box-shadow: 0 0 0 1px rgba(0, 229, 255, 0.55), 0 0 30px -6px rgba(0, 229, 255, 0.35) !important;
}

.noyau-core-card.is-selected {
  box-shadow: 0 0 0 1px rgba(0, 229, 255, 0.7), 0 0 45px -6px rgba(0, 229, 255, 0.4), 0 0 55px -12px rgba(192, 132, 252, 0.35) !important;
}

/* SVG Animated Flow Lines */
.svg-conn-base {
  stroke: rgba(30, 36, 51, 0.9);
  stroke-width: 1.75;
  fill: none;
  transition: stroke 0.25s ease, stroke-width 0.25s ease, opacity 0.25s ease;
}

.svg-conn-flow {
  stroke: url(#kerno-line-grad);
  stroke-width: 2;
  stroke-dasharray: 6 8;
  fill: none;
  opacity: 0.45;
  animation: flowPulse 1.8s linear infinite;
  transition: stroke 0.25s ease, stroke-width 0.25s ease, opacity 0.25s ease, filter 0.25s ease;
}

.svg-conn-group.is-active .svg-conn-base {
  stroke: rgba(0, 229, 255, 0.45);
  stroke-width: 2.25;
}

.svg-conn-group.is-active .svg-conn-flow {
  stroke: #00E5FF;
  stroke-width: 2.75;
  opacity: 1;
  filter: drop-shadow(0 0 6px rgba(0, 229, 255, 0.85));
}

.svg-conn-group.is-dimmed {
  opacity: 0.2;
}

@keyframes flowPulse {
  to {
    stroke-dashoffset: -28;
  }
}

/* Toggle Switch */
.mode-toggle-btn {
  transition: color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.mode-toggle-btn[aria-pressed="true"] {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.16), rgba(192, 132, 252, 0.16));
  color: #FFFFFF;
  border-color: rgba(0, 229, 255, 0.45);
  box-shadow: 0 0 18px -4px rgba(0, 229, 255, 0.28);
}

/* Timeline Glow Line */
.timeline-line {
  background: linear-gradient(180deg, #00E5FF 0%, #C084FC 50%, #00E5FF 100%);
  box-shadow: 0 0 14px rgba(0, 229, 255, 0.35);
}

/* Contact CTA Gradient Card */
.contact-cta-box {
  background: linear-gradient(145deg, rgba(15, 18, 25, 0.95) 0%, rgba(29, 78, 216, 0.14) 50%, rgba(124, 58, 237, 0.16) 100%);
  border: 1px solid rgba(0, 229, 255, 0.25);
  box-shadow: 0 0 60px -20px rgba(124, 58, 237, 0.35), 0 0 40px -20px rgba(0, 229, 255, 0.2);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #07080C;
}
::-webkit-scrollbar-thumb {
  background: #1E2433;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #2E374D;
}
