/* РКМ — конструктивизм с дисциплиной.
   Принцип: мало элементов, точная геометрия, воздух, сильная типографика.
   Палитра: тёплая бумага, чёрная тушь, один красный. Russo One + Oswald.
*/

:root {
    --paper: #f2f1ec;
    --paper-2: #e6e4dc;
    --ink: #131210;
    --ink-soft: #403d36;
    --muted: #7e776b;
    --red: #ee2d12;
    --blue: #1f3aa6;
    --yellow: #f2c200;
    --teal: #1f7a6e;
    --line: rgba(19, 18, 16, .16);

    --maxw: 1360px;
    --page-x: clamp(20px, 5vw, 72px);
    --page-y: clamp(60px, 8vw, 116px);
    --header-h: 72px;

    --display: "Russo One", "Arial Black", sans-serif;
    --text: "Oswald", "Arial Narrow", sans-serif;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 24px);
    overflow-x: clip;
}

body {
    min-width: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: var(--text);
    font-size: 17px;
    font-weight: 400;
    line-height: 1.5;
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
}

body.nav-open { overflow: hidden; }

::selection { color: var(--paper); background: var(--red); }

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

h1, h2, h3, h4 {
    font-family: var(--display);
    font-weight: 400;
    line-height: .9;
    letter-spacing: -.02em;
    text-transform: uppercase;
}

.container {
    width: 100%;
    max-width: var(--maxw);
    min-width: 0;
    margin: 0 auto;
    padding-inline: var(--page-x);
}

section { padding-block: var(--page-y); }

/* ---------- ШАПКА ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--header-h);
    background: var(--paper);
    border-bottom: 3px solid var(--ink);
}

.header-inner {
    height: var(--header-h);
    display: flex;
    align-items: center;
    gap: clamp(16px, 4vw, 56px);
}

.brand {
    display: flex;
    align-items: baseline;
    gap: 0;
    margin-right: auto;
}

.brand-rkm {
    font-family: var(--display);
    font-size: 1.35rem;
    line-height: 1;
    letter-spacing: .1em;
    color: var(--ink);
}

.brand-ai {
    margin-left: 6px;
    color: var(--red);
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: .8rem;
    font-weight: 500;
    letter-spacing: .04em;
}

.nav { display: contents; }

.nav-links {
    display: flex;
    gap: clamp(14px, 1.8vw, 30px);
    list-style: none;
}

.nav-links a {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--ink-soft);
    padding-block: 6px;
    border-bottom: 2px solid transparent;
    transition: color .18s ease, border-color .18s ease;
}

.nav-links a:hover {
    color: var(--ink);
    border-color: var(--red);
}

.btn {
    display: inline-flex;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    padding: 0 26px;
    border: 2px solid var(--ink);
    background: transparent;
    color: var(--ink);
    font-family: var(--text);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background .18s ease, color .18s ease, border-color .18s ease;
}

.btn-primary { background: var(--ink); color: var(--paper); }
.btn:hover { background: var(--red); border-color: var(--red); color: var(--paper); }

.nav-toggle {
    display: none;
    width: 48px;
    height: 48px;
    border: 2px solid var(--ink);
    background: transparent;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: var(--ink);
    transition: transform .25s ease, opacity .25s ease;
}

/* ---------- HERO ---------- */

.hero {
    border-bottom: 3px solid var(--ink);
}

.hero-grid {
    width: 100%;
    max-width: var(--maxw);
    margin-inline: auto;
    padding-inline: var(--page-x);
    display: grid;
    grid-template-columns: 7fr 5fr;
    align-items: stretch;
    min-height: calc(100vh - var(--header-h));
}

.hero-main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    padding: clamp(48px, 7vw, 104px) clamp(36px, 4vw, 72px) clamp(48px, 7vw, 104px) 0;
}

.hero-kicker {
    align-self: flex-start;
    margin-bottom: clamp(28px, 3.5vw, 44px);
    padding: 9px 14px;
    background: var(--red);
    color: var(--paper);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .2em;
    text-transform: uppercase;
}

