/* ============================================
   DESIGN SYSTEM — Bio-Tech Futurism
   Технологии Репликации
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Exo+2:wght@300;400;600;700;900&family=JetBrains+Mono:wght@400;700&display=swap');

:root {
  color-scheme: dark;

  /* ── Backgrounds ── */
  --bg-primary: #050810;
  --bg-secondary: #090d1a;
  --bg-tertiary: #0c1225;
  --tile-bg: rgba(10, 18, 35, 0.85);
  --tile-bg-solid: #0a1223;
  --tile-border: rgba(0, 200, 255, 0.15);
  --tile-border-hover: rgba(0, 200, 255, 0.4);

  /* ── Accent Colors ── */
  --accent-cyan: #00c8ff;
  --accent-blue: #0066ff;
  --accent-purple: #7b2fff;
  --accent-glow: rgba(0, 200, 255, 0.4);
  --accent-glow-strong: rgba(0, 200, 255, 0.6);
  --accent-cyan-dim: rgba(0, 200, 255, 0.08);
  --accent-cyan-mid: rgba(0, 200, 255, 0.2);

  /* ── Text ── */
  --text-primary: #e8f4ff;
  --text-secondary: #7a9bb5;
  --text-muted: #4a6a80;
  --text-accent: var(--accent-cyan);

  /* ── Neural / Circuit ── */
  --node-color: #00c8ff;
  --circuit-line: rgba(0, 200, 255, 0.2);

  /* ── Borders & Shadows ── */
  --border-glass: rgba(0, 200, 255, 0.12);
  --shadow-tile: 0 4px 30px rgba(0, 0, 0, 0.3);
  --shadow-tile-hover: 0 20px 60px rgba(0, 200, 255, 0.15);
  --shadow-glow: 0 0 30px var(--accent-glow);
  --shadow-glow-strong: 0 0 60px var(--accent-glow-strong);

  /* ── Radii ── */
  --radius-xl: 20px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;

  /* ── Layout ── */
  --container: 1380px;
  --gap: 16px;

  /* ── Fonts ── */
  --font-main: 'Exo 2', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

/* ── Reset & Base ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-main);
  color: var(--text-primary);
  background:
    radial-gradient(circle at top right, rgba(0, 200, 255, 0.09), transparent 26%),
    radial-gradient(circle at bottom left, rgba(123, 47, 255, 0.09), transparent 30%),
    linear-gradient(180deg, var(--bg-secondary), var(--bg-primary) 26%, var(--bg-primary));
  overflow-x: hidden;
  line-height: 1.6;
  min-height: 100vh;
  transition: background 0.4s ease, color 0.3s ease;
}

/* ── Neural Canvas Background ── */
#neural-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.35s ease, filter 0.35s ease;
}

/* ── Typography ── */
a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--accent-cyan);
}

img {
  display: block;
  max-width: 100%;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  line-height: 1.2;
}

p { margin: 0; }

h1 {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 900;
  background: linear-gradient(135deg, #fff 0%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 700;
  color: var(--text-primary);
}

h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

code, .mono {
  font-family: var(--font-mono);
}

.tile-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent-cyan);
  letter-spacing: 3px;
  text-transform: uppercase;
}

/* ── Container ── */
.container {
  width: min(var(--container), calc(100% - 40px));
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

/* ── Все основные секции поверх canvas ── */
.site-header,
main,
footer,
.site-footer {
  position: relative;
  z-index: 1;
}

/* ── Accent Text ── */
.accent-text,
.hero-title-accent {
  color: var(--accent-cyan);
  -webkit-text-fill-color: var(--accent-cyan);
}

/* ── Selection ── */
::selection {
  background: rgba(0, 200, 255, 0.3);
  color: #fff;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 200, 255, 0.3);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 200, 255, 0.5);
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
