/* ==========================================================================
   Sputnik Devs — "Orbital Precision" Dual-Theme Design System
   Supports both Light Mode (Swiss Editorial Alabaster) & Dark Mode (Deep Obsidian)
   ========================================================================== */

:root {
  --bg-canvas: #F1F5F9;
  --bg-surface: rgba(255, 255, 255, 0.88);
  --bg-surface-elevated: #FFFFFF;
  --bg-subtle: #E2E8F0;
  --text-primary: #090D16;
  --text-secondary: #334155;
  --text-muted: #64748B;
  --border-hairline: rgba(148, 163, 184, 0.45);
  --border-strong: rgba(99, 102, 241, 0.55);
  --card-shadow: 0 2px 6px rgba(15, 23, 42, 0.05), 0 14px 32px -8px rgba(15, 23, 42, 0.08);
  --card-shadow-hover: 0 8px 22px rgba(15, 23, 42, 0.07), 0 24px 48px -12px rgba(79, 70, 229, 0.16);
  --grid-line: rgba(15, 23, 42, 0.045);
  --dot-line: rgba(79, 70, 229, 0.14);
  --spotlight-card: rgba(99, 102, 241, 0.065);
  --spotlight-subcard: rgba(99, 102, 241, 0.055);
  --cursor-ambient: rgba(99, 102, 241, 0.07);
}

html.dark {
  --bg-canvas: #050811;
  --bg-surface: rgba(13, 19, 33, 0.78);
  --bg-surface-elevated: #0E1525;
  --bg-subtle: #0A0F1D;
  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --border-hairline: rgba(255, 255, 255, 0.11);
  --border-strong: rgba(129, 140, 248, 0.45);
  --card-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.08), 0 14px 36px -8px rgba(0, 0, 0, 0.55);
  --card-shadow-hover: inset 0 1px 0 0 rgba(255, 255, 255, 0.18), 0 22px 48px -10px rgba(0, 0, 0, 0.75);
  --grid-line: rgba(255, 255, 255, 0.032);
  --dot-line: rgba(129, 140, 248, 0.16);
  --spotlight-card: rgba(129, 140, 248, 0.09);
  --spotlight-subcard: rgba(129, 140, 248, 0.075);
  --cursor-ambient: rgba(99, 102, 241, 0.10);
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  position: relative;
  min-height: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.25s ease, color 0.25s ease;
}

h1, h2, h3, h4, .font-display {
  font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  letter-spacing: -0.025em;
}

.font-mono-tech {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.marked {
  background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

html.dark .marked {
  background: linear-gradient(135deg, #818CF8 0%, #C084FC 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Sticky Frosted Navigation Bar (Shared across Layout, Login & Register) */
.sputnik-nav {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(203, 213, 225, 0.85);
  box-shadow: 0 4px 20px -4px rgba(15, 23, 42, 0.05);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

html.dark .sputnik-nav {
  background: rgba(5, 8, 17, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 4px 24px -4px rgba(0, 0, 0, 0.5);
}

/* ==========================================================================
   Continuous Flowing Orbital Backdrop & Subtle Cursor Illumination
   ========================================================================== */
.sputnik-backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(1100px circle at 12% 18%, rgba(99, 102, 241, 0.09), transparent 60%),
    radial-gradient(950px circle at 88% 22%, rgba(139, 92, 246, 0.08), transparent 58%),
    radial-gradient(1000px circle at 78% 78%, rgba(6, 182, 212, 0.07), transparent 60%),
    radial-gradient(900px circle at 18% 82%, rgba(16, 185, 129, 0.06), transparent 60%);
}

html.dark .sputnik-backdrop {
  background:
    radial-gradient(1100px circle at 12% 18%, rgba(99, 102, 241, 0.15), transparent 60%),
    radial-gradient(950px circle at 88% 22%, rgba(139, 92, 246, 0.12), transparent 58%),
    radial-gradient(1000px circle at 78% 78%, rgba(6, 182, 212, 0.09), transparent 60%),
    radial-gradient(900px circle at 18% 82%, rgba(16, 185, 129, 0.07), transparent 60%);
}

.sputnik-grid-matrix {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px),
    radial-gradient(var(--dot-line) 1px, transparent 1px);
  background-size: 64px 64px, 64px 64px, 32px 32px;
  background-position: 0 0, 0 0, 16px 16px;
  -webkit-mask-image: radial-gradient(ellipse 95% 90% at 50% 45%, #000 45%, transparent 100%);
  mask-image: radial-gradient(ellipse 95% 90% at 50% 45%, #000 45%, transparent 100%);
}

.sputnik-orbital-spotlight {
  position: absolute;
  top: -220px;
  left: 50%;
  transform: translateX(-50%);
  width: 1200px;
  height: 680px;
  background: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.14) 0%, rgba(139, 92, 246, 0.08) 42%, transparent 74%);
  filter: blur(45px);
  pointer-events: none;
  animation: sputnikOrbitalPulse 16s ease-in-out infinite alternate;
}

html.dark .sputnik-orbital-spotlight {
  background: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.22) 0%, rgba(139, 92, 246, 0.13) 44%, rgba(6, 182, 212, 0.06) 68%, transparent 78%);
}

/* Subtle Ambient Cursor Glow Beneath Page Content */
.sputnik-cursor-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(
    650px circle at var(--cursor-x, 50vw) var(--cursor-y, 35vh),
    var(--cursor-ambient),
    transparent 65%
  );
  transition: opacity 0.3s ease;
}

@keyframes sputnikOrbitalPulse {
  0% {
    transform: translateX(-52%) translateY(0px) scale(1);
  }
  100% {
    transform: translateX(-48%) translateY(24px) scale(1.06);
  }
}

/* ==========================================================================
   Precision Surface & Bento Cards with Subtle Mouse-Hover Illumination
   ========================================================================== */
.sputnik-card {
  position: relative;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-hairline);
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.28s ease,
              box-shadow 0.28s ease;
}

