/* Подключение шрифта PT Root UI */
@font-face {
    font-family: 'PT Root UI';
    src: url('PT-Root-UI/PT-Root-UI_Regular.woff2') format('woff2'),
         url('PT-Root-UI/PT-Root-UI_Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'PT Root UI';
    src: url('PT-Root-UI/PT-Root-UI_Medium.woff2') format('woff2'),
         url('PT-Root-UI/PT-Root-UI_Medium.woff') format('woff');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'PT Root UI';
    src: url('PT-Root-UI/PT-Root-UI_Bold.woff2') format('woff2'),
         url('PT-Root-UI/PT-Root-UI_Bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'PT Root UI';
    src: url('PT-Root-UI/PT-Root-UI_Light.woff2') format('woff2'),
         url('PT-Root-UI/PT-Root-UI_Light.woff') format('woff');
    font-weight: 300;
    font-style: normal;
}

:root {
    --bg-color: #000000;
    --text-color: #ffffff;
    --text-secondary: #ccc;
    --text-tertiary: #888;
    --accent: #a46700;
    --border-color: #333;
    --card-bg: #2a2a2a;
    --divider-color: #333;
    --photo-border: #333;
    --project-card-radius: 28px;
    --project-card-inset: 12px;
    --project-image-radius: calc(var(--project-card-radius) - var(--project-card-inset));
    /* Ширина правой колонки как при 1040px и 1fr/1fr — картинка не уже */
    --project-card-visual-col: 520px;
}

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

body {
    font-family: 'PT Root UI', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-weight: 500;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    padding: 0;
    margin: 0;
}

/* Тёмные скроллбары на всех страницах, кроме SberPass */
html:not(:has(body.sberpass-page)) {
    scrollbar-width: thin;
    scrollbar-color: #1c1c1c #060606;
}

html:not(:has(body.sberpass-page))::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

html:not(:has(body.sberpass-page))::-webkit-scrollbar-track {
    background: #060606;
}

html:not(:has(body.sberpass-page))::-webkit-scrollbar-thumb {
    background: #1c1c1c;
    border-radius: 4px;
}

html:not(:has(body.sberpass-page))::-webkit-scrollbar-thumb:hover {
    background: #2a2a2a;
}

html:not(:has(body.sberpass-page))::-webkit-scrollbar-corner {
    background: #060606;
}

.container {
    max-width: 1880px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Адаптация для больших мониторов */
@media (min-width: 1920px) {
    .container {
        max-width: 1880px;
    }
}

@media (min-width: 2560px) {
    .container {
        max-width: 2520px;
    }
}

/* Шапка */
.header {
    position: relative;
    text-align: left;
    padding: 0;
    overflow: hidden;
    width: 100%;
}

.header-video-wrap {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.header-video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    min-width: 100%;
    min-height: 100%;
    transform: translate(-50%, -50%);
    object-fit: cover;
    filter: brightness(1);
}

.header-content {
    position: relative;
    z-index: 1;
    max-width: 1880px;
    margin: 0 auto;
    /* 40px = padding .container (20px) + .projects (20px) — как у .projects-grid */
    padding: 60px 40px 40px;
    text-align: left;
}

.header-content__column {
    max-width: 920px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    text-align: left;
}

.header-intro {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 16px 20px;
    margin-bottom: 16px;
}

.photo-container {
    margin-bottom: 0;
    width: 100px;
    height: 100px;
    border-radius: 24px;
    border: 1px solid var(--photo-border);
    margin-left: 0;
    margin-right: 0;
    flex-shrink: 0;
    overflow: hidden;
}

.photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1.2);
}

.name {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 0;
    color: var(--text-color);
    text-align: left;
    line-height: 1.2;
}

.company-logo {
    display: block;
    margin: 0 0 16px;
    max-width: min(210px, 63.75vw);
    height: auto;
}

.profession {
    font-size: 24px;
    color: var(--accent);
    margin-bottom: 20px;
    text-align: left;
}

.description {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 600px;
    margin: 0;
    text-align: left;
}

.description-block {
    font-size: 18px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0;
    text-align: left;
}

.description-block.hero-highlight {
    color: var(--accent);
}

/* Разделительная линия */
.divider {
    width: 100%;
    height: 1px;
    background-color: var(--divider-color);
    margin: 0 0 40px;
}

/* Проекты */
.projects {
    padding: 40px 20px 0;
}

.projects-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 40px;
    text-align: center;
}

