/* Мантика — «ночная синька».
   Палитра снята с цианотипии: архитектурный чертёж до появления плоттеров
   печатали именно так — белые линии по синему. Отсюда весь сайт: тёмный,
   холодный, с одним тёплым источником света. */

@font-face {
  font-family: 'Cormorant';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/cormorant-cyrillic-400-normal.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Cormorant';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/cormorant-latin-400-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2122, U+2192, U+2212;
}
@font-face {
  font-family: 'Cormorant';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/cormorant-cyrillic-500-normal.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Cormorant';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/cormorant-latin-500-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2122, U+2192, U+2212;
}

@font-face {
  font-family: 'Commissioner';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('/assets/fonts/commissioner-cyrillic-300-normal.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Commissioner';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('/assets/fonts/commissioner-latin-300-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2122, U+2192, U+2212;
}
@font-face {
  font-family: 'Commissioner';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/commissioner-cyrillic-400-normal.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Commissioner';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/commissioner-latin-400-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2122, U+2192, U+2212;
}
@font-face {
  font-family: 'Commissioner';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/commissioner-cyrillic-500-normal.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Commissioner';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/commissioner-latin-500-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2122, U+2192, U+2212;
}

:root {
  --ink-900: #0b1421;
  --ink-800: #101e30;
  --ink-700: #16283d;
  --paper: #e8edf3;
  --paper-dim: #b6c4d4;
  --sky: #8fb4dc;
  --sun: #f2d9a0;
  --line: rgba(174, 199, 226, 0.18);
  --line-soft: rgba(174, 199, 226, 0.1);

  --ff-display: 'Cormorant', Georgia, 'Times New Roman', serif;
  --ff-text: 'Commissioner', -apple-system, 'Segoe UI', sans-serif;

  --rail: 310px;
  --pad: clamp(1.5rem, 4vw, 5rem);
}

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

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

body {
  margin: 0;
  background: var(--ink-900);
  color: var(--paper);
  font-family: var(--ff-text);
  font-size: clamp(1rem, 0.95rem + 0.2vw, 1.06rem);
  font-weight: 300;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

::selection {
  background: var(--sun);
  color: var(--ink-900);
}

:focus-visible {
  outline: 2px solid var(--sun);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.9rem 1.4rem;
  background: var(--sun);
  color: var(--ink-900);
  text-decoration: none;
}

.skip:focus {
  left: 0;
}

/* ── Каркас: закреплённая левая колонка ───────────────────────── */

.frame {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  min-height: 100vh;
}

.rail {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
  padding: clamp(2rem, 3vw, 3rem) 1.75rem;
  border-right: 1px solid var(--line);
}

.brand {
  display: block;
  text-decoration: none;
}

.brand__name {
  display: block;
  font-family: var(--ff-display);
  font-size: 2.6rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.01em;
}

.brand__kind {
  display: block;
  margin-top: 0.45rem;
  font-size: 0.74rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--paper-dim);
}

.rail__nav {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-block: auto;
}

.rail__link {
  padding: 0.4rem 0;
  font-size: 1.06rem;
  font-weight: 400;
  text-decoration: none;
  color: var(--paper-dim);
  transition: color 0.18s ease;
}

.rail__link:hover {
  color: var(--paper);
}

.rail__link.is-current {
  color: var(--sun);
}

.rail__foot {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.86rem;
  color: var(--paper-dim);
}

.rail__tel {
  font-size: 1.02rem;
  color: var(--paper);
  text-decoration: none;
}

.rail__tel:hover,
.rail__mail:hover {
  color: var(--sun);
}

.rail__mail {
  text-decoration: none;
  overflow-wrap: anywhere;
}

.rail__addr {
  margin: 0.5rem 0 0;
  line-height: 1.45;
}

/* ── Полоса контента ──────────────────────────────────────────── */

.page {
  padding: 0 var(--pad) 0;
  max-width: 1180px;
}

.band {
  padding-block: clamp(3.5rem, 6vw, 6.5rem);
  border-top: 1px solid var(--line-soft);
}

.band:first-child {
  border-top: 0;
}

.band__head {
  max-width: 62rem;
}

.band__title {
  margin: 0;
  /* Ширину задаём заголовку, а не блоку: у антиквы знак узкий,
     и общий max-width на контейнере рвал строку не по смыслу. */
  max-width: 20ch;
  font-family: var(--ff-display);
  font-size: clamp(2.1rem, 1.2rem + 2.8vw, 3.7rem);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -0.005em;
}

.band__lead {
  margin: 1.25rem 0 0;
  max-width: 58ch;
  color: var(--paper-dim);
  font-size: 1.06rem;
}

.lede {
  font-family: var(--ff-display);
  font-size: clamp(1.4rem, 1rem + 1.3vw, 2rem);
  font-weight: 400;
  line-height: 1.35;
  max-width: 34ch;
}

/* ── Кнопки и ссылки-действия ─────────────────────────────────── */

.act {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.5rem;
  font-size: 0.88rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-decoration: none;
  border: 1px solid var(--sun);
  color: var(--sun);
  background: transparent;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.act:hover {
  background: var(--sun);
  color: var(--ink-900);
}

.act--quiet {
  border-color: var(--line);
  color: var(--paper);
}

.act--quiet:hover {
  background: var(--paper);
  border-color: var(--paper);
  color: var(--ink-900);
}

.acts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

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

.foot {
  padding-block: clamp(2.5rem, 4vw, 4rem) 3rem;
  border-top: 1px solid var(--line);
}

.foot__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem 2.5rem;
}

.foot__cell {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.foot__cell--wide {
  grid-column: span 2;
}

.foot__k {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sky);
}

.foot__v {
  font-size: 0.94rem;
  color: var(--paper-dim);
}

.foot__legal {
  margin: 2.5rem 0 0;
  font-size: 0.8rem;
  color: var(--sky);
}

/* ── Адаптив: колонка уезжает наверх ──────────────────────────── */

@media (max-width: 1040px) {
  :root {
    --rail: 250px;
  }
  .brand__name {
    font-size: 2.1rem;
  }
}

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

  .rail {
    position: static;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem 2rem;
    padding: 1.5rem var(--pad);
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .rail__nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin: 0;
  }

  .rail__link {
    font-size: 0.95rem;
  }

  .rail__foot {
    flex-basis: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    align-items: baseline;
  }

  .rail__addr {
    margin: 0;
    flex-basis: 100%;
  }

  .foot__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .foot__grid {
    grid-template-columns: 1fr;
  }
  .foot__cell--wide {
    grid-column: span 1;
  }
}

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

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

.hero {
  padding-top: clamp(2.5rem, 5vw, 5rem);
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 4vw, 4.5rem);
  align-items: center;
}

