
/* Layout: «знаковая система» — разделы открываются табличками, как указатели навигации; главный образ — схема маршрута от айдентики до цифрового двойника */
:root {
  --bg: #f2f5ec;          /* бледная фисташка */
  --surface: #ffffff;
  --fg: #14181d;
  --muted: #586058;
  --line: #d5dbcc;
  --accent: #1c4f9e;      /* синий информационного указателя */
  --sign-bg: #1c4f9e;
  --sign-fg: #ffffff;
  --hatch: #e1e6d8;
  --field: #ffffff;
  --f-display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --f-body: "Onest", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --wrap: 1180px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111511; --surface: #181d19; --fg: #e6e9e4; --muted: #9ba49b;
    --line: #2b322c; --accent: #6a9be6; --sign-bg: #2558aa; --sign-fg: #ffffff; --hatch: #1f2620; --field: #141914;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111511; --surface: #181d19; --fg: #e6e9e4; --muted: #9ba49b;
  --line: #2b322c; --accent: #6a9be6; --sign-bg: #2558aa; --sign-fg: #ffffff; --hatch: #1f2620; --field: #141914;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
img { max-width: 100%; }
:root { --ink: var(--fg); }
#fx { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; pointer-events: none; }
.wrap { position: relative; z-index: 1; }
body {
  background: var(--bg); color: var(--fg);
  font-family: var(--f-body); font-size: 17px; line-height: 1.55;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.wrap { max-width: var(--wrap); margin-inline: auto; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
p { margin: 0; }

/* Шапка */
.top { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 22px; border-bottom: 1px solid var(--line); }
.mark { font-family: var(--f-display); font-weight: 700; font-size: 22px; letter-spacing: 0.02em; text-decoration: none; }
.nav { display: flex; gap: 28px; font-size: 15px; }
.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover { color: var(--fg); }
.btn { display: inline-flex; align-items: center; gap: 10px; background: var(--sign-bg); color: var(--sign-fg); text-decoration: none; font-weight: 500; font-size: 15px; padding: 11px 18px; border: 0; cursor: pointer; font-family: inherit; }
.btn:hover { filter: brightness(1.1); }
.btn.ghost { background: transparent; color: var(--fg); box-shadow: inset 0 0 0 1px var(--line); }
@media (max-width: 760px) { .nav { display: none; } }

/* Первый экран */
.hero { padding-block: 72px 56px; display: grid; gap: 28px; }
.eyebrow { font-family: var(--f-mono); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.hero h1 { font-family: var(--f-display); font-weight: 700; font-size: clamp(52px, 10vw, 128px); line-height: 0.95; letter-spacing: -0.02em; }
.hero .sub { font-size: clamp(20px, 2.4vw, 28px); line-height: 1.3; font-weight: 500; }
.hero .lead { color: var(--muted); max-width: 38em; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Схема маршрута */
.route { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); position: relative; }
.route::before { content: ""; position: absolute; left: 12px; right: 12px; top: 11px; height: 4px; background: var(--accent); }
.route li { position: relative; padding-top: 40px; padding-right: 16px; min-width: 0; }
.route li::before { content: ""; position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--bg); border: 4px solid var(--accent); }
.route li:last-child::before { background: var(--accent); }
.route b { display: block; font-weight: 600; font-size: 17px; }
.route span { display: block; font-family: var(--f-mono); font-size: 13px; color: var(--muted); }
@media (max-width: 720px) {
  .route { grid-template-columns: 1fr; gap: 22px; }
  .route::before { left: 11px; right: auto; top: 12px; bottom: 12px; width: 4px; height: auto; }
  .route li { padding-top: 0; padding-left: 44px; }
}

/* Табличка раздела */
section { padding-block: 64px; border-top: 1px solid var(--line); }
.sign { display: inline-flex; align-items: center; gap: 14px; background: var(--sign-bg); color: var(--sign-fg); padding: 10px 16px 10px 14px; font-weight: 600; font-size: 15px; letter-spacing: 0.01em; justify-self: start; }
.sign svg { width: 18px; height: 18px; flex: none; }
.sec-head { display: grid; gap: 18px; margin-bottom: 40px; }
.sec-head h2 { font-family: var(--f-display); font-weight: 500; font-size: clamp(26px, 3.4vw, 40px); line-height: 1.15; max-width: 20em; }
.sec-head p { color: var(--muted); max-width: 40em; }

/* Направления */
.dirs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.dir { background: var(--surface); padding: 32px; display: grid; gap: 16px; align-content: start; min-width: 0; }
.dir h3 { font-family: var(--f-display); font-weight: 500; font-size: 24px; line-height: 1.2; }
.dir .what { color: var(--muted); }
.dir ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.dir li { padding-left: 22px; position: relative; }
.dir li::before { content: "→"; position: absolute; left: 0; color: var(--accent); }
.dir li em { font-style: normal; color: var(--muted); }
.dir .for { font-family: var(--f-mono); font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 14px; }
@media (max-width: 820px) { .dirs { grid-template-columns: 1fr; } .dir { padding: 24px; } }

/* Для кого */
.who { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px; }
.who h3 { font-size: 20px; font-weight: 600; margin-bottom: 14px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags span { font-size: 14px; padding: 6px 12px; box-shadow: inset 0 0 0 1px var(--line); background: var(--surface); }
@media (max-width: 760px) { .who { grid-template-columns: 1fr; } }

/* Проекты */
.cases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px 28px; }
.case { display: grid; gap: 12px; align-content: start; min-width: 0; }
.ph { aspect-ratio: 4 / 3; max-width: 100%; display: flex; align-items: flex-end; padding: 12px; font-family: var(--f-mono); font-size: 12px; color: var(--muted);
  background: repeating-linear-gradient(135deg, var(--hatch) 0 1px, transparent 1px 10px), var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-family: var(--f-mono); font-size: 12px; padding: 3px 8px; box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); }
.chip.st { background: var(--sign-bg); color: var(--sign-fg); box-shadow: none; }
.case h3 { font-size: 19px; font-weight: 600; line-height: 1.3; }
.case p { color: var(--muted); font-size: 16px; }
.case a.ext { color: var(--accent); font-weight: 500; text-decoration: none; }
.case a.ext:hover { text-decoration: underline; }
@media (max-width: 960px) { .cases { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .cases { grid-template-columns: 1fr; } }

/* Ранее */
.earlier { margin-top: 56px; }
.earlier h3 { font-size: 20px; font-weight: 600; margin-bottom: 6px; }
.earlier > p { color: var(--muted); margin-bottom: 20px; }
.rows { border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: minmax(0, 15em) minmax(0, 1fr); gap: 8px 32px; padding-block: 14px; border-bottom: 1px solid var(--line); }
.row b { font-weight: 600; }
.row span { color: var(--muted); }
@media (max-width: 640px) { .row { grid-template-columns: 1fr; } }

/* Как работаем */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px 28px; counter-reset: s; }
.steps li { counter-increment: s; border-top: 4px solid var(--accent); padding-top: 16px; display: grid; gap: 8px; align-content: start; min-width: 0; }
.steps li::before { content: counter(s); font-family: var(--f-display); font-weight: 500; font-size: 28px; color: var(--accent); line-height: 1; }
.steps b { font-weight: 600; font-size: 18px; }
.steps span { color: var(--muted); font-size: 16px; }
@media (max-width: 860px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* Команда */
.team { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.person { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); padding: 28px; display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 24px; align-items: start; min-width: 0; }
.person .ph { aspect-ratio: 3 / 4; }
.person .txt { display: grid; gap: 12px; min-width: 0; }
.person h3 { font-family: var(--f-display); font-weight: 500; font-size: 28px; }
.person .role { font-family: var(--f-mono); font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.person p { color: var(--muted); }
.person .em { font-family: var(--f-mono); font-size: 14px; color: var(--fg); }
.partners { margin-top: 28px; color: var(--muted); max-width: 52em; }
.partners b { color: var(--fg); font-weight: 600; }
@media (max-width: 960px) { .team { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .person { grid-template-columns: 1fr; } .person .ph { max-width: 200px; } }

/* Контакты */
.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.contact h2 { font-family: var(--f-display); font-weight: 500; font-size: clamp(26px, 3.4vw, 40px); line-height: 1.15; margin-block: 22px 16px; }
.contact .lead { color: var(--muted); max-width: 30em; }
form { display: grid; gap: 14px; }
.f2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
label { display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
input, textarea { font: inherit; font-size: 16px; color: var(--fg); background: var(--field); border: 0; box-shadow: inset 0 0 0 1px var(--line); padding: 11px 12px; width: 100%; }
textarea { min-height: 120px; resize: vertical; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.formnote { font-size: 14px; color: var(--muted); min-height: 1.4em; }
@media (max-width: 520px) { .f2 { grid-template-columns: 1fr; } }
.cbox { display: grid; gap: 18px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); }
.cline { display: grid; gap: 4px; }
.cline small { font-family: var(--f-mono); font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.cval { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 22px; font-weight: 500; }
.cval a { text-decoration: none; }
.cval a:hover { color: var(--accent); }
.copy { font-family: var(--f-mono); font-size: 12px; background: none; border: 0; box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); padding: 4px 8px; cursor: pointer; }
.copy:hover { color: var(--fg); }
.req { font-family: var(--f-mono); font-size: 13px; color: var(--muted); line-height: 1.7; }
@media (max-width: 860px) { .contact { grid-template-columns: 1fr; } }

footer { border-top: 1px solid var(--line); padding-block: 28px 40px; font-size: 14px; color: var(--muted); }

@media (prefers-reduced-motion: no-preference) {
  .route li::before { transition: transform .2s ease; }
  .route li:hover::before { transform: scale(1.15); }
}

/* --- обложки, галерея, фото команды --- */
.ph.has-img { padding: 0; background: var(--surface); }
.ph img, .person .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.case.has-gallery .ph { cursor: zoom-in; }
.case .gcount { font-family: var(--f-mono); font-size: 12px; color: var(--muted); }
.lb { position: fixed; inset: 0; z-index: 50; background: rgba(10,12,10,.92); display: grid; grid-template-rows: auto 1fr auto; padding: calc(12px + env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px)); color: #fff; }
.lb[hidden] { display: none; }
.lb .lb-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 15px; }
.lb .lb-img { min-height: 0; display: grid; place-items: center; }
.lb img { max-height: 100%; max-width: 100%; object-fit: contain; }
.lb button { font: inherit; color: #fff; background: transparent; border: 0; box-shadow: inset 0 0 0 1px rgba(255,255,255,.35); padding: 8px 14px; cursor: pointer; }
.lb .lb-nav { display: flex; justify-content: center; gap: 12px; }
.formnote.ok { color: var(--accent); }
