﻿/* ==========================================================================
   TRIAD AI GROUP — shared design system
   Dark editorial. One CSS for every page.
   ========================================================================== */

@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('../fonts/inter-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('../fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122;
}
@font-face {
  font-family: 'Geist Mono'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('../fonts/geistmono-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Geist Mono'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('../fonts/geistmono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122;
}

:root {
  --bg:      #08080A;
  --panel:   #0E0E12;
  --panel-2: #131318;
  --line:    rgba(255,255,255,.08);
  --line-2:  rgba(255,255,255,.15);

  --txt:     #F4F4F6;
  --txt-2:   #A6A6B0;
  --txt-3:   #6A6A75;

  --display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --pad: clamp(18px, 3.4vw, 52px);
  --max: 1560px;
  --head: 68px;
  --r: 7px;

  --ease: cubic-bezier(.22,.61,.36,1);
  --ease-out: cubic-bezier(.16,1,.3,1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--txt);
  font-family: var(--display);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4, p, ul, ol, li, dl, dd, dt, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

::selection { background: var(--txt); color: var(--bg); }
:focus-visible { outline: 1.5px solid var(--txt); outline-offset: 3px; }

.skip {
  position: fixed; top: 10px; left: 10px; z-index: 200;
  padding: 8px 14px; background: var(--txt); color: var(--bg);
  font-family: var(--mono); font-size: 11px;
  transform: translateY(-160%); transition: transform .25s var(--ease);
}
.skip:focus-visible { transform: none; }

/* ---------- page transitions (View Transitions API) ----------

   Two things travel between documents:

   1. the page title — same view-transition-name on every page, so the browser
      morphs it from its old position/size into the new one;
   2. a light bar — a fixed .vt-sweep element that only exists during the
      transition, drawn across the seam while the pages swap.

   Everything else cross-dissolves under the bar. Transform and opacity only,
   so the whole thing stays on the compositor. */
@view-transition { navigation: auto; }

.head { view-transition-name: head; }
.vt-title { view-transition-name: vt-title; }

/* Parked just above the viewport. During a transition its snapshot slides
   down across the seam: a tall gradient with a bright leading edge. */
.vt-sweep {
  view-transition-name: vt-sweep;
  position: fixed; left: 0; right: 0; top: 0;
  height: 72vh;
  transform: translateY(-100%);
  pointer-events: none;
  background: linear-gradient(180deg,
    rgba(255,255,255,0) 0%,
    rgba(198, 220, 255, .018) 52%,
    rgba(198, 220, 255, .055) 84%,
    rgba(214, 232, 255, .16) 95%,
    rgba(232, 242, 255, .42) 99%,
    rgba(255, 255, 255, .72) 100%);
}

::view-transition-group(head) { animation: none; }
::view-transition-old(head), ::view-transition-new(head) { animation: none; }

/* the bar: only the group moves, the snapshot is already painted */
::view-transition-group(vt-sweep) {
  animation: vt-sweep-run .82s cubic-bezier(.62, .02, .38, 1) both;
  z-index: 2;
}
::view-transition-old(vt-sweep) { display: none; }

@keyframes vt-sweep-run {
  0%   { transform: translateY(0); }
  100% { transform: translateY(240vh); }
}

/* title morph: the browser does the geometry, we only ease the edges */
/* title morph: the browser does the geometry, we only ease the edges.
   The old title is gone before the new one arrives, so they never overlap. */
::view-transition-group(vt-title) {
  animation-duration: .5s;
  animation-timing-function: cubic-bezier(.22, .61, .36, 1);
}
::view-transition-old(vt-title) {
  animation: vt-title-out .16s cubic-bezier(.4, 0, 1, 1) both;
}
::view-transition-new(vt-title) {
  animation: vt-title-in .34s cubic-bezier(.16, 1, .3, 1) both;
  animation-delay: .12s;
}
@keyframes vt-title-out {
  0%   { opacity: 1; }
  100% { opacity: 0; }
}
@keyframes vt-title-in {
  0%   { opacity: 0; }
  100% { opacity: 1; }
}

/* pages themselves: a short, quiet dissolve — the bar carries the motion */
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: .42s;
  animation-timing-function: cubic-bezier(.4, 0, .2, 1);
  animation-fill-mode: both;
}
::view-transition-old(root) { animation-name: vt-fade-out; }
::view-transition-new(root) {
  animation-name: vt-fade-in;
  background: var(--bg);
  z-index: 1;
}
@keyframes vt-fade-out { to { opacity: 0; } }
@keyframes vt-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root),
  ::view-transition-group(vt-sweep), ::view-transition-group(vt-title) { animation: none; }
}

