/* ============================================================
   Synaptic Trace — coming soon
   Dark neural theme over Bootstrap 5.
   ============================================================ */

:root {
  --st-bg: #060a14;
  --st-bg-2: #0a1122;
  --st-cyan: #4cc9f0;
  --st-violet: #7b5cf0;
  --st-ink: #e8edf7;
  --st-ink-dim: #9aa7c0;
  --st-line: rgba(120, 140, 200, 0.18);
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--st-bg);
  color: var(--st-ink);
  font-family: "Avenir Next", "Segoe UI", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ------------------------------------------------------------
   Background stack: WebGL canvas + CSS fallback + vignette
   ------------------------------------------------------------ */

#bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: radial-gradient(120% 90% at 50% 0%, var(--st-bg-2) 0%, var(--st-bg) 70%);
}

#neural-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.bg-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(90% 70% at 50% 45%, transparent 55%, rgba(4, 7, 14, 0.75) 100%);
}

.page-content {
  position: relative;
  z-index: 1;
}

/* ------------------------------------------------------------
   CSS fallback background (shown only when WebGL is unavailable)
   ------------------------------------------------------------ */

.css-fallback {
  position: absolute;
  inset: 0;
  display: none;
}

body.no-webgl .css-fallback {
  display: block;
}

body.no-webgl #neural-canvas {
  display: none;
}

.fallback-gradient {
  position: absolute;
  inset: -20%;
  background: linear-gradient(130deg,
    #060a14 0%, #0b1330 30%, #131038 50%, #081a2e 72%, #060a14 100%);
  background-size: 300% 300%;
  animation: gradientDrift 24s ease-in-out infinite;
}

@keyframes gradientDrift {
  0%   { background-position: 0% 30%; }
  50%  { background-position: 100% 70%; }
  100% { background-position: 0% 30%; }
}

.fallback-blob {
  position: absolute;
  width: 46vmax;
  height: 46vmax;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.35;
  will-change: transform;
}

.blob-a {
  top: -12vmax; left: -8vmax;
  background: radial-gradient(circle at 40% 40%, rgba(76, 201, 240, 0.5), transparent 65%);
  animation: blobFloatA 26s ease-in-out infinite;
}

.blob-b {
  bottom: -14vmax; right: -10vmax;
  background: radial-gradient(circle at 60% 60%, rgba(123, 92, 240, 0.5), transparent 65%);
  animation: blobFloatB 32s ease-in-out infinite;
}

.blob-c {
  top: 30%; left: 40%;
  width: 30vmax; height: 30vmax;
  background: radial-gradient(circle, rgba(60, 110, 220, 0.35), transparent 65%);
  animation: blobFloatA 38s ease-in-out infinite reverse;
}

@keyframes blobFloatA {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(6vmax, 4vmax) scale(1.12); }
  66%      { transform: translate(-4vmax, 7vmax) scale(0.94); }
}

@keyframes blobFloatB {
  0%, 100% { transform: translate(0, 0) scale(1); }
  40%      { transform: translate(-7vmax, -5vmax) scale(1.1); }
  70%      { transform: translate(3vmax, -8vmax) scale(0.92); }
}

/* Pulsing "neuron" dots for the CSS fallback */
.fallback-nodes span {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--st-cyan);
  box-shadow: 0 0 12px 3px rgba(76, 201, 240, 0.55);
  animation: nodePulse 4s ease-in-out infinite;
}

.fallback-nodes span:nth-child(1)  { top: 12%; left: 18%; animation-delay: 0s; }
.fallback-nodes span:nth-child(2)  { top: 24%; left: 72%; animation-delay: .6s; background: var(--st-violet); box-shadow: 0 0 12px 3px rgba(123, 92, 240, .55); }
.fallback-nodes span:nth-child(3)  { top: 38%; left: 34%; animation-delay: 1.2s; }
.fallback-nodes span:nth-child(4)  { top: 46%; left: 86%; animation-delay: 1.8s; }
.fallback-nodes span:nth-child(5)  { top: 58%; left: 12%; animation-delay: 2.4s; background: var(--st-violet); box-shadow: 0 0 12px 3px rgba(123, 92, 240, .55); }
.fallback-nodes span:nth-child(6)  { top: 66%; left: 56%; animation-delay: 3s; }
.fallback-nodes span:nth-child(7)  { top: 78%; left: 30%; animation-delay: .9s; }
.fallback-nodes span:nth-child(8)  { top: 84%; left: 74%; animation-delay: 1.5s; background: var(--st-violet); box-shadow: 0 0 12px 3px rgba(123, 92, 240, .55); }
.fallback-nodes span:nth-child(9)  { top: 8%;  left: 48%; animation-delay: 2.1s; }
.fallback-nodes span:nth-child(10) { top: 30%; left: 8%;  animation-delay: 2.7s; }
.fallback-nodes span:nth-child(11) { top: 52%; left: 64%; animation-delay: 3.3s; }
.fallback-nodes span:nth-child(12) { top: 90%; left: 46%; animation-delay: 3.6s; background: var(--st-violet); box-shadow: 0 0 12px 3px rgba(123, 92, 240, .55); }

