/* Incanto — проектное бюро. Тёмная галерея. */

:root {
  --ink:    #101113;
  --panel:  #17181b;
  --line:   #26282c;
  --line-2: #34373c;
  --text:   #ecebe7;
  --soft:   #a4a199;
  --muted:  #8f8c84;
  --dim:    #6d6a63;
  --brass:  #b99a6b;

  --pad: clamp(20px, 6vw, 96px);
  --gap-section: clamp(72px, 11vw, 160px);

  --f-display: clamp(40px, 8vw, 104px);
  --f-h1:      clamp(36px, 6.5vw, 80px);
  --f-h2:      clamp(28px, 3.4vw, 40px);
  --f-h3:      clamp(20px, 2vw, 28px);
  --f-body:    clamp(15px, 1.2vw, 17px);
  --f-meta:    13px;

  --sans: 'Onest', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: var(--f-body);
  font-weight: 300;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; transition: color .25s ease; }
a:hover { color: var(--brass); }
a:focus-visible, button:focus-visible {
  outline: 1px solid var(--brass);
  outline-offset: 4px;
}

h1, h2, h3 { font-weight: 200; letter-spacing: -0.04em; margin: 0; line-height: 1.04; }
p { margin: 0; }

.mono {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.wrap { padding-inline: var(--pad); }
.section { padding-block: var(--gap-section); }
.section + .section { padding-top: 0; }
.rule { border-top: 1px solid var(--line); }

/* ---------- Шапка ---------- */

.header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px var(--pad);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--ink) 88%, transparent);
  backdrop-filter: blur(12px);
}

.brand { display: flex; align-items: center; gap: 15px; }
.brand__mark { width: 32px; height: 32px; flex-shrink: 0; color: currentColor; }
.brand__name { font-size: 19px; font-weight: 400; letter-spacing: 0.3em; }

.nav { display: flex; gap: clamp(24px, 3vw, 48px); font-size: 15px; }
.nav a[aria-current="page"] { color: var(--brass); }

.burger {
  display: none;
  width: 48px; height: 48px;
  margin-right: -12px;
  align-items: center;
  justify-content: center;
  background: none;
  border: 0;
  color: var(--text);
  cursor: pointer;
}

@media (max-width: 860px) {
  .nav { display: none; }
  .burger { display: flex; }
  .brand__mark { width: 26px; height: 26px; }
  .brand__name { font-size: 16px; letter-spacing: 0.26em; }
}

/* Мобильное меню */
.menu {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: var(--ink);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 22px var(--pad) var(--pad);
  transform: translateY(-100%);
  transition: transform .45s cubic-bezier(.4,0,.2,1);
}
.menu[data-open="true"] { transform: translateY(0); }
.menu__top { display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.menu__list {
  margin-top: auto; margin-bottom: auto;
  display: flex; flex-direction: column; gap: 8px;
}
.menu__list a { font-size: clamp(32px, 9vw, 48px); font-weight: 200; letter-spacing: -0.04em; }
.menu__foot { display: flex; flex-direction: column; gap: 6px; }

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

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 300px);
  gap: clamp(32px, 6vw, 100px);
  align-items: start;
  padding-block: clamp(72px, 12vw, 176px) clamp(56px, 8vw, 120px);
}
.hero h1 { font-size: var(--f-display); line-height: 0.98; letter-spacing: -0.05em; }
.hero__aside { display: flex; flex-direction: column; gap: 22px; padding-top: 14px; }
.hero__aside p { color: #b3b0a8; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .hero__aside { padding-top: 0; gap: 18px; }
}

/* ---------- Слоты под изображения ---------- */

.shot {
  position: relative;
  background: var(--panel);
  overflow: hidden;
}
.shot::after {
  content: attr(data-label);
  position: absolute;
  left: 24px; bottom: 20px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
}
.shot:not(:has(img))::after { content: attr(data-label); }
.shot:has(img)::after { content: none; }
.shot svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.shot--hero { height: clamp(280px, 46vw, 660px); }
.shot--card { aspect-ratio: 4 / 3.1; }
.shot--wide { height: clamp(240px, 38vw, 560px); }

/* Плавное появление фото */
.shot img { opacity: 0; transition: opacity .8s ease; }
.shot img.is-loaded { opacity: 1; }

/* ---------- Проекты ---------- */

.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: clamp(32px, 5vw, 72px);
}
.section__head h2 { font-size: var(--f-h2); }

