/* ===== CSS VARIABLES ===== */
:root {
  /* Аналоговая цветовая схема: оранжево-красная гамма */
  --primary-color: #FF6B35;
  --primary-dark: #E55A2B;
  --primary-light: #FF8A65;
  --secondary-color: #FF8E53;
  --accent-color: #FFB74D;
  --accent-dark: #FF9800;
  --tertiary-color: #FFCC80;
  
  /* Нейтральные цвета */
  --white: #FFFFFF;
  --black: #212121;
  --gray-100: #F8F9FA;
  --gray-200: #E9ECEF;
  --gray-300: #DEE2E6;
  --gray-400: #CED4DA;
  --gray-500: #ADB5BD;
  --gray-600: #6C757D;
  --gray-700: #495057;
  --gray-800: #343A40;
  --gray-900: #212529;
  
  /* Биоморфные градиенты */
  --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  --gradient-accent: linear-gradient(135deg, var(--accent-color), var(--tertiary-color));
  --gradient-overlay: linear-gradient(135deg, rgba(255, 107, 53, 0.9), rgba(255, 142, 83, 0.8));
  --gradient-hero: linear-gradient(135deg, rgba(0, 0, 0, 0.6), rgba(33, 33, 33, 0.4));
  
  /* Типографика */
  --font-heading: 'Oswald', sans-serif;
  --font-body: 'Nunito', sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;
  --font-size-5xl: 3rem;
  
  /* Размеры и отступы */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --spacing-3xl: 4rem;
  
  /* Тени и эффекты */
  --shadow-sm: 0 2px 4px rgba(255, 107, 53, 0.1);
  --shadow-md: 0 4px 12px rgba(255, 107, 53, 0.15);
  --shadow-lg: 0 8px 24px rgba(255, 107, 53, 0.2);
  --shadow-xl: 0 16px 48px rgba(255, 107, 53, 0.25);
  
  /* Биоморфные радиусы */
  --radius-sm: 0.5rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
  --radius-xl: 2rem;
  --radius-organic: 2rem 1rem 2.5rem 0.75rem;
  --radius-blob: 40% 60% 60% 40% / 60% 30% 70% 40%;
  
  /* Переходы */
  --transition-fast: 0.15s ease-out;
  --transition-base: 0.3s ease-out;
  --transition-slow: 0.5s ease-out;
  --transition-organic: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== RESET & BASE STYLES ===== */
* {
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: var(--gray-800);
  background-color: var(--white);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--spacing-lg);
  color: var(--gray-900);
}

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

p {
  margin-bottom: var(--spacing-md);
  color: var(--gray-700);
}

.lead {
  font-size: var(--font-size-lg);
  font-weight: 400;
  color: var(--gray-600);
}

.section-title {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--gradient-primary);
  border-radius: var(--radius-sm);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-md) var(--spacing-xl);
  font-family: var(--font-heading);
  font-size: var(--font-size-base);
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: var(--radius-organic);
  cursor: pointer;
  transition: all var(--transition-organic);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left var(--transition-slow);
  z-index: -1;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: var(--gradient-primary);
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--shadow-lg);
  color: var(--white);
}

.btn-secondary {
  background: var(--gradient-accent);
  color: var(--gray-800);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--shadow-md);
  color: var(--gray-800);
}

.btn-outline-light {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}

.btn-outline-light:hover {
  background: var(--white);
  color: var(--primary-color);
  border-color: var(--white);
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--shadow-lg);
}

.btn-outline-primary {
  background: transparent;
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-outline-primary:hover {
  background: var(--primary-color);
  color: var(--white);
  border-color: var(--primary-color);
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--shadow-md);
}

.btn-lg {
  padding: var(--spacing-lg) var(--spacing-2xl);
  font-size: var(--font-size-lg);
  border-radius: var(--radius-xl);
}

/* ===== HEADER & NAVIGATION ===== */
.navbar {
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  padding: var(--spacing-md) 0;
}

.navbar-brand {
  font-family: var(--font-heading);
  font-size: var(--font-size-2xl);
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none !important;
}

.navbar-nav .nav-link {
  font-family: var(--font-heading);
  font-weight: 500;
  color: var(--gray-700) !important;
  margin: 0 var(--spacing-sm);
  padding: var(--spacing-sm) var(--spacing-md) !important;
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  position: relative;
}

.navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: all var(--transition-base);
  transform: translateX(-50%);
}

.navbar-nav .nav-link:hover {
  color: var(--primary-color) !important;
  background-color: rgba(255, 107, 53, 0.1);
}

.navbar-nav .nav-link:hover::after {
  width: 80%;
}

.navbar-toggler {
  border: none;
  color: var(--primary-color);
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 0.2rem rgba(255, 107, 53, 0.25);
}

/* ===== HERO SECTION ===== */
.hero-section {
  position: relative;
  background: var(--gray-900);
  overflow: hidden;
}

