/* ==========================================================================
   Tokens
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
:root {
  --bg: #292929; --bg2: #404040; --fg: #cbcbcb; --ink: #f3f1ed; --line: rgba(203, 203, 203, .2);
  --serif: "DM Serif Display", "Times New Roman", serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --pad: clamp(20px, 3.4vw, 60px);
  --ease: cubic-bezier(.77, 0, .18, 1);
  --hdr-h: clamp(72px, 7vw, 104px);
  --footer-h: 76px;
  --avail: calc(100vh - var(--hdr-h) - var(--pad) - 6px);
}
@supports (height: 100dvh) { :root { --avail: calc(100dvh - var(--hdr-h) - var(--pad) - 6px); } }
.frame--last .split__media, .frame--last .block__media, .frame--last .item__media { height: min(70vh, calc(var(--avail) - var(--footer-h))); }
html { height: 100%; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; height: 100%; overflow: hidden; overscroll-behavior: none;
  background: var(--bg); color: var(--fg);
  font: 300 clamp(15px, 1.02vw, 17px)/1.65 var(--sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, p { margin: 0; }
h1, h2 { font-weight: 400; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 1px solid var(--ink); outline-offset: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 8px; top: -60px; z-index: 400; background: var(--ink); color: var(--bg); padding: .6rem 1rem; }
.skip:focus { top: 8px; }
.ph { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, var(--bg2), var(--bg)); }

/* ==========================================================================
   Cursor: тонкое полупрозрачное кольцо с инерцией
   ========================================================================== */
.cursor {
  position: fixed; left: 0; top: 0; z-index: 200; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid rgba(243, 241, 237, .3); pointer-events: none; opacity: 0; will-change: transform;
  transition: opacity .35s, width .35s var(--ease), height .35s var(--ease), background .35s, border-color .35s;
}
.cursor.is-on { opacity: 1; }
.cursor.is-link { width: 68px; height: 68px; background: rgba(243, 241, 237, .05); border-color: rgba(243, 241, 237, .45); }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* Переход между страницами */
.wipe { position: fixed; inset: 0; z-index: 300; background: var(--bg2); pointer-events: none; transform: translateY(-101%); }
html.js .wipe { animation: wipeOut .9s var(--ease) .05s both; }
html.leaving .wipe { animation: wipeIn .6s var(--ease) both; pointer-events: auto; }
@keyframes wipeOut { from { transform: translateY(0); } to { transform: translateY(-101%); } }
@keyframes wipeIn { from { transform: translateY(101%); } to { transform: translateY(0); } }

/* ==========================================================================
   Header, язык, гамбургер
   ========================================================================== */
.hdr {
  position: fixed; z-index: 120; inset: 0 0 auto 0; display: flex; justify-content: space-between; align-items: center;
  padding: clamp(14px, 2vw, 30px) var(--pad); pointer-events: none; mix-blend-mode: difference; color: #fff;
}
.hdr > *, .hdr a, .hdr button { pointer-events: auto; }
.hdr__logo { font: 400 clamp(1.3rem, 1.8vw, 1.9rem)/1 var(--serif); }
.hdr__right { display: flex; align-items: center; gap: clamp(14px, 2vw, 34px); }
.lang { display: flex; gap: 1.1rem; font-size: .8rem; letter-spacing: .06em; }
.lang a { opacity: .55; transition: opacity .3s; padding: .3rem 0; }
.lang a:hover, .lang a.is-current { opacity: 1; }
.lang a.is-current { border-bottom: 1px solid currentColor; }
.burger { position: relative; width: 52px; height: 52px; border: 1px solid rgba(255, 255, 255, .5); border-radius: 50%; }
.burger span { position: absolute; left: 16px; right: 16px; height: 1px; background: currentColor; transition: transform .6s var(--ease), top .6s var(--ease); }
.burger span:nth-child(1) { top: 22px; }
.burger span:nth-child(2) { top: 29px; }
html.menu-open .burger span:nth-child(1) { top: 25px; transform: rotate(25deg); }
html.menu-open .burger span:nth-child(2) { top: 25px; transform: rotate(-25deg); }

/* ==========================================================================
   Меню-оверлей (дубликат разделов)
   ========================================================================== */
