/* ================================
   CLEAN & SCIENTIFIC DESIGN SYSTEM
   Modern lab aesthetic - professional, clean, trustworthy
   ================================ */

:root {
  /* ========== Primary Color Palette - Clean & Scientific ========== */
  --primary: #10b981;        /* Fresh emerald green - vitality, science, growth */
  --primary-dark: #059669;   /* Deep emerald */
  --primary-light: #34d399;  /* Light emerald */
  --primary-lighter: #6ee7b7;/* Very light emerald */
  
  --secondary: #1a365d;      /* Deep navy - trust, professionalism, depth */
  --secondary-dark: #0f2744; /* Darker navy */
  --secondary-light: #2d4a7c;/* Lighter navy */
  --secondary-lighter: #3b5998;/* Even lighter navy */
  
  --accent: #3b82f6;         /* Clean blue - clarity, precision */
  --accent-dark: #2563eb;    /* Deep blue */
  --accent-light: #60a5fa;   /* Light blue */
  --accent-lighter: #93c5fd; /* Very light blue */
  
  /* ========== Neutral Colors - Clean Backgrounds ========== */
  --white: #ffffff;
  --off-white: #fafafa;      /* Slightly off-white for subtle contrast */
  --gray-50: #f9fafb;        /* Very light gray background */
  --gray-100: #f3f4f6;       /* Light gray background */
  --gray-200: #e5e7eb;       /* Border gray */
  --gray-300: #d1d5db;       /* Muted border */
  --gray-400: #9ca3af;       /* Muted text */
  --gray-500: #6b7280;       /* Secondary text */
  --gray-600: #4b5563;       /* Body text */
  --gray-700: #374151;       /* Headings */
  --gray-800: #1f2937;       /* Dark text */
  --gray-900: #111827;       /* Darkest text */
  
  /* ========== Semantic Colors ========== */
  --success: #10b981;
  --info: #3b82f6;
  --warning: #f59e0b;
  --danger: #ef4444;
  
  /* ========== Spacing Scale (4px base) ========== */
  --space-0: 0;
  --space-1: 0.25rem;   /* 4px */
  --space-2: 0.5rem;    /* 8px */
  --space-3: 0.75rem;   /* 12px */
  --space-4: 1rem;      /* 16px */
  --space-5: 1.25rem;   /* 20px */
  --space-6: 1.5rem;    /* 24px */
  --space-8: 2rem;      /* 32px */
  --space-10: 2.5rem;   /* 40px */
  --space-12: 3rem;     /* 48px */
  --space-16: 4rem;     /* 64px */
  --space-20: 5rem;     /* 80px */
  --space-24: 6rem;     /* 96px */
  --space-32: 8rem;     /* 128px */
  
  /* ========== Typography Scale ========== */
  --text-xs: 0.75rem;      /* 12px */
  --text-sm: 0.875rem;     /* 14px */
  --text-base: 1rem;       /* 16px */
  --text-lg: 1.125rem;     /* 18px */
  --text-xl: 1.25rem;      /* 20px */
  --text-2xl: 1.5rem;      /* 24px */
  --text-3xl: 1.875rem;    /* 30px */
  --text-4xl: 2.25rem;     /* 36px */
  --text-5xl: 3rem;        /* 48px */
  --text-6xl: 3.75rem;     /* 60px */
  --text-7xl: 4.5rem;      /* 72px */
  
  /* ========== Font Weights ========== */
  --font-light: 300;
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extrabold: 800;
  
  /* ========== Line Heights ========== */
  --leading-none: 1;
  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  --leading-loose: 2;
  
  /* ========== Border Radius ========== */
  --radius-none: 0;
  --radius-sm: 0.25rem;    /* 4px */
  --radius-base: 0.5rem;   /* 8px */
  --radius-md: 0.75rem;    /* 12px */
  --radius-lg: 1rem;       /* 16px */
  --radius-xl: 1.5rem;     /* 24px */
  --radius-2xl: 2rem;      /* 32px */
  --radius-full: 9999px;   /* Fully rounded */
  
  /* ========== Shadows - Subtle & Professional ========== */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  --shadow-base: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  
  /* ========== Z-index Scale ========== */
  --z-base: 0;
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
  
  /* ========== 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: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========== Typography Base ========== */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--gray-700);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  color: var(--gray-900);
  margin: 0 0 var(--space-4) 0;
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

p {
  margin: 0 0 var(--space-4) 0;
}

/* ========== Utility Classes ========== */

/* Container */
.container-clean {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

/* Glass Effect - Subtle */
.glass-clean {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid var(--gray-200);
}

/* Card Styles */
.card-clean {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--space-6);
  transition: all var(--transition-base);
}

.card-clean:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* Buttons - Clean & Professional */
.btn-clean {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  line-height: 1;
  border-radius: var(--radius-base);
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
}

.btn-clean-primary {
  background: var(--primary);
  color: var(--white);
}

.btn-clean-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-clean-secondary {
  background: var(--secondary);
  color: var(--white);
}

.btn-clean-secondary:hover {
  background: var(--secondary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-clean-outline {
  background: transparent;
  color: var(--secondary);
  border: 2px solid var(--secondary);
}

.btn-clean-outline:hover {
  background: var(--secondary);
  color: var(--white);
}

/* Badges */
.badge-clean {
  display: inline-flex;
  align-items: center;
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  border-radius: var(--radius-full);
  background: var(--gray-100);
  color: var(--gray-700);
}

.badge-clean-primary {
  background: rgba(16, 185, 129, 0.1);
  color: var(--primary-dark);
}

.badge-clean-secondary {
  background: rgba(26, 54, 93, 0.1);
  color: var(--secondary);
}

/* Sections */
.section-clean {
  padding: var(--space-20) 0;
}

.section-clean-gray {
  background: var(--gray-50);
}

/* Focus Styles */
*:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Selection */
::selection {
  background: var(--primary-light);
  color: var(--white);
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* ========== Scroll to Top Button ========== */
#scrollBtn {
  position: fixed;
  bottom: var(--space-8);
  right: var(--space-8);
  width: 56px;
  height: 56px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xl);
  box-shadow: var(--shadow-lg);
  transition: all var(--transition-base);
  z-index: var(--z-fixed);
}

#scrollBtn:hover {
  background: var(--primary-dark);
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

/* SVG кольцо */
.progress-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 56px;
  height: 56px;
  transform: rotate(-90deg);
  z-index: 10;
  pointer-events: none;
}

.progress-ring circle {
  fill: none;
  stroke-width: 3;
}

.progress-ring circle.bg {
  stroke: rgba(255, 255, 255, 0.2);
}

.progress-ring circle.progress {
  stroke: var(--white);
  stroke-linecap: round;
  stroke-dasharray: 163.36; /* длина окружности = 2πr */
  stroke-dashoffset: 0; /* чтобы кольцо было полным */
  transition: stroke-dashoffset 0.1s ease;
}

/* стрелка */
#scrollBtn i {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  pointer-events: none;
}

/* Без анимаций при reduce motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  #scrollBtn {
    transition: none !important;
  }
}


