/* ==========================================================================
   Анастасия Бутова — Senior BI Developer
   Modernist: плоско, Archivo, нулевой радиус, 2px-линейки, флаш-влево.
   ========================================================================== */

:root {
  --ink: #1A1A1A;
  --ink-2: #2E2E2E;
  --surface: #EAEAEA;
  --accent: #F2C811;
  --accent-dark: #d9b40f;
  --accent-tint: #FDF3CC;
  --page: #FFFFFF;

  --line-strong: rgba(26, 26, 26, .4);
  --line-soft: rgba(26, 26, 26, .18);
  --text-muted: rgba(26, 26, 26, .62);
  --text-label: rgba(26, 26, 26, .55);

  --font: Archivo, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --wrap: 1180px;
  --gutter: 40px;
  --header-h: 56px;
}

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

html { -webkit-text-size-adjust: 100%; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
}

:focus { outline: none; }
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
::selection { background: rgba(242, 200, 17, .55); }

h1, h2, h3, h4 { font-weight: 800; margin: 0; }
p { margin: 0; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--accent);
  color: var(--ink);
  font-weight: 800;
  font-size: 14px;
  padding: 10px 16px;
  text-decoration: none;
}
.skip-link:focus { left: 0; }

/* ---------- шапка ------------------------------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--page);
  border-bottom: 2px solid var(--line-strong);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 32px;
  padding-block: 14px;
}
.brand {
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}
.brand span { color: var(--accent); }

.nav {
  display: flex;
  gap: 24px;
  margin-left: auto;
  font-size: 13px;
  font-weight: 600;
}
.nav a { color: var(--ink); text-decoration: none; }

.lang {
  display: flex;
  flex: none;
  border: 1px solid var(--line-strong);
}
.lang a {
  font-family: var(--font);
  font-weight: 800;
  font-size: 12px;
  padding: 5px 10px;
  text-decoration: none;
  background: transparent;
  color: var(--ink-2);
}
.lang a[aria-current="page"] { background: var(--accent); color: var(--ink); }

/* ---------- герой ------------------------------------------------------ */

.hero {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 56px;
  align-items: start;
  padding-block: 72px 56px;
  scroll-margin-top: var(--header-h);
}
.kicker {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--accent);
  color: var(--ink);
  padding: 5px 9px;
  margin-bottom: 20px;
}
.hero h1 {
  font-size: 62px;
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin-bottom: 24px;
  text-wrap: balance;
}
.hero__lead {
  font-size: 20px;
  line-height: 1.45;
  max-width: 34ch;
  margin: 0 0 20px;
  text-wrap: pretty;
}
.hero__text {
  font-size: 15px;
  line-height: 1.6;
  max-width: 46ch;
  color: var(--text-muted);
  margin: 0 0 32px;
  text-wrap: pretty;
}

.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font);
  font-weight: 800;
  font-size: 14px;
  padding: 13px 20px;
  text-decoration: none;
  color: var(--ink);
  border: 1px solid transparent;
  cursor: pointer;
}
.btn--primary { background: var(--accent); border-color: var(--accent); }
.btn--ghost { border-color: var(--line-strong); background: transparent; }

.facts { margin: 6px 0 0; border-top: 2px solid var(--line-strong); }
.facts__row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13px;
}
.facts__row:last-child { border-bottom: 2px solid var(--line-strong); }
.facts dt { color: var(--text-label); font-weight: 600; }
.facts dd { margin: 0; font-weight: 600; text-align: right; }
.facts a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(26, 26, 26, .35);
}

/* ---------- полоса цифр ------------------------------------------------ */

.metrics {
  border-top: 2px solid var(--line-strong);
  border-bottom: 2px solid var(--line-strong);
}
.metrics__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.metric {
  display: block;
  padding: 32px 28px;
  text-decoration: none;
  color: inherit;
  border-right: 1px solid var(--line-soft);
}
.metric:first-child { padding-left: 0; }
.metric:last-child { padding-right: 0; border-right: 0; }
.metric__num {
  display: block;
  font-size: 52px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}