.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 0;
    max-width: 920px;
    margin-left: auto;
    margin-right: auto;
}

.project-card {
    background-color: #141414;
    border-radius: var(--project-card-radius);
    overflow: hidden;
    cursor: pointer;
    transition: box-shadow 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: block;
    border: 1px solid var(--border-color);
}

.project-card:hover {
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
}

.project-card__body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--project-card-visual-col);
    align-items: stretch;
    min-height: 280px;
}

.project-card__text {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 28px;
    padding: 36px 28px 36px 36px;
    text-align: left;
}

.project-card__intro {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.project-card__title {
    font-size: clamp(26px, 4vw, 36px);
    font-weight: 700;
    line-height: 1.15;
    color: var(--text-color);
    margin: 0;
}

.project-card__title .project-card__duration {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
    color: var(--text-tertiary);
    vertical-align: super;
    margin-left: 0.45em;
    position: relative;
    top: -0.08em;
}

.project-card__subtitle {
    font-size: 15px;
    line-height: 1.5;
    color: var(--text-tertiary);
    margin: 0;
    max-width: 28ch;
}

/* SberPass: длинные подзаголовки — на всю ширину текстовой колонки */
.project-card--wide-text .project-card__subtitle {
    max-width: none;
}

.project-card__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 28px 40px;
}

.project-card__stat {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.project-card__stat-label {
    font-size: 13px;
    line-height: 1.3;
    color: var(--text-tertiary);
}

.project-card__stat-value {
    font-size: 22px;
    line-height: 1.2;
    color: var(--text-color);
}

.project-card__visual {
    display: flex;
    align-items: stretch;
    padding: var(--project-card-inset) var(--project-card-inset) var(--project-card-inset) 20px;
    min-height: 0;
}

.project-card__image-wrap {
    position: relative;
    width: 100%;
    flex: 1;
    min-height: 220px;
    border-radius: var(--project-image-radius);
    overflow: hidden;
    background-color: var(--card-bg);
}

.project-card__image {
    width: 100%;
    height: 100%;
    min-height: 220px;
    object-fit: cover;
    display: block;
}

.project-card__arrow {
    position: absolute;
    right: 16px;
    bottom: 16px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: #ffffff;
    color: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease;
}

.project-card:hover .project-card__arrow {
    transform: scale(1.05);
}

.project-card-shell {
    position: relative;
    z-index: 0;
}

/* Нижняя карточка — выше свечений соседних рядов */
.project-card-shell--sberpass {
    z-index: 1;
}

.project-card-shell__glow {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 0;
    width: 115%;
    height: auto;
    max-width: none;
    aspect-ratio: 1424 / 488;
    object-fit: contain;
    pointer-events: none;
    user-select: none;
    transform: translate(-50%, -50%) scale(0.74, 0.74);
    transform-origin: center center;
    transition: transform 0.8s cubic-bezier(0.22, 0.85, 0.32, 1);
}

.project-card-shell--vr .project-card-shell__glow,
.project-card-shell--sberpass .project-card-shell__glow {
    aspect-ratio: 1500 / 450;
}

.project-card-shell .project-card {
    position: relative;
    z-index: 1;
    isolation: isolate;
}

.project-card-shell:hover .project-card-shell__glow,
.project-card-shell:focus-within .project-card-shell__glow {
    transform: translate(-50%, -50%) scale(1.38, 1.14);
}

@media (prefers-reduced-motion: reduce) {
    .project-card-shell__glow {
        transition-duration: 0.01ms;
    }

    .project-card-shell:hover .project-card-shell__glow,
    .project-card-shell:focus-within .project-card-shell__glow {
        transform: translate(-50%, -50%) scale(0.9, 0.84);
    }
}

/* Контакты — отступ сверху = 2× gap между карточками */
.contacts {
    padding: 48px 20px 60px;
    text-align: center;
}

.contact-item {
    font-size: 24px;
    margin: 15px 0;
    color: var(--text-secondary);
    display: block;
}

.contact-label {
    font-weight: 700;
    opacity: 0.4;
}

.contact-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 700;
    transition: opacity 0.3s ease;
    display: inline-block;
}