/* ---------- header ---------- */
.head {
  position: fixed; inset: 0 0 auto; z-index: 100;
  height: var(--head);
  display: flex; align-items: center; gap: 26px;
  padding: 0 var(--pad);
  background: rgba(8,8,10,.72);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border-bottom: 1px solid transparent;
  transition: background .4s var(--ease), border-color .4s var(--ease);
}
.head.is-stuck { background: rgba(8,8,10,.94); border-bottom-color: var(--line); }

.logo {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13.5px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; flex-shrink: 0;
}
.logo svg { width: 21px; height: 18px; }
.logo > span > span { font-weight: 400; opacity: .5; letter-spacing: .12em; }

.nav { display: flex; gap: clamp(14px, 1.6vw, 26px); margin-left: auto; }
.nav a {
  position: relative; font-size: 12.5px; color: var(--txt-2);
  transition: color .22s var(--ease); white-space: nowrap;
}
.nav a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px;
  background: var(--txt); transform: scaleX(0); transform-origin: right;
  transition: transform .35s var(--ease-out);
}
.nav a:hover { color: var(--txt); }
.nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav a.is-active { color: var(--txt); }
.nav a.is-active::after { transform: scaleX(1); }

.head__lang {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .08em; color: var(--txt-3);
}
.head__lang svg { width: 13px; height: 13px; }

.burger { display: none; width: 36px; height: 36px; position: relative; margin-left: auto; }
.burger span {
  position: absolute; left: 7px; right: 7px; height: 1.5px; background: var(--txt);
  transition: transform .3s var(--ease);
}
.burger span:first-child { top: 14px; }
.burger span:last-child { top: 21px; }
.burger[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

/* ---------- menu ---------- */
.menu {
  position: fixed; inset: 0; z-index: 99;
  background: var(--bg);
  padding: calc(var(--head) + 28px) var(--pad) 28px;
  opacity: 0; visibility: hidden;
  transition: opacity .32s var(--ease), visibility .32s;
}
.menu.is-open { opacity: 1; visibility: visible; }
.menu nav { display: flex; flex-direction: column; }
.menu nav a {
  display: flex; align-items: baseline; gap: 14px;
  padding: 15px 0; border-bottom: 1px solid var(--line);
  font-size: clamp(20px, 5vw, 28px); font-weight: 600; letter-spacing: -.02em;
  opacity: 0; transform: translateY(10px);
  transition: opacity .45s var(--ease-out), transform .45s var(--ease-out);
}
.menu.is-open nav a { opacity: 1; transform: none; }
.menu nav a.is-active { color: var(--txt); }
.menu nav i {
  font-family: var(--mono); font-style: normal; font-size: 10px;
  letter-spacing: .12em; color: var(--txt-3); min-width: 22px;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 46px; padding: 0 22px;
  font-size: 13px; font-weight: 500;
  border-radius: var(--r);
  background: var(--txt); color: var(--bg);
  border: 1px solid var(--txt);
  transition: background .25s var(--ease), color .25s var(--ease),
              border-color .25s var(--ease), transform .25s var(--ease);
  white-space: nowrap;
}
.btn:hover { background: #fff; border-color: #fff; transform: translateY(-1px); }
.btn svg { width: 15px; height: 15px; transition: transform .3s var(--ease-out); }
.btn:hover svg { transform: translateX(3px); }
.btn--ghost { background: transparent; color: var(--txt); border-color: var(--line-2); }
.btn--ghost:hover { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.32); }
.btn--sm { height: 38px; padding: 0 16px; font-size: 12px; }

/* ---------- typography ---------- */
.eyebrow {
  font-family: var(--mono); font-size: 10px; letter-spacing: .2em;
  text-transform: uppercase; color: var(--txt-3); margin-bottom: 14px;
}
.h1 {
  font-size: clamp(30px, 3.4vw, 50px); font-weight: 700;
  line-height: 1.04; letter-spacing: -.035em; margin-bottom: 20px;
  max-width: 20ch;
}
.h2 {
  font-size: clamp(24px, 2.4vw, 36px); font-weight: 700;
  line-height: 1.06; letter-spacing: -.03em; margin-bottom: 16px;
  max-width: 24ch;
}
.h3 { font-size: 17px; font-weight: 600; line-height: 1.3; letter-spacing: -.012em; }
.lead { font-size: clamp(14px, .95vw, 15.5px); line-height: 1.62; color: var(--txt-2); max-width: 46ch; }
.lead--wide { max-width: 58ch; }

/* ---------- page scaffold ---------- */
.page { padding-top: var(--head); }
.sect { padding: clamp(40px, 5vw, 76px) var(--pad); border-bottom: 1px solid var(--line); }
.sect--tight { padding-top: clamp(30px, 3.4vw, 48px); padding-bottom: clamp(30px, 3.4vw, 48px); }
.sect__head { margin-bottom: clamp(22px, 2.6vw, 36px); }

/* page intro: title + short lead, no long scroll */
.intro {
  padding: clamp(38px, 5vw, 76px) var(--pad) clamp(26px, 3vw, 44px);
  border-bottom: 1px solid var(--line);
}
.intro__row {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(20px, 4vw, 64px); align-items: end;
}
.intro .lead { max-width: 42ch; }

/* ---------- hero (home) ---------- */
.hero {
  position: relative;
  display: flex; align-items: flex-end;
  aspect-ratio: 1914 / 822;
  min-height: 540px;
  padding: calc(var(--head) + 30px) var(--pad) clamp(30px, 5vh, 58px);
  overflow: hidden;
  background: #060608;
  border-bottom: 1px solid var(--line);
}
.hero__media { position: absolute; inset: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 38%; }
.hero::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to right, rgba(8,8,10,.96) 0%, rgba(8,8,10,.82) 30%, rgba(8,8,10,.2) 52%, transparent 64%),
    linear-gradient(to top, var(--bg) 0%, rgba(8,8,10,.45) 16%, transparent 42%);
}
.hero__txt { position: relative; z-index: 2; max-width: 460px; }
.hero__brand {
  font-family: var(--mono); font-size: 10px; letter-spacing: .24em;
  text-transform: uppercase; color: var(--txt-2); margin-bottom: clamp(18px, 3vh, 34px);
}
.hero__actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }

