:root {
  --bg: #fafafa;
  --fg: #000;
  --accent: #111;
  --ease-out: cubic-bezier(0.215, 0.61, 0.355, 1);
  --ease-expo: cubic-bezier(0.19, 1, 0.22, 1);
  --pad: 14px;
  --col: 12.5rem; /* 200px — ширина первой колонки, как у первой кнопки */
  --font: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

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

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: pan-x;
  cursor: default;
}
body.is-stage { cursor: grab; touch-action: none; }
body.is-stage.is-dragging { cursor: grabbing; }
body.is-stage.is-pointer { cursor: pointer; }

a { color: inherit; text-decoration: none; }
:focus { outline: none; }
:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent); color: #fff; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { list-style: none; }
img { display: block; }

.t11 { font-size: 0.6875rem; line-height: 1.2; letter-spacing: 0.015em; }

/* ---------- Стеклянная кнопка (ключевой элемент стиля) ---------- */
.button {
  position: relative;
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  letter-spacing: 0.015em;
  text-transform: uppercase;
  cursor: pointer;
  font-size: 0.65625rem;
  line-height: 1.05;
}
.button::before, .button::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}
.button::before { border: 1px solid currentColor; opacity: 0.13; }
.button::after { background: currentColor; opacity: 0.03; }
.button span, .button small { opacity: 0.3; transition: opacity 0.5s var(--ease-out); }
.button:hover span, .button:hover small, .button.active span, .button.active small { opacity: 1; }

/* ---------- Прелоадер ---------- */
.loader {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  font-size: 0.6875rem;
  letter-spacing: 0.015em;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  color: var(--accent);
}
.loader-bar {
  position: absolute; left: 0; bottom: 0;
  width: 100%; height: 2px;
  background: var(--accent);
  transform-origin: left;
  transform: scaleX(0);
}