.hero h1 {
    font-size: clamp(38px, 5vw, 74px);
    line-height: .84;
    letter-spacing: -.04em;
    overflow-wrap: break-word;
    hyphens: auto;
}

.hero h1 .accent { color: var(--red); }

.hero-lead {
    max-width: 46ch;
    margin-top: clamp(28px, 3.5vw, 46px);
    color: var(--ink-soft);
    font-size: clamp(17px, 1.3vw, 20px);
    font-weight: 300;
    line-height: 1.6;
    overflow-wrap: break-word;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: clamp(32px, 4vw, 48px);
}

.hero-art {
    position: relative;
    border-left: 3px solid var(--ink);
    background:
        linear-gradient(135deg, transparent 58%, rgba(19, 18, 16, .06) 58%),
        repeating-linear-gradient(90deg, rgba(19, 18, 16, .05) 0 1px, transparent 1px 22px),
        repeating-linear-gradient(0deg, rgba(19, 18, 16, .05) 0 1px, transparent 1px 22px),
        var(--paper-2);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(28px, 4vw, 64px);
    overflow: hidden;
}

.hero-art::before {
    content: "01";
    position: absolute;
    top: clamp(20px, 3vw, 40px);
    right: clamp(20px, 3vw, 40px);
    font-family: var(--display);
    font-size: clamp(48px, 6vw, 92px);
    color: var(--ink);
    line-height: .8;
    z-index: 1;
}

.hero-art svg {
    width: 100%;
    max-width: 520px;
    height: auto;
}

.work-title a { color: inherit; text-decoration: none; }
.work-title a:hover { color: var(--red); }

.work-link {
    display: inline-block;
    margin-top: 18px;
    color: var(--red);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.work-link:hover { color: var(--ink); }

/* ---------- СТРАНИЦА КЕЙСА ---------- */

.case-doc { padding-bottom: clamp(40px, 6vw, 72px); }

.case-meta { margin-bottom: 12px; }

.case-tags { margin-bottom: clamp(28px, 4vw, 44px); }

.case-result {
    margin-top: clamp(32px, 4vw, 48px);
    padding: clamp(20px, 3vw, 28px);
    border: 2px solid var(--ink);
    background: var(--paper-2);
}

.case-result span {
    display: block;
    margin-bottom: 10px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--red);
}

.case-result p {
    color: var(--ink-soft);
    font-size: clamp(16px, 1.2vw, 18px);
    line-height: 1.7;
}

/* ---------- БЕГУЩАЯ СТРОКА ---------- */

.marquee {
    overflow: hidden;
    background: var(--paper);
    color: var(--ink);
    border-block: 3px solid var(--ink);
}

.marquee-track {
    display: flex;
    width: max-content;
    padding-block: 15px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .26em;
    text-transform: uppercase;
    animation: marquee 38s linear infinite;
}

.marquee-track span::after {
    content: "✦";
    margin-inline: 32px;
    color: var(--red);
}

@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- БЛОК-ОБРАЩЕНИЕ ---------- */

.statement {
    background: var(--ink);
    color: var(--paper);
    border-bottom: 3px solid var(--ink);
}

.statement-inner {
    display: grid;
    gap: clamp(28px, 4vw, 56px);
    align-items: center;
    padding-block: clamp(56px, 8vw, 104px);
}

@media (min-width: 880px) {
    .statement-inner { grid-template-columns: 1.5fr .8fr; }
}

.statement .eyebrow { color: var(--red); }

.statement h2 {
    font-size: clamp(30px, 4.6vw, 60px);
    line-height: .92;
}

.statement h2 .accent { color: var(--red); }

.statement-aside {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.statement-aside p {
    color: rgba(242, 241, 236, .82);
    font-size: clamp(16px, 1.2vw, 19px);
    font-weight: 300;
    line-height: 1.6;
}

.statement .btn {
    align-self: flex-start;
    border-color: var(--paper);
    color: var(--paper);
}

.statement .btn-primary { background: var(--red); border-color: var(--red); }
.statement .btn:hover { background: var(--paper); border-color: var(--paper); color: var(--ink); }

/* Шаги «как мы работаем» — компактная подпись */
.statement-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    margin-top: clamp(24px, 3vw, 36px);
    list-style: none;
}

