/* ==========================================================================
   Apostle Finance - Design System & Base Stylesheet
   Brand Primary: #2563EB (Apostle Blue)
   Canvas: #F8FAFC (Slate Canvas)
   Typography: Plus Jakarta Sans
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  /* Apostle Blue Primary System */
  --apostle-primary: #2563EB;
  --apostle-primary-deep: #1D4ED8;
  --apostle-primary-soft: #EFF6FF;
  --apostle-accent: #3B82F6;
  --apostle-focus-ring: rgba(37, 99, 235, 0.2);

  /* Neutral Slate Palette */
  --slate-canvas: #F8FAFC;
  --slate-darkest: #0F172A;
  --slate-body: #334155;
  --slate-secondary: #64748B;
  --slate-muted: #94A3B8;
  --border-subtle: #E2E8F0;
  --border-light: #F1F5F9;

  /* Semantic Colors */
  --semantic-success: #10B981;
  --semantic-warning: #F59E0B;
  --semantic-danger: #EF4444;

  /* Elevation Shadows */
  --shadow-subtle: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
  --shadow-card: 0 4px 6px -1px rgba(15, 23, 42, 0.04), 0 2px 4px -2px rgba(15, 23, 42, 0.02);
  --shadow-card-hover: 0 12px 24px -6px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.03);
  --shadow-glow: 0 0 25px -5px rgba(37, 99, 235, 0.15);
}

/* --------------------------------------------------------------------------
   Base Resets & Typography
   -------------------------------------------------------------------------- */
html {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  scroll-behavior: smooth;
  background-color: var(--slate-canvas);
  color: var(--slate-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background-color: var(--slate-canvas);
  color: var(--slate-body);
}

/* Typography Utility */
.font-jakarta {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

/* Heading Tight Tracking */
h1, h2, h3, h4, h5, h6, .tracking-tight-custom {
  letter-spacing: -0.02em;
}

/* --------------------------------------------------------------------------
   Custom Slim Scrollbar
   -------------------------------------------------------------------------- */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

::-webkit-scrollbar-track {
  background: var(--slate-canvas);
}

::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--slate-muted);
}

/* --------------------------------------------------------------------------
   Glassmorphism & Header Navigation
   -------------------------------------------------------------------------- */
.glass-nav {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.glass-card {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-subtle);
}

/* --------------------------------------------------------------------------
   Atmospheric Glow & Subtle Gradients
   -------------------------------------------------------------------------- */
.apostle-gradient-glow {
  background: radial-gradient(circle at 50% 0%, rgba(37, 99, 235, 0.07) 0%, rgba(248, 250, 252, 0) 70%);
}

.apostle-hero-mesh {
  background-image: 
    radial-gradient(at 15% 15%, rgba(37, 99, 235, 0.06) 0px, transparent 50%),
    radial-gradient(at 85% 15%, rgba(59, 130, 246, 0.05) 0px, transparent 50%),
    radial-gradient(at 50% 50%, rgba(239, 246, 255, 0.5) 0px, transparent 70%);
}

/* --------------------------------------------------------------------------
   Subtle Shadows & Elevation
   -------------------------------------------------------------------------- */
.shadow-subtle {
  box-shadow: var(--shadow-subtle);
}

.shadow-card {
  box-shadow: var(--shadow-card);
}

.shadow-card-hover {
  box-shadow: var(--shadow-card-hover);
}

.glow-subtle {
  box-shadow: var(--shadow-glow);
}

/* --------------------------------------------------------------------------
   Status Indicators & Pulse Animations
   -------------------------------------------------------------------------- */
.status-dot-pulse {
  position: relative;
  display: inline-flex;
}

.status-dot-pulse::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 9999px;
  background-color: currentColor;
  animation: status-ping 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
  opacity: 0.75;
}

@keyframes status-ping {
  75%, 100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

@keyframes badge-float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

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

/* --------------------------------------------------------------------------
   Interactive Focus & Input States
   -------------------------------------------------------------------------- */
.focus-ring-apostle:focus {
  outline: none;
  border-color: var(--apostle-primary);
  box-shadow: 0 0 0 3px var(--apostle-focus-ring);
}

/* --------------------------------------------------------------------------
   Code Block Container (API Spotlight)
   -------------------------------------------------------------------------- */
.code-dark-canvas {
  background-color: #0B1120;
  border: 1px solid #1E293B;
  color: #E2E8F0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* --------------------------------------------------------------------------
   Tab Active Indicator & Micro-interactions
   -------------------------------------------------------------------------- */
.tab-transition {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.interactive-card-hover {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.interactive-card-hover:hover {
  transform: translateY(-2px);
  border-color: #CBD5E1;
  box-shadow: var(--shadow-card-hover);
}

/* --------------------------------------------------------------------------
   Range Slider Styling (Interactive Calculator)
   -------------------------------------------------------------------------- */
input[type="range"].apostle-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: #E2E8F0;
  border-radius: 9999px;
  outline: none;
}

input[type="range"].apostle-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #2563EB;
  cursor: pointer;
  border: 2px solid #FFFFFF;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(37, 99, 235, 0.1);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

input[type="range"].apostle-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2);
}

input[type="range"].apostle-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #2563EB;
  cursor: pointer;
  border: 2px solid #FFFFFF;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(37, 99, 235, 0.1);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
