/* TEZKOR ILOVA — светлая «чертёжная» сетка: тонкие линии, крупная типографика, моноширинные подписи. */
:root {
  --bg: #f7f7f3;
  --surface: #ffffff;
  --ink: #111216;
  --muted: #4a4e57;
  --line: #d9d9d1;
  --line-strong: #b9bab0;
  --accent: #1f3fc4;
  --on-accent: #ffffff;
  --warn-bg: #fff1c2;
  --warn-ink: #5a3b00;
  --font-sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --max: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 4px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 0.2em; }
h1, h2, h3 { margin: 0; line-height: 1.1; letter-spacing: -0.02em; overflow-wrap: anywhere; hyphens: auto; }
/* Колонки сетки могут сжиматься уже длинного слова — важно при увеличенном тексте. */
.hero-grid > *, .section-grid > *, .bento > *, .card-activity > *, .steps > *, .facts > div > * { min-width: 0; }
p { margin: 0; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}
main:focus { outline: none; }

.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;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -200px;
  z-index: 100;
  padding: 12px 16px;
  background: var(--ink);
  color: var(--on-accent);
  font-weight: 600;
}
.skip-link:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Предпросмотр */
.preview-banner {
  background: var(--warn-bg);
  color: var(--warn-ink);
  border-bottom: 1px dashed var(--warn-ink);
  font-size: 0.875rem;
  padding-block: 8px;
}
.pending {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 2px 8px;
  background: var(--warn-bg);
  color: var(--warn-ink);
  border: 1px dashed var(--warn-ink);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.5;
}

/* Шапка */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 16px;
  min-height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin-right: auto;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.brand-mark {
  width: 14px;
  height: 14px;
  background: var(--accent);
  box-shadow: 4px 4px 0 var(--ink);
}
.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a, .lang-switch a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding-inline: 10px;
  color: var(--muted);
  font-size: 0.9375rem;
  text-decoration: none;
  border-radius: var(--radius);
}
.site-nav a:hover, .lang-switch a:hover { color: var(--ink); background: var(--surface); }
.lang-switch {
  display: flex;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font-mono);
}
.lang-switch a { font-size: 0.8125rem; letter-spacing: 0.06em; }
.lang-switch a[aria-current="page"] { color: var(--on-accent); background: var(--ink); }
.menu-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.9375rem;
  cursor: pointer;
}
.menu-toggle-icon,
.menu-toggle-icon::before {
  display: block;
  width: 16px;
  height: 2px;
  background: currentColor;
}
.menu-toggle-icon { position: relative; top: -3px; }
.menu-toggle-icon::before { content: ""; position: relative; top: 6px; }

@media (max-width: 859.98px) {
  /* Без JS навигация остаётся видимой строкой ниже логотипа. */
  .no-js .site-nav { order: 3; width: 100%; padding-bottom: 6px; }
  /* В разметке кнопка стоит перед меню (порядок Tab), на экране — справа от RU/EN. */
  .js .menu-toggle { display: inline-flex; order: 2; }
  .js .lang-switch { order: 1; }
  .js .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
  }
  .js .site-nav.is-open { display: block; }
  .js .site-nav ul { flex-direction: column; padding: 8px var(--gutter) 16px; }
  .js .site-nav a { justify-content: flex-start; width: 100%; border-bottom: 1px solid var(--line); border-radius: 0; color: var(--ink); }
}