.contact-link:hover {
    opacity: 0.8;
    animation: tada 0.6s ease;
}

@keyframes tada {
    0% {
        transform: scale(1);
    }
    10%, 20% {
        transform: scale(0.9) rotate(-3deg);
    }
    30%, 50%, 70%, 90% {
        transform: scale(1.1) rotate(3deg);
    }
    40%, 60%, 80% {
        transform: scale(1.1) rotate(-3deg);
    }
    100% {
        transform: scale(1) rotate(0);
    }
}

/* Стили для страниц проектов */
.project-header {
    padding: 40px 20px;
}

/* Отступ под фиксированную .back-link, если она — прямой потомок шапки */
.project-header:has(> .back-link) {
    padding-top: calc(40px + env(safe-area-inset-top, 0px) + 52px);
}

.project-image-header {
    width: 100%;
    height: 400px;
    border-radius: 20px;
    object-fit: cover;
    background-color: var(--card-bg);
    margin-bottom: 30px;
}

.project-header .project-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
    color: var(--text-color);
}

.bagration-page .project-header.project-header--bagration,
.vr-page .project-header.project-header--bagration,
.sberpass-page .project-header.project-header--bagration {
    padding-left: 0;
    padding-right: 0;
}

.sberpass-page .project-header.project-header--bagration {
    padding-top: 20px;
    padding-bottom: 8px;
}

.sberpass-page .project-header--bagration .project-header__top {
    margin-bottom: 8px;
}

.sberpass-page .project-content {
    padding-top: 8px;
}

/* Светлая тема: SberPass */
body.sberpass-page {
    --bg-color: #efefef;
    --text-color: #111111;
    --text-secondary: #333333;
    --text-tertiary: #555555;
    --border-color: #d8d8d8;
    --card-bg: #f5f5f5;
    --divider-color: #e0e0e0;
    background-color: var(--bg-color);
    color: var(--text-color);
}

.sberpass-page > .container,
.vr-page > .container {
    position: relative;
    z-index: 1;
}

.sberpass-bg-fixed,
.vrtraining-bg-fixed {
    --page-cw: min(1880px, 100vw);
    /* Левый край как у .project-content / .project-header__top: центр экрана + половина контейнера + 20px padding + отступ центрирования колонки 800px */
    position: fixed;
    top: max(0px, env(safe-area-inset-top, 0px));
    left: calc(
        env(safe-area-inset-left, 0px)
        + (100vw - var(--page-cw)) / 2
        + 20px
        + (var(--page-cw) - 40px - min(800px, var(--page-cw) - 40px)) / 2
    );
    z-index: 0;
    width: min(100vw, 720px);
    height: auto;
    pointer-events: none;
    user-select: none;
    transform-origin: left top;
    transform: translate(-24%, -20%);
}

@media (min-width: 2560px) {
    .sberpass-bg-fixed,
    .vrtraining-bg-fixed {
        --page-cw: min(2520px, 100vw);
    }
}

.sberpass-page .back-link {
    background-color: var(--bg-color);
    color: #111111;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.sberpass-page .back-link:hover {
    color: #000000;
    background-color: #e8e8e8;
}

.sberpass-page .back-link:focus-visible {
    outline-color: #111111;
}

.sberpass-page .bagration-metric-card {
    background-color: #f5f5f5;
    border-color: var(--border-color);
}

.sberpass-page .sberpass-split .bagration-panel {
    background-color: #181818;
    border-color: rgba(255, 255, 255, 0.14);
    color: #ffffff;
}

.sberpass-page .sberpass-split .bagration-panel__title {
    color: #ffffff;
}

.sberpass-page .sberpass-split .bagration-panel .project-description {
    color: #ffffff;
}

.sberpass-page .bagration-insight:not(:first-child) {
    border-top-color: var(--border-color);
}

.sberpass-page .bagration-metric-kv__row {
    border-bottom-color: rgba(0, 0, 0, 0.1);
}

.sberpass-page .bagration-insight__title {
    color: var(--text-color);
}