.metric__label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 8px;
}
.metric--dark { background: var(--ink); border-right: 0; }
.metric--dark .metric__num { color: var(--accent); }
.metric--dark .metric__label { color: rgba(255, 255, 255, .72); }

/* ---------- секции ------------------------------------------------------ */

.section { padding-block: 72px 0; scroll-margin-top: var(--header-h); }
.section__title {
  font-size: 34px;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.section__intro {
  font-size: 15px;
  color: var(--text-muted);
  max-width: 60ch;
  margin: 0 0 48px;
}

/* ---------- кейсы ------------------------------------------------------- */

.case {
  scroll-margin-top: var(--header-h);
  border-top: 2px solid var(--line-strong);
  padding: 32px 0 56px;
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 48px;
  align-items: start;
}
.case:last-of-type { border-bottom: 2px solid var(--line-strong); padding-bottom: 40px; }

.frame {
  display: block;
  width: 100%;
  padding: 0;
  font: inherit;
  color: inherit;
  border: 2px solid var(--ink);
  background: var(--page);
  cursor: zoom-in;
}
.frame img { width: 100%; }

.case__pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.caption {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-label);
  margin-top: 8px;
}

.case__no {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  background: var(--accent);
  color: var(--ink);
  padding: 3px 7px;
  margin-bottom: 10px;
}
.case h3 {
  font-size: 25px;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  text-wrap: pretty;
}
.label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(26, 26, 26, .5);
  margin: 0 0 6px;
}
.case .body { font-size: 15px; line-height: 1.6; margin: 0 0 20px; text-wrap: pretty; }

.ticks {
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}
.ticks li {
  font-size: 15px;
  line-height: 1.5;
  padding-left: 16px;
  border-left: 2px solid var(--accent);
}

.result {
  border-top: 3px solid var(--accent);
  padding-top: 14px;
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.result__num { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; }
.result__text { font-size: 14px; font-weight: 600; line-height: 1.4; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 20px; }
.tag { font-size: 11px; font-weight: 600; padding: 4px 8px; }
.tag--accent { background: var(--accent); color: var(--ink); }
.tag--neutral { background: var(--surface); color: var(--ink-2); }

/* ---------- стек -------------------------------------------------------- */

.section--stack .section__title { margin-bottom: 40px; }
.stack {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 2px solid var(--line-strong);
}
.stack__col {
  padding: 24px;
  border-right: 1px solid var(--line-soft);
}
.stack__col:first-child { padding: 24px 24px 28px 0; }
.stack__col:last-child { padding: 24px 0 28px 24px; border-right: 0; }
.stack__col h3 { font-size: 16px; margin-bottom: 14px; }
.stack__col ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 7px;
  font-size: 14px;
  color: rgba(26, 26, 26, .75);
}

/* ---------- сертификаты и принципы -------------------------------------- */

.about {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 56px;
  padding-block: 64px 72px;
}
.about h2 { font-size: 20px; margin-bottom: 20px; }
.lines {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 2px solid var(--line-strong);
}
.lines li {
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 15px;
  font-weight: 600;
}
.principles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 32px;
  border-top: 2px solid var(--line-strong);
  padding-top: 20px;
}
.principles h3 { font-size: 15px; margin-bottom: 4px; }
.principles p { font-size: 13px; color: var(--text-muted); line-height: 1.5; margin: 0; }

/* ---------- контакты ---------------------------------------------------- */

.contact {
  border-top: 2px solid var(--line-strong);
  background: var(--surface);
  scroll-margin-top: var(--header-h);
}
.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 56px;
  padding-block: 64px;
}
.contact__grid h2 {
  font-size: 34px;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  text-wrap: balance;
}
.contact__intro {
  font-size: 15px;
  line-height: 1.6;
  color: rgba(26, 26, 26, .7);
  max-width: 40ch;
  margin: 0 0 28px;
}
.contact__list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 2px solid var(--line-strong);
}
.contact__list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 14px;
}
.contact__list li:last-child { border-bottom: 2px solid var(--line-strong); }
.contact__list span { color: var(--text-label); font-weight: 600; }
.contact__list a { font-weight: 600; word-break: break-word; }