.grid-projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr));
  gap: clamp(40px, 5vw, 88px) clamp(20px, 2.5vw, 40px);
}

.card { display: flex; flex-direction: column; gap: 24px; }
.card__meta {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  transition: border-color .25s ease;
}
.card:hover .card__meta { border-color: var(--brass); }
.card__title { font-size: clamp(20px, 1.9vw, 26px); font-weight: 300; letter-spacing: -0.025em; }
.card__sub { font-family: var(--mono); font-size: var(--f-meta); color: var(--muted); line-height: 1.75; }

/* ---------- Услуги ---------- */

.services { display: flex; flex-direction: column; }
.service {
  display: grid;
  grid-template-columns: 40px minmax(0, 420px) minmax(0, 1fr) 110px;
  gap: clamp(16px, 3vw, 48px);
  align-items: baseline;
  padding-block: clamp(22px, 2.6vw, 34px);
  border-top: 1px solid var(--line);
}
.services .service:last-child { border-bottom: 1px solid var(--line); }
.service__num { font-family: var(--mono); font-size: var(--f-meta); color: var(--brass); }
.service__name { font-size: var(--f-h3); font-weight: 300; letter-spacing: -0.025em; }
.service__desc { color: var(--soft); }
.service__tag { font-family: var(--mono); font-size: var(--f-meta); color: var(--dim); text-align: right; }

@media (max-width: 900px) {
  .service { grid-template-columns: 28px 1fr; row-gap: 10px; }
  .service__desc, .service__tag { grid-column: 2; text-align: left; }
}

/* ---------- О бюро ---------- */