/* ---------- Header: текстовая строка с номерами (как список на главной) ---------- */
.header {
  position: fixed; top: 0; left: 0; z-index: 10;
  width: 100%;
  padding: 16px var(--pad) 28px;
  opacity: 0;
  pointer-events: none;
  background: linear-gradient(var(--bg) 45%, rgba(250, 250, 250, 0)); /* подложка для читаемости над стопкой */
}
.header ul { display: flex; align-items: baseline; gap: 28px; counter-reset: nav; }
.header li { display: flex; }
.header li.nav-first { margin-right: 20px; }
.header li:not(.nav-first) { counter-increment: nav; }
.header .button {
  display: flex; align-items: baseline; gap: 2px;
  padding: 4px 0;
  pointer-events: all;
  user-select: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.header .button::before, .header .button::after { display: none; }
.header li:not(.nav-first) .button > span::before {
  content: counter(nav, decimal-leading-zero);
  margin-right: 8px;
}
.header .nav-first .brand, .header .nav-first small { opacity: 1; }
.header small { font-size: 0.45rem; margin-top: -0.5px; }
.header .md-only { margin-left: 4px; }

/* ---------- Сцена ---------- */
.stage { position: fixed; inset: 0; z-index: 0; }
.stage canvas { display: block; width: 100%; height: 100%; }
.cover { position: fixed; inset: 0; z-index: 1; background: var(--bg); pointer-events: none; }

.cursor-label {
  position: fixed; top: 0; left: 0; z-index: 11;
  padding: 12px;
  font-size: 0.6875rem;
  letter-spacing: 0.015em;
  text-transform: uppercase;
  mix-blend-mode: exclusion;
  color: #fff;
  pointer-events: none;
  opacity: 0;
  white-space: nowrap;
  will-change: transform;
}

/* ---------- Overview / Index ---------- */
.view-switch {
  position: fixed !important; right: var(--pad); bottom: 14px; z-index: 3;
  opacity: 0;
  cursor: default;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.view-switch::before, .view-switch::after { display: none; }
.view-switch ul { display: flex; gap: 24px; }
.view-switch a { display: flex; }
.view-switch a span { opacity: 0.35; transition: opacity 0.5s var(--ease-out); }
.view-switch a:hover span, .view-switch a.active span { opacity: 1; }

/* ---------- Страницы ---------- */
.page {
  position: fixed; inset: 0; z-index: 2;
  display: flex; flex-direction: column;
  width: 100%; height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: var(--bg);
  opacity: 0;
  visibility: hidden;
  font-size: 0.6875rem;
  line-height: 1.2;
  letter-spacing: 0.015em;
}
.page.is-visible { visibility: visible; }
.page-index { background: transparent; }

.page-head {
  display: flex; flex-direction: column; justify-content: center;
  min-height: 24rem;
  margin-top: 60px;
  padding: 80px var(--pad);
  flex-shrink: 0;
}

.row { display: flex; }
.row > :first-child { width: var(--col); flex-shrink: 0; }

/* Index */
.index-table { padding: 16.5rem var(--pad) 120px; text-transform: uppercase; }
.index-table .row { padding: 3px 0 4px; }
.index-table .row > :nth-child(1) { width: 68px; }
.index-table .row > :nth-child(2) { width: 290px; flex-shrink: 0; }
.index-table .row > :nth-child(3) { width: 260px; flex-shrink: 0; }
.index-table .head { margin-bottom: 18px; }
.index-table a.row > * { opacity: 0.3; transition: opacity 0.5s var(--ease-out), color 0.3s var(--ease-out); }
.index-table a.row:hover > * { opacity: 1; color: var(--accent); }

/* Project */
.project-head { gap: 0; }
.project-head .row { align-items: flex-start; }
.project-head h1 { font-weight: 400; font-size: inherit; text-transform: uppercase; }
.project-head p { max-width: 287px; padding: 0 2px; }
.project-meta { margin-top: 14px; color: rgba(0, 0, 0, 0.3); text-transform: uppercase; }
.project-meta em { font-style: normal; color: var(--accent); }
.project-buy { display: inline-flex; margin-top: 18px; }
.project-facts {
  display: grid; grid-template-columns: 110px 1fr; gap: 6px 12px;
  margin-top: 22px; text-transform: uppercase;
}
.project-facts dt { color: rgba(0, 0, 0, 0.3); }
/* галерея кейса — без фона, фото на цвете страницы */
.media.case { background: transparent; aspect-ratio: 1 / 1; }
.media.case.full { aspect-ratio: 16 / 9; }
.media.case img { object-fit: contain; padding: 4%; mix-blend-mode: multiply; filter: brightness(1.06) contrast(1.03); }

.media-grid { display: grid; grid-template-columns: 1fr 1fr; }
.media {
  position: relative; overflow: hidden;
  grid-column: span 1;
  background: #eee;
}
.media.full { grid-column: span 2; }
.media img { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); object-fit: cover; }
.media .bar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1;
  display: flex; align-items: center; gap: 16px;
  padding: 24px 16px 18px;
  color: #fff;
  text-transform: uppercase;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.25));
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-expo);
}
.media:hover .bar { opacity: 1; transform: none; }
.media .bar .track { position: relative; flex: 1; height: 2px; background: rgba(255, 255, 255, 0.3); }
.media .bar .track i { position: absolute; inset: 0; background: #fff; transform-origin: left; transform: scaleX(0.3); }
.media .bar .time { min-width: 58px; font-variant-numeric: tabular-nums; }

.project-next {
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  min-height: 60vh; gap: 10px;
  text-transform: uppercase;
}
.project-next small { opacity: 0.3; font-size: inherit; }
.project-next a span { opacity: 0.3; transition: opacity 0.5s var(--ease-out); }
.project-next a:hover span { opacity: 1; color: var(--accent); }

/* Research */
.research-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 3.8125rem;
  row-gap: 3.8125rem;
  padding-top: 9rem;
  align-items: start;
}
.research-item { position: relative; cursor: zoom-in; overflow: hidden; background: #eee; }
.research-item img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.research-text {
  display: flex; flex-direction: column; justify-content: center;
  min-height: 24rem; padding: 0 var(--pad); flex-shrink: 0;
}
.research-text p { max-width: 17.6875rem; }

.lightbox {
  position: fixed; inset: 0; z-index: 12;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.7);
  -webkit-backdrop-filter: blur(2.5rem);
  backdrop-filter: blur(2.5rem);
  cursor: zoom-out;
  opacity: 0; visibility: hidden;
}
.lightbox img { max-width: 80vw; max-height: 84vh; width: auto; height: auto; }