/* ---------- four directions ---------- */
.strip {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}
.strip__item {
  display: flex; align-items: center; gap: 12px;
  padding: 20px clamp(14px, 2vw, 26px);
  border-right: 1px solid var(--line);
  color: var(--txt-2);
  transition: background .25s var(--ease), color .25s var(--ease);
}
.strip__item:last-child { border-right: 0; }
.strip__item:hover { background: rgba(255,255,255,.035); color: var(--txt); }
.strip__item svg { width: 19px; height: 19px; flex-shrink: 0; opacity: .75; }
.strip__item span { font-size: 13px; line-height: 1.25; }

/* ---------- cards ---------- */
.cards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.cards--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card {
  display: flex; flex-direction: column; padding: 22px; min-height: 200px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  transition: background .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease);
}
.card:hover { background: var(--panel-2); border-color: var(--line-2); transform: translateY(-2px); }
.card__icon { margin-bottom: 16px; }
.card__icon svg { width: 21px; height: 21px; }
.card h3 { font-size: 15.5px; font-weight: 600; letter-spacing: -.01em; margin-bottom: 9px; }
.card p { font-size: 13px; line-height: 1.55; color: var(--txt-2); }
.card__go { margin-top: auto; padding-top: 16px; color: var(--txt-3); }
.card__go svg { width: 17px; height: 17px; transition: transform .3s var(--ease-out), color .3s; }
.card:hover .card__go svg { transform: translateX(4px); color: var(--txt); }

/* ---------- product groups (solutions page) ---------- */
.group { padding: clamp(28px, 3.4vw, 44px) var(--pad); border-bottom: 1px solid var(--line); }
.group__row {
  display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(20px, 3.6vw, 56px); align-items: start;
}
.group__list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.group__item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 16px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  font-size: 13.5px;
  transition: background .25s var(--ease), border-color .25s var(--ease);
}
.group__item:hover { background: var(--panel-2); border-color: var(--line-2); }
.group__item span { color: var(--txt-3); font-family: var(--mono); font-size: 10px; }

/* ---------- rail ---------- */
.rail { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); position: relative; }
.rail::before {
  content: ''; position: absolute; left: 0; right: 0; top: 19px; height: 1px; background: var(--line);
}
.rail__step { position: relative; padding-right: 14px; }
.rail__dot {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--line-2); background: var(--bg);
  display: grid; place-items: center; margin-bottom: 14px;
  position: relative; z-index: 1; color: var(--txt-2);
}
.rail__dot svg { width: 16px; height: 16px; }
.rail__n { font-family: var(--mono); font-size: 9.5px; letter-spacing: .16em; color: var(--txt-3); margin-bottom: 5px; }
.rail h4 { font-size: 13px; font-weight: 600; line-height: 1.3; }

