/* ════════════════════════════════════════════════════════════════
   NOKAZOO — дизайн-система «Лёд»
   95% ахроматики + один голос (#38BDF8). Акцент появляется ТРИ раза
   за страницу: подсветка героя, статус LIVE, кнопка контакта.
   Теней нет вообще — глубина строится волосяными линиями и светом.
   ════════════════════════════════════════════════════════════════ */

:root {
  /* Поверхности */
  --void:        #080A0C;   /* холст — почти чёрный с синим подтоном */
  --void-lift:   #0C0F12;   /* приподнятая полоса секции */

  /* Текст */
  --paper:       #F4F7FA;   /* основной */
  --paper-dim:   #C6CDD4;   /* вторичный */
  --muted:       #7C8792;   /* приглушённый */
  --faint:       #4A535C;   /* служебный */

  /* Линии — вместо теней */
  --hair:        rgba(244, 247, 250, 0.12);
  --hair-soft:   rgba(244, 247, 250, 0.06);

  /* Единственный цвет */
  --ice:         #38BDF8;
  --ice-dim:     #7DD3FC;
  --ice-wash:    rgba(56, 189, 248, 0.08);

  /* Шрифты */
  --display: 'Playfair Display', Georgia, serif;
  /* Unbounded — характерная геометрия для названий проектов: она и даёт
     странице «своё лицо», как Aeonik у референсов */
  --brand:   'Unbounded', 'Onest', system-ui, sans-serif;
  --sans:    'Onest', system-ui, -apple-system, sans-serif;
  --mono:    'JetBrains Mono', ui-monospace, Menlo, monospace;

  /* Ритм */
  --maxw: 1200px;
  --gap-section: clamp(96px, 12vw, 160px);
  --pad-x: clamp(20px, 5vw, 64px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--void);
  color: var(--paper);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

/* ── Штамп секции: разрядка И ЕСТЬ оформление ─────────────────── */
.stamp {
  font-family: var(--mono);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--paper-dim);
}
.stamp--sm { font-size: 11px; letter-spacing: 0.22em; color: var(--muted); }
.stamp--xl {
  font-size: clamp(28px, 6vw, 74px);
  line-height: 0.95;
  color: #EDF1F5;
  margin-bottom: 28px;
}

.mono { font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; }

/* ── Навигация: матовое стекло ────────────────────────────────── */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
  padding: 16px var(--pad-x);
  background: rgba(8, 10, 12, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: padding .45s cubic-bezier(.16,1,.3,1), border-color .45s, background .45s;
}
/* При прокрутке панель поджимается и проявляет линию — сигнал «страница пошла» */
.nav.is-scrolled {
  padding-top: 11px; padding-bottom: 11px;
  border-bottom-color: var(--hair-soft);
  background: rgba(8, 10, 12, 0.86);
}

/* Подчёркивание в навигации прочерчивается, а не появляется */
.nav__links a { position: relative; }
.nav__links a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -5px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform .4s cubic-bezier(.16,1,.3,1);
}
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav__brand {
  font-family: var(--mono); font-weight: 500;
  font-size: 13px; letter-spacing: 0.28em;
}
.nav__links { display: flex; gap: 28px; }
.nav__links a {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--muted); transition: color .25s;
}
.nav__links a:hover { color: var(--paper); }
.nav__cta {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.14em;
  padding: 9px 16px; border: 1px solid var(--hair); border-radius: 8px;
  transition: border-color .25s, background .25s;
}
.nav__cta:hover { border-color: var(--paper); background: rgba(244,247,250,0.04); }

/* ── Герой ────────────────────────────────────────────────────── */
.hero {
  position: relative; min-height: 100svh;
  display: flex; align-items: center;
  padding: 140px var(--pad-x) 80px;
  overflow: hidden;
}
/* Точечная графика: руки почти касаются — человек и машина.
   mix-blend-mode: screen гасит чёрный фон картинки в ноль, поэтому рамки
   PNG не видно и точки будто нарисованы прямо на холсте. */