/* Studio */
.studio-intro { max-width: 26rem; }
.studio-lists { padding: 0 var(--pad) 140px; text-transform: uppercase; display: flex; flex-direction: column; gap: 32px; }
.studio-lists .row > :first-child { opacity: 0.3; }
.studio-eye {
  position: fixed; top: 0; right: 0; z-index: 2;
  height: 50vh; width: 50vh;
  pointer-events: none;
  opacity: 0;
  mix-blend-mode: multiply;
}

/* Contact */
.contact {
  position: fixed; inset: 0; z-index: 9;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  pointer-events: none;
}
.contact-pills ul { display: flex; gap: 2px; padding: 0 var(--pad); }
.contact-pills li { flex-shrink: 0; opacity: 0; }
.contact-pills .button { display: block; padding: 14px 16px; }
.contact-pills .pill-sq { border-radius: 6px; }
.contact-pills .pill { border-radius: 999px; }
.contact-pills span { display: flex; transform: translateY(1.5px); }
.contact-legal {
  position: fixed; left: var(--pad); bottom: 11px;
  display: flex; gap: 12px;
  font-size: 0.6875rem; letter-spacing: 0.015em; text-transform: uppercase;
  opacity: 0;
}
.contact-legal span { opacity: 0.3; transition: opacity 0.5s var(--ease-out); }
.contact-legal a:hover span { opacity: 1; color: var(--accent); }
.contact-pills .button:hover span { color: var(--accent); }
.contact.open, .contact.open .contact-pills li, .contact.open .contact-legal { pointer-events: all; }
.contact-blur {
  position: fixed; inset: 0; z-index: 8;
  background: rgba(255, 255, 255, 0.7);
  -webkit-backdrop-filter: blur(2.5rem);
  backdrop-filter: blur(2.5rem);
  opacity: 0;
  pointer-events: none;
}
.contact-blur.open { pointer-events: all; }

/* ---------- Стекло (CSS-версия шейдера карточек): дымка как на unveil + блики ---------- */
.glass {
  position: relative;
  display: block;
  overflow: hidden;
  isolation: isolate;
  background: #d9d9d6;
  box-shadow: 0 22px 44px -22px rgba(0, 0, 0, 0.45), 0 2px 6px -2px rgba(0, 0, 0, 0.12);
}
.glass img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(1.1);
  transition: transform 0.8s var(--ease-expo);
}
/* кромка: сильно размытая копия — цветовая дымка как на unveil.
   Небольшое увеличение уводит «тающий» край блюра за карточку, чтобы не было светлого ореола */