.statement-steps li {
    position: relative;
    padding-left: 22px;
    color: rgba(242, 241, 236, .9);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.statement-steps li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .35em;
    width: 10px;
    height: 10px;
    background: var(--red);
}

/* ---------- ЗАГОЛОВКИ СЕКЦИЙ ---------- */

.section-head {
    position: relative;
    display: grid;
    grid-template-columns: minmax(96px, 1.5fr) 8.5fr;
    gap: clamp(20px, 4vw, 64px);
    margin-bottom: clamp(44px, 6vw, 88px);
    padding-bottom: clamp(24px, 3vw, 40px);
    border-bottom: 3px solid var(--ink);
}

/* Цветной конструктивистский узел на структурной линии */
.section-head::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: -17px;
    width: 32px;
    height: 32px;
    background: var(--red);
}

#about .section-head::after { background: var(--red); }
#expertise .section-head::after { background: var(--blue); }
#services .section-head::after { background: var(--yellow); }
#portfolio .section-head::after { background: var(--red); }
#team .section-head::after { background: var(--blue); }
#training .section-head::after { background: var(--red); }

.section-no {
    font-family: var(--display);
    font-size: clamp(40px, 5vw, 76px);
    line-height: .8;
    color: var(--red);
}

.eyebrow {
    display: block;
    margin-bottom: clamp(14px, 1.8vw, 24px);
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .24em;
    text-transform: uppercase;
}

.section-title {
    max-width: 16ch;
    font-size: clamp(30px, 4.6vw, 68px);
}

.section-note {
    max-width: 60ch;
    margin-top: clamp(20px, 2.4vw, 32px);
    color: var(--ink-soft);
    font-size: clamp(16px, 1.15vw, 18px);
    font-weight: 300;
    line-height: 1.7;
}

/* ---------- О ЛАБОРАТОРИИ ---------- */

.about-grid {
    display: grid;
    grid-template-columns: 7fr 4fr;
    gap: clamp(36px, 6vw, 96px);
    align-items: start;
}

.about-text p {
    margin-bottom: 22px;
    color: var(--ink-soft);
    font-size: clamp(17px, 1.3vw, 21px);
    font-weight: 300;
    line-height: 1.7;
}

.about-text p:last-child { margin-bottom: 0; }
.about-text strong { color: var(--ink); font-weight: 600; }

.about-stats { border-top: 2px solid var(--ink); }

.stat {
    display: flex;
    align-items: baseline;
    gap: 20px;
    padding-block: clamp(18px, 2vw, 28px);
    border-bottom: 1px solid var(--line);
}

.stat .num {
    font-family: var(--display);
    font-size: clamp(40px, 4.4vw, 64px);
    line-height: .8;
    color: var(--red);
    min-width: 2.6ch;
}

.stat .label {
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .14em;
    text-transform: uppercase;
}

/* ---------- СЕТКА ПАНЕЛЕЙ ---------- */

.windows {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(18px, 2vw, 28px);
    min-width: 0;
}

.windows.cols-2 { grid-template-columns: repeat(2, 1fr); }

.window {
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: clamp(24px, 2.4vw, 36px);
    border: 2px solid var(--ink);
    border-top: 3px solid var(--ink);
    background: var(--paper);
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.windows.cols-3 .window:nth-child(3n+2) { transform: translateY(clamp(20px, 3vw, 48px)); }

.window:hover {
    border-top-color: var(--red);
    box-shadow: 6px 6px 0 var(--ink);
    transform: translate(-2px, -2px);
}

.windows.cols-3 .window:nth-child(3n+2):hover {
    transform: translate(-2px, calc(clamp(20px, 3vw, 48px) - 2px));
}

.window:hover .tag { border-color: var(--red); color: var(--ink); }

.window-no {
    margin-bottom: clamp(18px, 2vw, 28px);
    color: var(--red);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .18em;
}

.window h3, .pillar h3 {
    margin-bottom: 14px;
    font-size: clamp(20px, 1.9vw, 27px);
    line-height: .95;
}

.window p, .pillar p {
    color: var(--ink-soft);
    font-size: 16px;
    font-weight: 300;
    line-height: 1.6;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
    padding-top: 22px;
}

.tag {
    padding: 5px 10px;
    border: 1px solid var(--line);
    color: var(--ink-soft);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .1em;
    text-transform: uppercase;
}

/* ---------- НАПРАВЛЕНИЯ ---------- */

#services {
    background: var(--paper-2);
    color: var(--ink);
}