.sberpass-page .sberpass-hero-figure {
    margin-top: 0;
    margin-bottom: 36px;
}

.sberpass-split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin: 40px 0;
    align-items: stretch;
}

.sberpass-split .bagration-panel {
    margin-top: 0;
}

.sberpass-flow-intro {
    margin-bottom: 0.75em;
}

.sberpass-hypothesis {
    margin-top: 40px;
}

.sberpass-research {
    margin-top: 40px;
}

.sberpass-page .sberpass-media-block {
    margin-top: 40px;
}

.sberpass-research-points {
    list-style: none;
    margin: 1.15em 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sberpass-research-points__item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.sberpass-research-points__icon {
    flex-shrink: 0;
    line-height: 0;
    margin-top: 3px;
}

.sberpass-research-points__icon svg {
    display: block;
}

.sberpass-page .sberpass-research-points__text {
    font-size: 18px;
    line-height: 1.55;
    color: var(--text-secondary);
}

.sberpass-page .sberpass-flow-list {
    margin: 0 0 0 1.25em;
    padding: 0;
    font-size: 18px;
    line-height: 1.65;
    color: var(--text-secondary);
}

.sberpass-page .sberpass-flow-list li {
    margin-bottom: 0.5em;
    padding-left: 0.25em;
}

.sberpass-page .sberpass-flow-list li:last-child {
    margin-bottom: 0;
}

.project-header--bagration .project-header__top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 24px;
    padding-left: 20px;
    padding-right: 20px;
    box-sizing: border-box;
    gap: 16px;
    flex-wrap: wrap;
}

.project-header-brand {
    display: block;
    max-width: min(240px, 55vw);
    max-height: 72px;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: left top;
}

.back-link {
    position: fixed;
    z-index: 200;
    top: max(12px, env(safe-area-inset-top, 0px));
    left: max(20px, env(safe-area-inset-left, 0px));
    display: inline-flex;
    align-items: center;
    margin-bottom: 0;
    padding: 10px 14px;
    border-radius: 10px;
    background-color: var(--bg-color);
    color: #2b6442;
    text-decoration: none;
    font-size: 18px;
    font-weight: 600;
    transition: color 0.25s ease, background-color 0.25s ease;
}

.project-header--bagration .back-link {
    left: auto;
    right: max(20px, env(safe-area-inset-right, 0px));
}

.bagration-page .back-link,
.vr-page .back-link {
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.vr-page .back-link {
    color: #3653d3;
}

.vr-page .back-link:hover {
    color: #4d6fe8;
}

.vr-page .back-link:focus-visible {
    outline-color: #3653d3;
}

.back-link:hover {
    color: #3a8558;
}

.back-link:focus-visible {
    outline: 2px solid #2b6442;
    outline-offset: 3px;
}

.project-content {
    padding: 40px 20px;
    max-width: 800px;
    margin: 0 auto;
}

.project-description {
    font-size: 20px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.bagration-page .project-context-title,
.vr-page .project-context-title,
.sberpass-page .project-context-title {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
    text-align: left;
    margin: 0 0 20px;
    color: var(--text-color);
}

.bagration-page .project-description {
    text-align: left;
    font-size: 18px;
    line-height: 1.6;
}

.vr-page .project-description,
.sberpass-page .project-description {
    text-align: left;
    font-size: 18px;
    line-height: 1.6;
}

.bagration-page .project-description:not(:last-child),
.vr-page .project-description:not(:last-child),
.sberpass-page .project-description:not(:last-child) {
    margin-bottom: 1.2em;
}

.bagration-panel {
    margin-top: 40px;
    padding: 28px 32px;
    background-color: #141414;
    border: 1px solid var(--border-color);
    border-radius: 20px;
}

.bagration-panel__title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.35;
    text-align: left;
    margin: 0 0 12px;
    color: var(--text-color);
}

.bagration-panel .project-description {
    margin-bottom: 0;
}

.bagration-discovery {
    margin-top: 48px;
}

.bagration-jtbd-table-wrap {
    margin-top: 24px;
    margin-bottom: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 16px;
    background-color: #121212;
    border: 1px solid var(--border-color);
    scrollbar-width: thin;
    scrollbar-color: #1c1c1c #0a0a0a;
}

.bagration-jtbd-table-wrap::-webkit-scrollbar {
    height: 8px;
}

.bagration-jtbd-table-wrap::-webkit-scrollbar-track {
    background: #0a0a0a;
    border-radius: 0 0 16px 16px;
}

.bagration-jtbd-table-wrap::-webkit-scrollbar-thumb {
    background: #1c1c1c;
    border-radius: 4px;
}

.bagration-jtbd-table-wrap::-webkit-scrollbar-thumb:hover {
    background: #2a2a2a;
}

.bagration-jtbd-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
    font-size: 14px;
    line-height: 1.5;
    color: #e0e0e0;
}