/* ---------- cases ---------- */
.cases { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.case {
  display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--panel); overflow: hidden;
  transition: border-color .3s var(--ease), transform .3s var(--ease);
}
.case:hover { border-color: var(--line-2); transform: translateY(-2px); }
.case__pic { aspect-ratio: 16 / 9; overflow: hidden; }
.case__pic img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease-out); }
.case:hover .case__pic img { transform: scale(1.03); }
.case__body { padding: 15px 17px 17px; display: flex; flex-direction: column; flex: 1; }
.case h3 { font-size: 14px; font-weight: 600; line-height: 1.35; margin-bottom: 10px; }
.case__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.case__tags span {
  font-family: var(--mono); font-size: 8.5px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--txt-3); border: 1px solid var(--line); border-radius: 100px; padding: 4px 9px;
}
.case__go { padding-top: 14px; color: var(--txt-3); }
.case__go svg { width: 16px; height: 16px; }

.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }.tab {
  padding: 8px 15px; border-radius: 100px; border: 1px solid var(--line);
  font-size: 12.5px; color: var(--txt-2);
  transition: background .25s, color .25s, border-color .25s;
}
.tab:hover { color: var(--txt); border-color: var(--line-2); }
.tab.is-on { background: var(--txt); color: var(--bg); border-color: var(--txt); }

/* ---------- case filters + project list ---------- */
.filters {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: clamp(18px, 2.2vw, 26px) var(--pad);
  border-bottom: 1px solid var(--line);
}
.filters .tabs { margin-bottom: 0; }
.filters__count {
  margin-left: auto; font-family: var(--mono); font-size: 9.5px;
  letter-spacing: .16em; text-transform: uppercase; color: var(--txt-3);
}

.projs { display: flex; flex-direction: column; }
.proj {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  column-gap: clamp(18px, 3.4vw, 54px);
  padding: clamp(28px, 3.6vw, 46px) var(--pad);
  border-bottom: 1px solid var(--line);
  transition: background .3s var(--ease);
}
.proj:hover { background: rgba(255,255,255,.014); }
.proj[hidden] { display: none; }
.proj__n {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .18em;
  color: var(--txt-3); margin-bottom: 12px;
}
.proj__title {
  font-size: clamp(20px, 2vw, 27px); font-weight: 700;
  line-height: 1.1; letter-spacing: -.025em; margin-bottom: 8px;
}
.proj__kicker { font-size: 12.5px; color: var(--txt-3); margin-bottom: 16px; }
.proj__lead .case__tags { margin-bottom: 14px; }
.proj__link {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; color: var(--txt);
  border-bottom: 1px solid var(--line-2); padding-bottom: 2px;
  transition: border-color .25s var(--ease), opacity .25s;
}
.proj__link:hover { border-color: var(--txt); }
.proj__link span { font-size: 11px; color: var(--txt-3); }
.proj__body { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 2.4vw, 34px); align-content: start; }
.proj__blk p:not(.proj__lbl) { font-size: 13.5px; line-height: 1.62; color: var(--txt-2); }
.proj__lbl {
  font-family: var(--mono); font-size: 9px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--txt-3); margin-bottom: 8px;
}
.proj__out {
  grid-column: 1 / -1; margin-top: clamp(2px, .4vw, 8px);
  border-top: 1px solid var(--line); padding-top: 14px;
}
.proj__out p:not(.proj__lbl) { font-size: 13.5px; line-height: 1.6; color: var(--txt); }
.inline-link { color: var(--txt); border-bottom: 1px solid var(--line-2); }

/* accordion trigger — mobile only */
.proj__toggle {
  display: none;
  align-items: center; justify-content: space-between; gap: 10px;
  order: 2; margin-top: 4px; padding: 11px 14px;
  border: 1px solid var(--line); border-radius: var(--r);
  font-size: 12.5px; color: var(--txt-2);
  transition: border-color .25s var(--ease), color .25s var(--ease);
}
.proj__toggle svg { width: 14px; height: 14px; transition: transform .3s var(--ease-out); }
.proj.is-open .proj__toggle svg { transform: rotate(45deg); }
.proj__toggle:hover { border-color: var(--line-2); color: var(--txt); }