#services .window { background: var(--paper); }
#services .window:hover { border-top-color: var(--red); }
#services .window:hover .pillar-kicker { color: var(--red); }

.pillar-kicker {
    display: block;
    margin-bottom: 18px;
    font-family: var(--display);
    font-size: clamp(28px, 3vw, 44px);
    line-height: .8;
    color: var(--red);
}

.pillar-list {
    margin-top: 22px;
    display: grid;
    gap: 11px;
    list-style: none;
}

.pillar-list li {
    position: relative;
    padding-left: 22px;
    color: var(--ink-soft);
    font-size: 15px;
    font-weight: 300;
}

.pillar-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .5em;
    width: 9px;
    height: 9px;
    background: var(--red);
}

/* ---------- ПРОЦЕСС ---------- */

.process {
    margin-top: clamp(36px, 5vw, 72px);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(18px, 2vw, 32px);
}

.step { padding-top: 22px; border-top: 2px solid var(--ink); }

.step-no {
    margin-bottom: 18px;
    font-family: var(--display);
    font-size: clamp(40px, 4vw, 60px);
    line-height: .8;
    color: transparent;
    -webkit-text-stroke: 2px var(--red);
}

.step h4 {
    margin-bottom: 12px;
    font-size: clamp(17px, 1.5vw, 22px);
    color: var(--ink);
}

.step p {
    color: var(--ink-soft);
    font-size: 15px;
    font-weight: 300;
    line-height: 1.6;
}

/* ---------- ПОРТФОЛИО ---------- */

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: clamp(20px, 2.4vw, 36px);
}