.hero__art {
  position: absolute; left: 38%; right: 0; bottom: 4%;
  aspect-ratio: 1 / 1;
  /* фон вырезан в прозрачность — режим наложения больше не нужен,
     рамки PNG не возникает ни на каком фоне */
  background: url('assets/art_hands_cut.png') no-repeat center / contain;
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
  /* появление, затем очень медленный дрейф — страница дышит, но не мельтешит */
  --shift: 0px;
  /* transform целиком принадлежит параллаксу из скрипта, поэтому вход
     делаем прозрачностью и резкостью — иначе анимации дерутся за одно свойство */
  transform: translate3d(0, calc(var(--shift) * -1), 0);
  opacity: .95;
  /* Гасим САМУ картинку по левому краю, а не экран поверх неё: затемняющий
     градиент на всю ширину резал руку пополам видимым стыком. */
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 26%, #000 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 26%, #000 100%);
  background: none;
}

/* Две половины сходятся навстречу — момент почти-касания.
   Разрезано по зазору между пальцами, поэтому шва не видно. */
.hand {
  position: absolute; inset: 0;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  will-change: transform;
}
.hand--l { background-image: url('assets/hand_left.png'); }
.hand--r { background-image: url('assets/hand_right.png'); }

.anim .hand--l { animation: joinL 3.4s cubic-bezier(.22, 1, .28, 1) .35s both; }
.anim .hand--r { animation: joinR 3.4s cubic-bezier(.22, 1, .28, 1) .35s both; }

@keyframes joinL {
  from { transform: translate3d(-9%, 0, 0); }
  to   { transform: none; }
}
@keyframes joinR {
  from { transform: translate3d(9%, 0, 0); }
  to   { transform: none; }
}
.anim .hero__art {
  opacity: 0;
  animation: artIn 2.1s cubic-bezier(.16, 1, .3, 1) .45s forwards;
}
@keyframes artIn {
  from { opacity: 0; filter: blur(14px); }
  to   { opacity: .95; filter: blur(0); }
}
/* Вуаль только по вертикали — растворяет арт в холст сверху и снизу.
   Горизонтального затемнения нет: им занимается маска на самой картинке. */
.hero__veil {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, var(--void) 0%, transparent 20%, transparent 78%, var(--void) 100%);
  pointer-events: none;
}
.hero__inner { position: relative; width: 100%; max-width: var(--maxw); margin: 0 auto; }

/* ── Выход героя: элементы поднимаются по очереди ──────────────
   ВАЖНО: по умолчанию всё видно. Анимация включается только когда скрипт
   поставил на <body> класс anim. Иначе сбой JS или отключённые анимации
   оставили бы герой пустым — это дороже любой красоты. */
.anim .hero__inner > .stamp--sm,
.anim .hero__lead,
.anim .hero__meta,
.anim .hero__scroll,
.anim .hero__title .line {
  opacity: 0;
  transform: translate3d(0, 22px, 0);
  animation: liftIn .95s cubic-bezier(.16, 1, .3, 1) forwards;
}
@keyframes liftIn { to { opacity: 1; transform: none; } }

.anim .hero__inner > .stamp--sm     { animation-delay: .15s; }
.anim .hero__title .line:nth-child(1) { animation-delay: .28s; }
.anim .hero__title .line:nth-child(2) { animation-delay: .40s; }
.anim .hero__title .line:nth-child(3) { animation-delay: .52s; }
.anim .hero__lead   { animation-delay: .70s; }
.anim .hero__meta   { animation-delay: .82s; }
.anim .hero__scroll { animation-delay: .94s; }

/* Точка после «СИСТЕМЫ» ставится последней — как подпись */
.anim .line--accent .dot {
  display: inline-block; opacity: 0;
  animation: dotIn .5s cubic-bezier(.34, 1.56, .64, 1) 1.15s forwards;
}
@keyframes dotIn {
  from { opacity: 0; transform: scale(.2); }
  to   { opacity: 1; transform: scale(1); }
}

/* Расслоённый заголовок: сплошной → контур → акцент */
.hero__title {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(52px, 12.5vw, 168px);
  line-height: 0.86;
  letter-spacing: -0.02em;
  margin: 22px 0 28px;
}
.hero__title .line { display: block; }
.line--solid  { color: var(--paper); }
.line--outline {
  color: transparent;
  -webkit-text-stroke: 1.4px rgba(244, 247, 250, 0.55);
}
.line--accent { color: var(--ice); }
.line--accent .dot { color: var(--paper); }

