/* ========== Home page (v2 Engineering Dark) ========== */

/* ---------- Hero ---------- */
.v2-hero {
    padding: 60px var(--v2-pad) 80px;
    background: radial-gradient(ellipse at 80% 20%, rgba(255,122,26,0.06) 0%, transparent 60%), var(--v2-bg);
    border-bottom: 1px solid var(--v2-border);
}
.v2-hero__tag {
    display: flex; gap: 24px; align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}
.v2-hero__split {
    align-items: center;
}
.v2-hero__ctas {
    display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px;
}
.v2-hero__visual {
    aspect-ratio: 3/2;
    background: var(--v2-bg-elev);
    border: 1px solid var(--v2-border-md);
    display: flex; flex-direction: column;
    overflow: hidden;
}
.v2-hero__visual-head {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 14px; border-bottom: 1px solid var(--v2-border);
}
.v2-hero__diagram { flex: 1; position: relative; }
.v2-hero__diagram svg { width: 100%; height: 100%; display: block; }
.v2-hero__diagram [data-node]:focus { outline: 1px dashed var(--v2-accent); outline-offset: 2px; }

/* HUD metrics band */
.v2-hud {
    margin-top: 50px;
    border: 1px solid var(--v2-border-md);
    background: var(--v2-bg-elev);
}
.v2-hud__head {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 22px; border-bottom: 1px solid var(--v2-border);
}
.v2-hud__row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    background: var(--v2-border);
    gap: 1px;
}
.v2-hud__cell {
    background: var(--v2-bg-elev);
    padding: 22px 24px 20px;
    display: flex; flex-direction: column; gap: 8px;
    min-height: 120px;
}
.v2-hud__num {
    font-family: var(--v2-f-head);
    font-size: 38px; font-weight: 500; letter-spacing: -1.2px; line-height: 1;
    color: var(--v2-text);
}
.v2-hud__num span { font-size: 18px; color: var(--v2-muted); margin-left: 2px; }
.v2-hud__cell .v2-spark { width: 100%; height: 26px; margin-top: auto; }

