/* ============================================
   NeuroTask — Core Design System
   "Neural Glassmorphism" Design Direction
   ============================================ */

/* --- CSS Custom Properties (Design Tokens) --- */
:root {
  /* Colors */
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-tertiary: #1a1a2e;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.06);
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-light: rgba(255, 255, 255, 0.1);

  --accent-purple: #6c5ce7;
  --accent-purple-light: #a855f7;
  --accent-blue: #00d2ff;
  --accent-blue-dark: #3a7bd5;
  --accent-mint: #00f5a0;
  --accent-cyan: #00d9f5;
  --accent-pink: #f093fb;
  --accent-red: #f5576c;

  --gradient-primary: linear-gradient(135deg, #6c5ce7, #a855f7);
  --gradient-blue: linear-gradient(135deg, #00d2ff, #3a7bd5);
  --gradient-mint: linear-gradient(135deg, #00f5a0, #00d9f5);
  --gradient-pink: linear-gradient(135deg, #f093fb, #f5576c);
  --gradient-hero: linear-gradient(180deg, #0a0a0f 0%, #12121a 50%, #0a0a0f 100%);

  --text-primary: #e8e8ed;
  --text-secondary: #9ca3af;
  --text-tertiary: #6b7280;
  --text-ghost: #3a3a4a;

  /* Typography */
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Spacing (8px grid) */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;
  --space-5xl: 128px;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(108, 92, 231, 0.08);
  --shadow-md: 0 4px 24px rgba(108, 92, 231, 0.12);
  --shadow-lg: 0 8px 48px rgba(108, 92, 231, 0.16);
  --shadow-glow: 0 0 40px rgba(108, 92, 231, 0.3);
  --shadow-glow-sm: 0 0 20px rgba(108, 92, 231, 0.2);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 500ms ease;
  --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
}

input {
  border: none;
  outline: none;
  font-family: inherit;
  color: inherit;
  background: none;
}

img {
  max-width: 100%;
  display: block;
}

/* --- Utility Classes --- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section {
  padding: var(--space-5xl) 0;
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section-tag {
  display: inline-block;
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  color: var(--accent-purple-light);
  margin-bottom: var(--space-md);
  font-family: var(--font-mono);
  font-weight: 500;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--space-md);
}

.section-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* --- Cursor Glow --- */
.cursor-glow {
  position: fixed;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(108, 92, 231, 0.07) 0%, transparent 70%);
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s;
  opacity: 0;
}

body:hover .cursor-glow {
  opacity: 1;
}

/* --- Scroll Progress Bar --- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--gradient-primary);
  z-index: 10001;
  width: 0%;
  transition: width 50ms linear;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--transition-base);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  font-family: var(--font-heading);
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.btn-primary:active {
  transform: translateY(0) scale(0.97);
}

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}

.btn-ghost:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-purple);
}

.btn-glow {
  animation: btnPulse 2.5s ease-in-out infinite;
}

.btn-full {
  width: 100%;
  justify-content: center;
}

/* --- Navigation --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  padding: var(--space-md) 0;
  transition: all var(--transition-base);
  background: transparent;
}

.navbar.scrolled {
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  padding: var(--space-sm) 0;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.3rem;
}

.logo-icon {
  font-size: 1.5rem;
}

.logo-accent {
  color: var(--accent-purple-light);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.nav-link {
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
  position: relative;
  font-weight: 500;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: 2px;
  transition: width var(--transition-base);
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-cta {
  padding: 10px 24px;
  background: var(--gradient-primary);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all var(--transition-base);
  font-family: var(--font-heading);
  color: white;
}

.nav-cta:hover {
  box-shadow: var(--shadow-glow-sm);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition-base);
}

/* --- Hero Section --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: var(--space-5xl) var(--space-lg);
  overflow: hidden;
}

.neural-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
}

.badge-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-mint);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: var(--space-lg);
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto var(--space-xl);
  line-height: 1.7;
}

.hero-cta-group {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  margin-bottom: var(--space-3xl);
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xl);
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border-subtle);
}

/* Hero Floating Cards */
.hero-visual {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.floating-card {
  position: absolute;
  background: rgba(18, 18, 26, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  animation: float 6s ease-in-out infinite;
  box-shadow: var(--shadow-md);
}

.floating-card .fc-icon {
  font-size: 1.5rem;
}

.fc-title {
  font-weight: 600;
  font-size: 0.9rem;
  display: block;
}

.fc-sub {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  display: block;
}

.fc-urgency {
  font-size: 0.7rem;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-weight: 600;
}

.urgency-warning {
  background: rgba(245, 87, 108, 0.15);
  color: var(--accent-red);
}

.fc-progress {
  width: 120px;
  height: 4px;
  background: var(--bg-tertiary);
  border-radius: 4px;
  margin-top: 6px;
  overflow: hidden;
}

.fc-progress-fill {
  height: 100%;
  background: var(--gradient-mint);
  border-radius: 4px;
  transition: width 1s ease;
}

.card-1 {
  top: 20%;
  right: 8%;
  animation-delay: 0s;
}

.card-2 {
  bottom: 30%;
  left: 5%;
  animation-delay: -2s;
}

.card-3 {
  bottom: 15%;
  right: 12%;
  animation-delay: -4s;
}

/* --- Toast --- */
.toast-container {
  position: fixed;
  bottom: var(--space-xl);
  right: var(--space-xl);
  z-index: 10002;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.toast {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  color: var(--text-primary);
  font-size: 0.9rem;
  box-shadow: var(--shadow-lg);
  animation: slideInRight 0.3s ease, fadeOut 0.3s ease 2.7s forwards;
  backdrop-filter: blur(10px);
}

.toast.success {
  border-left: 3px solid var(--accent-mint);
}

.toast.info {
  border-left: 3px solid var(--accent-blue);
}

/* --- Footer --- */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  padding: var(--space-3xl) 0 var(--space-xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-3xl);
  margin-bottom: var(--space-2xl);
}

.footer-brand p {
  color: var(--text-tertiary);
  margin-top: var(--space-md);
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer-links h4 {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  margin-bottom: var(--space-md);
  color: var(--text-secondary);
}

.footer-links a {
  display: block;
  font-size: 0.85rem;
  color: var(--text-tertiary);
  padding: var(--space-xs) 0;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--accent-purple-light);
}

.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--space-lg);
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-ghost);
}

/* --- Selection --- */
::selection {
  background: rgba(108, 92, 231, 0.3);
  color: var(--text-primary);
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-purple);
}