.glass .g-blur {
  transform: scale(1.12);
  filter: blur(22px) saturate(1.5);
  -webkit-mask:
    linear-gradient(90deg, #000, transparent 15%, transparent 85%, #000),
    linear-gradient(#000, transparent 15%, transparent 85%, #000);
  mask:
    linear-gradient(90deg, #000, transparent 15%, transparent 85%, #000),
    linear-gradient(#000, transparent 15%, transparent 85%, #000);
}
/* объём: внутренние блик и тень + мягкий блик-«капля» сверху */
.glass::after {
  content: '';
  position: absolute; inset: 0; z-index: 1;
  border-radius: inherit;
  box-shadow:
    inset 0 -10px 24px -14px rgba(0, 0, 0, 0.3);
  pointer-events: none;
}
.glass:hover .g-sharp { transform: scale(1.04); }

/* ---------- Главная ---------- */
.page-home { font-size: 0.8125rem; line-height: 1.3; }
.home { display: grid; grid-template-columns: minmax(280px, 30%) 1fr; min-height: 100%; flex-shrink: 0; }

.home-side {
  position: sticky; top: 0;
  align-self: start;
  height: 100vh; height: 100dvh;
  display: flex; flex-direction: column; gap: 22px;
  padding: 104px var(--pad) 18px;
}
.home-mark {
  font-size: clamp(2.6rem, 5.4vw, 5.5rem);
  line-height: 0.86;
  letter-spacing: -0.045em;
  font-weight: 500;
}
.home-mark small { font-size: 0.3em; vertical-align: top; color: var(--accent); margin-left: 0.08em; }
.home-tagline { max-width: 20rem; text-transform: uppercase; font-size: 0.6875rem; line-height: 1.25; }
.home-anchors { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-top: auto; }
/* пункт списка: номер + название, без рамок */
.anchor {
  font-size: 0.6875rem; letter-spacing: 0.015em; text-transform: uppercase;
  color: rgba(0, 0, 0, 0.35);
  transition: color 0.4s var(--ease-out);
}
.anchor .n { margin-right: 10px; }
.anchor:hover, .anchor.active { color: var(--fg); }
/* главная кнопка: сплошная чёрная полоса со стрелкой */
.cta {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 14px 16px 13px;
  background: var(--fg); color: var(--bg);
  font-size: 0.6875rem; letter-spacing: 0.015em; text-transform: uppercase;
  transition: background 0.3s var(--ease-out);
}
.cta:hover { background: #333; }
.cta .arr { transition: transform 0.5s var(--ease-expo); }
.cta:hover .arr { transform: translateX(4px); }
.home-cta { align-self: stretch; }

.home-main { padding: 0 var(--pad) 0 0; min-width: 0; }

.home-hero {
  position: relative;
  perspective: 2200px;
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 104px 0 40px;
}
.hero-stack {
  position: absolute; left: 0; right: 0; top: 80px; bottom: 190px;
}
/* «россыпь» пластин: позиция, поворот и глубина задаются из JS (LAYOUT в main.js) */
.hero-card {
  position: absolute; top: 50%; left: 50%;
  width: clamp(140px, 16vw, 260px);
  animation: hero-float 7s ease-in-out infinite;
  animation-delay: calc(var(--k) * -0.9s);
}
.hero-card .glass { pointer-events: none; }
@keyframes hero-float {
  0%, 100% { margin-top: -6px; }
  50% { margin-top: 6px; }
}
.home-statement {
  position: relative;
  z-index: 20;
  max-width: 44rem;
  font-weight: 400;
  font-size: clamp(1.6rem, 3vw, 2.9rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.home-block { padding: 96px 0; border-top: 1px solid rgba(0, 0, 0, 0.08); }
.home-label { text-transform: uppercase; font-size: 0.6875rem; opacity: 0.3; margin-bottom: 26px; }
.home-h { font-weight: 400; font-size: clamp(1.25rem, 2.2vw, 2rem); line-height: 1.08; letter-spacing: -0.02em; max-width: 46rem; }
.home-h-sm { font-size: clamp(1.05rem, 1.6vw, 1.45rem); line-height: 1.2; margin-bottom: 0.8em; }
.home-p { max-width: 30rem; margin-top: 22px; }

.home-cols {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
  margin: 40px 0 44px;
  text-transform: uppercase; font-size: 0.6875rem;
}
.home-cols li { padding: 9px 0 8px; border-bottom: 1px solid rgba(0, 0, 0, 0.08); }
.home-cols li::before { content: '— '; color: var(--accent); }
.home-wide { width: 100%; }

.home-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 44px; }
/* цифра под тонкой линией, без плашки — в стиле меню и списка слева */
.stat {
  display: flex; flex-direction: column; gap: 28px;
  padding-top: 14px;
  border-top: 1px solid var(--fg);
}
.stat b { font-weight: 400; font-size: clamp(2.2rem, 4vw, 3.6rem); letter-spacing: -0.04em; line-height: 1; }
.stat span { text-transform: uppercase; font-size: 0.6875rem; color: rgba(0, 0, 0, 0.45); max-width: 14rem; }

.home-strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 2px; margin: 44px 0 2px; align-items: end; }

.home-steps { list-style: none; }
.step {
  display: grid; grid-template-columns: 70px minmax(140px, 16rem) 1fr; gap: 16px;
  padding: 22px 0; border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.step-n { font-size: 0.6875rem; color: var(--accent); }
.step b { font-weight: 400; font-size: 1.15rem; letter-spacing: -0.01em; }
.step p { max-width: 26rem; opacity: 0.6; }

.home-clients { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 24px; }
/* клиент: название под тонкой линией, номер справа — без плиток */
.client {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 14px 0 40px;
  border-top: 1px solid var(--fg);
}
.client-name { font-size: clamp(1.05rem, 1.5vw, 1.35rem); letter-spacing: -0.01em; }
.client .n { font-size: 0.6875rem; color: rgba(0, 0, 0, 0.45); }


.home-final { display: flex; flex-direction: column; justify-content: space-between; min-height: 70vh; }
.home-final-cta {
  width: 100%;
  padding: 56px 20px;
  font-size: clamp(1.4rem, 3vw, 2.6rem);
  letter-spacing: -0.02em;
}
.home-footer { display: flex; justify-content: space-between; padding-top: 24px; text-transform: uppercase; font-size: 0.6875rem; }
.home-footer span { opacity: 0.3; }
.home-footer a:hover span { opacity: 1; color: var(--accent); }

/* ---------- Адаптив ---------- */
.lead-dialog {
  margin: auto; padding: 48px; width: min(640px, calc(100% - 28px));
  max-height: calc(100dvh - 28px); border: 1px solid #ddd;
  background: var(--bg); color: var(--fg); overflow-y: auto;
  touch-action: pan-y; font-size: 13px; font-family: var(--font);
}
.lead-dialog::backdrop { background: rgba(250, 250, 250, 0.8); backdrop-filter: blur(16px); }
.lead-dialog [hidden] { display: none !important; }
.lead-close { position: absolute; right: 16px; top: 10px; font-size: 30px; padding: 4px 8px; }
.lead-eyebrow { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 24px; color: #666; }
.lead-dialog h2 { font-size: clamp(30px, 6vw, 46px); font-weight: 400; line-height: 1.02; letter-spacing: -.04em; }
.lead-intro { margin: 22px 0 30px; line-height: 1.45; max-width: 420px; color: #555; }
.lead-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.lead-dialog label { display: flex; flex-direction: column; gap: 10px; font-size: 11px; }
.lead-dialog input:not([type="checkbox"]), .lead-dialog textarea {
  width: 100%; min-width: 0; font: inherit; font-size: 13px; color: #111;
  border: 0; border-bottom: 1px solid #bbb; border-radius: 0;
  background: transparent; padding: 10px 0; outline-offset: 4px;
}
.lead-dialog textarea { resize: vertical; }
.lead-comment { margin-top: 24px; }
.lead-dialog .lead-consent { flex-direction: row; align-items: flex-start; gap: 10px; margin: 24px 0 12px; color: #555; line-height: 1.5; }
.lead-consent input { accent-color: #111; margin-top: 2px; flex-shrink: 0; }
.lead-consent a { text-decoration: underline; }
.lead-submit { margin-top: 18px; width: 100%; }
.lead-submit:disabled { opacity: .5; cursor: wait; }
.lead-error { color: #a52727; line-height: 1.4; min-height: 16px; }
.lead-honey { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 540px) {
  .lead-dialog { padding: 38px 22px 24px; }
  .lead-grid { grid-template-columns: 1fr; gap: 16px; }
}
.sm-only { display: none !important; }
@media (min-width: 640px) {
  .sm-only { display: flex !important; }
  .research-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 768px) {
  .research-grid { grid-template-columns: repeat(5, 1fr); }
}
@media (min-width: 1024px) {
  .research-grid { grid-template-columns: repeat(6, 1fr); column-gap: 6.1875rem; row-gap: 5.9375rem; }
}
@media (min-width: 1280px) { .research-grid { grid-template-columns: repeat(7, 1fr); } }
@media (min-width: 1536px) { .research-grid { grid-template-columns: repeat(8, 1fr); column-gap: 7vw; } }

@media (max-width: 767px) {
  .md-only-li { display: none !important; }
  .header ul { gap: 16px; }
  .header li.nav-first { margin-right: 4px; }
  .home { grid-template-columns: 1fr; }
  .home-side { position: relative; height: auto; padding-top: 96px; }
  .home-anchors { display: none; }
  .home-main { padding: 0 var(--pad); }
  .home-hero { min-height: 80vh; padding-top: 20px; }
  .hero-card { width: 26vw; }
  .home-cols, .home-stats { grid-template-columns: 1fr 1fr; }
  .home-strip { grid-template-columns: repeat(3, 1fr); }
  .home-clients { grid-template-columns: 1fr 1fr; }
  .step { grid-template-columns: 40px 1fr; }
  .step p { grid-column: 2; }
  .header .md-only { display: none; }
  .row { flex-direction: column; gap: 6px; }
  .project-head .row { gap: 41px; }
  .project-head p { margin-left: auto; width: 75%; }
  .media, .media.full { grid-column: span 2; }
  .media.case.full { aspect-ratio: 1 / 1; }
  .index-table .row { flex-direction: row; }
  .index-table .row > :nth-child(2) { width: auto; flex: 1; }
  .index-table .row > :nth-child(3) { display: none; }
  .index-table .row > :nth-child(2) { width: auto; }
  .studio-eye { display: none; }
}
