/* Сгенерировано subset-fonts.js: вариативные гарнитуры, обрезанные до
   кириллицы, латиницы, цифр и знаков со страницы. Внешних запросов нет. */

@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/golos-text.woff2') format('woff2-variations');
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('../fonts/jetbrains-mono.woff2') format('woff2-variations');
}

/* ═══════════════════════════════════════════════════════════════════════════
   Живой адрес — лендинг-визитка Дениса Шлеева

   Правило страницы: теней нет ни одной. Поверхности отделяются только
   светлотой (белое окно на холодном холсте). Насыщенный цвет ровно один —
   синий действия. Всё остальное цветное на странице приносят сами работы.
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --canvas: #e7eaf2;
  --surface: #ffffff;
  --line: #d7dce9;
  --ink: #14161c;
  --muted: #5c6478;
  --action: #1b36e8;
  --action-press: #1428b8;
  --visited: #6a3ad8;

  --s--1: 0.8125rem;
  --s-0: 1.0625rem;
  --s-1: 1.1875rem;
  --s-2: clamp(1.125rem, 3.6vw, 1.375rem);
  --s-3: clamp(1.5rem, 4.6vw, 2rem);
  --s-4: clamp(1.625rem, 5.4vw, 2.5rem);
  --s-5: clamp(2rem, 8vw, 4rem);

  --sans: 'Golos Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;

  --gap: clamp(56px, 11vw, 104px);
  --pad: 20px;
  --radius: 14px;
  --bar-h: 88px;
}

@media (min-width: 700px) {
  :root {
    --pad: 32px;
    --bar-h: 0px;
  }
}

/* Имя без потолка выкидывает кнопку за первый экран на маленьком телефоне. */
@media (max-width: 400px) {
  :root {
    --s-5: 2.25rem;
  }
}

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

/* Обязательно !important: у .btn и .window собственный display, который иначе
   перебивает hidden из таблицы браузера — и скрытое остаётся на экране. */
[hidden] {
  display: none !important;
}

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

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 400 var(--s-0) / 1.55 var(--sans);
  padding-bottom: calc(var(--bar-h) + env(safe-area-inset-bottom));
  overflow-x: hidden;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.02em;
}

p {
  margin: 0;
}

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

:where(a) {
  color: var(--action);
}

:focus-visible {
  outline: 2px solid var(--action);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: 1080px;
  margin-inline: auto;
  padding-inline: var(--pad);
}

.prose {
  max-width: 660px;
}

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

/* ── Служебная моно-строка ───────────────────────────────────────────────── */

.mono {
  font: 400 var(--s--1) / 1.4 var(--mono);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── Кнопка ──────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  background: var(--action);
  color: #fff;
  font: 600 var(--s-0) / 1 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: background 120ms ease, transform 80ms ease;
}

.btn:hover {
  background: var(--action-press);
}

.btn:active {
  transform: scale(0.98);
}

.btn__icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* ── Первый экран ────────────────────────────────────────────────────────── */

.hero {
  padding-block: clamp(28px, 7vw, 72px) clamp(36px, 7vw, 64px);
}

/* Одна сетка на оба режима. На телефоне портрет стоит рядом с именем, чтобы
   первый экран сходился; на десктопе он уходит в отдельную колонку слева. */
.hero__grid {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: center;
  column-gap: 18px;
  grid-template-areas:
    'kicker kicker'
    'portrait name'
    'intro   intro'
    'facts   facts'
    'cta     cta';
}

.hero__kicker {
  grid-area: kicker;
  margin-bottom: 20px;
}

.hero__name {
  grid-area: name;
  font-size: var(--s-5);
  line-height: 1;
  letter-spacing: -0.035em;
}

.hero__intro {
  grid-area: intro;
  font-size: var(--s-2);
  line-height: 1.45;
  margin-top: 24px;
}

.hero__facts {
  grid-area: facts;
  margin: 20px 0 0;
}

/* Точка приклеена неразрывным пробелом к предыдущему факту, поэтому она всегда
   остаётся в конце строки и никогда не начинает новую. */
.facts__sep {
  color: var(--line);
}

.hero__cta {
  grid-area: cta;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  margin-top: 28px;
}

/* Портрет. Пока фото нет — аккуратный блок с инициалами, а не серая дыра. */
.portrait {
  grid-area: portrait;
  width: 112px;
  height: 112px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface);
}