.hero__eyebrow {
  margin: 0 0 1.5rem;
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sky);
}

.hero__title {
  margin: 0;
  font-family: var(--ff-display);
  max-width: 13ch;
  font-size: clamp(2.4rem, 1.4rem + 3.2vw, 4.4rem);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.01em;
}

.hero__lead {
  margin: 1.75rem 0 0;
  max-width: 48ch;
  color: var(--paper-dim);
  font-size: 1.08rem;
}

.hero__figure {
  position: relative;
  margin: 0;
  overflow: hidden;
}

.massing {
  width: 100%;
  height: auto;
}

/* Свет падает сверху-справа: верх светлее, правая грань в полутени,
   левая — в тени. Объём читается тоном, а не обводкой. */
.v-top {
  fill: #24405f;
}

.v-right {
  fill: #182f48;
}

.v-left {
  fill: #0f2036;
}

.massing__g {
  stroke: var(--line);
  stroke-width: 1;
}

/* Луч проходит по объёмам один раз при загрузке — как солнце за день. */
.hero__sun {
  position: absolute;
  inset: -20% -60%;
  pointer-events: none;
  background: linear-gradient(
    102deg,
    transparent 42%,
    rgba(242, 217, 160, 0.22) 50%,
    transparent 58%
  );
  transform: translateX(-60%);
  animation: sun-pass 3200ms cubic-bezier(0.4, 0, 0.2, 1) 400ms both;
}

@keyframes sun-pass {
  from {
    transform: translateX(-60%);
  }
  to {
    transform: translateX(60%);
  }
}

.hero__cap {
  margin-top: 1.25rem;
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--sky);
  max-width: 34ch;
}

/* ── Что проектируем ──────────────────────────────────────────── */

.scopes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(2rem, 5vw, 5rem);
  margin-top: 2.5rem;
}

.scope {
  padding-block: 1.75rem;
  border-top: 1px solid var(--line-soft);
}

.scope__title {
  margin: 0;
  font-family: var(--ff-display);
  font-size: 1.75rem;
  font-weight: 500;
  line-height: 1.15;
}

.scope__text {
  margin: 0.75rem 0 0;
  max-width: 44ch;
  color: var(--paper-dim);
  font-size: 0.98rem;
}

/* ── Стадии ───────────────────────────────────────────────────── */

.stages {
  margin: 2.5rem 0 0;
  padding: 0;
  list-style: none;
}

.stage {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 0 clamp(1.5rem, 3vw, 3rem);
  padding-block: 1.9rem;
  border-top: 1px solid var(--line-soft);
}

.stage__n {
  font-family: var(--ff-display);
  font-size: 1.6rem;
  line-height: 1;
  color: var(--sun);
  padding-top: 0.15rem;
}

.stage__name {
  margin: 0;
  font-family: var(--ff-display);
  font-size: 1.85rem;
  font-weight: 500;
  line-height: 1.1;
}

.stage__get {
  margin: 0.6rem 0 0;
  color: var(--paper-dim);
  font-size: 0.98rem;
}

.stage__side {
  padding-top: 0.35rem;
}

.stage__term {
  display: inline-block;
  font-size: 0.74rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--sky);
}

.stage__decide {
  margin: 0.6rem 0 0;
  font-size: 0.98rem;
  color: var(--paper);
}

/* ── Плитки проектов ──────────────────────────────────────────── */

.tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.5rem, 3vw, 3rem);
  margin-top: 2.5rem;
}

.tile__img {
  position: relative;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line-soft);
  background-color: var(--ink-800);
}

