/* app/static/css/main.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: 'Space Grotesk', sans-serif;
  
  /* Brand Light Colors */
  --bg-primary: #FFFFFF;
  --bg-secondary: #F9FAFB;
  --bg-tertiary: #F3F4F6;
  --text-primary: #0B1220;
  --text-secondary: #374151;
  --text-muted: #6B7280;
  --border-color: #E5E7EB;
  
  /* Shared Accent Colors */
  --accent: #4F46E5;
  --accent-light: #6366F1;
  --accent-gradient: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
  --success: #10B981;
  --warning: #F59E0B;
}

.dark {
  /* Brand Dark Colors */
  --bg-primary: #0B1220;
  --bg-secondary: #111827;
  --bg-tertiary: #1F2937;
  --text-primary: #F9FAFB;
  --text-secondary: #E5E7EB;
  --text-muted: #9CA3AF;
  --border-color: #374151;
}

html {
  font-family: var(--font-sans);
  scroll-behavior: smooth;
  background-color: var(--bg-primary);
  color: var(--text-secondary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Headings display font override */
h1, h2, h3, h4, h5, h6, .font-display {
  font-family: var(--font-display);
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

/* Custom Selection Highlight */
::selection {
  background-color: rgba(79, 70, 229, 0.2);
  color: var(--accent-light);
}

/* Noise overlay texture for premium SaaS feel */
.noise-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  content: "";
  opacity: 0.015;
  z-index: 9999;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.dark .noise-overlay {
  opacity: 0.025;
}

/* Custom Scroll Progress Bar */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--accent-gradient);
  z-index: 10000;
  width: 0%;
  transition: width 0.1s ease-out;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Interactive Custom Cursor Follower */
.custom-cursor {
  width: 20px;
  height: 20px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  position: fixed;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 99999;
  transition: width 0.2s, height 0.2s, background-color 0.2s, border-color 0.2s;
  mix-blend-mode: difference;
}

.custom-cursor-glow {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, rgba(139, 92, 246, 0) 70%);
  border-radius: 50%;
  position: fixed;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 99998;
  mix-blend-mode: screen;
}

/* Hide custom cursor on touch devices */
@media (max-width: 1024px) {
  .custom-cursor, .custom-cursor-glow {
    display: none !important;
  }
}

/* Helper utilities to bind with custom styles */
.text-gradient {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
