/* ============================================================
   GitImsi Design System — Cyber-Premium Dark Theme (2026)
   ============================================================ */

/* --- CSS Custom Properties (Design Tokens) --- */
:root {
  /* Backgrounds */
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-tertiary: #1a1a2e;
  --bg-elevated: #1e1e32;
  --bg-overlay: rgba(10, 10, 15, 0.85);

  /* Accent: Indigo */
  --accent-indigo: #6366f1;
  --accent-indigo-glow: #818cf8;
  --accent-indigo-deep: #4f46e5;
  --accent-indigo-muted: rgba(99, 102, 241, 0.15);
  --accent-indigo-soft: rgba(99, 102, 241, 0.08);

  /* Accent: Emerald */
  --accent-emerald: #10b981;
  --accent-emerald-glow: #34d399;
  --accent-emerald-deep: #059669;
  --accent-emerald-muted: rgba(16, 185, 129, 0.15);

  /* Accent: Cyber-Amber */
  --accent-amber: #f59e0b;
  --accent-amber-glow: #fbbf24;
  --accent-amber-deep: #d97706;
  --accent-amber-muted: rgba(245, 158, 11, 0.15);

  /* Text */
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-tertiary: #64748b;
  --text-inverse: #0a0a0f;

  /* Borders */
  --border-subtle: rgba(99, 102, 241, 0.15);
  --border-medium: rgba(99, 102, 241, 0.25);
  --border-strong: rgba(99, 102, 241, 0.4);

  /* Glass */
  --glass-bg: rgba(18, 18, 26, 0.7);
  --glass-bg-heavy: rgba(18, 18, 26, 0.85);
  --glass-border: rgba(99, 102, 241, 0.2);
  --glass-blur: 20px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 16px 64px rgba(0, 0, 0, 0.6);
  --shadow-glow-indigo: 0 0 30px rgba(99, 102, 241, 0.3);
  --shadow-glow-emerald: 0 0 30px rgba(16, 185, 129, 0.3);
  --shadow-glow-amber: 0 0 30px rgba(245, 158, 11, 0.3);

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;
  --space-5xl: 8rem;

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --font-weight-light: 300;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;
  --font-weight-black: 900;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Z-index layers */
  --z-base: 1;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-overlay: 300;
  --z-modal: 400;
  --z-toast: 500;

  /* Container */
  --container-max: 1280px;
  --container-narrow: 960px;
  --container-wide: 1440px;
}

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

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

body {
  font-family: var(--font-sans);
  font-weight: var(--font-weight-normal);
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  overflow-x: hidden;
  min-height: 100vh;
}

/* Background noise texture overlay */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

body > * {
  position: relative;
  z-index: var(--z-base);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

img, video, svg {
  max-width: 100%;
  height: auto;
  display: block;
}

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  border: none;
  outline: none;
  background: none;
}

button {
  cursor: pointer;
}

ul, ol {
  list-style: none;
}

::selection {
  background: var(--accent-indigo);
  color: var(--text-primary);
}

::-webkit-scrollbar {
  width: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--accent-indigo-muted);
  border-radius: var(--radius-full);
}

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

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-weight-bold);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: var(--font-weight-black); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

.gradient-text {
  background: linear-gradient(135deg, var(--accent-indigo-glow), var(--accent-emerald-glow));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text-warm {
  background: linear-gradient(135deg, var(--accent-amber-glow), var(--accent-indigo-glow));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-accent-indigo { color: var(--accent-indigo-glow); }
.text-accent-emerald { color: var(--accent-emerald-glow); }
.text-accent-amber { color: var(--accent-amber-glow); }
.text-secondary { color: var(--text-secondary); }
.text-tertiary { color: var(--text-tertiary); }
.font-mono { font-family: var(--font-mono); }

/* --- Layout --- */
.page-wrapper {
  min-height: 100vh;
  padding-top: 80px; /* nav height */
}

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

.section-block:nth-child(even) {
  background: var(--bg-secondary);
}

.section-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.section-container.narrow {
  max-width: var(--container-narrow);
}

.section-container.wide {
  max-width: var(--container-wide);
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-4xl);
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xs) var(--space-lg);
  background: var(--accent-indigo-muted);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: var(--font-weight-semibold);
  color: var(--accent-indigo-glow);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-lg);
}

.section-badge.emerald {
  background: var(--accent-emerald-muted);
  color: var(--accent-emerald-glow);
  border-color: rgba(16, 185, 129, 0.2);
}

.section-badge.amber {
  background: var(--accent-amber-muted);
  color: var(--accent-amber-glow);
  border-color: rgba(245, 158, 11, 0.2);
}

.section-title {
  margin-bottom: var(--space-md);
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.7;
}

/* Grid System */
.grid {
  display: grid;
  gap: var(--space-xl);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-xs { gap: var(--space-xs); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }
.gap-2xl { gap: var(--space-2xl); }

/* --- Glass Card --- */
.glass-card {
  position: relative;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  overflow: hidden;
  transition: all var(--transition-base);
}

.glass-card:hover {
  border-color: var(--border-medium);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow-indigo);
}

.glass-card .card-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at center, var(--accent-indigo-muted) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--transition-slow);
  pointer-events: none;
}

.glass-card:hover .card-glow {
  opacity: 1;
}

.glass-card .card-content {
  position: relative;
  z-index: 2;
}

.glass-card.emerald-glow:hover {
  box-shadow: var(--shadow-glow-emerald);
  border-color: rgba(16, 185, 129, 0.3);
}