.menu {
  position: fixed; inset: 0; z-index: 110; display: flex; flex-direction: column; justify-content: center;
  padding: calc(var(--hdr-h) + 1vh) var(--pad) var(--pad); background: var(--bg);
  visibility: hidden; clip-path: inset(0 0 100% 0); transition: clip-path .9s var(--ease), visibility 0s .9s;
}
html.menu-open .menu { visibility: visible; clip-path: inset(0); transition: clip-path .9s var(--ease); }
.menu__bg { position: absolute; inset: 0; overflow: hidden; }
.menu__bg i { position: absolute; inset: -4%; background-size: cover; background-position: center; opacity: 0; filter: brightness(.36); transition: opacity .8s; }
.menu__bg i.on { opacity: 1; }
.menu__list { position: relative; display: flex; flex-direction: column; align-items: flex-start; }
.menu__list a {
  display: inline-block; padding: .05em 0; font: 400 clamp(2rem, min(6.4vw, 8.8vh), 6.2rem)/1.06 var(--serif);
  color: var(--ink); opacity: .55; transition: opacity .35s;
}
.menu__list a.is-current { opacity: .9; }
.menu__list:hover a { opacity: .28; }
.menu__list a:hover { opacity: 1; }
.menu__foot { position: relative; display: flex; flex-wrap: wrap; gap: .5rem 2rem; margin-top: 4vh; font-size: .85rem; }
.menu__foot a { opacity: .7; }
.menu__foot a:hover { opacity: 1; }

/* ==========================================================================
   Frames: экраны с навигацией вверх/вниз
   ========================================================================== */
.frames { position: fixed; inset: 0; overflow: hidden; }
.track { height: 100%; transition: transform 1s var(--ease); will-change: transform; }
.frame { position: relative; height: 100%; overflow: hidden; }
.frame__scroll { height: 100%; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; display: flex; flex-direction: column; }
.frame__scroll::-webkit-scrollbar { display: none; }
.frame__body { position: relative; flex: 1 0 auto; display: flex; flex-direction: column; padding: var(--hdr-h) var(--pad) var(--pad); }
.frame__body > * { flex: 1 1 auto; }

.footer {
  flex: none; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .6rem 2rem;
  min-height: var(--footer-h); padding: 14px var(--pad); border-top: 1px solid var(--line); font-size: .8rem;
}
.footer__social { display: flex; gap: 1.4rem; }
.footer a { opacity: .75; transition: opacity .3s; }
.footer a:hover { opacity: 1; }

/* Пагинация фреймов */
.dots { position: fixed; z-index: 90; right: clamp(4px, 1vw, 18px); top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; }
.dots:empty { display: none; }
.dots button { position: relative; width: 26px; height: 26px; }
.dots button::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: var(--fg); opacity: .4; transition: inset .5s var(--ease), opacity .4s; }
.dots button.is-active::before { inset: 6px; opacity: 1; }
.dots button span { position: absolute; right: 30px; top: 50%; transform: translateY(-50%); white-space: nowrap; font-size: .75rem; color: var(--ink); opacity: 0; pointer-events: none; transition: opacity .3s; }
.dots button:hover span { opacity: 1; }

.scroll-hint {
  position: absolute; left: 50%; bottom: clamp(14px, 2.4vw, 34px); z-index: 4; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: .55rem; font-size: .75rem; opacity: .75;
}
.scroll-hint span { position: relative; width: 1px; height: 40px; background: rgba(203, 203, 203, .25); overflow: hidden; }
.scroll-hint span::after { content: ""; position: absolute; left: 0; top: -100%; width: 1px; height: 100%; background: var(--ink); animation: hint 2.2s var(--ease) infinite; }
@keyframes hint { 0% { top: -100%; } 60%, 100% { top: 100%; } }

/* ==========================================================================
   Hero: скроллер-меню разделов
   ========================================================================== */
.frame--hero .frame__body { padding: 0; }
.hero { position: relative; height: 100%; min-height: 480px; overflow: hidden; }
.hero__stage { position: absolute; inset: 0; }
.slide {
  position: absolute; inset: 0; display: grid; place-items: center; visibility: hidden; opacity: 0;
  transform: translate3d(calc(7vw * var(--dx)), 0, 0);
  transition: opacity .9s var(--ease), transform 1s var(--ease), visibility 0s 1s;
}
.slide.is-active { visibility: visible; opacity: 1; transform: none; transition: opacity .9s .1s var(--ease), transform 1s var(--ease), visibility 0s; }
.slide.is-leaving { visibility: visible; opacity: 0; transform: translate3d(calc(-7vw * var(--dx)), 0, 0); transition: opacity .7s var(--ease), transform 1s var(--ease), visibility 0s 1s; }
.slide__media { position: relative; display: block; height: min(68vh, 104vw); aspect-ratio: 4 / 5; perspective: 1200px; }
.slide__tilt { position: absolute; inset: 0; display: block; overflow: hidden; will-change: transform; background: var(--bg2); }
.slide__tilt img { width: 100%; height: 100%; object-fit: cover; }
.slide__title {
  position: absolute; left: 50%; top: 50%; width: 94vw; text-align: center; pointer-events: none; mix-blend-mode: difference; color: #fff;
  font: 400 clamp(2.8rem, 10.2vw, 11rem)/.98 var(--serif); letter-spacing: -.012em;
  transform: translate(-50%, -34%); opacity: 0; transition: transform 1s var(--ease), opacity .6s;
}
.slide__title > span { display: block; transform: skewX(var(--sk, 0deg)); }
.slide.is-active .slide__title { transform: translate(-50%, -50%); opacity: 1; transition: transform 1.1s .18s var(--ease), opacity .8s .18s; }

