:root {
  /* Цветовая палитра - Системный премиум-минимализм */
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-alt: #f1f5f9;
  --text: #0f172a;
  --muted: #475569;
  --line: #cbd5e1;
  --line-light: #e2e8f0;
  
  /* Акценты */
  --primary: #0f172a;
  --primary-hover: #1e293b;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-success: #10b981;
  --accent-telegram: #24a1de;
  --accent-telegram-hover: #1a8cc2;

  /* Геометрия и Сетка */
  --radius: 10px;        /* Четкие, строгие углы для карточек */
  --radius-sm: 6px;      /* Для кнопок и полей ввода */
  --radius-lg: 16px;     /* Максимальный радиус для крупных контейнеров */
  --container: 1180px;
  
  /* Тени - Легкие, структурные */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.08);

  /* Типографика */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px; /* Учитываем высоту sticky-шапки */
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.container {
  width: min(calc(100% - 2rem), var(--container));
  margin: 0 auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  background: rgba(248, 251, 255, 0.92);
  border-bottom: 1px solid rgba(219, 228, 239, 0.7);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  font-weight: 700;
}

.brand-mark {
  width: 2.4rem;
  height: 2.4rem;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  color: #fff;
  background: var(--primary);
  box-shadow: var(--shadow-sm);
  font-weight: 800;
}

.brand-text {
  font-size: 0.98rem;
}

.nav-toggle {
  width: 2.8rem;
  height: 2.8rem;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
}

.nav-toggle span:not(.sr-only) {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
}

.nav-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 1rem;
  right: 1rem;
  display: none;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.nav-menu.is-open {
  display: flex;
}

.nav-menu a {
  color: var(--muted);
  font-weight: 500;
}

.hero {
  padding: 4rem 0 2.5rem;
}

.hero-grid,
.approach-grid,
.credentials-grid {
  display: grid;
  gap: 1.5rem;
}

.contact-grid {
  display: grid;
  gap: 1.5rem;
  max-width: 680px;
  margin: 0 auto;
}

.contact-form-wrapper {
  text-align: center;
}

.eyebrow {
  margin: 0 0 0.85rem;
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero h1,
.section-heading h2 {
  margin: 0;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.hero h1 {
  font-size: clamp(2.1rem, 6vw, 4.8rem);
  max-width: 14ch;
}

/* Специальный класс для уменьшения высоты заголовка */
.hero-title-compact {
  font-size: clamp(1.5rem, 4.5vw, 3.2rem) !important;
  line-height: 1.1 !important;
}

.hero-lead,
.approach-lead {
  color: var(--muted);
  font-size: 1.02rem;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin: 1.75rem 0;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.2rem;
  padding: 0.8rem 1.4rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  cursor: pointer;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
}

.button-primary {
  color: #fff;
  background: var(--primary);
  box-shadow: var(--shadow-sm);
}

.button-primary:hover {
  background: var(--primary-hover);
}

.button-secondary {
  color: var(--text);
  background: var(--surface);
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}

.button-secondary:hover {
  background: var(--surface-alt);
  border-color: var(--muted);
}

.button-accent {
  color: #fff;
  background: var(--accent);
  box-shadow: var(--shadow-sm);
}

.button-accent:hover {
  background: var(--accent-hover);
}

.button-telegram {
  color: #fff;
  background: var(--accent-telegram);
  box-shadow: var(--shadow-sm);
}

.button-telegram:hover {
  background: var(--accent-telegram-hover);
}

.button-outline {
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line);
}

.button-outline:hover {
  background: var(--surface-alt);
}

.badge-professional {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.15rem 0.45rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text);
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: 4px;
  vertical-align: middle;
}