@media (max-width: 419.98px) {
  .header-bar { gap: 4px 8px; }
  .brand { gap: 8px; font-size: 0.875rem; letter-spacing: 0.02em; }
  .menu-toggle { justify-content: center; min-width: 44px; padding: 0; }
  .menu-toggle-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

/* Первый экран */
.hero {
  position: relative;
  border-bottom: 1px solid var(--line);
  background-image: radial-gradient(var(--line-strong) 1px, transparent 1px);
  background-size: 24px 24px;
  background-position: -12px -12px;
}
.hero-grid {
  display: grid;
  gap: 32px;
  padding-block: clamp(44px, 8vw, 112px) clamp(56px, 9vw, 128px);
}
.eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.eyebrow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
}
/* Асимметрия: первое слово названия вровень с краем, остаток — акцентом со сдвигом вправо. */
.hero-title {
  font-size: clamp(2.25rem, 12vw, 8.5rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 0.92;
  overflow-wrap: anywhere;
}
.hero-title-line { display: block; }
.hero-title-accent { margin-left: 0.9em; color: var(--accent); }
.hero-lead {
  max-width: 30ch;
  padding-left: 16px;
  border-left: 3px solid var(--accent);
  color: var(--muted);
  font-size: clamp(1.1875rem, 2.2vw, 1.5rem);
  line-height: 1.4;
}
.hero-side { position: relative; }
/* Акцентный блок за карточкой «Кратко о компании». */
.hero-side::before {
  content: "";
  position: absolute;
  top: -12px;
  right: -8px;
  width: 58%;
  height: 72%;
  background: var(--accent);
  border-radius: var(--radius);
}
.hero-side .spec-card { position: relative; }

/* Акцентная полоса с ключевыми фактами (дублирует текст страницы, скрыта от экранного диктора). */
.accent-band {
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--font-mono);
  font-size: clamp(0.8125rem, 1.4vw, 1rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.accent-band-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 18px;
  padding-block: 14px;
}
.accent-band-sep { opacity: 0.7; }
.hero-actions { margin-top: 28px; }
.button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 22px;
  background: var(--ink);
  color: var(--on-accent);
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s ease;
}
.button:hover { background: var(--accent); }
.button-arrow { transition: transform 0.15s ease; }
.button:hover .button-arrow { transform: translateX(3px); }

.spec-card {
  align-self: end;
  background: var(--surface);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 6px 6px 0 var(--ink);
  font-family: var(--font-mono);
  font-size: 0.875rem;
}
.spec-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}
.spec-dots, .spec-dots::before, .spec-dots::after {
  display: block;
  width: 8px;
  height: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
}
.spec-dots { position: relative; margin-right: 24px; }
.spec-dots::before, .spec-dots::after { content: ""; position: absolute; top: -1px; }
.spec-dots::before { left: 11px; }
.spec-dots::after { left: 23px; background: var(--accent); border-color: var(--accent); }
.spec-list { margin: 0; padding: 8px 16px 12px; }
.spec-list div {
  display: grid;
  grid-template-columns: minmax(7.5em, auto) 1fr;
  gap: 12px;
  padding-block: 8px;
  border-bottom: 1px dashed var(--line);
}
.spec-list div:last-child { border-bottom: 0; }
.spec-list dt { color: var(--muted); }
.spec-list dd { margin: 0; overflow-wrap: anywhere; }

/* Разделы */
.section { border-bottom: 1px solid var(--line); }
.section-grid {
  position: relative;
  display: grid;
  gap: 24px;
  padding-block: clamp(56px, 8vw, 104px);
}
.section-head { display: flex; flex-direction: column; gap: 12px; }
/* Крупные акцентные номера разделов. */
.section-index {
  font-family: var(--font-mono);
  font-size: clamp(2.5rem, 5.5vw, 4.5rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--accent);
}
.section-head h2 { font-size: clamp(1.75rem, 3.6vw, 2.75rem); font-weight: 700; }
.prose p { max-width: 60ch; font-size: clamp(1.125rem, 1.6vw, 1.3125rem); line-height: 1.55; }
.prose p + p { margin-top: 1em; }

.bento { display: grid; gap: 16px; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.15s ease;
}
.card:hover { border-color: var(--accent); }
.card-activity { display: grid; overflow: hidden; border-top: 4px solid var(--accent); }
.card-text { padding: clamp(20px, 3vw, 32px); }
.card-index { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--accent); margin-bottom: 16px; }
.card h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); font-weight: 700; margin-bottom: 12px; }
.card p { color: var(--muted); }
.card-art {
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  padding: 8px;
  border-top: 1px solid var(--line);
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 16px 16px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 16px 16px,
    var(--bg);
}