@keyframes nodePulse {
  0%, 100% { transform: scale(0.7); opacity: 0.35; }
  50%      { transform: scale(1.4); opacity: 1; }
}

/* ------------------------------------------------------------
   Header / brand
   ------------------------------------------------------------ */

.brand-name {
  color: var(--st-ink);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.95rem;
}

.brand-mark {
  filter: drop-shadow(0 0 6px rgba(76, 201, 240, 0.5));
}

.badge-soon {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  border: 1px solid var(--st-line);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--st-cyan);
  background: rgba(76, 201, 240, 0.06);
  backdrop-filter: blur(6px);
}

.badge-soon-lg {
  font-size: 0.85rem;
  padding: 0.5rem 1.3rem;
}

/* ------------------------------------------------------------
   Hero
   ------------------------------------------------------------ */

.hero {
  min-height: 78vh;
  padding: 4rem 0 3rem;
}

.eyebrow {
  color: var(--st-ink-dim);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.hero-title {
  font-weight: 700;
  line-height: 1.08;
  text-shadow: 0 2px 30px rgba(6, 10, 20, 0.9);
}

.gradient-text {
  background: linear-gradient(90deg, var(--st-cyan), var(--st-violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  max-width: 46rem;
  color: var(--st-ink-dim);
  text-shadow: 0 1px 16px rgba(6, 10, 20, 0.9);
}

.btn-glow {
  --bs-btn-color: var(--st-ink);
  --bs-btn-hover-color: #fff;
  --bs-btn-active-color: #fff;
  border: 1px solid rgba(76, 201, 240, 0.45);
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(76, 201, 240, 0.14), rgba(123, 92, 240, 0.14));
  box-shadow: 0 0 24px rgba(76, 201, 240, 0.18);
  transition: box-shadow 0.3s ease, border-color 0.3s ease, transform 0.2s ease;
}

.btn-glow:hover,
.btn-glow:focus-visible {
  border-color: rgba(76, 201, 240, 0.9);
  box-shadow: 0 0 40px rgba(76, 201, 240, 0.35);
  transform: translateY(-1px);
}

/* ------------------------------------------------------------
   Concept cards & about panel
   ------------------------------------------------------------ */

.concept-card,
.about-panel {
  background: rgba(12, 18, 36, 0.62);
  border: 1px solid var(--st-line);
  border-radius: 1rem;
  padding: 1.75rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.concept-card {
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.concept-card:hover {
  transform: translateY(-4px);
  border-color: rgba(76, 201, 240, 0.4);
  box-shadow: 0 12px 40px rgba(4, 8, 18, 0.6), 0 0 30px rgba(76, 201, 240, 0.08);
}

.concept-card p,
.about-panel p {
  color: var(--st-ink-dim);
  font-size: 0.95rem;
  margin-bottom: 0;
}

.concept-card h2 {
  color: var(--st-ink);
  margin-bottom: 0.75rem;
}

.concept-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: 1rem;
  border-radius: 0.85rem;
  color: var(--st-cyan);
  background: linear-gradient(135deg, rgba(76, 201, 240, 0.12), rgba(123, 92, 240, 0.12));
  border: 1px solid var(--st-line);
}

.about-panel {
  padding: 2.5rem 2rem;
}

/* ------------------------------------------------------------
   Footer
   ------------------------------------------------------------ */

.footer-inner {
  color: var(--st-ink-dim);
  font-size: 0.8rem;
  border-top: 1px solid var(--st-line);
  padding-top: 1rem;
}

.render-mode {
  opacity: 0.55;
  letter-spacing: 0.08em;
}

/* ------------------------------------------------------------
   Motion & small-screen adjustments
   ------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fallback-gradient,
  .fallback-blob,
  .fallback-nodes span {
    animation: none;
  }
  .concept-card,
  .btn-glow {
    transition: none;
  }
}

@media (max-width: 575.98px) {
  .hero { min-height: 70vh; }
  .hero-title { font-size: 2.4rem; }
  .about-panel { padding: 2rem 1.4rem; }
}
