/* «Исследования»: проверка возраста 18+, мозаика на первом экране, фильтр и сетка снимков, просмотр крупно */

/* 18+: до ответа страница под матовым слоем, снимки не грузятся */
/* матовый слой — на body::before, он есть с первой отрисовки, ещё до разметки окна в конце страницы */
html.age-gate body::before { content: ""; position: fixed; inset: 0; z-index: 9999; background: rgba(12, 13, 14, .72); -webkit-backdrop-filter: blur(24px) saturate(1.1); backdrop-filter: blur(24px) saturate(1.1); }
.agegate { position: fixed; inset: 0; z-index: 10000; display: none; align-items: center; justify-content: center; padding: 16px; overscroll-behavior: contain; }
html.age-gate .agegate { display: flex; }
html.age-gate, html.age-gate body { overflow: hidden; }
.agegate__box { width: min(560px, 100%); max-height: calc(100svh - 32px); overflow: auto; padding: clamp(26px, 4vw, 48px); border-radius: var(--radius); background: var(--white); color: var(--ink); box-shadow: 0 40px 120px -40px rgba(0, 0, 0, .7); }
.agegate__badge { display: inline-grid; place-items: center; width: 60px; height: 60px; border: 2px solid var(--red); border-radius: 50%; color: var(--red); font-size: 19px; font-weight: 600; letter-spacing: -.02em; }
.agegate__h { margin: 22px 0 0; font-size: clamp(28px, 3vw, 40px); font-weight: 300; line-height: 1.06; letter-spacing: -.03em; }
.agegate__p { margin: 16px 0 0; font-size: 17px; line-height: 1.55; color: var(--ink-2); }
.agegate__s { margin: 12px 0 0; font-size: 14px; line-height: 1.55; color: var(--ink-3); }
.agegate__act { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.agegate__act .btn { flex: 1 1 180px; }
.agegate .btn:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

/* первый экран: мозаика пар «до/после», появляется после ответа 18+ */
.phx--mosaic { background: #0b0c0d; }
.mo { overflow: hidden; }
.mo__grid { position: absolute; inset: -1% -1% auto; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; padding: 10px; transform: scale(1.06); transition: transform 2.6s var(--ease); }
.phx.is-in .mo__grid { transform: scale(1); }
.mo__t { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 14px; background: #17181a; }
.phx.phx--mosaic .phx__media .mo__t img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: none; opacity: 0; transition: opacity 1.2s var(--ease) var(--d, 0ms); }
.phx.phx--mosaic .phx__media .mo__t img.is-loaded { opacity: 1; }
.phx--mosaic .phx__shade { background: linear-gradient(90deg, rgba(10, 10, 10, .94) 0%, rgba(10, 10, 10, .86) 40%, rgba(10, 10, 10, .42) 70%, rgba(10, 10, 10, .18) 100%), linear-gradient(0deg, rgba(10, 10, 10, .92) 0%, rgba(10, 10, 10, 0) 42%), linear-gradient(180deg, rgba(10, 10, 10, .64) 0%, rgba(10, 10, 10, 0) 18%); }
.phx--mosaic .phx__lead b { font-weight: 500; color: #fff; }

/* методика: две таблицы рядом */
.rx-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 4vw, 64px); margin-top: clamp(40px, 6svh, 72px); }
.rx-tbl .label { margin-bottom: 8px; }
.rx-tbl .spec-table th { width: 38%; }
.rx-hand td span { display: block; margin-top: 4px; font-size: 13px; font-weight: 400; color: var(--ink-3); }
.rx-tbl .note { margin: 14px 0 0; font-size: 13px; line-height: 1.55; color: var(--ink-3); }
.nw { white-space: nowrap; }
.pg .steps3 li > span .nw { display: inline; margin: 0; max-width: none; opacity: 1; }

/* фильтр: на компьютере — над снимками, на телефоне — прилипает под меню раздела одной строкой */
.gx-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 26px; margin: clamp(28px, 4svh, 44px) 0 0; }
.gx-set { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.gx-set + .gx-set { padding-left: 26px; border-left: 1px solid var(--rule); }
.chip { display: inline-flex; align-items: baseline; gap: 6px; padding: 9px 14px; border: 1px solid var(--rule); border-radius: 999px; background: var(--white); color: var(--ink); font: 500 14px/1.1 "Manrope", system-ui, sans-serif; white-space: nowrap; cursor: pointer; transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease); }
.chip i { font-style: normal; font-weight: 400; font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--white); }
.chip[aria-pressed="true"] i { color: rgba(255, 255, 255, .6); }
.chip:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.gx-set > .chip:first-child:not([data-filter="all"]) { background: var(--paper); border-color: var(--paper); }
.gx-set > .chip:first-child:not([data-filter="all"]):hover { border-color: var(--ink); }
.gx-set > .chip:first-child[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); }