.hero__lead {
  max-width: 46ch; font-size: clamp(15px, 1.5vw, 19px);
  color: var(--paper-dim); line-height: 1.65;
}

.hero__meta {
  display: flex; flex-wrap: wrap; gap: clamp(28px, 5vw, 72px);
  margin: 44px 0 40px;
  padding-top: 28px; border-top: 1px solid var(--hair);
}
.metric b {
  display: block; font-family: var(--display); font-weight: 500;
  font-size: clamp(30px, 4vw, 46px); line-height: 1;
}
.metric span {
  font-family: var(--mono); font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.18em; color: var(--muted);
}

.hero__scroll {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.2em; color: var(--muted);
  transition: color .25s;
}
.hero__scroll:hover { color: var(--paper); }
.hero__scroll i { font-style: normal; animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0) } 50% { transform: translateY(5px) } }

/* ── Секции ───────────────────────────────────────────────────── */
.section {
  max-width: var(--maxw); margin: 0 auto;
  padding: var(--gap-section) var(--pad-x);
}
.section__note {
  max-width: 54ch; color: var(--muted);
  font-size: 15px; margin-bottom: 56px;
}

/* ── Продукты: живой скрин лендинга + разбор рядом ─────────────── */
.projects { display: flex; flex-direction: column; }

.proj {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
  padding: clamp(40px, 6vw, 88px) 0;
  border-top: 1px solid var(--hair);
}
/* Чередуем стороны — иначе четыре одинаковых блока читаются как таблица */
.proj:nth-child(even) .proj__visual { order: 2; }

/* Скрин лендинга: рамка-хайрлайн вместо тени, лёгкий наклон при наведении */
.proj__visual {
  position: relative; overflow: hidden;
  border: 1px solid var(--hair); border-radius: 12px;
  background: var(--void-lift);
  aspect-ratio: 16 / 10;
}
.proj__visual img {
  width: 100%; height: 100%; object-fit: cover; object-position: top center;
  display: block;
  filter: saturate(.92) brightness(.92);
  transition: transform 1.1s cubic-bezier(.16,1,.3,1), filter .6s;
}
.proj:hover .proj__visual img { transform: scale(1.045); filter: saturate(1) brightness(1); }

/* Метка статуса поверх скрина — как LIVE у референса */
.proj__badge {
  position: absolute; top: 14px; left: 14px; z-index: 2;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(8, 10, 12, .78);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--hair);
  font-family: var(--mono); font-size: 9px;
  text-transform: uppercase; letter-spacing: .18em; color: var(--paper);
}

.proj__n {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: .18em; color: var(--faint);
}
.proj__name {
  font-family: var(--brand); font-weight: 400;
  font-size: clamp(30px, 3.8vw, 58px); line-height: 1.02;
  letter-spacing: -0.02em; text-transform: uppercase;
  margin: 14px 0 16px;
}
.proj__sub { color: var(--paper-dim); font-size: 15px; max-width: 46ch; }

.proj__tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 26px; }
.proj__tag {
  font-family: var(--mono); font-size: 9px;
  text-transform: uppercase; letter-spacing: .16em; color: var(--muted);
  padding: 6px 11px; border: 1px solid var(--hair-soft); border-radius: 999px;
}

.proj__actions {
  display: flex; flex-wrap: wrap; gap: 10px;
  padding-top: 22px; border-top: 1px solid var(--hair-soft);
}
.act {
  font-family: var(--mono); font-size: 10px;
  text-transform: uppercase; letter-spacing: .16em;
  padding: 12px 18px; border: 1px solid var(--hair); border-radius: 8px;
  color: var(--paper-dim); background: none; cursor: pointer;
  transition: border-color .3s, color .3s, transform .3s;
}
.act:hover { border-color: var(--paper); color: var(--paper); transform: translateY(-2px); }
.act--ghost { border-color: transparent; color: var(--muted); padding-left: 6px; }
.act--ghost:hover { border-color: transparent; color: var(--ice); }