.form {
  display: grid;
  gap: 16px;
  align-content: start;
  background: var(--page);
  border: 2px solid var(--ink);
  padding: 28px;
}
.form label { display: grid; gap: 6px; }
.form label > span {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(26, 26, 26, .6);
}
.form input,
.form textarea {
  font-family: var(--font);
  font-size: 14px;
  padding: 11px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: var(--page);
  color: var(--ink);
  width: 100%;
}
.form textarea { resize: vertical; }
.form button {
  font-family: var(--font);
  font-weight: 800;
  font-size: 14px;
  padding: 13px 20px;
  background: var(--accent);
  color: var(--ink);
  border: 0;
  cursor: pointer;
  text-align: left;
}
.form__note { font-family: var(--mono); font-size: 11px; color: var(--text-label); }

/* Кнопка на время отправки не disabled, а aria-disabled: disabled вылетает из
   порядка обхода, фокус падает на body, и человек с клавиатуры оказывается в
   начале страницы ровно тогда, когда ему надо сообщить результат. */
.form button[aria-disabled="true"] { cursor: progress; background: var(--accent-tint); }

/* Ловушка для ботов: уводим за край экрана, а не display:none — такие поля
   часть ботов распознает и пропускает. Обертка помечена aria-hidden, поле
   вынуто из обхода по Tab, так что человек с ним не столкнется. */
.form__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Живая область для скринридера. Отрисована всегда, поэтому убираем ее из
   потока абсолютным позиционированием: пустой блок иначе оставлял бы
   промежуток между кнопкой и подписью. */
.form__announce {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.form__status { border-left: 3px solid var(--line-strong); padding-left: 12px; }
.form__status:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.form__status-line { font-size: 14px; line-height: 1.45; color: var(--ink); }
.form__status-line--ok { font-weight: 600; }

.form__fallback {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 12px;
}
.form__fallback .btn { font-family: var(--font); }

/* Блок на случай выключенного JavaScript: заявку шлет скрипт, без него форма
   молчит — вместо нее показываем прямые контакты. Коробку берем у самой формы,
   добавляем только читаемый размер текста. Прячет форму правило из <noscript>
   в <head>: селектора «скрипт выключен» в CSS нет. */
.form--nojs { font-size: 14px; line-height: 1.55; }

/* Незаполненное поле подсвечиваем только после попытки ввода: :user-invalid,
   в отличие от :invalid, не красит пустую форму при первой загрузке. */
.form input:user-invalid,
.form textarea:user-invalid { border-color: var(--ink); border-width: 2px; }

/* ---------- футер ------------------------------------------------------- */

.site-footer { border-top: 2px solid var(--line-strong); background: var(--page); }
.site-footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-block: 24px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-label);
}

/* ---------- лайтбокс ---------------------------------------------------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  width: 100%;
  padding: 40px;
  border: 0;
  background: rgba(26, 26, 26, .94);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border: 2px solid var(--accent);
  background: var(--page);
}
body.is-locked { overflow: hidden; }

/* ---------- наведение и нажатие ----------------------------------------- */

/* Ховеры собраны в один блок и включены только там, где есть настоящий курсор.
   На тач-экране браузер синтезирует :hover при тапе и держит его до следующего
   касания. Переходов между страницами тут нет, снять состояние нечем, поэтому
   подсветка плитки или рамки залипает уже после того, как переход отработал. */