/* ---------- people ---------- */
.people { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.person {
  border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden; background: var(--panel);
  transition: border-color .3s var(--ease), transform .3s var(--ease);
}
.person:hover { border-color: var(--line-2); transform: translateY(-2px); }
.person__pic { aspect-ratio: 3 / 4; overflow: hidden; }
.person__pic img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }
.person__body { padding: 15px 15px 18px; }
.person__icon { color: var(--txt-2); margin-bottom: 9px; }
.person__icon svg { width: 16px; height: 16px; }
.person b { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.person p { font-size: 12.5px; line-height: 1.5; color: var(--txt-3); }

/* ---------- split media ---------- */
.split {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 44px); align-items: center;
}
.split--rev { direction: rtl; }
.split--rev > * { direction: ltr; }
.split__pic {
  border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden; aspect-ratio: 16 / 9;
}
.split__pic img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- featured case (home) ---------- */
.feat {
  display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: clamp(18px, 3vw, 40px); align-items: center;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--panel); overflow: hidden;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.feat:hover { border-color: var(--line-2); background: var(--panel-2); }
.feat__pic { aspect-ratio: 16 / 9; overflow: hidden; background: #0B0B0E; }
.feat__pic img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0%; }
.feat__txt {
  padding: clamp(18px, 2.4vw, 30px) clamp(18px, 2.4vw, 34px) clamp(18px, 2.4vw, 30px) 0;
  display: flex; flex-direction: column; align-items: flex-start;
}
.feat__lbl {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--txt-3); margin-bottom: 10px;
}
.feat h3 {
  font-size: clamp(21px, 2.2vw, 30px); font-weight: 700;
  letter-spacing: -.03em; line-height: 1.06; margin-bottom: 12px;
}
.feat__desc { font-size: 13.5px; line-height: 1.6; color: var(--txt-2); margin-bottom: 16px; max-width: 40ch; }
.feat .case__tags { margin-bottom: 18px; }
.feat__go {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--txt);
  border-bottom: 1px solid var(--line-2); padding-bottom: 3px;
  transition: border-color .25s var(--ease);
}
.feat__go svg { width: 15px; height: 15px; transition: transform .3s var(--ease-out); }
.feat:hover .feat__go { border-color: var(--txt); }
.feat:hover .feat__go svg { transform: translateX(3px); }

/* ---------- steps / facts / faq ---------- */
.steps {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px; counter-reset: none;
}
.step {
  position: relative;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--panel); padding: 20px 20px 22px;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.step:hover { border-color: var(--line-2); background: var(--panel-2); }
.step__n {
  display: block; font-family: var(--mono); font-size: 9.5px;
  letter-spacing: .18em; color: var(--txt-3); margin-bottom: 14px;
}
.step h3 { font-size: 15px; font-weight: 600; letter-spacing: -.01em; margin-bottom: 8px; }
.step p { font-size: 13px; line-height: 1.58; color: var(--txt-2); }

.facts { display: grid; gap: 10px; }
.fact {
  display: grid; grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline; gap: 14px;
  padding: 14px 18px;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--panel);
}
.fact b {
  font-size: 15px; font-weight: 600; letter-spacing: -.01em;
  white-space: nowrap; min-width: 108px;
}
.fact span { font-size: 12.5px; color: var(--txt-3); }

.faq { display: grid; gap: 8px; }
.faq__item {
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--panel); overflow: hidden;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.faq__item:hover { border-color: var(--line-2); }
.faq__item[open] { background: var(--panel-2); border-color: var(--line-2); }
.faq__item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 15px 18px; cursor: pointer;
  font-size: 14px; font-weight: 500;
  list-style: none;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: '+'; font-family: var(--mono); font-size: 15px;
  color: var(--txt-3); transition: transform .3s var(--ease-out), color .25s;
}
.faq__item[open] summary::after { transform: rotate(45deg); color: var(--txt); }
.faq__item p {
  padding: 0 18px 16px; margin: 0;
  font-size: 13px; line-height: 1.62; color: var(--txt-2);
  max-width: 70ch;
}

/* ---------- quotes ---------- */
.quotes {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.quote {
  display: flex; flex-direction: column; justify-content: space-between; gap: 16px;
  margin: 0; padding: 20px 20px 18px;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--panel);
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.quote:hover { border-color: var(--line-2); background: var(--panel-2); }
.quote blockquote {
  margin: 0; font-size: 13.5px; line-height: 1.62; color: var(--txt-2);
}
.quote blockquote::before {
  content: '«'; color: var(--txt-3);
}
.quote blockquote::after {
  content: '»'; color: var(--txt-3);
}
.quote figcaption {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 12px; color: var(--txt); padding-top: 12px;
  border-top: 1px solid var(--line);
}
.quote__src {
  font-family: var(--mono); font-size: 8.5px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--txt-3);
}
/* the widest quote takes the full row so the grid never leaves a gap */
.quote:nth-child(4) { grid-column: span 2; }