@media (max-width: 1100px) {
    .v2-hud__row { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 700px) {
    .v2-hud__row { grid-template-columns: repeat(2, 1fr); }
    .v2-hud__row > .v2-hud__cell:last-child { grid-column: 1 / -1; }
    .v2-hero__tag { gap: 10px; font-size: 10px; }
    .v2-hud__num { font-size: 30px; }
}

/* ---------- About ---------- */
.v2-about__download { margin-top: 24px; }
.v2-about__cards { margin-top: 0; }
.v2-about__card {
    display: grid;
    grid-template-columns: 60px 1fr 160px;
    align-items: center;
    gap: 24px;
    padding: 24px 28px;
}
.v2-about__card .v2-mono { align-self: flex-start; }
.v2-about__card .v2-h3 { margin-bottom: 6px; }
@media (max-width: 700px) {
    .v2-about__card { grid-template-columns: 1fr; gap: 8px; padding: 20px 22px; }
}

/* ---------- Services ---------- */
.v2-services__card {
    padding: 32px;
    display: flex; flex-direction: column; gap: 14px;
    transition: background 0.2s;
}
.v2-services__card:hover { background: var(--v2-bg-hover); }
.v2-services__head { display: flex; gap: 12px; align-items: baseline; }
.v2-services__list {
    display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; margin-top: 6px;
}
.v2-services__list li {
    display: flex; gap: 8px; align-items: baseline;
    font-size: 13px; color: var(--v2-muted);
}
.v2-services__more {
    margin-top: auto;
    padding-top: 16px; border-top: 1px solid var(--v2-border);
    font-family: var(--v2-f-mono); font-size: 11px; letter-spacing: 1px;
    text-transform: uppercase; color: var(--v2-accent);
}

/* ---------- Process ---------- */
.v2-process__wrap { position: relative; }
.v2-process__line {
    position: absolute; top: 34px; left: 28px; right: 28px;
    height: 1px; background: var(--v2-accent); opacity: 0.2; z-index: 1;
}
.v2-process__grid { position: relative; z-index: 2; }
.v2-process__step {
    padding: 28px 28px 24px;
    position: relative;
}
.v2-process__dot {
    position: absolute; top: 28px; left: 24px;
    color: var(--v2-accent); background: var(--v2-bg-card); padding: 0 4px;
    font-size: 9px;
}
.v2-process__meta {
    display: flex; gap: 12px; padding-left: 24px; margin-bottom: 10px;
}
.v2-process__step .v2-h3 { margin: 4px 0 6px; padding-left: 24px; }
.v2-process__step .v2-para-dim { padding-left: 24px; }

@media (max-width: 900px) {
    .v2-process__line { display: none; }
}

/* ---------- Projects ---------- */
.v2-projects__grid {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: minmax(220px, auto);
}
.v2-projects__card {
    display: flex; flex-direction: column;
    overflow: hidden;
    transition: background 0.2s;
}
.v2-projects__card:hover { background: var(--v2-bg-hover); color: inherit; }
.v2-projects__card:hover img { transform: scale(1.04); }
.v2-projects__card--featured {
    grid-column: span 2; grid-row: span 2;
}
.v2-projects__media { position: relative; aspect-ratio: 4/3; overflow: hidden; background: #111; }
.v2-projects__card--featured .v2-projects__media { aspect-ratio: 16/9; }
.v2-projects__media img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.35s ease;
}
.v2-projects__badge {
    position: absolute; top: 14px; left: 14px;
    padding: 4px 8px; background: var(--v2-accent); color: #111;
    font-family: var(--v2-f-mono); font-size: 10px; letter-spacing: 1px; font-weight: 600;
}
.v2-projects__year {
    position: absolute; top: 14px; right: 14px;
    padding: 4px 8px; background: rgba(0,0,0,0.5); color: var(--v2-text);
    font-family: var(--v2-f-mono); font-size: 10px; letter-spacing: 1px;
}
.v2-projects__body {
    padding: 22px 24px 24px;
    display: flex; flex-direction: column; gap: 10px;
    flex: 1;
}
.v2-projects__meta { display: flex; gap: 12px; align-items: baseline; }
.v2-projects__title { margin-top: 2px; }
.v2-projects__card--featured .v2-projects__title { font-size: 28px; }
.v2-projects__cta {
    margin-top: auto; padding-top: 14px; border-top: 1px solid var(--v2-border);
    font-family: var(--v2-f-mono); font-size: 11px; letter-spacing: 1px; text-transform: uppercase;
    color: var(--v2-accent);
}

@media (max-width: 900px) {
    .v2-projects__grid { grid-template-columns: 1fr; }
    .v2-projects__card--featured { grid-column: auto; grid-row: auto; }
}

/* Desktop: keep pre-mobile behaviour where CTA only shows on featured
   cards. The fragment now always renders .v2-projects__cta (so the
   mobile overlay has its CTA strip), so we hide it for non-featured
   cards above the mobile breakpoint. */
@media (min-width: 641px) {
    .v2-projects__card:not(.v2-projects__card--featured) .v2-projects__cta { display: none; }
}

/* ---------- Testimonials ---------- */
.v2-tm__card {
    padding: 32px 30px 26px;
    display: flex; flex-direction: column; gap: 16px;
    margin: 0;
}
.v2-tm__mark {
    font-family: var(--v2-f-head); font-size: 40px; line-height: 1; color: var(--v2-accent);
}
.v2-tm__quote { font-size: 17px; line-height: 1.55; color: var(--v2-text-body); margin: 0; flex: 1; }
.v2-tm__foot {
    margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--v2-border);
    display: flex; justify-content: space-between; align-items: flex-end; gap: 10px;
}
.v2-tm__name { font-size: 14px; color: var(--v2-text); font-weight: 500; }
.v2-tm__foot-right { text-align: right; display: flex; flex-direction: column; gap: 4px; }