.steps {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--ink);
}
.step {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.step-index { font-family: var(--font-mono); font-size: 1.5rem; line-height: 1; color: var(--accent); }
.step { transition: border-color 0.2s ease; }
.step:hover { border-bottom-color: var(--accent); }
.step-title { font-size: 1.125rem; font-weight: 600; }

.facts { margin: 0; border-top: 1px solid var(--ink); }
.facts div {
  display: grid;
  gap: 4px 24px;
  padding-block: 18px;
  border-bottom: 1px solid var(--line);
}
.facts dt {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.facts dd { margin: 0; font-size: 1.125rem; overflow-wrap: anywhere; }
.facts dd .pending { margin-top: 0; }

/* Подвал */
.site-footer { color: var(--muted); font-family: var(--font-mono); font-size: 0.8125rem; }
.footer-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 28px;
}

@media (min-width: 600px) {
  .steps { grid-template-columns: repeat(2, 1fr); column-gap: 24px; }
  .facts div { grid-template-columns: 14em 1fr; align-items: start; }
  .facts dt { padding-top: 0.25em; }
}

@media (min-width: 860px) {
  /* Асимметричная сетка первого экрана: заголовок на всю ширину, текст слева, карточка сдвинута вправо. */
  .hero-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: 48px; align-items: end; }
  .hero-head { grid-column: 1 / -1; }
  .hero-body { grid-column: 1 / span 6; }
  .hero-side { grid-column: 8 / -1; }
  .hero-side::before { top: -20px; right: -20px; }
  .section-grid { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 48px; }
  .section-head { position: sticky; top: 96px; align-self: start; }
  .card-activity { grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr); }
  .card-art { height: 100%; max-height: none; border-top: 0; border-left: 1px solid var(--line); }
  /* «Чертёжные» перекрестья на углах раздела. */
  .section-grid::before, .section-grid::after {
    content: "";
    position: absolute;
    top: -6px;
    width: 11px;
    height: 11px;
    background:
      linear-gradient(var(--line-strong), var(--line-strong)) center / 1px 100% no-repeat,
      linear-gradient(var(--line-strong), var(--line-strong)) center / 100% 1px no-repeat;
  }
  .section-grid::before { left: calc(var(--gutter) - 6px); }
  .section-grid::after { right: calc(var(--gutter) - 6px); }
}

@media (min-width: 1024px) {
  .steps { grid-template-columns: repeat(4, 1fr); }
  .step { padding-right: 16px; min-height: 140px; justify-content: space-between; }
}

/* Анимация — только если пользователь не просил меньше движения.
   Скрытие [data-reveal] действует только при работающем JS (.js), иначе текст виден сразу. */
@media (prefers-reduced-motion: no-preference) {
  .hero-head > *, .hero-body > *, .hero-side {
    animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }
  .hero-head > :nth-child(2) { animation-delay: 0.08s; }
  .hero-body > * { animation-delay: 0.2s; }
  .hero-side { animation-delay: 0.32s; }
  .js [data-reveal] {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
  }
  .js [data-reveal].is-visible { opacity: 1; transform: none; }
  .js .steps > :nth-child(2), .js .facts > :nth-child(2) { transition-delay: 0.08s; }
  .js .steps > :nth-child(3), .js .facts > :nth-child(3) { transition-delay: 0.16s; }
  .js .steps > :nth-child(4), .js .facts > :nth-child(4) { transition-delay: 0.24s; }
  .js .section-body[data-reveal], .js .bento > [data-reveal] { transition-delay: 0.1s; }
  /* Два цикла = 4,8 с: автоматическое движение короче 5 с (WCAG 2.2.2). */
  .eyebrow-dot { animation: pulse 2.4s ease-in-out 2; }
  @keyframes rise { from { opacity: 0; transform: translateY(24px); } }
  @keyframes pulse { 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--accent) 6%, transparent); } }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