.hero-audit-link {
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

.hero-audit-link a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hero-audit-link a:hover,
.hero-audit-link a:focus-visible {
  color: var(--primary);
}

.button-full {
  width: 100%;
}

.hero-points {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.hero-points li,
.metric-card,
.card,
.service-card,
.timeline-item,
.credential-card,
.contact-form,
.hero-card {
  background: var(--surface);
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-points li {
  padding: 0.65rem 0.85rem;
  font-weight: 600;
}

.hero-card {
  overflow: hidden;
}

.portrait-wrap {
  padding: 1rem 1rem 0;
}

.portrait {
  width: min(100%, 380px);
  margin: 0 auto;
  border-radius: var(--radius-sm);
  background: #fff;
  border: 1px solid var(--line-light);
}

.hero-card-body {
  padding: 1.5rem;
}

.hero-card-body h2 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
}

.hero-card-body p {
  margin: 0;
}

.profile-meta {
  display: grid;
  gap: 0.6rem;
  margin-top: 1rem;
}

.profile-meta dt {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.profile-meta dd {
  margin-top: 0.1rem;
  font-weight: 600;
}

.section {
  padding: 2.5rem 0;
}

.section-alt {
  background: linear-gradient(180deg, rgba(238, 244, 250, 0.78) 0%, rgba(244, 247, 251, 0) 100%);
}

.section-heading {
  max-width: 54rem;
  margin: 0 auto 1.5rem;
  text-align: center;
}

.section-heading-left {
  margin: 0 0 1.5rem;
  text-align: left;
}

.section-heading-center {
  margin: 0 auto 1.5rem;
  text-align: center;
}

.section-heading h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.strength-grid,
.service-grid,
.metrics {
  display: grid;
  gap: 1rem;
}

.timeline {
  display: grid;
  gap: 1rem;
  margin-top: 1rem; /* Добавляем отступ сверху, равный gap карточек по ширине */
}

.card,
.service-card,
.metric-card,
.timeline-item,
.credential-card {
  padding: 1.35rem;
}

.card h3,
.service-card h3,
.timeline-item h3,
.credential-card h3,
.steps h3 {
  margin: 0 0 0.6rem;
  font-size: 1.1rem;
}

.card p,
.service-card p,
.timeline-item p,
.credential-card p,
.steps p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.metric-card {
  text-align: center;
}

.metric-card strong {
  display: block;
  color: var(--primary);
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1;
  margin-bottom: 0.6rem;
}

.steps {
  display: grid;
  gap: 1rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
  padding: 1.2rem;
  background: var(--surface);
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.steps span {
  width: 2.2rem;
  height: 2.2rem;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  border-radius: var(--radius-sm);
  background: var(--primary);
}

.contact-section {
  padding-bottom: 4rem;
}

.contact-form {
  padding: 1.35rem;
  max-width: 680px;
  margin: 0 auto;
}

.field {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.field label {
  font-weight: 600;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.honeypot-field {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

.tech-details {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.checkbox-label a {
  color: var(--primary);
  text-decoration: underline;
}

.tech-details summary {
  cursor: pointer;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.95rem;
  list-style: none;
  transition: color 0.2s ease;
}

.tech-details summary::-webkit-details-marker {
  display: none;
}

.tech-details summary:hover,
.tech-details summary:focus-visible {
  color: var(--accent);
}

.tech-details p {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.management-skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.management-skill-tag {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  transition: all 0.2s ease;
}

.management-skill-tag:hover,
.management-skill-tag:focus-visible {
  background: var(--line);
  border-color: var(--muted);
}

.progress-container {
  width: 100%;
  height: 8px;
  background: rgba(219, 228, 239, 0.5);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 4px;
  transition: width 0.3s ease;
}

.footer-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 0.75rem 0;
}

.footer-socials a {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.footer-socials a:hover,
.footer-socials a:focus-visible {
  color: var(--accent);
}

.footer-copyright {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.form-note,
.form-status {
  margin: 0.9rem 0 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.form-status.is-error {
  color: #b42318;
}

.site-footer {
  padding: 1.5rem 0 2rem;
  border-top: 1px solid rgba(219, 228, 239, 0.85);
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.94rem;
  text-align: center;
}

.service-card-primary {
  grid-column: 1 / -1;
  background: var(--primary);
  color: #fff;
  border: 1px solid var(--primary);
  padding: 2rem;
}

.service-card-primary h3 {
  color: #fff;
  font-size: 1.5rem;
}

.service-card-primary p {
  color: var(--line);
  font-size: 1.05rem;
  line-height: 1.6;
}

.service-card-primary .button-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.service-card-primary .button-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
}

.service-grid-1 {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

.service-grid-4 {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .hero-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .strength-grid,
  .service-grid,
  .metrics,
  .credentials-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .service-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .service-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .timeline {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .nav-toggle {
    display: none;
  }

  .nav-menu {
    position: static;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 1.4rem;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .nav-menu a:hover,
  .nav-menu a:focus-visible {
    color: var(--primary);
  }

  .hero {
    padding: 5.8rem 0 3rem;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.85fr);
    align-items: center;
    gap: 2rem;
  }

  .approach-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
    align-items: start;
  }

  .strength-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .service-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .service-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.timeline-note {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-top: 1.5rem;
  font-weight: 500;
  box-shadow: var(--shadow);
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 1rem;
  margin-bottom: 1.5rem;
  width: 100%;
}

.form-buttons {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

@media (min-width: 480px) {
  .form-buttons {
    grid-template-columns: 1fr 1fr;
  }
}

/* Математическая капча */
.captcha-field {
  margin-bottom: 1rem;
}

.captcha-row {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

.captcha-row input {
  flex: 1;
  width: auto;
}

.captcha-row input:disabled {
  background: var(--surface-alt);
  cursor: default;
}

.captcha-refresh {
  flex-shrink: 0;
  width: 3rem;
  color: var(--primary);
  font-size: 1.15rem;
  line-height: 1;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.captcha-refresh:hover {
  border-color: var(--accent);
}

.button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Стили для интерактивного теста (checklist.html) */
.test-container {
  max-width: 720px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.test-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 2.5rem 2rem;
  position: relative;
  overflow: hidden;
}

.test-progress-bar-wrap {
  width: 100%;
  height: 6px;
  background: var(--surface-alt);
  border-radius: 3px;
  margin-bottom: 2rem;
  overflow: hidden;
}

.test-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.3s ease;
}

.test-step-indicator {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.test-question-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
  line-height: 1.2;
}

.test-question-desc {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 2.5rem;
}

.test-btn-group {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 480px) {
  .test-btn-group {
    grid-template-columns: 1fr 1fr;
  }
}

.test-btn {
  min-height: 3.8rem;
  font-size: 1.05rem;
}

.test-slide {
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.test-slide.slide-out {
  transform: translateX(-50px);
  opacity: 0;
}

.test-slide.slide-in {
  animation: slideIn 0.3s forwards;
}

@keyframes slideIn {
  from {
    transform: translateX(50px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Лоадер для теста */
.loader-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 0;
  text-align: center;
}

.loader-spinner {
  width: 3.5rem;
  height: 3.5rem;
  border: 4px solid var(--surface-alt);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1.5rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Результаты теста */
.result-header {
  text-align: center;
  margin-bottom: 2rem;
}

.result-score-badge {
  display: inline-block;
  font-size: 3rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.result-risk-level {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.result-risk-low { color: var(--accent-success); }
.result-risk-medium { color: var(--accent); }
.result-risk-high { color: var(--text); }

.result-list {
  display: grid;
  gap: 1rem;
  margin: 2rem 0;
}

.result-item {
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
  padding: 1.2rem;
  background: var(--bg);
}

.result-item-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.result-badge {
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 4px;
  text-transform: uppercase;
}

.result-badge-yes {
  background: #fee2e2;
  color: #991b1b;
}

.result-badge-no {
  background: #d1fae5;
  color: #065f46;
}

.result-comment {
  font-size: 0.9rem;
  color: var(--muted);
  border-left: 2px solid var(--line);
  padding-left: 0.75rem;
  margin-top: 0.5rem;
}

/* Переключатель языка (RU/EN) — отдельный от бургер-меню, всегда виден */
.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.2rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-alt);
  flex-shrink: 0;
}

.lang-switch-item {
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  transition: background 0.2s ease, color 0.2s ease;
}

.lang-switch-item.is-active {
  background: var(--primary);
  color: #fff;
}

.lang-switch-item:hover:not(.is-active) {
  color: var(--text);
}

/* Мобильная адаптация шапки: узкие экраны 320-360px */
@media (max-width: 400px) {
  .nav {
    gap: 0.5rem;
  }

  .brand {
    gap: 0.5rem;
    min-width: 0;
  }

  .brand-text {
    display: none;
  }

  .nav-right {
    gap: 0.5rem;
  }

  .lang-switch-item {
    padding: 0.25rem 0.5rem;
    font-size: 0.72rem;
  }

  .nav-toggle {
    width: 2.6rem;
    height: 2.6rem;
    flex-shrink: 0;
  }
}

/* Стили для страницы политики конфиденциальности */
.privacy-container {
  max-width: 680px;
  margin: 3rem auto;
  padding: 0 1rem;
}

.privacy-content h1 {
  font-size: 2.2rem;
  margin-bottom: 1.5rem;
}

.privacy-content h2 {
  font-size: 1.4rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.privacy-content p {
  color: var(--muted);
  margin-bottom: 1.2rem;
  line-height: 1.6;
}

.privacy-content ul {
  padding-left: 1.5rem;
  margin-bottom: 1.2rem;
  color: var(--muted);
}

.privacy-content li {
  margin-bottom: 0.5rem;
}