.sys {
  position: relative;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: center; gap: clamp(16px, 3vw, 40px);
  padding: clamp(24px, 3.4vw, 38px) 0;
  border-bottom: 1px solid var(--hair);
  cursor: pointer;
  transition: padding-left .45s cubic-bezier(.16,1,.3,1);
}
/* Ледяная линия прочерчивается слева направо — вместо заливки при наведении */
.sys::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: var(--ice);
  transform: scaleX(0); transform-origin: left;
  transition: transform .5s cubic-bezier(.16,1,.3,1);
}
.sys:hover::after, .sys:focus-visible::after { transform: scaleX(1); }
.sys:hover { padding-left: 14px; }
.sys:focus-visible { outline: none; padding-left: 14px; }
.sys__name { transition: color .3s; }
.sys:hover .sys__name { color: #fff; }

.sys__n {
  font-family: var(--mono); font-size: 12px;
  color: var(--faint); letter-spacing: 0.1em;
}
.sys__main { min-width: 0; }
.sys__name {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(28px, 4.4vw, 52px); line-height: 1.05;
  letter-spacing: -0.01em;
}
.sys__sub {
  font-size: 14px; color: var(--muted); margin-top: 8px;
}
.sys__tags {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px;
}
.sys__tag {
  font-family: var(--mono); font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--muted);
  padding: 5px 10px; border: 1px solid var(--hair-soft); border-radius: 999px;
}

.sys__right { display: flex; align-items: center; gap: 20px; white-space: nowrap; }

/* Статус LIVE — второе (и последнее) появление акцента на странице */
.status {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.18em; color: var(--paper-dim);
}
.status__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ice); box-shadow: 0 0 0 0 rgba(56,189,248,.6);
  animation: ping 2.6s cubic-bezier(.36,.07,.19,.97) infinite;
}
@keyframes ping {
  0%   { box-shadow: 0 0 0 0 rgba(56,189,248,.55) }
  70%  { box-shadow: 0 0 0 9px rgba(56,189,248,0) }
  100% { box-shadow: 0 0 0 0 rgba(56,189,248,0) }
}
.status--dev .status__dot { background: var(--faint); animation: none; }

.sys__open {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em;
  color: var(--muted); transition: color .25s, transform .25s;
}
.sys:hover .sys__open { color: var(--paper); transform: translateX(4px); }

/* ── Подход ───────────────────────────────────────────────────── */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 96px); }
.display {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(26px, 3.4vw, 46px); line-height: 1.18;
  letter-spacing: -0.01em;
}
.display em { font-style: italic; color: var(--paper); }
.display--center { text-align: center; max-width: 20ch; margin: 0 auto 44px; }

.steps { list-style: none; }
.steps li {
  display: flex; gap: 20px;
  padding: 22px 0; border-bottom: 1px solid var(--hair-soft);
}
.steps li:first-child { padding-top: 0; }
.steps__n {
  font-family: var(--mono); font-size: 11px; color: var(--faint);
  letter-spacing: 0.1em; padding-top: 4px;
}
.steps b { display: block; font-weight: 500; font-size: 17px; margin-bottom: 6px; }
.steps p { color: var(--muted); font-size: 14px; }

/* ── Контакты ─────────────────────────────────────────────────── */
.section--contact { text-align: center; }
.contact__actions {
  display: flex; flex-wrap: wrap; gap: 14px; justify-content: center;
}
.btn {
  font-family: var(--mono); font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.16em;
  padding: 16px 28px; border: 1px solid var(--hair); border-radius: 8px;
  color: var(--paper-dim);
  transition: border-color .25s, color .25s, background .25s;
}
.btn:hover { border-color: var(--paper); color: var(--paper); }
/* Третье и последнее появление акцента */
.btn--accent {
  background: var(--ice); border-color: var(--ice); color: var(--void);
  font-weight: 500;
}
.btn--accent:hover { background: var(--ice-dim); border-color: var(--ice-dim); color: var(--void); }