.work {
    display: flex;
    flex-direction: column;
    padding: clamp(26px, 2.6vw, 40px);
    border: 2px solid var(--ink);
    border-top: 3px solid var(--ink);
    background: var(--paper);
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.work:nth-child(4n+1) { grid-column: span 7; }
.work:nth-child(4n+2) { grid-column: span 5; }
.work:nth-child(4n+3) { grid-column: span 5; }
.work:nth-child(4n+4) { grid-column: span 7; }

.work:hover {
    border-top-color: var(--red);
    box-shadow: 6px 6px 0 var(--ink);
    transform: translate(-2px, -2px);
}

.work:hover .work-link { color: var(--ink); }
.work:hover .work-result { border-left-width: 5px; }

.work-meta {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: clamp(20px, 2.4vw, 32px);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.work-domain { color: var(--red); }
.work-id { color: var(--muted); }

.work-title {
    margin-bottom: 14px;
    font-size: clamp(22px, 2.2vw, 32px);
    line-height: .95;
}

.work p {
    color: var(--ink-soft);
    font-size: 16px;
    font-weight: 300;
    line-height: 1.6;
}

.work .tag-row { margin-top: 22px; padding-top: 0; }

.work-result {
    margin-top: 26px;
    padding-left: 18px;
    border-left: 3px solid var(--red);
    color: var(--ink-soft);
    font-size: 15px;
    font-weight: 300;
    line-height: 1.55;
}

.work-result span {
    display: block;
    margin-bottom: 6px;
    color: var(--red);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.portfolio-empty {
    grid-column: 1 / -1;
    padding-block: 56px;
    border-top: 2px solid var(--ink);
    color: var(--muted);
    text-align: center;
}

/* ---------- КОМАНДА ---------- */

.team-stage {
    display: grid;
    gap: clamp(28px, 4vw, 48px);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: clamp(20px, 2.4vw, 36px);
}

.member {
    padding: 0;
    padding-top: 22px;
    border: 0;
    border-top: 2px solid var(--ink);
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color .2s ease, color .2s ease;
}

.member:hover { border-top-color: var(--red); }
.member.is-active { border-top-width: 3px; border-top-color: var(--red); }

.member:nth-child(n) { grid-column: span 4; }

.member-avatar {
    width: 100%;
    margin-bottom: 18px;
    display: block;
    background: var(--paper);
    color: var(--paper);
    font-family: var(--display);
    font-size: clamp(26px, 3vw, 48px);
    transition: outline-color .2s ease;
}

.member.is-lead .member-avatar { aspect-ratio: 4 / 3; }
.member.is-active .member-avatar { outline: 3px solid var(--red); outline-offset: -3px; }

.member-avatar img {
    display: block;
    width: 100%;
    height: auto;
}

.member.is-placeholder .member-avatar {
    background: transparent;
    border: 2px solid var(--ink);
    color: var(--muted);
}

.member-name {
    font-family: var(--display);
    font-size: clamp(15px, 1.4vw, 20px);
}

.member-role {
    margin-top: 8px;
    color: var(--ink-soft);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.member-note {
    margin-top: 12px;
    color: var(--red);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
}

/* Модальное окно с описанием участника */
.team-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(16px, 4vw, 48px);
}

.team-modal[hidden] { display: none; }

body.team-modal-open { overflow: hidden; }

.team-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(19, 18, 16, .55);
    animation: team-fade .2s ease;
}

.team-modal-card {
    position: relative;
    width: min(640px, 100%);
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    border: 3px solid var(--ink);
    background: var(--paper);
    box-shadow: 12px 12px 0 rgba(19, 18, 16, .9);
    animation: team-pop .22s cubic-bezier(.2, .7, .2, 1);
}

.team-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    z-index: 1;
    width: 40px;
    height: 40px;
    border: 2px solid var(--ink);
    background: var(--paper);
    color: var(--ink);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: background .2s ease, color .2s ease;
}

.team-modal-close:hover { background: var(--red); border-color: var(--red); color: var(--paper); }

@keyframes team-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes team-pop {
    from { opacity: 0; transform: translateY(16px) scale(.98); }
    to { opacity: 1; transform: none; }
}

.team-detail-inner {
    padding: clamp(28px, 3.5vw, 48px);
}

.team-detail-name {
    margin-top: 10px;
    font-size: clamp(24px, 3vw, 40px);
    line-height: .92;
}

.team-detail-note {
    margin-top: 12px;
    color: var(--red);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.team-detail-bio {
    max-width: 72ch;
    margin-top: clamp(20px, 2.5vw, 28px);
    color: var(--ink-soft);
    font-size: clamp(16px, 1.2vw, 19px);
    font-weight: 300;
    line-height: 1.7;
}

.team-detail-pending {
    margin-top: 14px;
    color: var(--muted);
    font-size: 14px;
    font-style: italic;
}

.team-detail-inner .tag-row { margin-top: 24px; padding-top: 0; }

/* ---------- ОБУЧЕНИЕ ---------- */

.training { background: var(--paper-2); }

.soon-pill {
    align-self: flex-start;
    margin-bottom: 20px;
    padding: 5px 10px;
    background: var(--red);
    color: var(--paper);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.window:hover .soon-pill { background: var(--red); color: var(--paper); }

/* ---------- КОНТАКТ ---------- */

.contact { padding: 0; }

.contact-card {
    position: relative;
    overflow: hidden;
    padding: clamp(80px, 14vw, 200px) var(--page-x);
    background: var(--paper);
    color: var(--ink);
    border-top: 3px solid var(--ink);
}

.contact-card::before {
    content: "";
    position: absolute;
    right: clamp(-160px, -8vw, -60px);
    bottom: clamp(-200px, -10vw, -80px);
    width: min(60vw, 620px);
    aspect-ratio: 1;
    background: var(--red);
    border-radius: 50%;
    opacity: .18;
}

.contact-card > * { position: relative; max-width: 60ch; }

.contact-card .eyebrow { color: var(--red); }

.contact-card h2 {
    font-size: clamp(44px, 8vw, 120px);
    line-height: .86;
}

.contact-card p {
    margin-top: clamp(24px, 3vw, 40px);
    color: var(--ink-soft);
    font-size: clamp(17px, 1.3vw, 21px);
    font-weight: 300;
    line-height: 1.7;
}

.contact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: clamp(32px, 4vw, 48px);
}

.contact-card .btn { border-color: var(--ink); color: var(--ink); }
.contact-card .btn-primary { background: var(--red); border-color: var(--red); color: var(--paper); }
.contact-card .btn:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* ---------- ПОДВАЛ ---------- */

.site-footer { padding-block: clamp(40px, 5vw, 64px); border-top: 2px solid var(--ink); }

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 28px;
}

.footer-legal {
    color: var(--muted);
    font-size: 13px;
    font-weight: 300;
    line-height: 1.8;
    text-align: right;
}

.footer-legal a { color: var(--ink-soft); text-decoration: underline; text-underline-offset: 3px; }
.footer-legal a:hover { color: var(--red); }

.footer-credit {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: normal;
}

.footer-credit-mark {
    font-family: var(--display);
    font-size: 11px;
    color: var(--ink-soft);
    letter-spacing: .12em;
    text-transform: uppercase;
}

/* ---------- ВНУТРЕННИЕ СТРАНИЦЫ ---------- */

.doc {
    max-width: var(--maxw);
    padding-top: clamp(48px, 7vw, 88px);
    padding-bottom: var(--page-y);
}

.back-link {
    display: inline-flex;
    margin-bottom: clamp(40px, 6vw, 80px);
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.back-link:hover { color: var(--red); }

.doc-title {
    max-width: 14ch;
    font-size: clamp(40px, 7vw, 96px);
    line-height: .88;
    overflow-wrap: break-word;
    hyphens: auto;
}

.doc-subtitle {
    max-width: 60ch;
    margin-top: clamp(24px, 3vw, 36px);
    color: var(--ink-soft);
    font-size: clamp(17px, 1.3vw, 20px);
    font-weight: 300;
    line-height: 1.7;
}

.doc-block {
    display: grid;
    grid-template-columns: 4fr 8fr;
    gap: clamp(24px, 4vw, 64px);
    margin-top: clamp(40px, 5vw, 72px);
    padding-top: clamp(24px, 3vw, 40px);
    border-top: 2px solid var(--ink);
}

.doc-block h2 { font-size: clamp(20px, 2vw, 30px); line-height: .95; }

.doc-block p {
    margin-bottom: 16px;
    color: var(--ink-soft);
    font-weight: 300;
    line-height: 1.75;
}

.doc-block ul { display: grid; gap: 11px; margin-bottom: 16px; list-style: none; }

.doc-block li {
    position: relative;
    padding-left: 22px;
    color: var(--ink-soft);
    font-weight: 300;
}

.doc-block li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .5em;
    width: 9px;
    height: 9px;
    background: var(--red);
}

.doc-block a { color: var(--red); text-decoration: underline; text-underline-offset: 3px; }

/* Факты тренинга: для кого / формат / результат */
.facts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(18px, 2vw, 28px);
    margin-bottom: clamp(40px, 5vw, 72px);
    min-width: 0;
}