.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portrait--empty {
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

@media (min-width: 760px) {
  .hero__grid {
    grid-template-columns: 240px minmax(0, 1fr);
    align-items: start;
    column-gap: 40px;
    grid-template-areas:
      'portrait kicker'
      'portrait name'
      'portrait intro'
      'portrait facts'
      'portrait cta';
  }

  .portrait {
    width: 240px;
    height: 300px;
  }

  .portrait--empty {
    font-size: 3rem;
  }

  .hero__intro,
  .hero__facts,
  .hero__cta {
    max-width: 620px;
  }
}

/* ── Секции ──────────────────────────────────────────────────────────────── */

.section {
  padding-block: var(--gap);
}

.section__title {
  font-size: var(--s-4);
  line-height: 1.1;
  margin-bottom: 12px;
}

.section__lead {
  color: var(--muted);
  margin-bottom: 28px;
}

/* Подзаголовок внутри секции: тем же кеглем, что и «Работы», он ломает иерархию. */
.section__title--sub {
  font-size: var(--s-3);
}

/* ── Фильтр по сферам ────────────────────────────────────────────────────── */

.chips {
  display: flex;
  gap: 8px;
  margin-bottom: 36px;
  padding-bottom: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.chips::-webkit-scrollbar {
  display: none;
}

/* На широком экране лента не должна уезжать за край — там есть место перенести. */
@media (min-width: 760px) {
  .chips {
    flex-wrap: wrap;
    gap: 10px;
    overflow: visible;
  }
}

.chip {
  flex: none;
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font: 500 var(--s--1) / 1 var(--sans);
  white-space: nowrap;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}

.chip__count {
  color: var(--muted);
  margin-left: 6px;
}

.chip:hover {
  border-color: var(--muted);
}

.chip[aria-pressed='true'] {
  background: var(--action);
  border-color: var(--action);
  color: #fff;
}

.chip[aria-pressed='true'] .chip__count {
  color: rgba(255, 255, 255, 0.72);
}

/* ── Адресная строка: главная форма страницы ─────────────────────────────── */

.addr {
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
  font: 500 0.9375rem / 1 var(--mono);
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--ink);
}

.addr__scheme {
  flex: none;
  color: var(--muted);
  font-weight: 400;
}

.addr__domain {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

a.addr:visited .addr__domain {
  color: var(--visited);
}

.addr__go {
  flex: none;
  margin-left: auto;
  padding-left: 12px;
  color: var(--action);
  font-size: 1rem;
  transition: transform 140ms ease;
}

/* Строка без ссылки отличается отсутствием стрелки ↗ и реакции на курсор.
   Сам адрес приглушать нельзя: иначе весь индекс из 24 строк выцветает. */
.addr__note {
  color: var(--muted);
  font-weight: 400;
}

/* ── Шесть окон ──────────────────────────────────────────────────────────── */

.windows {
  display: grid;
  gap: 20px;
}

@media (min-width: 760px) {
  .windows {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
}

.window {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.window__addr {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

@media (hover: hover) {
  a.window__addr:hover {
    background: var(--canvas);
  }

  a.window__addr:hover .addr__go {
    transform: translateX(3px);
  }

  a.window__addr:hover .addr__domain {
    text-decoration: underline;
    text-decoration-color: var(--action);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
  }
}

.window__shot {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: var(--canvas);
  cursor: zoom-in;
}

.window__shot img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: top center;
}

.window__body {
  padding: 16px;
}

.window__meta {
  margin-bottom: 8px;
}

.window__name {
  font-size: var(--s-1);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.window__desc {
  color: var(--muted);
  font-size: var(--s--1);
  line-height: 1.5;
  text-transform: none;
  letter-spacing: 0;
  font-family: var(--sans);
}

.window__result {
  margin-top: 10px;
  font-size: var(--s--1);
  font-weight: 500;
}

/* ── Плотный индекс ──────────────────────────────────────────────────────── */

/* Когда включён фильтр по сфере, всё найденное идёт одним потоком: призыв
   и заголовок «Что ещё делал» между окнами и списком только разрывают набор. */
.is-filtered .cta-mid,
.is-filtered .index-head {
  display: none;
}

.is-filtered .index-group:first-of-type {
  margin-top: 8px;
}

/* Индекс разбит по типу работы: крупные проекты сверху, визитки внизу.
   Заголовок раздела делает этот порядок видимым, а не подразумеваемым. */
.index-group + .index-group {
  margin-top: 44px;
}

.index-group__label {
  margin: 0 0 12px;
  font-weight: 500;
  color: var(--ink);
}

.index {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

@media (min-width: 760px) {
  .index {
    grid-template-columns: 1fr 1fr;
    column-gap: 24px;
  }
}

.row {
  border-bottom: 1px solid var(--line);
}

.row__head {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  padding: 12px 0;
  border: 0;
  background: none;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

@media (min-width: 760px) {
  .row__head {
    min-height: 60px;
  }
}

.row__text {
  display: grid;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.row__meta {
  font: 400 var(--s--1) / 1.3 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Широкая строка с адресом у одного края и плюсом у другого выглядит рваной.
   Сфера и город уходят вправо и держат строку целиком. */
@media (min-width: 760px) {
  .row__text {
    grid-template-columns: minmax(0, auto) minmax(0, 1fr);
    align-items: baseline;
    gap: 16px;
  }

  .row__meta {
    text-align: right;
    /* Плотнее, чем в остальных моно-подписях: иначе «БУРЕНИЕ СКВАЖИН ·
       ВЛАДИМИР» не влезает в колонку и обрезается многоточием. */
    font-size: 0.75rem;
    letter-spacing: 0.03em;
  }
}

.row__plus {
  flex: none;
  position: relative;
  width: 20px;
  height: 20px;
  color: var(--muted);
  transition: transform 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.row__plus::before,
.row__plus::after {
  content: '';
  position: absolute;
  inset: 50% 0 auto;
  height: 1.5px;
  background: currentColor;
}

.row__plus::after {
  transform: rotate(90deg);
}

.row__head[aria-expanded='true'] .row__plus {
  transform: rotate(45deg);
  color: var(--action);
}

.row__panel {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.row__panel > div {
  overflow: hidden;
}

.row__panel-inner {
  padding-bottom: 16px;
  color: var(--muted);
  font-size: var(--s--1);
  line-height: 1.55;
}

.row__result {
  margin-top: 6px;
  color: var(--ink);
  font-weight: 500;
}

/* Схлопывает панели только скрипт: без JS описания видны сразу. */
.js .row__panel {
  grid-template-rows: 0fr;
}

.js .row__head[aria-expanded='true'] + .row__panel {
  grid-template-rows: 1fr;
}

/* ── Промежуточный призыв ────────────────────────────────────────────────── */

.cta-mid {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  padding-block: var(--gap);
}

.cta-mid__text {
  font-size: var(--s-2);
  line-height: 1.45;
  max-width: 660px;
}

/* ── Финальный призыв ────────────────────────────────────────────────────── */

.cta-final__title {
  font-size: var(--s-3);
  margin-bottom: 16px;
}

.cta-final__text {
  color: var(--muted);
  margin-bottom: 16px;
}

.cta-final__secondary {
  color: var(--muted);
  font-size: var(--s--1);
  line-height: 1.55;
  margin-bottom: 28px;
}

.prices {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
  font-weight: 500;
}

.prices li + li::before {
  content: '·';
  margin-right: 14px;
  color: var(--line);
}

.cta-final__contact {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.handle {
  font: 400 var(--s--1) / 1 var(--mono);
  color: var(--muted);
  text-decoration: none;
}

/* ── Подвал ──────────────────────────────────────────────────────────────── */

.footer {
  padding-block: 40px 56px;
  border-top: 1px solid var(--line);
}

/* ── Липкая панель на телефоне ───────────────────────────────────────────── */

.bar {
  position: fixed;
  inset: auto 0 0;
  z-index: 40;
  padding: 12px var(--pad) calc(12px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
}

.bar .btn {
  width: 100%;
  min-height: 52px;
}

@media (min-width: 700px) {
  .bar {
    display: none;
  }
}

/* ── Просмотр скриншота ──────────────────────────────────────────────────── */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: rgba(20, 22, 28, 0.88);
  opacity: 0;
  transition: opacity 160ms ease;
}

.lightbox[hidden] {
  display: none;
}

.lightbox.is-open {
  opacity: 1;
}

.lightbox__top,
.lightbox__bottom {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px var(--pad);
  background: var(--surface);
}

.lightbox__top {
  justify-content: space-between;
}

.lightbox__bottom {
  flex-wrap: wrap;
  padding-bottom: calc(14px + env(safe-area-inset-bottom));
}

.lightbox__domain {
  min-width: 0;
  font: 500 0.9375rem / 1 var(--mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lightbox__close {
  flex: none;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: var(--canvas);
  color: var(--ink);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox__scroll {
  overflow: auto;
  padding: var(--pad);
  -webkit-overflow-scrolling: touch;
}

.lightbox__scroll img {
  width: 100%;
  max-width: 1080px;
  margin-inline: auto;
  border-radius: 12px;
  background: var(--surface);
}

.btn--ghost {
  background: var(--canvas);
  color: var(--ink);
}

.btn--ghost:hover {
  background: var(--line);
}

/* ── Появление при скролле ───────────────────────────────────────────────── */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(8px);
}

.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
  transition: opacity 220ms ease-out, transform 220ms ease-out;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }

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