.glass-card.amber-glow:hover {
  box-shadow: var(--shadow-glow-amber);
  border-color: rgba(245, 158, 11, 0.3);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.75rem 1.75rem;
  font-weight: var(--font-weight-semibold);
  font-size: 0.9rem;
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  white-space: nowrap;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.btn:hover::before {
  opacity: 1;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-indigo), var(--accent-indigo-deep));
  color: white;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--accent-emerald), var(--accent-emerald-deep));
  color: white;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.5);
}

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

.btn-ghost:hover {
  background: var(--accent-indigo-muted);
  border-color: var(--accent-indigo);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--accent-indigo);
  color: var(--accent-indigo-glow);
}

.btn-outline:hover {
  background: var(--accent-indigo);
  color: white;
  transform: translateY(-2px);
}

.btn-sm { padding: 0.5rem 1.25rem; font-size: 0.8rem; }
.btn-md { padding: 0.75rem 1.75rem; font-size: 0.9rem; }
.btn-lg { padding: 1rem 2.5rem; font-size: 1rem; }
.btn-xl { padding: 1.25rem 3rem; font-size: 1.1rem; }

.btn-disabled, .btn[disabled], .btn[aria-disabled="true"] {
  opacity: 0.5;
  pointer-events: none;
  cursor: not-allowed;
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-md);
}

/* --- Floating Asset Container --- */
.floating-asset-container {
  position: absolute;
  pointer-events: none;
  mix-blend-mode: lighten;
  z-index: 1;
}

.floating-asset-container .asset-glow-ring {
  position: absolute;
  inset: -20%;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-indigo-muted) 0%, transparent 70%);
  animation: pulse-glow 4s ease-in-out infinite;
}

.floating-asset-container .asset-placeholder {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.floating-asset-container .asset-3d-mock {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--accent-indigo-muted), var(--accent-emerald-muted));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  opacity: 0.6;
}

/* --- Form Elements --- */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.form-label {
  font-size: 0.875rem;
  font-weight: var(--font-weight-medium);
  color: var(--text-secondary);
}

.form-input,
.form-textarea,
.form-select {
  padding: 0.75rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: all var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--accent-indigo);
  box-shadow: 0 0 0 3px var(--accent-indigo-muted);
}

.form-input.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.form-input.success {
  border-color: var(--accent-emerald);
  box-shadow: 0 0 0 3px var(--accent-emerald-muted);
}

.form-error {
  font-size: 0.8rem;
  color: #ef4444;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

/* --- Status Badges --- */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-badge.active {
  background: var(--accent-emerald-muted);
  color: var(--accent-emerald-glow);
}

.status-badge.active::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-emerald);
  animation: pulse-dot 2s ease-in-out infinite;
}

.status-badge.coming-soon {
  background: var(--accent-amber-muted);
  color: var(--accent-amber-glow);
}

.status-badge.inactive {
  background: rgba(100, 116, 139, 0.15);
  color: var(--text-tertiary);
}

/* --- Tags / Chips --- */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background: var(--accent-indigo-soft);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: var(--font-weight-medium);
}

/* --- Metric Card --- */
.metric-card {
  text-align: center;
  padding: var(--space-2xl);
}

.metric-value {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: var(--font-weight-black);
  line-height: 1;
  margin-bottom: var(--space-sm);
}

.metric-label {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* --- Dividers --- */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-subtle), transparent);
  margin: var(--space-2xl) 0;
}

/* ═══ Responsive ═══ */
@media (min-width: 1440px) {
  .section-container { padding: 0 var(--space-3xl); }
  .section-header { max-width: 800px; }
}

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .section-block { padding: var(--space-4xl) 0; }
  .section-header { margin-bottom: var(--space-3xl); }
}

@media (max-width: 768px) {
  .grid-4,
  .grid-3,
  .grid-2 { grid-template-columns: 1fr; }

  .section-block {
    padding: var(--space-3xl) 0;
  }

  .section-container {
    padding: 0 var(--space-lg);
  }

  .glass-card {
    padding: var(--space-lg);
  }

  .section-header {
    margin-bottom: var(--space-2xl);
    max-width: 100%;
  }

  .section-subtitle {
    font-size: 0.95rem;
  }

  .btn-xl { padding: 0.9rem 2rem; font-size: 0.95rem; }
  .btn-lg { padding: 0.85rem 1.75rem; font-size: 0.9rem; }
}

@media (max-width: 480px) {
  html { font-size: 15px; }

  .section-block { padding: var(--space-2xl) 0; }

  .section-container { padding: 0 var(--space-md); }

  .glass-card { padding: var(--space-md); border-radius: var(--radius-md); }

  .section-badge { font-size: 0.7rem; padding: var(--space-xs) var(--space-md); }

  .section-subtitle { font-size: 0.88rem; }

  .btn { padding: 0.6rem 1.25rem; font-size: 0.82rem; }
  .btn-xl { padding: 0.75rem 1.5rem; font-size: 0.88rem; }
  .btn-lg { padding: 0.7rem 1.5rem; font-size: 0.85rem; }

  .grid { gap: var(--space-md); }
}

@media (max-width: 360px) {
  html { font-size: 14px; }
  .section-container { padding: 0 var(--space-sm); }
  .glass-card { padding: var(--space-md) var(--space-sm); }
}

/* --- Utility Classes --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border-width: 0;
}

.relative { position: relative; }
.overflow-hidden { overflow: hidden; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mx-auto { margin-left: auto; margin-right: auto; }
.w-full { width: 100%; }
.h-full { height: 100%; }
.opacity-0 { opacity: 0; }
.opacity-100 { opacity: 1; }
.absolute { position: absolute; }
.pointer-events-none { pointer-events: none; }
.mix-blend-lighten { mix-blend-mode: lighten; }

/* Grid background */
.grid-bg {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(99,102,241,0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(99,102,241,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}