.fact { min-width: 0; padding-top: 18px; border-top: 3px solid var(--ink); }

.fact-k {
    color: var(--red);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.fact-v {
    margin-top: 12px;
    color: var(--ink-soft);
    font-size: clamp(15px, 1.2vw, 18px);
    font-weight: 300;
    line-height: 1.55;
}

/* ---------- ПОЯВЛЕНИЕ ---------- */

.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .7s cubic-bezier(.2, .7, .2, 1), transform .7s cubic-bezier(.2, .7, .2, 1);
}

.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .marquee-track { animation: none; }
    .reveal { opacity: 1; transform: none; transition: none; }
    .team-modal-backdrop, .team-modal-card { animation: none; }
    .supre { animation: none; }
}

/* ---------- ПЛАВАЮЩИЕ СУПРЕМАТИЧЕСКИЕ ФИГУРЫ ---------- */

main > section { position: relative; }
main > section > .supre-field {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}
main > section > :not(.supre-field) { position: relative; z-index: 1; }

.supre {
    position: absolute;
    top: var(--y, 20%);
    left: var(--x, 10%);
    width: var(--s, 80px);
    height: var(--s, 80px);
    opacity: var(--o, .12);
    will-change: transform;
    animation: supre-float var(--d, 20s) ease-in-out var(--delay, 0s) infinite alternate;
}

