/* ==========================================================================
   BREVIS.EXPRESS — BASE
   Фундамент: токены, reset, типографика, сетка, утилиты.
   Палитра снята с живого brevis-site.ru (лайм #DAFE52 / маджента #DC4BFF).
   ========================================================================== */

:root {
  /* --- Грунты и поверхности --- */
  --void: #121212;
  --bg: #1f1f1f;
  --surface: #262626;
  --surface-2: #313131;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);

  /* --- Акценты --- */
  --lime: #dafe52;
  --lime-deep: #b8d93f;
  --lime-soft: rgba(218, 254, 82, 0.14);
  --lime-glow: rgba(218, 254, 82, 0.32);
  --magenta: #dc4bff;
  --magenta-soft: rgba(220, 75, 255, 0.12);
  --magenta-glow: rgba(220, 75, 255, 0.28);

  /* --- Текст --- */
  --white: #ffffff;
  --muted: #aeaeae;
  --faint: #777777;

  /* --- Геометрия --- */
  --r-sm: 12px;
  --r-md: 20px;
  --r-lg: 30px;
  --r-xl: 60px;
  --r-pill: 999px;

  --container: 1600px;
  --gutter: clamp(20px, 4vw, 48px);

  /* --- Ритм по вертикали --- */
  --section-y: clamp(60px, 11vw, 168px);

  /* --- Движение --- */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 0.24s;
  --dur: 0.42s;
  --dur-slow: 0.9s;

  /* --- Типографика --- */
  --font-ui: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Unbounded', 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: ui-monospace, 'SF Mono', 'JetBrains Mono', Consolas, monospace;

  --step--1: clamp(0.78rem, 0.75rem + 0.15vw, 0.86rem);
  --step-0: clamp(0.94rem, 0.9rem + 0.2vw, 1.05rem);
  --step-1: clamp(1.1rem, 1rem + 0.5vw, 1.35rem);
  --step-2: clamp(1.4rem, 1.15rem + 1.2vw, 2rem);
  --step-3: clamp(1.7rem, 1.25rem + 2.2vw, 3.1rem);
  /* Нижняя граница подобрана под самое длинное слово в CAPS-заголовках
     («ВЫПОЛНЕННЫЕ», «КОНСТРУКТОР»): на 375 px оно должно влезать в колонку */
  --step-4: clamp(1.95rem, 1.1rem + 3.6vw, 5rem);
  --step-5: clamp(2.4rem, 1.3rem + 6.4vw, 8rem);

  --header-h: 76px;

  color-scheme: dark;
}

/* --------------------------------------------------------------- Reset -- */

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

* {
  margin: 0;
  padding: 0;
}