/* ---------- Team ----------
   Стиль карточек команды — единый ритм с .v2-partners__card:
   собственный --v2-bg-card, 8px радиус, gap между ячейками вместо
   grid-bleed 1px. Текст слева (а не center) — каждая карточка
   читается как профиль, не плакат. Skills чипы + LinkedIn-иконка
   в углу подсвечивают данные из БД, которые раньше не рендерились. */
.v2-team__grid {
    gap: 16px;
    background: transparent;
    border: 0;
}

.v2-team__card {
    display: flex; flex-direction: column;
    background: var(--v2-bg-card);
    border-radius: 8px;
    padding: 24px;
    position: relative;
    cursor: pointer;
    transition: background 200ms ease, transform 200ms ease, box-shadow 200ms ease;
}
.v2-team__card:hover {
    background: var(--v2-bg-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.35);
    z-index: 2;
}
.v2-team__card:focus-visible {
    outline: 2px solid var(--v2-accent);
    outline-offset: 3px;
}

.v2-team__photo {
    /* Compact 1:1 portrait — photos are pre-cropped in the admin via Cropper.js */
    aspect-ratio: 1/1;
    width: 100%;
    max-width: 240px;
    margin: 0 auto 18px;
    background: #151515;
    overflow: hidden;
    border-radius: 6px;
    transition: box-shadow 250ms ease;
}
.v2-team__card:hover .v2-team__photo {
    box-shadow: 0 0 0 2px rgba(255,122,26,0.3);
}
.v2-team__photo img {
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: center center;
    background: #151515;
    filter: grayscale(0.15) contrast(1.05);
    transition: transform 0.45s ease, filter 0.35s ease;
}
.v2-team__card:hover img {
    transform: scale(1.04);
    filter: grayscale(0) contrast(1.05);
}

.v2-team__body {
    display: flex; flex-direction: column; gap: 8px;
    text-align: center;
}
.v2-team__meta {
    display: flex; gap: 10px; align-items: baseline;
    justify-content: center;
    margin-bottom: 4px;
}
.v2-team__name {
    font-family: var(--v2-f-head);
    font-size: 19px;
    font-weight: 500;
    color: var(--v2-text);
    letter-spacing: -0.3px;
    line-height: 1.2;
}
.v2-team__role {
    font-size: 13px;
    color: var(--v2-muted);
    line-height: 1.4;
}