/* Заглушки под съёмку: геометрия в духе цианотипии, а не серые прямоугольники. */
.tile__img--a {
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(143, 180, 220, 0.09) 0 1px,
    transparent 1px 14px
  );
}

.tile__img--b {
  background-image: radial-gradient(
      circle at 68% 32%,
      rgba(242, 217, 160, 0.1),
      transparent 55%
    ),
    repeating-linear-gradient(90deg, rgba(143, 180, 220, 0.08) 0 1px, transparent 1px 26px);
}

.tile__img--c {
  background-image: repeating-linear-gradient(
      0deg,
      rgba(143, 180, 220, 0.07) 0 1px,
      transparent 1px 18px
    ),
    repeating-linear-gradient(90deg, rgba(143, 180, 220, 0.07) 0 1px, transparent 1px 18px);
}

.tile__img--d {
  background-image: linear-gradient(
    160deg,
    rgba(143, 180, 220, 0.12),
    transparent 60%
  );
}

.tile__todo {
  position: absolute;
  left: 0.9rem;
  top: 0.9rem;
  padding: 0.15rem 0.5rem;
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--sun);
  color: var(--ink-900);
}

.tile__title {
  margin: 1rem 0 0;
  font-family: var(--ff-display);
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.15;
}

.tile__meta {
  margin: 0.3rem 0 0;
  font-size: 0.86rem;
  color: var(--sky);
}

@media (max-width: 980px) {
  .hero__grid {
    grid-template-columns: 1fr;
  }
  .hero__figure {
    max-width: 460px;
  }
  .stage {
    grid-template-columns: 2.5rem minmax(0, 1fr);
  }
  .stage__side {
    grid-column: 2;
    padding-top: 0.9rem;
  }
}

@media (max-width: 680px) {
  .scopes,
  .tiles {
    grid-template-columns: 1fr;
  }
}

/* ── Перечни (разделы ПД, реквизиты) ──────────────────────────── */

.sections {
  margin: 2.5rem 0 0;
}

.sections__row {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: 0 clamp(1.5rem, 3vw, 3rem);
  padding-block: 1rem;
  border-top: 1px solid var(--line-soft);
}

.sections__code {
  font-family: var(--ff-display);
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--sun);
  line-height: 1.3;
}

.sections__name {
  margin: 0;
  color: var(--paper-dim);
  align-self: center;
}

/* ── Принципы бюро ────────────────────────────────────────────── */

.beliefs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(2rem, 5vw, 5rem);
  margin-top: 2.5rem;
}

.belief {
  padding-block: 1.75rem;
  border-top: 1px solid var(--line-soft);
}

.belief__t {
  margin: 0;
  font-family: var(--ff-display);
  font-size: 1.6rem;
  font-weight: 500;
  line-height: 1.15;
}

.belief__p {
  margin: 0.7rem 0 0;
  max-width: 44ch;
  color: var(--paper-dim);
  font-size: 0.98rem;
}

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

.contacts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 3vw, 3rem);
  margin-top: 3rem;
}

.contact {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  text-decoration: none;
}

.contact__k {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sky);
}

.contact__v {
  font-family: var(--ff-display);
  font-size: 1.9rem;
  font-weight: 500;
  line-height: 1.1;
}

.contact__v--small {
  font-size: 1.25rem;
  overflow-wrap: anywhere;
}

.contact:hover .contact__v {
  color: var(--sun);
}

/* ── Бриф ─────────────────────────────────────────────────────── */

.bref {
  margin-top: 3rem;
  max-width: 900px;
}

.bref__row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.25rem, 3vw, 2.5rem);
}

.f {
  display: block;
  margin-bottom: 1.75rem;
}

.f--full {
  display: block;
}

.f__k {
  display: block;
  margin-bottom: 0.6rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sky);
}

.f__i {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  background: var(--ink-800);
  color: var(--paper);
  font-family: var(--ff-text);
  font-size: 1rem;
  font-weight: 300;
  transition: border-color 0.18s ease;
}

.f__i::placeholder {
  color: rgba(182, 196, 212, 0.5);
}

.f__i:focus {
  outline: none;
  border-color: var(--sun);
}

.f__i--area {
  resize: vertical;
  line-height: 1.55;
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.bref__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem 2rem;
  margin-top: 0.5rem;
}

.bref__legal {
  margin: 0;
  max-width: 46ch;
  font-size: 0.8rem;
  color: var(--sky);
}

.bref__status {
  margin: 1.5rem 0 0;
  min-height: 1.5rem;
  font-size: 0.98rem;
}

.bref__status.is-busy {
  color: var(--sky);
}

.bref__status.is-ok {
  color: var(--sun);
}

.bref__status.is-err {
  color: #e9a5a5;
}

.tiles--page {
  margin-top: 3rem;
}

.tile__stage {
  margin: 0.35rem 0 0;
  font-size: 0.86rem;
  color: var(--paper-dim);
}

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

@media (max-width: 680px) {
  .beliefs {
    grid-template-columns: 1fr;
  }
  .bref__row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .sections__row {
    grid-template-columns: 5rem minmax(0, 1fr);
  }
}