@media (hover: hover) {
  a:hover { color: var(--ink-2); text-decoration-color: var(--ink); }
  .nav a:hover {
    color: var(--ink-2);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-decoration-color: var(--accent);
  }
  .lang a:not([aria-current="page"]):hover { background: var(--accent-tint); }
  .btn--primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: var(--ink); }
  .btn--ghost:hover { background: var(--accent-tint); border-color: var(--accent); color: var(--ink); }
  .facts a:hover { text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
  .metric:hover { background: var(--accent-tint); color: inherit; }
  .metric--dark:hover { background: var(--ink-2); }
  .frame:hover { border-color: var(--accent-dark); }
  .form button:hover { background: var(--accent-dark); }
}

/* Отклик на тап взамен ховера: :active гаснет сам, как только палец отпущен. */
.lang a:not([aria-current="page"]):active { background: var(--accent-tint); }
.btn--primary:active { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn--ghost:active { background: var(--accent-tint); border-color: var(--accent); }
.metric:active { background: var(--accent-tint); }
.metric--dark:active { background: var(--ink-2); }
.frame:active { border-color: var(--accent-dark); }
.form button:active { background: var(--accent-dark); }

/* ---------- адаптив ----------------------------------------------------- */

@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding-block: 56px 44px; }
  .hero h1 { font-size: 52px; }

  /* Четыре цифры в ряд перестают помещаться: неразрывное 2 500+ кеглем 52px
     растягивает свою колонку и отбирает ширину у соседних. */
  .metrics__grid { grid-template-columns: 1fr 1fr; }
  .metric,
  .metric:first-child,
  .metric:last-child { padding: 24px 20px; border-bottom: 1px solid var(--line-soft); }
  .metric:nth-child(odd) { padding-left: 0; border-right: 1px solid var(--line-soft); }
  .metric:nth-child(even) { padding-right: 0; border-right: 0; }
  /* темная плитка попадает в левую колонку — текст не должен лежать на срезе.
     Двойной класс нужен, чтобы перебить .metric:nth-child(odd) выше. */
  .metric.metric--dark { padding-left: 20px; border-right: 0; }
  .metric:nth-last-child(-n+2) { border-bottom: 0; }

  .case { grid-template-columns: 1fr; gap: 28px; padding-bottom: 44px; }
  .stack { grid-template-columns: 1fr 1fr; }
  .stack__col,
  .stack__col:first-child,
  .stack__col:last-child { padding: 24px; border-bottom: 1px solid var(--line-soft); }
  .stack__col:nth-child(odd) { padding-left: 0; }
  .stack__col:nth-child(even) { padding-right: 0; border-right: 0; }
  .stack__col:nth-last-child(-n+2) { border-bottom: 0; }
  .about { grid-template-columns: 1fr; gap: 40px; padding-block: 48px 56px; }
  .contact__grid { grid-template-columns: 1fr; gap: 36px; padding-block: 48px; }
}

@media (max-width: 720px) {
  :root { --gutter: 20px; --header-h: 88px; }

  .site-header__inner { flex-wrap: wrap; gap: 12px 16px; }
  .nav { order: 3; width: 100%; margin-left: 0; justify-content: space-between; gap: 12px; }
  .lang { margin-left: auto; }

  .hero h1 { font-size: 40px; }
  .hero__lead { font-size: 18px; }

  .metric__num { font-size: 40px; }

  .section { padding-block: 48px 0; }
  .section__title, .contact__grid h2 { font-size: 27px; }
  .section__intro { margin-bottom: 32px; }
  .case h3 { font-size: 22px; }
  .case__pair { grid-template-columns: 1fr; }

  .stack { grid-template-columns: 1fr; }
  .stack__col,
  .stack__col:first-child,
  .stack__col:last-child,
  .stack__col:nth-child(odd),
  .stack__col:nth-child(even) {
    padding: 20px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
  }
  .stack__col:last-child { border-bottom: 0; }

  .principles { grid-template-columns: 1fr; }
  .form { padding: 20px; }
  .lightbox { padding: 16px; }
  .site-footer__inner { flex-direction: column; gap: 6px; }
}

@media print {
  .site-header, .lang, .form, .lightbox, .skip-link { display: none !important; }
  body { font-size: 12px; }
  .hero, .case { break-inside: avoid; }
}