.supre.is-circle { border-radius: 50%; }

.supre.is-ring {
    background: transparent !important;
    border: var(--bw, 9px) solid var(--c, var(--ink));
    border-radius: 50%;
}

.supre.is-tri {
    width: 0;
    height: 0;
    background: transparent !important;
    border-left: calc(var(--s, 80px) / 2) solid transparent;
    border-right: calc(var(--s, 80px) / 2) solid transparent;
    border-bottom: var(--s, 80px) solid var(--c, var(--ink));
}

.supre.is-bar {
    height: var(--bh, 14px);
    border-radius: 0;
}

@keyframes supre-float {
    from { transform: translate3d(0, 0, 0) rotate(var(--r0, 0deg)); }
    to { transform: translate3d(var(--dx, 24px), var(--dy, -28px), 0) rotate(var(--r1, 14deg)); }
}

/* ---------- АДАПТИВ ---------- */

@media (max-width: 1040px) {
    .hero-grid { grid-template-columns: 1fr; min-height: 0; }
    .hero-main { padding: clamp(48px, 9vw, 80px) 0; }
    .hero-art {
        border-left: 0;
        border-top: 2px solid var(--ink);
        min-height: 360px;
    }
    .about-grid { grid-template-columns: 1fr; }
    .process { grid-template-columns: repeat(2, 1fr); }
    .work:nth-child(n) { grid-column: span 6; }
    .member:nth-child(n) { grid-column: span 6; }
    .member:nth-child(1) { grid-column: span 12; }
}

@media (max-width: 720px) {
    .nav-toggle { display: block; }
    .nav {
        display: block;
        position: fixed;
        inset: var(--header-h) 0 auto;
        padding: 12px var(--page-x) 24px;
        background: var(--paper);
        border-bottom: 2px solid var(--ink);
        transform: translateY(-150%);
        transition: transform .3s ease;
    }
    body.nav-open .nav { transform: translateY(0); }
    .nav-links { flex-direction: column; gap: 0; }
    .nav-links li { border-bottom: 1px solid var(--line); }
    .nav-links a { display: block; padding-block: 16px; border-bottom: 0; }
    .nav .btn { width: 100%; margin-top: 16px; }
    body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
    body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

    .section-head { grid-template-columns: 1fr; gap: 14px; }
    .windows,
    .windows.cols-2 { grid-template-columns: 1fr; }
    .windows.cols-3 .window:nth-child(n) { transform: none; }
    .process { grid-template-columns: 1fr; }
    .work:nth-child(n) { grid-column: span 12; }
    .member:nth-child(n) { grid-column: span 6; }
    .footer-inner { flex-direction: column; }
    .footer-legal { text-align: left; }
    .doc-block { grid-template-columns: 1fr; }
    .facts { grid-template-columns: 1fr; }

    .hero h1 {
        font-size: clamp(30px, 8.5vw, 48px);
        letter-spacing: -.03em;
    }

    .hero-kicker {
        max-width: 100%;
        font-size: 10px;
        letter-spacing: .14em;
        line-height: 1.4;
    }

    .hero-cta .btn { flex: 1 1 auto; min-width: 0; }
}

/* ---------- МНОГОСТРАНИЧНЫЕ ДОПОЛНЕНИЯ ---------- */

/* Активный пункт меню */
.nav-links a[aria-current="page"] {
    color: var(--ink);
    border-color: var(--red);
}

/* Кликабельная карточка-навигатор */
a.window { text-decoration: none; color: inherit; }

.window-go {
    margin-top: 22px;
    color: var(--red);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
}

a.window:hover .window-go { color: var(--ink); }

/* Компактный заголовок страницы (без огромного hero) */
.page-head {
    padding-top: clamp(40px, 6vw, 80px);
    padding-bottom: clamp(28px, 4vw, 52px);
}