.bagration-jtbd-table thead th {
    text-align: left;
    font-weight: 600;
    color: #ffffff;
    padding: 18px 16px 14px;
    vertical-align: top;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.bagration-jtbd-table tbody td {
    padding: 16px;
    vertical-align: top;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.bagration-jtbd-table tbody tr:last-child td {
    border-bottom: none;
}

.bagration-figure {
    margin: 24px 0 0;
}

.bagration-figure-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 24px;
}

.bagration-figure-row .bagration-figure {
    margin: 0;
}

.bagration-figure-row + .bagration-mockups__lead {
    margin-top: 20px;
}

.bagration-discovery .bagration-mockups__lead + .bagration-figure {
    margin-top: 10px;
}

/* Итоговые макеты: больше воздуха над подзаголовком (после картинки), меньше — до картинки под ним */
.bagration-mockups {
    margin-top: 56px;
}

.bagration-mockups__item + .bagration-mockups__item {
    margin-top: 44px;
}

.bagration-mockups__lead {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.55;
    color: var(--text-secondary);
}

.bagration-mockups .bagration-figure--mockup {
    margin: 0;
}

.bagration-mockups .bagration-figure--mockup + .bagration-figure--mockup {
    margin-top: 20px;
}

.bagration-mockups .bagration-figure--mockup + .bagration-mockups__lead {
    margin-top: 36px;
}

.bagration-metrics {
    margin-top: 56px;
    --metric-value-font-size: clamp(18px, 2.2vw, 26px);
}

.bagration-metrics__grid {
    display: grid;
    grid-template-columns: minmax(0, 0.4fr) minmax(0, 0.6fr);
    gap: 20px;
    margin-top: 28px;
    align-items: stretch;
}

.bagration-metric-card {
    padding: 28px 26px;
    background-color: #141414;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    color: var(--text-color);
}

.bagration-metric-card__title {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 14px;
    color: var(--text-color);
}

.bagration-metric-card__title--year {
    font-size: var(--metric-value-font-size);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 20px;
}

.bagration-metric-card__star {
    color: #e8c547;
    font-weight: 400;
    margin-left: 4px;
}

.bagration-metric-card__text {
    font-size: 15px;
    line-height: 1.55;
    color: var(--text-secondary);
    margin: 0 0 22px;
}

.bagration-metric-cols {
    display: grid;
    gap: 12px 16px;
}

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

.bagration-metric-cols--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.bagration-metric-cols--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.bagration-metric-cols--5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.vr-metrics {
    margin-top: 56px;
    --metric-value-font-size: clamp(18px, 2.2vw, 26px);
}

.vr-metrics__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 28px;
    align-items: stretch;
}

.vr-metrics__card--wide {
    grid-column: 1 / -1;
}

.vr-metric-session-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    padding-top: 6px;
    align-items: stretch;
    --vr-session-value-size: clamp(13px, 2.4vw, 18px);
}

.vr-metric-session-period {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    min-width: 0;
    padding: 0 10px;
}

.vr-metric-session-period:first-child {
    padding-left: 0;
}

.vr-metric-session-period:last-child {
    padding-right: 0;
}

.vr-metric-session-period:not(:first-child) {
    border-left: 1px solid var(--border-color);
    padding-left: 16px;
}

.vr-metric-session-period__title {
    display: block;
    text-align: center;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.35;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    text-transform: none;
}

.vr-metric-session-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px 8px;
    width: 100%;
    align-items: start;
}

.vr-metric-session-metrics .vr-metric-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    gap: 6px;
    min-width: 0;
}