/* ---------- 404 ---------- */
.nf {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr);
  gap: clamp(24px, 5vw, 70px); align-items: center;
  padding: clamp(48px, 8vw, 110px) var(--pad) clamp(48px, 8vw, 110px);
  border-bottom: 1px solid var(--line);
  min-height: calc(100vh - var(--head));
}
.nf__num {
  font-family: var(--mono); font-size: clamp(64px, 12vw, 150px);
  line-height: .82; letter-spacing: -.04em; color: transparent;
  -webkit-text-stroke: 1px var(--line-2);
  margin-bottom: clamp(16px, 2vw, 26px);
}
.nf .lead { margin-bottom: 26px; }
.nf__links { display: flex; flex-direction: column; }
.nf__links a {
  display: flex; align-items: baseline; gap: 14px;
  padding: 16px 0; border-top: 1px solid var(--line);
  font-size: 15px; color: var(--txt-2);
  transition: color .25s var(--ease), padding-left .3s var(--ease-out);
}
.nf__links a:last-child { border-bottom: 1px solid var(--line); }
.nf__links a:hover { color: var(--txt); padding-left: 6px; }
.nf__links span {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .16em;
  color: var(--txt-3);
}

/* ---------- closing CTA band ---------- */
.cta {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(18px, 4vw, 56px); align-items: center;
}
.cta .lead { max-width: 48ch; }
.cta .h2 { margin-bottom: 10px; }

/* ---------- telegram contact card ---------- */
.tgcard {
  margin: 22px 0 4px; max-width: 420px;
  border: 1px solid var(--line); border-radius: var(--r);
  background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.012));
  overflow: hidden;
}
.tgcard__main {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center; gap: 13px;
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
  transition: background .25s var(--ease);
}
.tgcard__main:hover { background: rgba(255,255,255,.045); }
.tgcard__avatar {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255,255,255,.06); border: 1px solid var(--line-2);
  color: var(--txt);
}
.tgcard__avatar svg { width: 18px; height: 18px; }
.tgcard__meta, .tgrow__txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tgcard__lbl, .tgrow__lbl {
  font-family: var(--mono); font-size: 8.5px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--txt-3);
}
.tgcard__val { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.tgcard__cta {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; color: var(--bg); background: var(--txt);
  border-radius: 100px; padding: 8px 13px; white-space: nowrap;
  transition: background .25s var(--ease), transform .25s var(--ease);
}
.tgcard__cta svg { width: 13px; height: 13px; transition: transform .3s var(--ease-out); }
.tgcard__main:hover .tgcard__cta svg { transform: translateX(3px); }

.tgcard__list { display: flex; flex-direction: column; }
.tgrow {
  display: grid; grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center; gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  transition: background .25s var(--ease);
}
.tgrow:first-child { border-top: 0; }
.tgrow:hover { background: rgba(255,255,255,.035); }
.tgrow__ic { color: var(--txt-3); display: grid; place-items: center; }
.tgrow__ic svg { width: 16px; height: 16px; }
.tgrow__val { font-size: 13.5px; color: var(--txt-2); }
.tgrow:hover .tgrow__val { color: var(--txt); }
.tgrow__go { font-size: 12px; color: var(--txt-3); transition: transform .25s var(--ease-out), color .25s; }
.tgrow:hover .tgrow__go { transform: translate(2px, -2px); color: var(--txt); }

.tgcard__foot {
  padding: 12px 16px 14px;
  border-top: 1px solid var(--line);
  font-size: 12px; line-height: 1.5; color: var(--txt-3);
  background: rgba(255,255,255,.012);
}

/* ---------- contact ---------- */
.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.contact__media { position: relative; overflow: hidden; border-right: 1px solid var(--line); min-height: 480px; }
.contact__media img { width: 100%; height: 100%; object-fit: cover; object-position: 62% 40%; }
.contact__txt { padding: clamp(30px, 4vw, 60px) var(--pad); display: flex; flex-direction: column; justify-content: center; }

.form { display: flex; flex-direction: column; gap: 15px; margin-top: 22px; max-width: 400px; }
.form label { display: flex; flex-direction: column; gap: 6px; }
.form label span {
  font-family: var(--mono); font-size: 9px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--txt-3);
}
.form input, .form textarea {
  width: 100%; padding: 10px 0;
  font: inherit; font-size: 14px; color: var(--txt);
  background: transparent; border: 0; border-bottom: 1px solid var(--line);
  border-radius: 0; resize: vertical;
  transition: border-color .25s var(--ease);
}
.form textarea { min-height: 56px; line-height: 1.5; }
.form input::placeholder, .form textarea::placeholder { color: #55555E; }
.form input:focus, .form textarea:focus { outline: none; border-bottom-color: var(--txt); }
.form .btn { align-self: flex-start; margin-top: 4px; }
.note { font-family: var(--mono); font-size: 9.5px; letter-spacing: .05em; color: var(--txt-3); }

/* ---------- footer ---------- */
.foot { padding: clamp(30px, 3.6vw, 52px) var(--pad) 20px; }
  .foot__in {
    display: grid; grid-template-columns: 1.3fr 1fr;
    gap: clamp(22px, 4vw, 60px); align-items: start;
    padding-bottom: 28px; border-bottom: 1px solid var(--line);
  }
  .foot__in p { font-size: 13px; line-height: 1.6; color: var(--txt-3); margin-top: 14px; }
  .foot__nav { display: flex; flex-direction: column; gap: 9px; }
  .foot__nav a { font-size: 13px; color: var(--txt-2); transition: color .22s; }
  .foot__nav a:hover { color: var(--txt); }
  .foot__line {
  display: flex; justify-content: space-between; gap: 16px; padding-top: 16px;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--txt-3);
}

