/* =================================
   TACHSHIV DESIGN SYSTEM v2
   Design tokens, primitives, utilities
   ================================= */

:root {
  /* Brand colors */
  --color-primary-900: #0d1f3c;
  --color-primary-800: #1f3864;
  --color-primary-700: #1e4a8a;
  --color-primary-500: #2e75b6;
  --color-primary-300: #6fa8dc;
  --color-primary-100: #d9e8f6;
  --color-primary-50: #f0f7ff;

  /* Growth/success - emerald green */
  --color-growth-900: #047857;
  --color-growth-700: #059669;
  --color-growth-500: #10b981;
  --color-growth-300: #6ee7b7;
  --color-growth-100: #d1fae5;
  --color-growth-50: #ecfdf5;

  /* Semantic */
  --color-success: var(--color-growth-500);
  --color-warning: #f59e0b;
  --color-danger: #dc2626;
  --color-danger-bg: #fef2f2;
  --color-warning-bg: #fef3c7;

  /* Neutrals */
  --color-text: #1a202c;
  --color-text-muted: #4a5568;
  --color-text-light: #718096;
  --color-border: #e2e8f0;
  --color-border-strong: #cbd5e0;
  --color-bg: #ffffff;
  --color-bg-soft: #f7fafc;
  --color-bg-page: #f8faff;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(13, 31, 60, .06);
  --shadow-md: 0 4px 12px rgba(13, 31, 60, .08);
  --shadow-lg: 0 10px 30px rgba(13, 31, 60, .12);
  --shadow-xl: 0 20px 50px rgba(13, 31, 60, .15);

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

  /* Spacing - 4px base */
  --space-1: .25rem;
  --space-2: .5rem;
  --space-3: .75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;

  /* Typography */
  --font-base: 'Heebo', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'SF Mono', Menlo, monospace;
}

/* Legacy aliases for backwards compat */
:root {
  --primary: var(--color-primary-800);
  --primary-light: var(--color-primary-500);
  --dark: var(--color-primary-900);
  --success: var(--color-growth-500);
  --danger: var(--color-danger);
  --gray: var(--color-text-light);
  --border: var(--color-border);
  --text: var(--color-text);
  --bg: var(--color-bg);
}

/* === BUTTONS - shared system === */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-base);
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all .2s ease;
  border: none;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.2;
}
.btn-md { padding: .75rem 1.5rem; font-size: 1rem; }
.btn-sm { padding: .5rem 1rem; font-size: .9rem; }
.btn-lg { padding: 1rem 2rem; font-size: 1.05rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* Primary - brand blue */
.btn-primary,
.btn--primary {
  background: var(--color-primary-800);
  color: white;
  padding: .75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font-family: inherit;
  transition: all .2s;
}
.btn-primary:hover:not(:disabled),
.btn--primary:hover:not(:disabled) {
  background: var(--color-primary-900);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Growth - emerald green - for high-value actions */
.btn--growth {
  background: var(--color-growth-500);
  color: white;
  padding: .75rem 1.5rem;
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font-family: inherit;
  transition: all .2s;
  box-shadow: 0 4px 12px rgba(16, 185, 129, .25);
}
.btn--growth:hover:not(:disabled) {
  background: var(--color-growth-700);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(16, 185, 129, .35);
}

/* Secondary - outlined */
.btn-secondary,
.btn--secondary {
  background: white;
  color: var(--color-primary-800);
  border: 2px solid var(--color-border);
  padding: .65rem 1.4rem;
  font-size: .95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: inherit;
  transition: all .2s;
}
.btn-secondary:hover,
.btn--secondary:hover {
  border-color: var(--color-primary-500);
  background: var(--color-primary-50);
}

/* Ghost - text only */
.btn--ghost {
  background: transparent;
  color: var(--color-primary-700);
  padding: .5rem 1rem;
  font-weight: 600;
}
.btn--ghost:hover { background: var(--color-primary-50); }

/* === BACKGROUND PATTERNS === */

.bg-pattern-dots {
  background-image: radial-gradient(circle, rgba(46, 117, 182, .08) 1px, transparent 1px);
  background-size: 24px 24px;
}

.bg-pattern-grid {
  background-image:
    linear-gradient(rgba(46, 117, 182, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(46, 117, 182, .04) 1px, transparent 1px);
  background-size: 32px 32px;
}

.bg-gradient-hero {
  background:
    radial-gradient(ellipse at top right, rgba(16, 185, 129, .08), transparent 50%),
    radial-gradient(ellipse at bottom left, rgba(46, 117, 182, .12), transparent 50%),
    linear-gradient(135deg, #f0f7ff 0%, #f7fafc 100%);
}

.bg-gradient-auth {
  background:
    radial-gradient(circle at 20% 20%, rgba(16, 185, 129, .1), transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(46, 117, 182, .15), transparent 40%),
    linear-gradient(135deg, #0d1f3c 0%, #1e4a8a 100%);
}

/* === CARDS === */

.card-elevated {
  background: white;
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border);
}

/* === TYPOGRAPHY === */

.h1-display {
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--color-primary-900);
}

.h2-display {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.2;
  font-weight: 700;
  color: var(--color-primary-800);
}

.text-muted { color: var(--color-text-muted); }
.text-growth { color: var(--color-growth-700); }
.text-primary { color: var(--color-primary-700); }

/* === LAYOUT UTILITIES === */

.container-app { max-width: 1200px; margin: 0 auto; padding: 0 1.25rem; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }

/* === ANIMATED ABSTRACT SHAPES (for backgrounds) === */

.shape-float {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: .4;
  pointer-events: none;
  animation: float-slow 20s ease-in-out infinite;
}

.shape-float-1 {
  width: 400px; height: 400px;
  background: var(--color-growth-300);
  top: -100px; right: -100px;
  animation-delay: 0s;
}

.shape-float-2 {
  width: 500px; height: 500px;
  background: var(--color-primary-300);
  bottom: -150px; left: -150px;
  animation-delay: -10s;
}

@keyframes float-slow {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(30px, -30px); }
}

@media (prefers-reduced-motion: reduce) {
  .shape-float { animation: none; }
}