.about {
  display: grid;
  grid-template-columns: minmax(0, 620px) minmax(0, 260px);
  gap: clamp(40px, 8vw, 120px);
  justify-content: space-between;
  align-items: start;
}
.about__lead { font-size: clamp(17px, 1.6vw, 19px); line-height: 1.7; color: #b3b0a8; }
.figures { display: flex; flex-direction: column; gap: 40px; padding-top: 12px; }
.figure { border-top: 1px solid var(--line); padding-top: 18px; display: flex; flex-direction: column; gap: 8px; }
.figure__num { font-size: clamp(34px, 3.4vw, 44px); font-weight: 200; letter-spacing: -0.045em; }
.figure__cap { font-family: var(--mono); font-size: var(--f-meta); color: var(--muted); }

@media (max-width: 860px) {
  .about { grid-template-columns: 1fr; }
  .figures { flex-direction: row; flex-wrap: wrap; gap: 28px; }
  .figure { flex: 1 1 160px; }
}

/* ---------- Контакт ---------- */

.cta {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: clamp(32px, 6vw, 100px);
  flex-wrap: wrap;
}
.cta h2 { font-size: clamp(30px, 4.4vw, 60px); line-height: 1.06; letter-spacing: -0.045em; max-width: 720px; }
.cta__side { display: flex; flex-direction: column; gap: 22px; align-items: flex-start; }

.link-lg {
  font-size: clamp(22px, 2.4vw, 32px);
  font-weight: 300;
  letter-spacing: -0.025em;
  border-bottom: 1px solid var(--line-2);
  padding-bottom: 8px;
  transition: border-color .25s ease, color .25s ease;
}
.link-lg:hover { border-color: var(--brass); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  background: var(--text);
  color: var(--ink);
  padding: 19px 30px;
  min-height: 48px;
  font-size: 15px;
  border: 1px solid var(--text);
  cursor: pointer;
  transition: background .25s ease, color .25s ease;
}
.btn:hover { background: transparent; color: var(--text); }
.btn svg { transition: transform .25s ease; }
.btn:hover svg { transform: translateX(4px); }

.link-quiet {
  font-family: var(--mono);
  font-size: var(--f-meta);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Формы ---------- */

.form { display: flex; flex-direction: column; gap: 30px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.field { display: flex; flex-direction: column; gap: 12px; }
.field label {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.field input, .field textarea {
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line-2);
  padding: 0 0 14px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 300;
  transition: border-color .25s ease;
}
.field textarea { resize: vertical; min-height: 88px; }
.field input::placeholder, .field textarea::placeholder { color: var(--dim); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--brass); }
.form__note { font-family: var(--mono); font-size: 12px; line-height: 1.7; color: var(--muted); }
.form__file { display: flex; align-items: center; gap: 14px; font-family: var(--mono); font-size: 13px; color: var(--soft); cursor: pointer; }
.form__file svg { color: var(--brass); }
.form__file input { position: absolute; width: 1px; height: 1px; opacity: 0; }

@media (max-width: 640px) { .form__row { grid-template-columns: 1fr; } }

/* ---------- Контакты ---------- */

.contacts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: clamp(32px, 5vw, 64px) clamp(40px, 8vw, 120px);
}
.contact { border-top: 1px solid var(--line); padding-top: 24px; display: flex; flex-direction: column; gap: 16px; }
.contact__value { font-size: clamp(24px, 3vw, 40px); font-weight: 200; letter-spacing: -0.035em; }
.contact__value--sm { font-size: clamp(19px, 1.8vw, 24px); font-weight: 300; line-height: 1.45; letter-spacing: -0.02em; }

.requisites {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: clamp(24px, 3vw, 48px);
}
.requisite { border-top: 1px solid var(--line); padding-top: 20px; display: flex; flex-direction: column; gap: 12px; }
.requisite__val { font-size: 15px; line-height: 1.6; }
.requisite__val--mono { font-family: var(--mono); }

/* ---------- Фильтр ---------- */

.filter { display: flex; gap: clamp(18px, 2.4vw, 36px); flex-wrap: wrap; font-size: 15px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.filter a { color: var(--muted); }
.filter a[aria-current="true"] { color: var(--brass); }

/* ---------- Страница объекта ---------- */

.spec { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: clamp(24px, 3vw, 48px); }
.spec__item { border-top: 1px solid var(--line); padding-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.spec__val { font-size: clamp(19px, 1.8vw, 24px); font-weight: 300; letter-spacing: -0.02em; }
.gallery { display: grid; gap: clamp(20px, 2.5vw, 40px); }
.gallery--two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }

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

.footer {
  border-top: 1px solid var(--line);
  padding: clamp(40px, 5vw, 56px) var(--pad);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: clamp(32px, 5vw, 80px);
  flex-wrap: wrap;
}
.footer__cols { display: flex; gap: clamp(32px, 5vw, 72px); font-size: 15px; }
.footer__col { display: flex; flex-direction: column; gap: 14px; }
.footer__legal { font-family: var(--mono); font-size: 12px; line-height: 1.9; color: var(--dim); text-align: right; }
@media (max-width: 860px) { .footer__legal { text-align: left; } }

/* ---------- Появление при прокрутке ---------- */

.reveal { opacity: 0; transform: translateY(20px); }
.reveal.is-visible {
  opacity: 1;
  transform: none;
  transition: opacity .6s ease, transform .6s cubic-bezier(.2,.6,.2,1);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal.is-visible { opacity: 1; transform: none; transition: none; }
  .shot img { opacity: 1; transition: none; }
  .menu { transition: none; }
  * { animation-duration: .01ms !important; }
}

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

/* ---------- Блок «Запрос сметы» ---------- */

.request {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 7vw, 120px);
  align-items: start;
}
.request > * { min-width: 0; }
@media (max-width: 860px) { .request { grid-template-columns: 1fr; } }

/* Материалы портфолио и задание на проект */
.hero-project { margin: 0; }
.hero-project > .shot { display: block; }
.hero-project__caption {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-block: 22px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
}
.card__scope { font-size: 14px; color: var(--soft); margin-top: -12px; }
.about__copy { display: flex; flex-direction: column; align-items: flex-start; gap: 32px; max-width: 720px; }
.cta__description { color: var(--soft); max-width: 520px; }
.brief-list { display: flex; flex-direction: column; }
.brief-item { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 24px; border-top: 1px solid var(--line); padding-block: 28px; }
.brief-item:last-child { border-bottom: 1px solid var(--line); }
.brief-item h3 { font-size: clamp(22px, 2vw, 28px); margin-bottom: 14px; }
.brief-item p { color: var(--soft); }
.footer__identity { display: flex; flex-direction: column; gap: 16px; max-width: 300px; }
.footer__description { font-size: 14px; line-height: 1.65; color: var(--muted); }
[id] { scroll-margin-top: 104px; }
@media (max-width: 640px) {
  .brief-item { gap: 16px; grid-template-columns: 24px minmax(0, 1fr); }
  .hero-project__caption { font-size: 11px; }
  .figure__num { overflow-wrap: anywhere; }
}