html.dark .sputnik-card {
  border-width: 1px;
}

.sputnik-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(
    460px circle at var(--card-mouse-x, 50%) var(--card-mouse-y, 0%),
    var(--spotlight-card),
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.35s ease;
  z-index: 0;
}

.sputnik-card:hover::before {
  opacity: 1;
}

.sputnik-card > * {
  position: relative;
  z-index: 1;
}

.sputnik-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--card-shadow-hover);
}

.sputnik-card-lift:hover {
  transform: translateY(-3px);
}

/* Inner Sub-Cards / Telemetry Tiles with Subtle Hover Glow */
.sputnik-subcard {
  position: relative;
  background: rgba(248, 250, 252, 0.92);
  border: 1px solid #CBD5E1;
  transition: border-color 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}

html.dark .sputnik-subcard {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.10);
}

.sputnik-subcard:hover {
  border-color: rgba(99, 102, 241, 0.42);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 6px 18px -6px rgba(99, 102, 241, 0.12);
}

html.dark .sputnik-subcard:hover {
  border-color: rgba(129, 140, 248, 0.36);
  background: rgba(255, 255, 255, 0.055);
  box-shadow: 0 8px 22px -6px rgba(0, 0, 0, 0.45);
}

/* Seamless Flowing Hero Canvas (No ugly hard bottom border) */
.sputnik-hero-canvas {
  position: relative;
  background:
    radial-gradient(900px circle at 15% 15%, rgba(99, 102, 241, 0.07), transparent 60%),
    radial-gradient(850px circle at 85% 25%, rgba(139, 92, 246, 0.07), transparent 60%);
}

html.dark .sputnik-hero-canvas {
  background:
    radial-gradient(900px circle at 15% 15%, rgba(99, 102, 241, 0.14), transparent 60%),
    radial-gradient(850px circle at 85% 25%, rgba(139, 92, 246, 0.11), transparent 60%);
}

/* Seamless Inner Page Hero Banner */
.sputnik-page-hero {
  position: relative;
  background:
    radial-gradient(900px circle at 50% 0%, rgba(99, 102, 241, 0.09), transparent 68%);
}

html.dark .sputnik-page-hero {
  background:
    radial-gradient(900px circle at 50% 0%, rgba(99, 102, 241, 0.18), transparent 68%);
}

/* Subtle dot pattern for Bento cells */
.sputnik-dot-pattern {
  background-image: radial-gradient(rgba(99, 102, 241, 0.18) 1px, transparent 1px);
  background-size: 18px 18px;
}

html.dark .sputnik-dot-pattern {
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
}

/* reCAPTCHA badge - ensure it's visible above all content including backdrop-blur elements */
.grecaptcha-badge {
  z-index: 2147483647 !important;
  position: fixed !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

body > div[style*="z-index"] iframe[src*="recaptcha"] {
  z-index: 2147483647 !important;
}