/* ==========================================================================
   Эф-эс — ef-es.ru
   Вёрстка по макету Pencil «Эф-эс — Landing» (fs.pen, экран 1440).
   ========================================================================== */

/* --- Inter (переменный 400–700) ----------------------------------------- */
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url('/assets/fonts/inter-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url('/assets/fonts/inter-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url('/assets/fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url('/assets/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- IBM Plex Mono 400 / 500 -------------------------------------------- */
@font-face {
  font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('/assets/fonts/plexmono-400-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('/assets/fonts/plexmono-400-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('/assets/fonts/plexmono-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('/assets/fonts/plexmono-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('/assets/fonts/plexmono-500-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('/assets/fonts/plexmono-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- токены (из fs.pen) -------------------------------------------------- */
:root {
  --accent: #1F4FE0;
  --bg: #FFFFFF;
  --bg-alt: #F3F5F7;
  --bg-dark: #0E1620;
  --border: #E2E7EB;
  --border-dark: #25313E;
  --surface: #FAFBFC;
  --text-primary: #0E1620;
  --text-secondary: #5A6672;
  --text-inverse: #F5F7F9;
  --text-inverse-dim: #9AA7B4;

  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --pad: 80px;
  --gutter: calc(var(--pad) + max(0px, (100% - 1440px) / 2));
}

/* --- база --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
img { max-width: 100%; }
h1, h2, h3, p, dl, dd, ul { margin: 0; }
ul { padding: 0; list-style: none; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 20;
  background: var(--bg-dark); color: #fff; padding: 10px 16px; font-size: 14px;
}
.skip-link:focus { left: 0; }

/* --- логотип ------------------------------------------------------------ */
.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo__mark {
  position: relative; flex: none;
  width: 34px; height: 34px; border-radius: 7px;
  background: var(--bg-dark);
}
.logo__mark i { position: absolute; top: 8px; width: 5px; height: 18px; }
.logo__mark i:first-child { left: 9px; background: var(--accent); }
.logo__mark i:last-child { left: 17px; background: var(--text-inverse); }
.logo__word {
  font-size: 20px; font-weight: 700; letter-spacing: -0.4px;
  color: var(--text-primary);
}
.hero .logo__word { color: #FFFFFF; }
.logo--light .logo__word { color: var(--text-inverse); }

/* --- кнопки ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 6px; font-weight: 600; white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn--light {
  background: #FFFFFF; color: var(--bg-dark);
  padding: 11px 20px; font-size: 15px;
}
.btn--light:hover { background: var(--text-inverse); }
.btn--primary {
  background: var(--accent); color: var(--text-inverse);
  padding: 14px 26px; font-size: 16px;
}
.btn--primary:hover { background: #1A43BF; }
.btn--ghost {
  border: 1px solid #FFFFFFB3; color: #FFFFFF;
  padding: 14px 26px; font-size: 16px;
}
.btn--ghost:hover { border-color: #FFFFFF; background: #FFFFFF14; }

/* --- надзаголовки ------------------------------------------------------- */
.eyebrow {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 13px; font-weight: 500;
  letter-spacing: 1.5px; text-transform: uppercase; color: var(--accent);
}
.eyebrow__tick { display: block; width: 24px; height: 2px; background: currentColor; flex: none; }
.eyebrow--light { color: #FFFFFF; }
.eyebrow--light .eyebrow__tick { background: var(--accent); }

/* --- hero --------------------------------------------------------------- */
/* Два скрима поверх фото.
   1) Подложка под шапку: сверху вниз, 0.45 → 0 за 160px. Строка меню
      приходится на подсвеченное солнцем стекло — без неё белые ссылки 15px
      уходят ниже AA на 37% своей площади.
   2) Основной скрим по макету (fs.pen, Section/Hero → Scrim): горизонтальный
      градиент #080B14, светлее слева, темнее справа. В макете 0.33 → 0.48,
      здесь на 0.10 темнее — на макетных значениях не хватало контраста.
   Свойства фона расписаны длинной формой: у трёх слоёв изображения список
   background-size из двух значений зациклился бы и снял cover с фотографии. */
.hero {
  position: relative;
  min-height: 820px;
  display: flex; flex-direction: column;
  background-color: #080B14;
  background-image:
    linear-gradient(to bottom, #080B1473, #080B1400 160px),
    linear-gradient(to right, #080B146B, #080B1491),
    url('/assets/img/hero.jpg');
  background-position: 0 0, 0 0, center;
  background-size: auto, auto, cover;
  background-repeat: no-repeat, no-repeat, no-repeat;
}
@supports (background-image: image-set(url('/assets/img/hero.webp') type('image/webp') 1x)) {
  .hero {
    background-image:
      linear-gradient(to bottom, #080B1473, #080B1400 160px),
      linear-gradient(to right, #080B146B, #080B1491),
      image-set(url('/assets/img/hero.webp') type('image/webp') 1x,
                url('/assets/img/hero@2x.webp') type('image/webp') 2x);
  }
}

.nav {
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
  height: 78px; padding: 0 var(--gutter);
  border-bottom: 1px solid #FFFFFF2E;
}
.nav__links { display: flex; align-items: center; gap: 36px; }
.nav__links a { font-size: 15px; font-weight: 500; color: #FFFFFFD9; }
.nav__links a:hover { color: #FFFFFF; }

.hero__body {
  flex: 1;
  display: flex; align-items: center;
  padding: 96px var(--gutter);
}
.hero__left { display: flex; flex-direction: column; gap: 28px; max-width: 640px; }
.hero__title {
  font-size: clamp(34px, 4.2vw, 58px); font-weight: 700;
  letter-spacing: -1.5px; line-height: 1.05; color: #FFFFFF;
}
.hero__sub {
  max-width: 560px; font-size: 18px; line-height: 27px; color: #E4E9EF;
  text-wrap: pretty;
}
.hero__buttons { display: flex; flex-wrap: wrap; gap: 14px; padding-top: 12px; }
.hero__legal {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em;
  color: #FFFFFFA6;
}

/* --- отрасли ------------------------------------------------------------ */
/* Полоса из макета (fs.pen, Section/IndustriesStrip). Разделители «×» — тоже
   пункты списка, чтобы space-between развёл их ровно посередине между
   названиями, как в макете; для скринридера они скрыты, список читается
   как шесть отраслей. */
.industries {
  padding: 0 var(--gutter);
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.industries__list {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0 12px; min-height: 72px;
  font-family: var(--mono); font-size: 14px; letter-spacing: 1px;
  text-transform: uppercase; color: var(--text-secondary);
}
.industries__x { color: var(--accent); letter-spacing: 0; }

/* --- заголовок секции --------------------------------------------------- */
.section-head { display: flex; flex-direction: column; gap: 14px; }
.section-head__title {
  max-width: 720px;
  font-size: clamp(26px, 2.7vw, 38px); font-weight: 600;
  letter-spacing: -0.5px; line-height: 1.15; color: var(--text-primary);
}
.section-head__title--light { max-width: 760px; color: var(--text-inverse); }
.section-head__sub {
  max-width: 640px; font-size: 15px; line-height: 23px; color: var(--text-inverse-dim);
  text-wrap: pretty;
}

/* --- услуги ------------------------------------------------------------- */
.services {
  display: flex; flex-direction: column; gap: 32px;
  padding: 96px var(--gutter);
  background: var(--bg-alt);
}
.cards {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.card {
  display: flex; flex-direction: column; gap: 18px;
  padding: 28px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
}
.card__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 6px;
  background: var(--bg-alt); color: var(--accent);
}
.card__icon svg { width: 22px; height: 22px; }
.card h3 { font-size: 19px; font-weight: 600; line-height: 1.25; }
.card p { font-size: 14px; line-height: 21px; color: var(--text-secondary); text-wrap: pretty; }

/* --- кейс --------------------------------------------------------------- */
.case {
  display: grid; grid-template-columns: minmax(380px, 1fr) minmax(0, 768px);
  align-items: center; gap: 48px;
  padding: 96px var(--gutter);
  background: var(--bg);
}
.case__left { display: flex; flex-direction: column; gap: 24px; }
.case__title {
  font-size: clamp(28px, 3vw, 40px); font-weight: 700;
  letter-spacing: -1px; line-height: 1.1;
}
.case__body { font-size: 17px; line-height: 26px; color: var(--text-secondary); text-wrap: pretty; }

.bullets { display: flex; flex-direction: column; gap: 12px; padding-top: 4px; }
.bullets li {
  display: flex; align-items: flex-start; gap: 12px;
  font-size: 16px; line-height: 23px; text-wrap: pretty;
}
.bullets__check { flex: none; color: var(--accent); line-height: 0; padding-top: 2px; }
.bullets__check svg { width: 20px; height: 20px; }

.metrics { display: flex; flex-wrap: wrap; gap: 32px; padding-top: 16px; }
.metrics__item { display: flex; flex-direction: column; gap: 2px; }
.metrics dt { font-size: 30px; font-weight: 700; letter-spacing: -0.8px; }
.metrics dd {
  max-width: 130px; margin: 0;
  font-size: 13px; line-height: 17px; color: var(--text-secondary);
}

/* картинка шире своей колонки: заезжает влево на гэп и край текстовой колонки.
   У монтажа экранов слева широкое прозрачное поле — на текст наплывает пустота,
   а не сами скриншоты. */
.case__visual {
  margin: 0 0 0 -192px;
  display: flex; align-items: center; justify-content: center;
}
.case__visual picture { display: block; width: 100%; }
.case__visual img { display: block; width: 100%; height: auto; }

/* --- стек --------------------------------------------------------------- */
.stack {
  display: flex; flex-direction: column; gap: 48px;
  padding: 96px var(--gutter);
  background: var(--bg-dark);
}
.stack__columns {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 24px;
}
.stack__col { display: flex; flex-direction: column; gap: 20px; }
.stack__label {
  padding-bottom: 12px; border-bottom: 1px solid var(--border-dark);
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-inverse-dim);
}
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chips li {
  padding: 9px 14px;
  border: 1px solid var(--border-dark); border-radius: 6px;
  font-family: var(--mono); font-size: 14px; color: var(--text-inverse);
}

/* --- футер -------------------------------------------------------------- */
.footer { background: var(--bg-dark); color: var(--text-inverse); }
.footer__main {
  display: grid; grid-template-columns: 320px 180px 180px 320px;
  justify-content: space-between; gap: 48px;
  padding: 56px var(--gutter);
}
.footer__brand { display: flex; flex-direction: column; gap: 18px; }
.footer__tag { font-size: 14px; line-height: 21px; color: var(--text-inverse-dim); text-wrap: pretty; }
.footer__contacts { padding-top: 6px; font-family: var(--mono); font-size: 14px; }
.footer__contacts a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #F5F7F959; }
.footer__contacts a:hover { text-decoration-color: currentColor; }

.footer__col { display: flex; flex-direction: column; gap: 14px; }
.footer__head {
  font-family: var(--mono); font-size: 12px; letter-spacing: 1px;
  text-transform: uppercase; color: var(--text-inverse-dim);
}
.footer__col a { font-size: 14px; }
.footer__col a:hover { color: #FFFFFF; text-decoration: underline; text-underline-offset: 3px; }

.requisites { display: flex; flex-direction: column; gap: 14px; }
.requisites__row { display: flex; flex-direction: column; gap: 2px; }
.requisites dt { font-size: 12px; color: var(--text-inverse-dim); }
.requisites dd { margin: 0; font-size: 14px; font-weight: 500; line-height: 20px; }

.footer__bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 60px; padding: 12px var(--gutter);
  border-top: 1px solid var(--border-dark);
  font-size: 13px; color: var(--text-inverse-dim);
}
.footer__bottom a:hover { color: #FFFFFF; }

/* --- адаптив ------------------------------------------------------------ */
@media (max-width: 1240px) {
  :root { --pad: 48px; }
  .footer__main { grid-template-columns: 1fr 160px 160px 300px; gap: 32px; }
  .case { gap: 40px; }
  .case__visual { margin-left: -120px; }
}

@media (max-width: 1080px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .stack__columns { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 980px) {
  .hero { min-height: 0; }
  .hero__body { padding-top: 72px; padding-bottom: 88px; }
  .case { grid-template-columns: 1fr; }
  .case__visual { margin-left: 0; }
  .footer__main { grid-template-columns: 1fr 1fr; gap: 40px; }
  .services, .stack { padding-top: 72px; padding-bottom: 72px; }
}

@media (max-width: 860px) {
  .nav__links { display: none; }
  /* в строку не влезает: 6 названий + 5 «×» требуют 623 px */
  .industries { padding-top: 20px; padding-bottom: 20px; }
  .industries__list {
    flex-wrap: wrap; justify-content: center;
    gap: 12px 24px; min-height: 0;
  }
}

@media (max-width: 760px) {
  :root { --pad: 24px; }
  .hero__sub { font-size: 16px; line-height: 25px; }
  .cards { grid-template-columns: 1fr; }
  .stack__columns { grid-template-columns: 1fr; gap: 32px; }
  .metrics { gap: 24px; }
}

@media (max-width: 560px) {
  :root { --pad: 18px; }
  .nav { height: 68px; }
  .logo__word { font-size: 18px; }
  .btn--light { padding: 9px 14px; font-size: 14px; }
  .btn--primary, .btn--ghost { padding: 13px 20px; font-size: 15px; }
  .hero__body { padding-top: 56px; padding-bottom: 64px; }
  .hero__left { gap: 22px; }
  .industries__list { font-size: 13px; letter-spacing: 0.5px; gap: 10px 18px; }
  .footer__main { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; align-items: flex-start; gap: 8px; }
  .services, .stack, .case { padding-top: 56px; padding-bottom: 56px; }
}

/* --- светлый вариант первого экрана (превью, .hero--light) -------------- */
.hero--light {
  background:
    linear-gradient(#FFFFFF73, #FFFFFF73),
    url('/assets/img/hero-light.jpg') center / cover no-repeat;
  background-color: #FFFFFF;
}
@supports (background-image: image-set(url('/assets/img/hero-light.webp') type('image/webp') 1x)) {
  .hero--light {
    background-image:
      linear-gradient(#FFFFFF73, #FFFFFF73),
      image-set(url('/assets/img/hero-light.webp') type('image/webp') 1x,
                url('/assets/img/hero-light@2x.webp') type('image/webp') 2x);
  }
}
.hero--light .nav { border-bottom-color: #0E162024; }
.hero--light .logo__word { color: var(--text-primary); }
.hero--light .nav__links a { color: #0E1620D9; }
.hero--light .nav__links a:hover { color: var(--text-primary); }
.hero--light .btn--light { background: var(--bg-dark); color: #FFFFFF; }
.hero--light .btn--light:hover { background: #1B2836; }
.hero--light .eyebrow--light { color: var(--text-primary); }
.hero--light .hero__title { color: var(--text-primary); }
.hero--light .hero__sub { color: #2E3A46; }
.hero--light .hero__legal { color: #0E1620B3; }
.hero--light .btn--ghost { border-color: #0E162059; color: var(--text-primary); }
.hero--light .btn--ghost:hover { border-color: var(--text-primary); background: #0E16200D; }