html {
  background: var(--void);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100svh;
  background: var(--void);
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: var(--step-0);
  font-weight: 400;
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body.is-locked {
  overflow: hidden;
}

img,
svg,
video,
canvas,
iframe {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

input,
textarea,
button,
select {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

table {
  border-collapse: collapse;
}

::selection {
  background: var(--lime);
  color: var(--void);
}

/* Единый видимый фокус — важен, поскольку весь сайт тёмный */
:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
  border-radius: 4px;
}

/* --------------------------------------------------------- Типографика -- */

h1,
h2,
h3,
h4 {
  color: var(--white);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.display {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.035em;
  /* Не плотнее. У Unbounded прописные высотой 0,75 кегля, а кратка над Й
     поднимается на 0,99, точки над Ё — на 1,01. При 0,94 они втыкались
     в букву строкой выше («ГОТОВЫХ / РЕШЕНИЙ» на телефоне). 1,06 — минимум,
     при котором столкновений нет ни на одной ширине: подобрано замером,
     проверяется в tools/check-layout.js. */
  line-height: 1.06;
  /* Аварийный перенос: длинное слово в CAPS не должно раздвигать страницу
     на узких экранах. При правильном кегле не срабатывает вовсе. */
  overflow-wrap: break-word;
}

.h-hero {
  font-size: var(--step-5);
}

.h-card {
  font-size: var(--step-2);
  color: white;
  font-weight: 600;
}

/* Кегль растёт с шириной окна, а в шапке на две колонки заголовку
   достаётся левая: на 900–1300px «Выполненные» туда не влезало и рвалось.
   Поэтому ещё и не шире колонки-контейнера (.section__head--split).
   Самое длинное слово — 10,2 кегля в ширину, 9.4cqi оставляет запас 4%.
   Вне контейнера cqi считается от окна и ничего не меняет */
.h-sect {
  font-size: var(--step-4);
  font-size: min(var(--step-4), 9.4cqi);
}

.h-sub {
  font-size: var(--step-1);
}

p {
  text-wrap: pretty;
}

strong {
  color: var(--white);
  font-weight: 700;
}

.lime {
  color: var(--lime);
}

.mag {
  color: var(--magenta);
}

.white {
  color: var(--white);
}

.muted {
  color: var(--muted);
}

.faint {
  color: var(--faint);
}

/* Обводочный текст — для больших «призрачных» слов в фонах секций */
.outline-text {
  color: transparent;
  -webkit-text-stroke: 1px var(--line-strong);
}

/* Надзаголовок секции: «01 / ПОРТФОЛИО» */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--faint);
}

.eyebrow::before {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--lime);
  flex: none;
}

.eyebrow--plain::before {
  display: none;
}

/* -------------------------------------------------------------- Layout -- */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  position: relative;
  padding-block: var(--section-y);
}

.section.section--no-pt {
  padding-block: unset;
  padding-bottom: var(--section-y);
}

.section--void {
  background: var(--void);
}

.section--graphite {
  background: var(--bg);
}

/* Мягкая граница между грунтами вместо жёсткой линии */
.section--fade-top::before,
.section--fade-bottom::after {
  content: '';
  position: absolute;
  inset-inline: 0;
  height: 140px;
  pointer-events: none;
}

.section--fade-top::before {
  top: 0;
  background: linear-gradient(to bottom, var(--void), transparent);
}

.section--fade-bottom::after {
  bottom: 0;
  background: linear-gradient(to top, var(--void), transparent);
}

.section__head {
  display: grid;
  gap: clamp(20px, 3vw, 32px);
  margin-bottom: clamp(44px, 6vw, 80px);
}

/* Без этого длинный заголовок раздувает колонку грида шире контейнера */
.section__head>* {
  min-width: 0;
}

/* Колонка с заголовком — контейнер: от её ширины считается кегль .h-sect.
   Контейнером делаем именно колонку, а не шапку: контейнер изолирует
   смешивание, и античная фигура в шапке проступила бы чёрным фоном */
.section__head--split> :first-child {
  container-type: inline-size;
}

@media (min-width: 900px) {
  .section__head--split {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    align-items: end;
    gap: clamp(32px, 5vw, 80px);
  }
}

.section__lead {
  max-width: 56ch;
  font-size: var(--step-1);
  color: var(--muted);
}

/* Тонкая техническая сетка поверх тёмного грунта (скин A · Void) */
.grid-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: clamp(60px, 8vw, 110px) clamp(60px, 8vw, 110px);
  mask-image: radial-gradient(ellipse 90% 70% at 50% 40%, #000 20%, transparent 78%);
  opacity: 0.55;
}

/* Зерно — снимает «пластиковость» больших тёмных плоскостей */
.grain {
  position: fixed;
  inset: 0;
  z-index: 900;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ----------------------------------------------------------- Утилиты --- */

.stack {
  display: grid;
  gap: var(--gap, 16px);
}

.row {
  display: flex;
  align-items: center;
  gap: var(--gap, 12px);
}

.row-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--gap, 12px);
}

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

.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 1200;
  padding: 10px 18px;
  border-radius: var(--r-pill);
  background: var(--lime);
  color: var(--void);
  font-weight: 700;
  transform: translateY(-200%);
  transition: transform var(--dur) var(--ease);
}