.hero__index { position: absolute; z-index: 5; left: var(--pad); top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: .55rem; }
.hero__index button { text-align: left; font-size: .85rem; opacity: .42; transition: opacity .3s, transform .6s var(--ease); }
.hero__index button:hover { opacity: 1; }
.hero__index button.is-active { opacity: 1; transform: translateX(12px); }
.hero__count { position: absolute; z-index: 5; left: calc(var(--pad) + 64px); bottom: clamp(24px, 3.2vw, 46px); font-size: .8rem; font-variant-numeric: tabular-nums; }
.arrow { position: absolute; z-index: 5; bottom: clamp(14px, 2.4vw, 34px); display: flex; align-items: center; gap: .8rem; padding: 8px; color: var(--ink); }
.arrow--prev { left: calc(var(--pad) - 8px); }
.arrow--next { right: calc(var(--pad) - 8px); }
.arrow__label { font-size: .8rem; opacity: .6; }

/* ==========================================================================
   Внутренняя страница: заголовок + меню, реагирующее на мышь
   ========================================================================== */
.frame--head .frame__body { display: grid; grid-template-columns: minmax(150px, 17vw) minmax(0, 1fr); padding-bottom: clamp(70px, 8vw, 120px); }
.frame--head .frame__body > * { flex: none; }
.side { grid-column: 1; align-self: center; }
.side ul { display: flex; flex-direction: column; gap: .3rem; align-items: flex-start; }
.side a { display: inline-block; padding: .2rem .4rem .2rem 0; font-size: .92rem; opacity: .5; transition: opacity .3s; }
.side a:hover, .side a.is-current { opacity: 1; }
.side a.is-current::before { content: ""; display: inline-block; width: 18px; height: 1px; margin-right: .6rem; vertical-align: middle; background: currentColor; }
.head { grid-column: 2; align-self: end; }
.head__title { font: 400 clamp(3rem, 10.4vw, 11rem)/.94 var(--serif); letter-spacing: -.015em; color: var(--ink); overflow-wrap: anywhere; }
.head__aside { display: flex; flex-wrap: wrap; gap: 1.2rem 5vw; margin-top: clamp(1.4rem, 3vh, 2.6rem); padding-top: 1.4rem; border-top: 1px solid var(--line); align-items: flex-start; }
.head__heading { flex: 0 1 18rem; font: 400 clamp(1.1rem, 1.5vw, 1.5rem)/1.3 var(--serif); color: var(--ink); }
.head__lead { flex: 1 1 22rem; max-width: 40ch; }
.now { flex: 0 1 18rem; }
.now__label { font-size: .8rem; opacity: .6; margin-bottom: .5rem; }
.now li + li { margin-top: .25rem; }
.now a { display: inline-block; color: var(--ink); border-bottom: 1px solid var(--line); transition: border-color .3s; }
.now a:hover { border-color: var(--ink); }

/* ==========================================================================
   Контентные фреймы
   ========================================================================== */
.about { display: flex; flex-direction: column; justify-content: center; gap: 1.6rem; }
.about__label { font-size: .9rem; opacity: .6; }
.about__lead { max-width: 24em; font: 400 clamp(1.8rem, 4.3vw, 4.7rem)/1.13 var(--serif); color: var(--ink); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 6vw; align-items: center; }
.split__media { justify-self: center; height: min(70vh, var(--avail)); max-width: 100%; aspect-ratio: 4 / 5; overflow: hidden; background: var(--bg2); }
.split__media img { width: 100%; height: 100%; object-fit: cover; }
.split__text { max-width: 44ch; font-size: clamp(1rem, 1.25vw, 1.25rem); }