.hero-background {
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-hero);
  z-index: 2;
}

.hero-section .container {
  position: relative;
  z-index: 3;
}

.hero-section h1 {
  color: var(--white) !important;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  margin-bottom: var(--spacing-xl);
}

.hero-section p {
  color: var(--white) !important;
  font-size: var(--font-size-lg);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
  margin-bottom: var(--spacing-2xl);
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-lg);
  justify-content: center;
  align-items: center;
}

.hero-scroll-indicator {
  animation: bounce 2s infinite;
}

.scroll-arrow {
  width: 24px;
  height: 24px;
  border-right: 2px solid var(--white);
  border-bottom: 2px solid var(--white);
  transform: rotate(45deg);
  margin-bottom: var(--spacing-xl);
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0) translateX(-50%); }
  40% { transform: translateY(-10px) translateX(-50%); }
  60% { transform: translateY(-5px) translateX(-50%); }
}

/* ===== CARD STYLES ===== */
.card {
  border: none;
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-organic);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-8px) rotate(0.5deg);
  box-shadow: var(--shadow-xl);
}

.card-img-top {
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: all var(--transition-slow);
}

.card:hover .card-img-top {
  transform: scale(1.05);
}

.card-body,
.card-content {
  padding: var(--spacing-xl);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  text-align: center;
  align-items: center;
}

.card-title {
  color: var(--gray-900);
  font-family: var(--font-heading);
  margin-bottom: var(--spacing-md);
}

.card-text {
  color: var(--gray-600);
  flex-grow: 1;
  margin-bottom: var(--spacing-lg);
}

.card-image {
  overflow: hidden;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  position: relative;
}

.card-image img {
  transition: all var(--transition-slow);
  display: block;
  margin: 0 auto;
}

/* ===== SERVICE CARDS ===== */
.service-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-organic);
  position: relative;
  display: flex;
  flex-direction: column;
  text-align: center;
  align-items: center;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 4px;
  background: var(--gradient-primary);
  transition: left var(--transition-slow);
}

.service-card:hover::before {
  left: 0;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

/* ===== AWARDS SECTION ===== */
.award-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
  border: 2px solid var(--gray-100);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  height: 100%;
}

.award-card:hover {
  border-color: var(--primary-color);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.award-card img {
  border-radius: 50%;
  margin: 0 auto;
  filter: grayscale(100%);
  transition: all var(--transition-base);
}

.award-card:hover img {
  filter: grayscale(0%);
  transform: scale(1.1);
}

/* ===== TIMELINE ===== */
.timeline-container {
  position: relative;
  padding: var(--spacing-2xl) 0;
}

.timeline-container::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--gradient-primary);
  transform: translateX(-50%);
  border-radius: var(--radius-sm);
}

.timeline-item {
  margin-bottom: var(--spacing-3xl);
  position: relative;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 20px;
  height: 20px;
  background: var(--primary-color);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  box-shadow: 0 0 0 4px var(--white), 0 0 0 8px var(--primary-color);
}

.timeline-content {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--spacing-2xl);
  box-shadow: var(--shadow-md);
  margin: 0 var(--spacing-xl);
  transition: all var(--transition-base);
}

.timeline-content:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-lg);
}

/* ===== PRESS SECTION ===== */
.press-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
  height: 100%;
  display: flex;
  flex-direction: column;
  text-align: center;
  align-items: center;
}

.press-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.press-card .card-img-top {
  height: 200px;
  object-fit: cover;
}

/* ===== CAREER SECTION ===== */
.career-card {
  background: linear-gradient(135deg, var(--white), var(--gray-100));
  border-radius: var(--radius-lg);
  border: 2px solid var(--gray-200);
  transition: all var(--transition-organic);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-align: center;
  align-items: center;
}

.career-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(255, 107, 53, 0.1), transparent);
  transform: scale(0);
  transition: transform var(--transition-slow);
}

.career-card:hover::before {
  transform: scale(2);
}

.career-card:hover {
  border-color: var(--primary-color);
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

/* ===== RESOURCES SECTION ===== */
.resource-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 2px solid var(--gray-200);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.resource-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transition: transform var(--transition-base);
}

.resource-card:hover::after {
  transform: scaleX(1);
}

.resource-card:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
}

/* ===== METHODOLOGY SECTION ===== */
.methodology-content h3 {
  color: var(--gray-900);
  position: relative;
}

.methodology-content h3::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 50px;
  height: 3px;
  background: var(--gradient-primary);
  border-radius: var(--radius-sm);
}

/* ===== CONTACT SECTION ===== */
.contact-form-container {
  border-radius: var(--radius-xl);
  position: relative;
  overflow: hidden;
}

.contact-form-container::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: var(--gradient-primary);
  border-radius: var(--radius-xl);
  z-index: -1;
}