.skip-link:focus-visible {
  transform: translateY(0);
}

.num {
  font-family: var(--font-display);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
}

.mono {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}


/* cookies */

.popup_cookie {
  position: fixed;
  bottom: 0px;
  left: 0;
  padding: 30px 0 20px 0;

  background: linear-gradient(0deg, rgba(0, 0, 0, .75), transparent);
  z-index: 10;
  display: none;
  width: 100%;

}

.window_cookie {
  display: flex;
  align-items: center;
  gap: 40px;
  max-width: 1600px;
  width: 100%;
  background: #262626;
  position: relative;
  padding: 21px 40px;
  border-radius: 30px;
  left: 50%;
  transform: translateX(-50%);
  animation: showCookies .75s cubic-bezier(0.175, 0.885, 0.32, 1.275);


  color: #8C8C8C;
  font-size: 16px;
  line-height: 130%;
  letter-spacing: -0.16px;
}

.window_cookie a {
  color: #FFF;

  font-size: 16px;
  line-height: 130%;
  text-decoration: underline;
}

.close_pop {
  position: absolute;
  top: 20px;
  right: 20px;
}

.window_cookie__btn {
  min-width: unset;
  cursor: pointer;
}

.window_cookie__btn.button-yellow .button-inner {
  width: 100%;
  padding-inline: 60px;
}

.window_cookie__btn .btn__label {
  font-size: 16px;
}

.window_cookie__btn.btn--lg {
  padding: 20px 40px;
}

@keyframes showCookies {
  0% {
    transform: translateY(100px) translateX(-50%);
  }

  100% {
    transform: translateY(0) translateX(-50%);
  }
}



@media (max-width:1700px) {
  .window_cookie {
    max-width: 90%;
  }
}

@media (max-width:767px) {
  .window_cookie {
    max-width: calc(100% - 40px);
    gap: 20px;
    flex-direction: column;
  }

  .window_cookie,
  .window_cookie a {
    font-size: 14px;
  }


  .window_cookie__btn .btn__label {
    font-size: 14px;
  }

  .window_cookie__btn.btn--lg {
    padding: 16px 32px;
  }

}

.privacy-page p {
  line-height: 150%;
}

.privacy-page a {
  text-decoration: underline;
  font-weight: bold;
}

.privacy-page table {
  overflow: hidden;
}

.privacy-page table p {
  padding-top: 0;
}

.privacy-page table tr td {
  padding: 20px;
}


.article-inner__info .title-h2:first-child {
  padding-top: 0;
}

.article-inner__info .title-h3 {
  font-weight: 400;
  font-size: 20px;
  line-height: 120%;
  letter-spacing: -0.01em;
  color: #fff;
  padding-top: 30px;
}

.article-inner__info p {
  line-height: 130%;
  letter-spacing: -0.01em;
  color: #d9d9d9;
  padding-top: 20px;
}

@media only screen and (max-width: 991px) {
  .article-inner__info p {
    padding-top: 20px;
  }
}

.article-inner__info p span {
  font-weight: 500;
  color: #fff;
}

.article-inner__info ul {
  padding-top: 30px;
}

@media only screen and (max-width: 991px) {
  .article-inner__info ul {
    padding-top: 20px;
  }
}

.article-inner__info ul li {
  margin-bottom: 20px;
  line-height: 130%;
  letter-spacing: -0.01em;
  color: #fff;
  /* display: flex;
  align-items: baseline; */
  position: relative;
  transition: all .3s;
  gap: 10px;
  padding-left: 20px;
}

.article-inner__info ul li:before {
  content: "";
  display: block;
  background: #d47aea;
  position: absolute;
  top: 5px;
  left: 0;
  width: 10px;
  height: 10px;
  min-width: 10px;
  border-radius: 100%;
}

.article-inner__info ul li:last-child {
  margin-bottom: 0;
}

.article-inner__info ol {
  padding-top: 30px;
}