.dirs { display: flex; flex-direction: column; justify-content: center; gap: 3vh; }
.dirs__title { font-size: .9rem; opacity: .6; }
.dirs__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(12px, 1.6vw, 28px); }
.dir { display: block; }
.dir__img { display: block; aspect-ratio: 4 / 5; max-height: 46vh; width: 100%; overflow: hidden; background: var(--bg2); }
.dir__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.dir:hover .dir__img img { transform: scale(1.05); }
.dir__t { display: block; margin-top: .9rem; font: 400 clamp(1.3rem, 2vw, 2rem)/1.1 var(--serif); color: var(--ink); }
.dir__s { display: block; margin-top: .3rem; font-size: .85rem; opacity: .6; }

.frame--visual .frame__body { padding: 0; overflow: hidden; }
.visual { position: absolute; inset: -3%; overflow: hidden; background: var(--bg2); }
.visual img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.7); }
.visual__cap { position: absolute; z-index: 2; left: var(--pad); bottom: var(--pad); max-width: 16em; font: 400 clamp(1.6rem, 3.6vw, 3.8rem)/1.1 var(--serif); color: var(--ink); }

.text { display: grid; grid-template-columns: minmax(140px, 18vw) minmax(0, 1fr); gap: 4vw; align-content: center; align-items: start; }
.text__label { font: 400 .95rem/1.4 var(--sans); opacity: .6; }
.prose p + p { margin-top: 1.1em; }
.prose a { border-bottom: 1px solid currentColor; }
.prose ul, .prose ol { padding-left: 1.2em; margin: 1em 0; list-style: revert; }
.prose--lg { max-width: 34em; color: var(--ink); font-size: clamp(1.15rem, 1.9vw, 1.9rem); line-height: 1.45; }

.block { display: grid; grid-template-columns: 1fr 1fr; gap: 6vw; align-items: center; }
.block--right .block__media { order: 2; }
.block--full { grid-template-columns: minmax(0, 52em); justify-content: center; }
.block__media { justify-self: center; height: min(68vh, var(--avail)); max-width: 100%; aspect-ratio: 4 / 5; overflow: hidden; background: var(--bg2); }
.block__media img { width: 100%; height: 100%; object-fit: cover; }
.block__title { margin-bottom: 1.2rem; font: 400 clamp(2rem, 4.4vw, 4.6rem)/1.05 var(--serif); color: var(--ink); }
.block__text { max-width: 40ch; }

.item { display: grid; grid-template-columns: 1fr 1fr; gap: 5vw; align-items: center; }
.item--right .item__media { order: 2; }
.item__media { justify-self: center; height: min(70vh, var(--avail)); max-width: 100%; aspect-ratio: 4 / 5; overflow: hidden; background: var(--bg2); }
.item__media img { width: 100%; height: 100%; object-fit: cover; }
.item__text { max-width: 40ch; }
.item__period { font-size: .9rem; opacity: .6; }
.item__title { margin: .3rem 0 .5rem; font: 400 clamp(2.2rem, 4.6vw, 5rem)/1.02 var(--serif); color: var(--ink); overflow-wrap: break-word; hyphens: auto; }
.item__sub { margin-bottom: 1.2rem; opacity: .8; }
.item__link { display: inline-block; margin-top: 1.4rem; border-bottom: 1px solid currentColor; }

/* Команда: шахматка фото / подпись */
.frame--team .frame__body { padding: var(--hdr-h) 0 0; }
.team { display: grid; grid-template-columns: repeat(2, 1fr); flex: none; }
.member { display: grid; grid-template-columns: 1fr 1fr; }
.member__photo, .member__info { aspect-ratio: 1; }
.member__photo { overflow: hidden; background: var(--bg2); }
.member__photo img { width: 100%; height: 100%; object-fit: cover; }
.member__info { display: flex; flex-direction: column; justify-content: flex-end; padding: clamp(14px, 2vw, 32px); background: var(--bg2); }
.member__name { font: 400 clamp(1.3rem, 2.2vw, 2.2rem)/1.1 var(--serif); color: var(--ink); }
.member__pos { margin-top: .4rem; font-size: .85rem; opacity: .7; }
.member.swap-d .member__photo { order: 2; }