/* ---------- reveal ---------- */
.js .rev { opacity: 0; }
.js .rev.is-in { opacity: 1; transition: opacity .6s var(--ease-out); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .rev { opacity: 1; transition: none; }
  .btn, .card, .case, .person, .group__item, .strip__item { transition: none; }
  .case__pic img { transition: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .nav { display: none; }
  .head > .btn { display: none; }
  .head__lang { display: none; }
  .burger { display: block; }

  .intro__row { grid-template-columns: 1fr; gap: 18px; align-items: start; }
  .group__row { grid-template-columns: 1fr; gap: 20px; }
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cards--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .people { grid-template-columns: 1fr 1fr; }
  .cases { grid-template-columns: 1fr 1fr; }
  .rail { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 24px; }
  .proj { grid-template-columns: 1fr; }
  .proj__out { grid-column: 1; }
  .rail::before { display: none; }
  .split { grid-template-columns: 1fr; }
  .contact { grid-template-columns: 1fr; }
  .contact__media { min-height: 0; max-height: 400px; aspect-ratio: 16 / 9; border-right: 0; border-bottom: 1px solid var(--line); }
  .contact__txt { padding: 30px var(--pad) 40px; }

  .hero { display: block; aspect-ratio: auto; min-height: 0; padding: 0 0 28px; }
  /* keep the artwork clear of the fixed header, otherwise it covers the faces */
  .hero__media { position: relative; inset: auto; margin-top: var(--head); }
  .hero__media img {
    width: 100%; height: auto; aspect-ratio: 1914 / 822;
    object-fit: cover; object-position: 50% 42%;
  }
  .hero::after { display: none; }
  .hero__txt { padding: 26px var(--pad) 0; max-width: 720px; }
}

@media (max-width: 760px) {
  :root { --head: 58px; }

  .h1 { font-size: clamp(26px, 8vw, 36px); max-width: none; }
  .h2 { font-size: clamp(21px, 6.4vw, 28px); max-width: none; }
  .lead { font-size: 14px; max-width: none; }

  .sect, .group { padding: 36px var(--pad); }
  .intro { padding: 34px var(--pad) 26px; }
  .cta { grid-template-columns: 1fr; gap: 18px; }
  .steps { grid-template-columns: 1fr; gap: 8px; }
  .nf { grid-template-columns: 1fr; align-items: start; gap: 30px; min-height: 0; }
  .nf__links a { padding: 13px 0; font-size: 14px; }
  .quotes { grid-template-columns: 1fr; }
  .quote:nth-child(4) { grid-column: auto; }
  .fact { grid-template-columns: 1fr; gap: 3px; padding: 12px 15px; }
  .fact b { min-width: 0; }
  .faq__item summary { padding: 14px 15px; font-size: 13.5px; }
  .faq__item p { padding: 0 15px 15px; font-size: 12.5px; }
  .tgcard { max-width: none; margin-top: 18px; }
  .tgcard__main { grid-template-columns: 36px minmax(0, 1fr); row-gap: 10px; }
  .tgcard__avatar { width: 36px; height: 36px; }
  .tgcard__cta { grid-column: 1 / -1; justify-content: center; }
  .feat { grid-template-columns: 1fr; gap: 0; }
  .feat__txt { padding: 16px 16px 18px; }
  .feat__pic { border-bottom: 1px solid var(--line); }

  .cards { grid-template-columns: 1fr; gap: 8px; }
  .cards--3 { grid-template-columns: 1fr; }
  /* horizontal carousels: swipe on touch, drag or wheel elsewhere */
  .cases, .people {
    display: grid; grid-auto-flow: column; gap: 10px;
    grid-template-columns: none;
    overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-left: var(--pad);
    padding: 0 var(--pad) 10px;
    margin: 0 calc(var(--pad) * -1);
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.2) transparent;
    cursor: grab;
  }
  .cases::-webkit-scrollbar, .people::-webkit-scrollbar { height: 3px; }
  .cases::-webkit-scrollbar-track, .people::-webkit-scrollbar-track { background: transparent; }
  .cases::-webkit-scrollbar-thumb, .people::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); border-radius: 3px; }
  .is-dragging { cursor: grabbing; scroll-snap-type: none; }
  .is-dragging * { pointer-events: none; }

  .cases { grid-auto-columns: 74%; }
  .case { scroll-snap-align: start; }
  .people { grid-auto-columns: 56%; }
  .person { scroll-snap-align: start; }
  /* compact row card: icon + title on one line, text under */
  .card {
    min-height: 0; padding: 0;
    display: grid; grid-template-columns: 34px minmax(0, 1fr);
    grid-template-areas: 'icon title' 'text text';
    align-items: center; column-gap: 12px; row-gap: 6px;
  }
  .card__icon {
    grid-area: icon; margin: 0; width: 34px; height: 34px;
    display: grid; place-items: center; border-radius: 50%;
    border: 1px solid var(--line); color: var(--txt-2);
    align-self: start; margin-top: 14px;
  }
  .card__icon svg { width: 15px; height: 15px; }
  .card h3 { grid-area: title; margin: 0; padding-top: 20px; font-size: 15px; }
  .card p { grid-area: text; padding: 0 16px 16px; font-size: 12.5px; }
  .card__go { display: none; }
  /* cards without an icon use a single column */
  .card:not(:has(.card__icon)) {
    grid-template-columns: 1fr;
    grid-template-areas: 'title' 'text';
  }
  .card:not(:has(.card__icon)) h3 { padding-top: 15px; padding-left: 16px; }
  .card:not(:has(.card__icon)) p { padding-top: 2px; }
  .proj__body { grid-template-columns: 1fr; }
  .proj__lead { order: 1; }
  .proj__toggle { display: flex; order: 2; }
  .proj__body { order: 3; }
  .proj__out { order: 4; }
  .proj:not(.is-open) .proj__body,
  .proj:not(.is-open) .proj__out { display: none; }
  .proj__lead { display: flex; flex-direction: column; align-items: flex-start; }
  .proj__lead .case__tags { order: 1; margin-bottom: 0; }
  .proj__link { order: 3; margin-bottom: 2px; }
  .proj__kicker { margin-bottom: 12px; }
  /* strip stays as a 2-up navigation grid on phones (5 items → last spans) */
  .strip { grid-template-columns: 1fr 1fr; }
  .strip__item {
    gap: 9px; padding: 13px 14px;
    border-right: 0; border-bottom: 1px solid var(--line);
  }
  .strip__item:nth-child(odd) { border-right: 1px solid var(--line); }
  .strip__item:nth-child(2) { border-right: 0; }
  .strip__item:last-child { grid-column: 1 / -1; border-right: 0; border-bottom: 0; }
  .strip__item svg { width: 16px; height: 16px; }
  .strip__item span { font-size: 12px; }
  .group__list { grid-template-columns: 1fr; }
  .person__body { padding: 12px 12px 15px; }
  .person b { font-size: 13px; }
  .person p { font-size: 11.5px; }

  .rail { grid-template-columns: 1fr 1fr; gap: 0 14px; }
  .hero__txt { padding: 22px var(--pad) 0; max-width: none; }
  .hero__actions .btn { flex: 1 1 auto; }
  /* phone: taller crop so the group reads, sides trimmed not heads */
  .hero__media img { aspect-ratio: 3 / 2; object-position: 66% 40%; }

  .foot__in { grid-template-columns: 1fr; gap: 22px; }
  .foot__meta { align-items: flex-start; }
  .foot__line { flex-direction: column; gap: 6px; }
}

@media (max-width: 400px) {
  .rail { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  .strip { grid-template-columns: 1fr; }
  .strip__item {
    border-right: 0; border-bottom: 1px solid var(--line);
  }
  .strip__item:last-child { grid-column: auto; border-bottom: 0; }