.vr-metric-session-metrics .vr-metric-stat__label {
    font-size: 11px;
    line-height: 1.25;
    font-weight: 400;
    color: var(--text-tertiary);
}

.vr-metric-session-metrics .vr-metric-stat__val {
    font-size: var(--vr-session-value-size);
    font-weight: 700;
    line-height: 1.15;
    color: var(--text-color);
    font-variant-numeric: tabular-nums;
}

.vr-metric-card__note {
    margin: 20px 0 0;
    font-size: 13px;
    line-height: 1.45;
    color: var(--text-tertiary);
}

.bagration-metric-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.bagration-metric-col__label {
    font-size: 12px;
    line-height: 1.3;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.bagration-metric-col__value {
    font-size: var(--metric-value-font-size);
    font-weight: 700;
    line-height: 1.15;
    color: var(--text-color);
}

.bagration-metric-col__value--neg {
    color: #e85d5d;
}

.bagration-metric-delta {
    font-size: 12px;
    font-weight: 600;
    color: #4caf7a;
    white-space: nowrap;
    margin-left: 2px;
}

.bagration-metric-card__highlight {
    font-size: var(--metric-value-font-size);
    font-weight: 700;
    line-height: 1.15;
    font-variant-numeric: tabular-nums;
    margin: 0 0 12px;
    color: var(--text-color);
}

.bagration-metric-card__footnote {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
    color: #4caf7a;
}

.bagration-metric-kv {
    margin: 0;
    padding: 0;
}

.bagration-metric-kv__row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.bagration-metric-kv__row:first-child {
    padding-top: 0;
}

.bagration-metric-kv__row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.bagration-metric-kv__key {
    font-size: 15px;
    color: var(--text-secondary);
    font-weight: 500;
    margin: 0;
    flex-shrink: 0;
}

.bagration-metric-kv__val {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
    text-align: right;
    max-width: min(58%, 320px);
    line-height: 1.45;
}

.bagration-metric-kv dt,
.bagration-metric-kv dd {
    margin: 0;
}

.bagration-after-insights {
    margin-top: 40px;
}

.bagration-figure__img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 16px;
    background-color: var(--card-bg);
}

.bagration-page .bagration-figure__img,
.vr-page .bagration-figure__img,
.sberpass-page .bagration-figure__img {
    background-color: transparent;
}

.bagration-figure__img--transparent {
    background-color: transparent;
}

.bagration-figure__img--clickable {
    cursor: pointer;
}

.bagration-figure__img--clickable:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

.bagration-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 48px 24px 24px;
    box-sizing: border-box;
    background-color: rgba(0, 0, 0, 0.94);
    cursor: pointer;
}

.bagration-lightbox--open {
    display: flex;
}

.bagration-lightbox__img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    cursor: default;
    border-radius: 4px;
}

.bagration-lightbox__close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.12);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.bagration-lightbox__close::before,
.bagration-lightbox__close::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 18px;
    height: 2px;
    margin: 0;
    background-color: #fff;
    border-radius: 1px;
}

.bagration-lightbox__close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.bagration-lightbox__close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.bagration-lightbox__close:hover {
    background-color: rgba(255, 255, 255, 0.22);
}