/* ── Подвал-подпись ───────────────────────────────────────────── */
.footer {
  display: flex; flex-wrap: wrap; gap: 16px;
  align-items: center; justify-content: space-between;
  max-width: var(--maxw); margin: 0 auto;
  padding: 32px var(--pad-x) 40px;
  border-top: 1px solid var(--hair);
  color: var(--paper-dim);
}
.footer__l, .footer__r { display: flex; align-items: center; gap: 14px; }
.footer__dim { color: var(--faint); }
.pulse {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ice); opacity: .9;
  animation: fade 2.6s ease-in-out infinite;
}
@keyframes fade { 0%,100% { opacity: .25 } 50% { opacity: 1 } }

/* ── Раскрытая карточка продукта ──────────────────────────────── */
.sheet {
  position: fixed; inset: 0; z-index: 90;
  display: none; align-items: center; justify-content: center;
  padding: clamp(16px, 4vw, 48px);
}
.sheet[aria-hidden="false"] { display: flex; }
.sheet__backdrop {
  position: absolute; inset: 0;
  background: rgba(4, 6, 8, .82);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.sheet__card {
  position: relative; width: min(760px, 100%);
  max-height: 86vh; overflow-y: auto;
  background: var(--void-lift);
  border: 1px solid var(--hair);
  border-radius: 20px;
  padding: clamp(28px, 4vw, 48px);
  animation: rise .38s cubic-bezier(.16,1,.3,1);
}
@keyframes rise { from { opacity: 0; transform: translateY(18px) } to { opacity: 1; transform: none } }
.sheet__close {
  position: absolute; top: 18px; right: 18px;
  width: 34px; height: 34px; border-radius: 8px;
  background: transparent; border: 1px solid var(--hair);
  color: var(--muted); cursor: pointer; font-size: 13px;
  transition: color .25s, border-color .25s;
}
.sheet__close:hover { color: var(--paper); border-color: var(--paper); }

.sheet__head { margin-bottom: 26px; }
.sheet__name {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(30px, 4vw, 46px); line-height: 1.05;
}
.sheet__sub { color: var(--muted); font-size: 15px; margin-top: 8px; }
.sheet h4 {
  font-family: var(--mono); font-weight: 400; font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.2em;
  color: var(--muted); margin: 26px 0 12px;
}
.sheet p { color: var(--paper-dim); font-size: 15px; }
.sheet ul { list-style: none; }
.sheet li {
  position: relative; padding-left: 20px; margin-bottom: 10px;
  color: var(--paper-dim); font-size: 15px;
}
.sheet li::before {
  content: ''; position: absolute; left: 0; top: 10px;
  width: 6px; height: 1px; background: var(--muted);
}
.sheet__links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

/* ── Появление при скролле ────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(24px); }
.reveal.in {
  opacity: 1; transform: none;
  transition: opacity .8s cubic-bezier(.16,1,.3,1), transform .8s cubic-bezier(.16,1,.3,1);
}

/* Штамп секции въезжает под маской — буквы будто выкатываются из темноты */
.stamp--xl {
  overflow: hidden;
}
.stamp--xl > span {
  display: inline-block;
  transform: translateY(105%);
  transition: transform 1s cubic-bezier(.16, 1, .3, 1);
}
.stamp--xl.in > span { transform: none; }

/* Кнопка контакта чуть подаётся вперёд */
.btn { transition: border-color .3s, color .3s, background .3s, transform .3s; }
.btn:hover { transform: translateY(-2px); }

/* ── Адаптив ──────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  /* На узком экране арт уходит вниз фоном, чтобы не спорить с текстом */
  .hero__art {
    left: -10%; right: -10%; bottom: 2%; opacity: .45;
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 30%);
    mask-image: linear-gradient(180deg, transparent 0%, #000 30%);
  }
  .hero__veil {
    background:
      linear-gradient(180deg, var(--void) 0%, rgba(8,10,12,.86) 40%, rgba(8,10,12,.45) 70%, var(--void) 100%);
  }
}
@media (max-width: 720px) {
  .nav__links { display: none; }
  .sys { grid-template-columns: 40px minmax(0, 1fr); }
  .sys__right {
    grid-column: 2; justify-content: space-between; width: 100%;
    margin-top: 14px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