.contact { display: grid; grid-template-columns: 1fr 1.4fr; grid-template-areas: "info list" "extra list"; gap: 2.4rem 6vw; align-content: center; }
.contact__info { grid-area: info; font-size: clamp(1.05rem, 1.5vw, 1.5rem); color: var(--ink); max-width: 30ch; }
.contact__extra { grid-area: extra; max-width: 40ch; font-size: .9rem; opacity: .75; align-self: end; }
.contact__list { grid-area: list; }
.contact__list a { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 1.3rem 0; border-bottom: 1px solid var(--line); }
.contact__list li:first-child a { border-top: 1px solid var(--line); }
.contact__list span { font-size: .85rem; opacity: .6; }
.contact__list b { font: 400 clamp(1.4rem, 3.4vw, 3.4rem)/1.1 var(--serif); color: var(--ink); text-align: right; overflow-wrap: anywhere; }

.portal { max-width: 44rem; margin: 0 auto; display: flex; flex-direction: column; justify-content: center; gap: 2rem; }
.portal__soon { font-size: .9rem; opacity: .6; }
.portal__form { display: grid; gap: 1rem; max-width: 26rem; opacity: .5; }
.portal__form label { display: grid; gap: .2rem; font-size: .8rem; }
.portal__form input { width: 100%; padding: .6rem 0; background: transparent; border: 0; border-bottom: 1px solid var(--line); color: inherit; font: inherit; }
.portal__form button { justify-self: start; margin-top: .5rem; padding: .7rem 1.7rem; border: 1px solid var(--line); border-radius: 99px; cursor: not-allowed; }

.legal { max-width: 46rem; margin: 0 auto; padding-top: 2rem; }
.legal__title { margin-bottom: 2rem; font: 400 clamp(2rem, 5vw, 4.5rem)/1.05 var(--serif); color: var(--ink); overflow-wrap: anywhere; }

/* ==========================================================================
   Адаптив
   ========================================================================== */
@media (max-width: 1100px) {
  .dirs__grid { grid-template-columns: repeat(2, 1fr); }
  .dir__img { max-height: 34vh; }
}
@media (max-width: 900px) {
  .side, .hero__index { display: none; }
  .frame--head .frame__body { grid-template-columns: minmax(0, 1fr); }
  .head { grid-column: 1; }
  .head__title { font-size: clamp(2.8rem, 15vw, 6rem); }
  .split, .block, .item, .text, .contact { grid-template-columns: minmax(0, 1fr); gap: 1.6rem; }
  .contact { grid-template-areas: "info" "list" "extra"; }
  .split__media, .block__media, .item__media, .frame--last .split__media, .frame--last .block__media, .frame--last .item__media { height: 40vh; }
  .block--right .block__media, .item--right .item__media { order: 0; }
  .item__title { font-size: clamp(2.2rem, 11vw, 4rem); }
  .team { grid-template-columns: 1fr; }
  .member.swap-d .member__photo { order: 0; }
  .member.swap-m .member__photo { order: 2; }
  .hero__count { left: 50%; transform: translateX(-50%); bottom: calc(clamp(14px, 2.4vw, 34px) + 62px); }
  .slide__title { font-size: clamp(2.6rem, 14vw, 6rem); }
  .lang { gap: .8rem; }
  .burger { width: 46px; height: 46px; }
  .burger span { left: 14px; right: 14px; }
  .burger span:nth-child(1) { top: 19px; }
  .burger span:nth-child(2) { top: 26px; }
  html.menu-open .burger span:nth-child(1), html.menu-open .burger span:nth-child(2) { top: 22px; }
}
@media (max-width: 700px) {
  .dots { display: none; }
  .dirs__grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .footer { flex-direction: column; align-items: flex-start; }
  .arrow__label { display: none; }
}

/* ==========================================================================
   Без JS и доступность
   ========================================================================== */
.no-js body { overflow: auto; }
.no-js .frames { position: static; }
.no-js .track { transition: none; }
.no-js .frame { height: auto; min-height: 100vh; }
.no-js .track { height: auto; }
.no-js .frame__scroll { height: auto; }
.no-js .menu, .no-js .dots, .no-js .cursor, .no-js .hero__index, .no-js .arrow, .no-js .hero__count { display: none; }
.no-js .hero { height: auto; min-height: 0; }
.no-js .hero__stage { position: static; }
.no-js .slide { position: relative; inset: auto; visibility: visible; opacity: 1; transform: none; margin: 3rem 0; }
.no-js .slide__title { position: static; transform: none; opacity: 1; margin-top: 1rem; }

@media (prefers-reduced-motion: reduce) {
  .track, .slide, .slide__title, .menu, .burger span { transition-duration: .01s !important; transition-delay: 0s !important; }
  html.js .wipe, html.leaving .wipe { animation: none; }
  .scroll-hint span::after { animation: none; top: 0; }
}