/* группа снимков */
.gx-g { padding-top: clamp(40px, 6svh, 72px); }
.gx-g[hidden] { display: none; }
.gx-g__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 32px; padding-bottom: 18px; border-bottom: 1px solid var(--rule); }
.gx-g__k { margin: 0; font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.gx-g__h { margin: 10px 0 0; font-size: clamp(26px, 2.6vw, 40px); font-weight: 300; line-height: 1.08; letter-spacing: -.03em; }
.gx-g__h i { font-style: normal; font-size: .5em; letter-spacing: 0; vertical-align: super; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.gx-g__facts { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; margin: 0; font-size: 14px; color: var(--ink-2); }
.gx-g__facts b { font-weight: 500; color: var(--ink); }
.gx-g__facts em { flex-basis: 100%; font-style: normal; font-size: 12px; color: var(--ink-3); }
.gx-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(20px, 2vw, 28px) clamp(12px, 1.4vw, 20px); margin-top: clamp(18px, 2.6svh, 28px); }
.gx-g__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; margin-top: 24px; }
.gx-more[hidden] { display: none; }

/* карточка: пара снимков и параметры */
.rc { margin: 0; min-width: 0; }
.rc[hidden] { display: none; }
.rc__open { position: relative; display: block; width: 100%; aspect-ratio: 1; padding: 0; overflow: hidden; border: 0; border-radius: 16px; background: var(--paper); cursor: zoom-in; }
.rc__open img { width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity .7s var(--ease), transform 1.2s var(--ease); }
.rc__open img.is-loaded { opacity: 1; }
.rc__open:hover img { transform: scale(1.035); }
.rc__open::after { content: ""; position: absolute; right: 10px; top: 10px; width: 34px; height: 34px; border-radius: 50%; background: rgba(14, 15, 16, .62) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.6'%3E%3Cpath d='M14 4h6v6M10 20H4v-6M20 4l-7 7M4 20l7-7'/%3E%3C/svg%3E") center / 16px no-repeat; opacity: 0; transition: opacity .3s var(--ease); }
.rc__open:hover::after, .rc__open:focus-visible::after { opacity: 1; }
.rc__open:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.rc__cap { padding: 12px 2px 0; font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.rc__k { display: block; font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.rc__cap b { display: block; margin-top: 5px; font-size: 15px; font-weight: 500; line-height: 1.35; color: var(--ink); }
.rc__cap b + span { display: block; margin-top: 3px; font-variant-numeric: tabular-nums; }

/* просмотр крупно */
.lb { position: fixed; inset: 0; width: 100%; height: 100%; max-width: 100%; max-height: 100%; margin: 0; padding: 0; border: 0; background: #0b0c0d; color: var(--white); overflow: hidden; }
.lb[open] { display: grid; grid-template-rows: minmax(0, 1fr) auto; }
.lb::backdrop { background: rgba(0, 0, 0, .7); }
.lb__stage { display: grid; place-items: center; min-height: 0; padding: 64px clamp(16px, 6vw, 96px) 12px; touch-action: pan-y; }
.lb__img { display: block; width: auto; height: auto; max-width: min(100%, 1000px); max-height: calc(100svh - 190px); object-fit: contain; border-radius: 12px; opacity: 0; transition: opacity .4s var(--ease); }
.lb__img.is-loaded { opacity: 1; }
.lb__bar { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 24px; padding: 14px clamp(16px, 6vw, 96px) max(20px, env(safe-area-inset-bottom)); }
.lb__cap { min-width: 0; font-size: 14px; line-height: 1.45; color: rgba(255, 255, 255, .66); }
.lb__k { display: block; font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .5); }
.lb__cap b { display: block; margin-top: 6px; font-size: clamp(17px, 1.5vw, 21px); font-weight: 500; color: var(--white); }
.lb__cap b + span { display: block; margin-top: 2px; }
.lb__nav { display: flex; align-items: center; gap: 10px; }
.lb__n { min-width: 64px; margin-right: 6px; font-size: 14px; text-align: right; color: rgba(255, 255, 255, .62); font-variant-numeric: tabular-nums; }
.lb__btn, .lb__close { display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 1px solid rgba(255, 255, 255, .28); border-radius: 50%; background: rgba(255, 255, 255, .06); color: var(--white); cursor: pointer; transition: background-color .3s var(--ease), border-color .3s var(--ease); }
.lb__btn:hover, .lb__close:hover { border-color: var(--white); background: rgba(255, 255, 255, .14); }
.lb__btn svg, .lb__close svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.lb__close { position: absolute; top: max(12px, env(safe-area-inset-top)); right: 12px; }
.lb :focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

/* важное */
.rx-warn { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(20px, 4vw, 64px); align-items: start; }
.rx-warn__body p { margin: 0; font-size: clamp(17px, 1.4vw, 21px); line-height: 1.55; color: var(--ink-2); }
.rx-warn__body p + p { margin-top: 14px; }
.rx-warn strong { font-weight: 500; color: var(--ink); }
.rx-p { margin: 18px 0 0; max-width: 46ch; font-size: 16px; line-height: 1.6; color: var(--ink-2); }

@media (prefers-reduced-motion: reduce) {
  .mo__grid { transform: none; transition: none; }
  .phx.phx--mosaic .phx__media .mo__t img, .rc__open img, .lb__img { transition: none; }
  .rc__open:hover img { transform: none; }
}
@media (max-width: 1099px) {
  .gx-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 899px) {
  .mo__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 8px; }
  .mo__t { border-radius: 10px; }
  .phx--mosaic .phx__shade { background: linear-gradient(0deg, rgba(10, 10, 10, .96) 0%, rgba(10, 10, 10, .86) 52%, rgba(10, 10, 10, .5) 78%, rgba(10, 10, 10, .62) 100%); }
  .rx-cols, .rx-warn { grid-template-columns: 1fr; }
  /* фильтр — одна прокручиваемая строка, страница вбок не едет */
  .gx-bar { position: sticky; top: var(--nav-h); z-index: 8; flex-wrap: nowrap; gap: 8px 18px; margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter)); padding: 10px var(--gutter); overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; background: rgba(255, 255, 255, .92); -webkit-backdrop-filter: saturate(1.6) blur(14px); backdrop-filter: saturate(1.6) blur(14px); box-shadow: 0 1px 0 var(--rule); }
  .gx-bar::-webkit-scrollbar { display: none; }
  .gx-set { flex-wrap: nowrap; }
  .gx-set + .gx-set { padding-left: 18px; }
  .lb__stage { padding: 60px 12px 8px; }
  .lb__img { max-height: calc(100svh - 230px); }
  .lb__bar { flex-direction: column; align-items: stretch; }
  .lb__nav { justify-content: space-between; }
  .lb__n { order: 2; text-align: center; margin: 0; }
  .lb__nav [data-lb-prev] { order: 1; }
  .lb__nav [data-lb-next] { order: 3; }
}
@media (max-width: 599px) {
  .gx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 10px; }
  .rc__open { border-radius: 12px; }
  .rc__cap { padding-top: 9px; font-size: 12px; }
  .rc__k { font-size: 10px; letter-spacing: .1em; }
  .rc__cap b { font-size: 13.5px; }
  .gx-g__facts { font-size: 13px; }
  .agegate__act .btn { flex-basis: 100%; }
}
