/* Общий первый экран страниц портала (/about, /expert), по образцу /metall_b2b. Решение 027. */
.phx {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: #09090b;
  color: #fff;
  padding-top: var(--site-header-offset);
}

.page-shell:has(> main > section.phx:first-child) { padding-top: 0; }

.phx__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: var(--phx-bg) center 45% / cover no-repeat;
  filter: grayscale(0.75) contrast(1.05) brightness(0.72);
}

.phx::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(9, 9, 11, 0.94) 0%, rgba(9, 9, 11, 0.8) 42%, rgba(9, 9, 11, 0.45) 72%, rgba(9, 9, 11, 0.6) 100%),
    linear-gradient(180deg, rgba(9, 9, 11, 0.35) 0%, rgba(9, 9, 11, 0) 30%, rgba(9, 9, 11, 0.88) 100%);
}

.phx__inner {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  padding: 64px 32px 56px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 48px;
  align-items: center;
  min-height: 600px;
}

.phx--solo .phx__inner { grid-template-columns: minmax(0, 1fr); }
.phx--solo .phx__copy { max-width: 720px; }

.phx__copy { position: relative; z-index: 2; max-width: 640px; }

.phx__kicker {
  display: flex; align-items: center; gap: 14px;
  margin: 0 0 18px;
  color: #d4d4d8; font-size: 15px; font-weight: 100; letter-spacing: 0.04em; text-transform: uppercase;
}
.phx__kicker::before { content: ""; width: 48px; height: 2px; background: #e21e23; }

.phx__title {
  margin: 0;
  font-family: var(--font-ui);
  font-size: clamp(2.5rem, 4.4vw, 58px);
  line-height: 1.08; font-weight: 300; letter-spacing: 0.01em; text-transform: uppercase; color: #fff;
}
.phx__title span { display: block; color: #e21e23; }

.phx__lead { margin: 22px 0 0; max-width: 600px; color: #d4d4d8; font-size: 18px; line-height: 1.5; }

.phx__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }

.phx__proofs {
  display: grid; grid-template-columns: repeat(var(--phx-cols, 3), minmax(0, 1fr)); gap: 20px;
  margin-top: 40px; padding-top: 26px; border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.phx__proof { display: flex; align-items: center; gap: 12px; }
.phx__proof img { flex: 0 0 48px; width: 48px; height: 48px; object-fit: contain; }
.phx__proof strong { display: block; color: #fff; font-family: var(--font-ui); font-size: 20px; line-height: 1.1; font-weight: 700; white-space: nowrap; }
.phx__proof span { display: block; margin-top: 3px; color: #a1a1aa; font-size: 13px; line-height: 1.3; }

/* Превью видео в первом экране /expert */
.phx-video {
  position: relative; display: block; width: 100%;
  aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden;
  background: #000; border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
  cursor: pointer; padding: 0;
}
.phx-video img, .phx-video video { width: 100%; height: 100%; object-fit: cover; display: block; }
.phx-video__play {
  position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px;
  border-radius: 50%; background: #e21e23; box-shadow: 0 0 0 10px rgba(226, 30, 35, 0.22);
  transition: transform 0.2s ease;
}
.phx-video__play::after {
  content: ""; position: absolute; left: 31px; top: 24px;
  border-left: 22px solid #fff; border-top: 14px solid transparent; border-bottom: 14px solid transparent;
}
.phx-video:hover .phx-video__play { transform: scale(1.06); }
.phx-video__cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 18px 14px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.8));
  color: #fff; font-size: 14px; text-align: left;
}
.phx-video__cap b { color: #e21e23; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; font-size: 12px; margin-right: 8px; }
.phx-video.is-playing .phx-video__play, .phx-video.is-playing .phx-video__cap { display: none; }

@media (max-width: 1100px) {
  .phx__inner { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: 44px; min-height: 0; }
  .phx__copy { max-width: none; }
  .phx::before { background: linear-gradient(180deg, rgba(9, 9, 11, 0.7) 0%, rgba(9, 9, 11, 0.86) 50%, rgba(9, 9, 11, 0.95) 100%); }
  .phx__media { max-width: 640px; }
}

@media (max-width: 640px) {
  .phx__inner { padding: 28px 16px 40px; }
  .phx__kicker { font-size: 13px; }
  .phx__kicker::before { width: 28px; }
  .phx__title { font-size: 30px; }
  .phx__lead { font-size: 16px; }
  .phx__actions .prealux-btn, .phx__actions .prealux-btn-outline { width: 100%; }
  .phx__proofs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; margin-top: 28px; }
  .phx__proof img { flex-basis: 36px; width: 36px; height: 36px; }
  .phx__proof strong { font-size: 17px; }
  .phx-video__play { width: 60px; height: 60px; margin: -30px 0 0 -30px; }
  .phx-video__play::after { left: 24px; top: 18px; border-left-width: 18px; border-top-width: 12px; border-bottom-width: 12px; }
}

@media (max-width: 400px) { .phx__title { font-size: 26px; letter-spacing: 0; } }

/* /about: логотипы объектов в блоке документов */
.phx-logos { margin-top: 40px; }
.phx-logos__title { margin: 0 0 14px; color: #6b727b; font: 700 12px/1.2 ProximaNova, Arial, sans-serif; letter-spacing: 0.08em; text-transform: uppercase; }
.phx-logos__row { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.phx-logos__row li { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 92px; padding: 12px 14px; background: #fff; border: 1px solid #e4e4e7; }
.phx-logos__row span { color: #6b727b; font: 700 10px/1 ProximaNova, Arial, sans-serif; letter-spacing: 0.1em; text-transform: uppercase; }
.phx-logos__row img { max-width: 120px; max-height: 34px; width: auto; height: auto; object-fit: contain; }
@media (max-width: 1023px) { .phx-logos__row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 480px) {
  .phx-logos__row { gap: 6px; }
  .phx-logos__row li { min-height: 68px; padding: 10px 8px; gap: 6px; }
  .phx-logos__row img { max-width: 88px; max-height: 24px; }
}

/* /expert: одна ровная галерея */
.phx-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 32px; }
.phx-gallery figure { margin: 0; aspect-ratio: 5 / 4; overflow: hidden; border-radius: 10px; background: #e4e4e7; }
.phx-gallery img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }
.phx-gallery figure:hover img { transform: scale(1.03); }
@media (max-width: 640px) { .phx-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } }

/* Вариант с открытым фото справа (страница без отдельной картинки) */
.phx--photo .phx__bg { filter: grayscale(0.45) contrast(1.05) brightness(0.78); }
.phx--photo::before {
  background:
    linear-gradient(90deg, rgba(9, 9, 11, 0.95) 0%, rgba(9, 9, 11, 0.82) 38%, rgba(9, 9, 11, 0.32) 68%, rgba(9, 9, 11, 0.22) 100%),
    linear-gradient(180deg, rgba(9, 9, 11, 0.4) 0%, rgba(9, 9, 11, 0) 28%, rgba(9, 9, 11, 0.85) 100%);
}
@media (max-width: 1100px) {
  .phx--photo::before { background: linear-gradient(180deg, rgba(9, 9, 11, 0.62) 0%, rgba(9, 9, 11, 0.84) 50%, rgba(9, 9, 11, 0.95) 100%); }
}

/* /expert: пункты интервью сеткой после переноса видео в первый экран */
.expert-interview-layout.is-points-only { display: block; }
.expert-interview-layout.is-points-only .expert-interview-points { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.expert-interview-layout.is-points-only .expert-interview-points > .interview-point { grid-column: auto; width: auto; max-width: none; }
@media (max-width: 1023px) { .expert-interview-layout.is-points-only .expert-interview-points { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .expert-interview-layout.is-points-only .expert-interview-points { grid-template-columns: minmax(0, 1fr); } }

/* /about: шесть направлений, как на главной, и цифры под ними */
.phx-dirs { display: grid; gap: 22px; }
.phx-dirs__list { display: grid; gap: 10px; color: #d4d4d8; }
.phx-dirs__list .hero-direction-row { background-color: rgba(9, 9, 11, 0.45); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.phx-dirs__proofs { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.phx-dirs__proofs .home-proof-icon { width: 52px; height: 52px; flex-basis: 52px; }
.phx-dirs__proofs .home-proof-value { font-size: 20px; }
.phx-dirs__proofs .home-proof-label { font-size: 12px; margin-top: 6px; }
@media (max-width: 1100px) { .phx-dirs { max-width: none; } }
@media (max-width: 639px) {
  .phx-dirs__proofs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; }
  .phx-dirs__proofs .home-proof-item, .phx-dirs__proofs .home-proof-item:first-child, .phx-dirs__proofs .home-proof-item:last-child { gap: 10px; padding: 10px 0; }
  .phx-dirs__proofs .home-proof-icon { width: 40px; height: 40px; flex-basis: 40px; }
  .phx-dirs__proofs .home-proof-value { font-size: 17px; }
  .phx-dirs__proofs .home-proof-label { font-size: 12px; margin-top: 3px; }
  .phx-dirs__proofs .home-proof-label span { white-space: normal; }
}
@media (min-width: 640px) and (max-width: 1100px) {
  .phx__media.phx-dirs { max-width: none; }
  .phx-dirs__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* /blog: хлебные крошки и три темы статей в первом экране */
.phx__crumbs { display: flex; flex-wrap: wrap; gap: 6px 10px; margin: 0 0 22px; color: #a1a1aa; font-size: 14px; }
.phx__crumbs a { color: #a1a1aa; text-decoration: none; transition: color 0.2s ease; }
.phx__crumbs a:hover { color: #fff; }
.phx__crumbs span:last-child { color: #e4e4e7; }
.phx--blog .phx__bg { background-position: center 40%; }
.phx-topics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 36px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.phx-topics b { display: block; margin-bottom: 6px; color: #e21e23; font: 700 12px/1.2 ProximaNova, Arial, sans-serif; letter-spacing: 0.1em; text-transform: uppercase; }
.phx-topics span { display: block; color: #d4d4d8; font-size: 14px; line-height: 1.4; }
.phx--blog .phx__inner { min-height: 540px; }
@media (max-width: 640px) {
  .phx__crumbs { font-size: 13px; margin-bottom: 16px; }
  .phx-topics { grid-template-columns: minmax(0, 1fr); gap: 14px; margin-top: 28px; }
  .phx--blog .phx__inner { min-height: 0; }
}

/* Главная: два пункта с красными метками вместо абзаца */
.phx__points { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 10px; max-width: 600px; color: #d4d4d8; font-size: 18px; line-height: 1.5; }
.phx__points li { position: relative; padding-left: 22px; }
.phx__points li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 8px; height: 8px; border-radius: 50%; background: #e21e23; }
@media (max-width: 640px) { .phx__points { font-size: 16px; } }

/* Направления справа: одна ширина колонки на главной и /about, верх списка на уровне надзаголовка */
@media (min-width: 1101px) {
  .phx__inner:has(> .phx-dirs) { align-items: start; grid-template-columns: minmax(0, 1fr) 496px; gap: 64px; }
  .phx-dirs { width: 496px; justify-self: end; }
}
.phx-dirs__proofs--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 639px) { .phx-dirs__proofs--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .phx-dirs__proofs--3 .home-proof-item { flex-direction: column !important; text-align: center !important; } }
/* Главная собрана без .page-shell: отступ под шапку задаём сами */
.phx--home { padding-top: 79px; }
@media (min-width: 1101px) { .phx--home { padding-top: 61px; } }
.phx__points, .phx__points li { font-weight: 400; text-transform: none; letter-spacing: 0; }

/* /projects: три объекта справа в первом экране */
.phx-mosaic { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.phx-mosaic a { position: relative; display: block; overflow: hidden; border-radius: 10px; aspect-ratio: 4 / 3; background: #18181b; border: 1px solid rgba(255, 255, 255, 0.12); }
.phx-mosaic a.phx-mosaic__lead { grid-column: 1 / -1; aspect-ratio: 16 / 9; box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45); }
.phx-mosaic img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }
.phx-mosaic a:hover img { transform: scale(1.03); }
.phx-mosaic span { position: absolute; left: 0; right: 0; bottom: 0; padding: 24px 14px 10px; background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.78)); color: #fff; font: 700 12px/1.2 ProximaNova, Arial, sans-serif; letter-spacing: 0.08em; text-transform: uppercase; }
@media (max-width: 640px) { .phx-mosaic { gap: 8px; } .phx-mosaic span { font-size: 11px; padding: 18px 10px 8px; } }
@media (min-width: 1101px) { .phx__inner:has(> .phx__media:not(.phx-dirs)) { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); } }