.bagration-panel--insights {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.bagration-insight:not(:first-child) {
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.bagration-insight__title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.35;
    text-align: left;
    margin: 0 0 12px;
    color: var(--text-color);
}

.bagration-page .bagration-insight .project-description,
.vr-page .bagration-insight .project-description,
.sberpass-page .bagration-insight .project-description {
    margin-bottom: 0;
}

.bagration-insight__line + .bagration-insight__line {
    margin-top: 12px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .back-link {
        padding: 12px 16px;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Кнопка fixed вверху справа; отступ шапки — под высоту кнопки */
    .project-header--bagration .back-link {
        position: fixed;
        top: max(12px, env(safe-area-inset-top, 0px));
        left: auto;
        right: max(20px, env(safe-area-inset-right, 0px));
        z-index: 200;
        max-width: none;
        width: fit-content;
    }

    .project-header--bagration .project-header__top {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }

    .project-header--bagration:has(.project-header__top .back-link) {
        padding-top: calc(max(12px, env(safe-area-inset-top, 0px)) + 52px);
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .contacts {
        padding-top: 40px;
    }

    .project-card__body {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .project-card__text {
        padding: 28px 24px 20px;
        gap: 24px;
    }

    .project-card__visual {
        padding: 0 var(--project-card-inset) var(--project-card-inset);
        order: 2;
    }

    .project-card__image-wrap {
        min-height: 200px;
    }

    .project-card__image {
        min-height: 200px;
    }

    .name {
        font-size: 28px;
    }

    .header-intro {
        gap: 12px 14px;
        margin-bottom: 14px;
    }

    .company-logo {
        max-width: min(165px, 60vw);
    }

    .profession {
        font-size: 20px;
    }

    .description-block {
        font-size: 16px;
    }

    .photo-container {
        width: 75px;
        height: 75px;
    }

    .project-image-header {
        height: 250px;
    }

    .project-header .project-title {
        font-size: 32px;
    }

    .project-description {
        font-size: 18px;
    }

    .bagration-page .project-context-title,
    .vr-page .project-context-title,
    .sberpass-page .project-context-title {
        font-size: 26px;
    }

    .bagration-page .project-description,
    .vr-page .project-description,
    .sberpass-page .project-description {
        font-size: 16px;
    }

    .sberpass-page .sberpass-research-points__text {
        font-size: 16px;
    }

    .bagration-panel {
        margin-top: 32px;
        padding: 24px 20px;
        border-radius: 16px;
    }

    .bagration-panel__title {
        font-size: 20px;
        margin-bottom: 10px;
    }

    .bagration-discovery {
        margin-top: 36px;
    }

    .bagration-jtbd-table-wrap {
        margin-top: 20px;
        border-radius: 12px;
    }

    .bagration-jtbd-table {
        font-size: 13px;
        min-width: 640px;
    }

    .bagration-jtbd-table thead th,
    .bagration-jtbd-table tbody td {
        padding: 12px 10px;
    }

    .bagration-mockups {
        margin-top: 40px;
    }

    .bagration-mockups__item + .bagration-mockups__item {
        margin-top: 32px;
    }

    .bagration-mockups__lead {
        font-size: 16px;
        margin-bottom: 8px;
    }

    .bagration-metrics {
        margin-top: 40px;
    }

    .bagration-metrics__grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 20px;
    }

    .vr-metrics {
        margin-top: 40px;
    }

    .vr-metrics__grid {
        grid-template-columns: 1fr;
        margin-top: 20px;
    }

    .vr-metric-session-cols {
        grid-template-columns: 1fr;
        --vr-session-value-size: clamp(12px, 3.2vw, 16px);
    }

    .vr-metric-session-period {
        padding-left: 0;
        padding-right: 0;
    }

    .vr-metric-session-period:not(:first-child) {
        border-left: none;
        padding-left: 0;
        border-top: 1px solid var(--border-color);
        padding-top: 16px;
        margin-top: 4px;
    }

    .bagration-metric-cols--4 {
        grid-template-columns: repeat(4, minmax(56px, 1fr));
        overflow-x: auto;
        padding-bottom: 6px;
        margin-inline: -4px;
        padding-inline: 4px;
        -webkit-overflow-scrolling: touch;
    }

    .bagration-metric-card {
        padding: 22px 20px;
    }

    .bagration-metric-cols--5 {
        grid-template-columns: repeat(5, minmax(56px, 1fr));
        overflow-x: auto;
        padding-bottom: 6px;
        margin-inline: -4px;
        padding-inline: 4px;
        -webkit-overflow-scrolling: touch;
    }

    .bagration-metric-kv__val {
        max-width: 65%;
    }

    .bagration-figure-row {
        gap: 12px;
        margin-top: 20px;
    }

    .bagration-figure__img {
        border-radius: 12px;
    }

    .bagration-panel--insights {
        margin-top: 32px;
    }

    .sberpass-split {
        grid-template-columns: 1fr;
        gap: 16px;
        margin: 32px 0;
    }

    .sberpass-page .sberpass-flow-list {
        font-size: 16px;
    }

    .sberpass-page .sberpass-hero-figure {
        margin-bottom: 28px;
    }

    .bagration-after-insights {
        margin-top: 32px;
    }
}
