/* Random Test Project — shared design system */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg-deep: #0a0e17;
  --bg-surface: rgba(18, 24, 38, 0.72);
  --bg-elevated: rgba(28, 36, 56, 0.85);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(56, 232, 198, 0.35);
  --text-primary: #f0f4fc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent: #38e8c6;
  --accent-dim: rgba(56, 232, 198, 0.15);
  --accent-warm: #ff6b6b;
  --accent-violet: #a78bfa;
  --gradient-hero: linear-gradient(135deg, #38e8c6 0%, #6366f1 50%, #ff6b6b 100%);
  --shadow-lg: 0 24px 48px rgba(0, 0, 0, 0.4);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --font-sans: 'DM Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

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

/* Animated mesh background */
.mesh-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(56, 232, 198, 0.12) 0%, transparent 55%),
    radial-gradient(ellipse 70% 50% at 80% 20%, rgba(99, 102, 241, 0.14) 0%, transparent 50%),
    radial-gradient(ellipse 60% 70% at 50% 90%, rgba(255, 107, 107, 0.08) 0%, transparent 55%),
    var(--bg-deep);
}

.mesh-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
}

/* Layout */
.container {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

/* Navigation */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 14, 23, 0.75);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1.05rem;
}

.nav-brand-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--gradient-hero);
  display: grid;
  place-items: center;
  font-size: 0.85rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition), background var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
  background: var(--accent-dim);
}

.nav-links a.active {
  color: var(--accent);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--gradient-hero);
  color: var(--bg-deep);
  box-shadow: 0 8px 24px rgba(56, 232, 198, 0.25);
}

.btn-primary:hover {
  box-shadow: 0 12px 32px rgba(56, 232, 198, 0.35);
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  border-color: var(--border-glow);
  background: var(--accent-dim);
}

/* Hero */
.hero {
  padding: 5rem 0 4rem;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: var(--accent-dim);
  border: 1px solid var(--border-glow);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 1.5rem;
  animation: fade-up 0.6s ease-out;
}

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

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
  animation: fade-up 0.6s ease-out 0.1s both;
}

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

.hero p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto 2rem;
  animation: fade-up 0.6s ease-out 0.2s both;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  animation: fade-up 0.6s ease-out 0.3s both;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  padding: 2rem 0 4rem;
}

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  backdrop-filter: blur(16px);
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

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

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.card-icon.cyan { background: rgba(56, 232, 198, 0.15); }
.card-icon.violet { background: rgba(167, 139, 250, 0.15); }
.card-icon.coral { background: rgba(255, 107, 107, 0.15); }

.card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.card p {
  color: var(--text-secondary);
  font-size: 0.92rem;
}

/* Section */
.section {
  padding: 3rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-header h2 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.section-header p {
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 auto;
}

/* Stats row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  font-family: var(--font-mono);
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Tabs (example page) */
.tabs {
  display: flex;
  gap: 0.35rem;
  padding: 0.35rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.tab-btn {
  flex: 1;
  min-width: 120px;
  padding: 0.65rem 1rem;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
}

.tab-btn:hover {
  color: var(--text-primary);
}

.tab-btn.active {
  background: var(--accent-dim);
  color: var(--accent);
}

.tab-panel {
  display: none;
  animation: fade-up 0.35s ease-out;
}

.tab-panel.active {
  display: block;
}

/* Code block */
.code-block {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.7;
  overflow-x: auto;
  color: var(--text-secondary);
}

.code-block .keyword { color: var(--accent-violet); }
.code-block .string { color: var(--accent); }
.code-block .comment { color: var(--text-muted); }

/* Feature list */
.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.feature-list li::before {
  content: '✓';
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
}

/* Demo panel */
.demo-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  backdrop-filter: blur(16px);
}

/* Color swatches */
.swatch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 0.75rem;
}

.swatch {
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: flex-end;
  padding: 0.5rem;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: rgba(255, 255, 255, 0.8);
}

/* Footer */
.footer {
  border-top: 1px solid var(--border-subtle);
  padding: 2rem 0;
  margin-top: 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer a {
  color: var(--accent);
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

/* Error page */
.error-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}

.error-code {
  font-size: clamp(5rem, 15vw, 9rem);
  font-weight: 700;
  font-family: var(--font-mono);
  line-height: 1;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0.9;
}

.error-page h1 {
  font-size: 1.5rem;
  margin: 1rem 0 0.5rem;
}

.error-page p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 400px;
}

/* Responsive */
@media (max-width: 600px) {
  .nav {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem 0;
  }

  .hero {
    padding: 3rem 0 2rem;
  }
}