.form-control,
.form-select {
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: var(--spacing-md) var(--spacing-lg);
  font-size: var(--font-size-base);
  transition: all var(--transition-base);
  background: var(--white);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(255, 107, 53, 0.25);
  outline: none;
}

.form-label {
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: var(--spacing-sm);
}

/* ===== FOOTER ===== */
.footer {
  background: var(--gray-900) !important;
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
}

.footer h5,
.footer h6 {
  color: var(--white);
  font-family: var(--font-heading);
}

.footer a {
  color: var(--gray-400);
  text-decoration: none;
  transition: all var(--transition-base);
  position: relative;
}

.footer a:hover {
  color: var(--primary-color);
}

.social-links a {
  display: inline-flex;
  align-items: center;
  padding: var(--spacing-sm) var(--spacing-md);
  margin-right: var(--spacing-sm);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.1);
  transition: all var(--transition-base);
}

.social-links a:hover {
  background: var(--primary-color);
  color: var(--white);
  transform: translateY(-2px);
}

/* ===== SUCCESS PAGE ===== */
.success-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-primary);
  color: var(--white);
  text-align: center;
  padding: var(--spacing-xl);
}

.success-content {
  max-width: 600px;
  margin: 0 auto;
}

.success-content h1 {
  color: var(--white) !important;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  margin-bottom: var(--spacing-xl);
}

.success-content p {
  color: var(--white) !important;
  font-size: var(--font-size-lg);
  margin-bottom: var(--spacing-2xl);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* ===== PRIVACY & TERMS PAGES ===== */
.privacy-page,
.terms-page {
  padding-top: 100px;
  min-height: calc(100vh - 100px);
}

.privacy-content,
.terms-content {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--spacing-2xl);
}

.privacy-content h1,
.terms-content h1 {
  color: var(--gray-900);
  margin-bottom: var(--spacing-2xl);
  text-align: center;
}

.privacy-content h2,
.terms-content h2 {
  color: var(--primary-color);
  margin-top: var(--spacing-2xl);
  margin-bottom: var(--spacing-lg);
  border-bottom: 2px solid var(--gray-200);
  padding-bottom: var(--spacing-sm);
}

/* ===== UTILITY CLASSES ===== */
.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bg-gradient-primary {
  background: var(--gradient-primary);
}

.bg-gradient-accent {
  background: var(--gradient-accent);
}

.rounded-organic {
  border-radius: var(--radius-organic);
}

.rounded-blob {
  border-radius: var(--radius-blob);
}

.shadow-organic {
  box-shadow: var(--shadow-lg);
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.animate-pulse-soft {
  animation: pulse-soft 2s ease-in-out infinite;
}

@keyframes pulse-soft {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

.animate-draw {
  animation: draw 2s ease-out forwards;
}

@keyframes draw {
  from {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
  }
  to {
    stroke-dasharray: 1000;
    stroke-dashoffset: 0;
  }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 992px) {
  .timeline-container::before {
    left: 30px;
  }
  
  .timeline-item::before {
    left: 30px;
  }
  
  .timeline-content {
    margin-left: 60px;
    margin-right: 0;
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 768px) {
  :root {
    --font-size-5xl: 2.5rem;
    --font-size-4xl: 2rem;
    --font-size-3xl: 1.75rem;
    --spacing-2xl: 2rem;
    --spacing-3xl: 2.5rem;
  }
  
  .hero-section {
    padding: var(--spacing-2xl) 0;
  }
  
  .section-title {
    font-size: var(--font-size-3xl) !important;
  }
  
  .btn-lg {
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: var(--font-size-base);
  }
  
  .timeline-container::before {
    display: none;
  }
  
  .timeline-item::before {
    display: none;
  }
  
  .timeline-content {
    margin: 0;
  }
  
  .navbar-nav {
    text-align: center;
    padding: var(--spacing-lg) 0;
  }
  
  .card-body,
  .card-content {
    padding: var(--spacing-lg);
  }
}

@media (max-width: 576px) {
  .container {
    padding-left: var(--spacing-lg);
    padding-right: var(--spacing-lg);
  }
  
  .hero-section h1 {
    font-size: var(--font-size-4xl) !important;
  }
  
  .hero-section p {
    font-size: var(--font-size-base) !important;
  }
  
  .btn {
    width: 100%;
    max-width: 300px;
  }
  
  .social-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
  }
  
  .social-links a {
    flex: 1;
    min-width: 120px;
    justify-content: center;
  }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* ===== FOCUS STYLES ===== */
*:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.btn:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* ===== PRINT STYLES ===== */
@media print {
  .navbar,
  .hero-scroll-indicator,
  .btn,
  .contact-form-container {
    display: none !important;
  }
  
  body {
    color: #000 !important;
    background: #fff !important;
  }
  
  .section-title {
    color: #000 !important;
    -webkit-text-fill-color: #000 !important;
  }
}