/* Skill-chips — компактные капсулы под должностью */
.v2-team__skills {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.v2-team__chip {
    font-family: var(--v2-f-mono);
    font-size: 10.5px;
    letter-spacing: 0.5px;
    padding: 4px 9px;
    background: rgba(255, 122, 26, 0.08);
    color: var(--v2-text-lead);
    border: 1px solid rgba(255, 122, 26, 0.15);
    border-radius: 3px;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* LinkedIn icon — в правом верхнем углу */
.v2-team__linkedin {
    position: absolute;
    top: 14px; right: 14px;
    width: 32px; height: 32px;
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--v2-muted-deep);
    background: rgba(0,0,0,0.3);
    border-radius: 50%;
    backdrop-filter: blur(4px);
    transition: color 200ms, background 200ms, transform 200ms;
    z-index: 3;
}
.v2-team__linkedin:hover {
    color: #0a66c2;
    background: rgba(255,255,255,0.08);
    transform: scale(1.1);
}

/* ---------- Partners ----------
   Минималистичный стиль в одном духе с .v2-team__card: тот же
   --v2-bg-card, без outline. Чёткое визуальное разделение даёт
   увеличенный grid gap (16px) и border-radius (как у team-photo).
   Hover слегка поднимает карточку и подсвечивает. */
.v2-partners__grid {
    gap: 16px;
    background: transparent;
    border: 0;
}

.v2-partners__card {
    display: flex; flex-direction: column; gap: 20px;
    padding: 28px 24px;
    position: relative;
    background: var(--v2-bg-card);
    border-radius: 8px;
    transition: transform 200ms ease, background 200ms ease, box-shadow 200ms ease;
    text-decoration: none;
}
.v2-partners__card.v2-partners__card--link { cursor: pointer; }

/* Стрелочка ↗ в правом верхнем углу для линкабельных карточек —
   слабая в default, оранжевая и сдвигается при hover. */
.v2-partners__card.v2-partners__card--link::after {
    content: '↗';
    position: absolute; top: 18px; right: 20px;
    font-family: var(--v2-f-mono); font-size: 16px;
    color: var(--v2-muted);
    opacity: 0.4;
    transition: opacity 200ms, color 200ms, transform 200ms;
}
.v2-partners__card.v2-partners__card--link:hover {
    background: var(--v2-bg-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.35);
    z-index: 2;
}
.v2-partners__card.v2-partners__card--link:hover::after {
    color: var(--v2-accent);
    opacity: 1;
    transform: translate(2px, -2px);
}

.v2-partners__logo {
    height: 72px;
    display: flex; align-items: center; justify-content: center;
    padding: 0 12px;
}
.v2-partners__logo img {
    max-height: 100%;
    max-width: 80%;
    filter: brightness(0) invert(1) opacity(0.7);
    transition: filter 200ms, opacity 200ms;
}
.v2-partners__card:hover .v2-partners__logo img {
    filter: brightness(0) invert(1) opacity(1);
}
.v2-partners__info {
    padding-top: 16px;
    border-top: 1px solid var(--v2-border);
    display: flex; flex-direction: column; gap: 6px;
}
.v2-partners__info > .v2-mono-accent {
    font-size: 11px;
    letter-spacing: 1.5px;
}
.v2-partners__name {
    font-size: 16px; font-weight: 500;
    color: var(--v2-text);
    letter-spacing: -0.2px;
    margin-top: 2px;
}
.v2-partners__info > [data-partner-desc] {
    font-size: 11px;
    letter-spacing: 1px;
    color: var(--v2-muted);
    text-transform: uppercase;
    line-height: 1.5;
}

/* ---------- FAQ ---------- */
.v2-faq__list { max-width: 960px; border-top: 1px solid var(--v2-border); }
.v2-faq__item { border-bottom: 1px solid var(--v2-border); }
.v2-faq__q {
    width: 100%; display: grid; grid-template-columns: 60px 1fr 30px;
    align-items: center; gap: 18px;
    padding: 24px 0;
    background: transparent; border: 0; color: var(--v2-text);
    text-align: left; cursor: pointer;
}
.v2-faq__q:hover .v2-faq__text { color: var(--v2-accent); }
.v2-faq__text { font-size: 18px; color: var(--v2-text); font-weight: 500; transition: color 0.15s; }
.v2-faq__plus {
    font-family: var(--v2-f-mono); font-size: 20px; color: var(--v2-accent);
    transition: transform 0.25s ease;
}
.v2-faq__item.is-open .v2-faq__plus { transform: rotate(45deg); }
.v2-faq__a {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.v2-faq__a p { padding: 0 0 24px 78px; margin: 0; }

@media (max-width: 600px) {
    .v2-faq__q { grid-template-columns: 48px 1fr 24px; gap: 12px; }
    .v2-faq__text { font-size: 15px; }
    .v2-faq__a p { padding-left: 60px; padding-right: 8px; }
}

/* ---------- Contact ---------- */
.v2-contact__split { align-items: flex-start; }
.v2-contact__rows {
    display: flex; flex-direction: column; gap: 14px;
    border-top: 1px solid var(--v2-border);
    padding-top: 14px;
}
.v2-contact__row {
    display: grid; grid-template-columns: 70px 1fr;
    align-items: baseline; gap: 16px;
    padding-bottom: 14px; border-bottom: 1px solid var(--v2-border);
}
.v2-contact__val {
    font-size: 17px; color: var(--v2-text); font-weight: 500;
}

/* Responsive small fixes */
@media (max-width: 900px) {
    .v2-hero { padding: 40px 20px 60px; }
    .v2-hero__visual { order: -1; }
    .v2-hud { margin-top: 30px; }
}