@media only screen and (max-width: 991px) {
  .article-inner__info ol {
    padding-top: 20px;
  }
}

.article-inner__info ol>li {
  margin-bottom: 20px;
  line-height: 130%;
  letter-spacing: -0.01em;
  color: #fff;
  gap: 10px;
  list-style: none;
  counter-increment: liNumber;
  position: relative;
  padding-left: 40px;
  transition: all .3s;
}

.article-inner__info ol>li:hover {
  transform: translateX(5px);
}

.article-inner__info ul>li:hover {
  transform: translateX(5px);
}

.article-inner__info li>ul,
.article-inner__info li>ol {
  padding-top: 15px;
}

.article-inner__info ol>li:before {
  content: counter(liNumber);
  display: flex;
  min-width: 10px;
  font-size: 18px;
  position: absolute;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 25px;
  height: 25px;
  border: 1px solid #d47aea;
  color: #d47aea;
  top: -5px;
  left: 0;
}

.article-inner__info ul li:last-child {
  margin-bottom: 0;
}

.article-inner__info img {
  display: flex;
  max-width: 100%;
  height: auto;
  position: relative;
  object-fit: contain;
  /* margin: 0 auto; */
  margin-top: 40px;
  /* aspect-ratio: 1 / 0.563; */
  border-radius: 30px;
}

.article-inner__info h2 {
  padding-top: 30px;
  font-size: clamp(1.375rem, 1.1417rem + 0.9333vw, 2.25rem);
  text-transform: uppercase;
  background: linear-gradient(180deg, #fff 0%, #7d7d7d 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 500;
}

.article-inner__info h3 {
  padding-top: 30px;
  font-size: clamp(1.125rem, 1.0917rem + 0.1333vw, 1.25rem);
  position: relative;
  font-weight: 500;
  color: white;
}

.article-inner__info strong {
  font-weight: bold;
}

.article-inner__info table {
  margin-top: 30px;
  width: 100%;
  color: white;
  border-collapse: collapse;
  outline: 2px solid #313131;
  border-radius: 30px;
}

.article-inner__info table tr th {
  /* border: 3px solid white; */
  padding: 10px;
  /* border-bottom: 3px solid white; */
}

.article-inner__info table tr:nth-child(even) {
  background: #262626;
}

.article-inner__info table tr td {
  padding: 10px 15px;
  /* border: 1px solid white; */
  outline: 1px solid #313131;
}

.article-inner__info table tr:last-child td:last-child {
  outline: 1px solid transparent;
}

.article-inner__info table tr:last-child td:first-child {
  outline: 1px solid transparent;
}

@media only screen and (max-width: 991px) {
  .article-inner__info img {
    margin-top: 30px;
  }
}

.article-inner__info a {
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-word;
}


.article-inner__info img:after {
  display: block;
  content: "";
  position: absolute;
  inset: 0px;
  padding: 1px;
  border-radius: 30px;
  background: linear-gradient(286.98deg, rgba(255, 255, 255, 0.2) 2.22%, rgba(0, 0, 0, 0.2) 43.6%, #30302f 97.82%);
  mask: linear-gradient(fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  -webkit-mask-composite: xor;
  transition: 300ms;
}

@media only screen and (max-width: 767px) {
  .article-inner__info img:after {
    border-radius: 15px;
  }
}

@media only screen and (max-width: 767px) {
  .article-inner__image img {
    border-radius: 15px;
  }
}


/* cookies */

/* ------------------------------------------------ Reveal (базовое состояние)
   Элементы прячутся только если JS жив — иначе контент виден без анимаций. */

html.js [data-reveal] {
  opacity: 0;
}

html.js [data-reveal-line]>span {
  display: block;
}

/* --------------------------------------------- prefers-reduced-motion --- */

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  html.js [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }

  .grain {
    display: none;
  }
}

.h-hero-sity {
    font-size: min(clamp(2.4rem, 5.9vw, 2.9rem), 11.4cqi);
}