.page-head .eyebrow { color: var(--red); }

.page-title {
    max-width: 18ch;
    font-size: clamp(38px, 6vw, 88px);
    line-height: .86;
    overflow-wrap: break-word;
    hyphens: auto;
}

.page-intro {
    max-width: 64ch;
    margin-top: clamp(22px, 3vw, 36px);
    color: var(--ink-soft);
    font-size: clamp(17px, 1.3vw, 21px);
    font-weight: 300;
    line-height: 1.7;
}

/* Номер модуля в заголовке doc-block */
.m-no {
    margin-right: 12px;
    color: var(--red);
}

/* Внутренние перелинковки внизу страниц */
.next-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: clamp(32px, 4vw, 48px);
}

/* ---------- АВАНГАРДНЫЕ ФИГУРЫ ---------- */

/* Заголовок страницы с геометрическим панно справа */
.page-head-inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(32px, 5vw, 64px);
    align-items: center;
}

@media (min-width: 920px) {
    .page-head-inner { grid-template-columns: 1.35fr .85fr; }
}

.page-fig {
    position: relative;
    overflow: hidden;
    min-height: clamp(220px, 26vw, 320px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(20px, 3vw, 44px);
    border: 3px solid var(--ink);
    background:
        repeating-linear-gradient(90deg, rgba(19, 18, 16, .05) 0 1px, transparent 1px 24px),
        repeating-linear-gradient(0deg, rgba(19, 18, 16, .05) 0 1px, transparent 1px 24px),
        var(--paper-2);
}

.page-fig svg { width: 100%; height: auto; max-width: 380px; display: block; }

/* Конструктивистская полоса-разделитель */
.figband {
    position: relative;
    overflow: hidden;
    height: clamp(120px, 15vw, 168px);
    margin-top: clamp(44px, 6vw, 80px);
    border: 3px solid var(--ink);
    background:
        repeating-linear-gradient(90deg, rgba(19, 18, 16, .05) 0 1px, transparent 1px 24px),
        repeating-linear-gradient(0deg, rgba(19, 18, 16, .05) 0 1px, transparent 1px 24px),
        var(--paper-2);
}

.figband::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent calc(50% - 1px), var(--ink) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px));
    opacity: .4;
}

.figband.flip { transform: scaleX(-1); }

.figband span { position: absolute; display: block; }

.fb-circle {
    width: clamp(58px, 8vw, 94px);
    aspect-ratio: 1;
    border-radius: 50%;
    background: var(--red);
    left: 7%;
    top: 50%;
    transform: translateY(-50%);
}

.fb-bar {
    width: clamp(50px, 6vw, 78px);
    height: 66%;
    background: var(--blue);
    left: 31%;
    top: 0;
}

.fb-square {
    width: clamp(42px, 5.4vw, 64px);
    aspect-ratio: 1;
    background: var(--yellow);
    left: 56%;
    top: 22%;
    transform: rotate(12deg);
}

.fb-ring {
    width: clamp(40px, 5vw, 60px);
    aspect-ratio: 1;
    border-radius: 50%;
    border: clamp(7px, 1vw, 11px) solid var(--teal);
    right: 16%;
    bottom: 16%;
}

.fb-tri {
    width: 0;
    height: 0;
    border-left: clamp(26px, 3.6vw, 44px) solid transparent;
    border-right: clamp(26px, 3.6vw, 44px) solid transparent;
    border-bottom: clamp(48px, 6.6vw, 82px) solid var(--ink);
    right: 6%;
    top: 12%;
    transform: rotate(9deg);
}

/* Доп. фигура в контактной карточке (клин) */
.contact-card::after {
    content: "";
    position: absolute;
    left: clamp(-40px, -4vw, -10px);
    top: clamp(-60px, -6vw, -20px);
    width: min(34vw, 320px);
    aspect-ratio: 1;
    background: var(--blue);
    opacity: .14;
    clip-path: polygon(0 0, 100% 0, 0 100%);
}

@media (max-width: 560px) {
    .fb-square, .fb-ring { display: none; }
}
